|
|
@@ -1,8 +1,8 @@
|
|
|
package com.goafanti.techservice.patent.controller;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
import java.util.Date;
|
|
|
import java.util.LinkedHashMap;
|
|
|
-import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
@@ -12,19 +12,29 @@ import javax.annotation.Resource;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
-import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.BaseApiController;
|
|
|
+import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
|
+import com.goafanti.common.model.PatentCost;
|
|
|
import com.goafanti.common.model.PatentInfo;
|
|
|
import com.goafanti.common.model.PatentLog;
|
|
|
+import com.goafanti.common.model.PatentRegistration;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
+import com.goafanti.techservice.patent.bo.PatentApplicationFeeBo;
|
|
|
import com.goafanti.techservice.patent.bo.PatentCompositeBo;
|
|
|
+import com.goafanti.techservice.patent.bo.PatentNoticeOfCorrectionBo;
|
|
|
+import com.goafanti.techservice.patent.bo.PatentPendingBo;
|
|
|
+import com.goafanti.techservice.patent.bo.PatentRecieveSendBo;
|
|
|
+import com.goafanti.techservice.patent.service.AdminService;
|
|
|
+import com.goafanti.techservice.patent.service.PatentCostService;
|
|
|
import com.goafanti.techservice.patent.service.PatentInfoService;
|
|
|
import com.goafanti.techservice.patent.service.PatentLogService;
|
|
|
+import com.goafanti.techservice.patent.service.PatentRegistrationService;
|
|
|
import com.goafanti.user.service.OrganizationIdentityService;
|
|
|
|
|
|
@Controller
|
|
|
@@ -36,6 +46,12 @@ public class PatentApiController extends BaseApiController {
|
|
|
private PatentLogService patentLogService;
|
|
|
@Resource
|
|
|
private OrganizationIdentityService organizationIdentityServivce;
|
|
|
+ @Resource
|
|
|
+ private PatentCostService patentCostService;
|
|
|
+ @Resource
|
|
|
+ private PatentRegistrationService patentRegistrationService;
|
|
|
+ @Resource
|
|
|
+ private AdminService adminService;
|
|
|
|
|
|
/**
|
|
|
* 用户端专利申请
|
|
|
@@ -46,6 +62,10 @@ public class PatentApiController extends BaseApiController {
|
|
|
patentInfo.setId(UUID.randomUUID().toString());
|
|
|
patentInfo.setUid(TokenManager.getUserId());
|
|
|
patentInfoService.insert(patentInfo);
|
|
|
+ PatentRegistration patentRegistration = new PatentRegistration();
|
|
|
+ patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
+ patentRegistration.setPid(patentInfo.getId());
|
|
|
+ patentRegistrationService.insert(patentRegistration);
|
|
|
res.setData(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -82,23 +102,24 @@ public class PatentApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 用户端申请专利当前流程
|
|
|
+ * 用户端申请专利当前流程/管理端专利详情-专利状态流转记录
|
|
|
*/
|
|
|
- @RequestMapping(value = "/clientCurrentProcess", method = RequestMethod.POST)
|
|
|
- public Result clientCurrentProcess(String patentId) {
|
|
|
+ @RequestMapping(value = "/patentProcess", method = RequestMethod.POST)
|
|
|
+ public Result clientCurrentProcess(String pid) {
|
|
|
Result res = new Result();
|
|
|
- List<PatentLog> patentLog = patentLogService.selectCurrentProcessByPid(patentId);
|
|
|
+ List<PatentLog> patentLog = patentLogService.selectCurrentProcessByPid(pid);
|
|
|
res.setData(patentLog);
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 管理端申请专利列表
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/managePatentList", method = RequestMethod.POST)
|
|
|
public Result managePatentList(String serialNumber,String patentNumber,String office,String locationProvince,String unitName,
|
|
|
- Integer patentCatagory,String patentName,Integer patentState,Date createTime,Date patentApplicationDate,
|
|
|
- Date authorizedDate,String author,String pageNo, String pageSize){
|
|
|
+ Integer patentCatagory,String patentName,Integer patentState, @RequestParam(name="createTime[]", required=false) String[] createTime, @RequestParam(name="patentApplicationDate[]", required=false) String[] patentApplicationDate,
|
|
|
+ String author,String pageNo, String pageSize) throws ParseException{
|
|
|
Result res =new Result();
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 15;
|
|
|
@@ -109,14 +130,13 @@ public class PatentApiController extends BaseApiController {
|
|
|
pNo = Integer.parseInt(pageNo);
|
|
|
}
|
|
|
res.setData(getManagePatentList(serialNumber, patentNumber, office, locationProvince, unitName,
|
|
|
- patentCatagory, patentName, patentState, createTime, patentApplicationDate,
|
|
|
- authorizedDate, author, pNo, pSize));
|
|
|
+ patentCatagory, patentName, patentState, createTime, patentApplicationDate
|
|
|
+ , author, pNo, pSize));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取公司
|
|
|
- * @return
|
|
|
*/
|
|
|
@RequestMapping(value="/getUnitNames",method = RequestMethod.GET)
|
|
|
public Result getUnitNames(){
|
|
|
@@ -131,9 +151,20 @@ public class PatentApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取操作人
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/getAdmin",method=RequestMethod.GET)
|
|
|
+ public Result getAdmin(){
|
|
|
+ Result res = new Result();
|
|
|
+ List<Admin> admin = adminService.selectAllAdmin();
|
|
|
+ res.setData(admin);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 管理端新增专利申请
|
|
|
*/
|
|
|
- @RequestMapping(value="manageApplyPatent",method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value="/manageApplyPatent",method = RequestMethod.POST)
|
|
|
public Result manageApplyPatent(PatentInfo patentInfo,String uid){
|
|
|
Result res = new Result();
|
|
|
if(null == uid){
|
|
|
@@ -143,6 +174,10 @@ public class PatentApiController extends BaseApiController {
|
|
|
patentInfo.setId(UUID.randomUUID().toString());
|
|
|
patentInfo.setUid(uid);
|
|
|
patentInfoService.insert(patentInfo);
|
|
|
+ PatentRegistration patentRegistration = new PatentRegistration();
|
|
|
+ patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
+ patentRegistration.setPid(patentInfo.getId());
|
|
|
+ patentRegistrationService.insert(patentRegistration);
|
|
|
res.setData(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -158,6 +193,17 @@ public class PatentApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
if (patentLog != null){
|
|
|
+ switch (patentLog.getState()){
|
|
|
+ case 1:
|
|
|
+ patentInfo.setCreateTime(patentLog.getRecordTime());
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ patentInfo.setPatentApplicationDate(patentLog.getRecordTime());
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ patentInfo.setAuthorizedDate(patentLog.getRecordTime());
|
|
|
+ break;
|
|
|
+ }
|
|
|
patentInfo.setPatentState(patentLog.getState());
|
|
|
patentLogService.insert(patentLog);
|
|
|
}
|
|
|
@@ -166,13 +212,131 @@ public class PatentApiController extends BaseApiController {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 待缴费专利管理
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/managePendingPaymentList",method = RequestMethod.POST)
|
|
|
+ public Result managePendingPaymentList(String locationProvince,String pageNo, String pageSize){
|
|
|
+ Result res = new Result();
|
|
|
+ Integer pNo = 1;
|
|
|
+ Integer pSize = 15;
|
|
|
+ if (StringUtils.isNumeric(pageSize)) {
|
|
|
+ pSize = Integer.parseInt(pageSize);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNumeric(pageNo)) {
|
|
|
+ pNo = Integer.parseInt(pageNo);
|
|
|
+ }
|
|
|
+ res.setData(getManagePendingPaymentList(locationProvince,pNo,pSize));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 年费确认缴费
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/confirmPayment",method = RequestMethod.POST)
|
|
|
+ public Result confirmPayment(String cid){
|
|
|
+ Result res = new Result();
|
|
|
+ if (null == cid){
|
|
|
+ res.getError().add(buildError("确认缴费失败!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ PatentCost patentCost =new PatentCost();
|
|
|
+ patentCost.setId(cid);
|
|
|
+ patentCost.setAnnualFeeState(1);
|
|
|
+ patentCostService.updateByPrimaryKeySelective(patentCost);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 补正审查通知列表
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/noticeOfCorrectionList",method = RequestMethod.POST)
|
|
|
+ public Result noticeOfCorrectionList(Date authorizedDate,String serialNumber, String patentNumber, String office, String locationProvince, String unitName,
|
|
|
+ Integer patentCatagory, String patentName, Integer patentState ,String author ,String pageNo, String pageSize){
|
|
|
+ Result res = new Result();
|
|
|
+ Integer pNo = 1;
|
|
|
+ Integer pSize = 15;
|
|
|
+ if (StringUtils.isNumeric(pageSize)) {
|
|
|
+ pSize = Integer.parseInt(pageSize);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNumeric(pageNo)) {
|
|
|
+ pNo = Integer.parseInt(pageNo);
|
|
|
+ }
|
|
|
+ res.setData(getNoticeOfCorrectionList(authorizedDate,serialNumber,patentNumber,office,locationProvince,unitName,
|
|
|
+ patentCatagory,patentName,patentState,author,pNo,pSize));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收发详情入口/收发纸件登记
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/getRecieveSendList",method = RequestMethod.POST)
|
|
|
+ public Result getRecieveSendList(){
|
|
|
+ Result res = new Result();
|
|
|
+ List<PatentRecieveSendBo> patentRecieveSendBo = patentInfoService.getPatentRecieveSendList();
|
|
|
+ res.setData(patentRecieveSendBo);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收发详情保存修改
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/getRecieveSendList",method = RequestMethod.GET)
|
|
|
+ public Result recieveSendDetail(String rid,PatentRegistration patentRegistration){
|
|
|
+ Result res = new Result();
|
|
|
+ patentRegistration.setId(rid);
|
|
|
+ patentRegistrationService.updateByPrimaryKeySelective(patentRegistration);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 专利申请费用管理
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/getApplicationFeeList",method=RequestMethod.POST)
|
|
|
+ public Result getApplicationFeeList(String[] patentApplicationDate,String locationProvince,String pageNo, String pageSize)
|
|
|
+ throws ParseException{
|
|
|
+ Result res = new Result();
|
|
|
+ Integer pNo = 1;
|
|
|
+ Integer pSize = 15;
|
|
|
+ if (StringUtils.isNumeric(pageSize)) {
|
|
|
+ pSize = Integer.parseInt(pageSize);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNumeric(pageNo)) {
|
|
|
+ pNo = Integer.parseInt(pageNo);
|
|
|
+ }
|
|
|
+ res.setData(getApplicationFeeList(patentApplicationDate,locationProvince,pSize,pNo));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //专利申请费用管理
|
|
|
+ private Pagination<PatentApplicationFeeBo> getApplicationFeeList(String[] patentApplicationDate, String locationProvince,
|
|
|
+ Integer pNo,Integer pSize) throws ParseException{
|
|
|
+ return (Pagination<PatentApplicationFeeBo>) patentCostService.getApplicationFeeList(patentApplicationDate,locationProvince,pNo,pSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ //补正审查通知列表
|
|
|
+ private Pagination<PatentNoticeOfCorrectionBo> getNoticeOfCorrectionList(Date authorizedDate, String serialNumber, String patentNumber,
|
|
|
+ String office, String locationProvince, String unitName, Integer patentCatagory, String patentName,
|
|
|
+ Integer patentState, String author, Integer pNo, Integer pSize) {
|
|
|
+ return (Pagination<PatentNoticeOfCorrectionBo>) patentInfoService.getNoticeOfCorrectionList(authorizedDate,serialNumber,patentNumber,office,locationProvince,unitName,
|
|
|
+ patentCatagory,patentName,patentState,author,pNo,pSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
+ private Pagination<PatentPendingBo> getManagePendingPaymentList(String locationProvince, Integer pNo, Integer pSize) {
|
|
|
+ return (Pagination<PatentPendingBo>) patentInfoService.getManagePendingPaymentList(locationProvince,pNo,pSize);
|
|
|
+ }
|
|
|
+
|
|
|
private Pagination<PatentCompositeBo> getManagePatentList(String serialNumber,String patentNumber,String office,String locationProvince,String unitName,
|
|
|
- Integer patentCatagory,String patentName,Integer patentState,Date createTime,Date patentApplicationDate,
|
|
|
- Date authorizedDate,String author,Integer pNo, Integer pSize){
|
|
|
+ Integer patentCatagory,String patentName,Integer patentState,String[] createTime,String[] patentApplicationDate,
|
|
|
+ String author,Integer pNo, Integer pSize) throws ParseException{
|
|
|
return (Pagination<PatentCompositeBo>) patentInfoService.getManagePatentList( serialNumber, patentNumber, office, locationProvince, unitName,
|
|
|
patentCatagory, patentName, patentState, createTime, patentApplicationDate,
|
|
|
- authorizedDate, author, pNo, pSize);
|
|
|
+ author, pNo, pSize);
|
|
|
}
|
|
|
|
|
|
private Pagination<PatentInfo> getClientApplyList(Result res, String patentNumber, String patentName,
|
|
|
@@ -180,5 +344,6 @@ public class PatentApiController extends BaseApiController {
|
|
|
return (Pagination<PatentInfo>) patentInfoService.getClientApplyList(TokenManager.getUserId(), patentNumber,
|
|
|
patentName, patentCatagory, patentState, pNo, pSize);
|
|
|
}
|
|
|
+
|
|
|
|
|
|
}
|