|
|
@@ -68,6 +68,7 @@ import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AdminFields;
|
|
|
import com.goafanti.common.enums.AttachmentType;
|
|
|
+import com.goafanti.common.enums.CertifySubmitType;
|
|
|
import com.goafanti.common.enums.CognizanceApplyFields;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
import com.goafanti.common.enums.FinanceRatepayFields;
|
|
|
@@ -189,12 +190,12 @@ public class AdminApiController extends CertifyApiController {
|
|
|
private CopyrightInfoService copyrightInfoService;
|
|
|
@Resource
|
|
|
private OrgCognizanceProportionService orgCognizanceProportionService;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 获取营销员及营销经理下拉
|
|
|
*/
|
|
|
@RequestMapping(value = "/salesman", method = RequestMethod.GET)
|
|
|
- public Result getSalesMan(){
|
|
|
+ public Result getSalesMan() {
|
|
|
Result res = new Result();
|
|
|
res.setData(adminService.selectSalesman());
|
|
|
return res;
|
|
|
@@ -671,7 +672,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/updateUserDetail", method = RequestMethod.POST)
|
|
|
public Result updateUserDetail(@Valid InputUserIdentity userIdentity, BindingResult bindingResult,
|
|
|
- String paymentDateFormattedDate) {
|
|
|
+ String paymentDateFormattedDate, String saveSign) {
|
|
|
Result res = new Result();
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
@@ -685,6 +686,16 @@ public class AdminApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ if (StringUtils.isBlank(saveSign)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到保存提交方式", "保存提交方式"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!saveSign.equals(CertifySubmitType.SAVE.getCode()) && !saveSign.equals(CertifySubmitType.SUBMIT.getCode())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "保存提交方式"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
if (!StringUtils.isBlank(paymentDateFormattedDate)) {
|
|
|
try {
|
|
|
userIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
@@ -700,9 +711,9 @@ public class AdminApiController extends CertifyApiController {
|
|
|
|
|
|
if (StringUtils.isBlank(ui.getId())) {
|
|
|
ui.setId(UUID.randomUUID().toString());
|
|
|
- res.setData(userIdentityService.insertByAdmin(ui, null, null));
|
|
|
+ res.setData(userIdentityService.insertByAdmin(ui, null, null, saveSign));
|
|
|
} else {
|
|
|
- res.setData(userIdentityService.updateUserDetail(ui, null, null));
|
|
|
+ res.setData(userIdentityService.updateUserDetail(ui, null, null, saveSign));
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
@@ -753,7 +764,8 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.setData(organizationIdentityService.selectOrgIdentityDetailByUserId(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 修改团体用户信息
|
|
|
*
|
|
|
@@ -763,7 +775,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/updateOrgDetail", method = RequestMethod.POST)
|
|
|
public Result updateOrgDetail(@Valid InputOrganizationIdentity orgIdentity, BindingResult bindingResult,
|
|
|
- String paymentDateFormattedDate) {
|
|
|
+ String paymentDateFormattedDate, String saveSign) {
|
|
|
Result res = new Result();
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
@@ -776,6 +788,17 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(saveSign)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到保存提交方式", "保存提交方式"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!saveSign.equals(CertifySubmitType.SAVE.getCode()) && !saveSign.equals(CertifySubmitType.SUBMIT.getCode())){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "保存提交方式"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
if (!StringUtils.isBlank(paymentDateFormattedDate)) {
|
|
|
try {
|
|
|
orgIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
@@ -788,9 +811,9 @@ public class AdminApiController extends CertifyApiController {
|
|
|
|
|
|
if (StringUtils.isBlank(oi.getId())) {
|
|
|
oi.setId(UUID.randomUUID().toString());
|
|
|
- res.setData(organizationIdentityService.insertByAdmin(oi, null, null));
|
|
|
+ res.setData(organizationIdentityService.insertByAdmin(oi, null, null, saveSign));
|
|
|
} else {
|
|
|
- res.setData(organizationIdentityService.updateOrgDetail(oi, null, null));
|
|
|
+ res.setData(organizationIdentityService.updateOrgDetail(oi, null, null, saveSign));
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
@@ -2967,8 +2990,8 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (StringUtils.isBlank(cog.getSalesman())){
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(cog.getSalesman())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到营销员", "营销员"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -2985,24 +3008,24 @@ public class AdminApiController extends CertifyApiController {
|
|
|
LatelyCogRecord lcr = orgCognizanceService.selectLatelyRecord(cog.getUid());
|
|
|
|
|
|
if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.FOSTER.getCode() == lcr.getState()) {
|
|
|
- res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企培育中!无法提交新申请!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企培育中!无法提交新申请!", "高企培育中!无法提交新申请!"));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() != lcr.getState()
|
|
|
&& OrgCognizanceStatus.CALLBACK.getCode() != lcr.getState()) {
|
|
|
- res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企申请中!无法提交新申请!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企申请中!无法提交新申请!", "高企申请中!无法提交新申请!"));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() == lcr.getState()) {
|
|
|
if (null == lcr.getIssuingDate()) {
|
|
|
- res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企认定未过期!无法提交新申请!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期!无法提交新申请!", "高企认定未过期!无法提交新申请!"));
|
|
|
return res;
|
|
|
}
|
|
|
try {
|
|
|
if (Boolean.FALSE == TimeUtils.checkCogExpire(lcr.getIssuingDate())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企认定未过期,无法提交新申请!"));
|
|
|
+ res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期,无法提交新申请!", "高企认定未过期,无法提交新申请!"));
|
|
|
return res;
|
|
|
}
|
|
|
} catch (ParseException e) {
|