chendayu преди 2 години
родител
ревизия
3ea42568cb

+ 4 - 0
PAS/src/main/java/cn/cslg/pas/common/model/vo/QueryTaskVO.java

@@ -92,6 +92,10 @@ public class QueryTaskVO implements Serializable {
      * 最近更新时间(即上面的结束时间endTime)
      */
     private Integer modifiedTime;
+    /**
+     * Excel文件地址
+     */
+    private String url;
 
     //以上若是网站导入的任务,则以下为关联任务条件表数据;以上若是Excel导入的任务,则以下都是null
     /**

+ 19 - 16
PAS/src/main/java/cn/cslg/pas/service/PatentRightService.java

@@ -435,24 +435,27 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
     public void updatePatentRight(PatentRightParams params) {
         try {
             //调用拆分权要工具类
-            List<PatentRight> patentRights = PatentRightUtils.formatPatentRight(params);
-
-            if (patentRights.size() > 0) {
-                //删除库表中原有该权要
-                this.deleteByPatentId(params.getPatentId());
-                //权要数据入表"os_patent_right"
-                this.saveOrUpdateBatch(patentRights);
-            }
+//            List<PatentRight> patentRights = PatentRightUtils.formatPatentRight(params);
+//
+//            if (patentRights.size() > 0) {
+//                //删除库表中原有该权要
+//                this.deleteByPatentId(params.getPatentId());
+//                //权要数据入表"os_patent_right"
+//                this.saveOrUpdateBatch(patentRights);
+//            }
 
             //不进行拆分,原文直接保存入库
-//            PatentRight patentRight = new PatentRight()
-//                    .setPatentId(params.getPatentId())
-//                    .setContent(params.getContent())
-//                    .setContentOut(params.getContentOut());
-//            if (patentRight.getContent() != null && !patentRight.getContent().equals("")) {
-//                this.deleteByPatentId(patentRight.getPatentId());
-//                this.saveOrUpdate(patentRight);
-//            }
+            PatentRight patentRight = new PatentRight()
+                    .setPatentId(params.getPatentId())
+                    .setContent(params.getContent())
+                    .setContentOut(params.getContentOut())
+                    .setType(1)
+                    .setSort(0)
+                    .setParentSort("-1");
+            if (patentRight.getContent() != null && !patentRight.getContent().equals("")) {
+                this.deleteByPatentId(patentRight.getPatentId());
+                this.saveOrUpdate(patentRight);
+            }
 
         } catch (Exception e) {
             e.printStackTrace();

+ 4 - 1
PAS/src/main/resources/mapper/TaskMapper.xml

@@ -45,7 +45,7 @@
         tas.success_num tas_success_num,
         tas.true_success_num tas_true_success_num, tas.default_num tas_default_num, tas.pram_json tas_pram_json,
         tas.task_condition_id tas_task_condition_id, tas.create_time tas_create_time,
-        tas.task_type tas_task_type,
+        tas.task_type tas_task_type, tas.downexcel tas_downexcel,
         con.id, con.task_id, con.task_type, con.task_type2, con.conditions,
         con.crons, con.config_cells, con.config_id, con.task_name, con.total,
         con.orderby, con.orderby_type, con.db_type, con.start_number, con.end_number,
@@ -117,6 +117,7 @@
         <result column="tas_old_name" property="taskName"/>
         <result column="tas_task_type" property="taskType"/>
         <result column="tas_endtime" property="modifiedTime"/>
+        <result column="tas_downexcel" property="url"/>
         <result column="conditions" property="conditions"/>
         <result column="crons" property="crons"/>
         <result column="config_cells" property="configCells"/>
@@ -128,6 +129,8 @@
         <result column="isadd_patentnos" property="isAddPatentNos"/>
         <result column="isdelete_patentnos" property="isDeletePatentNos"/>
     </resultMap>
+
+
     <select id="queryTask" resultMap="queryTasksMap">
         select tas.*
         from os_task tas