소스 검색

fix: 文件上传修改

zhangying 1 개월 전
부모
커밋
db414fb39b
2개의 변경된 파일45개의 추가작업 그리고 37개의 파일을 삭제
  1. 3 0
      src/main/java/com/ghsc/partybuild/model/DsjFilemrg.java
  2. 42 37
      src/main/resources/mapping/PublicityCQuery.xml

+ 3 - 0
src/main/java/com/ghsc/partybuild/model/DsjFilemrg.java

@@ -1,7 +1,10 @@
 package com.ghsc.partybuild.model;
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
 import java.util.Date;
 
+@JsonIgnoreProperties(ignoreUnknown = true)
 public class DsjFilemrg {
     private String fileid;
 

+ 42 - 37
src/main/resources/mapping/PublicityCQuery.xml

@@ -79,16 +79,20 @@
         from PUB_PUBLICITYPOSITION p
         inner join ZZ_ZZQKXX z on p.partycode=z.dzzdm
         inner join (select pn.*, (case
-        when pn.EXPIREDTIME is not null and pn.PANELCYCLE <![CDATA[ <> ]]> 1 and to_number(date_format(sysdate,'yyyymmdd'))
+        when pn.EXPIREDTIME is not null and pn.PANELCYCLE <![CDATA[ <> ]]> 1 and to_number(TO_CHAR(sysdate,'YYYYMMDD'))
         > pn.EXPIREDTIME then 1
         else 0 end) as ISEXPIRED from (
-        select pn.*,to_number(concat(date_format(add_months(trunc(PANELTIME,'%m'),
-        case PANELCYCLE
-        when 2 then 1
-        when 3 then 3
-        when 4 then 6
-        when 5 then 12
-        else 0 end),'yyyymm'),date_format(PANELTIME,'%d'))) as EXPIREDTIME from PUB_PUBLICITYPOSITION_PANEL pn
+        select pn.*,to_number(concat(to_char(add_months(trunc(PANELTIME, 'mm'), 1), 'YYYYMM'), '01')),
+        TO_CHAR(ADD_MONTHS(PANELTIME,
+            CASE PANELCYCLE
+                WHEN 2 THEN 1
+                WHEN 3 THEN 3
+                WHEN 4 THEN 6
+                WHEN 5 THEN 12
+                ELSE 0
+            END
+        ),'yyyymm' || TO_CHAR(PANELTIME, 'dd')) AS EXPIREDTIME
+        from PUB_PUBLICITYPOSITION_PANEL pn
         ) pn
         ) panel on p.publicityPositionId = panel.publicityPositionId
         where 1 = 1
@@ -108,10 +112,10 @@
             and p.address like concat('%',#{address},'%')
         </if>
         <if test="beginTime != null and beginTime != '' ">
-            and p.buildTime <![CDATA[ >= ]]> date_format(#{beginTime},'%Y%m%d')
+            and p.buildTime <![CDATA[ >= ]]> TO_CHAR(#{beginTime},'YYYYMMDD')
         </if>
         <if test="endTime != null and endTime != '' ">
-            and p.buildTime <![CDATA[ < ]]> date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
+            and p.buildTime <![CDATA[ < ]]> date_add(TO_CHAR(#{endTime},'YYYYMMDD'),interval 1 day)
         </if>
         <if test="positionState != null">
             and p.positionState = #{positionState}
@@ -129,10 +133,10 @@
             and SUBSTR(p.partyCode,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
         </if>
         <if test="updateTime_bt != null and updateTime_bt != '' ">
-            and panel.PANELTIME <![CDATA[ >= ]]> date_format(#{updateTime_bt},'%Y%m%d')
+            and panel.PANELTIME <![CDATA[ >= ]]> TO_CHAR(#{updateTime_bt},'YYYYMMDD')
         </if>
         <if test="updateTime_et != null and updateTime_et != '' ">
-            and panel.PANELTIME <![CDATA[ < ]]> date_add(date_format(#{updateTime_et},'%Y%m%d'),interval 1 day)
+            and panel.PANELTIME <![CDATA[ < ]]> date_add(TO_CHAR(#{updateTime_et},'YYYYMMDD'),interval 1 day)
         </if>
         order by panel.PANELTIME desc nulls last
     </select>
@@ -177,10 +181,10 @@
             and u.userName like concat('%',#{userName},'%')
         </if>
         <if test="beginTime != null and beginTime != '' ">
-            and u.findTime <![CDATA[ >= ]]> date_format(#{beginTime},'%Y%m%d')
+            and u.findTime <![CDATA[ >= ]]> TO_CHAR(#{beginTime},'YYYYMMDD')
         </if>
         <if test="endTime != null and endTime != '' ">
-            and u.findTime <![CDATA[ < ]]> date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
+            and u.findTime <![CDATA[ < ]]> date_add(TO_CHAR(#{endTime},'YYYYMMDD'),interval 1 day)
         </if>
         <if test="handleType != null">
             and u.handleType = #{handleType}
@@ -199,7 +203,7 @@
 
     <!--统计职工思想动态-->
     <select id="selectThoughtTotal" resultType="java.util.HashMap">
-        select date_format(u.FINDTIME,'yyyy') as year,date_format(u.FINDTIME,'%m') as month,
+        select TO_CHAR(u.FINDTIME, 'yyyy') AS year,TO_CHAR(u.FINDTIME, 'mm') AS month,
         sum(case when u.QUESTIONTYPE=1 then 1 else 0 end) as NUM_THOUGHTTYPE1,
         sum(case when u.QUESTIONTYPE=2 then 1 else 0 end) as NUM_THOUGHTTYPE2,
         sum(case when u.QUESTIONTYPE=3 then 1 else 0 end) as NUM_THOUGHTTYPE3,
@@ -214,12 +218,12 @@
             and u.partyCode like concat('%',#{partyCode},'%')
         </if>
         <if test="year!=null">
-            and date_format(u.FINDTIME,'%Y')= #{year}
+            and TO_CHAR(u.FINDTIME,'yyyy')= #{year}
         </if>
         <if test="month!=null">
-            and date_format(u.FINDTIME,'%m')= #{month}
+            and TO_CHAR(u.FINDTIME,'mm')= #{month}
         </if>
-        group by date_format(u.FINDTIME,'%Y'),date_format(u.FINDTIME,'%m')
+        group by TO_CHAR(u.FINDTIME,'yyyy'),TO_CHAR(u.FINDTIME,'mm')
     </select>
 
     <!--职工思想动态分析-->
@@ -322,10 +326,10 @@
             and u.leaderType = #{leaderType}
         </if>
         <if test="beginTime != null and beginTime != '' ">
-            and u.leaderTime <![CDATA[ >= ]]> date_format(#{beginTime},'%Y%m%d')
+            and u.leaderTime <![CDATA[ >= ]]> TO_CHAR(#{beginTime},'YYYYMMDD')
         </if>
         <if test="endTime != null and endTime != '' ">
-            and u.leaderTime <![CDATA[ < ]]> date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
+            and u.leaderTime <![CDATA[ < ]]> date_add(TO_CHAR(#{endTime},'YYYYMMDD'),interval 1 day)
         </if>
         <if test="zzfbType != null">
             and SUBSTR(u.partyCode,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
@@ -362,10 +366,10 @@
         inner join ZZ_ZZQKXX p on SUBSTR(us.SZDZBDM,1,#{partyLength})=p.dzzdm
         left join US_USERLEADER l on us.RYBM=l.USERCODE
         <if test="beginTime != null and beginTime != '' ">
-            and l.leaderTime <![CDATA[ >= ]]> date_format(#{beginTime},'%Y%m%d')
+            and l.leaderTime <![CDATA[ >= ]]> TO_CHAR(#{beginTime},'YYYYMMDD')
         </if>
         <if test="endTime != null and endTime != '' ">
-            and l.leaderTime <![CDATA[ < ]]> date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
+            and l.leaderTime <![CDATA[ < ]]> date_add(TO_CHAR(#{endTime},'YYYYMMDD'),interval 1 day)
         </if>
         left join vw_partyduty uszw on us.RYBM=uszw.rybm -- 党内职务名称
         where 1=1
@@ -517,7 +521,7 @@
               , ifnull(us.endYearMonth,999999) as endYearMonth
               from (select dic.DICKEY as MONTH from cf_dictionary dic where dic.DICTYPEKEY='monthType') m,(
                           select us.rybm,us.xm,ifnull(fb.partyDuesStartMonth,(cast(substr(dj.JRZGZZRQ, 1, 6) as signed))) startYearMonth,
-                          cast(substr(DATE_FORMAT(fb.archiveDate, '%Y%m%d'), 1, 6) as signed)  as endYearMonth
+                          cast(substr(TO_CHAR(fb.archiveDate, 'YYYYMMDD'), 1, 6) as signed)  as endYearMonth
                           from  vm_ryjbxx_all us
                           inner join rs_ryjbxxfb fb on us.rybm = fb.rybm
                           inner join ZZ_DJXX dj on us.rybm = dj.rybm
@@ -577,10 +581,10 @@
             and q.partyCode like concat('%',#{partyCode},'%')
         </if>
         <if test="beginTime != null and beginTime != '' ">
-            and q.USETIME <![CDATA[ >= ]]> date_format(#{beginTime},'%Y%m%d')
+            and q.USETIME <![CDATA[ >= ]]> TO_CHAR(#{beginTime},'YYYYMMDD')
         </if>
         <if test="endTime != null and endTime != '' ">
-            and q.USETIME <![CDATA[ < ]]> date_add(date_format(#{endTime},'%Y%m%d'),interval 1 day)
+            and q.USETIME <![CDATA[ < ]]> date_add(TO_CHAR(#{endTime},'YYYYMMDD'),interval 1 day)
         </if>
         <if test="zzfbType != null">
             and SUBSTR(q.partyCode,1,12) in(select dzzdm from ZZ_DZZFBQK where zzfb= #{zzfbType})
@@ -711,7 +715,7 @@
         select p.PARTYCODE as DZZDM,
         p.POSITIONTYPE,
         sum(case
-        when date_format(panel.PANELTIME, '%Y') = date_format(sysdate(), '%Y') then 1
+        when TO_CHAR(panel.PANELTIME, 'YYYY') = TO_CHAR(sysdate(), 'YYYY') then 1
         else 0 end) as NUM_UPDATE,
         sum(case when panel.PANELID is null then 1 else 0 end) as NUM_NOT_UPDATE,
         sum(case when panel.PANELSTATE = 0 then 1 else 0 end) as NUM_NOT_APPROVE
@@ -733,19 +737,20 @@
         left join (select pn.*,
         (case
         when pn.EXPIREDTIME is not null and pn.PANELCYCLE != 1 and
-        cast(date_format(sysdate(), '%Y%m%d') as SIGNED INTEGER)
+        cast(TO_CHAR(sysdate(), 'YYYYMMDD') as SIGNED INTEGER)
         > pn.EXPIREDTIME then 1
         else 0 end) as ISEXPIRED
         from (
         select pn.*,
-        cast(concat(date_format(DATE_ADD(PANELTIME,
-        INTERVAL (case PANELCYCLE
-        when 2 then 1
-        when 3 then 3
-        when 4 then 6
-        when 5 then 12
-        else 0 end) day),'%Y%m%d'),
-        date_format(PANELTIME, '%d')) as SIGNED INTEGER) as EXPIREDTIME
+        CAST(TO_CHAR(ADD_DAYS(PANELTIME,
+            CASE PANELCYCLE
+                WHEN 2 THEN 1
+                WHEN 3 THEN 3
+                WHEN 4 THEN 6
+                WHEN 5 THEN 12
+                ELSE 0
+            END),
+        'yyyymmdd') || TO_CHAR(PANELTIME, 'dd') AS INTEGER) AS EXPIREDTIME
         from PUB_PUBLICITYPOSITION_PANEL pn
         ) pn
         ) panel on p.publicityPositionId = panel.publicityPositionId
@@ -862,10 +867,10 @@
             and pay.payState = #{payState}
         </if>
         <if test="startDate!=null">
-            and pay.payTime <![CDATA[ >= ]]> date_format(#{startDate},"%Y%m%d")
+            and pay.payTime <![CDATA[ >= ]]> TO_CHAR(#{startDate},"YYYYMMDD")
         </if>
         <if test="endDate!=null">
-            and pay.payTime <![CDATA[ < ]]> date_add(date_format(#{endDate},'%Y%m%d'),interval 1 day)
+            and pay.payTime <![CDATA[ < ]]> date_add(TO_CHAR(#{endDate},'YYYYMMDD'),interval 1 day)
         </if>
         <if test="year!=null">
             and pdd.year = #{year}