lwhhszx 2 年之前
父節點
當前提交
c14b5f83bc

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

@@ -622,7 +622,7 @@ public class ReportDocumentService extends ServiceImpl<ReportDocumentMapper, Rep
             List<JSONObject> patentDTOS = JSON.parseArray(jsonObject.get("data").toString(), JSONObject.class);
         //装载单个专利的信息
         Map<String, Object> patentMap = new HashMap<>();
-            for (JSONObject patent : patentDTOS) {
+          JSONObject patent = patentDTOS.get(0);
                 List<JSONObject> applicantJSONs = JSON.parseArray(patent.get("applicant").toString(), JSONObject.class);
                 StringBuilder applicants = new StringBuilder();
                 StringBuilder rightPerson = new StringBuilder();
@@ -671,12 +671,12 @@ public class ReportDocumentService extends ServiceImpl<ReportDocumentMapper, Rep
                 patentMap.put("cM", compareMessageVOS);
                 patentMap.put("rightNum", temMap.get("right"));
                 patentMap.put("mainRightNum", temMap.get("mainRight"));
-            }
         Map<String, Object> map = new HashMap<>();
         String date = DateUtils.formatDate(new Date(), DateUtils.YYYY_MM_DD);
         String[] ds = date.split("-");
         map.put("sys", new SystemMO(ds[0], ds[1], ds[2], "", "reportName"));
         map.put("patentMap", patentMap);
+        map.put("",patentNo);
         // 为表格的显示绑定行循环
         LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
         HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
@@ -696,6 +696,53 @@ public class ReportDocumentService extends ServiceImpl<ReportDocumentMapper, Rep
         return Response.success();
     }
 
+    public Map<String,Object> signPantentMess(String patentNo) throws IOException {
+        PatentVO patentVO = new PatentVO();
+        patentVO.setPatentNos(Arrays.asList(patentNo));
+        //根据专利号查询专利详细信息
+        String resBody = outInterfaceService.getPatentDTOListForRMS(patentVO);
+        JSONObject jsonObject = JSONObject.parseObject(resBody);
+        List<JSONObject> patentDTOS = JSON.parseArray(jsonObject.get("data").toString(), JSONObject.class);
+        //装载单个专利的信息
+        Map<String, Object> patentMap = new HashMap<>();
+        JSONObject patent = patentDTOS.get(0);
+        List<JSONObject> applicantJSONs = JSON.parseArray(patent.get("applicant").toString(), JSONObject.class);
+        StringBuilder applicants = new StringBuilder();
+        StringBuilder rightPerson = new StringBuilder();
+        applicantJSONs.forEach(tem -> {
+            if (Integer.parseInt(tem.get("dataType").toString()) == 1) {
+                applicants.append(tem.get("name") + "\r");
+            } else {
+                rightPerson.append(tem.get("name") + "\r");
+            }
+        });
+        //申请日
+        patentMap.put("applicationDate", patent.get("applicationDate"));
+        //公开日
+        patentMap.put("publicDate", patent.get("publicDate"));
+        //专利号
+        patentMap.put("publicNo", patent.get("publicNo"));
+        patentMap.put("firstPublicDate", patent.get("firstPublicDate"));
+        patentMap.put("rightPerson", rightPerson);
+        //图示
+        patentMap.put("abstractPath", "http://139.224.24.90:8081" + patent.get("abstractPath"));
+
+        //查询专利权要
+        String resBody2 = outInterfaceService.getPatentRightFromPAS(patentNo);
+        JSONObject jsonObject2 = JSONObject.parseObject(resBody2);
+        //解析jason获得标的专利的权要
+        List<PatentRight> patentRightsOrgin = JSON.parseArray(jsonObject2.getString("data"), PatentRight.class);
+        List<Map<String,Object>> rights =new ArrayList<>();
+        patentRightsOrgin.forEach(item->{
+            Map<String,Object> temMap =new HashMap<>();
+            temMap.put("rightName","权要"+item.getSort());
+            temMap.put("content",item.getContent());
+            rights.add(temMap);
+        });
+        patentMap.put("rights",rights);
+        return  patentMap;
+    }
+
 
 }
 

+ 40 - 3
RMS/src/main/java/cn/cslg/report/service/business/TaskService.java

@@ -805,6 +805,8 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         else if ((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0) && syneryVO.getIsAll() == 0) {
             List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
             patentNos = AllpatentNos;
+            patentVO.setPatentNos(patentNos);
+            patentVO.setPatentName(syneryVO.getPatentVO().getPatentName());
         }
         //无查询条件并且是全部的专利
         else if ((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0) && syneryVO.getIsAll() == 1) {
@@ -820,6 +822,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
             List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), syneryVO.getReportId(), task.getId(), patentVO.getTaskStatus());
             List<String> strings1 = new ArrayList<>(CollectionUtils.intersection(temPatentNos, AllpatentNos));
             patentVO.setPatentNos(temPatentNos);
+            patentVO.setPatentName(syneryVO.getPatentVO().getPatentName());
         }
         //有查询条件并且是全部的专利
         else if (patentVO != null && patentVO.getFiledOptions() != null && patentVO.getFiledOptions().size() != 0 && syneryVO.getIsAll() == 1) {
@@ -846,10 +849,47 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         });
         // 分配信息入库
         assoTaskPersonelService.saveBatch(assoTaskPersonels);
+        Map<String, Object> map = new LinkedHashMap<>();
+        map.put("title", "任务通知");
+        map.put("template", "mail/Synery.html");
 
         if (synery_ccs != null && synery_ccs.size() != 0) {
             synery_ccs.forEach(item -> {
                 item.setTaskId(task.getId());
+                if (item.getCcId() != null) {
+                    String resBody = null;
+                    try {
+                        resBody = outInterfaceService.getPersonnelByIdsFromPCS(Arrays.asList(item.getCcId()));
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
+                    JSONObject jsonObject = JSONObject.parseObject(resBody);
+                    //解析jason获得标的专利的权要
+                    List<Personnel> personnels = JSON.parseArray(jsonObject.getString("data"), Personnel.class);
+                    map.put("value1", personnels.get(0).getPersonnelName());
+                    map.put("email", personnels.get(0).getPersonnelEmail());
+                    map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+                    map.put("value2","aaa");
+                    map.put("value3", "http://localhost:8086/Incomplete?taskId=" + task.getId() + "&reportId=" + task.getReportId() + "&type=1" + "&reportType=" + report.getType());
+                    mailUtils.sendEmailMessage(map);
+                } else {
+                    String orgin = item.getCcEmail();
+                    String parStr = "\\<([^}]*)\\>";
+                    Pattern pattern = Pattern.compile(parStr);
+                    Matcher matcher = pattern.matcher(orgin);
+                    if (matcher.find()) {
+                        String personName = orgin.substring(0, matcher.start());
+                        String email = matcher.group(0);
+                        email = email.replace("<", "");
+                        email = email.replace(">", "");
+                        map.put("value1", personName);
+                        map.put("email", email);
+                        map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+                        map.put("value2", "aaa");
+                        map.put("value3", "http://localhost:8086/identificationCode");
+                        mailUtils.sendEmailMessage(map);
+                    }
+                }
             });
             syneryCCService.saveBatch(synery_ccs);
         }
@@ -859,9 +899,6 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         syneryCode.setCode(code);
         syneryCode.setTaskId(task.getId());
         syneryCode.insert();
-        Map<String, Object> map = new LinkedHashMap<>();
-        map.put("title", "任务通知");
-        map.put("template", "mail/Synery.html");
         if (syneryVO.getHandlePersonId() != null) {
             String resBody = outInterfaceService.getPersonnelByIdsFromPCS(Arrays.asList(task.getHandlePersonId()));
             JSONObject jsonObject = JSONObject.parseObject(resBody);

+ 3 - 1
RMS/src/main/resources/application-dev.yml

@@ -37,4 +37,6 @@ spring:
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
 queueName: mail.queue
-fileURL:  http://139.224.24.90:8082
+fileURL:  http://139.224.24.90:8082
+PCSUrl:  http://localhost:8880
+PASUrl:  http://localhost:8879

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

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

+ 2 - 1
RMS/src/main/resources/mapper/CompareMessageMapper.xml

@@ -27,7 +27,8 @@
             and f.REPORT_ID=#{params.reportId}
             and cm.ID is not null
             <if test="params.patentNo !=null">
-                and f.SIGN_PATENT_NO=#{params.patentNo}
+                and f.SIGN_PATENT_NO=
+                like concat('%', #{params.patentNo}, '%')
             </if>
             <if test="params.compareResult !=null">
                 and   cm.COMPARE_RESULT=#{params.compareResult}

+ 3 - 1
RMS/target/classes/application-dev.yml

@@ -37,4 +37,6 @@ spring:
       web-stat-filter:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
 queueName: mail.queue
-fileURL:  http://139.224.24.90:8082
+fileURL:  http://139.224.24.90:8082
+PCSUrl:  http://localhost:8880
+PASUrl:  http://localhost:8879

+ 1 - 2
RMS/target/classes/application.yml

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

二進制
RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class


二進制
RMS/target/classes/cn/cslg/report/service/business/ReportService.class


二進制
RMS/target/classes/cn/cslg/report/service/business/TaskService.class


+ 2 - 1
RMS/target/classes/mapper/CompareMessageMapper.xml

@@ -27,7 +27,8 @@
             and f.REPORT_ID=#{params.reportId}
             and cm.ID is not null
             <if test="params.patentNo !=null">
-                and f.SIGN_PATENT_NO=#{params.patentNo}
+                and f.SIGN_PATENT_NO=
+                like concat('%', #{params.patentNo}, '%')
             </if>
             <if test="params.compareResult !=null">
                 and   cm.COMPARE_RESULT=#{params.compareResult}

+ 5 - 6
RMS/target/classes/mapper/ProductMapper.xml

@@ -3,8 +3,7 @@
 
 
 <mapper namespace="cn.cslg.report.mapper.ProductMapper">
-
-    <!--插入产品表数据-->
+    <!--插入数据-->
     <!--int insert(Product product);-->
     <insert id="insert" useGeneratedKeys="true" keyProperty="id">
         insert into PRODUCT (PRODUCT_NAME, PRODUCT_IDENTIFY, PRODUCT_DESCRIPTION, SURVEY_AREA, PRODUCT_IMAGE,
@@ -15,7 +14,7 @@
                 #{createPersonId})
     </insert>
 
-    <!--根据id修改产品表数据-->
+    <!--根据id修改数据-->
     <!--int update(Product product);-->
     <update id="update">
         update PRODUCT
@@ -55,7 +54,7 @@
         where ID = #{id}
     </update>
 
-    <!--根据报告reportId统计产品数量-->
+    <!--根据报告reportId统计数量-->
     <!--int countByReportId(Integer reportId);-->
     <select id="countByReportId" resultType="int">
         select count(*)
@@ -63,7 +62,7 @@
         where REPORT_ID = #{reportId}
     </select>
 
-    <!--根据报告reportId关联查询产品和产品附件数据(产品表、产品文件关联表、报告系统文件表)-->
+    <!--根据报告reportId关联产品表、产品文件关联表、报告系统文件表查询产品和产品附件数据-->
     <!--ProductIncludeFilesVO getWholeByReportId(Integer reportId);-->
     <select id="getWholeByReportId" resultMap="WholeResultMap">
         select p.ID  p_ID,
@@ -124,7 +123,7 @@
         </collection>
     </resultMap>
 
-    <!--根据报告reportId删除产品表数据-->
+    <!--根据报告reportId删除数据-->
     <!--int deleteByReportId(Integer reportId);-->
     <delete id="deleteByReportId">
         delete