国贸推送合同对接修改
This commit is contained in:
@@ -239,6 +239,9 @@ public class ContractRespDTO {
|
|||||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||||
private String meteringType;
|
private String meteringType;
|
||||||
|
|
||||||
|
@Schema(description = "模板中间表ID")
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
private List<DetailRespDTO> detail;
|
private List<DetailRespDTO> detail;
|
||||||
|
|
||||||
|
|||||||
@@ -245,6 +245,9 @@ public class ContractRespVO {
|
|||||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||||
private String meteringType;
|
private String meteringType;
|
||||||
|
|
||||||
|
@Schema(description = "模板中间表ID")
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
private List<DetailRespVO> detail;
|
private List<DetailRespVO> detail;
|
||||||
|
|
||||||
|
|||||||
@@ -214,6 +214,9 @@ public class ContractSaveReqVO {
|
|||||||
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
@Schema(description = "货权转移类型(字典:ASY_MTNG_TP)")
|
||||||
private String meteringType;
|
private String meteringType;
|
||||||
|
|
||||||
|
@Schema(description = "模板中间表ID")
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
private List<DetailSaveReqVO> detail;
|
private List<DetailSaveReqVO> detail;
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ public class RelationReqVo {
|
|||||||
|
|
||||||
@Schema(description = "上游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "上游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotBlank(message = "上游主键不能为空")
|
@NotBlank(message = "上游主键不能为空")
|
||||||
private Long upId;
|
private String upId;
|
||||||
|
|
||||||
@Schema(description = "下游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "下游主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotBlank(message = "下游主键不能为空")
|
@NotBlank(message = "下游主键不能为空")
|
||||||
private Long downId;
|
private String downId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ public class IntContract {
|
|||||||
private String contractType; // 合同类型 (货运;货代;仓储;保险)
|
private String contractType; // 合同类型 (货运;货代;仓储;保险)
|
||||||
@Schema(description = "是否非标准合同文本")
|
@Schema(description = "是否非标准合同文本")
|
||||||
private String textType; // 是否非标准合同文本
|
private String textType; // 是否非标准合同文本
|
||||||
@Schema(description = "合同有效期起 (格式: yyyyMMdd)")
|
@Schema(description = "合同有效期起")
|
||||||
private String contractStartDate; // 合同有效期起 (格式: yyyyMMdd)
|
private String contractStartDate; // 合同有效期起
|
||||||
@Schema(description = "合同有效期止 (格式: yyyyMMdd)")
|
@Schema(description = "合同有效期止")
|
||||||
private String contractEndDate; // 合同有效期止 (格式: yyyyMMdd)
|
private String contractEndDate; // 合同有效期止
|
||||||
@Schema(description = "是否固定单价 (0-浮动, 1-固定)")
|
@Schema(description = "是否固定单价 (0-浮动, 1-固定)")
|
||||||
private String priceType; // 是否固定单价 (0-浮动, 1-固定)
|
private String priceType; // 是否固定单价 (0-浮动, 1-固定)
|
||||||
@Schema(description = "合同币种")
|
@Schema(description = "合同币种")
|
||||||
@@ -97,8 +97,8 @@ public class IntContract {
|
|||||||
private String approvePassDate; // 拟签通过日期
|
private String approvePassDate; // 拟签通过日期
|
||||||
@Schema(description = "签约地 (40-签约必填)")
|
@Schema(description = "签约地 (40-签约必填)")
|
||||||
private String signSite; // 签约地 (40-签约必填)
|
private String signSite; // 签约地 (40-签约必填)
|
||||||
@Schema(description = "签约日期 (40-签约必填, 格式: yyyyMMdd)")
|
@Schema(description = "签约日期 (40-签约必填)")
|
||||||
private String signDate; // 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
private String signDate; // 签约日期 (40-签约必填)
|
||||||
@Schema(description = "对方签约人 (40-签约必填)")
|
@Schema(description = "对方签约人 (40-签约必填)")
|
||||||
private String signFirstPerson; // 对方签约人 (40-签约必填)
|
private String signFirstPerson; // 对方签约人 (40-签约必填)
|
||||||
@Schema(description = "我方签约人工号 (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 io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.time.LocalDate;
|
import java.time.*;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -178,7 +177,7 @@ public class ContractApiImpl implements ContractApi {
|
|||||||
SystemRelativityDO systemRelativityDO = systemRelativityMapper.selectOne("UP_ID", externalId);
|
SystemRelativityDO systemRelativityDO = systemRelativityMapper.selectOne("UP_ID", externalId);
|
||||||
if ("I".equals(operateFlag)) {
|
if ("I".equals(operateFlag)) {
|
||||||
if (systemRelativityDO != null && systemRelativityDO.getDownId() != null) { // 修改合同
|
if (systemRelativityDO != null && systemRelativityDO.getDownId() != null) { // 修改合同
|
||||||
contractId = systemRelativityDO.getDownId();
|
contractId = Long.parseLong(systemRelativityDO.getDownId());
|
||||||
contractMainDO.setId(contractId);
|
contractMainDO.setId(contractId);
|
||||||
contractMainMapper.updateById(contractMainDO);
|
contractMainMapper.updateById(contractMainDO);
|
||||||
} else { // 新增合同
|
} else { // 新增合同
|
||||||
@@ -187,15 +186,15 @@ public class ContractApiImpl implements ContractApi {
|
|||||||
|
|
||||||
// 生成关联数据
|
// 生成关联数据
|
||||||
SystemRelativityDO saveRelation = new SystemRelativityDO();
|
SystemRelativityDO saveRelation = new SystemRelativityDO();
|
||||||
saveRelation.setUpId(Long.parseLong(externalId));
|
saveRelation.setUpId(externalId);
|
||||||
saveRelation.setDownId(contractId);
|
saveRelation.setDownId(contractId.toString());
|
||||||
saveRelation.setWay(DictEnum.BSE_SYS_REL_WY_EXTERNAL.getCode());
|
saveRelation.setWay(DictEnum.BSE_SYS_REL_WY_EXTERNAL.getCode());
|
||||||
saveRelation.setStatus(DictEnum.BSE_SYS_REL_TP_CONTRACT.getCode());
|
saveRelation.setStatus(DictEnum.BSE_SYS_REL_TP_CONTRACT.getCode());
|
||||||
systemRelativityMapper.insert(saveRelation);
|
systemRelativityMapper.insert(saveRelation);
|
||||||
}
|
}
|
||||||
} else if ("D".equals(operateFlag)) {
|
} else if ("D".equals(operateFlag)) {
|
||||||
if (systemRelativityDO == null || systemRelativityDO.getDownId() == null) throw exception(CONTRACT_NOT_EXISTS);
|
if (systemRelativityDO == null || systemRelativityDO.getDownId() == null) throw exception(CONTRACT_NOT_EXISTS);
|
||||||
contractId = systemRelativityDO.getDownId();
|
contractId = Long.parseLong(systemRelativityDO.getDownId());
|
||||||
contractMainMapper.deleteById(contractId);
|
contractMainMapper.deleteById(contractId);
|
||||||
// 删除动态条款信息
|
// 删除动态条款信息
|
||||||
contractOtherFormMapper.delete("CTRT_MAIN_ID", contractId.toString());
|
contractOtherFormMapper.delete("CTRT_MAIN_ID", contractId.toString());
|
||||||
@@ -381,7 +380,7 @@ public class ContractApiImpl implements ContractApi {
|
|||||||
body.set__interfaceType__("R_MY_JG_10");
|
body.set__interfaceType__("R_MY_JG_10");
|
||||||
body.setBusiBillCode(pushReqVO.getBusiBillCode());
|
body.setBusiBillCode(pushReqVO.getBusiBillCode());
|
||||||
body.setCode(code);
|
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.setDatetime(DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()));
|
||||||
body.setSystem("JYGK");
|
body.setSystem("JYGK");
|
||||||
body.setOperateFlag(pushReqVO.getOperateFlag());
|
body.setOperateFlag(pushReqVO.getOperateFlag());
|
||||||
@@ -565,13 +564,21 @@ public class ContractApiImpl implements ContractApi {
|
|||||||
// 是否虚拟合同 默认值:否(0)
|
// 是否虚拟合同 默认值:否(0)
|
||||||
contractMainDO.setContractVirtual(DictEnum.ERP_CTRT_YN_NO.getCode());
|
contractMainDO.setContractVirtual(DictEnum.ERP_CTRT_YN_NO.getCode());
|
||||||
// 代理方 默认值:NULL
|
// 代理方 默认值:NULL
|
||||||
// 签署日期 -> 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
// 签署日期 -> 签约日期 (40-签约必填)
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
if (StringUtils.isNotEmpty(reqVO.getSignDate())) {
|
||||||
contractMainDO.setSignDate(LocalDateTime.parse(reqVO.getSignDate()+"000000", formatter));
|
contractMainDO.setSignDate(Instant.ofEpochMilli(Long.parseLong(reqVO.getSignDate()))
|
||||||
// 开始日期 -> 合同有效期起 (格式: yyyyMMdd)
|
.atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||||
contractMainDO.setStartDate(LocalDateTime.parse(reqVO.getContractStartDate()+"000000", formatter));
|
}
|
||||||
// 结束日期 -> 合同有效期止 (格式: yyyyMMdd)
|
// 开始日期 -> 合同有效期起
|
||||||
contractMainDO.setEndDate(LocalDateTime.parse(reqVO.getContractEndDate()+"000000", formatter));
|
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());
|
contractMainDO.setCurrency(reqVO.getCurrencyCode());
|
||||||
// 原币金额 -> 预估含税总金额
|
// 原币金额 -> 预估含税总金额
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import lombok.Data;
|
|||||||
@Schema(description = "关联订单请求参数 VO")
|
@Schema(description = "关联订单请求参数 VO")
|
||||||
public class LinkOrderReqVO {
|
public class LinkOrderReqVO {
|
||||||
@Schema(description = "上游订单号")
|
@Schema(description = "上游订单号")
|
||||||
private Long upOrderId;
|
private String upOrderId;
|
||||||
@Schema(description = "下游订单号")
|
@Schema(description = "下游订单号")
|
||||||
private Long downOrderId;
|
private String downOrderId;
|
||||||
@Schema(description = "关联订单类型")
|
@Schema(description = "关联订单类型")
|
||||||
private String linkOrderType;
|
private String linkOrderType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public class ContractMainDO extends BusinessBaseDO {
|
|||||||
* 建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填
|
* 建筑服务发生地;与ERP(JZFWFSD)对应,拓展信息,销售合同,且类型为SAP02COSR必填
|
||||||
*/
|
*/
|
||||||
@TableField("ARCH_SVC_PLCE")
|
@TableField("ARCH_SVC_PLCE")
|
||||||
private String architectureServicePlace;
|
private String architectureServicePlace;
|
||||||
/**
|
/**
|
||||||
* 达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填
|
* 达到收款条件金额;与ERP(DDSKJE)对应,拓展信息,销售合同,且类型为SAP02COSR必填
|
||||||
*/
|
*/
|
||||||
@@ -405,4 +405,9 @@ public class ContractMainDO extends BusinessBaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("MTNG_TP")
|
@TableField("MTNG_TP")
|
||||||
private String meteringType;
|
private String meteringType;
|
||||||
|
/**
|
||||||
|
* 模板中间表ID
|
||||||
|
*/
|
||||||
|
@TableField("BSN_ID")
|
||||||
|
private Long businessId;
|
||||||
}
|
}
|
||||||
@@ -31,12 +31,12 @@ public class SystemRelativityDO extends BusinessBaseDO {
|
|||||||
* 上游主键
|
* 上游主键
|
||||||
*/
|
*/
|
||||||
@TableField("UP_ID")
|
@TableField("UP_ID")
|
||||||
private Long upId;
|
private String upId;
|
||||||
/**
|
/**
|
||||||
* 下游主键
|
* 下游主键
|
||||||
*/
|
*/
|
||||||
@TableField("DOWN_ID")
|
@TableField("DOWN_ID")
|
||||||
private Long downId;
|
private String downId;
|
||||||
/**
|
/**
|
||||||
* 方式系统;内关联/系统外关联
|
* 方式系统;内关联/系统外关联
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
|
|
||||||
// 已关联的上游合同id集合
|
// 已关联的上游合同id集合
|
||||||
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList();
|
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList();
|
||||||
LinkedHashSet<Long> relationIds = new LinkedHashSet<>();
|
LinkedHashSet<String> relationIds = new LinkedHashSet<>();
|
||||||
if (systemRelativityDOS!= null && !systemRelativityDOS.isEmpty()) {
|
if (systemRelativityDOS!= null && !systemRelativityDOS.isEmpty()) {
|
||||||
systemRelativityDOS.forEach(systemRelativityDO -> {
|
systemRelativityDOS.forEach(systemRelativityDO -> {
|
||||||
relationIds.add(systemRelativityDO.getUpId());
|
relationIds.add(systemRelativityDO.getUpId());
|
||||||
@@ -569,7 +569,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
|
|
||||||
// 已关联的上游合同id集合
|
// 已关联的上游合同id集合
|
||||||
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList();
|
List<SystemRelativityDO> systemRelativityDOS = systemRelativityMapper.selectList();
|
||||||
LinkedHashSet<Long> relationIds = new LinkedHashSet<>();
|
LinkedHashSet<String> relationIds = new LinkedHashSet<>();
|
||||||
if (systemRelativityDOS!= null && !systemRelativityDOS.isEmpty()) {
|
if (systemRelativityDOS!= null && !systemRelativityDOS.isEmpty()) {
|
||||||
systemRelativityDOS.forEach(systemRelativityDO -> {
|
systemRelativityDOS.forEach(systemRelativityDO -> {
|
||||||
relationIds.add(systemRelativityDO.getDownId());
|
relationIds.add(systemRelativityDO.getDownId());
|
||||||
@@ -634,7 +634,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 上游合同ID
|
// 上游合同ID
|
||||||
Long upId = systemRelativityDO.getUpId();
|
String upId = systemRelativityDO.getUpId();
|
||||||
|
|
||||||
// 获取上游合同信息
|
// 获取上游合同信息
|
||||||
ContractMainDO contractMainDO = contractMainMapper.selectById(upId);
|
ContractMainDO contractMainDO = contractMainMapper.selectById(upId);
|
||||||
@@ -660,7 +660,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 下游合同ID
|
// 下游合同ID
|
||||||
Long upId = systemRelativityDO.getUpId();
|
String upId = systemRelativityDO.getUpId();
|
||||||
|
|
||||||
// 获取下游合同信息
|
// 获取下游合同信息
|
||||||
ContractMainDO contractMainDO = contractMainMapper.selectById(upId);
|
ContractMainDO contractMainDO = contractMainMapper.selectById(upId);
|
||||||
@@ -1980,7 +1980,7 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
// 单据名称(拼音)
|
// 单据名称(拼音)
|
||||||
String documentName = "XTHT";
|
String documentName = "XTHT";
|
||||||
// 公司编码
|
// 公司编码
|
||||||
String companyId = CompanyContextHolder.getCompanyId().toString();
|
String companyId = CompanyContextHolder.getCompanyId()!= null ? CompanyContextHolder.getCompanyId().toString() : "";
|
||||||
// 年月日
|
// 年月日
|
||||||
String yearMounth8Bit = LocalDate.now()
|
String yearMounth8Bit = LocalDate.now()
|
||||||
.format(DateTimeFormatter.ofPattern(DateConstants.DATE_FORMAT_YEAR_MONTH_DAY_8_BIT));
|
.format(DateTimeFormatter.ofPattern(DateConstants.DATE_FORMAT_YEAR_MONTH_DAY_8_BIT));
|
||||||
|
|||||||
@@ -6,12 +6,13 @@ import com.alibaba.fastjson2.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import com.zt.plat.module.bpm.api.task.BpmProcessInstanceApi;
|
import com.zt.plat.module.bpm.api.task.BpmProcessInstanceApi;
|
||||||
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
|
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
|
||||||
import com.zt.plat.module.bpm.api.task.dto.*;
|
import com.zt.plat.module.bpm.api.task.dto.*;
|
||||||
import com.zt.plat.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
import com.zt.plat.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
||||||
import com.zt.plat.module.bpm.enums.task.BpmTaskStatusEnum;
|
|
||||||
import com.zt.plat.module.contractorder.api.vo.contract.ContractRespVO;
|
import com.zt.plat.module.contractorder.api.vo.contract.ContractRespVO;
|
||||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
|
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
|
||||||
import com.zt.plat.module.contractorder.dal.dataobject.contract.SystemRelativityDO;
|
import com.zt.plat.module.contractorder.dal.dataobject.contract.SystemRelativityDO;
|
||||||
@@ -30,22 +31,17 @@ import com.zt.plat.module.erp.service.erp.ErpOrderService;
|
|||||||
import com.zt.plat.module.system.api.sequence.SequenceApi;
|
import com.zt.plat.module.system.api.sequence.SequenceApi;
|
||||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||||
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
import com.zt.plat.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
|
||||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
|
||||||
|
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_ORDER_EXISTS;
|
import static com.zt.plat.module.contractorder.enums.ErrorCodeConstants.CONTRACT_ORDER_EXISTS;
|
||||||
@@ -491,8 +487,8 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
|||||||
|
|
||||||
SystemRelativityDO saveDO = new SystemRelativityDO();
|
SystemRelativityDO saveDO = new SystemRelativityDO();
|
||||||
saveDO.setStatus(DictEnum.BSE_SYS_REL_TP_ORDER.getCode());
|
saveDO.setStatus(DictEnum.BSE_SYS_REL_TP_ORDER.getCode());
|
||||||
saveDO.setUpId(LinkOrderReqVO.getUpOrderId());
|
saveDO.setUpId(LinkOrderReqVO.getUpOrderId().toString());
|
||||||
saveDO.setDownId(LinkOrderReqVO.getDownOrderId());
|
saveDO.setDownId(LinkOrderReqVO.getDownOrderId().toString());
|
||||||
//判断订单有没有关联过
|
//判断订单有没有关联过
|
||||||
if (systemRelativityMapper.selectCount(new LambdaQueryWrapper<SystemRelativityDO>().eq(SystemRelativityDO::getUpId, saveDO.getUpId()).eq(SystemRelativityDO::getDownId, saveDO.getDownId())) > 0) {
|
if (systemRelativityMapper.selectCount(new LambdaQueryWrapper<SystemRelativityDO>().eq(SystemRelativityDO::getUpId, saveDO.getUpId()).eq(SystemRelativityDO::getDownId, saveDO.getDownId())) > 0) {
|
||||||
throw exception(CONTRACT_ORDER_EXISTS);
|
throw exception(CONTRACT_ORDER_EXISTS);
|
||||||
|
|||||||
Reference in New Issue
Block a user