Commit 0f2231df by liushaowei

bug修复

parent 50e94d09
......@@ -847,17 +847,17 @@ public class ContractServiceImpl implements ContractService {
Contract contract = contractRepository.findOne(resource.getId());
//补充协议
if("2".equals(contract.getContractType()) && "tkio".equals(contract.getPlatform())){
if("2".equals(resource.getContractType()) && "tkio".equals(resource.getPlatform())){
//关联合同不能为空
if(null == contract.getRelationContract() || "".equals(contract.getRelationContract())|| -1L == contract.getRelationContract()){
if(null == resource.getRelationContract() || "".equals(resource.getRelationContract())|| -1L == resource.getRelationContract()){
Contract contractExist = new Contract();
contractExist.setId(-100L);
contractExist.setErroMessage("关联合同为必填项");
return contractExist;
}
//补充协议开始日期不能晚于原始合同的结束日期
Contract relationContract = contractRepository.findOne(contract.getRelationContract());
if(relationContract.getEndDate().compareTo(contract.getStartDate())<0){
Contract relationContract = contractRepository.findOne(resource.getRelationContract());
if(relationContract.getEndDate().compareTo(resource.getStartDate())<0){
Contract contractExist = new Contract();
contractExist.setId(-100L);
contractExist.setErroMessage("补充协议开始日期不能晚于原始合同的结束日期");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment