Merge branch 'dev' into 'test'
国贸2.0系统推送合同回调:消息固定R_JG_MY_00应答,_interfaceType__固定传R_MY_JG_10 See merge request jygk/dsc-base!18
This commit is contained in:
@@ -236,6 +236,12 @@ public class ContractRespDTO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespDTO> detail;
|
||||
|
||||
|
||||
@@ -283,6 +283,11 @@ public class OrderDTO {
|
||||
*/
|
||||
@TableField("PYER_NUM")
|
||||
private String payerNum;
|
||||
/**
|
||||
* 货权准转移类型
|
||||
*/
|
||||
private String meteringType;
|
||||
|
||||
|
||||
/**
|
||||
* 订单明细
|
||||
|
||||
@@ -198,6 +198,11 @@ public class PurchaseOrderWithDetailsDTO {
|
||||
* 税码
|
||||
*/
|
||||
private String taxNum;
|
||||
|
||||
/**
|
||||
* 货权准转移类型
|
||||
*/
|
||||
private String meteringType;
|
||||
/**
|
||||
* 采购订单明细
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscDatBsnRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscItmBsnRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -242,14 +242,20 @@ public class ContractRespVO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
// 合同动态表单
|
||||
private List<TemplateInstanceDataRespVO> dynamicsFields;
|
||||
// 合同动态字段
|
||||
private List<TmplInscDatBsnRespVO> dynamicsFields;
|
||||
|
||||
// 合同动态条款
|
||||
private List<TemplateInstanceItemRespVO> dynamicsItems;
|
||||
private List<TmplInscItmBsnRespVO> dynamicsItems;
|
||||
|
||||
// 价款结算条款
|
||||
private List<FormulaRespVO> formulas;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract;
|
||||
|
||||
import cn.hutool.json.JSONArray;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscDatBsnSaveReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscItmBsnSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -211,11 +212,20 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
@Schema(description = "模板中间表ID")
|
||||
private Long businessId;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
// 合同动态表单
|
||||
private List<TemplateInstanceDataSaveReqVO> dynamicsFields;
|
||||
// 合同动态字段
|
||||
private List<TmplInscDatBsnSaveReqVO> dynamicsFields;
|
||||
|
||||
// 合同动态条款
|
||||
private List<TmplInscItmBsnSaveReqVO> dynamicsItems;
|
||||
|
||||
// 价款结算条款
|
||||
private List<FormulaSaveReqVO> formulas;
|
||||
|
||||
@@ -10,9 +10,9 @@ public class RelationReqVo {
|
||||
|
||||
@Schema(description = "上游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "上游主键不能为空")
|
||||
private Long upId;
|
||||
private String upId;
|
||||
|
||||
@Schema(description = "下游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "下游主键不能为空")
|
||||
private Long downId;
|
||||
private String downId;
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ public class IntContract {
|
||||
private String contractType; // 合同类型 (货运;货代;仓储;保险)
|
||||
@Schema(description = "是否非标准合同文本")
|
||||
private String textType; // 是否非标准合同文本
|
||||
@Schema(description = "合同有效期起 (格式: yyyyMMdd)")
|
||||
private String contractStartDate; // 合同有效期起 (格式: yyyyMMdd)
|
||||
@Schema(description = "合同有效期止 (格式: yyyyMMdd)")
|
||||
private String contractEndDate; // 合同有效期止 (格式: yyyyMMdd)
|
||||
@Schema(description = "合同有效期起")
|
||||
private String contractStartDate; // 合同有效期起
|
||||
@Schema(description = "合同有效期止")
|
||||
private String contractEndDate; // 合同有效期止
|
||||
@Schema(description = "是否固定单价 (0-浮动, 1-固定)")
|
||||
private String priceType; // 是否固定单价 (0-浮动, 1-固定)
|
||||
@Schema(description = "合同币种")
|
||||
@@ -97,8 +97,8 @@ public class IntContract {
|
||||
private String approvePassDate; // 拟签通过日期
|
||||
@Schema(description = "签约地 (40-签约必填)")
|
||||
private String signSite; // 签约地 (40-签约必填)
|
||||
@Schema(description = "签约日期 (40-签约必填, 格式: yyyyMMdd)")
|
||||
private String signDate; // 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
||||
@Schema(description = "签约日期 (40-签约必填)")
|
||||
private String signDate; // 签约日期 (40-签约必填)
|
||||
@Schema(description = "对方签约人 (40-签约必填)")
|
||||
private String signFirstPerson; // 对方签约人 (40-签约必填)
|
||||
@Schema(description = "我方签约人工号 (40-签约必填)")
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.zt.plat.module.erp.controller.admin.erp.vo.ErpContractSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -44,9 +45,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -178,7 +177,7 @@ public class ContractApiImpl implements ContractApi {
|
||||
SystemRelativityDO systemRelativityDO = systemRelativityMapper.selectOne("UP_ID", externalId);
|
||||
if ("I".equals(operateFlag)) {
|
||||
if (systemRelativityDO != null && systemRelativityDO.getDownId() != null) { // 修改合同
|
||||
contractId = systemRelativityDO.getDownId();
|
||||
contractId = Long.parseLong(systemRelativityDO.getDownId());
|
||||
contractMainDO.setId(contractId);
|
||||
contractMainMapper.updateById(contractMainDO);
|
||||
} else { // 新增合同
|
||||
@@ -187,15 +186,15 @@ public class ContractApiImpl implements ContractApi {
|
||||
|
||||
// 生成关联数据
|
||||
SystemRelativityDO saveRelation = new SystemRelativityDO();
|
||||
saveRelation.setUpId(Long.parseLong(externalId));
|
||||
saveRelation.setDownId(contractId);
|
||||
saveRelation.setUpId(externalId);
|
||||
saveRelation.setDownId(contractId.toString());
|
||||
saveRelation.setWay(DictEnum.BSE_SYS_REL_WY_EXTERNAL.getCode());
|
||||
saveRelation.setStatus(DictEnum.BSE_SYS_REL_TP_CONTRACT.getCode());
|
||||
systemRelativityMapper.insert(saveRelation);
|
||||
}
|
||||
} else if ("D".equals(operateFlag)) {
|
||||
if (systemRelativityDO == null || systemRelativityDO.getDownId() == null) throw exception(CONTRACT_NOT_EXISTS);
|
||||
contractId = systemRelativityDO.getDownId();
|
||||
contractId = Long.parseLong(systemRelativityDO.getDownId());
|
||||
contractMainMapper.deleteById(contractId);
|
||||
// 删除动态条款信息
|
||||
contractOtherFormMapper.delete("CTRT_MAIN_ID", contractId.toString());
|
||||
@@ -378,17 +377,17 @@ public class ContractApiImpl implements ContractApi {
|
||||
// 返回数据
|
||||
IntPushContractRespVO body = new IntPushContractRespVO();
|
||||
body.set__requestId_(pushReqVO.get__requestId_());
|
||||
body.set__interfaceType__(pushReqVO.get__interfaceType__());
|
||||
body.set__interfaceType__("R_MY_JG_10");
|
||||
body.setBusiBillCode(pushReqVO.getBusiBillCode());
|
||||
body.setCode(code);
|
||||
body.setMessage(String.format("推送合同[%s]%s", pushReqVO.getData().getContractCode(), code >= 0 ? "成功" : "失败:" + msg));
|
||||
body.setMessage(String.format("推送合同[%s]%s", pushReqVO.getBusiBillCode(), code >= 0 ? "成功" : "失败:" + msg));
|
||||
body.setDatetime(DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()));
|
||||
body.setSystem("JYGK");
|
||||
body.setOperateFlag(pushReqVO.getOperateFlag());
|
||||
|
||||
// 回调参数
|
||||
JSONObject req = new JSONObject();
|
||||
req.set("messageKey", pushReqVO.getBusiBillCode());
|
||||
req.set("messageKey", "R_JG_MY_00");
|
||||
req.set("messageBody", body);
|
||||
try {
|
||||
log.info("国贸系统推送合同回调参数:{}",req);
|
||||
@@ -565,13 +564,21 @@ public class ContractApiImpl implements ContractApi {
|
||||
// 是否虚拟合同 默认值:否(0)
|
||||
contractMainDO.setContractVirtual(DictEnum.ERP_CTRT_YN_NO.getCode());
|
||||
// 代理方 默认值:NULL
|
||||
// 签署日期 -> 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
contractMainDO.setSignDate(LocalDateTime.parse(reqVO.getSignDate()+"000000", formatter));
|
||||
// 开始日期 -> 合同有效期起 (格式: yyyyMMdd)
|
||||
contractMainDO.setStartDate(LocalDateTime.parse(reqVO.getContractStartDate()+"000000", formatter));
|
||||
// 结束日期 -> 合同有效期止 (格式: yyyyMMdd)
|
||||
contractMainDO.setEndDate(LocalDateTime.parse(reqVO.getContractEndDate()+"000000", formatter));
|
||||
// 签署日期 -> 签约日期 (40-签约必填)
|
||||
if (StringUtils.isNotEmpty(reqVO.getSignDate())) {
|
||||
contractMainDO.setSignDate(Instant.ofEpochMilli(Long.parseLong(reqVO.getSignDate()))
|
||||
.atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
}
|
||||
// 开始日期 -> 合同有效期起
|
||||
if (StringUtils.isNotEmpty(reqVO.getContractStartDate())) {
|
||||
contractMainDO.setStartDate(Instant.ofEpochMilli(Long.parseLong(reqVO.getContractStartDate()))
|
||||
.atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
}
|
||||
// 结束日期 -> 合同有效期止
|
||||
if (StringUtils.isNotEmpty(reqVO.getContractEndDate())) {
|
||||
contractMainDO.setEndDate(Instant.ofEpochMilli(Long.parseLong(reqVO.getContractEndDate()))
|
||||
.atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||
}
|
||||
// 币种 -> 合同币种
|
||||
contractMainDO.setCurrency(reqVO.getCurrencyCode());
|
||||
// 原币金额 -> 预估含税总金额
|
||||
|
||||
@@ -7,9 +7,9 @@ import lombok.Data;
|
||||
@Schema(description = "关联订单请求参数 VO")
|
||||
public class LinkOrderReqVO {
|
||||
@Schema(description = "上游订单号")
|
||||
private Long upOrderId;
|
||||
private String upOrderId;
|
||||
@Schema(description = "下游订单号")
|
||||
private Long downOrderId;
|
||||
private String downOrderId;
|
||||
@Schema(description = "关联订单类型")
|
||||
private String linkOrderType;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -133,5 +134,8 @@ public class PurchaseOrderPageReqVO extends PageParam {
|
||||
@Schema(description = "订单分类")
|
||||
private String splyBsnTp;
|
||||
|
||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||
private String meteringType;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user