ZeroLiYi 1 год назад
Родитель
Сommit
dae62a2f52

+ 2 - 2
inspectionplan-server/src/main/resources/mybatis/mapper/BaseInfoMapper.xml

@@ -73,7 +73,7 @@
73 73
 	sum(t.gjzrs + t.sjzrs) as qzhdlshwzcbz,
74 74
 	count(t.zfdcjgqk) as lsjfdlshwzcbbm,
75 75
 	sum(ndjfje) as ndlsjfje
76
-	from usercenter:sys_orgainze o
76
+	from usercenter.sys_orgainze o
77 77
 	left join jdjcjh.t_jcxx t on t.orgid = o.org_code and t.nd = #{nd}
78 78
 	where o.org_code = #{orgid,jdbcType=VARCHAR}
79 79
 	and o.state_code=1
@@ -112,7 +112,7 @@ group by o.org_code,o.org_name
112 112
 
113 113
 
114 114
   <select id="getList" resultMap="BaseResultMap">
115
-  	select * from jdjcjh:t_jcxx
115
+  	select * from jdjcjh.t_jcxx
116 116
 	where nd =  extend((current - 1 units month),year to month )
117 117
   </select>
118 118
 

+ 1 - 1
inspectionplan-server/src/main/resources/mybatis/mapper/TJcdwMapper.xml

@@ -350,7 +350,7 @@
350 350
   
351 351
   
352 352
   <select id="selectRwIdyJhId" parameterType="java.lang.String" resultType="java.lang.String" >
353
-  	SELECT FIRST 1 RW_ID FROM jdjcrw:T_JCRW WHERE STATUS=1 AND JH_ID = #{jhId,jdbcType=VARCHAR} order by RW_ID
353
+  	SELECT  RW_ID FROM jdjcrw.T_JCRW WHERE STATUS=1 AND JH_ID = #{jhId,jdbcType=VARCHAR} order by RW_ID limit 1
354 354
   </select>
355 355
   
356 356
 </mapper>

+ 6 - 6
inspectionplan-server/src/main/resources/mybatis/mapper/TJcjhMapper.xml

@@ -506,10 +506,10 @@
506 506
 	      </if>
507 507
 
508 508
 	      <if test="rwqsr != null and rwqsr != ''" >
509
-				and to_char(jc.rwqsr,'yyyy-MM-dd') &gt;= #{rwqsr}
509
+				and DATE_FORMAT(jc.rwqsr,'%Y-%m-%d') &gt;= #{rwqsr}
510 510
 	      </if>
511 511
 	      <if test="rwjsr != null and rwjsr != ''" >
512
-				and to_char(jc.rwjsr,'yyyy-MM-dd') &lt;= #{rwjsr}
512
+				and DATE_FORMAT(jc.rwjsr,'%Y-%m-%d') &lt;= #{rwjsr}
513 513
 	      </if>
514 514
 	      <!--<if test="orgId != null and orgId != ''" >
515 515
 				and jc.org_id LIKE concat(CONCAT('%',#{orgId,jdbcType=VARCHAR}) ,'%')
@@ -524,7 +524,7 @@
524 524
 			    </foreach>
525 525
 			</if>
526 526
           and(
527
-             jc.org_id like '%' || #{orgId,jdbcType=VARCHAR} || '%'
527
+             jc.org_id like '%${orgId,jdbcType=VARCHAR}%'
528 528
 			<if test="jhIds != null and jhIds != ''">
529 529
 			   or jc.jh_id in
530 530
 			   <foreach collection="jhIds" item="item" index="index" open="(" separator="," close= ")" >
@@ -588,10 +588,10 @@
588 588
 	      </if>
589 589
 
590 590
 	      <if test="rwqsr != null and rwqsr != ''" >
591
-				and to_char(jc.rwqsr,'yyyy-MM-dd') &gt;= #{rwqsr}
591
+				and DATE_FORMAT(jc.rwqsr,'%Y-%m-%d') &gt;= #{rwqsr}
592 592
 	      </if>
593 593
 	      <if test="rwjsr != null and rwjsr != ''" >
594
-				and to_char(jc.rwjsr,'yyyy-MM-dd') &lt;= #{rwjsr}
594
+				and DATE_FORMAT(jc.rwjsr,'%Y-%m-%d') &lt;= #{rwjsr}
595 595
 	      </if>
596 596
 	      <if test="orgId != null and orgId != ''" >
597 597
 				<!--and jc.org_id LIKE concat#(CONCAT('%',#{orgId,jdbcType=VARCHAR}) ,'%')-->
@@ -679,7 +679,7 @@
679 679
 	</select>
680 680
 
681 681
 	<delete id="backlog" parameterType="java.lang.String">
682
-		delete from db_utf8:ty_backlog
682
+		delete from db_utf8.ty_backlog
683 683
 		where item_id like concat(CONCAT('%',#{id,jdbcType=VARCHAR}) ,'%')
684 684
 	</delete>
685 685
 </mapper>

+ 11 - 10
inspectionplan-server/src/main/resources/mybatis/mapper/YearPlanMapper.xml

@@ -23,9 +23,9 @@
23 23
   
24 24
   
25 25
   <select id="getJgList" resultType="java.lang.String" parameterType="java.lang.String" >
26
-    select jg_tbbh from jdjcjgsb:t_jcjg
26
+    select jg_tbbh from jdjcjgsb.t_jcjg
27 27
 	where jhid in (
28
-		select jh_id from jdjcjh:t_jcjh 
28
+		select jh_id from jdjcjh.t_jcjh
29 29
 		where planid = #{id,jdbcType=VARCHAR}
30 30
 	)  
31 31
 	
@@ -33,25 +33,25 @@
33 33
   
34 34
   
35 35
   <update id="updateJg" parameterType="java.lang.String">
36
-  	update jdjcjgsb:t_jcjg
36
+  	update jdjcjgsb.t_jcjg
37 37
   	set status = '0'
38 38
   	where jhid in (
39
-		select jh_id from jdjcjh:t_jcjh 
39
+		select jh_id from jdjcjh.t_jcjh
40 40
 		where planid = #{id,jdbcType=VARCHAR}
41 41
 	)
42 42
   </update>
43 43
   
44 44
   <update id="updateRw" parameterType="java.lang.String">
45
-  	update jdjcrw:t_jcrw
45
+  	update jdjcrw.t_jcrw
46 46
   	set status = '0'
47 47
   	where jh_id in (
48
-		select jh_id from jdjcjh:t_jcjh 
48
+		select jh_id from jdjcjh.t_jcjh
49 49
 		where planid = #{id,jdbcType=VARCHAR}
50 50
 	)
51 51
   </update>
52 52
   
53 53
   <update id="updateJh" parameterType="java.lang.String">
54
-  	update jdjcjh:t_jcjh
54
+  	update jdjcjh.t_jcjh
55 55
   	set status = '0'
56 56
   	where planid = #{id,jdbcType=VARCHAR}
57 57
   </update>
@@ -65,9 +65,10 @@
65 65
   </select>
66 66
   
67 67
   <select id="getndTodoList" resultMap="BaseResultMap" parameterType="java.lang.String" >
68
-    select * from t_ndjh
69
-	where jhkssj > extend((current + 10 units day),year to day )
70
-	and status = 0
68
+    SELECT *
69
+    FROM t_ndjh
70
+    WHERE jhkssj > DATE_ADD(CURDATE(), INTERVAL 10 DAY)
71
+      AND status = 0
71 72
   </select>
72 73
   
73 74
   <delete id="delete" parameterType="java.lang.String">