|
|
@@ -230,28 +230,41 @@ public class PatentApiController extends BaseApiController {
|
|
|
* 管理端专利详情修改保存
|
|
|
*/
|
|
|
@RequestMapping(value = "/managePatentInfo", method = RequestMethod.POST)
|
|
|
- public Result managePatentInfo(PatentInfo patentInfo, String pid, PatentLog patentLog) {
|
|
|
+ public Result managePatentInfo(PatentInfo patentInfo, String xid, PatentLog patentLog ,String recordTimeFormattedDate) {
|
|
|
Result res = new Result();
|
|
|
- if (null == patentInfo.getId()) {
|
|
|
- res.getError().add(buildError("保存失败!"));
|
|
|
- return res;
|
|
|
- }
|
|
|
+
|
|
|
+ Date d ;
|
|
|
+ if (!StringUtils.isBlank(recordTimeFormattedDate)) {
|
|
|
+ try {
|
|
|
+ d = DateUtils.parseDate(recordTimeFormattedDate, "yyyy-MM-dd");
|
|
|
+ } catch (ParseException e) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_PATTERN_ERROR, "参数格式不正确", "yyyy-MM-dd"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ d = null;
|
|
|
+ }
|
|
|
+
|
|
|
if (patentLog != null) {
|
|
|
switch (patentLog.getState()) {
|
|
|
case 1:
|
|
|
- patentInfo.setCreateTime(patentLog.getRecordTime());
|
|
|
+ patentInfo.setCreateTime(d);
|
|
|
break;
|
|
|
case 3:
|
|
|
- patentInfo.setPatentApplicationDate(patentLog.getRecordTime());
|
|
|
+ patentInfo.setPatentApplicationDate(d);
|
|
|
break;
|
|
|
case 8:
|
|
|
- patentInfo.setAuthorizedDate(patentLog.getRecordTime());
|
|
|
+ patentInfo.setAuthorizedDate(d);
|
|
|
break;
|
|
|
}
|
|
|
patentInfo.setPatentState(patentLog.getState());
|
|
|
+ patentLog.setPid(xid);
|
|
|
+ patentLog.setRecordTime(d);
|
|
|
+ patentLog.setOperator(TokenManager.getAdminId());
|
|
|
patentLogService.insert(patentLog);
|
|
|
}
|
|
|
- patentInfo.setId(pid);
|
|
|
+ patentInfo.setId(xid);
|
|
|
+ //patentInfo,set
|
|
|
patentInfoService.updateByPrimaryKeySelective(patentInfo);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -429,7 +442,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
* 专利综合管理报表导出
|
|
|
* @throws ParseException
|
|
|
*/
|
|
|
- @RequestMapping(value = "/exportComposite", method = RequestMethod.POST)
|
|
|
+ @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{
|
|
|
@@ -692,7 +705,7 @@ public class PatentApiController extends BaseApiController {
|
|
|
@RequestMapping(value="/downloadTemplate",method = RequestMethod.GET)
|
|
|
public Result downloadPatentProryStatement(HttpServletResponse response, HttpServletRequest request){
|
|
|
Result res = new Result();
|
|
|
- String filename ="专利代理委托书模版" + Long.toString(System.nanoTime())+".doc";
|
|
|
+ String filename = "专利代理委托书模版" + Long.toString(System.nanoTime())+".doc";
|
|
|
String fileSaveRootPath = uploadPrivatePath + "/patent/patent_prory_statement.doc";
|
|
|
return patentDownload(res,response,filename,fileSaveRootPath);
|
|
|
}
|