Jinyuanyuan
10 months ago
commit
8a9a67b805
25 changed files with 2367 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
# 默认忽略的文件 |
|||
/shelf/ |
|||
/workspace.xml |
|||
# 基于编辑器的 HTTP 客户端请求 |
|||
/httpRequests/ |
|||
# Datasource local storage ignored files |
|||
/dataSources/ |
|||
/dataSources.local.xml |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ProjectRootManager"> |
|||
<output url="file://$PROJECT_DIR$/out" /> |
|||
</component> |
|||
</project> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="ProjectModuleManager"> |
|||
<modules> |
|||
<module fileurl="file://$PROJECT_DIR$/pgcm.iml" filepath="$PROJECT_DIR$/pgcm.iml" /> |
|||
</modules> |
|||
</component> |
|||
</project> |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module type="JAVA_MODULE" version="4"> |
|||
<component name="NewModuleRootManager" inherit-compiler-output="true"> |
|||
<exclude-output /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|||
</content> |
|||
<orderEntry type="inheritedJdk" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
</component> |
|||
</module> |
@ -0,0 +1,41 @@ |
|||
package com.gy.pgcm.nb.enums; |
|||
|
|||
import cn.bespinglobal.amg.common.exception.ErrorCode; |
|||
import org.apache.http.HttpStatus; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
public enum NbErrorCode implements ErrorCode { |
|||
NO_LOGIN(HttpStatus.SC_BAD_REQUEST, "用户登陆数据错误"), |
|||
NOT_EXIST(HttpStatus.SC_BAD_REQUEST, "数据不存在"), |
|||
ERROR_DO(HttpStatus.SC_BAD_REQUEST, "执行错误"), |
|||
INVALID_PARAM(HttpStatus.SC_BAD_REQUEST, "参数错误"), |
|||
INVALID_ACTION(HttpStatus.SC_BAD_REQUEST, "错误操作") |
|||
; |
|||
|
|||
private int httpStatusCode; |
|||
private String message; |
|||
NbErrorCode(int httpStatusCode, String message) { |
|||
this.httpStatusCode = httpStatusCode; |
|||
this.message = message; |
|||
} |
|||
|
|||
@Override |
|||
public String getModule() { |
|||
return "FIN"; |
|||
} |
|||
|
|||
@Override |
|||
public int getHttpStatusCode() { |
|||
return this.httpStatusCode; |
|||
} |
|||
|
|||
@Override |
|||
public String getMessage() { |
|||
return this.message; |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.gy.pgcm.nb.enums; |
|||
|
|||
import cn.bespinglobal.amg.common.base.IBaseEnum; |
|||
|
|||
/** |
|||
* <p>NB记录类型Enum</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
public enum NbRecordTypeEnum implements IBaseEnum<String> { |
|||
Type_Project("project", "项目"), |
|||
Type_Contract("contract", "合同"), |
|||
Type_Invoice("Invoice", "发票"), |
|||
Type_Invoice_Income("InvoiceIncome", "发票-确认收入"), |
|||
Type_Invoice_Account("InvoiceAccount", "发票-确认到账"), |
|||
; |
|||
|
|||
private String value; |
|||
private String description; |
|||
|
|||
NbRecordTypeEnum(String value, String description) { |
|||
this.value = value; |
|||
this.description = description; |
|||
} |
|||
|
|||
@Override |
|||
public String getValue() { |
|||
return this.value; |
|||
} |
|||
|
|||
public void setValue(String value) { |
|||
this.value = value; |
|||
} |
|||
|
|||
@Override |
|||
public Object getDescription() { |
|||
return this.description; |
|||
} |
|||
|
|||
public void setDescription(String description) { |
|||
this.description = description; |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.gy.pgcm.nb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.gy.pgcm.nb.model.entity.NbLogDO; |
|||
import com.gy.pgcm.nb.model.entity.NbRecordDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@Mapper |
|||
public interface NbLogMapper extends BaseMapper<NbLogDO> { |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.gy.pgcm.nb.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.gy.pgcm.nb.model.entity.NbRecordDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@Mapper |
|||
public interface NbRecordMapper extends BaseMapper<NbRecordDO> { |
|||
|
|||
NbRecordDO findByKey(@Param("type") String type, @Param("key") String key); |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.gy.pgcm.nb.model.entity; |
|||
|
|||
import cn.bespinglobal.amg.common.base.BaseEntity; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* <p>宁波数据接口调用日志</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@Accessors(chain = true) |
|||
@TableName("nb_log") |
|||
public class NbLogDO extends BaseEntity implements Serializable { |
|||
private static final long serialVersionUID = 5654901998048634425L; |
|||
|
|||
/** |
|||
* 日志类型 |
|||
*/ |
|||
private String logType; |
|||
|
|||
/** |
|||
* 传入参数 |
|||
*/ |
|||
private String logParam; |
|||
|
|||
/** |
|||
* 返回结果 |
|||
*/ |
|||
private String logRes; |
|||
|
|||
/** |
|||
* 执行结果 |
|||
*/ |
|||
private Integer isSuc; |
|||
|
|||
/** |
|||
* 错误信息 |
|||
*/ |
|||
private String errMsg; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.gy.pgcm.nb.model.entity; |
|||
|
|||
import cn.bespinglobal.amg.common.base.BaseEntity; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.experimental.Accessors; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* <p>宁波数据同步记录</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@Accessors(chain = true) |
|||
@TableName("nb_record") |
|||
public class NbRecordDO extends BaseEntity implements Serializable { |
|||
private static final long serialVersionUID = 4764199154617593360L; |
|||
|
|||
/** |
|||
* 记录类型 |
|||
*/ |
|||
private String recordType; |
|||
|
|||
/** |
|||
* 记录key |
|||
*/ |
|||
private String recordKey; |
|||
|
|||
/** |
|||
* 标记 0 |
|||
*/ |
|||
private Integer recordFlag; |
|||
|
|||
/** |
|||
* 备注信息 |
|||
*/ |
|||
private String remarks; |
|||
|
|||
/** |
|||
* 是否删除 0 正常; 1 已删除 |
|||
*/ |
|||
private Integer isDelete; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-开票状态返回审批记录候选项结果") |
|||
@Data |
|||
public class NbApproveCandidateItem { |
|||
|
|||
@ApiModelProperty(value = "录候人员部门名称") |
|||
private String deptName; |
|||
|
|||
@ApiModelProperty(value = "录候人员名称") |
|||
private String staffName; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/27 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-开票状态返回审批记录结果") |
|||
@Data |
|||
public class NbApproveItem { |
|||
|
|||
@ApiModelProperty(value = "审批步骤名称") |
|||
private String stepName; |
|||
|
|||
@ApiModelProperty(value = "审批候选人员列表") |
|||
private List<NbApproveCandidateItem> candidateItems; |
|||
|
|||
@ApiModelProperty(value = "审批部门") |
|||
private String approveDept; |
|||
|
|||
@ApiModelProperty(value = "审批人员名称") |
|||
private String approveStaff; |
|||
|
|||
@ApiModelProperty(value = "审批操作时间") |
|||
private String approveTime; |
|||
|
|||
@ApiModelProperty(value = "审批状态 0 待审批; 1 通过; 2 驳回") |
|||
private int approveStatus; |
|||
|
|||
@ApiModelProperty(value = "审批拒绝原因") |
|||
private String approveRejectReason; |
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import com.gy.pgcm.sys.consts.dict.Dict; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-合同参数") |
|||
@Data |
|||
public class NbContractParam { |
|||
|
|||
/** |
|||
* 合同编号 |
|||
*/ |
|||
@ApiModelProperty(value = "合同编号 新增时传空;修改时必传") |
|||
private String contractCode; |
|||
|
|||
/** |
|||
* 合同名称 |
|||
*/ |
|||
@ApiModelProperty(value = "合同名称") |
|||
private String contractName; |
|||
|
|||
// /**
|
|||
// * 合同类型
|
|||
// */
|
|||
// @NotNull
|
|||
// @ApiModelProperty(value = "字典:合同类型(BizContractTypeEnum)", required = true)
|
|||
// private Integer contractType;
|
|||
|
|||
/** |
|||
* 项目编号 |
|||
*/ |
|||
@ApiModelProperty(value = "项目编号", required = true) |
|||
private String projectNo; |
|||
|
|||
/** |
|||
* 合同金额 |
|||
*/ |
|||
@ApiModelProperty(value = "合同金额 默认同项目金额") |
|||
private BigDecimal contractAmount; |
|||
|
|||
/** |
|||
* 是否高新 |
|||
*/ |
|||
@ApiModelProperty(value = "销售合同-是否高新") |
|||
private Integer highTech = 0; |
|||
|
|||
/** |
|||
* 中标方式 |
|||
*/ |
|||
@ApiModelProperty(value = "销售合同-中标方式 字典:中标方式("+ Dict.WINNING_BID_WAY +")", required = true) |
|||
private String winningBidWay; |
|||
|
|||
/** |
|||
* 签出 |
|||
*/ |
|||
@ApiModelProperty(value = "签出", required = true) |
|||
private Integer signOut = 0; |
|||
|
|||
/** |
|||
* 签入 |
|||
*/ |
|||
@ApiModelProperty(value = "签入", required = true) |
|||
private Integer signIn = 0; |
|||
|
|||
/** |
|||
* 确认日期 |
|||
*/ |
|||
@ApiModelProperty(value = "确认日期 yyyy-MM-dd") |
|||
private String confirmDate; |
|||
|
|||
// /**
|
|||
// * 销售合同-关联实施人员Code列表
|
|||
// */
|
|||
// @ApiModelProperty(value = "销售合同-关联实施人员Code列表 多个用,连接")
|
|||
// private String implUserCodes;
|
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import com.gy.pgcm.sys.consts.dict.Dict; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/25 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-合同查询参数") |
|||
@Data |
|||
public class NbContractQueryParam { |
|||
|
|||
/** |
|||
* 合同编号 |
|||
*/ |
|||
@ApiModelProperty(value = "合同编号") |
|||
private String contractCode; |
|||
|
|||
/** |
|||
* 合同名称 |
|||
*/ |
|||
@ApiModelProperty(value = "合同名称") |
|||
private String contractName; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-发票确认到账参数") |
|||
@Data |
|||
public class NbInvoiceAccountParam { |
|||
|
|||
/** |
|||
* 确认到账Id |
|||
*/ |
|||
@ApiModelProperty(value = "确认到账Id 删除时必传") |
|||
private String accountId; |
|||
|
|||
/** |
|||
* 关联开票单号 |
|||
*/ |
|||
@ApiModelProperty(value = "关联开票单号 新增时必传") |
|||
private String invoiceNo; |
|||
|
|||
/** |
|||
* 确认到账日期yyyy-MM-dd |
|||
*/ |
|||
@ApiModelProperty(value = "确认到账日期yyyy-MM-dd 新增时必传") |
|||
private String accountDate; |
|||
|
|||
/** |
|||
* 确认到账金额 |
|||
*/ |
|||
@ApiModelProperty(value = "确认到账金额 新增时必传") |
|||
private BigDecimal accountAmount; |
|||
|
|||
/** |
|||
* 操作标记 0 新增;1 删除 |
|||
*/ |
|||
@ApiModelProperty(value = "操作标记 0 新增;1 删除 默认0") |
|||
private Integer opFlag; |
|||
|
|||
/** |
|||
* 操作员工编码 |
|||
*/ |
|||
@ApiModelProperty(value = "操作员工编码", required = true) |
|||
private String opUserCode; |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-开票确认参数") |
|||
@Data |
|||
public class NbInvoiceConfirmParam { |
|||
|
|||
/** |
|||
* 开票单号 |
|||
*/ |
|||
@ApiModelProperty(value = "开票单号", required = true) |
|||
private String invoiceNo; |
|||
|
|||
/** |
|||
* 开票确认日期yyyy-MM-dd |
|||
*/ |
|||
@ApiModelProperty(value = "开票确认日期yyyy-MM-dd", required = true) |
|||
private String confirmDate; |
|||
|
|||
/** |
|||
* 确认员工编码 |
|||
*/ |
|||
@ApiModelProperty(value = "确认员工编码", required = true) |
|||
private String confirmUserCode; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-发票确认收入参数") |
|||
@Data |
|||
public class NbInvoiceIncomeParam { |
|||
|
|||
/** |
|||
* 确认收入Id |
|||
*/ |
|||
@ApiModelProperty(value = "确认收入Id 删除时必传") |
|||
private String incomeId; |
|||
|
|||
/** |
|||
* 关联开票单号 |
|||
*/ |
|||
@ApiModelProperty(value = "关联开票单号 新增时必传") |
|||
private String invoiceNo; |
|||
|
|||
/** |
|||
* 确认收入日期yyyy-MM-dd |
|||
*/ |
|||
@ApiModelProperty(value = "确认收入日期yyyy-MM-dd 新增时必传") |
|||
private String incomeDate; |
|||
|
|||
/** |
|||
* 确认收入金额 |
|||
*/ |
|||
@ApiModelProperty(value = "确认收入金额 新增时必传") |
|||
private BigDecimal incomeAmount; |
|||
|
|||
/** |
|||
* 操作标记 0 新增;1 删除 |
|||
*/ |
|||
@ApiModelProperty(value = "操作标记 0 新增;1 删除 默认0") |
|||
private Integer opFlag; |
|||
|
|||
/** |
|||
* 操作员工编码 |
|||
*/ |
|||
@ApiModelProperty(value = "操作员工编码", required = true) |
|||
private String opUserCode; |
|||
|
|||
} |
@ -0,0 +1,115 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-开票信息参数") |
|||
@Data |
|||
public class NbInvoiceParam { |
|||
|
|||
/** |
|||
* 申请单号 |
|||
*/ |
|||
@ApiModelProperty(value = "申请单号, 新增时传空,修改时必传") |
|||
private String invoiceNo; |
|||
|
|||
/** |
|||
* 开票日期yyyy-MM-dd |
|||
*/ |
|||
@ApiModelProperty(value = "开票日期yyyy-MM-dd", required = true) |
|||
private String invoiceDate; |
|||
|
|||
/** |
|||
* 项目Id |
|||
*/ |
|||
@ApiModelProperty(value = "项目编号 开票申请时必传") |
|||
private String projectNo; |
|||
|
|||
/** |
|||
* 合同收款进度 |
|||
*/ |
|||
@ApiModelProperty(value = "合同收款进度") |
|||
private String receiptScheduleName; |
|||
|
|||
/** |
|||
* 付款方名称 |
|||
*/ |
|||
@ApiModelProperty(value = "付款方名称 开票申请时必传") |
|||
private String payerName; |
|||
|
|||
/** |
|||
* 纳税人识别号 |
|||
*/ |
|||
@ApiModelProperty(value = "纳税人识别号 开票申请时必传") |
|||
private String payerNumber; |
|||
|
|||
/** |
|||
* 开票金额 |
|||
*/ |
|||
@ApiModelProperty(value = "开票金额", required = true) |
|||
private BigDecimal invoiceAmount; |
|||
|
|||
/** |
|||
* 开票内容 |
|||
*/ |
|||
@ApiModelProperty(value = "开票内容 字典(开票内容) 开票申请时必传") |
|||
private String invoiceContent; |
|||
|
|||
/** |
|||
* 付款方式 |
|||
*/ |
|||
@ApiModelProperty(value = "付款方式 字典(付款方式) 开票申请时必传") |
|||
private String paymentMode; |
|||
|
|||
/** |
|||
* 发票类型 |
|||
*/ |
|||
@ApiModelProperty(value = "发票类型 字典(发票类型) 开票申请时必传") |
|||
private String invoiceType; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@ApiModelProperty(value = "备注 退票时必传") |
|||
private String remarkInfo; |
|||
|
|||
/** |
|||
* 特殊说明 |
|||
*/ |
|||
@ApiModelProperty(value = "特殊说明") |
|||
private String specialInfo; |
|||
|
|||
/** |
|||
* 证明文件Id |
|||
*/ |
|||
@ApiModelProperty(value = "证明文件Id 多个用逗号分割") |
|||
private String evidenceId; |
|||
|
|||
/** |
|||
* 是否退票 1 是;0 否 |
|||
*/ |
|||
@ApiModelProperty(value = "是否退票 1 是;0 否", required = true) |
|||
private Integer isReturn; |
|||
|
|||
/** |
|||
* 退票原始单号 退票时必填 |
|||
*/ |
|||
@ApiModelProperty(value = "退票原始单号 退票时必填") |
|||
private String returnInvoiceNo; |
|||
|
|||
/** |
|||
* 申请员工编号 |
|||
*/ |
|||
@ApiModelProperty(value = "申请员工编号", required = true) |
|||
private String applyUserCode; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/26 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-开票状态返回结果") |
|||
@Data |
|||
public class NbInvoiceStatusResult { |
|||
|
|||
/** |
|||
* 申请单号 |
|||
*/ |
|||
@ApiModelProperty(value = "申请单号") |
|||
private String invoiceNo; |
|||
|
|||
/** |
|||
* 状态 0 未提交, 1 审批中, 2 已通过(未确认), 3 已驳回, 4 已确认, 5 已退回, 6 已撤回 |
|||
*/ |
|||
@ApiModelProperty(value = "状态 0 未提交, 1 审批中, 2 已通过(未确认), 3 已驳回, 4 已确认, 5 已退回, 6 已撤回") |
|||
private Integer status; |
|||
|
|||
/** |
|||
* 审批信息 |
|||
*/ |
|||
@ApiModelProperty(value = "审批信息") |
|||
private String approveMsg; |
|||
|
|||
/** |
|||
* 审批记录 |
|||
*/ |
|||
@ApiModelProperty(value = "审批记录") |
|||
private List<NbApproveItem> approveItems; |
|||
|
|||
} |
@ -0,0 +1,146 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import com.gy.pgcm.sys.consts.dict.Dict; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/25 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-项目参数") |
|||
@Data |
|||
public class NbProjectParam { |
|||
|
|||
/** |
|||
* 项目编号 |
|||
*/ |
|||
@ApiModelProperty(value = "项目编号 新增项目时传空;修改时必传") |
|||
private String projectNo; |
|||
|
|||
/** |
|||
* 项目名称 |
|||
*/ |
|||
@ApiModelProperty(value = "项目名称", required = true) |
|||
private String projectName; |
|||
|
|||
/** |
|||
* 项目类型 |
|||
*/ |
|||
@ApiModelProperty(value = "项目类型("+ Dict.PROJECT_TYPE +")", required = true) |
|||
private String projectType; |
|||
|
|||
/** |
|||
* 所属区域 |
|||
*/ |
|||
@ApiModelProperty(value = "所属区域("+ Dict.AREA +")", required = true) |
|||
private String areaCode; |
|||
|
|||
/** |
|||
* 是否涉密->客户类别 |
|||
*/ |
|||
@ApiModelProperty(value = "客户类别(ProjectSecretEnum)", required = true) |
|||
private Integer projectSecret; |
|||
|
|||
/** |
|||
* 销售负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "销售负责人员工编号", required = true) |
|||
private String salesLeaderCode; |
|||
|
|||
/** |
|||
* 名义总监 |
|||
*/ |
|||
@ApiModelProperty(value = "名义总监员工编号") |
|||
private String nominalDirectorCode; |
|||
|
|||
/** |
|||
* 项目实施部门 |
|||
*/ |
|||
@ApiModelProperty(value = "项目实施部门编码", required = true) |
|||
private String deptCode; |
|||
|
|||
/** |
|||
* 实施负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "实施负责人员工编号", required = true) |
|||
private String projectManagerCode; |
|||
|
|||
/** |
|||
* 项目金额 |
|||
*/ |
|||
@ApiModelProperty(value = "项目金额", required = true) |
|||
private BigDecimal contractAmount; |
|||
|
|||
/** |
|||
* 投资金额(万元) |
|||
*/ |
|||
@ApiModelProperty(value = "投资金额(万元)") |
|||
private BigDecimal projectConstructionScale; |
|||
|
|||
/** |
|||
* 甲方单位名称 |
|||
*/ |
|||
@ApiModelProperty(value = "甲方单位名称") |
|||
private String projectCompany; |
|||
|
|||
/** |
|||
* 项目起始时间 |
|||
*/ |
|||
@ApiModelProperty(value = "项目起始时间 yyyy-MM-dd", required = true) |
|||
private String projectStartDate; |
|||
|
|||
/** |
|||
* 项目截止时间 |
|||
*/ |
|||
@ApiModelProperty(value = "项目截止时间 yyyy-MM-dd", required = true) |
|||
private String projectEndDate; |
|||
|
|||
/** |
|||
* 是否直接实施 |
|||
*/ |
|||
@ApiModelProperty(value = "是否直接实施 0 否; 1 是 默认0") |
|||
private Integer directImplementation = 1; |
|||
|
|||
/** |
|||
* 项目所属类型 |
|||
*/ |
|||
@ApiModelProperty(value = "项目所属类型", required = true) |
|||
private String projectCaseType; |
|||
|
|||
/** |
|||
* 项目所属行业 |
|||
*/ |
|||
@ApiModelProperty(value = "项目所属行业", required = true) |
|||
private String projectIndustry; |
|||
|
|||
/** |
|||
* 所属用户类型 |
|||
*/ |
|||
@ApiModelProperty(value = "所属用户类型", required = true) |
|||
private String projectUserProperty; |
|||
|
|||
/** |
|||
* 项目描述 |
|||
*/ |
|||
@ApiModelProperty(value = "项目描述") |
|||
private String projectDescription; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@ApiModelProperty(value = "备注") |
|||
private String remarks; |
|||
|
|||
/** |
|||
* 项目状态(0 商务、 1 未启动、 2 实施中、 3 验收中、 4 已验收、 9 申请结项、 10 已结项、 11 已关闭) |
|||
*/ |
|||
@ApiModelProperty(value = "项目状态(0 商务、 1 未启动、 2 实施中、 3 验收中、 4 已验收、 9 申请结项、 10 已结项、 11 已关闭) 查询项目信息时使用") |
|||
private Integer projectStatus; |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.gy.pgcm.nb.model.param; |
|||
|
|||
import com.gy.pgcm.sys.consts.dict.Dict; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/25 |
|||
*/ |
|||
@ApiModel("宁波系统数据接口-项目查询参数") |
|||
@Data |
|||
public class NbProjectQueryParam { |
|||
|
|||
/** |
|||
* 项目编号 |
|||
*/ |
|||
@ApiModelProperty(value = "项目编号") |
|||
private String projectNo; |
|||
|
|||
/** |
|||
* 项目名称 |
|||
*/ |
|||
@ApiModelProperty(value = "项目名称") |
|||
private String projectName; |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
package com.gy.pgcm.nb.service; |
|||
|
|||
import com.gy.pgcm.nb.model.param.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/25 |
|||
*/ |
|||
public interface INbService { |
|||
|
|||
/** |
|||
* 同步项目信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbProjectParam project(NbProjectParam param); |
|||
|
|||
/** |
|||
* 同步合同信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbContractParam contract(NbContractParam param); |
|||
|
|||
/** |
|||
* |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbInvoiceParam invoice(NbInvoiceParam param); |
|||
|
|||
/** |
|||
* |
|||
* @param invoiceNo |
|||
* @return |
|||
*/ |
|||
NbInvoiceStatusResult invoiceDelete(String invoiceNo); |
|||
|
|||
/** |
|||
* |
|||
* @param file |
|||
* @return |
|||
*/ |
|||
String uploadEvidence(MultipartFile file); |
|||
|
|||
/** |
|||
* 开票确认 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbInvoiceConfirmParam invoiceConfirm(NbInvoiceConfirmParam param); |
|||
|
|||
/** |
|||
* 同步开票确认收入信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbInvoiceIncomeParam invoiceIncome(NbInvoiceIncomeParam param); |
|||
|
|||
/** |
|||
* 同步开票确认到账信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbInvoiceAccountParam invoiceAccount(NbInvoiceAccountParam param); |
|||
|
|||
/** |
|||
* 获取开票信息审批信息 |
|||
* @param invoiceNo |
|||
* @return |
|||
*/ |
|||
NbInvoiceStatusResult invoiceStatus(String invoiceNo); |
|||
|
|||
/** |
|||
* 获取开票申请单文件 |
|||
* @param invoiceNo |
|||
* @param response |
|||
*/ |
|||
void invoiceForm(String invoiceNo, HttpServletResponse response); |
|||
|
|||
/** |
|||
* 获取项目信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbProjectParam getProject(NbProjectQueryParam param); |
|||
|
|||
/** |
|||
* 获取合同信息 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
NbContractParam getContract(NbContractQueryParam param); |
|||
|
|||
/** |
|||
* 调整项目状态 |
|||
* @param status |
|||
* @param projectNo |
|||
* @return |
|||
*/ |
|||
Boolean changeProject(String status, String projectNo); |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,125 @@ |
|||
package com.gy.pgcm.nb.web; |
|||
|
|||
import cn.bespinglobal.amg.common.auth.PassAuth; |
|||
import cn.bespinglobal.amg.common.result.Response; |
|||
import com.gy.pgcm.nb.model.param.*; |
|||
import com.gy.pgcm.nb.service.INbService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
import springfox.documentation.annotations.ApiIgnore; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* <p>TODO</p> |
|||
* |
|||
* @author zg |
|||
* @since 2023/12/25 |
|||
*/ |
|||
@Api(tags = "宁波系统数据对接接口") |
|||
@RestController |
|||
@RequestMapping("/api/nb") |
|||
public class NbController { |
|||
|
|||
@Autowired |
|||
private INbService nbService; |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步项目信息", notes = "同步项目信息", produces = "application/json") |
|||
@PostMapping("/project") |
|||
public Response<NbProjectParam> project(@Valid @RequestBody NbProjectParam param) { |
|||
return Response.ok(this.nbService.project(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步合同信息", notes = "同步合同信息", produces = "application/json") |
|||
@PostMapping("/contract") |
|||
public Response<NbContractParam> contract(@Valid @RequestBody NbContractParam param) { |
|||
return Response.ok(this.nbService.contract(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步开票信息", notes = "同步开票信息", produces = "application/json") |
|||
@PostMapping("/invoice") |
|||
public Response<NbInvoiceParam> invoice(@Valid @RequestBody NbInvoiceParam param) { |
|||
return Response.ok(this.nbService.invoice(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步开票信息-删除", notes = "同步开票信息-删除", produces = "application/json") |
|||
@DeleteMapping("/invoice/{invoiceNo}") |
|||
public Response<NbInvoiceStatusResult> invoiceDelete(@ApiParam(value = "发票申请单号", required = true) @PathVariable String invoiceNo) { |
|||
return Response.ok(this.nbService.invoiceDelete(invoiceNo)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "发票证明文件上传", notes = "发票证明文件上传") |
|||
@PostMapping(value = "/invoice/uploadEvidence") |
|||
public Response<String> uploadEvidence(@ApiParam(value = "文件") @RequestParam("file") MultipartFile file) { |
|||
return Response.ok(this.nbService.uploadEvidence(file)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "开票确认", notes = "开票确认", produces = "application/json") |
|||
@PostMapping("/invoice/confirm") |
|||
public Response<NbInvoiceConfirmParam> invoiceConfirm(@Valid @RequestBody NbInvoiceConfirmParam param) { |
|||
return Response.ok(this.nbService.invoiceConfirm(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步开票确认收入信息(新增、删除)", notes = "同步开票确认收入信息(新增、删除)", produces = "application/json") |
|||
@PostMapping("/invoice/income") |
|||
public Response<NbInvoiceIncomeParam> invoiceIncome(@Valid @RequestBody NbInvoiceIncomeParam param) { |
|||
return Response.ok(this.nbService.invoiceIncome(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "同步开票确认到账信息(新增、删除)", notes = "同步开票确认到账信息(新增、删除)", produces = "application/json") |
|||
@PostMapping("/invoice/account") |
|||
public Response<NbInvoiceAccountParam> invoiceAccount(@Valid @RequestBody NbInvoiceAccountParam param) { |
|||
return Response.ok(this.nbService.invoiceAccount(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "获取开票申请审批信息", notes = "获取开票申请审批信息", produces = "application/json") |
|||
@GetMapping("/invoice/status/{invoiceNo}") |
|||
public Response<NbInvoiceStatusResult> invoiceStatus(@ApiParam(value = "发票申请单号", required = true) @PathVariable String invoiceNo) { |
|||
return Response.ok(this.nbService.invoiceStatus(invoiceNo)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "获取开票申请单文件", notes = "获取开票申请单文件") |
|||
@GetMapping("/invoice/form/{invoiceNo}") |
|||
public void invoiceForm(@ApiParam(value = "发票申请单号", required = true)@PathVariable String invoiceNo, |
|||
@ApiIgnore HttpServletResponse response) { |
|||
this.nbService.invoiceForm(invoiceNo, response); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "获取项目信息", notes = "获取项目信息") |
|||
@GetMapping("/project") |
|||
public Response<NbProjectParam> getProject(@Valid NbProjectQueryParam param) { |
|||
return Response.ok(this.nbService.getProject(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "获取合同信息", notes = "获取合同信息") |
|||
@GetMapping("/contract") |
|||
public Response<NbContractParam> getContract(@Valid NbContractQueryParam param) { |
|||
return Response.ok(this.nbService.getContract(param)); |
|||
} |
|||
|
|||
@PassAuth |
|||
@ApiOperation(value = "关闭、重新启动项目", notes = "关闭、重新启动项目") |
|||
@PutMapping("/project/{status}/{projectNo}") |
|||
public Response<Boolean> changeProject(@ApiParam(value = "调整状态 CLOSE 关闭; RESTART 重新启动", required = true) @PathVariable String status, |
|||
@ApiParam(value = "项目编号", required = true) @PathVariable String projectNo) { |
|||
return Response.ok(this.nbService.changeProject(status, projectNo)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.gy.pgcm.nb.mapper.NbRecordMapper"> |
|||
<select id="findByKey" resultType="com.gy.pgcm.nb.model.entity.NbRecordDO"> |
|||
select * |
|||
from nb_record nr |
|||
where nr.is_delete = 0 |
|||
and nr.record_type = #{type} |
|||
and nr.record_key = #{key} |
|||
order by nr.record_key |
|||
limit 1 |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue