소스 검색

DeBugDeBugDeBug

buzhanyi 2 년 전
부모
커밋
7c9f0647cf

+ 0 - 8
purchase-system/src/main/java/com/ozs/plan/service/impl/ProvisionalPlanServiceImpl.java

@@ -491,14 +491,6 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
     @Override
     public List<ProvisionalPlan> queryPage(ProvisionalPlanVo vo) throws ParseException {
         Map<String, Object> params = vo.getParams();
-        if (!ObjectUtils.isEmpty(vo.getParams())) {
-            if (!ObjectUtils.isEmpty(vo.getParams().get("beginTime"))) {
-                params.put("beginTime", vo.getParams().get("beginTime").toString());
-            }
-            if (!ObjectUtils.isEmpty(vo.getParams().get("endTime"))) {
-                params.put("endTime", vo.getParams().get("endTime").toString() + " 23:59:59:999");
-            }
-        }
         vo.setParams(params);
         List<ProvisionalPlan> provisionalPlanList = provisionalPlanMapper.query(vo);
         if (!ObjectUtils.isEmpty(provisionalPlanList)) {

+ 2 - 2
purchase-system/src/main/resources/mapper/plan/PlanYearsMapper.xml

@@ -119,10 +119,10 @@
 			<if test="projectStatus != null and projectStatus != ''">
 				AND p.project_status = #{projectStatus}
 			</if>
-			<if test="params.beginTime!= null and params.beginTime != ''"><!-- 开始时间检索 -->
+			<if test="params.beginTime!= null "><!-- 开始时间检索 -->
 				and p.plan_demand_sub_time &gt;= #{params.beginTime}
 			</if>
-			<if test="params.endTime!= null and params.endTime != '' "><!-- 结束时间检索 -->
+			<if test="params.endTime!= null "><!-- 结束时间检索 -->
 				and p.plan_demand_sub_time &lt;= #{params.endTime}
 			</if>
 			and p.del_flay=0

+ 4 - 4
purchase-system/src/main/resources/mapper/plan/ProvisionalPlanMapper.xml

@@ -226,11 +226,11 @@
             <if test="projectStatus != null and projectStatus != ''">
                 AND p.project_status = #{projectStatus}
             </if>
-            <if test="params.beginTime!= null and params.beginTime != ''"><!-- 开始时间检索 -->
-                and p.plan_demand_sub_time &gt;= #{params.beginTime}
+            <if test="params.beginTime != null "><!-- 开始时间检索 -->
+                and date_format(p.plan_demand_sub_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
             </if>
-            <if test="params.endTime!= null and params.endTime != '' "><!-- 结束时间检索 -->
-                and p.plan_demand_sub_time &lt;= #{params.endTime}
+            <if test="params.endTime != null "><!-- 结束时间检索 -->
+                and date_format(p.plan_demand_sub_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
             </if>
             and p.del_flay=0
         </where>