|
|
@@ -190,10 +190,10 @@ public class ContractApiController extends CertifyApiController {
|
|
|
Contract c = new Contract();
|
|
|
BeanUtils.copyProperties(contract, c);
|
|
|
Contract ct = contractService.selectByPrimaryKey(c.getId());
|
|
|
- if (null != ct && !ContractStatus.COMPLETE.getCode().equals(ct.getStatus())) {
|
|
|
+ if (null != ct && !ContractStatus.CREATE.getCode().equals(ct.getStatus())) {
|
|
|
res.setData(contractService.updateByPrimaryKeySelective(c));
|
|
|
} else {
|
|
|
- res.getError().add(buildError("", "当前合同已完成(结款),无法操作!"));
|
|
|
+ res.getError().add(buildError("", "当前合同为非草稿状态,无法操作!"));
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
@@ -262,8 +262,9 @@ public class ContractApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
- Contract c = contractService.findByUidAndYear(uid, year);
|
|
|
- if (null != c) {
|
|
|
+ Integer cYear = contractService.findLatelyRecordByUid(uid);
|
|
|
+
|
|
|
+ if (null != cYear) {
|
|
|
res.getError().add(buildError("", "当前年份已有合同申请,无法提交新申请!"));
|
|
|
}
|
|
|
return res;
|