|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.techservice.patent.controller;
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
@@ -15,6 +16,7 @@ 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;
|
|
|
@@ -66,6 +68,10 @@ public class PatentApiController extends BaseApiController {
|
|
|
patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
patentRegistration.setPid(patentInfo.getId());
|
|
|
patentRegistrationService.insert(patentRegistration);
|
|
|
+ PatentCost patentCost = new PatentCost();
|
|
|
+ patentCost.setId(UUID.randomUUID().toString());
|
|
|
+ patentCost.setPid(patentInfo.getId());
|
|
|
+ patentCostService.insert(patentCost);
|
|
|
res.setData(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -89,7 +95,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
String pageNo, String pageSize) {
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
- Integer pSize = 15;
|
|
|
+ Integer pSize = 10;
|
|
|
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
@@ -122,7 +128,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
String author,String pageNo, String pageSize) throws ParseException{
|
|
|
Result res =new Result();
|
|
|
Integer pNo = 1;
|
|
|
- Integer pSize = 15;
|
|
|
+ Integer pSize = 10;
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
}
|
|
|
@@ -178,6 +184,10 @@ public class PatentApiController extends BaseApiController {
|
|
|
patentRegistration.setId(UUID.randomUUID().toString());
|
|
|
patentRegistration.setPid(patentInfo.getId());
|
|
|
patentRegistrationService.insert(patentRegistration);
|
|
|
+ PatentCost patentCost = new PatentCost();
|
|
|
+ patentCost.setId(UUID.randomUUID().toString());
|
|
|
+ patentCost.setPid(patentInfo.getId());
|
|
|
+ patentCostService.insert(patentCost);
|
|
|
res.setData(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -219,7 +229,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
public Result managePendingPaymentList(String locationProvince,String pageNo, String pageSize){
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
- Integer pSize = 15;
|
|
|
+ Integer pSize = 10;
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
}
|
|
|
@@ -255,7 +265,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
Integer patentCatagory, String patentName, Integer patentState ,String author ,String pageNo, String pageSize){
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
- Integer pSize = 15;
|
|
|
+ Integer pSize = 10;
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
}
|
|
|
@@ -268,20 +278,60 @@ public class PatentApiController extends BaseApiController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 补正审查通知答复确认
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/replyConfirm",method = RequestMethod.POST)
|
|
|
+ public Result replyConfirm(String pid ,Integer patentState){
|
|
|
+ Result res = new Result();
|
|
|
+ PatentInfo patentInfo = new PatentInfo();
|
|
|
+ patentInfo.setId(pid);
|
|
|
+ if(patentState == 4){
|
|
|
+ patentInfo.setPatentState(5);
|
|
|
+ }else if(patentState == 6){
|
|
|
+ patentInfo.setPatentState(7);
|
|
|
+ }else{
|
|
|
+ res.getError().add(buildError("通知答复确认失败!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ patentInfoService.updateByPrimaryKeySelective(patentInfo);
|
|
|
+ PatentLog patentLog = new PatentLog();
|
|
|
+ PatentInfo p = patentInfoService.selectByPrimaryKey(pid);
|
|
|
+ patentLog.setId(UUID.randomUUID().toString());
|
|
|
+ patentLog.setPid(pid);
|
|
|
+ patentLog.setState(p.getPatentState());
|
|
|
+ patentLog.setOperator(TokenManager.getAdminToken().getId());
|
|
|
+ patentLog.setPrincipal(p.getPrincipal());
|
|
|
+ Calendar now = Calendar.getInstance();
|
|
|
+ now.set(Calendar.MILLISECOND, 0);
|
|
|
+ patentLog.setRecordTime(now.getTime());
|
|
|
+ patentLogService.insert(patentLog);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 收发详情入口/收发纸件登记
|
|
|
*/
|
|
|
@RequestMapping(value="/getRecieveSendList",method = RequestMethod.POST)
|
|
|
- public Result getRecieveSendList(){
|
|
|
+ public Result RecieveSendList(String pageNo, String pageSize){
|
|
|
Result res = new Result();
|
|
|
- List<PatentRecieveSendBo> patentRecieveSendBo = patentInfoService.getPatentRecieveSendList();
|
|
|
- res.setData(patentRecieveSendBo);
|
|
|
+ Integer pNo = 1;
|
|
|
+ Integer pSize = 10;
|
|
|
+ if (StringUtils.isNumeric(pageSize)) {
|
|
|
+ pSize = Integer.parseInt(pageSize);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNumeric(pageNo)) {
|
|
|
+ pNo = Integer.parseInt(pageNo);
|
|
|
+ }
|
|
|
+ res.setData(getRecieveSendList(pNo,pSize));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 收发详情保存修改
|
|
|
*/
|
|
|
- @RequestMapping(value="/getRecieveSendList",method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value="/saveRecieveSend",method = RequestMethod.POST)
|
|
|
public Result recieveSendDetail(String rid,PatentRegistration patentRegistration){
|
|
|
Result res = new Result();
|
|
|
patentRegistration.setId(rid);
|
|
|
@@ -297,20 +347,47 @@ public class PatentApiController extends BaseApiController {
|
|
|
throws ParseException{
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
- Integer pSize = 15;
|
|
|
+ Integer pSize = 10;
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
}
|
|
|
if (StringUtils.isNumeric(pageNo)) {
|
|
|
pNo = Integer.parseInt(pageNo);
|
|
|
}
|
|
|
- res.setData(getApplicationFeeList(patentApplicationDate,locationProvince,pSize,pNo));
|
|
|
+ res.setData(getApplicationFeeList(patentApplicationDate,locationProvince,pNo,pSize));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 登记申请费用
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/registerApplicationFee",method=RequestMethod.POST)
|
|
|
+ public Result registerApplicationFee(PatentCost patentCost,String cid){
|
|
|
+ Result res = new Result();
|
|
|
+ PatentCost p = new PatentCost();
|
|
|
+ if(null == patentCost.getApplicationFee() || null == patentCost.getPrintingFee() || null == patentCost.getTrialFee()){
|
|
|
+ res.getError().add(buildError(ErrorConstants.FEE_EMPTY_ERROR,"申请费、实审费、文印费均不能为空!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ p.setId(cid);
|
|
|
+ p.setApplicationFee(patentCost.getApplicationFee());
|
|
|
+ p.setIsReimbursement(patentCost.getIsReimbursement());
|
|
|
+ p.setIsRequestFunds(patentCost.getIsRequestFunds());
|
|
|
+ p.setTrialFee(patentCost.getTrialFee());
|
|
|
+ p.setPrintingFee(patentCost.getPrintingFee());
|
|
|
+ p.setPaymentState("1");
|
|
|
+ res.setData(patentCostService.updateByPrimaryKeySelective(p));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ //专利纸件收发登记
|
|
|
+ private Pagination<PatentRecieveSendBo> getRecieveSendList(Integer pNo,Integer pSize) {
|
|
|
+ return (Pagination<PatentRecieveSendBo>) patentRegistrationService.getRecieveSendList(pNo,pSize) ;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//专利申请费用管理
|
|
|
private Pagination<PatentApplicationFeeBo> getApplicationFeeList(String[] patentApplicationDate, String locationProvince,
|
|
|
@@ -326,11 +403,12 @@ public class PatentApiController extends BaseApiController {
|
|
|
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,String[] createTime,String[] patentApplicationDate,
|
|
|
String author,Integer pNo, Integer pSize) throws ParseException{
|
|
|
@@ -338,7 +416,8 @@ public class PatentApiController extends BaseApiController {
|
|
|
patentCatagory, patentName, patentState, createTime, patentApplicationDate,
|
|
|
author, pNo, pSize);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ //用户端申请专利列表
|
|
|
private Pagination<PatentInfo> getClientApplyList(Result res, String patentNumber, String patentName,
|
|
|
Integer patentCatagory, Integer patentState, Integer pNo, Integer pSize) {
|
|
|
return (Pagination<PatentInfo>) patentInfoService.getClientApplyList(TokenManager.getUserId(), patentNumber,
|