|
|
@@ -27,6 +27,8 @@ import com.goafanti.common.model.OrgIntellectualProperty;
|
|
|
import com.goafanti.common.model.OrgRatepay;
|
|
|
import com.goafanti.common.model.OrgStandard;
|
|
|
import com.goafanti.common.model.OrgTechAchievement;
|
|
|
+import com.goafanti.common.model.OrgTechCenter;
|
|
|
+import com.goafanti.common.model.OrgTechCenterDetail;
|
|
|
import com.goafanti.common.model.OrgTechProduct;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
@@ -41,6 +43,8 @@ import com.goafanti.techservice.cognizance.service.OrgIntellectualPropertyServic
|
|
|
import com.goafanti.techservice.cognizance.service.OrgRatepayService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgStandardService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgTechAchievementService;
|
|
|
+import com.goafanti.techservice.cognizance.service.OrgTechCenterDetailService;
|
|
|
+import com.goafanti.techservice.cognizance.service.OrgTechCenterService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgTechProductService;
|
|
|
import com.goafanti.user.service.OrganizationIdentityService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
@@ -70,6 +74,10 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
private OrgTechAchievementService orgTechAchievementService;
|
|
|
@Resource
|
|
|
private OrgHonorDatumService orgHonorDatumService;
|
|
|
+ @Resource
|
|
|
+ private OrgTechCenterService orgTechCenterService;
|
|
|
+ @Resource
|
|
|
+ private OrgTechCenterDetailService orgTechCenterDetailService;
|
|
|
|
|
|
/**
|
|
|
* 企业研究开发活动情况表入口
|
|
|
@@ -200,12 +208,12 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
* 企业年度研究开发费用结构明细表(新增+修改)
|
|
|
*
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/activityCost", method = RequestMethod.POST)
|
|
|
public Result activityCost(OrgActivityCost orgActivityCost, String signDateFormattedDate) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- if (!StringUtils.isBlank(signDateFormattedDate)){
|
|
|
+ if (!StringUtils.isBlank(signDateFormattedDate)) {
|
|
|
orgActivityCost.setSignDate(DateUtils.parseDate(signDateFormattedDate, "yyyy-MM-dd"));
|
|
|
}
|
|
|
if (null == orgActivityCost.getId()) {
|
|
|
@@ -309,22 +317,22 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
* 用户端录入+修改知识产权信息(专利+软著)
|
|
|
*
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/intellectual", method = RequestMethod.POST)
|
|
|
- public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate) throws ParseException {
|
|
|
+ public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate)
|
|
|
+ throws ParseException {
|
|
|
Result res = new Result();
|
|
|
if (!StringUtils.isBlank(authorizationDateFormattedDate)) {
|
|
|
orgIntellectualProperty
|
|
|
- .setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
|
|
|
+ .setAuthorizationDate(DateUtils.parseDate(authorizationDateFormattedDate, "yyyy-MM-dd"));
|
|
|
}
|
|
|
if (null == orgIntellectualProperty.getId()) {
|
|
|
- orgIntellectualProperty.setId(UUID.randomUUID().toString());
|
|
|
- orgIntellectualProperty.setUid(TokenManager.getUserId());
|
|
|
- orgIntellectualProperty.setEvaluationCategory(
|
|
|
- (orgIntellectualProperty.getCatagory() >= 2 && orgIntellectualProperty.getCatagory() <= 4) ? 1
|
|
|
- : 0);
|
|
|
- orgIntellectualProperty.setDeletedSign(0);
|
|
|
+ orgIntellectualProperty.setId(UUID.randomUUID().toString());
|
|
|
+ orgIntellectualProperty.setUid(TokenManager.getUserId());
|
|
|
+ orgIntellectualProperty.setEvaluationCategory(
|
|
|
+ (orgIntellectualProperty.getCatagory() >= 2 && orgIntellectualProperty.getCatagory() <= 4) ? 1 : 0);
|
|
|
+ orgIntellectualProperty.setDeletedSign(0);
|
|
|
res.setData(orgIntellectualPropertyService.insert(orgIntellectualProperty));
|
|
|
} else {
|
|
|
orgIntellectualProperty.setEvaluationCategory(orgIntellectualProperty.getCatagory() <= 2 ? 1 : 0);
|
|
|
@@ -482,9 +490,10 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 刪除企业纳税申报信息
|
|
|
+ *
|
|
|
* @param ids
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -541,9 +550,10 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 删除财务报表
|
|
|
+ *
|
|
|
* @param ids
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -617,7 +627,7 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
*
|
|
|
* @param achievement
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/disposeAchievement", method = RequestMethod.POST)
|
|
|
public Result disposeAchievement(OrgTechAchievement achievement) throws ParseException {
|
|
|
@@ -678,12 +688,12 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
*
|
|
|
* @param achievement
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/disposeHonor", method = RequestMethod.POST)
|
|
|
public Result disposeHonor(OrgHonorDatum honor, String issuingTimeFormattedDate) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- if (!StringUtils.isBlank(issuingTimeFormattedDate)){
|
|
|
+ if (!StringUtils.isBlank(issuingTimeFormattedDate)) {
|
|
|
honor.setIssuingTime(DateUtils.parseDate(issuingTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
}
|
|
|
if (null == honor.getId()) {
|
|
|
@@ -714,6 +724,112 @@ public class CognizanceApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 技术中心入口
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/center", method = RequestMethod.GET)
|
|
|
+ public Result center() {
|
|
|
+ Result res = new Result();
|
|
|
+ res = checkCertify(res);
|
|
|
+ if (res.getError().isEmpty()) {
|
|
|
+ res.setData(orgTechCenterService.selectOrgTechCenterByUid(TokenManager.getUserId()));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 技术中心新增+修改
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ * @throws ParseException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/disposeCenter", method = RequestMethod.POST)
|
|
|
+ public Result disposeCenter(OrgTechCenter orgTechCenter, String foundingTimeFormattedDate) throws ParseException {
|
|
|
+ Result res = new Result();
|
|
|
+ if (!StringUtils.isBlank(foundingTimeFormattedDate)) {
|
|
|
+ orgTechCenter.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ if (null == orgTechCenter.getId()) {
|
|
|
+ orgTechCenter.setId(UUID.randomUUID().toString());
|
|
|
+ orgTechCenter.setUid(TokenManager.getUserId());
|
|
|
+ orgTechCenter.setDeletedSign(0);
|
|
|
+ orgTechCenterService.insert(orgTechCenter);
|
|
|
+ } else {
|
|
|
+ orgTechCenterService.updateByPrimaryKeySelective(orgTechCenter);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 技术中心明细列表入口(管理+用户)
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/centerDetail", method = RequestMethod.POST)
|
|
|
+ public Result centerDetail(String pageNo, String pageSize, String cid) {
|
|
|
+ Result res = new Result();
|
|
|
+ res = checkCertify(res);
|
|
|
+ if (res.getError().isEmpty()) {
|
|
|
+ Integer pNo = 1;
|
|
|
+ Integer pSize = 10;
|
|
|
+ if (StringUtils.isNumeric(pageSize)) {
|
|
|
+ pSize = Integer.parseInt(pageSize);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNumeric(pageNo)) {
|
|
|
+ pNo = Integer.parseInt(pageNo);
|
|
|
+ }
|
|
|
+ res.setData(orgTechCenterDetailService.listOrgTechCenterDetail(pNo, pSize, cid));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 技术中心明细新增+修改(管理+用户)
|
|
|
+ * @param orgTechCenterDetail
|
|
|
+ * @param projectTimeFormattedDate
|
|
|
+ * @param termTimeFormattedDate
|
|
|
+ * @return
|
|
|
+ * @throws ParseException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/disposeCenterDetail", method = RequestMethod.POST)
|
|
|
+ public Result disposeCenterDetail(OrgTechCenterDetail orgTechCenterDetail, String projectTimeFormattedDate,
|
|
|
+ String termTimeFormattedDate) throws ParseException {
|
|
|
+ Result res = new Result();
|
|
|
+ if (!StringUtils.isBlank(projectTimeFormattedDate)){
|
|
|
+ orgTechCenterDetail.setProjectTime(DateUtils.parseDate(projectTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ if (!StringUtils.isBlank(termTimeFormattedDate)){
|
|
|
+ orgTechCenterDetail.setTermTime(DateUtils.parseDate(termTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ if (null == orgTechCenterDetail.getId()){
|
|
|
+ orgTechCenterDetail.setId(UUID.randomUUID().toString());
|
|
|
+ orgTechCenterDetail.setDeletedSign(0);
|
|
|
+ orgTechCenterDetailService.inset(orgTechCenterDetail);
|
|
|
+ } else {
|
|
|
+ orgTechCenterDetailService.updateByPrimaryKeySelective(orgTechCenterDetail);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除技术中心明细
|
|
|
+ * @param ids
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/deleteOrgTechCenterDetail", method = RequestMethod.POST)
|
|
|
+ public Result deleteOrgTechCenterDetail(@RequestParam(name = "ids[]", required = true) String[] ids) {
|
|
|
+ Result res = new Result();
|
|
|
+ List<String> id = new ArrayList<String>();
|
|
|
+ for (String s : ids) {
|
|
|
+ id.add(s);
|
|
|
+ }
|
|
|
+ res.setData(orgTechCenterDetailService.batchDeleteByPrimaryKey(id));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private String handleFile(Result res, String path, boolean isPrivate, HttpServletRequest req, String sign,
|
|
|
String uid) {
|
|
|
List<MultipartFile> files = getFiles(req);
|