zx 3 роки тому
батько
коміт
28f8d5f1d7

+ 1 - 1
pom.xml

@@ -156,7 +156,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>DIL_VERSION</param>
+                        <param>AMSSHIP_DELIVERY_NOTICE</param>
                     </tables>
                 </configuration>
                 <executions>

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

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
@@ -48,6 +49,7 @@ public class TmstruckQualityResultController extends BaseRESTfulController {
 
     @Autowired
     ColumnDataUtil columnDataUtil;
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
     @ApiOperation(value="查询所有的质检作业")
     @ApiImplicitParams({
@@ -63,9 +65,15 @@ public class TmstruckQualityResultController extends BaseRESTfulController {
                                           Integer pageNum,
                                           Integer pageSize,
                                           Integer orderType,
-                                          String con
+                                          String con,
+                                          String startTime,
+                                          String endTime
     ){
         mapValue.put("orderTypee", orderType);
+        if (con!=null&&!"null".equals(con)&&!"".equals(con)){
+            mapValue.put("con",con);
+        }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> qualityResult = tmstruckQualityResultService.getQualityResult(mapValue);

+ 71 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckReciveResultController.java

@@ -0,0 +1,71 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.TmstruckReceiptResult;
+import com.steerinfo.dil.model.TmstruckReceiveResult;
+import com.steerinfo.dil.service.ITmstruckReceiptResultService;
+import com.steerinfo.dil.service.impl.TmstruckReceiveResultServiceImpl;
+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;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zx
+ * @Description:
+ * @CreateTime 2022/5/26 18:06
+ * @Version:1.0
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckreciveresult")
+public class TmstruckReciveResultController extends BaseRESTfulController {
+    @Autowired
+    TmstruckReceiveResultServiceImpl  tmstruckReceiveResultService;
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    @ApiOperation(value="查询所有的质检作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(111)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getReceiveResult")
+    public RESTfulResult getReceiveResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                          Integer apiId,
+                                          Integer pageNum,
+                                          Integer pageSize,
+                                          Integer orderType,
+                                          String con,
+                                          String startTime,
+                                          String endTime
+    ){
+        mapValue.put("orderTypee", orderType);
+        if (con!=null&&!"null".equals(con)&&!"".equals(con)){
+            mapValue.put("con",con);
+        }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> qualityResult = tmstruckReceiveResultService.getCgRecevice(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,qualityResult);
+        return success(pageList);
+    }
+}
+

+ 8 - 3
src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java

@@ -3,6 +3,7 @@ import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.service.ITmstruckUnloadResultService;
 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;
@@ -13,6 +14,7 @@ import org.apache.commons.collections4.Put;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -43,7 +45,7 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
 
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     @ApiOperation(value="查询卸货实绩")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
@@ -60,14 +62,16 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
                                            Integer orderType,
                                            String con,
                                            String userId,
-                                           String  userIds
+                                           String  userIds,
+                                           String startTime,
+                                           String endTime
     ){
 
         if (orderType!=null){
             mapValue.put("orderTypee", orderType);
         }
         if(con !=null &&!"null".equals(con)){
-            mapValue.put("con","%" + con + "%");
+            mapValue.put("con",con);
         }
         if (userId!=null){
             mapValue.put("userId",userId);
@@ -75,6 +79,7 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
         if (userIds!=null){
             mapValue.put("userIds",userIds);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> unloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);

+ 18 - 2
src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java

@@ -6,6 +6,7 @@ import com.steerinfo.dil.service.ITmstruckWeightResultService;
 import com.steerinfo.dil.service.impl.TmstruckWeightResultServiceImpl;
 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;
@@ -16,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -47,6 +49,8 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @ApiOperation(value="新增计量实绩 ")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "总实绩ID、计皮点、计毛点", required = false, dataType = "Map"),
@@ -74,17 +78,23 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                                Integer orderType,
                                                String con,
                                                String userId,
-                                               String usersId
+                                               String usersId,
+                                               String startTime,
+                                               String endTime
     ){
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
         }
+        if (con!=null&&!"null".equals(con)){
+            mapValue.put("con",con);
+        }
         if (userId!=null){
             mapValue.put("userId",userId);
         }
         if (usersId!=null){
             mapValue.put("usersId",usersId);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
@@ -109,18 +119,24 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                            Integer orderType,
                                            String con,
                                            String userId,
-                                           String userIds
+                                           String userIds,
+                                          String startTime,
+                                          String endTime
     ){
 
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
         }
+        if (con!=null&&!"null".equals(con)){
+            mapValue.put("con",con);
+        }
         if (userId!=null) {
             mapValue.put("userId",userId);
         }
         if (userIds!=null) {
             mapValue.put("usersId", userIds);
         }
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> jiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);

+ 4 - 2
src/main/java/com/steerinfo/dil/service/ITmstruckReceiveResultService.java

@@ -4,6 +4,8 @@ import com.steerinfo.dil.model.TmstruckReceiveResult;
 import com.steerinfo.framework.service.IBaseService;
 
 import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
 
 /**
  * TmstruckReceiveResult服务接口:
@@ -18,6 +20,6 @@ import java.math.BigDecimal;
  * @see null
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
-public interface ITmstruckReceiveResultService extends IBaseService<TmstruckReceiveResult, BigDecimal>{
-
+public interface ITmstruckReceiveResultService {
+    List<Map<String,Object>> getCgRecevice(Map<String,Object> map);
 }

+ 11 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiveResultServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.service.impl;
 
+import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
 import com.steerinfo.dil.mapper.TmstruckReceiveResultMapper;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.model.TmstruckReceiveResult;
@@ -10,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
 
 /**
  * TmstruckReceiveResult服务实现:
@@ -25,10 +28,12 @@ import java.math.BigDecimal;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 @Service(value = "tmstruckReceiveResultService")
-public class TmstruckReceiveResultServiceImpl{
+public class TmstruckReceiveResultServiceImpl implements  ITmstruckReceiveResultService{
 
     @Autowired
     private TmstruckReceiveResultMapper tmstruckReceiveResultMapper;
+    @Autowired
+    private TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
 
     /**
      * 新增一条虚拟收货实绩
@@ -48,4 +53,9 @@ public class TmstruckReceiveResultServiceImpl{
         tmstruckReceiveResult.setStatus(new BigDecimal(0)); // 卸货完成后添加的为虚拟收货实绩
         return tmstruckReceiveResultMapper.insertSelective(tmstruckReceiveResult);
     }
+
+    @Override
+    public List<Map<String, Object>> getCgRecevice(Map<String, Object> map) {
+        return tmstruckReceiveResultMapper.getCGReceiveResult(map);
+    }
 }

+ 1 - 1
src/main/resources/application-prod.yml

@@ -26,7 +26,7 @@ piction:
 #feign设置
 openfeign:
   ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+    url: ${COLUMNDATAFEIGN_URL:172.16.33.161:8083}
   BmsShipFeign:
     url: ${BMSSHIPFEIGN_URL:172.16.33.166:8078}
   BmsTruckFeign:

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

@@ -2078,18 +2078,19 @@
         <if test="orgCode!=null">
         AND   OO.OPTIONER_CODE=#{orgCode}
         </if>
+            <if test="oneDate != null">
+                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;= 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(RS.SUPPLIER_NAME, #{index}) > 0)
             or (instr( RC2.CONSIGNEE_COMPANY_NAME, #{index}) > 0) or (instr( RC3.CARRIER_NAME, #{index}) > 0)
             or (instr(RL.LINE_NAME, #{index}) > 0) or   (instr(RM.MATERIAL_NAME, #{index}) > 0))
         </if>
-        <if test="oneDate != null">
-            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;= TWR.RESULT_TARE_WEIGHT_TIME
-            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
-        </if>
+
         </where>
     </select>
 <!--  查询厂内内转统计报表-->

+ 14 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml

@@ -422,8 +422,8 @@
                   TQR.RESULT_DEDUCTION          "resultDeduction",
                   TQR.RESULT_DEDUCTION_DESCRIPTION "resultDeductionDescription",
                   RW.WAREHOUSE_NAME      "warehouseName",
-                  TQR.INSERT_TIME        "insertTime"
-
+                  TQR.INSERT_TIME        "insertTime",
+                  TQR.RESULT_SAMPLING_TIME "samplingTime"
            from TMSTRUCK_QUALITY_RESULT TQR
                   left join TMSTRUCK_TOTAL_RESULT TTR
                             on TQR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
@@ -441,6 +441,18 @@
                             on RW.WAREHOUSE_ID = TQR.RESULT_SAMPLING_POINT_ID
                   left join RMS_MATERIAL RM
                             on RM.MATERIAL_ID = DB.MATERIAL_ID
+                  WHERE
+    <if test="oneDate != null">
+       to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =  TQR.RESULT_SAMPLING_TIME
+    </if>
+    <if test="startDate != null">
+       to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TQR.RESULT_SAMPLING_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=   TQR.RESULT_SAMPLING_TIME
+    </if>
+    <if test="con!=null">
+      and ((instr(RW.WAREHOUSE_NAME, #{con}) > 0) or  (instr(OO.ORDER_NUMBER, #{con}) > 0)
+      or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
+    </if>
          )
     <where>
       <if test="purchaseOrderNo != null">

+ 1 - 98
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -504,104 +504,7 @@
     </if>
   </sql>
   
-  <!--  查询所有签收实绩 -->
-  <select id="getCGReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
-    select
-    *
-    from (
-    select
-    OO.ORDER_ID                  "orderId",
-    TRR.RESULT_ID               "resultId",
-    APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
-    RM.MATERIAL_NAME            "materialName",
-    OO.ORDER_NUMBER             "orderNumber",
-    RC.CAPACITY_NUMBER          "capacityNumber",
-    DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
-    TUR.UNLOAD_STATUS           "unloadStatus",
-    TWR.RESULT_NET_WEIGHT       "resultNetWeight",
-    RW.WAREHOUSE_NAME           "warehouseName",
-    TRR.INSERT_USERNAME         "insertUsername",
-    TRR.INSERT_TIME             "insertTime"
-    from TMSTRUCK_RECEIPT_RESULT TRR
-    left join TMSTRUCK_TOTAL_RESULT TTR
-    on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-    left join OMSTRUCK_ORDER OO
-    on OO.ORDER_ID = TTR.ORDER_ID
-    left join AMS_PURCHASE_ORDER APO
-    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
-    left join DIL_BATCH DB
-    on DB.BATCH_ID = APO.BATCH_ID
-    left join RMS_CAPACITY RC
-    on RC.CAPACITY_ID = OO.CAPACITY_ID
-    left join TMSTRUCK_WEIGHT_RESULT TWR
-    on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-    left join TMSTRUCK_UNLOAD_RESULT TUR
-    on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-    left join OMSTRUCK_ORDER_MATERIAL OOM
-    on OOM.ORDER_ID = OO.ORDER_ID
-    left join RMS_MATERIAL RM
-    on OOM.MATERIAL_ID = RM.MATERIAL_ID
-    left join RMS_WAREHOUSE RW
-    on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
-    where TRR.STATUS = 1 and OO.ORDER_TYPE = #{orderTypee}
-    )
-    <where>
-      <if test="purchaseOrderNo != null">
-        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
-          "purchaseOrderNo" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="materialName != null">
-        and
-        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-          "materialName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="orderNumber != null">
-        and
-        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-          "orderNumber" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="capacityNumber != null">
-        and
-        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
-          "capacityNumber" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="resultForeignShipName != null">
-        and
-        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
-          "resultForeignShipName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="unloadStatus != null">
-        and
-        <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
-          "unloadStatus" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="resultNetWeight != null">
-        and
-        <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-          "resultNetWeight" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="warehouseName != null">
-        and
-        <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
-          "warehouseName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="insertUsername != null">
-        and
-        <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
-          "insertUsername" like '%${item}%'
-        </foreach>
-      </if>
-    </where>
-    <include refid="orderBy"></include>
-  </select>
+
   
 
 <!--  查询内转钢材到异地库收货实绩-->

+ 11 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.xml

@@ -390,6 +390,17 @@
     left join RMS_WAREHOUSE RW
     on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
     where TRR.STATUS = 1 and OO.ORDER_TYPE = #{orderTypee}
+    <if test="oneDate != null">
+      and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TRR.INSERT_TIME
+    </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =    TRR.INSERT_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=    TRR.INSERT_TIME
+    </if>
+    <if test="con!=null">
+      and ((instr(RW.WAREHOUSE_NAME, #{con}) > 0) or  (instr(OO.ORDER_NUMBER, #{con}) > 0)
+      or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
+    </if>
     )
     <where>
       <if test="purchaseOrderNo != null">

+ 11 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -594,6 +594,17 @@
         left join RMS_WAREHOUSE RW
         on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
         where RESULT_END_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TUR.RESULT_END_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TUR.RESULT_END_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=   TUR.RESULT_END_TIME
+        </if>
+        <if test="con!=null">
+            and ((instr(RW.WAREHOUSE_NAME, #{con}) > 0) or  (instr(OO.ORDER_NUMBER, #{con}) > 0)
+            or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
+        </if>
         )
         <where>
             <if test="purchaseOrderNo != null">

+ 22 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -732,6 +732,17 @@
         left join RMS_CONSIGNEE RCON
         on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
         where RESULT_GROSS_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =   TWR.RESULT_GROSS_WEIGHT_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; =  TWR.RESULT_GROSS_WEIGHT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=  TWR.RESULT_GROSS_WEIGHT_TIME
+        </if>
+        <if test="con!=null">
+            and ((instr( RCON. CONSIGNEE_COMPANY_NAME, #{con}) > 0) or  (instr(OO.ORDER_NUMBER, #{con}) > 0)
+            or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
+        </if>
         )
         <where>
             <if test="purchaseOrderNo != null">
@@ -824,6 +835,17 @@
         left join RMS_MATERIAL RM
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
         where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        <if test="oneDate != null">
+            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; =  TWR.RESULT_TARE_WEIGHT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=  TWR.RESULT_TARE_WEIGHT_TIME
+        </if>
+        <if test="con!=null">
+            and ((instr(DB.RESULT_FOREIGN_SHIP_NAME, #{con}) > 0) or  (instr(OO.ORDER_NUMBER, #{con}) > 0)
+            or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
+        </if>
         )
         <where>
             <if test="purchaseOrderNo != null">