ZeroLiYi 1 gadu atpakaļ
vecāks
revīzija
9c0a675aa7

+ 2 - 2
base-server/src/main/resources/mybatis/mapper/CcsbtzjsmxMapper.xml

@@ -1,5 +1,5 @@
1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http.//mybatis.org/dtd/mybatis-3-mapper.dtd">
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace='com.unis.base.server.dao.CcsbtzjsmxDao'>
3
 <mapper namespace='com.unis.base.server.dao.CcsbtzjsmxDao'>
4
 
4
 
5
 
5
 
@@ -20,7 +20,7 @@
20
                 and kddm = #{sskddm}
20
                 and kddm = #{sskddm}
21
             </if>
21
             </if>
22
             <if test="sbnf != null and sbnf != ''">
22
             <if test="sbnf != null and sbnf != ''">
23
-                and to_char(rkrq,'yyyy') = #{sbnf}
23
+                and date_format(rkrq,'%Y') = #{sbnf}
24
             </if>
24
             </if>
25
             <if test="sskdmc != null and sskdmc != ''">
25
             <if test="sskdmc != null and sskdmc != ''">
26
                 and szdwmc = #{sskdmc}
26
                 and szdwmc = #{sskdmc}

+ 2 - 1
base-server/src/main/resources/mybatis/mapper/CompanyRecordsMapper.xml

@@ -148,7 +148,8 @@
148
       </if>
148
       </if>
149
       <!-- 备案时间(年度) -->
149
       <!-- 备案时间(年度) -->
150
       <if test="year != null and year != ''">
150
       <if test="year != null and year != ''">
151
-        and to_char(tz.CREATE_DATE,'yyyy') &gt;= #{year}
151
+        and DATE_FORMAT(tz.CREATE_DATE, '%Y') >= #{year}
152
+
152
       </if>
153
       </if>
153
       <!-- 是否备案 -->
154
       <!-- 是否备案 -->
154
       <if test='sfba != null'>
155
       <if test='sfba != null'>

+ 11 - 11
base-server/src/main/resources/mybatis/mapper/DCfxxsjyMapper.xml

@@ -272,7 +272,7 @@
272
 				and cf.SFBA = #{sfba,jdbcType=DECIMAL}
272
 				and cf.SFBA = #{sfba,jdbcType=DECIMAL}
273
 			</if>
273
 			</if>
274
 			<if test='jssj !=null'>
274
 			<if test='jssj !=null'>
275
-				and to_char(cf.jssj,'yyyy-MM-dd')=#{cxsj}
275
+				and DATE_FORMAT(cf.jssj,'%Y-%m-%d')=#{cxsj}
276
 			</if>
276
 			</if>
277
 			<if test='tyshxydm !=null'>
277
 			<if test='tyshxydm !=null'>
278
 				and cf.tyshxydm=#{tyshxydm}
278
 				and cf.tyshxydm=#{tyshxydm}
@@ -344,7 +344,7 @@
344
                     and cf.SFBA = #{sfba,jdbcType=DECIMAL}
344
                     and cf.SFBA = #{sfba,jdbcType=DECIMAL}
345
                 </if>
345
                 </if>
346
                 <if test='jssj !=null'>
346
                 <if test='jssj !=null'>
347
-                    and to_char(cf.jssj,'yyyy-MM-dd')=#{cxsj}
347
+                    and DATE_FORMAT(cf.jssj,'%Y-%m-%d')=#{cxsj}
348
                 </if>
348
                 </if>
349
                 <if test='tyshxydm !=null'>
349
                 <if test='tyshxydm !=null'>
350
                     and cf.tyshxydm=#{tyshxydm}
350
                     and cf.tyshxydm=#{tyshxydm}
@@ -410,7 +410,7 @@
410
                 and cf.SFBA = #{sfba,jdbcType=DECIMAL}
410
                 and cf.SFBA = #{sfba,jdbcType=DECIMAL}
411
             </if>
411
             </if>
412
             <if test='jssj !=null'>
412
             <if test='jssj !=null'>
413
-                and to_char(cf.jssj,'yyyy-MM-dd')=#{cxsj}
413
+                and DATE_FORMAT(cf.jssj,'%Y-%m-%d')=#{cxsj}
414
             </if>
414
             </if>
415
             <if test='tyshxydm !=null'>
415
             <if test='tyshxydm !=null'>
416
                 and cf.tyshxydm=#{tyshxydm}
416
                 and cf.tyshxydm=#{tyshxydm}
@@ -510,7 +510,7 @@
510
 
510
 
511
 			<if test='jssj !=null'>
511
 			<if test='jssj !=null'>
512
 
512
 
513
-			    and to_char(cf.jssj,'yyyy-MM-dd')=#{cxsj}
513
+			    and DATE_FORMAT(cf.jssj,'%Y-%m-%d')=#{cxsj}
514
 
514
 
515
 			</if>
515
 			</if>
516
 
516
 
@@ -653,8 +653,8 @@
653
             </if>
653
             </if>
654
 
654
 
655
             <if test='jssj != null'>
655
             <if test='jssj != null'>
656
-                and to_char(cf.jssj
657
-                  , 'yyyy-MM-dd')=#{cxsj}
656
+                and DATE_FORMAT(cf.jssj
657
+                  , '%Y-%m-%d')=#{cxsj}
658
             </if>
658
             </if>
659
 
659
 
660
             <if test='tyshxydm != null'>
660
             <if test='tyshxydm != null'>
@@ -2117,10 +2117,10 @@
2117
 				and	cf.sjcr &lt; #{sjcrEnd}
2117
 				and	cf.sjcr &lt; #{sjcrEnd}
2118
 			</if>
2118
 			</if>
2119
 			<if test="startJssj != null">
2119
 			<if test="startJssj != null">
2120
-				and	to_char(cf.jssj,'yyyy-MM-dd HH:mm:ss') &gt; #{startJssj}
2120
+				and	DATE_FORMAT(cf.jssj,'%Y-%m-%d %H:%i:%s') &gt; #{startJssj}
2121
 			</if>
2121
 			</if>
2122
 			<if test="endJssj != null">
2122
 			<if test="endJssj != null">
2123
-				and	to_char(cf.jssj,'yyyy-MM-dd HH:mm:ss') &lt; #{endJssj}
2123
+				and	DATE_FORMAT(cf.jssj,'%Y-%m-%d %H:%i:%s') &lt; #{endJssj}
2124
 			</if>
2124
 			</if>
2125
 
2125
 
2126
 			<if test="ajxh != null and ajxh != ''" >
2126
 			<if test="ajxh != null and ajxh != ''" >
@@ -2138,7 +2138,7 @@
2138
 
2138
 
2139
 			<if test='jssj !=null'>
2139
 			<if test='jssj !=null'>
2140
 
2140
 
2141
-				and to_char(cf.jssj,'yyyy-MM-dd')=#{cxsj}
2141
+				and DATE_FORMAT(cf.jssj,'%Y-%m-%d')=#{cxsj}
2142
 
2142
 
2143
 			</if>
2143
 			</if>
2144
 
2144
 
@@ -2349,8 +2349,8 @@
2349
 			   cf.sjcr,
2349
 			   cf.sjcr,
2350
 			   cf.dczlrj,
2350
 			   cf.dczlrj,
2351
 			   e2.dict_name as cfyt,
2351
 			   e2.dict_name as cfyt,
2352
-			   (nvl(t1.cl_cr, 0) + nvl(t2.xz_cr, 0)) clzcr,
2353
-				nvl(t2.xz_cr, 0) clkcr,
2352
+		(IFNULL(t1.cl_cr, 0) + IFNULL(t2.xz_cr, 0)) AS clzcr,
2353
+		IFNULL(t2.xz_cr, 0) AS clkcr,
2354
 				status
2354
 				status
2355
 		from (
2355
 		from (
2356
 				select distinct gfcfmc,
2356
 				select distinct gfcfmc,

+ 1 - 1
base-server/src/main/resources/mybatis/mapper/DYgxxsjyMapper.xml

@@ -609,7 +609,7 @@
609
 	<select id="getOiltankPages" resultType="com.unis.base.common.vo.OiltankVO">
609
 	<select id="getOiltankPages" resultType="com.unis.base.common.vo.OiltankVO">
610
 		select qy.*,tz.tyshxydm,tz.qyxz from (select yg.kddm,yg.kdmc from D_YGXXSJY yg group by yg.kddm,yg.kdmc) qy,tz_slqy tz
610
 		select qy.*,tz.tyshxydm,tz.qyxz from (select yg.kddm,yg.kdmc from D_YGXXSJY yg group by yg.kddm,yg.kdmc) qy,tz_slqy tz
611
 		<where>
611
 		<where>
612
-			tz.zzjgdm||'001' = qy.kddm
612
+			CONCAT(tz.zzjgdm, '001') = qy.kddm
613
 			<!-- 库点名称 -->
613
 			<!-- 库点名称 -->
614
 			<if test="kdmc != null and kdmc != ''" >
614
 			<if test="kdmc != null and kdmc != ''" >
615
 				and	qy.kdmc LIKE concat(CONCAT('%',#{kdmc,jdbcType=VARCHAR}) ,'%')
615
 				and	qy.kdmc LIKE concat(CONCAT('%',#{kdmc,jdbcType=VARCHAR}) ,'%')

+ 2 - 2
base-server/src/main/resources/mybatis/mapper/DqyxxckMapper.xml

@@ -16,7 +16,7 @@
16
 
16
 
17
     <sql id="whereIf">
17
     <sql id="whereIf">
18
    		<if test="qymc != null and qymc != ''">
18
    		<if test="qymc != null and qymc != ''">
19
-			and qy.qymc like '%' || #{qymc,jdbcType=VARCHAR} || '%'
19
+			and qy.qymc like '%${qymc,jdbcType=VARCHAR}%'
20
 		</if>
20
 		</if>
21
 		<if test="sslsxzglbm != null and sslsxzglbm != ''">
21
 		<if test="sslsxzglbm != null and sslsxzglbm != ''">
22
 			and qy.sslsxzglbm = #{sslsxzglbm}
22
 			and qy.sslsxzglbm = #{sslsxzglbm}
@@ -54,7 +54,7 @@
54
                 where t2.status = 1 and if(t2.gfcfdm, null,-1, 1) = 1
54
                 where t2.status = 1 and if(t2.gfcfdm, null,-1, 1) = 1
55
                 and t2.cfzt = 1 and t2.cfyt in (0, 1)
55
                 and t2.cfzt = 1 and t2.cfyt in (0, 1)
56
         <if test="qymc != null and qymc != ''">
56
         <if test="qymc != null and qymc != ''">
57
-            and qy.qymc like '%' || #{qymc,jdbcType=VARCHAR} || '%'
57
+            and qy.qymc like '%${qymc,jdbcType=VARCHAR}%'
58
         </if>
58
         </if>
59
                 group by t2.tyshxydm, t2.gfcfdm, t2.sjcr
59
                 group by t2.tyshxydm, t2.gfcfdm, t2.sjcr
60
             ) t1
60
             ) t1

+ 1 - 1
base-server/src/main/resources/mybatis/mapper/QyxypjMapper.xml

@@ -6,7 +6,7 @@
6
         select * from qyxypjdc
6
         select * from qyxypjdc
7
         <where>
7
         <where>
8
             <if test="ztmc != null and ztmc != ''">
8
             <if test="ztmc != null and ztmc != ''">
9
-                and ztmc like '%'||#{ztmc}||'%'
9
+                and ztmc like '%${ztmc}%'
10
             </if>
10
             </if>
11
             <if test="pjnd != null and pjnd != ''">
11
             <if test="pjnd != null and pjnd != ''">
12
                 and pjnd = #{pjnd}
12
                 and pjnd = #{pjnd}