|
|
@@ -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;
|
|
|
@@ -191,6 +192,16 @@ public class AdminApiController extends CertifyApiController {
|
|
|
private OrgCognizanceProportionService orgCognizanceProportionService;
|
|
|
|
|
|
/**
|
|
|
+ * 获取营销员及营销经理下拉
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/salesman", method = RequestMethod.GET)
|
|
|
+ public Result getSalesMan() {
|
|
|
+ Result res = new Result();
|
|
|
+ res.setData(adminService.selectSalesman());
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 统计专利、软著及科技项目申报业务情况
|
|
|
*/
|
|
|
@RequestMapping(value = "/getBusinessCount", method = RequestMethod.GET)
|
|
|
@@ -661,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()) {
|
|
|
@@ -675,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));
|
|
|
@@ -690,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;
|
|
|
}
|
|
|
@@ -743,7 +764,8 @@ public class AdminApiController extends CertifyApiController {
|
|
|
res.setData(organizationIdentityService.selectOrgIdentityDetailByUserId(uid));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 修改团体用户信息
|
|
|
*
|
|
|
@@ -753,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()) {
|
|
|
@@ -766,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));
|
|
|
@@ -778,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;
|
|
|
}
|
|
|
@@ -1758,7 +1791,7 @@ public class AdminApiController extends CertifyApiController {
|
|
|
if (!checkCertify(res, orgActivityCost.getUid()).getError().isEmpty()) {
|
|
|
return res;
|
|
|
}
|
|
|
- if (StringUtils.isBlank(signDateFormattedDate)) {
|
|
|
+ if (!StringUtils.isBlank(signDateFormattedDate)) {
|
|
|
try {
|
|
|
orgActivityCost.setSignDate(DateUtils.parseDate(signDateFormattedDate, AFTConstants.YYYYMMDD));
|
|
|
} catch (ParseException e) {
|
|
|
@@ -2958,6 +2991,11 @@ public class AdminApiController extends CertifyApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ if (StringUtils.isBlank(cog.getSalesman())) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到营销员", "营销员"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
if (null == cog.getYear()) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "年份"));
|
|
|
return res;
|
|
|
@@ -2970,34 +3008,34 @@ 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) {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ String salesman = cog.getSalesman();
|
|
|
OrgCognizance oc = new OrgCognizance();
|
|
|
BeanUtils.copyProperties(cog, oc);
|
|
|
- orgCognizanceService.insertCognizance(oc, TokenManager.getAdminId());
|
|
|
+ orgCognizanceService.saveCognizance(oc, salesman);
|
|
|
|
|
|
return res;
|
|
|
}
|