zhouzh 3 lat temu
rodzic
commit
9b0c63aa57

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

@@ -5,6 +5,7 @@ import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.io.File;
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -50,6 +52,8 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @ApiOperation(value="新增汽车出厂实绩:oms远程调用")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "总实绩ID、线路终点", required = false, dataType = "Map"),
@@ -77,7 +81,9 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
                                                String con,
                                                String carrierSsoId,
                                                String userId,
-                                               String userIds){
+                                               String userIds,
+                                               String startTime,
+                                               String endTime){
 
         if (userId!=null){
             mapValue.put("userId",userId);
@@ -96,6 +102,7 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
         if(con!=null&&con.equals("undefined")){
             mapValue.put("con","%"+con+"%");
         }
+        DataChange.queryDataByDateTime(startTime,endTime,mapValue,sdfDateTime);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> leaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);

+ 7 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -1380,6 +1380,13 @@
    <if test="userId !=null">
       and AIR.INSERT_USERNAME = #{userId}
    </if>
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
     order by tlfr.result_out_gate_time desc
         <where>
             <if test="capacityNumber != null">

+ 42 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -501,6 +501,13 @@
             <if test="carrierSsoId != null">
                 and RCA.CARRIER_SSO_ID = #{carrierSsoId}
             </if>
+            <if test="oneDate != null">
+              and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            </if>
+            <if test="startDate != null">
+              and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+              and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+           </if>
         )
         <where>
             <if test="purchaseOrderNo != null">
@@ -641,6 +648,13 @@
         ON RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
         WHERE TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
         AND OO.ORDER_TYPE IN (1, 2, 3)
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
         )
         <where>
             <if test="saleNum != null">
@@ -799,6 +813,13 @@
                                     ON RG.GATEPOST_ID = TLFR.GATEPOST_ID
                  WHERE OO.ORDER_TYPE = 4
                    AND TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
              )
         <where>
             <if test="dayplanNo != null">
@@ -880,6 +901,13 @@
 
                  where RESULT_OUT_GATE_TIME is not null
                    and OO.ORDER_TYPE = 9
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
              )
         <where>
             <if test="purchaseOrderNo != null">
@@ -961,6 +989,13 @@
         on RG.GATEPOST_ID = TLFR.GATEPOST_ID
         where RESULT_OUT_GATE_TIME is not null
         and OO.ORDER_TYPE = 11
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
         )
         <where>
             <if test="orderNumber != null">
@@ -1129,6 +1164,13 @@
                 where "orderNumber" like #{con} or "capacityNumber" like #{con}
                 or "gatepostName" like #{con}  or  "materialName" like #{con}
             </if>
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLFR.RESULT_OUT_GATE_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLFR.RESULT_OUT_GATE_TIME
+        </if>
         )
         <where>
             <if test="orderNumber != null">