|
|
@@ -64,6 +64,8 @@ import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AdminFields;
|
|
|
import com.goafanti.common.enums.AttachmentType;
|
|
|
import com.goafanti.common.enums.CognizanceApplyFields;
|
|
|
+import com.goafanti.common.enums.IdentityAuditStatus;
|
|
|
+import com.goafanti.common.enums.IdentityProcess;
|
|
|
import com.goafanti.common.enums.OrgActivityFields;
|
|
|
import com.goafanti.common.enums.OrgAnnualReportFields;
|
|
|
import com.goafanti.common.enums.OrgCognizanceFields;
|
|
|
@@ -164,28 +166,29 @@ public class AdminApiController extends CertifyApiController {
|
|
|
private AdminService adminService;
|
|
|
@Resource
|
|
|
private OrgTechCenterDetailService orgTechCenterDetailService;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
|
-
|
|
|
+
|
|
|
@RequestMapping(value = "/role", method = RequestMethod.GET)
|
|
|
- public Result getRole(String uid){
|
|
|
+ public Result getRole(String uid) {
|
|
|
Result res = new Result();
|
|
|
- if (StringUtils.isBlank(uid)){
|
|
|
+ if (StringUtils.isBlank(uid)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "管理员ID"));
|
|
|
return res;
|
|
|
}
|
|
|
res.setData(adminService.selectRoleByPrimaryKey(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 管理员"我的客户"列表
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/customer", method = RequestMethod.GET)
|
|
|
- public Result getCustomer(){
|
|
|
+ public Result getCustomer() {
|
|
|
Result res = new Result();
|
|
|
res.setData(userService.selectUserByAid(TokenManager.getAdminId()));
|
|
|
return res;
|
|
|
@@ -464,7 +467,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
@RequestMapping(value = "/addNewUser", method = RequestMethod.POST)
|
|
|
public Result addNewUser(@Valid InputUser inputUser, BindingResult bindingResult) {
|
|
|
Result res = new Result();
|
|
|
-
|
|
|
+
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
UserFields.getFieldDesc(bindingResult.getFieldError().getField())));
|
|
|
@@ -574,7 +577,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
|
|
|
if (!StringUtils.isBlank(paymentDateFormattedDate)) {
|
|
|
try {
|
|
|
- userIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ userIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
} catch (ParseException e) {
|
|
|
}
|
|
|
}
|
|
|
@@ -584,10 +587,32 @@ public class AdminApiController extends CertifyApiController {
|
|
|
|
|
|
if (StringUtils.isBlank(ui.getId())) {
|
|
|
ui.setId(UUID.randomUUID().toString());
|
|
|
- ui.setAuditStatus(null == userIdentity.getAuditStatus() ? 0 : userIdentity.getAuditStatus());
|
|
|
- ui.setProcess(null == userIdentity.getProcess() ? 0 : userIdentity.getProcess());
|
|
|
+ ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
|
|
|
+ if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.FILLIN.getCode());
|
|
|
+ } else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.RESULTS.getCode());
|
|
|
+ }
|
|
|
res.setData(userIdentityService.insert(ui));
|
|
|
} else {
|
|
|
+ ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
|
|
|
+ if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.FILLIN.getCode());
|
|
|
+ } else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
|
|
|
+ ui.setProcess(IdentityProcess.RESULTS.getCode());
|
|
|
+ }
|
|
|
res.setData(userIdentityService.updateUserDetail(ui));
|
|
|
}
|
|
|
return res;
|
|
|
@@ -664,7 +689,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
}
|
|
|
if (!StringUtils.isBlank(paymentDateFormattedDate)) {
|
|
|
try {
|
|
|
- orgIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ orgIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
} catch (ParseException e) {
|
|
|
}
|
|
|
}
|
|
|
@@ -676,11 +701,33 @@ public class AdminApiController extends CertifyApiController {
|
|
|
oi.setId(UUID.randomUUID().toString());
|
|
|
oi.setIdentityType(null == oi.getIdentityType() ? 0 : oi.getIdentityType());
|
|
|
oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
|
|
|
- oi.setProcess(null == oi.getProcess() ? 0 : oi.getProcess());
|
|
|
+ if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.FILLIN.getCode());
|
|
|
+ } else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.RESULTS.getCode());
|
|
|
+ }
|
|
|
oi.setListed(null == oi.getListed() ? 0 : oi.getListed());
|
|
|
oi.setListedType(null == oi.getListedType() ? 0 : oi.getListedType());
|
|
|
res.setData(organizationIdentityService.insert(oi));
|
|
|
} else {
|
|
|
+ oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
|
|
|
+ if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.COMMITTED.getCode());
|
|
|
+ } else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.FILLIN.getCode());
|
|
|
+ } else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
|
|
|
+ || IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
|
|
|
+ oi.setProcess(IdentityProcess.RESULTS.getCode());
|
|
|
+ }
|
|
|
res.setData(organizationIdentityService.updateOrgDetail(oi));
|
|
|
}
|
|
|
return res;
|
|
|
@@ -1132,7 +1179,6 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.setData(orgTechProductService.listTechProduct(pNo, pSize, uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 上年度高新技术产品(服务)情况(新增+修改)
|
|
|
@@ -2243,7 +2289,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
}
|
|
|
if (!StringUtils.isBlank(foundingTimeFormattedDate)) {
|
|
|
try {
|
|
|
- orgTechCenter.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
|
|
|
+ orgTechCenter.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
} catch (ParseException e) {
|
|
|
}
|
|
|
}
|
|
|
@@ -2535,13 +2581,14 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.setData(orgCognizanceService.listCognizance(uid, unitName, locationProvince, pNo, pSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 高企认定咨询师下拉列表
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getConsultant", method = RequestMethod.GET)
|
|
|
- public Result getConsultant(){
|
|
|
+ public Result getConsultant() {
|
|
|
Result res = new Result();
|
|
|
List<Admin> list = adminService.selectCognizanceConsultant();
|
|
|
Map<String, String> map = new TreeMap<String, String>();
|
|
|
@@ -2551,7 +2598,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.setData(map);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 高企负责人下拉
|
|
|
*
|
|
|
@@ -2691,25 +2738,24 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到", "高企认定"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
OrgCognizance o = orgCognizanceService.selectByPrimaryKey(cog.getId());
|
|
|
-
|
|
|
- if (null == o){
|
|
|
+
|
|
|
+ if (null == o) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到", "高企认定"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (OrgCognizanceStatus.CALLBACK.getCode() == o.getState()){
|
|
|
+
|
|
|
+ if (OrgCognizanceStatus.CALLBACK.getCode() == o.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_CALLBACK, "当前记录已退单,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (OrgCognizanceStatus.SETTLEMENT.getCode() == o.getState()){
|
|
|
+
|
|
|
+ if (OrgCognizanceStatus.SETTLEMENT.getCode() == o.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
if (!checkCertify(res, cog.getUid()).getError().isEmpty()) {
|
|
|
return res;
|
|
|
}
|