|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.contract.controller;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -114,11 +115,14 @@ public class ContractApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
List<ContractLog> list = contractLogService.selectContractLogByCid(cid);
|
|
|
- for (ContractLog c : list) {
|
|
|
- if (ContractStatus.getStatus(c.getStatus()) == ContractStatus.CIRCULATION) {
|
|
|
- list.remove(c);
|
|
|
+
|
|
|
+ for (Iterator<ContractLog> log = list.iterator(); log.hasNext();) {
|
|
|
+ Integer status = log.next().getStatus();
|
|
|
+ if (ContractStatus.getStatus(status) == ContractStatus.CIRCULATION) {
|
|
|
+ log.remove();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
res.setData(list);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -245,7 +249,7 @@ public class ContractApiController extends CertifyApiController {
|
|
|
.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
Contract c = contractService.findByUidAndYear(uid, year);
|
|
|
if (null != c) {
|
|
|
res.getError().add(buildError("", "当前年份已有合同申请,无法提交新申请!"));
|