Преглед изворни кода

修改sql

Signed-off-by: tangsong <86121657@qq.com>
tangsong пре 1 година
родитељ
комит
8997fa2f3d

+ 1 - 1
intelligence-server/src/main/java/com/unis/intelligence/server/dao/CultivateSignDao.java

@@ -70,7 +70,7 @@ public interface CultivateSignDao {
70 70
 	/**
71 71
 	 * author zjl
72 72
 	 * 提交某一期的培训人员信息
73
-	 * @param dPxztQueryVO
73
+	 * @param cultivateTitleQueryVO
74 74
 	 */
75 75
 	int submitDPxqdryByQuery(CultivateTitleQueryVO cultivateTitleQueryVO);
76 76
 

+ 4 - 4
intelligence-server/src/main/resources/mybatis/mapper/CultivateSignMapper.xml

@@ -99,10 +99,10 @@
99 99
 			</if>
100 100
 			<!-- 审批开始时间 -->
101 101
 			<if test='pxkssj != null and pxkssj != ""'>
102
-				and to_char(zf.sqrq,'yyyy-MM-dd') &gt;= #{pxkssj,jdbcType=DATE}
102
+				and date_format(zf.sqrq,'%Y-%m-%d') &gt;= #{pxkssj,jdbcType=DATE}
103 103
 			</if>
104 104
 			<if test='pxjssj != null and pxjssj != ""'>
105
-				and to_char(zf.sqrq,'yyyy-MM-dd') &lt;= #{pxjssj,jdbcType=DATE}
105
+				and date_format(zf.sqrq,'%Y-%m-%d') &lt;= #{pxjssj,jdbcType=DATE}
106 106
 			</if>
107 107
 			and zf.status = 1
108 108
 		</where>
@@ -139,7 +139,7 @@
139 139
 
140 140
 <!--		获得实际到场人数  author zjl-->
141 141
 	<select id="getSjdcrs" parameterType="com.unis.intelligence.common.vo.CultivateTitleVO" resultType="INTEGER">
142
-				SELECT COUNT(*)
142
+				SELECT COUNT(1)
143 143
 				FROM D_PXQD qd
144 144
 				WHERE qd.pxqdzt = 'y'
145 145
 				AND  qd.orgid like '%${orgid}%'
@@ -156,7 +156,7 @@
156 156
 
157 157
 <!--	获得到场人数-->
158 158
 	<select id="getdcrs" parameterType="com.unis.intelligence.common.vo.CultivateTitleVO" resultType="INTEGER">
159
-				SELECT COUNT(*)
159
+				SELECT COUNT(1)
160 160
 				FROM D_PXQD qd
161 161
 				WHERE
162 162
 				qd.orgid like '%${orgid}%'

+ 6 - 6
intelligence-server/src/main/resources/mybatis/mapper/DKhryjl.xml

@@ -13,7 +13,7 @@
13 13
 
14 14
 	<!--	查询考核人数-->
15 15
 	<select id="getSumByKhbh" parameterType="String" resultType="Integer">
16
-		select count(*)
16
+		select COUNT(1)
17 17
 		from D_KHRYJL
18 18
 		where KHBH=#{khbh}
19 19
 	</select>
@@ -29,10 +29,10 @@
29 29
 							AND KHZT = '1'
30 30
 							AND STATUS = 1
31 31
 							<if test="startTime != null">
32
-								AND to_char(REFRESH_TIME,'yyyy-mm') &gt;= #{startTime,jdbcType=VARCHAR}
32
+								AND date_format(REFRESH_TIME,'%Y-%m') &gt;= #{startTime,jdbcType=VARCHAR}
33 33
 							</if>
34 34
 							<if test="endTime != null">
35
-								AND to_char(REFRESH_TIME,'yyyy-mm') &lt;= #{endTime,jdbcType=VARCHAR}
35
+								AND date_format(REFRESH_TIME,'%Y-%m') &lt;= #{endTime,jdbcType=VARCHAR}
36 36
 							</if>
37 37
 							)
38 38
 	</select>
@@ -146,14 +146,14 @@
146 146
 
147 147
 <!--	查询实际考核人数-->
148 148
 	<select id="getRealSumByKhbh" parameterType="String" resultType="Integer">
149
-		select count(*)
149
+		select count(1)
150 150
 		from D_KHRYJL
151 151
 		where KHBH=#{khbh} and SFCJKH='y'
152 152
 	</select>
153 153
 
154 154
 <!--	查询合格人数-->
155 155
 	<select id="getHgSumByKhbh" parameterType="String" resultType="Integer">
156
-		select count(*)
156
+		select COUNT(1)
157 157
 		from D_KHRYJL
158 158
 		where KHBH=#{khbh} and KHSFHG='y'
159 159
 	</select>
@@ -188,7 +188,7 @@
188 188
 
189 189
 
190 190
 	<select id="isExist" parameterType="String" resultType="Integer">
191
-		SELECT COUNT(*)
191
+		SELECT COUNT(1)
192 192
 		FROM D_KHRYJL
193 193
 		WHERE zfryzibh = #{zzsqbh}
194 194
 	</select>

+ 2 - 2
intelligence-server/src/main/resources/mybatis/mapper/DPxztMapper.xml

@@ -52,10 +52,10 @@
52 52
 	      	</if>
53 53
 			<!-- 培训开始时间 -->
54 54
 			<if test='pxkssj != null and pxkssj != ""'>
55
-				and to_char(zf.PXSJ,'yyyy-MM-dd') &gt;= #{pxkssj}
55
+				and date_format(zf.PXSJ,'%Y-%m-%d') &gt;= #{pxkssj}
56 56
 			</if>
57 57
 			<if test='pxjssj != null and pxjssj != ""'>
58
-				and to_char(zf.PXSJ,'yyyy-MM-dd') &lt;= #{pxjssj}
58
+				and date_format(zf.PXSJ,'%Y-%m-%d') &lt;= #{pxjssj}
59 59
 			</if>
60 60
 			and zf.status = 1
61 61
 			and zf.orgid like '%${orgid}%'

+ 1 - 1
intelligence-server/src/main/resources/mybatis/mapper/DSjxxMapper.xml

@@ -33,7 +33,7 @@
33 33
 
34 34
 <!--  判断试卷名称是否重复-->
35 35
   <select id="isExistSjmc" parameterType="String" resultType="int">
36
-    SELECT COUNT(*) FROM D_SJXX WHERE sjmc = #{sjmc}
36
+    SELECT COUNT(1) FROM D_SJXX WHERE sjmc = #{sjmc}
37 37
   </select>
38 38
 
39 39
 <!--  根据试卷编号激活/禁用试卷-->

+ 1 - 1
intelligence-server/src/main/resources/mybatis/mapper/DZfrckMapper.xml

@@ -254,7 +254,7 @@
254 254
 
255 255
 
256 256
 	<select id="getTotal" resultType="Integer">
257
-		SELECT COUNT(*) FROM D_ZFRCK
257
+		SELECT COUNT(1) FROM D_ZFRCK
258 258
 	</select>
259 259
 
260 260
 <!--  修改人员状态-->

+ 1 - 1
intelligence-server/src/main/resources/mybatis/mapper/DZfryzs.xml

@@ -72,7 +72,7 @@
72 72
 
73 73
 <!--	判断rybh是否重复-->
74 74
 	<select id="isExist" parameterType="String" resultType="Integer">
75
-		SELECT COUNT(*)
75
+		SELECT COUNT(1)
76 76
 		FROM D_ZFRYZS
77 77
 		WHERE rybh = #{rybh}
78 78
 	</select>