|
|
@@ -22,7 +22,7 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.junit.Test;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -230,9 +230,19 @@ public class PatentApiController extends BaseApiController {
|
|
|
* 管理端专利详情修改保存
|
|
|
*/
|
|
|
@RequestMapping(value = "/managePatentInfo", method = RequestMethod.POST)
|
|
|
- public Result managePatentInfo(PatentInfo patentInfo, String xid, PatentLog patentLog ,String recordTimeFormattedDate) {
|
|
|
+ public Result managePatentInfo(String patentNumber,String patentName,String patentCatagory,String patentField,
|
|
|
+ String patentDes,String patentWritingUrl,String authorizationNoticeUrl,String patentCertificateUrl,
|
|
|
+ String xid, PatentLog patentLog ,String recordTimeFormattedDate) {
|
|
|
Result res = new Result();
|
|
|
-
|
|
|
+ PatentInfo patentInfo = new PatentInfo();
|
|
|
+ patentInfo.setId(xid);
|
|
|
+ patentInfo.setPatentNumber(patentNumber);
|
|
|
+ patentInfo.setPatentCatagory(StringUtils.isNumeric(patentCatagory)?Integer.parseInt(patentCatagory):null);
|
|
|
+ patentInfo.setPatentField(StringUtils.isNumeric(patentField)?Integer.parseInt(patentField):null);;
|
|
|
+ patentInfo.setPatentDes(patentDes);
|
|
|
+ patentInfo.setPatentWritingUrl(patentWritingUrl);
|
|
|
+ patentInfo.setAuthorizationNoticeUrl(authorizationNoticeUrl);
|
|
|
+ patentInfo.setPatentCertificateUrl(patentCertificateUrl);
|
|
|
Date d ;
|
|
|
if (!StringUtils.isBlank(recordTimeFormattedDate)) {
|
|
|
try {
|
|
|
@@ -245,7 +255,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
d = null;
|
|
|
}
|
|
|
|
|
|
- if (patentLog != null) {
|
|
|
+ if (patentLog.getPrincipal() != null ) {
|
|
|
switch (patentLog.getState()) {
|
|
|
case 1:
|
|
|
patentInfo.setCreateTime(d);
|
|
|
@@ -259,12 +269,12 @@ public class PatentApiController extends BaseApiController {
|
|
|
}
|
|
|
patentInfo.setPatentState(patentLog.getState());
|
|
|
patentLog.setPid(xid);
|
|
|
+ patentLog.setId(UUID.randomUUID().toString());
|
|
|
patentLog.setRecordTime(d);
|
|
|
patentLog.setOperator(TokenManager.getAdminId());
|
|
|
patentLogService.insert(patentLog);
|
|
|
}
|
|
|
patentInfo.setId(xid);
|
|
|
- //patentInfo,set
|
|
|
patentInfoService.updateByPrimaryKeySelective(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -443,13 +453,19 @@ public class PatentApiController extends BaseApiController {
|
|
|
* @throws ParseException
|
|
|
*/
|
|
|
@RequestMapping(value = "/exportComposite", method = RequestMethod.GET)
|
|
|
- public Result exportComposite(Integer serialNumber, String patentNumber, String office,
|
|
|
- String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
|
|
|
- String[] createTime, String[] patentApplicationDate, String author, HttpServletResponse response) throws ParseException{
|
|
|
+ public Result exportComposite(@RequestParam(name = "serialNumber", required = false) String serialNumber, String patentNumber, String office,
|
|
|
+ String locationProvince, String unitName, @RequestParam(name = "patentCatagory", required = false) String patentCatagory, String patentName, @RequestParam(name = "patentState", required = false) String patentState,
|
|
|
+ @RequestParam(name = "createTime[]", required = false) String[] createTime, @RequestParam(name = "patentApplicationDate[]", required = false) String[] patentApplicationDate,
|
|
|
+ String author, HttpServletResponse response) throws ParseException{
|
|
|
Result res = new Result();
|
|
|
+
|
|
|
+ Integer sn = (!StringUtils.isNumeric(serialNumber)? null : Integer.parseInt(serialNumber));
|
|
|
+ Integer pc = (!StringUtils.isNumeric(patentCatagory)? null :Integer.parseInt(patentCatagory));
|
|
|
+ Integer ps = (!StringUtils.isNumeric(patentState)? null : Integer.parseInt(patentState));
|
|
|
+ String lp = ("undefined".equals(locationProvince)) ? null : locationProvince;
|
|
|
@SuppressWarnings("unchecked")
|
|
|
- List<PatentCompositeBo> composites =(List<PatentCompositeBo>)getManagePatentList( serialNumber, patentNumber, office,
|
|
|
- locationProvince, unitName, patentCatagory, patentName, patentState,
|
|
|
+ List<PatentCompositeBo> composites =(List<PatentCompositeBo>)getManagePatentList( sn, patentNumber, office,
|
|
|
+ lp, unitName, pc, patentName, ps,
|
|
|
createTime, patentApplicationDate, author , 1 , 1000).getList();
|
|
|
if (res.getError().isEmpty()) {
|
|
|
exportComosites(response, composites);
|
|
|
@@ -949,6 +965,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
}
|
|
|
return state;
|
|
|
}
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|