|
|
@@ -27,6 +27,7 @@ import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AttachmentType;
|
|
|
+import com.goafanti.common.enums.PatentInfoFields;
|
|
|
import com.goafanti.common.enums.TechProjectFields;
|
|
|
import com.goafanti.common.enums.TechProjectStatus;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
@@ -64,6 +65,18 @@ public class AdminTechProjectApiController extends CertifyApiController {
|
|
|
@Resource
|
|
|
private AdminService adminService;
|
|
|
|
|
|
+ @RequestMapping(value = "/circulation", method = RequestMethod.POST)
|
|
|
+ public Result circulation(@RequestParam(name = "ids[]", required = true) String[] ids, @Valid InputTechProject tp,
|
|
|
+ BindingResult bindingResult, String recordTimeFormattedDate) {
|
|
|
+ Result res = new Result();
|
|
|
+ if (bindingResult.hasErrors()) {
|
|
|
+ res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
+ PatentInfoFields.getFieldDesc(bindingResult.getFieldError().getField())));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 咨询师下拉列表
|
|
|
*
|
|
|
@@ -226,13 +239,13 @@ public class AdminTechProjectApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "找不到申报项目", "科技项目申报"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (TechProjectStatus.CALLBACK.getCode() == t.getState()){
|
|
|
+
|
|
|
+ if (TechProjectStatus.CALLBACK.getCode() == t.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_CALLBACK, "当前记录已退单,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (TechProjectStatus.SETTLEMENT.getCode() == t.getState()){
|
|
|
+
|
|
|
+ if (TechProjectStatus.SETTLEMENT.getCode() == t.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -429,7 +442,7 @@ public class AdminTechProjectApiController extends CertifyApiController {
|
|
|
if (!checkCertify(res, curUser)) {
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isBlank(id)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到科技申报项目", "科技项目申报ID"));
|
|
|
return res;
|
|
|
@@ -440,20 +453,20 @@ public class AdminTechProjectApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "找不到申报项目", "科技项目申报"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (TechProjectStatus.CALLBACK.getCode() == t.getState()){
|
|
|
+
|
|
|
+ if (TechProjectStatus.CALLBACK.getCode() == t.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_CALLBACK, "当前记录已退单,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (TechProjectStatus.SETTLEMENT.getCode() == t.getState()){
|
|
|
+
|
|
|
+ if (TechProjectStatus.SETTLEMENT.getCode() == t.getState()) {
|
|
|
res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
-
|
|
|
- if (attachmentType == AttachmentType.TECH_PROJECT){
|
|
|
+
|
|
|
+ if (attachmentType == AttachmentType.TECH_PROJECT) {
|
|
|
res.setData(handleFiles(res, "/techProject/", true, req, sign, uid));
|
|
|
} else {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|