소스 검색

Merge branch 'feature-bieao' of lift-manager/lift-server into develop

bieao 5 년 전
부모
커밋
2259b6dd67
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/contract/service/ContractService.java

+ 2 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/contract/service/ContractService.java

@@ -105,13 +105,14 @@ public class ContractService extends ServiceImpl<ContractsMapper, Contracts> {
                 return RestResponse.fail(MessageUtils.get("msg.add.fail"));
             }
             contracts.setProjectId(info.getId());
+        } else {
+            contracts.setProjectId(projectId);
         }
         if (ObjectUtil.isEmpty(contracts.getCode())) {
             //按当前日期时间戳自动生成合同编号
             String contractCode = DateUtils.generateCode();
             contracts.setCode("HT" + contractCode);
         }
-        contracts.setProjectId(projectId);
         //插入合同信息
         int result = contractsMapper.insert(contracts);
         if (result < 0) {