zhangying преди 18 часа
родител
ревизия
706ef359c6

+ 2 - 0
zjrs-service-backend/src/main/java/com/zjrs/ZjrsServiceBackendApplication.java

@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.FilterType;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication
 @ComponentScan(
@@ -30,6 +31,7 @@ import org.springframework.context.annotation.FilterType;
                 )
         }
 )
+@EnableScheduling
 public class ZjrsServiceBackendApplication {
 
     public static void main(String[] args) {

+ 30 - 21
zjrs-service-backend/src/main/java/com/zjrs/zwnw/sxgl/entity/SxtjMapper.xml

@@ -23,37 +23,46 @@
     </select>
 
     <select id="queryYwltjList" parameterType="com.zjrs.zwnw.sxgl.dto.YwltjQueryDTO" resultType="com.zjrs.zwnw.sxgl.dto.YwltjResultDTO">
-        SELECT * FROM (SELECT '柜台经办' "sqqdname", '1' "sqqd",sxlb "sxlb",
-        (select sxmc from rs_sx_config a where a.sxbm = q.sbsx) "sxmc",sbsx "sbsx", count(1) "ywl",
+        SELECT * FROM (
+        SELECT
+        '柜台经办' "sqqdname",
+        '1' "sqqd",
+        sxlb "sxlb",
+        (SELECT sxmc FROM rs_sx_config a WHERE a.sxbm = q.sbsx) "sxmc",
+        sbsx "sbsx",
+        count(1) "ywl",
         (SELECT aaa103 FROM V_GGFW_DICT WHERE AAA100 = 'SX_SXLB' and aaa102 = sxlb) "zbks",
-        to_char(sum(fcbmy)) "fcbmy",to_char(sum(bmy)) "bmy",to_char(sum(jbmy)) "jbmy",
-        to_char(sum(my)) "my",to_char(sum(fcmy)) "fcmy",
-        decode(instr(to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'),'.'),'0',
-        to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'),
-        to_char(ROUND(((sum(fcbmy)+sum(bmy))/count(1))*100,1),'fm9999990.0'))||'%' "cpl",
-        decode(instr(to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'),'.'),'0',
-        to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'),
-        to_char(ROUND(((sum(jbmy)+sum(my)+sum(fcmy))/count(1))*100,1),'fm9999990.0'))||'%' "hpl"
-        FROM (select
+        to_char(sum(fcbmy)) "fcbmy",
+        to_char(sum(bmy)) "bmy",
+        to_char(sum(jbmy)) "jbmy",
+        to_char(sum(my)) "my",
+        to_char(sum(fcmy)) "fcmy",
+        to_char(round(((sum(fcbmy) + sum(bmy)) / NULLIF(count(1), 0)) * 100, 1), 'fm9999990.0') || '%' "cpl",
+        to_char(round(((sum(jbmy) + sum(my) + sum(fcmy)) / NULLIF(count(1), 0)) * 100, 1), 'fm9999990.0') || '%' "hpl"
+        FROM (
+        SELECT
         sbsx,
         (SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '1') fcbmy,
         (SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '2') bmy,
         (SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '3') jbmy,
         (SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '4') my,
         (SELECT count(1) FROM RS_JK_HCP WHERE sllsh = b.sllsh AND EVALPROCESS='2' AND yhpj = '5') fcmy,
-        (select sxlb from rs_sx_config a where a.sxbm = b.sbsx) sxlb
-        from rs_slxx b
-        where 
-        <if test="dto.sqrqc != null and dto.sqrqc != ''">
-             to_date(substr(slbh,0,8),'yyyyMMdd') &gt;= to_date(REPLACE(#{dto.sqrqc},'-',''),'yyyyMMdd')
-        </if>
-        ) q group by sbsx,sxlb        
-        ) where "sxmc" IS NOT NULL
+        (SELECT sxlb FROM rs_sx_config a WHERE a.sxbm = b.sbsx) sxlb
+        FROM rs_slxx b
+        <where>
+            <if test="dto.sqrqc != null and dto.sqrqc != ''">
+                AND substr(slbh, 1, 8) <![CDATA[ >= ]]> REPLACE(#{dto.sqrqc}, '-', '')
+            </if>
+        </where>
+        ) q
+        GROUP BY sbsx, sxlb
+        )
+        WHERE "sxmc" IS NOT NULL
         <if test="dto.sqqd != null and dto.sqqd != ''">
-            and "sqqd" = #{dto.sqqd}
+            AND "sqqd" = #{dto.sqqd}
         </if>
         <if test="dto.sxmc != null and dto.sxmc != ''">
-            and "sxmc" like '%'||#{dto.sxmc}||'%'
+            AND "sxmc" LIKE '%'||#{dto.sxmc}||'%'
         </if>
     </select>
 

+ 55 - 1
zjrs-service-backend/src/main/java/com/zjrs/zwnw/zj/entity/GccrcMapper.xml

@@ -46,13 +46,67 @@
     </select>
     <select id="getGccrcListPage" parameterType="com.zjrs.zwnw.zj.dto.GccrcQueryDTO" resultType="com.zjrs.zwnw.zj.dto.GccrcListDTO">
         SELECT t1.rs_zj_gccrc_lsh rsZjGccrcLsh,t2.AAC161 gj,t2.AAC058 zjlx,t2.AAC147 zjhm,t2.AAC003 xm,t1.xl,t1.csgzhy,t1.gzgwxz,t1.zcxl,t1.zczymc,t1.dwxz,t1.dwgx,
-        t1.rckhm,t1.rcklx,t1.rckzt,t1.qfzt,t1.QFSJ,t1.SQLX FROM RS_ZJ_GCCRC t1,ac01 t2 where t1.ztid=t2.ztid
+        t1.rckhm,t1.rcklx,t1.rckzt,t1.qfzt,t1.QFSJ,t1.SQLX,t1.bjrq FROM RS_ZJ_GCCRC t1,ac01 t2 where t1.ztid=t2.ztid
         <if test="dto.gj != null and dto.gj != ''">
             and t2.AAC161 = #{ dto.gj }
         </if>
         <if test="dto.zjlx != null and dto.zjlx != ''">
             and t2.aac058 = #{ dto.zjlx }
         </if>
+        <if test="dto.zjhm != null and dto.zjhm != ''">
+            and t2.aac147 = #{ dto.zjhm }
+        </if>
+        <if test="dto.xm != null and dto.xm != ''">
+            and t2.AAC003 like '%${ dto.xm }%'
+        </if>
+        <if test="dto.xl != null and dto.xl != ''">
+            and t1.xl = #{ dto.xl }
+        </if>
+        <if test="dto.csgzhy != null and dto.csgzhy != ''">
+            and t1.csgzhy like '%${ dto.csgzhy }%'
+        </if>
+        <if test="dto.gzgwxz != null and dto.gzgwxz != ''">
+            and t1.gzgwxz = #{ dto.gzgwxz }
+        </if>
+        <if test="dto.zcxl != null and dto.zcxl != ''">
+            and t1.zcxl = #{ dto.zcxl }
+        </if>
+        <if test="dto.zczymc != null and dto.zczymc != ''">
+            and t1.zczymc like '%${ dto.zczymc }%'
+        </if>
+        <if test="dto.dwxz != null and dto.dwxz != ''">
+            and t1.dwxz = #{ dto.dwxz }
+        </if>
+        <if test="dto.dwgx != null and dto.dwgx != ''">
+            and t1.dwgx = #{ dto.dwgx }
+        </if>
+        <if test="dto.rckhm != null and dto.rckhm != ''">
+            and t1.rckhm like '%${ dto.rckhm }%'
+        </if>
+        <if test="dto.rcklx != null and dto.rcklx != ''">
+            and t1.rcklx = #{ dto.rcklx }
+        </if>
+        <if test="dto.rckzt != null and dto.rckzt != ''">
+            and t1.rckzt = #{ dto.rckzt }
+        </if>
+        <if test="dto.qfzt != null and dto.qfzt != ''">
+            and t1.qfzt = #{ dto.qfzt }
+        </if>
+        <if test="dto.qfrqBegin != null and dto.qfrqBegin != ''">
+            and t1.qfsj &gt;= #{ dto.qfrqBegin }
+        </if>
+        <if test="dto.qfrqEnd != null and dto.qfrqEnd != ''">
+            and substr(t1.qfsj,0,10) &lt;= #{ dto.qfrqEnd }
+        </if>
+        <if test="dto.sqlx != null and dto.sqlx != ''">
+            and t1.sqlx = #{ dto.sqlx }
+        </if>
+        <if test="dto.bjrqBegin != null and dto.bjrqBegin != ''">
+            and substr(t1.bjrq,0,10) &gt;= #{ dto.bjrqBegin }
+        </if>
+        <if test="dto.bjrqEnd != null and dto.bjrqEnd != ''">
+            and substr(t1.bjrq,0,10) &lt;= #{ dto.bjrqEnd }
+        </if>
         ORDER BY t1.qfzt DESC,t1.rckhm DESC
     </select>
     <select id="getBglsList" parameterType="com.zjrs.zwnw.zj.dto.GccrcQueryByIdPageDTO" resultType="com.zjrs.zwnw.zj.po.GccrcLsPO">

+ 1 - 1
zjrs-service-backend/src/main/resources/application.yaml

@@ -59,7 +59,7 @@ spring:
   mybatis-plus:
     configuration:
       jdbc-type-for-null: 'null' # 保留 zwnw 的配置
-      # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 调试时开启
+      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 调试时开启
 
   jackson:
     default-property-inclusion: non_null

+ 31 - 0
zjrs-service-backend/zjrs-service-backend部署方式.txt

@@ -0,0 +1,31 @@
+# 从达梦开发分支获取代码
+git clone -b dm_dev http://39.98.153.250:9080/zjrs/new-zjrs-service-backend.git
+
+# 部署步骤
+# 1.将jar包与yaml配置文件上传
+
+# 2.编写dockerfile文件
+    FROM eclipse-temurin:17-jdk
+    # 创建工作目录
+    WORKDIR /app
+    # 复制JAR包和配置文件到容器内
+    COPY jar/zjrs-0.0.1-SNAPSHOT.jar /app.jar
+    # 设置上海时区
+    ENV TZ=Asia/Shanghai
+    # 暴露端口
+    EXPOSE 9008
+    # 运行JAR包,指定外部配置文件
+    ENTRYPOINT ["java", "-jar", "/app.jar", "--spring.config.location=/app/config/application.yaml"]
+
+# 3.暂停正在运行的
+docker stop zjrs-service-backend
+
+# 4.删除容器
+docker rm zjrs-service-backend
+docker rmi zjrs-service-backend
+
+# 5.重新构建镜像
+docker build --no-cache -t zjrs-service-backend .
+
+# 6.启动
+docker run -d --name zjrs-service-backend -p 9008:9008 -v /home/zjrs-service-backend/config:/app/config zjrs-service-backend