国贸2.0系统合同调用接口生成内部供应链的合同:根据客商信息列表提交多个合同映射到erp
This commit is contained in:
@@ -55,12 +55,12 @@ public interface ErpContractService {
|
||||
ErpContractDO getErpContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP合同映射通过合同主信息主键
|
||||
* 获得ERP合同映射通过合同编号
|
||||
*
|
||||
* @param contractMainId 合同主信息主键
|
||||
* @param paperNumber 合同编号
|
||||
* @return ERP合同映射
|
||||
*/
|
||||
ErpContractDO getErpContractByMainId(Long contractMainId);
|
||||
ErpContractDO getErpContractByPaperNumber(String paperNumber);
|
||||
|
||||
/**
|
||||
* 获得ERP合同映射分页
|
||||
|
||||
@@ -104,8 +104,8 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpContractDO getErpContractByMainId(Long contractMainId) {
|
||||
return erpContractMapper.selectOne("CTRT_MAIN_ID", contractMainId);
|
||||
public ErpContractDO getErpContractByPaperNumber(String paperNumber) {
|
||||
return erpContractMapper.selectOne("CTRT_PPR_NUM", paperNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,8 +231,8 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
// 转换为DO
|
||||
ErpContractDO erpContract = BeanUtils.toBean(erpContractVO, ErpContractDO.class);
|
||||
|
||||
// 根据合同主信息ID查询合同映射
|
||||
ErpContractDO erpContractDO = getErpContractByMainId(erpContract.getContractMainId());
|
||||
// 根据合同编号查询合同映射
|
||||
ErpContractDO erpContractDO = getErpContractByPaperNumber(erpContract.getContractPaperNumber());
|
||||
if (erpContractDO == null) {
|
||||
// 不存在映射表则新增
|
||||
erpContract.setDeleted(false);
|
||||
|
||||
Reference in New Issue
Block a user