ZeroLiYi 1 vuosi sitten
vanhempi
commit
9c0a675aa7

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

@@ -1,5 +1,5 @@
1 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 3
 <mapper namespace='com.unis.base.server.dao.CcsbtzjsmxDao'>
4 4
 
5 5
 
@@ -20,7 +20,7 @@
20 20
                 and kddm = #{sskddm}
21 21
             </if>
22 22
             <if test="sbnf != null and sbnf != ''">
23
-                and to_char(rkrq,'yyyy') = #{sbnf}
23
+                and date_format(rkrq,'%Y') = #{sbnf}
24 24
             </if>
25 25
             <if test="sskdmc != null and sskdmc != ''">
26 26
                 and szdwmc = #{sskdmc}

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

@@ -148,7 +148,8 @@
148 148
       </if>
149 149
       <!-- 备案时间(年度) -->
150 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 153
       </if>
153 154
       <!-- 是否备案 -->
154 155
       <if test='sfba != null'>

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

@@ -272,7 +272,7 @@
272 272
 				and cf.SFBA = #{sfba,jdbcType=DECIMAL}
273 273
 			</if>
274 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 276
 			</if>
277 277
 			<if test='tyshxydm !=null'>
278 278
 				and cf.tyshxydm=#{tyshxydm}
@@ -344,7 +344,7 @@
344 344
                     and cf.SFBA = #{sfba,jdbcType=DECIMAL}
345 345
                 </if>
346 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 348
                 </if>
349 349
                 <if test='tyshxydm !=null'>
350 350
                     and cf.tyshxydm=#{tyshxydm}
@@ -410,7 +410,7 @@
410 410
                 and cf.SFBA = #{sfba,jdbcType=DECIMAL}
411 411
             </if>
412 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 414
             </if>
415 415
             <if test='tyshxydm !=null'>
416 416
                 and cf.tyshxydm=#{tyshxydm}
@@ -510,7 +510,7 @@
510 510
 
511 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 515
 			</if>
516 516
 
@@ -653,8 +653,8 @@
653 653
             </if>
654 654
 
655 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 658
             </if>
659 659
 
660 660
             <if test='tyshxydm != null'>
@@ -2117,10 +2117,10 @@
2117 2117
 				and	cf.sjcr &lt; #{sjcrEnd}
2118 2118
 			</if>
2119 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 2121
 			</if>
2122 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 2124
 			</if>
2125 2125
 
2126 2126
 			<if test="ajxh != null and ajxh != ''" >
@@ -2138,7 +2138,7 @@
2138 2138
 
2139 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 2143
 			</if>
2144 2144
 
@@ -2349,8 +2349,8 @@
2349 2349
 			   cf.sjcr,
2350 2350
 			   cf.dczlrj,
2351 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 2354
 				status
2355 2355
 		from (
2356 2356
 				select distinct gfcfmc,

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

@@ -609,7 +609,7 @@
609 609
 	<select id="getOiltankPages" resultType="com.unis.base.common.vo.OiltankVO">
610 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 611
 		<where>
612
-			tz.zzjgdm||'001' = qy.kddm
612
+			CONCAT(tz.zzjgdm, '001') = qy.kddm
613 613
 			<!-- 库点名称 -->
614 614
 			<if test="kdmc != null and kdmc != ''" >
615 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 17
     <sql id="whereIf">
18 18
    		<if test="qymc != null and qymc != ''">
19
-			and qy.qymc like '%' || #{qymc,jdbcType=VARCHAR} || '%'
19
+			and qy.qymc like '%${qymc,jdbcType=VARCHAR}%'
20 20
 		</if>
21 21
 		<if test="sslsxzglbm != null and sslsxzglbm != ''">
22 22
 			and qy.sslsxzglbm = #{sslsxzglbm}
@@ -54,7 +54,7 @@
54 54
                 where t2.status = 1 and if(t2.gfcfdm, null,-1, 1) = 1
55 55
                 and t2.cfzt = 1 and t2.cfyt in (0, 1)
56 56
         <if test="qymc != null and qymc != ''">
57
-            and qy.qymc like '%' || #{qymc,jdbcType=VARCHAR} || '%'
57
+            and qy.qymc like '%${qymc,jdbcType=VARCHAR}%'
58 58
         </if>
59 59
                 group by t2.tyshxydm, t2.gfcfdm, t2.sjcr
60 60
             ) t1

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

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