|
|
@@ -20,6 +20,7 @@ import com.goafanti.common.controller.BaseApiController;
|
|
|
import com.goafanti.common.model.OrgActivity;
|
|
|
import com.goafanti.common.model.OrgActivityCost;
|
|
|
import com.goafanti.common.model.OrgCognizance;
|
|
|
+import com.goafanti.common.model.OrgCognizanceLog;
|
|
|
import com.goafanti.common.model.OrgFinance;
|
|
|
import com.goafanti.common.model.OrgHonorDatum;
|
|
|
import com.goafanti.common.model.OrgHumanResource;
|
|
|
@@ -38,6 +39,7 @@ import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgActivityService;
|
|
|
+import com.goafanti.techservice.cognizance.service.OrgCognizanceLogService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgCognizanceService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgFinanceService;
|
|
|
import com.goafanti.techservice.cognizance.service.OrgHonorDatumService;
|
|
|
@@ -78,15 +80,17 @@ public class AdminApiController extends BaseApiController {
|
|
|
@Resource
|
|
|
private OrgActivityService orgActivityService;
|
|
|
@Resource
|
|
|
- private OrgActivityCostService orgActivityCostService;
|
|
|
+ private OrgActivityCostService orgActivityCostService;
|
|
|
@Resource
|
|
|
- private OrgTechAchievementService orgTechAchievementService;
|
|
|
+ private OrgTechAchievementService orgTechAchievementService;
|
|
|
@Resource
|
|
|
- private OrgHonorDatumService orgHonorDatumService;
|
|
|
+ private OrgHonorDatumService orgHonorDatumService;
|
|
|
@Resource
|
|
|
private OrgTechCenterService orgTechCenterService;
|
|
|
@Resource
|
|
|
- private OrgCognizanceService orgCognizanceService;
|
|
|
+ private OrgCognizanceService orgCognizanceService;
|
|
|
+ @Resource
|
|
|
+ private OrgCognizanceLogService orgCognizanceLogService;
|
|
|
|
|
|
/**
|
|
|
* 个人用户列表
|
|
|
@@ -209,7 +213,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/orgHumanResource", method = RequestMethod.POST)
|
|
|
public Result orgHumanResource(Integer year, String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -296,7 +300,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
* 管理端录入+修改知识产权信息
|
|
|
*
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/intellectual", method = RequestMethod.POST)
|
|
|
public Result intellectual(OrgIntellectualProperty orgIntellectualProperty, String authorizationDateFormattedDate,
|
|
|
@@ -304,16 +308,15 @@ public class AdminApiController extends BaseApiController {
|
|
|
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(uid);
|
|
|
- orgIntellectualProperty.setEvaluationCategory(
|
|
|
- (orgIntellectualProperty.getCatagory() >= 2 && orgIntellectualProperty.getCatagory() <= 4) ? 1
|
|
|
- : 0);
|
|
|
- orgIntellectualProperty.setDeletedSign(0);
|
|
|
+
|
|
|
+ orgIntellectualProperty.setId(UUID.randomUUID().toString());
|
|
|
+ orgIntellectualProperty.setUid(uid);
|
|
|
+ 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);
|
|
|
@@ -357,7 +360,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/techProductList", method = RequestMethod.POST)
|
|
|
public Result techProductList(String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -371,7 +374,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业研究开发活动情况表入口
|
|
|
*
|
|
|
@@ -388,7 +391,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
public Result activityList(String activityNumber, String activityName, String startDateFormattedDate,
|
|
|
String endDateFormattedDate, String pageNo, String pageSize, String uid) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -403,7 +406,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业研究开发活动情况新增、修改
|
|
|
*
|
|
|
@@ -416,11 +419,11 @@ public class AdminApiController extends BaseApiController {
|
|
|
throws ParseException {
|
|
|
Result res = new Result();
|
|
|
orgActivity.setDeletedSign(0);
|
|
|
- if (!StringUtils.isBlank(startDateFormattedDate)){
|
|
|
+ if (!StringUtils.isBlank(startDateFormattedDate)) {
|
|
|
orgActivity.setStartDate(DateUtils.parseDate(startDateFormattedDate, "yyyy-MM-dd"));
|
|
|
}
|
|
|
-
|
|
|
- if(StringUtils.isBlank(endDateFormattedDate)){
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(endDateFormattedDate)) {
|
|
|
orgActivity.setEndDate(DateUtils.parseDate(endDateFormattedDate, "yyyy-MM-dd"));
|
|
|
}
|
|
|
if (StringUtils.isBlank(orgActivity.getId())) {
|
|
|
@@ -452,7 +455,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
res.setData(orgActivity);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业年度研究开发费用结构明细表列表入口
|
|
|
*
|
|
|
@@ -463,7 +466,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
public Result activityCostList(String activityNumber, String startDateFormattedDate, String endDateFormattedDate,
|
|
|
String pageNo, String pageSize, String uid) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -483,15 +486,15 @@ public class AdminApiController 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()) {
|
|
|
OrgActivity ac = orgActivityService.selectOrgActivityByPrimaryKey(orgActivityCost.getAid());
|
|
|
orgActivityCost.setStartDate(ac.getStartDate());
|
|
|
@@ -506,7 +509,6 @@ public class AdminApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 上年度高新技术产品(服务)情况(新增+修改)
|
|
|
*
|
|
|
@@ -535,7 +537,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/ratepay", method = RequestMethod.POST)
|
|
|
public Result ratepay(Integer year, String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -574,7 +576,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/finance", method = RequestMethod.POST)
|
|
|
public Result finance(Integer year, String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -617,22 +619,22 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/activityNumber", method = RequestMethod.POST)
|
|
|
public Result listActivityNumber(String uid) {
|
|
|
Result res = new Result();
|
|
|
- List<ActivityNumberBo> activityNumberBo = orgActivityService
|
|
|
- .selectOrgActivityNumberBoByUid(uid);
|
|
|
+ List<ActivityNumberBo> activityNumberBo = orgActivityService.selectOrgActivityNumberBoByUid(uid);
|
|
|
res.setData(activityNumberBo);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 科技成果转化情况列表入口
|
|
|
+ *
|
|
|
* @param pageNo
|
|
|
* @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/achievementList", method = RequestMethod.POST)
|
|
|
- public Result achievementList(String pageNo, String pageSize, String uid){
|
|
|
+ public Result achievementList(String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -646,17 +648,18 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 科技成果转化情况新增+修改
|
|
|
+ *
|
|
|
* @param achievement
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
- @RequestMapping(value= "/disposeAchievement", method = RequestMethod.POST)
|
|
|
- public Result disposeAchievement(OrgTechAchievement achievement) throws ParseException{
|
|
|
+ @RequestMapping(value = "/disposeAchievement", method = RequestMethod.POST)
|
|
|
+ public Result disposeAchievement(OrgTechAchievement achievement) throws ParseException {
|
|
|
Result res = new Result();
|
|
|
- if (null == achievement.getId()){
|
|
|
+ if (null == achievement.getId()) {
|
|
|
achievement.setId(UUID.randomUUID().toString());
|
|
|
achievement.setDeletedSign(0);
|
|
|
orgTechAchievementService.inset(achievement);
|
|
|
@@ -665,7 +668,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 企业荣誉及其他证明材料列表入口
|
|
|
*
|
|
|
@@ -674,7 +677,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/honorList", method = RequestMethod.POST)
|
|
|
public Result honorList(String pageNo, String pageSize, String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -694,12 +697,12 @@ public class AdminApiController extends BaseApiController {
|
|
|
*
|
|
|
* @param achievement
|
|
|
* @return
|
|
|
- * @throws ParseException
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/disposeHonor", method = RequestMethod.POST)
|
|
|
public Result disposeHonor(OrgHonorDatum honor, String issuingTimeFormattedDate, String uid) 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()) {
|
|
|
@@ -712,7 +715,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 技术中心入口
|
|
|
*
|
|
|
@@ -721,7 +724,7 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/center", method = RequestMethod.POST)
|
|
|
public Result center(String uid) {
|
|
|
Result res = new Result();
|
|
|
- res = checkCertify(res);
|
|
|
+ res = checkCertify(res,uid);
|
|
|
if (res.getError().isEmpty()) {
|
|
|
res.setData(orgTechCenterService.selectOrgTechCenterByUid(uid));
|
|
|
}
|
|
|
@@ -735,7 +738,8 @@ public class AdminApiController extends BaseApiController {
|
|
|
* @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/disposeCenter", method = RequestMethod.POST)
|
|
|
- public Result disposeCenter(OrgTechCenter orgTechCenter, String foundingTimeFormattedDate, String uid) throws ParseException {
|
|
|
+ public Result disposeCenter(OrgTechCenter orgTechCenter, String foundingTimeFormattedDate, String uid)
|
|
|
+ throws ParseException {
|
|
|
Result res = new Result();
|
|
|
if (!StringUtils.isBlank(foundingTimeFormattedDate)) {
|
|
|
orgTechCenter.setFoundingTime(DateUtils.parseDate(foundingTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
@@ -750,38 +754,40 @@ public class AdminApiController extends BaseApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 获取公司联系人
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getContacts", method = RequestMethod.POST)
|
|
|
- public Result getContacts(String uid){
|
|
|
+ public Result getContacts(String uid) {
|
|
|
Result res = new Result();
|
|
|
OrganizationIdentity i = organizationIdentityService.selectOrgIdentityByUserId(uid);
|
|
|
Map<String, String> map = new LinkedHashMap<String, String>();
|
|
|
- if (!StringUtils.isBlank(i.getFirstContacts()) && !StringUtils.isBlank(i.getFirstMobile())){
|
|
|
+ if (!StringUtils.isBlank(i.getFirstContacts()) && !StringUtils.isBlank(i.getFirstMobile())) {
|
|
|
map.put(i.getFirstContacts(), i.getFirstMobile());
|
|
|
}
|
|
|
-
|
|
|
- if (!StringUtils.isBlank(i.getSecondContacts()) && !StringUtils.isBlank(i.getSecondMobile())){
|
|
|
+
|
|
|
+ if (!StringUtils.isBlank(i.getSecondContacts()) && !StringUtils.isBlank(i.getSecondMobile())) {
|
|
|
map.put(i.getSecondContacts(), i.getSecondMobile());
|
|
|
}
|
|
|
-
|
|
|
- if (!StringUtils.isBlank(i.getThirdContacts()) && !StringUtils.isBlank(i.getThirdMobile())){
|
|
|
+
|
|
|
+ if (!StringUtils.isBlank(i.getThirdContacts()) && !StringUtils.isBlank(i.getThirdMobile())) {
|
|
|
map.put(i.getThirdContacts(), i.getThirdMobile());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
res.setData(map);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 申请高企认定
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
|
|
|
- public Result applyCognizance(String contacts, String comment, String consultant, String uid){
|
|
|
+ public Result applyCognizance(String contacts, String comment, String consultant, String uid) {
|
|
|
Result res = new Result();
|
|
|
OrgCognizance c = new OrgCognizance();
|
|
|
c.setId(UUID.randomUUID().toString());
|
|
|
@@ -789,19 +795,21 @@ public class AdminApiController extends BaseApiController {
|
|
|
c.setContacts(contacts);
|
|
|
c.setComment(comment);
|
|
|
c.setConsultant(consultant);
|
|
|
+ c.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
|
|
c.setDeletedSign(0);
|
|
|
orgCognizanceService.insert(c);
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 高企认定列表入口
|
|
|
+ *
|
|
|
* @param locationProvince
|
|
|
* @param unitName
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/listCognizance", method = RequestMethod.POST)
|
|
|
- public Result listCognizance(String locationProvince, String unitName, String pageNo, String pageSize){
|
|
|
+ public Result listCognizance(String locationProvince, String unitName, String pageNo, String pageSize) {
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
@@ -811,10 +819,36 @@ public class AdminApiController extends BaseApiController {
|
|
|
if (StringUtils.isNumeric(pageNo)) {
|
|
|
pNo = Integer.parseInt(pageNo);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
res.setData(orgCognizanceService.listCognizance(locationProvince, unitName, pNo, pSize));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 高企认定流转状态
|
|
|
+ * @param cid
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/cognizanceLog", method = RequestMethod.POST)
|
|
|
+ public Result cognizanceLog(String cid){
|
|
|
+ Result res = new Result();
|
|
|
+ List<OrgCognizanceLog> list = orgCognizanceLogService.selectOrgCognizanceLogByCid(cid);
|
|
|
+ System.out.println(list.size());
|
|
|
+ res.setData(list);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 高企认定详情入口
|
|
|
+ * @param uid
|
|
|
+ * @param cid
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/cognizanceDetail", method = RequestMethod.POST)
|
|
|
+ public Result cognizanceDetail(String uid, String cid){
|
|
|
+ Result res = new Result();
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
// 判断用户是否通过认证
|
|
|
private Result checkCertify(Result res, String uid) {
|
|
|
@@ -838,11 +872,5 @@ public class AdminApiController extends BaseApiController {
|
|
|
auditStatus, pNo, pSize);
|
|
|
}
|
|
|
|
|
|
- // 判断用户是否通过认证
|
|
|
- private Result checkCertify(Result res) {
|
|
|
- if (5 != organizationIdentityService.selectOrgIdentityByUserId(TokenManager.getUserId()).getAuditStatus()) {
|
|
|
- res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
|
|
|
- }
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
}
|