소스 검색

LY 年检报告

ly 2 년 전
부모
커밋
071398fc72

+ 0 - 1
master/src/main/java/com/ruoyi/project/sems/controller/SpecHomeController.java

@@ -127,7 +127,6 @@ public class SpecHomeController extends BaseController
             if (!StringUtils.isBlank(gdList.get(i).getLength())) {
                 if (gdList.get(i).getLength().indexOf("\n") > -1) {
                     String[] arr = gdList.get(i).getLength().split("\n");
-                    logger.info(JSON.toJSONString(arr));
                     for (int j = 0; j < arr.length; j++) {
                         try {
                             gdLength += Double.parseDouble(arr[j]);

+ 4 - 2
master/src/main/java/com/ruoyi/project/sems/service/impl/TReportYlgdServiceImpl.java

@@ -34,12 +34,13 @@ class TReportYlgdServiceImpl implements ITReportYlgdService {
         List<Long> longs = this.tReportYlgdMapper.queryNeedInsertIds();
         if (longs.size() > 0) {
             List<TSpecdevYlgd> tSpecdevYlgds = this.tSpecdevYlgdMapper.selectTSpecdevYlgdByIds(longs);
-            ExecutorService executorService = Executors.newCachedThreadPool();
+            ExecutorService executorService = Executors.newFixedThreadPool(100);
             for (TSpecdevYlgd specdevYlgd : tSpecdevYlgds) {
                 executorService.execute(() -> {
                     this.tReportYlgdMapper.insertByTSpecdevYlgd(specdevYlgd);
                 });
             }
+            executorService.shutdown();
         }
         return 0;
     }
@@ -49,12 +50,13 @@ class TReportYlgdServiceImpl implements ITReportYlgdService {
         List<Long> longs = this.tReportYlgdMapper.queryNeedUpdateIds();
         if (longs.size() > 0) {
             List<TSpecdevYlgd> tSpecdevYlgds = this.tSpecdevYlgdMapper.selectTSpecdevYlgdByIds(longs);
-            ExecutorService executorService = Executors.newCachedThreadPool();
+            ExecutorService executorService = Executors.newFixedThreadPool(100);
             for (TSpecdevYlgd tSpecdevYlgd : tSpecdevYlgds) {
                 executorService.execute(() -> {
                     this.tReportYlgdMapper.updateByTSpecdevYlgd(tSpecdevYlgd);
                 });
             }
+            executorService.shutdown();
         }
         return 0;
     }

+ 4 - 2
master/src/main/java/com/ruoyi/project/sems/service/impl/TReportYlrqServiceImpl.java

@@ -31,12 +31,13 @@ public class TReportYlrqServiceImpl implements ITReportYlrqService {
         List<Long> longs = this.tReportYlrqMapper.queryNeedInsertIds();
         if (longs.size() > 0) {
             List<TSpecdevYlrq> tSpecdevYlrqs = this.tSpecdevYlrqMapper.selectTSpecdevYlrqByIds(longs);
-            ExecutorService executorService = Executors.newCachedThreadPool();
+            ExecutorService executorService = Executors.newFixedThreadPool(100);
             for (TSpecdevYlrq specdevYlrq : tSpecdevYlrqs) {
                 executorService.execute(()->{
                     this.tReportYlrqMapper.insertByTSpecdevYlrq(specdevYlrq);
                 });
             }
+            executorService.shutdown();
         }
         return 0;
     }
@@ -46,12 +47,13 @@ public class TReportYlrqServiceImpl implements ITReportYlrqService {
         List<Long> longs = this.tReportYlrqMapper.queryNeedUpdateIds();
         if (longs.size() > 0) {
             List<TSpecdevYlrq> tSpecdevYlrqs = this.tSpecdevYlrqMapper.selectTSpecdevYlrqByIds(longs);
-            ExecutorService executorService = Executors.newCachedThreadPool();
+            ExecutorService executorService = Executors.newFixedThreadPool(100);
             for (TSpecdevYlrq tSpecdevYlrq : tSpecdevYlrqs) {
                 executorService.execute(()->{
                     this.tReportYlrqMapper.updateByTSpecdevYlrq(tSpecdevYlrq);
                 });
             }
+            executorService.shutdown();
         }
         return 0;
     }

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

@@ -28,9 +28,9 @@ server:
     # tomcat的URI编码
     uri-encoding: UTF-8
     # tomcat最大线程数,默认为200
-    max-threads: 800
+    max-threads: 200
     # Tomcat启动初始化的线程数,默认值25
-    min-spare-threads: 100
+    min-spare-threads: 25
     connection-timeout: 2000000ms
 # 日志配置
 logging:

+ 3 - 3
master/src/main/resources/mybatis/sems/TReportYlgdMapper.xml

@@ -395,8 +395,8 @@
         where id = #{id}
     </update>
 
-    <update id="deleteTReportYlgdByIds" parameterType="String">
-        update t_report_ylgd set del_flag = 2 where id in
+    <delete id="deleteTReportYlgdByIds" parameterType="String">
+        delete from t_report_ylgd where id in
         <foreach item="id" collection="array" open="(" close=")" index="index">
             <if test="index != 0">
                 <choose>
@@ -406,6 +406,6 @@
             </if>
             #{id}
         </foreach>
-    </update>
+    </delete>
 
 </mapper>

+ 3 - 3
master/src/main/resources/mybatis/sems/TReportYlrqMapper.xml

@@ -470,8 +470,8 @@
         where id = #{id}
     </update>
 
-    <update id="deleteTReportYlrqByIds" parameterType="String">
-        update t_report_ylrq set del_flag = 2 where id in
+    <delete id="deleteTReportYlrqByIds" parameterType="String">
+        delete from  t_report_ylrq where id in
         <foreach item="id" collection="array" open="(" close=")" index="index">
             <if test="index != 0">
                 <choose>
@@ -481,6 +481,6 @@
             </if>
             #{id}
         </foreach>
-    </update>
+    </delete>
 
 </mapper>