浏览代码

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	RMS/src/main/java/cn/cslg/report/service/business/AssoTaskPersonelService.java
chenyi 2 年之前
父节点
当前提交
de48725c6d
共有 26 个文件被更改,包括 387 次插入146 次删除
  1. 1 0
      RMS/src/main/java/cn/cslg/report/common/core/base/Constants.java
  2. 2 0
      RMS/src/main/java/cn/cslg/report/common/model/vo/TaskParams.java
  3. 7 1
      RMS/src/main/java/cn/cslg/report/controller/InvalidRecordController.java
  4. 10 7
      RMS/src/main/java/cn/cslg/report/controller/LitigationHistoryController.java
  5. 48 0
      RMS/src/main/java/cn/cslg/report/controller/ReviewHistoryController.java
  6. 3 5
      RMS/src/main/java/cn/cslg/report/controller/TaskController.java
  7. 2 2
      RMS/src/main/java/cn/cslg/report/entity/ImportTask.java
  8. 17 3
      RMS/src/main/java/cn/cslg/report/entity/InvalidRecord.java
  9. 29 3
      RMS/src/main/java/cn/cslg/report/entity/LitigationHistory.java
  10. 79 0
      RMS/src/main/java/cn/cslg/report/entity/References.java
  11. 6 0
      RMS/src/main/java/cn/cslg/report/entity/ReviewHistory.java
  12. 7 0
      RMS/src/main/java/cn/cslg/report/entity/Task.java
  13. 1 1
      RMS/src/main/java/cn/cslg/report/mapper/InvalidRecordMapper.java
  14. 2 8
      RMS/src/main/java/cn/cslg/report/mapper/LitigationHistoryMapper.java
  15. 13 0
      RMS/src/main/java/cn/cslg/report/mapper/ReviewHistoryMapper.java
  16. 66 16
      RMS/src/main/java/cn/cslg/report/service/BaseService.java
  17. 1 35
      RMS/src/main/java/cn/cslg/report/service/OutInterfaceService.java
  18. 2 2
      RMS/src/main/java/cn/cslg/report/service/business/AssoTaskPersonelService.java
  19. 21 20
      RMS/src/main/java/cn/cslg/report/service/business/InvalidRecordService.java
  20. 19 15
      RMS/src/main/java/cn/cslg/report/service/business/LitigationHistoryService.java
  21. 44 0
      RMS/src/main/java/cn/cslg/report/service/business/ReviewHistoryService.java
  22. 5 2
      RMS/src/main/java/cn/cslg/report/service/business/TaskService.java
  23. 2 2
      RMS/src/main/resources/application.yml
  24. 0 1
      RMS/src/main/resources/mapper/InvalidRecord.xml
  25. 0 0
      logs/rms/rms-debug.2022-11-15.0.log
  26. 0 23
      logs/rms/rms-info.2022-11-15.0.log

+ 1 - 0
RMS/src/main/java/cn/cslg/report/common/core/base/Constants.java

@@ -15,6 +15,7 @@ public class Constants {
      */
     public static final String PATENT_TYPE = "PATENT_TYPE";
 
+    public static final Integer TASK_IMPORT_PATENT = 1;
     /**
      * 机构类型
      */

+ 2 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/TaskParams.java

@@ -20,6 +20,8 @@ public class TaskParams implements Serializable {
     private String selected;
     private List<Map<Object, Object>> rowList;
     private String oldName;
+    private Integer total;
+    private Integer index;
 
     public TaskParams() {
 

+ 7 - 1
RMS/src/main/java/cn/cslg/report/controller/InvalidRecordController.java

@@ -2,6 +2,7 @@ package cn.cslg.report.controller;
 
 import cn.cslg.report.common.core.base.Constants;
 import cn.cslg.report.entity.InvalidRecord;
+import cn.cslg.report.entity.LitigationHistory;
 import cn.cslg.report.service.business.InvalidRecordService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -35,7 +36,12 @@ public class InvalidRecordController {
     public String deleInvalidRecord(int id)throws IOException{
         return invalidRecordService.deleteInvalidRecord(id);
     }
-
+    @PostMapping(value = "/queryInvalidRecord")
+    @Operation(summary = "查询无效记录")
+    @Transactional(rollbackFor = Exception.class)
+    public String queryInvalidRecord(@RequestBody InvalidRecord invalidRecord)throws IOException{
+        return invalidRecordService.queryInvalidRecord(invalidRecord);
+    }
 
 
 }

+ 10 - 7
RMS/src/main/java/cn/cslg/report/controller/LitigationHistoryController.java

@@ -8,10 +8,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
 import java.io.IOException;
 
 @Tag(name = "诉讼历史")
@@ -27,15 +25,20 @@ public class LitigationHistoryController {
     }
     @PostMapping(value = "/addLitigationHistory")
     @Operation(summary = "增加诉讼历史")
-    public String addLitigationHistory(LitigationHistory litigationHistory)throws IOException{
+    public String addLitigationHistory(@RequestBody LitigationHistory litigationHistory)throws IOException{
         return litigationHistoryService.addLitigationHistory(litigationHistory);
     }
     @PostMapping(value = "/updateLitigationHistory")
     @Operation(summary = "修改诉讼历史")
     @Transactional(rollbackFor = Exception.class)
-    public String updateLitigationHistory(LitigationHistory litigationHistory)throws IOException{
+    public String updateLitigationHistory(@RequestBody LitigationHistory litigationHistory)throws IOException{
         return litigationHistoryService.updateLitigationHistory(litigationHistory);
     }
 
-
+    @PostMapping(value = "/queryLitigationHistory")
+    @Operation(summary = "查询诉讼历史")
+    @Transactional(rollbackFor = Exception.class)
+    public String queryLitigationHistory(@RequestBody LitigationHistory litigationHistory)throws IOException{
+        return litigationHistoryService.queryLitigationHistory(litigationHistory);
+    }
 }

+ 48 - 0
RMS/src/main/java/cn/cslg/report/controller/ReviewHistoryController.java

@@ -0,0 +1,48 @@
+package cn.cslg.report.controller;
+
+import cn.cslg.report.common.core.base.Constants;
+import cn.cslg.report.entity.InvalidRecord;
+import cn.cslg.report.entity.ReviewHistory;
+import cn.cslg.report.service.business.InvalidRecordService;
+import cn.cslg.report.service.business.ReviewHistoryService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+
+@Tag(name = "无效记录")
+@RestController
+@RequestMapping(Constants.REPORT_API + "/reviewHistory")
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
+public class ReviewHistoryController {
+    public final ReviewHistoryService reviewHistoryService;
+    @RequestMapping(value = "/addReviewHistory", method = RequestMethod.POST)
+    @Operation(summary = "增加审查历史")
+    public  String addInvalidRecord(ReviewHistory reviewHistory) throws IOException{
+        return reviewHistoryService.addReviewHistory(reviewHistory);
+    }
+    @RequestMapping(value = "/updateReviewHistory", method = RequestMethod.POST)
+    @Operation(summary = "修改审查历史")
+    @Transactional(rollbackFor = Exception.class)
+    public String updateInvalidRecord(ReviewHistory reviewHistory)throws IOException{
+        return reviewHistoryService.updateReviewHistory(reviewHistory);
+
+    }
+    @GetMapping(value = "/deleReviewHistory")
+    @Operation(summary = "删除审查历史")
+    public String deleInvalidRecord(int id)throws IOException{
+        return reviewHistoryService.deleteReviewHistory(id);
+    }
+    @PostMapping(value = "/queryReviewHistory")
+    @Operation(summary = "查询审查历史")
+    @Transactional(rollbackFor = Exception.class)
+    public String queryInvalidRecord(@RequestBody ReviewHistory reviewHistory)throws IOException{
+        return reviewHistoryService.queryReviewHistory(reviewHistory);
+    }
+
+
+}

+ 3 - 5
RMS/src/main/java/cn/cslg/report/controller/TaskController.java

@@ -93,13 +93,11 @@ public class TaskController {
         return taskService.reTaskPatents(taskVO);
     }
 
-    @RequestMapping(value = "/import", method = RequestMethod.POST)
+    @RequestMapping(value = "/import", method = RequestMethod.GET)
     @Operation(summary = "导入")
-    public String importPatent(MultipartFile file) throws ParseException, IOException {
+    public String importPatent(MultipartFile file,Integer reportId) throws ParseException, IOException {
         //解析file装载数据
-      TaskParams taskParams = baseService.getImportPatentTaskParamsBro(file);
-        //将装载的数据导入数据库
-        outInterfaceService.importPatents(taskParams);
+      TaskParams taskParams = baseService.getImportPatentTaskParamsBro(file, reportId);
         return Response.success();
     }
 

+ 2 - 2
RMS/src/main/java/cn/cslg/report/entity/ImportTask.java

@@ -19,13 +19,13 @@ public class ImportTask extends BaseEntity<ImportTask> {
      * 报告ID
      */
     @TableField(value = "REPORT_ID")
-    private String reportId;
+    private Integer reportId;
 
     /**
      * 导入数量
      */
     @TableField(value = "IMPORT_COUNT")
-    private String importCount;
+    private Integer importCount;
 
     /**
      * 创建时间

+ 17 - 3
RMS/src/main/java/cn/cslg/report/entity/InvalidRecord.java

@@ -3,6 +3,8 @@ package cn.cslg.report.entity;
 import cn.cslg.report.common.model.BaseEntity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -18,48 +20,60 @@ public class InvalidRecord extends BaseEntity<InvalidRecord> {
     /**
      * 专利号
      */
-    @TableField(value = "PATENT_NO")
-    private String patentNo;
+     @TableField(value = "PATENT_NO")
+     private String patentNo;
+
+
+
 
     /**
      * 无效申请人
      */
+    @Schema(description = "无效申请人")
     @TableField(value = "PERSON")
     private String person;
 
     /**
      * 无效申请人ID
      */
+    @Schema(description = "无效申请人ID")
     @TableField(value = "PERSON_ID")
     private String personId;
 
     /**
      * 无效时间
      */
-    @TableField(value = "INVALID_TIME")
+    @Schema(description = "无效时间")
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    @TableField(value = "无效时间")
     private String invalidTime;
 
     /**
      * 判决时间
      */
+    @Schema(description = "判决时间")
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
     @TableField(value = "JUDGMENT_TIME")
     private String judgmentTime;
 
     /**
      * 结果
      */
+    @Schema(description = "结果")
     @TableField(value = "RESULT")
     private String resultS;
 
     /**
      * 文件ID
      */
+    @Schema(description = "文件ID")
     @TableField(value = "FILE_ID")
     private String fileId;
 
     /**
      * 所属报告ID
      */
+    @Schema(description = "所属报告ID")
     @TableField(value = "REPORT_ID")
     private String reportId;
 }

+ 29 - 3
RMS/src/main/java/cn/cslg/report/entity/LitigationHistory.java

@@ -3,9 +3,14 @@ package cn.cslg.report.entity;
 import cn.cslg.report.common.model.BaseEntity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
  * 诉讼历史表
@@ -18,43 +23,64 @@ public class LitigationHistory extends BaseEntity<LitigationHistory> {
     /**
      * 原告
      */
+    @Schema(description = "原告")
     @TableField(value = "PLAINTIFF")
     private String plaintiff;
 
     /**
      * 被告
      */
+    @Schema(description = "被告")
     @TableField(value = "DEFENDANT")
     private String defendant;
 
     /**
      * 案由
      */
+    @Schema(description = "案由")
     @TableField(value = "CAUSE_OF_ACTION")
     private String causeOfAction;
 
     /**
      * 起诉时间
      */
+    @Schema(description = "起诉时间")
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
     @TableField(value = "PROSECUTORIAL_TIME")
-    private String prosecutorialTime;
+    private Date prosecutorialTime;
 
     /**
      * 结果
      */
+    @Schema(description = "结果")
     @TableField(value = "RESULT")
-    private String result;
+    private Integer result;
 
     /**
      * 案件详情
      */
+    @Schema(description = "案件详情")
     @TableField(value = "CASE_DETAILS")
     private String caseDetails;
 
     /**
      * 附件ID
      */
+    @Schema(description = "附件ID")
     @TableField(value = "FILE_ID")
-    private String fileId;
+    private Integer fileId;
+
+
+    @Schema(description = "备注")
+    @TableField(value = "REMARK")
+    private String remark;
+
+    @Schema(description = "法院")
+    @TableField(value = "COURT")
+    private String court;
+
+    @Schema(description = "专利号")
+    @TableField(value = "PATENT_NO")
+    private String patentNo;
 
 }

+ 79 - 0
RMS/src/main/java/cn/cslg/report/entity/References.java

@@ -0,0 +1,79 @@
+package cn.cslg.report.entity;
+
+import cn.cslg.report.common.model.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * 无效记录表
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = true)
+@TableName(value = "REFERENCES")
+public class References extends BaseEntity<References> {
+    /**
+     * 专利号
+     */
+     @TableField(value = "PATENT_NO")
+     private String patentNo;
+
+
+
+
+    /**
+     * 无效申请人
+     */
+    @Schema(description = "无效申请人")
+    @TableField(value = "REFERENCES_NAME")
+    private String referencesName;
+
+    /**
+     * 无效申请人ID
+     */
+    @Schema(description = "无效申请人ID")
+    @TableField(value = "PERSON_ID")
+    private String personId;
+
+    /**
+     * 无效时间
+     */
+    @Schema(description = "无效时间")
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    @TableField(value = "无效时间")
+    private String invalidTime;
+
+    /**
+     * 判决时间
+     */
+    @Schema(description = "判决时间")
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    @TableField(value = "JUDGMENT_TIME")
+    private String judgmentTime;
+
+    /**
+     * 结果
+     */
+    @Schema(description = "结果")
+    @TableField(value = "RESULT")
+    private String resultS;
+
+    /**
+     * 文件ID
+     */
+    @Schema(description = "文件ID")
+    @TableField(value = "FILE_ID")
+    private String fileId;
+
+    /**
+     * 所属报告ID
+     */
+    @Schema(description = "所属报告ID")
+    @TableField(value = "REPORT_ID")
+    private String reportId;
+}

+ 6 - 0
RMS/src/main/java/cn/cslg/report/entity/ReviewHistory.java

@@ -44,4 +44,10 @@ public class ReviewHistory extends BaseEntity<ReviewHistory> {
      */
     @TableField(value = "REPORT_ID")
     private String reportId;
+    /**
+     * 专利号
+     */
+    @TableField(value = "PATENT_NO")
+    private String patentNo;
+
 }

+ 7 - 0
RMS/src/main/java/cn/cslg/report/entity/Task.java

@@ -131,4 +131,11 @@ public class Task extends BaseEntity<Task> {
     @Schema(description = "结果")
     @TableField(value = "RESULT")
     private Integer result;
+
+    /**
+     * 标的专利/产品号
+     */
+    @Schema(description="标的专利号",required = true)
+    @TableField(value = "SIGN_PATENT_NO")
+    private String signPatentNo;
 }

+ 1 - 1
RMS/src/main/java/cn/cslg/report/mapper/InvalidRecordMapper.java

@@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 @Mapper
-public interface InvalidRecordMapper extends BaseMapper<AssoTaskPersonel> {
+public interface InvalidRecordMapper extends BaseMapper<InvalidRecord> {
     int deleteInvalidRecord(@Param("id") int id);
     int updateInvalidRecord(InvalidRecord invalidRecord);
     int addInvalidRecord(InvalidRecord invalidRecord);

+ 2 - 8
RMS/src/main/java/cn/cslg/report/mapper/LitigationHistoryMapper.java

@@ -9,12 +9,6 @@ import org.apache.ibatis.annotations.Param;
 import java.util.List;
 
 @Mapper
-public interface LitigationHistoryMapper extends BaseMapper<AssoTaskPersonel> {
-    int deleLitigationHistory(@Param("id") int id);
-    int addLitigationHistory(LitigationHistory litigationHistory);
-    int updateLitigationHistory(LitigationHistory litigationHistory);
-    /*
-    有问题接口根据前端的金进度缺少页数和每页多少
-     */
-    List<LitigationHistory> select(LitigationHistory litigationHistory);
+public interface LitigationHistoryMapper extends BaseMapper<LitigationHistory> {
+
 }

+ 13 - 0
RMS/src/main/java/cn/cslg/report/mapper/ReviewHistoryMapper.java

@@ -0,0 +1,13 @@
+package cn.cslg.report.mapper;
+
+import cn.cslg.report.entity.Features;
+import cn.cslg.report.entity.ReviewHistory;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface ReviewHistoryMapper extends BaseMapper<ReviewHistory> {
+}

+ 66 - 16
RMS/src/main/java/cn/cslg/report/service/BaseService.java

@@ -1,23 +1,29 @@
 package cn.cslg.report.service;
 
 import cn.cslg.report.common.core.base.Constants;
+import cn.cslg.report.common.model.dto.TaskWebSocketDTO;
 import cn.cslg.report.common.model.dto.UploadFileDTO;
 import cn.cslg.report.common.model.vo.LoginVO;
 import cn.cslg.report.common.model.vo.PersonnelVO;
 import cn.cslg.report.common.model.vo.TaskParams;
-import cn.cslg.report.common.utils.FileUtils;
-import cn.cslg.report.common.utils.LogExceptionUtil;
-import cn.cslg.report.common.utils.Response;
+import cn.cslg.report.common.utils.*;
 import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
+import cn.cslg.report.entity.ImportTask;
 import cn.hutool.core.collection.IterUtil;
 import cn.hutool.poi.excel.ExcelUtil;
 import com.alibaba.fastjson.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -222,24 +228,68 @@ public class BaseService {
     }
 
     //获得
-    public TaskParams getImportPatentTaskParamsBro(MultipartFile file) {
+    public TaskParams getImportPatentTaskParamsBro(MultipartFile file,Integer reportId) throws IOException {
         //上传文档
         UploadFileDTO fileDTO = fileUtils.uploadFile(file);
         //获得文档保存的路径
         String path = fileUtils.getPath(fileDTO.getPath());
-        List<List<Object>> rowList = new ArrayList<>();
-        //解析excel文件并保存进map里
-        List<Map<Object, Object>> mapList = new ArrayList<>();
-        ExcelUtil.readBySax(path, -1, (sheetIndex, rowIndex, row) -> rowList.add(row));
-        for (int i = 1; i < rowList.size(); i++) {
-            mapList.add(IterUtil.toMap(rowList.get(0), rowList.get(i)));
+
+        File file1 = new File(path);
+        String fileName = file1.getName();
+        Workbook workbook = null;
+        FileInputStream fileInputStream = new FileInputStream(file1);
+        // excel类型
+        if (fileName.endsWith(".xls")) {
+            workbook = new HSSFWorkbook(fileInputStream);
+        } else if (fileName.endsWith(".xlsx")) {
+            workbook = new XSSFWorkbook(fileInputStream);
         }
-        TaskParams taskParams = new TaskParams();
-        taskParams.setPath(path);
-        taskParams.setTaskType(1);
-        taskParams.setRowList(mapList);
-        taskParams.setUserId(String.valueOf(loginUtils.getId()));
-        taskParams.setOldName(file.getOriginalFilename());
+        Sheet sheet1 = workbook.getSheetAt(0); // excel文件的工作簿的名称
+        // 不作处理时获取的行数
+        int total = sheet1.getLastRowNum();
+        ImportTask importTask =new ImportTask();
+        importTask.setImportCount(total);
+        importTask.setReportId(reportId);
+        importTask.insert();
+        List<List<Object>> fileHead =new ArrayList<>();
+        //解析excel文件并保存进map里
+        ExcelUtil.readBySax(path, -1, (sheetIndex, rowIndex, row) ->
+                { if(rowIndex==0)
+                { fileHead.add(row);}
+                    else {
+                        List<Map<Object, Object>> mapList = new ArrayList<>();
+                        mapList.add(IterUtil.toMap(fileHead.get(0),row));
+                    TaskParams taskParams = new TaskParams();
+                    taskParams.setPath(path);
+                    taskParams.setTaskType(1);
+                    taskParams.setRowList(mapList);
+                    taskParams.setUserId(String.valueOf(loginUtils.getId()));
+                    taskParams.setOldName(file.getOriginalFilename());
+                    taskParams.setTotal(total);
+                    taskParams.setIndex((int) rowIndex);
+                    try {
+                 String a=       outInterfaceService.importPatents(taskParams);
+                        WebSocketServer.sendInfo(Response.websocket(new TaskWebSocketDTO()
+                                .setTaskId(taskParams.getTaskId())
+                                .setComplete(true)
+                                .setIndex((int) rowIndex)
+                                .setTaskType(Constants.TASK_IMPORT_PATENT)
+                                .setPercentage(100L)
+                                .setFileName("")
+                                .setOldName(taskParams.getOldName())
+                                .setUrl("")
+                                .setTotal(total), ResponseEnum.PATENT_IMPORT_TASK_SUCCESS), taskParams.getUserId());
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+                }
+
+
+
+               );
+        TaskParams taskParams =new TaskParams();
         return taskParams;
     }
 

+ 1 - 35
RMS/src/main/java/cn/cslg/report/service/OutInterfaceService.java

@@ -372,42 +372,8 @@ if(personnelVO.getName()==null)
         RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), param);
         Request request = new Request.Builder()
                 .url(PASUrl + "/api/v2/project/import/sysPatent")
-                .get()
+                .post(requestBody)
                 .build();
-
-        httpClient.newWebSocket(request, new WebSocketListener() {
-            @Override
-            public void onOpen(WebSocket webSocket, Response response) {
-                super.onOpen(webSocket, response);
-//                EventBus.getDefault().post(taskParams);
-            }
-
-            @Override
-            public void onMessage(WebSocket webSocket, String text) {
-                super.onMessage(webSocket, text);
-                //收到消息...(一般是这里处理json)
-            }
-
-            @Override
-            public void onMessage(WebSocket webSocket, ByteString bytes) {
-                super.onMessage(webSocket, bytes);
-                //收到消息...(一般很少这种消息)
-            }
-
-            @Override
-            public void onClosed(WebSocket webSocket, int code, String reason) {
-                super.onClosed(webSocket, code, reason);
-                //连接关闭...
-            }
-
-            @Override
-            public void onFailure(WebSocket webSocket, Throwable throwable, Response response) {
-                super.onFailure(webSocket, throwable, response);
-                //连接失败...
-            }
-        });
-
-
         return Objects.requireNonNull(httpClient.newCall(request).execute().body()).string();
     }
 }

+ 2 - 2
RMS/src/main/java/cn/cslg/report/service/business/AssoTaskPersonelService.java

@@ -20,6 +20,7 @@ import okhttp3.OkHttpClient;
 import okhttp3.Request;
 import okhttp3.RequestBody;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
@@ -36,8 +37,7 @@ import java.util.Objects;
 @Slf4j
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class AssoTaskPersonelService extends ServiceImpl<AssoTaskPersonelMapper, AssoTaskPersonel> {
-  public final  AssoTaskPersonelMapper assoTaskPersonelMapper ;
-//  public final LoginUtils loginUtils;
+   public final  AssoTaskPersonelMapper assoTaskPersonelMapper ;
     public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
     @Value("${PCSUrl}")
     private String PCSUrl;

+ 21 - 20
RMS/src/main/java/cn/cslg/report/service/business/InvalidRecordService.java

@@ -5,6 +5,7 @@ import cn.cslg.report.entity.ImportTask;
 import cn.cslg.report.entity.InvalidRecord;
 import cn.cslg.report.mapper.ImportTaskMapper;
 import cn.cslg.report.mapper.InvalidRecordMapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -16,29 +17,29 @@ import java.io.IOException;
 @Service
 @Slf4j
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class InvalidRecordService  extends ServiceImpl<ImportTaskMapper, ImportTask> {
+public class InvalidRecordService  extends ServiceImpl<InvalidRecordMapper,InvalidRecord> {
     public final InvalidRecordMapper invalidRecordMapper;
-    public String deleteInvalidRecord(int id)throws IOException{
-        int i = invalidRecordMapper.deleteInvalidRecord(id);
-        if(i>0){
-            return Response.success();
-        }
-        return Response.error();
+
+    public String deleteInvalidRecord(int id) throws IOException {
+        this.removeById(id);
+        return Response.success();
     }
-    public String updateInvalidRecord(InvalidRecord invalidRecord)throws IOException{
-        int i = invalidRecordMapper.updateInvalidRecord(invalidRecord);
-        if(i>0){
-            return Response.success();
-        }
-        return Response.error();
+
+    public String updateInvalidRecord(InvalidRecord invalidRecord) throws IOException {
+        invalidRecord.updateById();
+        return Response.success();
     }
-    public String addInvalidRecord(InvalidRecord invalidRecord)throws IOException{
-        int i = invalidRecordMapper.addInvalidRecord(invalidRecord);
-        if(i>0){
-            return Response.success();
-        }
-        return Response.error();
 
+    public String addInvalidRecord(InvalidRecord invalidRecord) throws IOException {
+        invalidRecord.insert();
+        return Response.success();
     }
 
-}
+    public String queryInvalidRecord(InvalidRecord invalidRecord){
+        LambdaQueryWrapper<InvalidRecord> wrapper =new LambdaQueryWrapper<>();
+        wrapper.eq(InvalidRecord::getPatentNo,invalidRecord.getPatentNo());
+       return Response.success(this.list(wrapper));
+    }
+
+
+}

+ 19 - 15
RMS/src/main/java/cn/cslg/report/service/business/LitigationHistoryService.java

@@ -5,6 +5,7 @@ import cn.cslg.report.entity.ImportTask;
 import cn.cslg.report.entity.LitigationHistory;
 import cn.cslg.report.mapper.ImportTaskMapper;
 import cn.cslg.report.mapper.LitigationHistoryMapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -15,29 +16,32 @@ import java.io.IOException;
 @Service
 @Slf4j
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
-public class LitigationHistoryService extends ServiceImpl<ImportTaskMapper, ImportTask> {
+public class LitigationHistoryService extends ServiceImpl<LitigationHistoryMapper, LitigationHistory> {
     public final LitigationHistoryMapper litigationHistoryMapper;
     public String deleteLitigationHistory(int id)throws IOException{
-        int i = litigationHistoryMapper.deleLitigationHistory(id);
-        if(i>0){
-            return Response.success();
-        }
-        return Response.error();
+        this.removeById(id);
+       return Response.success();
 
     }
     public String addLitigationHistory(LitigationHistory litigationHistory)throws IOException{
-        int i = litigationHistoryMapper.addLitigationHistory(litigationHistory);
-        if(i>0){
-            return Response.success();
-        }
-        return Response.error();
+        litigationHistory.insert();
+        return Response.success();
+
+
 
     }
     public String updateLitigationHistory(LitigationHistory litigationHistory)throws IOException{
-        int i = litigationHistoryMapper.updateLitigationHistory(litigationHistory);   if(i>0){
-            return Response.success();
-        }
-        return Response.error();
+        litigationHistory.updateById();
+        return Response.success();
+
+    }
+    public String queryLitigationHistory(LitigationHistory litigationHistory)throws IOException{
+        LambdaQueryWrapper<LitigationHistory> wrapper =new LambdaQueryWrapper<>();
+               wrapper.eq(LitigationHistory::getPatentNo,litigationHistory.getPatentNo());
+
+
+
+        return Response.success(this.list(wrapper));
 
     }
 

+ 44 - 0
RMS/src/main/java/cn/cslg/report/service/business/ReviewHistoryService.java

@@ -0,0 +1,44 @@
+package cn.cslg.report.service.business;
+
+import cn.cslg.report.common.utils.Response;
+import cn.cslg.report.entity.InvalidRecord;
+import cn.cslg.report.entity.ReviewHistory;
+import cn.cslg.report.mapper.InvalidRecordMapper;
+import cn.cslg.report.mapper.ReviewHistoryMapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+
+@Service
+@Slf4j
+@RequiredArgsConstructor(onConstructor_ = {@Lazy})
+public class ReviewHistoryService extends ServiceImpl<ReviewHistoryMapper, ReviewHistory> {
+
+    public String deleteReviewHistory(int id) throws IOException {
+        this.removeById(id);
+        return Response.success();
+    }
+
+    public String updateReviewHistory(ReviewHistory reviewHistory)  {
+        reviewHistory.updateById();
+        return Response.success();
+    }
+
+    public String addReviewHistory(ReviewHistory reviewHistory) throws IOException {
+        reviewHistory.insert();
+        return Response.success();
+    }
+
+    public String queryReviewHistory(ReviewHistory reviewHistory){
+        LambdaQueryWrapper<ReviewHistory> wrapper =new LambdaQueryWrapper<>();
+        wrapper.eq(ReviewHistory::getPatentNo,reviewHistory.getPatentNo());
+       return Response.success(this.list(wrapper));
+    }
+
+
+}

+ 5 - 2
RMS/src/main/java/cn/cslg/report/service/business/TaskService.java

@@ -177,7 +177,10 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
     //添加分配任务
     @Transactional(rollbackFor = Exception.class)
     public String addAssTask(AssignTaskVO assignTaskVO) throws ParseException, IOException {
-
+         LambdaQueryWrapper<Report> wrapper1 =new LambdaQueryWrapper<>();
+         wrapper1.select(Report::getSignPatentNo);
+         wrapper1.eq(Report::getId,assignTaskVO.getReportId());
+        String signPatentNO = reportService.list(wrapper1).get(0).getSignPatentNo();
 
 
         //遍历assignTaskVO的分配人员信息assigns,在任务表里插入分配任务
@@ -232,7 +235,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
             task.setHandlePersonName(personnel.getPersonnelName());
             task.setCreateID(personnelVO.getId());
             task.setCreateName(personnelVO.getName());
-            //task.setCreateID();
+            task.setSignPatentNo(signPatentNO);
             task.insert();
             //根据数量从分配的专利号列表中截取该数量的专利号,加上分配信息的专利号进行装配
             List<String> partNos = patentNos.subList(flag, flag+personPatents.get(i).getAssignCount()-1);

+ 2 - 2
RMS/src/main/resources/application.yml

@@ -67,6 +67,6 @@ mybatis-plus:
     map-underscore-to-camel-case: true
     cache-enabled: false
   mapper-locations: classpath:mapper/*.xml
-PCSUrl: http://192.168.1.17:8880
-PASUrl: http://192.168.1.17:8879
+PCSUrl: http://192.168.1.4:8880
+PASUrl: http://192.168.1.4:8879
 

+ 0 - 1
RMS/src/main/resources/mapper/InvalidRecord.xml

@@ -5,7 +5,6 @@
     <delete id="deleteInvalidRecord">
         delete from INVALID_RECORD where ID=#{id}
     </delete>
-    int updateInvalidRecord(InvalidRecord invalidRecord);
     <update id="updateInvalidRecord">
      update INVALID_RECORD set
          PATENT_NO=#{patentNo},PERSON=#{person},PERSON_ID=#{personId},INVALID_TIME={invalidTime},JUDGMENT_TIME=#{judgmentTime},RESULT=#{resultS},FILE_ID=#{fileId},REPORT_ID=#{reportId}

+ 0 - 0
logs/rms/rms-debug.2022-11-15.0.log


文件差异内容过多而无法显示
+ 0 - 23
logs/rms/rms-info.2022-11-15.0.log