gaodd hace 2 años
padre
commit
4df6713963

+ 7 - 6
src/main/java/com/chinaitop/depot/business/mapper/BusinessDrugStandingBookMapper.xml

@@ -631,10 +631,10 @@
631
 			        and org_id = #{orgId}
631
 			        and org_id = #{orgId}
632
 			    </if>
632
 			    </if>
633
 			    <if test="startDate !=null">
633
 			    <if test="startDate !=null">
634
-			        and create_time >= to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')
634
+			        and create_time >= DATE_FORMAT(#{startDate},'%Y-%m-%d %H:%i:%s')
635
 			    </if> 
635
 			    </if> 
636
 			    <if test="endDate !=null">
636
 			    <if test="endDate !=null">
637
-			        and create_time &lt;= to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss')
637
+			        and create_time &lt;= DATE_FORMAT(#{endDate},'%Y-%m-%d %H:%i:%s')
638
 			    </if>
638
 			    </if>
639
 				GROUP BY
639
 				GROUP BY
640
 					drug_kind,
640
 					drug_kind,
@@ -668,7 +668,7 @@
668
 			        and create_time >= to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')
668
 			        and create_time >= to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')
669
 			    </if> -->
669
 			    </if> -->
670
 			    <if test="startDate !=null">
670
 			    <if test="startDate !=null">
671
-			        and create_time &lt; to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')
671
+			        and create_time &lt; DATE_FORMAT(#{startDate},'%Y-%m-%d %H:%i:%s')
672
 			    </if>
672
 			    </if>
673
 				GROUP BY
673
 				GROUP BY
674
 					drug_kind,
674
 					drug_kind,
@@ -753,7 +753,7 @@
753
 				AND drug_name = #{drug_name}
753
 				AND drug_name = #{drug_name}
754
 				AND drug_specification = #{drug_specification}
754
 				AND drug_specification = #{drug_specification}
755
 				AND drug_specification_unit = #{drug_specification_unit}
755
 				AND drug_specification_unit = #{drug_specification_unit}
756
-				AND create_time &lt; to_date(#{startDate},'yyyy-mm-dd hh24:mi:ss')				
756
+				AND create_time &lt; DATE_FORMAT(#{startDate},'%Y-%m-%d %H:%i:%s')		
757
 	           )a
757
 	           )a
758
 	        )b
758
 	        )b
759
     
759
     
@@ -873,7 +873,7 @@ select
873
 		                                   and org_id = #{orgId}
873
 		                                   and org_id = #{orgId}
874
 		                                </if>
874
 		                                </if>
875
 		                                <if test="endDate !=null">
875
 		                                <if test="endDate !=null">
876
-			                               and create_time &lt;= to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss')
876
+			                               and create_time &lt;= DATE_FORMAT(#{endDate},'%Y-%m-%d %H:%i:%s')
877
 			                            </if>
877
 			                            </if>
878
 										order by create_time desc
878
 										order by create_time desc
879
 								) a
879
 								) a
@@ -909,7 +909,8 @@ select
909
 			        and org_id = #{orgId}
909
 			        and org_id = #{orgId}
910
 			    </if>
910
 			    </if>
911
 			    <if test="endDate !=null">
911
 			    <if test="endDate !=null">
912
-			        and create_time &lt;= to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss')
912
+			        <!-- and create_time &lt;= to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') -->
913
+			        and create_time &lt;= DATE_FORMAT(#{endDate},'%Y-%m-%d %H:%i:%s')
913
 			    </if>
914
 			    </if>
914
 				GROUP BY
915
 				GROUP BY
915
 					drug_kind,
916
 					drug_kind,