|
@@ -93,6 +93,17 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
|
if (contractManagementInfos.size() > 0) {
|
|
|
throw new YException(YExceptionEnum.CONTRACT_NO_ERROR);
|
|
|
}
|
|
|
+ if (contractManagementInfo.getAgreementNo()!=null){
|
|
|
+ //判断补充协议编号是否唯一
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList =
|
|
|
+ contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq(ContractManagementInfo.QueryFiles.COMP_ID, AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
+ .eq(ContractManagementInfo.QueryFiles.CONTRACT_NO, contractManagementInfo.getAgreementNo())
|
|
|
+ .eq(ContractManagementInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
|
|
|
+ if (contractManagementInfoList.size() > 0) {
|
|
|
+ throw new YException(YExceptionEnum.AGREEMENT_NO_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
// 货物信息新增
|
|
|
ContractGoodsInfo contractGoodsInfo = contractManagementInfo.getContractGoodsInfo();
|
|
|
contractGoodsInfo.setId(IdGenerator.generateUUID());
|
|
@@ -480,6 +491,31 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
|
|
|
return "NG";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查对应的合同
|
|
|
+ * @param contractManagementInfo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<ContractManagementInfo> selectContract(ContractManagementInfo contractManagementInfo) {
|
|
|
+ List<ContractManagementInfo> contractManagementInfoList=this.selectList(new EntityWrapper<ContractManagementInfo>()
|
|
|
+ .eq("agreement_type",contractManagementInfo.getAgreementType())
|
|
|
+ .eq("goods_type",contractManagementInfo.getGoodsType())
|
|
|
+ .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
|
|
|
+ .orderBy("update_date",false));
|
|
|
+ if (CollectionUtils.isNotEmpty(contractManagementInfoList)) {
|
|
|
+ for (ContractManagementInfo contractManagementInfo1 : contractManagementInfoList) {
|
|
|
+ //货物信息
|
|
|
+ ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>().eq(ContractGoodsInfo.QueryFiles.CONTRACT_ID, contractManagementInfo1.getId()));
|
|
|
+ //流程信息
|
|
|
+ ContractProcessInfo contractProcessInfo = contractProcessInfoService.selectOne(new EntityWrapper<ContractProcessInfo>().eq(ContractGoodsInfo.QueryFiles.CONTRACT_ID, contractManagementInfo1.getId()));
|
|
|
+ contractManagementInfo1.setContractGoodsInfo(contractGoodsInfo);
|
|
|
+ contractManagementInfo1.setContractProcessInfo(contractProcessInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return contractManagementInfoList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 删除
|
|
|
*
|