zx 3 rokov pred
rodič
commit
cb2a339135

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -430,6 +430,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                                        String isPage,
                                        String index
     ){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
         }
@@ -439,7 +440,6 @@ public class StatisticalReportController extends BaseRESTfulController {
         if ("yes".equals(isPage)){
             return  success(statisticalReportService.getInwardInFactory(mapValue));
         }
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getInwardInFactory(mapValue);

+ 3 - 3
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -2125,11 +2125,11 @@
                 AND OO.OPTIONER_CODE=#{orgCode}
             </if>
             <if test="oneDate != null">
-                and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =  greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
+                and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =  TWR.RESULT_TARE_WEIGHT_TIME
             </if>
             <if test="startDate != null">
-                and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;=  greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
-                and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=  greatest(TWR.RESULT_TARE_WEIGHT_TIME,TWR.RESULT_GROSS_WEIGHT_TIME)
+                and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TWR.RESULT_TARE_WEIGHT_TIME
+                and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
             </if>
             <if test="index!=null">
                 and ((instr(RC.CAPACITY_NUMBER, #{index}) > 0) or (instr(RW1.WAREHOUSE_NAME, #{index}) > 0)