فهرست منبع

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API

luobang 3 سال پیش
والد
کامیت
a21cf58878
28فایلهای تغییر یافته به همراه1573 افزوده شده و 874 حذف شده
  1. 1 1
      pom.xml
  2. 133 92
      src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java
  3. 8 7
      src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java
  4. 11 0
      src/main/java/com/steerinfo/dil/mapper/OffSiteTransportationMapper.java
  5. 1 1
      src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java
  6. 0 4
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java
  7. 27 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.java
  8. 14 0
      src/main/java/com/steerinfo/dil/model/TmstruckReceiptResult.java
  9. 184 0
      src/main/java/com/steerinfo/dil/model/TmstruckReceiveResult.java
  10. 23 0
      src/main/java/com/steerinfo/dil/service/ITmstruckReceiveResultService.java
  11. 9 0
      src/main/java/com/steerinfo/dil/service/OffSiteTransportationService.java
  12. 36 2
      src/main/java/com/steerinfo/dil/service/impl/OffSiteTransportationServiceImpl.java
  13. 1 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java
  14. 9 5
      src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java
  15. 28 24
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java
  16. 51 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiveResultServiceImpl.java
  17. 4 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java
  18. 6 0
      src/main/java/com/steerinfo/route/controller/TmstruckArrivalResultController.java
  19. 227 0
      src/main/java/com/steerinfo/route/model/TmstruckReceiptResult.java
  20. 0 4
      src/main/java/com/steerinfo/route/model/VcMeasurerec.java
  21. 1 1
      src/main/java/com/steerinfo/route/service/impl/TmstruckReceiptResultChildServiceImpl.java
  22. 1 1
      src/main/resources/application-dev.yml
  23. 35 0
      src/main/resources/com/steerinfo/dil/mapper/OffSiteTransportationMapper.xml
  24. 1 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml
  25. 1 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.xml
  26. 183 157
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml
  27. 578 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.xml
  28. 0 573
      src/main/resources/com/steerinfo/route/mapper/TmstruckReceiptResultMapper.xml

+ 1 - 1
pom.xml

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

+ 133 - 92
src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
 import com.steerinfo.dil.service.impl.OffSiteTransportationServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
@@ -10,15 +11,25 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.route.config.ImageFileUtils;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
+import com.steerinfo.route.threeRequest.ZhongJiaoXingLu;
+import com.steerinfo.route.util.DataConversionTool;
+import com.steerinfo.route.util.HTTPRequestUtils;
+import com.steerinfo.route.vo.FullPathVisualizationTo.ViewVisualization;
+import com.steerinfo.route.vo.resultJson.SearchPoint;
 import io.swagger.annotations.Api;
 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.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartRequest;
 
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
@@ -35,6 +46,19 @@ public class OffSiteTransportationController extends BaseRESTfulController {
     ColumnDataUtil columnDataUtil;
     @Autowired
     ImageFileUtils imageFileUtils;
+    @Autowired
+    private ZhongJiaoXingLu zhongJiaoXingLu;
+
+    @Value("${str.tengxun.key}")
+    private String key;
+    @Value("${redis.prefix.order}")
+    private String prefixOrder;
+    @Value("${redis.prefix.line}")
+    private String prefixLine;
+    @Value("${redis.prefix.suffix}")
+    private String suffix;
+    @Autowired
+    private RedisTemplate redisTemplate;
 
 
     @Autowired
@@ -86,10 +110,10 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         List<Map<String,Object>> list= offSiteTransportationService.getInTransitTransportation(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, filter,list);
         return success(pageList);
-    }
+    }//headers = "content-type=multipart/form-data"
 
-    @PostMapping(value = "/addTmstruckReceiptResult", headers = "content-type=multipart/form-data")
-    public synchronized RESTfulResult addTmstruckReceiptResult(@RequestPart("request") MultipartRequest request, Integer num, String orderNumber, String resultArrivalAddress, Integer imgcount3, Integer imgcount4) throws Exception {
+    @PostMapping(value = "/addTmstruckReceiptResult" )
+    public synchronized RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value , Integer num, String orderNumber, String resultArrivalAddress, Integer imgcount3, Integer imgcount4) throws Exception {
 
         Map<String,Object> map = new HashMap<String,Object>();
         map.put("orderNumber",orderNumber);
@@ -98,101 +122,118 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         if (orderStatus!=null&&orderStatus==2){
             return failed();
         }
-        //多选图片变量
-        List<String> fourFiles=new ArrayList<String>();
-
-        MultipartFile file=null;
-        int fourcount=1;
-        for (int i=0;i<num;i++){
-            file=request.getFile("file"+i);
-            if (i==0){
-                String url=imageFileUtils.updateFile(file);
-                map.put("url1",url);
-            }else if (i==1){
-                String url=imageFileUtils.updateFile(file);
-                map.put("url2",url);
-            }else if (imgcount3==1&&i==2){
-                String url=imageFileUtils.updateFile(file);
-                map.put("url3",url);
+        map.putAll(value);
+        Integer resTfulResult = offSiteTransportationService.addTmstruckReceiptResult(map);
+        if (!resTfulResult.equals("4")){
+            //保存路线
+            String redisJson = (String) redisTemplate.opsForValue().get(prefixOrder+":"+orderNumber);
+            HashMap mapValue = JSON.parseObject(redisJson, HashMap.class);
+            String json = zhongJiaoXingLu.visualRoute(mapValue);
+            ViewVisualization to=null;
+            if (json!=null){
+                //设置60天后过期
+                Calendar calendar=Calendar.getInstance();
+                long agoTime= calendar.getTime().getTime();
+                calendar.add(Calendar.MONTH,2);
+                long lateTime= calendar.getTime().getTime();
+                long saveTime=(lateTime-agoTime)/1000;
+                redisTemplate.opsForValue().set(prefixLine+":"+orderNumber, json, saveTime, TimeUnit.SECONDS);
+                //删除订单
+                redisTemplate.delete(prefixOrder+":"+orderNumber);
+                redisTemplate.delete(prefixOrder+":"+orderNumber+suffix);
+                //添加运输距离
+                to= (ViewVisualization) DataConversionTool.jsonToBean(json,ViewVisualization.class);
 
             }else {
-                String url=imageFileUtils.updateFile(file);
-                fourFiles.add(url);
-                fourcount++;
+                HashMap<String,Object> hashMap=new HashMap();
+                hashMap.put("orderNumber",orderNumber);
+                Map<String,Object> resultMap= offSiteTransportationService.getStartAndEndCapacityNumber(hashMap);
+
+                if (resultMap!=null){
+                    json= getPathJSON(resultMap.get("capacityNumber").toString(),resultMap.get("resultOutGateTime").toString());
+
+
+                    if (json!=null&&!json.equals("")){
+                        to= (ViewVisualization) DataConversionTool.jsonToBean(json,ViewVisualization.class);
+                    }
+                }
+            }
+
+            if (to!=null&&to.getResult()!=null&&to.getResult().getRunDistance()!=null){
+                Map<String,Object> ordermap=new HashMap<>();
+                ordermap.put("orderNumber",orderNumber);
+                ordermap.put("orderMileage",to.getResult().getRunDistance()==null?"1":to.getResult().getRunDistance());
+                offSiteTransportationService.insertOrderMileage(ordermap);
+
+            }else {
+                if (to!=null&&to.getStatus()==1006){
+
+                    Map<String,Object> ordermap=new HashMap<>();
+                    ordermap.put("orderNumber",orderNumber);
+                    ordermap.put("orderMileage","-1");
+                    offSiteTransportationService.insertOrderMileage(ordermap);
+                }else if (to!=null&&to.getStatus()==1001){
+                    Map<String,Object> ordermap=new HashMap<>();
+                    ordermap.put("orderNumber",orderNumber);
+                    ordermap.put("orderMileage","1");
+                    offSiteTransportationService.insertOrderMileage(ordermap);
+                } else {
+                    Map<String,Object> ordermap=new HashMap<>();
+                    ordermap.put("orderNumber",orderNumber);
+                    ordermap.put("orderMileage","-1");
+                    offSiteTransportationService.insertOrderMileage(ordermap);
+                }
+
             }
         }
-        map.put("fourFiles",fourFiles);
-        Integer resTfulResult = offSiteTransportationService.addTmstruckReceiptResult(map);
-//        if (!resTfulResult.getData().toString().equals("4")){
-//            //保存路线
-//            String redisJson = (String) redisTemplate.opsForValue().get(prefixOrder+":"+orderNumber);
-//            HashMap mapValue = JSON.parseObject(redisJson, HashMap.class);
-//            String json = zhongJiaoXingLu.visualRoute(mapValue);
-//            ViewVisualization to=null;
-//            if (json!=null){
-//                //设置60天后过期
-//                Calendar calendar=Calendar.getInstance();
-//                long agoTime= calendar.getTime().getTime();
-//                calendar.add(Calendar.MONTH,2);
-//                long lateTime= calendar.getTime().getTime();
-//                long saveTime=(lateTime-agoTime)/1000;
-//                redisTemplate.opsForValue().set(prefixLine+":"+orderNumber, json, saveTime, TimeUnit.SECONDS);
-//                //删除订单
-//                redisTemplate.delete(prefixOrder+":"+orderNumber);
-//                redisTemplate.delete(prefixOrder+":"+orderNumber+suffix);
-//                //添加运输距离
-//                to= (ViewVisualization) DataConversionTool.jsonToBean(json,ViewVisualization.class);
-//
-//            }else {
-//                System.out.println("数据为空");
-//                System.out.println(orderNumber);
-//                HashMap<String,Object> hashMap=new HashMap();
-//                hashMap.put("orderNumber",orderNumber);
-//                RESTfulResult startAndEndCapacityNumber = tmsFeign.getStartAndEndCapacityNumber(hashMap);
-//                System.out.println(hashMap);
-//                System.out.println(startAndEndCapacityNumber);
-//                HashMap<String,Object> resultMap= (HashMap<String, Object>) startAndEndCapacityNumber.getData();
-//                if (resultMap!=null){
-//                    json= getPathJSON(resultMap.get("capacityNumber").toString(),resultMap.get("resultOutGateTime").toString());
-//
-//
-//                    if (json!=null&&!json.equals("")){
-//                        to= (ViewVisualization) DataConversionTool.jsonToBean(json,ViewVisualization.class);
-//                    }
-//                }
-//            }
-//
-//            if (to!=null&&to.getResult()!=null&&to.getResult().getRunDistance()!=null){
-//                Map<String,Object> ordermap=new HashMap<>();
-//                ordermap.put("orderNumber",orderNumber);
-//                ordermap.put("orderMileage",to.getResult().getRunDistance()==null?"1":to.getResult().getRunDistance());
-//                omsFeign.insertOrderMileage(ordermap);
-//
-//            }else {
-//                if (to!=null&&to.getStatus()==1006){
-//
-//                    Map<String,Object> ordermap=new HashMap<>();
-//                    ordermap.put("orderNumber",orderNumber);
-//                    ordermap.put("orderMileage","-1");
-//                    omsFeign.insertOrderMileage(ordermap);
-//                }else if (to!=null&&to.getStatus()==1001){
-//                    Map<String,Object> ordermap=new HashMap<>();
-//                    ordermap.put("orderNumber",orderNumber);
-//                    ordermap.put("orderMileage","1");
-//                    omsFeign.insertOrderMileage(ordermap);
-//                } else {
-//                    System.out.println("不清楚的状态值");
-//                    System.out.println(to);
-//                    Map<String,Object> ordermap=new HashMap<>();
-//                    ordermap.put("orderNumber",orderNumber);
-//                    ordermap.put("orderMileage","-1");
-//                    omsFeign.insertOrderMileage(ordermap);
-//                }
-//
-//            }
-       // }
 
 
         return null;
     }
+
+    //如果内容丢失重新获得
+    public String getPathJSON(String capacityNumber,String resultOutGateTime) throws Exception {
+
+        //入网验证
+        String netValidationResult = zhongJiaoXingLu.netValidation(capacityNumber);
+        Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
+        if (Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
+            String searchPointJson = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+ URLEncoder.encode("安钢集团信阳钢铁有限责任公司","utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
+            SearchPoint searchPoint= (SearchPoint) DataConversionTool.jsonToBean(searchPointJson, SearchPoint.class);
+            String searchPointJson2 = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+URLEncoder.encode("河南省平桥区","utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
+            SearchPoint searchPoint2= (SearchPoint) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint.class);
+            //运单生成之后保存
+            HashMap<String,String> redisMap=new HashMap<>();
+            String startLon=searchPoint.getResult().getLocation().getLng().toString().length()>9?searchPoint.getResult().getLocation().getLng().toString().substring(0,9):searchPoint.getResult().getLocation().getLng().toString();
+            String startLat=searchPoint.getResult().getLocation().getLat().toString().length()>9?searchPoint.getResult().getLocation().getLat().toString().substring(0,8):searchPoint.getResult().getLocation().getLat().toString();
+            redisMap.put("startLonlat", startLon+","+startLat);
+            String endLon= searchPoint2.getResult().getLocation().getLng().toString().length()>9?searchPoint2.getResult().getLocation().getLng().toString().substring(0,9):searchPoint2.getResult().getLocation().getLng().toString();
+            String endLat= searchPoint2.getResult().getLocation().getLat().toString().length()>9?searchPoint2.getResult().getLocation().getLat().toString().substring(0,8):searchPoint2.getResult().getLocation().getLat().toString();
+            redisMap.put("endLonlat",endLon+","+endLat);
+            redisMap.put("vclN", capacityNumber);
+            redisMap.put("vco","2");
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:ss:mm");
+            String qryBtm=resultOutGateTime;
+            //获得23小时、45分钟之后的时间
+            Date parse = simpleDateFormat.parse(qryBtm);
+            //时间添加
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(parse);
+            calendar.add(Calendar.HOUR_OF_DAY, 23);
+            calendar.add(Calendar.SECOND, 45);
+            redisMap.put("qryBtm", qryBtm);
+            redisMap.put("qryEtm",simpleDateFormat.format(calendar.getTime()));
+            System.out.println(redisMap);
+            String json = zhongJiaoXingLu.visualRoute(redisMap);
+            System.out.println(json.length()>100?json.substring(0,100):json);
+            return json;
+        }
+        return null;
+    }
+
+    public String removeData(){
+        offSiteTransportationService.removeDate();
+        return "success";
+    }
+
 }

+ 8 - 7
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -1,10 +1,8 @@
 package com.steerinfo.dil.controller;
 
-import com.alibaba.fastjson.JSON;
 import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.service.ITmstruckReceiptResultService;
-
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
 import com.steerinfo.dil.util.PageListAdd;
@@ -17,14 +15,17 @@ 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.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartRequest;
+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.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 /**
  * TmstruckReceiptResult RESTful接口:

+ 11 - 0
src/main/java/com/steerinfo/dil/mapper/OffSiteTransportationMapper.java

@@ -2,6 +2,7 @@ package com.steerinfo.dil.mapper;
 
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 @Mapper
@@ -11,4 +12,14 @@ public interface OffSiteTransportationMapper {
     Map<String, Object> getTruckFactoryResult(String orderNumber);
 
     Integer getOrderStatu(String orderNumber);
+
+    Map<String, Object> getStartAndEndCapacityNumber(Map<String, Object> map);
+
+    void insertOrderMileage(HashMap<String, Object> omstruckOrder);
+
+    int orderClose(String orderNumber);
+
+    List<Map<String, Object>> getReceiptData();
+
+    int insertReceive(Map<String, Object> map);
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java

@@ -42,7 +42,7 @@ public interface TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLe
     //通过总实绩Id查询出厂实绩
     BigDecimal getResultIdByTotalId(Integer resultTotalId);
 
-    Map<String, Object> getTruckFactoryResult(String nu);
+    Map<String, Object> getTruckFactoryResult(String orderNumber);
 
     //
     List<Map<String, Object>> getLeaveFactoryList(String orderNumber);

+ 0 - 4
src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java

@@ -21,14 +21,10 @@ public interface TmstruckReceiptResultMapper extends IBaseMapper<TmstruckReceipt
     //计皮完成后 通过总实绩ID 更新状态 为 1
     int updateByTotalResultId(TmstruckReceiptResult tmstruckReceiptResult);
 
-    //查询所有收货实绩
-    List<Map<String, Object>> getCGReceiptResult(Map<String, Object> map);
 
     //查询内转钢材到异地库收货实绩
     List<Map<String, Object>> getSteelNzReceiptResult(Map<String, Object> map);
 
-    //获取内转收货实绩
-    List<Map<String, Object>> getInwardReceipt(Map<String, Object> map);
 
     //查询是否已收过货
     Integer getReceiptResult(BigDecimal resultTotalId);

+ 27 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.java

@@ -0,0 +1,27 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckReceiveResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstruckReceiveResultMapper extends IBaseMapper<TmstruckReceiveResult, BigDecimal> {
+
+    //查询最大ID值
+    @Select("select SQE_RECEIVE_RESULT.nextval from dual")
+    BigDecimal selectMaxId();
+
+    //通过总实绩Id查询主键Id
+    BigDecimal getReceiveResult(BigDecimal totalResultId);
+
+    //查询所有收货实绩
+    List<Map<String, Object>> getCGReceiveResult(Map<String, Object> map);
+
+    //获取内转收货实绩
+    List<Map<String, Object>> getInwardReceive(Map<String, Object> map);
+}

+ 14 - 0
src/main/java/com/steerinfo/dil/model/TmstruckReceiptResult.java

@@ -45,6 +45,12 @@ public class TmstruckReceiptResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="异地库ID",required=false)
     private BigDecimal warehouseId;
 
+    /**
+     * 异地库ID(ORDER_MILEAGE,DECIMAL,38)
+     */
+    @ApiModelProperty(value="异地库ID",required=false)
+    private BigDecimal  orderMileage;
+
     /**
      * 记录创建人(INSERT_USERNAME,VARCHAR,20)
      */
@@ -88,6 +94,14 @@ public class TmstruckReceiptResult implements IBasePO<BigDecimal> {
 
     private static final long serialVersionUID = 1L;
 
+    public BigDecimal getOrderMileage() {
+        return orderMileage;
+    }
+
+    public void setOrderMileage(BigDecimal orderMileage) {
+        this.orderMileage = orderMileage;
+    }
+
     @Override
     public BigDecimal getId() {
         return this.resultId;

+ 184 - 0
src/main/java/com/steerinfo/dil/model/TmstruckReceiveResult.java

@@ -0,0 +1,184 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="签收实绩")
+public class TmstruckReceiveResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(RESULT_RECEIVE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal resultReceiveId;
+
+    /**
+     * 实绩总表id(RESULT_TOTAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="实绩总表id",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 签收时间(RESULT_RECEIVE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="签收时间",required=false)
+    private Date resultReceiveTime;
+
+    /**
+     * 签收人id(RECEIVE_SINGER_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="签收人id",required=false)
+    private BigDecimal receiveSingerId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 状态:0 为卸货后新增虚拟收货实绩  1 为计皮完成后真实收货实绩(STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="状态:0 为卸货后新增虚拟收货实绩  1 为计皮完成后真实收货实绩",required=false)
+    private BigDecimal status;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultReceiveId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultReceiveId) {
+        this.resultReceiveId = resultReceiveId;
+    }
+
+    public BigDecimal getResultReceiveId() {
+        return resultReceiveId;
+    }
+
+    public void setResultReceiveId(BigDecimal resultReceiveId) {
+        this.resultReceiveId = resultReceiveId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public Date getResultReceiveTime() {
+        return resultReceiveTime;
+    }
+
+    public void setResultReceiveTime(Date resultReceiveTime) {
+        this.resultReceiveTime = resultReceiveTime;
+    }
+
+    public BigDecimal getReceiveSingerId() {
+        return receiveSingerId;
+    }
+
+    public void setReceiveSingerId(BigDecimal receiveSingerId) {
+        this.receiveSingerId = receiveSingerId;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getStatus() {
+        return status;
+    }
+
+    public void setStatus(BigDecimal status) {
+        this.status = status;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultReceiveId=").append(resultReceiveId);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultReceiveTime=").append(resultReceiveTime);
+        sb.append(", receiveSingerId=").append(receiveSingerId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", status=").append(status);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckReceiveResultService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstruckReceiveResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+
+/**
+ * TmstruckReceiveResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-29 06:27
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-29
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckReceiveResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckReceiveResultService extends IBaseService<TmstruckReceiveResult, BigDecimal>{
+
+}

+ 9 - 0
src/main/java/com/steerinfo/dil/service/OffSiteTransportationService.java

@@ -1,5 +1,8 @@
 package com.steerinfo.dil.service;
 
+import com.steerinfo.framework.controller.RESTfulResult;
+
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -7,4 +10,10 @@ public interface OffSiteTransportationService {
     List<Map<String, Object>> getInTransitTransportation(Map<String, Object> mapValue);
 
     Integer getOrderStatus(Map<String, Object> map);
+
+    public Map<String, Object> getStartAndEndCapacityNumber(Map<String,Object> map);
+
+    void insertOrderMileage(Map<String, Object> ordermap);
+
+    void removeDate();
 }

+ 36 - 2
src/main/java/com/steerinfo/dil/service/impl/OffSiteTransportationServiceImpl.java

@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import java.math.BigDecimal;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 @Service
@@ -44,6 +45,39 @@ public class OffSiteTransportationServiceImpl implements OffSiteTransportationSe
         return statu;
     }
 
+    @Override
+    public Map<String, Object> getStartAndEndCapacityNumber(Map<String,Object> map) {
+        return offSiteTransportationMapper.getStartAndEndCapacityNumber(map);
+    }
+
+    @Override
+    public void   insertOrderMileage(Map<String, Object> map) {
+        //获取运输订单号
+        String orderNumber = (String) map.get("orderNumber");
+        //获取并插入总实绩Id
+        BigDecimal truckTotalId = tmstruckArrivalResultMapper.getTotalIdByOrderNumber(orderNumber);
+        //获取总距离
+        String orderMileage = (String) map.get("orderMileage");
+        //将两个属性放到运输订单中
+        HashMap<String,Object> omstruckOrder=new HashMap<>();
+        omstruckOrder.put("truckTotalId",truckTotalId);
+        omstruckOrder.put("orderMileage",orderMileage);
+         offSiteTransportationMapper.insertOrderMileage(omstruckOrder);
+
+    }
+
+    @Override
+    public void removeDate() {
+       List<Map<String,Object>> list= offSiteTransportationMapper.getReceiptData();
+       for (Map<String,Object> map:list){
+         int i=  offSiteTransportationMapper.insertReceive(map);
+       }
+    }
+
+    public int orderClose(String orderNumber){
+        return offSiteTransportationMapper.orderClose(orderNumber);
+    }
+
     public String savePath() throws Exception {
 
         Map<String, Object> parem=offSiteTransportationMapper.getTruckFactoryResult("WYSDD2021091000000002");
@@ -69,8 +103,8 @@ public class OffSiteTransportationServiceImpl implements OffSiteTransportationSe
             String orderNumber = (String) map.get("orderNumber");
             String resultArrivalAddress = (String) map.get("resultArrivalAddress");
             //获取空货箱照片、已签字的送货单照片
-            String resultEmptyContainerPhoto = (String) map.get("url1");
-            String resultSignedNotePhoto = (String) map.get("url2");
+            String resultEmptyContainerPhoto = (String) map.get("url0");
+            String resultSignedNotePhoto = (String) map.get("url1");
             tmstruckReceiptResult.setResultArrivalAddress(resultArrivalAddress);
             tmstruckReceiptResult.setResultEmptyContainerPhoto(resultEmptyContainerPhoto);
             tmstruckReceiptResult.setResultSignedNotePhoto(resultSignedNotePhoto);

+ 1 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java

@@ -172,6 +172,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         tmstruckLoadResult.setInsertUpdateRemark((String) map.get("insertUpdateRemark"));
         steelMesMap.put("materialId", materialId);
         //给达钢发送委托
+        steelMesMap.put("numberOfFurnaces", map.get("numberOfFurnaces")); //炉号件数
         int i = tmstruckMeasureCommissionService.addSteelMeasureCommission(steelMesMap);
         if(i == 0){
             return i;

+ 9 - 5
src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java

@@ -172,17 +172,21 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
             measureCommission.put("isInsert", true);
             measureCommission.put("isRelationEAS", true);
             measureCommission.put("flowTo", "出厂钢材");
+            measureCommission.put("numberOfFurnaces",map.get("numberOfFurnaces"));
             Object isPoundSale = measureCommission.get("isPoundSale");
             measureCommission.remove("isPoundSale");
             if(isPoundSale != null){
                 if(DataChange.dataToBigDecimal(isPoundSale).intValue() == 0){
                     measureCommission.put("deliveryMethod", "磅重交货");
-                    measureCommission.remove("meterWeight");
                 }else {
                     measureCommission.put("deliveryMethod", "理重交货");
-                    BigDecimal meterWeight = DataChange.dataToBigDecimal(measureCommission.get("meterWeight")).divide(new BigDecimal(1000));
-                    measureCommission.remove("meterWeight");
-                    measureCommission.put("theoryWeight", meterWeight.setScale(4, BigDecimal.ROUND_HALF_UP));//理重除1000保留四位小数
+                }
+            }else {
+                String materiaName = (String) measureCommission.get("materiaName");
+                if(materiaName.contains("盘螺")){ //如果名字中包含盘螺则为磅重交货
+                    measureCommission.put("deliveryMethod", "磅重交货");
+                }else {
+                    measureCommission.put("deliveryMethod", "理重交货");
                 }
             }
             //查询已经计量物资
@@ -647,7 +651,7 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
     @Override
     synchronized public Map<String, Object> sendLiuPiMeasureCommission(String capacityNumber) throws InterruptedException {
         Map<String, Object> map = new HashMap<>();
-        String num = "DZGTZDLP" + System.currentTimeMillis();
+        String num = "WZGTZDLP" + System.currentTimeMillis();
         map.put("carNumber", capacityNumber);
         map.put("purchOrder", num);
         //通过车牌号查询上一次委托发送数据

+ 28 - 24
src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
+import com.steerinfo.dil.mapper.TmstruckReceiveResultMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.service.ITmstruckReceiptResultService;
@@ -36,6 +37,9 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
     @Autowired
     private UtilsMapper utilsMapper;
 
+    @Autowired
+    private TmstruckReceiveResultMapper tmstruckReceiveResultMapper;
+
     @Autowired
     private TmstruckArrivalResultMapper tmstruckArrivalResultMapper;
 
@@ -58,7 +62,7 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
         tmstruckReceiptResult.setUpdateUsername("admin");
         tmstruckReceiptResult.setUpdateTime(new Date());
         tmstruckReceiptResult.setInsertUpdateRemark("无");
-        tmstruckReceiptResultMapper.insert(tmstruckReceiptResult);
+        tmstruckReceiptResultMapper.insertSelective(tmstruckReceiptResult);
         return new BigDecimal(id);
     }
 
@@ -89,10 +93,10 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
             case 8:
             case 17:
             case 18:
-                return tmstruckReceiptResultMapper.getCGReceiptResult(map); //apiId: 107
+                return tmstruckReceiveResultMapper.getCGReceiveResult(map); //apiId: 107
             case 9:
             case 10:
-                return tmstruckReceiptResultMapper.getInwardReceipt(map); //apiId: 107
+                return tmstruckReceiveResultMapper.getInwardReceive(map); //apiId: 107
             case 11:
 
         }
@@ -104,33 +108,33 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
      * @param  {resultTotalId:总实绩ID}
      * @return
      */
-    public int addReceiptResult(BigDecimal resultTotalId){
-        //根据总实绩ID查询收货实绩查看是否已收货
-        Integer receiptResult = tmstruckReceiptResultMapper.getReceiptResult(resultTotalId);
-        if(receiptResult != null){
-            return 0;
-        }
-        //新增完卸车实绩后新增一条收货实绩
-        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
-        tmstruckReceiptResult.setId(tmstruckReceiptResultMapper.selectMaxId());//添加主键
-        tmstruckReceiptResult.setResultTotalId(resultTotalId);//添加总实绩Id
-        tmstruckReceiptResult.setStatus(new BigDecimal(0)); // 卸货完成后添加的为虚拟收货实绩
-        return tmstruckReceiptResultMapper.insertSelective(tmstruckReceiptResult);
-    }
+//    public int addReceiptResult(BigDecimal resultTotalId){
+//        //根据总实绩ID查询收货实绩查看是否已收货
+//        Integer receiptResult = tmstruckReceiptResultMapper.getReceiptResult(resultTotalId);
+//        if(receiptResult != null){
+//            return 0;
+//        }
+//        //新增完卸车实绩后新增一条收货实绩
+//        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
+//        tmstruckReceiptResult.setId(tmstruckReceiptResultMapper.selectMaxId());//添加主键
+//        tmstruckReceiptResult.setResultTotalId(resultTotalId);//添加总实绩Id
+//        tmstruckReceiptResult.setStatus(new BigDecimal(0)); // 卸货完成后添加的为虚拟收货实绩
+//        return tmstruckReceiptResultMapper.insertSelective(tmstruckReceiptResult);
+//    }
 
     /**
      * 确认收货(修改收货实绩为真实收货实绩)
      * @param map {resultTotalId:总实绩ID}
      * @return
      */
-    public int updateReceiptResult(Map<String, Object> map){
-        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
-        tmstruckReceiptResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
-        tmstruckReceiptResult.setStatus(new BigDecimal(1));
-        tmstruckReceiptResult.setInsertUsername("admin");
-        tmstruckReceiptResult.setInsertTime(new Date());
-        return tmstruckReceiptResultMapper.updateByTotalResultId(tmstruckReceiptResult);
-    }
+//    public int updateReceiptResult(Map<String, Object> map){
+//        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
+//        tmstruckReceiptResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+//        tmstruckReceiptResult.setStatus(new BigDecimal(1));
+//        tmstruckReceiptResult.setInsertUsername("admin");
+//        tmstruckReceiptResult.setInsertTime(new Date());
+//        return tmstruckReceiptResultMapper.updateByTotalResultId(tmstruckReceiptResult);
+//    }
 
     /**
      * 新增钢材到异地库达州站驻港人员确定收货

+ 51 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiveResultServiceImpl.java

@@ -0,0 +1,51 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstruckReceiveResultMapper;
+import com.steerinfo.dil.model.TmstruckReceiptResult;
+import com.steerinfo.dil.model.TmstruckReceiveResult;
+import com.steerinfo.dil.service.ITmstruckReceiveResultService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+
+/**
+ * TmstruckReceiveResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-29 06:27
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-29
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckReceiveResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckReceiveResultService")
+public class TmstruckReceiveResultServiceImpl{
+
+    @Autowired
+    private TmstruckReceiveResultMapper tmstruckReceiveResultMapper;
+
+    /**
+     * 新增一条虚拟收货实绩
+     * @param  {resultTotalId:总实绩ID}
+     * @return
+     */
+    public int addReceiveResult(BigDecimal resultTotalId){
+        //根据总实绩ID查询收货实绩查看是否已收货
+        BigDecimal receiveResult = tmstruckReceiveResultMapper.getReceiveResult(resultTotalId);
+        if(receiveResult != null){
+            return 0;
+        }
+        //新增完卸车实绩后新增一条收货实绩
+        TmstruckReceiveResult tmstruckReceiveResult = new TmstruckReceiveResult();
+        tmstruckReceiveResult.setId(tmstruckReceiveResultMapper.selectMaxId());//添加主键
+        tmstruckReceiveResult.setResultTotalId(resultTotalId);//添加总实绩Id
+        tmstruckReceiveResult.setStatus(new BigDecimal(0)); // 卸货完成后添加的为虚拟收货实绩
+        return tmstruckReceiveResultMapper.insertSelective(tmstruckReceiveResult);
+    }
+}

+ 4 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java

@@ -38,6 +38,9 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
     @Autowired
     private TmstruckReceiptResultServiceImpl tmstruckReceiptResultService;
 
+    @Autowired
+    private TmstruckReceiveResultServiceImpl tmstruckReceiveResultService;
+
     @Autowired
     private TmstruckLoadResultMapper tmstruckLoadResultMapper;
 
@@ -206,7 +209,7 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
             case 17:
             case 18:
             case 20:
-                tmstruckReceiptResultService.addReceiptResult(DataChange.dataToBigDecimal(map.get("resultTotalId"))); //新增完卸车实绩后新增一条收货实绩
+                tmstruckReceiveResultService.addReceiveResult(DataChange.dataToBigDecimal(map.get("resultTotalId"))); //新增完卸车实绩后新增一条收货实绩
                 break;
         }
         //卸货成功后推送消息给websocket

+ 6 - 0
src/main/java/com/steerinfo/route/controller/TmstruckArrivalResultController.java

@@ -115,4 +115,10 @@ public class TmstruckArrivalResultController extends BaseRESTfulController {
         String addressDistrict=tmstruckArrivalResultService.getAddressDistrict(orderNumber);
         return addressDistrict;
     }
+
+    @PostMapping(value = "/uploadImage")
+    public String uploadImage(String orderNumber,MultipartFile file) throws Exception {
+        String url = imageFileUtils.updateFile(file);
+        return url;
+    }
 }

+ 227 - 0
src/main/java/com/steerinfo/route/model/TmstruckReceiptResult.java

@@ -0,0 +1,227 @@
+package com.steerinfo.route.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="收货实绩")
+public class TmstruckReceiptResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 总实绩ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="总实绩ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 空货箱照片(RESULT_EMPTY_CONTAINER_PHOTO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="空货箱照片",required=false)
+    private String resultEmptyContainerPhoto;
+
+    /**
+     * 已签字的送货单照片(RESULT_SIGNED_NOTE_PHOTO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="已签字的送货单照片",required=false)
+    private String resultSignedNotePhoto;
+
+    /**
+     * 客户签收单照片(RESULT_RECEIVE_NOTE_PHOTO,VARCHAR,100)
+     */
+    @ApiModelProperty(value="客户签收单照片",required=false)
+    private String resultReceiveNotePhoto;
+
+    /**
+     * 异地库ID(WAREHOUSE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="异地库ID",required=false)
+    private BigDecimal warehouseId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+    /**
+     * 收货状态(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="收货状态",required=false)
+    private BigDecimal status;
+
+    /**
+     * 抵达收货点的地址(RESULT_ARRIVAL_ADDRESS,VARCHAR,100)
+     */
+    @ApiModelProperty(value="抵达收货点的地址",required=false)
+    private String resultArrivalAddress;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public String getResultEmptyContainerPhoto() {
+        return resultEmptyContainerPhoto;
+    }
+
+    public void setResultEmptyContainerPhoto(String resultEmptyContainerPhoto) {
+        this.resultEmptyContainerPhoto = resultEmptyContainerPhoto == null ? null : resultEmptyContainerPhoto.trim();
+    }
+
+    public String getResultSignedNotePhoto() {
+        return resultSignedNotePhoto;
+    }
+
+    public void setResultSignedNotePhoto(String resultSignedNotePhoto) {
+        this.resultSignedNotePhoto = resultSignedNotePhoto == null ? null : resultSignedNotePhoto.trim();
+    }
+
+    public String getResultReceiveNotePhoto() {
+        return resultReceiveNotePhoto;
+    }
+
+    public void setResultReceiveNotePhoto(String resultReceiveNotePhoto) {
+        this.resultReceiveNotePhoto = resultReceiveNotePhoto == null ? null : resultReceiveNotePhoto.trim();
+    }
+
+    public BigDecimal getStatus() {
+        return status;
+    }
+
+    public void setStatus(BigDecimal status) {
+        this.status = status;
+    }
+
+    public BigDecimal getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(BigDecimal warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public String getResultArrivalAddress() {
+        return resultArrivalAddress;
+    }
+
+    public void setResultArrivalAddress(String resultArrivalAddress) {
+        this.resultArrivalAddress = resultArrivalAddress == null ? null : resultArrivalAddress.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultEmptyContainerPhoto=").append(resultEmptyContainerPhoto);
+        sb.append(", resultSignedNotePhoto=").append(resultSignedNotePhoto);
+        sb.append(", resultReceiveNotePhoto=").append(resultReceiveNotePhoto);
+        sb.append(", warehouseId=").append(warehouseId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", resultArrivalAddress=").append(resultArrivalAddress);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 0 - 4
src/main/java/com/steerinfo/route/model/VcMeasurerec.java

@@ -1,4 +0,0 @@
-package com.steerinfo.route.model;
-
-public class VcMeasurerec {
-}

+ 1 - 1
src/main/java/com/steerinfo/route/service/impl/TmstruckReceiptResultChildServiceImpl.java

@@ -45,6 +45,6 @@ public class TmstruckReceiptResultChildServiceImpl implements ITmstruckReceiptRe
         tmstruckReceiptResultChild.setUpdateUsername("admin");
         tmstruckReceiptResultChild.setUpdateTime(new Date());
         tmstruckReceiptResultChild.setInsertUpdateRemark("无");
-        return tmstruckReceiptResultChildMapper.insert(tmstruckReceiptResultChild);
+        return tmstruckReceiptResultChildMapper.insertSelective(tmstruckReceiptResultChild);
     }
 }

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

@@ -36,7 +36,7 @@ openfeign:
   WMSFeign:
     url: ${WMSFEIGN_URL:172.16.33.162:8012}
   OmsFeign:
-    url: ${OMSFEIGN_URL:172.16.33.162:8016}
+    url: ${OMSFEIGN_URL:localhost:8016}
   JoinFeign:
     url: ${JOINFEIGN_URL:172.16.33.162:8006}
   QmsFeign:

+ 35 - 0
src/main/resources/com/steerinfo/dil/mapper/OffSiteTransportationMapper.xml

@@ -1,6 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.OffSiteTransportationMapper">
+    <insert id="insertOrderMileage" >
+         update TMSTRUCK_RECEIPT_RESULT set ORDER_MILEAGE = #{orderMileage} where RESULT_TOTAL_ID = #{truckTotalId}
+    </insert>
+    <insert id="insertReceive">
+        insert into TMSTRUCK_RECEIVE_RESULT(RESULT_RECEIVE_ID ,result_total_id ,insert_username ,insert_time ,status) values('${RESULTID}','${RESULTTOTALID}','${INSERUSERNAME}', #{INSERTTIME,jdbcType=TIMESTAMP},'${STATUS}')
+    </insert>
+    <update id="orderClose">
+        update OMSTRUCK_ORDER set ORDER_STATUS = '2' where ORDER_NUMBER = #{orderNumber}
+    </update>
     
     <select id="getInTransitTransportation" resultType="java.util.Map">
       select
@@ -241,6 +250,32 @@
         select o_order.ORDER_STATUS from OMSTRUCK_ORDER o_order
         where o_order.ORDER_NUMBER = #{orderNumber}
     </select>
+    <select id="getStartAndEndCapacityNumber" resultType="java.util.Map">
+         select distinct
+           r_shipper.SHIPPER_NAME "shipperName",
+           receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
+           r_capacity.CAPACITY_NUMBER "capacityNumber",
+           t_leave.RESULT_OUT_GATE_TIME "resultOutGateTime"
+        from OMSTRUCK_ORDER o_torder
+               left join TMSTRUCK_TOTAL_RESULT t_total
+                         on o_torder.ORDER_ID=t_total.ORDER_ID
+               left join RMS_CAPACITY r_capacity
+                         on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
+               left join AMS_SALE_ORDER_MATERIAL sale_material
+                         on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
+               left join RMS_RECEIVE_ADDRESS receive_address
+                         on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
+               left join AMS_SALE_ORDER a_s_order
+                         on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
+               left join RMS_SHIPPER r_shipper
+                         on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
+               left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
+                         on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
+        where o_torder.ORDER_NUMBER=#{orderNumber}
+    </select>
+    <select id="getReceiptData" resultType="java.util.Map">
+        select result_id resultId,result_total_id resultTotalId,insert_username inserUserName,insert_time insertTime,status status from TMSTRUCK_RECEIPT_RESULT
+    </select>
     <sql id="orderBy">
         <if test="orderField != null and orderField != ''">
             order by  "${orderField}"

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

@@ -1229,4 +1229,5 @@
         select oo.order_line_sequence from omstruck_order oo
         where oo.order_id =#{orderId}
     </select>
+    <select id="getLeaveFactoryList" resultType="java.util.Map"></select>
 </mapper>

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

@@ -1314,7 +1314,7 @@
                         OO.INSERT_UPDATE_REMARK                              "demo",
                         ASM.EAS_PRIMARY_ID                                   "FLID",
                         MAORTC.TRUCK_CALCULATE_NUMBER                        "steelyardNum",
-                        ASM.METER_WEIGHT                                     "meterWeight",
+                        ASM.MATERIAL_WEIGHT                                  "theoryWeight",
                         ASM.IS_POUND_SALE                                    "isPoundSale"
                  from OMSTRUCK_ORDER OO
                           left join OMSTRUCK_ORDER_MATERIAL OOM on OO.ORDER_ID = OOM.ORDER_ID

+ 183 - 157
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -9,6 +9,7 @@
     <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="VARCHAR" property="resultSignedNotePhoto" />
     <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="VARCHAR" property="resultReceiveNotePhoto" />
     <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
+    <result column="ORDER_MILEAGE" jdbcType="DECIMAL" property="orderMileage" />
     <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
     <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
     <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
@@ -19,12 +20,12 @@
   </resultMap>
   <sql id="columns">
     RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO,
-    RESULT_RECEIVE_NOTE_PHOTO, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+    RESULT_RECEIVE_NOTE_PHOTO, WAREHOUSE_ID,ORDER_MILEAGE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
     UPDATE_TIME,STATUS, INSERT_UPDATE_REMARK, RESULT_ARRIVAL_ADDRESS
   </sql>
   <sql id="columns_alias">
     t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_EMPTY_CONTAINER_PHOTO, t.RESULT_SIGNED_NOTE_PHOTO,
-    t.RESULT_RECEIVE_NOTE_PHOTO, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
+    t.RESULT_RECEIVE_NOTE_PHOTO, t.WAREHOUSE_ID,ORDER_MILEAGE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
     t.UPDATE_TIME,STATUS, t.INSERT_UPDATE_REMARK, t.RESULT_ARRIVAL_ADDRESS
   </sql>
   <sql id="select">
@@ -53,6 +54,9 @@
       <if test="warehouseId != null">
         and WAREHOUSE_ID = #{warehouseId}
       </if>
+      <if test="orderMileage != null">
+        and ORDER_MILEAGE = #{orderMileage}
+      </if>
       <if test="insertUsername != null and insertUsername != ''">
         and INSERT_USERNAME = #{insertUsername}
       </if>
@@ -96,6 +100,9 @@
       <if test="warehouseId != null">
         and WAREHOUSE_ID = #{warehouseId}
       </if>
+      <if test="orderMileage != null">
+        and ORDER_MILEAGE = #{orderMileage}
+      </if>
       <if test="insertUsername != null and insertUsername != ''">
         and INSERT_USERNAME LIKE '%${insertUsername}%'
       </if>
@@ -141,6 +148,9 @@
     <if test="warehouseId != null">
       or WAREHOUSE_ID = #{warehouseId}
     </if>
+    <if test="orderMileage != null">
+      or ORDER_MILEAGE = #{orderMileage}
+    </if>
     <if test="insertUsername != null and insertUsername != ''">
       or INSERT_USERNAME = #{insertUsername}
     </if>
@@ -166,12 +176,12 @@
   <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
     insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
                                          RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
-                                         WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME,
+                                         WAREHOUSE_ID,ORDER_MILEAGE, INSERT_USERNAME, INSERT_TIME,
                                          UPDATE_USERNAME, UPDATE_TIME,STATUS, INSERT_UPDATE_REMARK,
                                          RESULT_ARRIVAL_ADDRESS)
     values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
             #{resultSignedNotePhoto,jdbcType=VARCHAR}, #{resultReceiveNotePhoto,jdbcType=VARCHAR},
-            #{warehouseId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+            #{warehouseId,jdbcType=DECIMAL},#{orderMileage,jdbcType=DECIMAL},  #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
             #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},#{status,jdbcType=DECIMAL}, #{insertUpdateRemark,jdbcType=VARCHAR},
             #{resultArrivalAddress,jdbcType=VARCHAR})
   </insert>
@@ -196,6 +206,9 @@
       <if test="warehouseId != null">
         WAREHOUSE_ID,
       </if>
+      <if test="orderMileage != null">
+        ORDER_MILEAGE,
+      </if>
       <if test="insertUsername != null">
         INSERT_USERNAME,
       </if>
@@ -237,6 +250,9 @@
       <if test="warehouseId != null">
         #{warehouseId,jdbcType=DECIMAL},
       </if>
+      <if test="orderMileage != null">
+        #{orderMileage,jdbcType=DECIMAL},
+      </if>
       <if test="insertUsername != null">
         #{insertUsername,jdbcType=VARCHAR},
       </if>
@@ -267,6 +283,7 @@
         RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
         RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
         WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+        ORDER_MILEAGE = #{orderMileage,jdbcType=DECIMAL},
         INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
         INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
         UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
@@ -294,6 +311,9 @@
       <if test="warehouseId != null">
         WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
       </if>
+      <if test="orderMileage != null">
+        ORDER_MILEAGE = #{orderMileage,jdbcType=DECIMAL},
+      </if>
       <if test="insertUsername != null">
         INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
       </if>
@@ -335,7 +355,7 @@
     (RESULT_ID,
     RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
     RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
-    WAREHOUSE_ID, INSERT_USERNAME,
+    WAREHOUSE_ID,ORDER_MILEAGE, INSERT_USERNAME,
     INSERT_TIME, UPDATE_USERNAME,
     UPDATE_TIME, STATUS,INSERT_UPDATE_REMARK,
     RESULT_ARRIVAL_ADDRESS)
@@ -344,7 +364,7 @@
     #{item.resultId,jdbcType=DECIMAL},
     #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR},
     #{item.resultSignedNotePhoto,jdbcType=VARCHAR}, #{item.resultReceiveNotePhoto,jdbcType=VARCHAR},
-    #{item.warehouseId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.warehouseId,jdbcType=DECIMAL},#{item.orderMileage,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
     #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
     #{item.updateTime,jdbcType=TIMESTAMP},#{item.status,jdbcType=DECIMAL}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
     #{item.resultArrivalAddress,jdbcType=VARCHAR} from dual
@@ -377,6 +397,10 @@
     <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
     </foreach>
+    ,ORDER_MILEAGE=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.orderMileage,jdbcType=DECIMAL}
+    </foreach>
     ,INSERT_USERNAME=
     <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
       when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
@@ -422,13 +446,13 @@
   
   
   <!--  获取最大ID值  -->
-
-<!--  通过总实绩ID 查询签收实绩ID -->
+  
+  <!--  通过总实绩ID 查询签收实绩ID -->
   <select id="getIdByTotalResultId" parameterType="int" resultType="int">
     select TRR.RESULT_ID from TMSTRUCK_RECEIPT_RESULT TRR where TRR.RESULT_TOTAL_ID = #{totalResultId}
   </select>
-
-<!--通过总实绩Id 更新 状态码 为 1 已签收-->
+  
+  <!--通过总实绩Id 更新 状态码 为 1 已签收-->
   <update id="updateByTotalResultId" parameterType="java.util.Map">
     update TMSTRUCK_RECEIPT_RESULT
     <set>
@@ -466,7 +490,7 @@
     </set>
     where RESULT_TOTAL_ID = #{resultTotalId}
   </update>
-
+  
   <!--  通过签收时间排序 -->
   <sql id="orderBy">
     <if test="orderField != null and orderField != ''">
@@ -479,105 +503,106 @@
       order by "insertTime" desc
     </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
+    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>
+  
 
 <!--  查询内转钢材到异地库收货实绩-->
     <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
@@ -632,57 +657,57 @@
         </foreach>
       </if>
     </where>
-      <include refid="orderBy"></include>
-    </select>
-
+    <include refid="orderBy"></include>
+  </select>
+  
   <select id="getInwardReceipt" parameterType="java.util.Map" resultType="java.util.Map">
-
+    
     select *
     from (
-           select 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",
-                  tqr.result_issampling       "issampling",
-                  TRR.INSERT_USERNAME         "insertUsername",
-                  TRR.INSERT_TIME             "insertTime",
-                  RW.WAREHOUSE_NAME           "warehouseName"
-           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 AMSTRUCK_INWARD_PLAN AIP
-                            on AIP.PLAN_ID = OO.ORDER_PLAN_ID
-                  left join AMSTRUCK_REQUIREMENT_PLAN ARP
-                            on ARP.PLAN_ID = AIP.PLAN_ID
-                  left join AMSTRUCK_INWARD_REQUIREMENT AIR
-                            on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
-                  left join AMS_PURCHASE_ORDER APO
-                            on APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_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 tmstruck_quality_result tqr
-                            on tqr.total_result_id = ttr.result_total_id
-                  left join RMS_WAREHOUSE RW
-                            on TUR.RESULT_UNLOAD_PLACE_ID = RW.WAREHOUSE_ID
-           where TRR.STATUS = 1
-             and OO.ORDER_TYPE = #{orderTypee}
-         )
+    select 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",
+    tqr.result_issampling       "issampling",
+    TRR.INSERT_USERNAME         "insertUsername",
+    TRR.INSERT_TIME             "insertTime",
+    RW.WAREHOUSE_NAME           "warehouseName"
+    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 AMSTRUCK_INWARD_PLAN AIP
+    on AIP.PLAN_ID = OO.ORDER_PLAN_ID
+    left join AMSTRUCK_REQUIREMENT_PLAN ARP
+    on ARP.PLAN_ID = AIP.PLAN_ID
+    left join AMSTRUCK_INWARD_REQUIREMENT AIR
+    on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
+    left join AMS_PURCHASE_ORDER APO
+    on APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_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 tmstruck_quality_result tqr
+    on tqr.total_result_id = ttr.result_total_id
+    left join RMS_WAREHOUSE RW
+    on TUR.RESULT_UNLOAD_PLACE_ID = RW.WAREHOUSE_ID
+    where TRR.STATUS = 1
+    and OO.ORDER_TYPE = #{orderTypee}
+    )
     <where>
       <if test="materialName != null">
         <foreach collection="materialName" item="item" open="(" separator="or" close=")">
@@ -746,6 +771,7 @@
     </where>
     <include refid="orderBy"></include>
   </select>
+  
 
 <!-- 查询是否已收过货 -->
     <select id="getReceiptResult" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
@@ -753,9 +779,9 @@
         from TMSTRUCK_RECEIPT_RESULT TRR
         where TRR.RESULT_TOTAL_ID = #{resultTotalId}
     </select>
-<!--  <select id="selectMaxId"  resultType="java.math.BigDecimal">-->
-<!--    select max(RESULT_ID) from TMSTRUCK_RECEIPT_RESULT-->
-<!--  </select>-->
+  <!--  <select id="selectMaxId"  resultType="java.math.BigDecimal">-->
+  <!--    select max(RESULT_ID) from TMSTRUCK_RECEIPT_RESULT-->
+  <!--  </select>-->
   
   <select id="getReceiptResultInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
     select * from(

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

@@ -0,0 +1,578 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.dil.mapper.TmstruckReceiveResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckReceiveResult">
+    <id column="RESULT_RECEIVE_ID" jdbcType="DECIMAL" property="resultReceiveId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="RESULT_RECEIVE_TIME" jdbcType="TIMESTAMP" property="resultReceiveTime" />
+    <result column="RECEIVE_SINGER_ID" jdbcType="DECIMAL" property="receiveSingerId" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="STATUS" jdbcType="DECIMAL" property="status" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_RECEIVE_ID, RESULT_TOTAL_ID, RESULT_RECEIVE_TIME, RECEIVE_SINGER_ID, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_RECEIVE_ID, t.RESULT_TOTAL_ID, t.RESULT_RECEIVE_TIME, t.RECEIVE_SINGER_ID, 
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
+    t.STATUS
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM TMSTRUCK_RECEIVE_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM TMSTRUCK_RECEIVE_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultReceiveId != null">
+        and RESULT_RECEIVE_ID = #{resultReceiveId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultReceiveTime != null">
+        and TO_CHAR(RESULT_RECEIVE_TIME,'yyyy-MM-dd') = #{resultReceiveTime}
+      </if>
+      <if test="receiveSingerId != null">
+        and RECEIVE_SINGER_ID = #{receiveSingerId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="status != null">
+        and STATUS = #{status}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultReceiveId != null">
+        and RESULT_RECEIVE_ID = #{resultReceiveId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultReceiveTime != null">
+        and TO_CHAR(RESULT_RECEIVE_TIME,'yyyy-MM-dd') = #{resultReceiveTime}
+      </if>
+      <if test="receiveSingerId != null">
+        and RECEIVE_SINGER_ID = #{receiveSingerId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="status != null">
+        and STATUS = #{status}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRUCK_RECEIVE_RESULT
+    where RESULT_RECEIVE_ID = #{resultReceiveId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_RECEIVE_RESULT
+    where 1!=1 
+      <if test="resultTotalId != null">
+        or RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultReceiveTime != null">
+        or TO_CHAR(RESULT_RECEIVE_TIME,'yyyy-MM-dd') = '#{resultReceiveTime}'
+      </if>
+      <if test="receiveSingerId != null">
+        or RECEIVE_SINGER_ID = #{receiveSingerId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        or INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        or UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="status != null">
+        or STATUS = #{status}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckReceiveResult">
+    insert into TMSTRUCK_RECEIVE_RESULT (RESULT_RECEIVE_ID, RESULT_TOTAL_ID, RESULT_RECEIVE_TIME, 
+      RECEIVE_SINGER_ID, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      STATUS)
+    values (#{resultReceiveId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultReceiveTime,jdbcType=TIMESTAMP}, 
+      #{receiveSingerId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
+      #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{status,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckReceiveResult">
+    insert into TMSTRUCK_RECEIVE_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultReceiveId != null">
+        RESULT_RECEIVE_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="resultReceiveTime != null">
+        RESULT_RECEIVE_TIME,
+      </if>
+      <if test="receiveSingerId != null">
+        RECEIVE_SINGER_ID,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="status != null">
+        STATUS,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultReceiveId != null">
+        #{resultReceiveId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultReceiveTime != null">
+        #{resultReceiveTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="receiveSingerId != null">
+        #{receiveSingerId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckReceiveResult">
+    update TMSTRUCK_RECEIVE_RESULT
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      RESULT_RECEIVE_TIME = #{resultReceiveTime,jdbcType=TIMESTAMP},
+      RECEIVE_SINGER_ID = #{receiveSingerId,jdbcType=DECIMAL},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      STATUS = #{status,jdbcType=DECIMAL}
+    where RESULT_RECEIVE_ID = #{resultReceiveId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckReceiveResult">
+    update TMSTRUCK_RECEIVE_RESULT
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultReceiveTime != null">
+        RESULT_RECEIVE_TIME = #{resultReceiveTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="receiveSingerId != null">
+        RECEIVE_SINGER_ID = #{receiveSingerId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        STATUS = #{status,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_RECEIVE_ID = #{resultReceiveId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where RESULT_RECEIVE_ID = #{resultReceiveId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into TMSTRUCK_RECEIVE_RESULT 
+      (RESULT_RECEIVE_ID, 
+      RESULT_TOTAL_ID, RESULT_RECEIVE_TIME, 
+      RECEIVE_SINGER_ID, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      STATUS)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultReceiveId,jdbcType=DECIMAL}, 
+      #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultReceiveTime,jdbcType=TIMESTAMP}, 
+      #{item.receiveSingerId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.status,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update TMSTRUCK_RECEIVE_RESULT
+     set
+       RESULT_RECEIVE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.resultReceiveId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_TOTAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_RECEIVE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.resultReceiveTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,RECEIVE_SINGER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.receiveSingerId,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,STATUS=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_RECEIVE_ID" separator=" ">
+          when #{item.resultReceiveId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
+       </foreach>
+     where RESULT_RECEIVE_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.resultReceiveId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRUCK_RECEIVE_RESULT
+    where RESULT_RECEIVE_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <!-- 查询是否已收过货 -->
+  <select id="getReceiveResult" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select TRR.RESULT_RECEIVE_ID
+    from TMSTRUCK_RECEIVE_RESULT TRR
+    where TRR.RESULT_TOTAL_ID = #{resultTotalId}
+  </select>
+
+  <!--  查询所有签收实绩 -->
+  <select id="getCGReceiveResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select
+    *
+    from (
+    select
+    OO.ORDER_ID                  "orderId",
+    TRR.RESULT_RECEIVE_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_RECEIVE_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>
+
+  <!--  通过签收时间排序 -->
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+    <if test="orderField == null  ">
+      order by "insertTime" desc
+    </if>
+  </sql>
+
+
+  <select id="getInwardReceive" parameterType="java.util.Map" resultType="java.util.Map">
+
+    select *
+    from (
+    select TRR.RESULT_RECEIVE_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",
+    tqr.result_issampling       "issampling",
+    TRR.INSERT_USERNAME         "insertUsername",
+    TRR.INSERT_TIME             "insertTime",
+    RW.WAREHOUSE_NAME           "warehouseName"
+    from TMSTRUCK_RECEIVE_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 AMSTRUCK_INWARD_PLAN AIP
+    on AIP.PLAN_ID = OO.ORDER_PLAN_ID
+    left join AMSTRUCK_REQUIREMENT_PLAN ARP
+    on ARP.PLAN_ID = AIP.PLAN_ID
+    left join AMSTRUCK_INWARD_REQUIREMENT AIR
+    on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
+    left join AMS_PURCHASE_ORDER APO
+    on APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_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 tmstruck_quality_result tqr
+    on tqr.total_result_id = ttr.result_total_id
+    left join RMS_WAREHOUSE RW
+    on TUR.RESULT_UNLOAD_PLACE_ID = RW.WAREHOUSE_ID
+    where TRR.STATUS = 1
+    and OO.ORDER_TYPE = #{orderTypee}
+    )
+    <where>
+      <if test="materialName != null">
+        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+          "materialName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="purchaseOrderNo != null">
+        and
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" 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="issampling != null">
+        and
+        <foreach collection="issampling" item="item" open="(" separator="or" close=")">
+          "issampling" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertUsername != null">
+        and
+        <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
+          "insertUsername" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertTime != null">
+        and
+        <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
+          "insertTime" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
+
+</mapper>

+ 0 - 573
src/main/resources/com/steerinfo/route/mapper/TmstruckReceiptResultMapper.xml

@@ -1,573 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.steerinfo.route.mapper.TmstruckReceiptResultMapper">
-  <resultMap id="BaseResultMap" type="com.steerinfo.route.model.TmstruckReceiptResult">
-    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
-    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
-    <result column="RESULT_EMPTY_CONTAINER_PHOTO" jdbcType="VARCHAR" property="resultEmptyContainerPhoto" />
-    <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="VARCHAR" property="resultSignedNotePhoto" />
-    <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="VARCHAR" property="resultReceiveNotePhoto" />
-    <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
-    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
-    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
-    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
-    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
-    <result column="RESULT_ARRIVAL_ADDRESS" jdbcType="VARCHAR" property="resultArrivalAddress" />
-  </resultMap>
-  <sql id="columns">
-    RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO, 
-    RESULT_RECEIVE_NOTE_PHOTO, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-    UPDATE_TIME, INSERT_UPDATE_REMARK, RESULT_ARRIVAL_ADDRESS
-  </sql>
-  <sql id="columns_alias">
-    t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_EMPTY_CONTAINER_PHOTO, t.RESULT_SIGNED_NOTE_PHOTO, 
-    t.RESULT_RECEIVE_NOTE_PHOTO, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.RESULT_ARRIVAL_ADDRESS
-  </sql>
-  <sql id="select">
-    SELECT <include refid="columns" /> FROM TMSTRUCK_RECEIPT_RESULT
-  </sql>
-  <sql id="select_alias">
-    SELECT <include refid="columns_alias" /> FROM TMSTRUCK_RECEIPT_RESULT t
-  </sql>
-  <sql id="where">
-    <where>
-      <if test="resultId != null">
-        and RESULT_ID = #{resultId}
-      </if>
-      <if test="resultTotalId != null">
-        and RESULT_TOTAL_ID = #{resultTotalId}
-      </if>
-      <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
-        and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
-      </if>
-      <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
-        and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
-      </if>
-      <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
-        and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
-      </if>
-      <if test="warehouseId != null">
-        and WAREHOUSE_ID = #{warehouseId}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        and INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="insertTime != null">
-        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        and UPDATE_USERNAME = #{updateUsername}
-      </if>
-      <if test="updateTime != null">
-        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-      </if>
-      <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
-        and RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
-      </if>
-    </where>
-  </sql>
-  <sql id="whereLike">
-    <where>
-      <if test="resultId != null">
-        and RESULT_ID = #{resultId}
-      </if>
-      <if test="resultTotalId != null">
-        and RESULT_TOTAL_ID = #{resultTotalId}
-      </if>
-      <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
-        and RESULT_EMPTY_CONTAINER_PHOTO LIKE '%${resultEmptyContainerPhoto}%'
-      </if>
-      <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
-        and RESULT_SIGNED_NOTE_PHOTO LIKE '%${resultSignedNotePhoto}%'
-      </if>
-      <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
-        and RESULT_RECEIVE_NOTE_PHOTO LIKE '%${resultReceiveNotePhoto}%'
-      </if>
-      <if test="warehouseId != null">
-        and WAREHOUSE_ID = #{warehouseId}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        and INSERT_USERNAME LIKE '%${insertUsername}%'
-      </if>
-      <if test="insertTime != null">
-        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        and UPDATE_USERNAME LIKE '%${updateUsername}%'
-      </if>
-      <if test="updateTime != null">
-        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
-      </if>
-      <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
-        and RESULT_ARRIVAL_ADDRESS LIKE '%${resultArrivalAddress}%'
-      </if>
-    </where>
-  </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-    delete from TMSTRUCK_RECEIPT_RESULT
-    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
-  </delete>
-  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-    delete from TMSTRUCK_RECEIPT_RESULT
-    where 1!=1
-    <if test="resultTotalId != null">
-      or RESULT_TOTAL_ID = #{resultTotalId}
-    </if>
-    <if test="resultEmptyContainerPhoto != null and resultEmptyContainerPhoto != ''">
-      or RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
-    </if>
-    <if test="resultSignedNotePhoto != null and resultSignedNotePhoto != ''">
-      or RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
-    </if>
-    <if test="resultReceiveNotePhoto != null and resultReceiveNotePhoto != ''">
-      or RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
-    </if>
-    <if test="warehouseId != null">
-      or WAREHOUSE_ID = #{warehouseId}
-    </if>
-    <if test="insertUsername != null and insertUsername != ''">
-      or INSERT_USERNAME = #{insertUsername}
-    </if>
-    <if test="insertTime != null">
-      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
-    </if>
-    <if test="updateUsername != null and updateUsername != ''">
-      or UPDATE_USERNAME = #{updateUsername}
-    </if>
-    <if test="updateTime != null">
-      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-    </if>
-    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-    </if>
-    <if test="resultArrivalAddress != null and resultArrivalAddress != ''">
-      or RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress}
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
-    insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
-                                         RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
-                                         WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME,
-                                         UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
-                                         RESULT_ARRIVAL_ADDRESS)
-    values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
-            #{resultSignedNotePhoto,jdbcType=VARCHAR}, #{resultReceiveNotePhoto,jdbcType=VARCHAR},
-            #{warehouseId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
-            #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
-            #{resultArrivalAddress,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
-    insert into TMSTRUCK_RECEIPT_RESULT
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="resultId != null">
-        RESULT_ID,
-      </if>
-      <if test="resultTotalId != null">
-        RESULT_TOTAL_ID,
-      </if>
-      <if test="resultEmptyContainerPhoto != null">
-        RESULT_EMPTY_CONTAINER_PHOTO,
-      </if>
-      <if test="resultSignedNotePhoto != null">
-        RESULT_SIGNED_NOTE_PHOTO,
-      </if>
-      <if test="resultReceiveNotePhoto != null">
-        RESULT_RECEIVE_NOTE_PHOTO,
-      </if>
-      <if test="warehouseId != null">
-        WAREHOUSE_ID,
-      </if>
-      <if test="insertUsername != null">
-        INSERT_USERNAME,
-      </if>
-      <if test="insertTime != null">
-        INSERT_TIME,
-      </if>
-      <if test="updateUsername != null">
-        UPDATE_USERNAME,
-      </if>
-      <if test="updateTime != null">
-        UPDATE_TIME,
-      </if>
-      <if test="insertUpdateRemark != null">
-        INSERT_UPDATE_REMARK,
-      </if>
-      <if test="resultArrivalAddress != null">
-        RESULT_ARRIVAL_ADDRESS,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="resultId != null">
-        #{resultId,jdbcType=DECIMAL},
-      </if>
-      <if test="resultTotalId != null">
-        #{resultTotalId,jdbcType=DECIMAL},
-      </if>
-      <if test="resultEmptyContainerPhoto != null">
-        #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="resultSignedNotePhoto != null">
-        #{resultSignedNotePhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="resultReceiveNotePhoto != null">
-        #{resultReceiveNotePhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="warehouseId != null">
-        #{warehouseId,jdbcType=DECIMAL},
-      </if>
-      <if test="insertUsername != null">
-        #{insertUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="insertTime != null">
-        #{insertTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUsername != null">
-        #{updateUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="insertUpdateRemark != null">
-        #{insertUpdateRemark,jdbcType=VARCHAR},
-      </if>
-      <if test="resultArrivalAddress != null">
-        #{resultArrivalAddress,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKey" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
-    update TMSTRUCK_RECEIPT_RESULT
-    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
-        RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
-        RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
-        RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
-        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
-        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-        RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR}
-    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.route.model.TmstruckReceiptResult">
-    update TMSTRUCK_RECEIPT_RESULT
-    <set>
-      <if test="resultTotalId != null">
-        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
-      </if>
-      <if test="resultEmptyContainerPhoto != null">
-        RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="resultSignedNotePhoto != null">
-        RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="resultReceiveNotePhoto != null">
-        RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=VARCHAR},
-      </if>
-      <if test="warehouseId != null">
-        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
-      </if>
-      <if test="insertUsername != null">
-        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="insertTime != null">
-        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUsername != null">
-        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="updateTime != null">
-        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="insertUpdateRemark != null">
-        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-      </if>
-      <if test="resultArrivalAddress != null">
-        RESULT_ARRIVAL_ADDRESS = #{resultArrivalAddress,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
-  </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-    <include refid="select" />
-    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
-  </select>
-  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="where" />
-  </select>
-  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="whereLike" />
-  </select>
-  <insert id="batchInsert" parameterType="java.util.List">
-    insert into TMSTRUCK_RECEIPT_RESULT
-    (RESULT_ID,
-    RESULT_TOTAL_ID, RESULT_EMPTY_CONTAINER_PHOTO,
-    RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO,
-    WAREHOUSE_ID, INSERT_USERNAME,
-    INSERT_TIME, UPDATE_USERNAME,
-    UPDATE_TIME, INSERT_UPDATE_REMARK,
-    RESULT_ARRIVAL_ADDRESS)
-    ( <foreach collection="list" item="item" separator="union all">
-    select
-    #{item.resultId,jdbcType=DECIMAL},
-    #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR},
-    #{item.resultSignedNotePhoto,jdbcType=VARCHAR}, #{item.resultReceiveNotePhoto,jdbcType=VARCHAR},
-    #{item.warehouseId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
-    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
-    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
-    #{item.resultArrivalAddress,jdbcType=VARCHAR} from dual
-  </foreach> )
-  </insert>
-  <update id="batchUpdate" parameterType="java.util.List">
-    update TMSTRUCK_RECEIPT_RESULT
-    set
-    RESULT_ID=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
-    </foreach>
-    ,RESULT_TOTAL_ID=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
-    </foreach>
-    ,RESULT_EMPTY_CONTAINER_PHOTO=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyContainerPhoto,jdbcType=VARCHAR}
-    </foreach>
-    ,RESULT_SIGNED_NOTE_PHOTO=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSignedNotePhoto,jdbcType=VARCHAR}
-    </foreach>
-    ,RESULT_RECEIVE_NOTE_PHOTO=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultReceiveNotePhoto,jdbcType=VARCHAR}
-    </foreach>
-    ,WAREHOUSE_ID=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
-    </foreach>
-    ,INSERT_USERNAME=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-    </foreach>
-    ,INSERT_TIME=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-    </foreach>
-    ,UPDATE_USERNAME=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-    </foreach>
-    ,UPDATE_TIME=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-    </foreach>
-    ,INSERT_UPDATE_REMARK=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-    </foreach>
-    ,RESULT_ARRIVAL_ADDRESS=
-    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
-      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultArrivalAddress,jdbcType=VARCHAR}
-    </foreach>
-    where RESULT_ID in
-    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-      #{item.resultId,jdbcType=DECIMAL}
-    </foreach>
-  </update>
-  <delete id="batchDelete" parameterType="java.util.List">
-    delete from TMSTRUCK_RECEIPT_RESULT
-    where RESULT_ID in
-    <foreach close=")" collection="list" item="id" open="(" separator=",">
-      #{id}
-    </foreach>
-  </delete>
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
-  <select id="selectMaxId"  resultType="java.math.BigDecimal">
-    select max(RESULT_ID) from TMSTRUCK_RECEIPT_RESULT
-  </select>
-
-  <select id="getReceiptResultInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
-    select * from(
-    select distinct a_s_order.SALE_NUMBER "saleNumber",
-    o_torder.ORDER_NUMBER "orderNumber",
-    r_material.MATERIAL_NAME "materialName",
-    r_material.MATERIAL_MODEL "materialModel",
-    r_capacity.CAPACITY_NUMBER "capacityNumber",
-    r_shipper.SHIPPER_NAME "shipperName",
-    r_consignee.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
-    t_receipt.RESULT_ARRIVAL_ADDRESS "resultReceiptAddress",
-    receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
-    t_receipt.RESULT_EMPTY_CONTAINER_PHOTO "resultEmptyContainerPhoto",
-    t_arrival.RESULT_FULL_CONTAINER_PHOTO "resultFullContainerPhoto",
-    t_receipt.RESULT_SIGNED_NOTE_PHOTO "resultSignedNotePhoto",
-    t_receipt.RESULT_RECEIVE_NOTE_PHOTO "resultReceiveNotePhoto",
-    t_receiptchild.OTHER_PHOTO1 "otherPhoto1",
-    t_receiptchild.OTHER_PHOTO2 "otherPhoto2",
-    t_receiptchild.OTHER_PHOTO3 "otherPhoto3",
-    t_receipt.INSERT_TIME "receiptTime",
-    r_carrier.CARRIER_NAME "carrierName",
-    r_gatepost.GATEPOST_NAME "gatepostName"
-    from TMSTRUCK_RECEIPT_RESULT t_receipt
-    left join TMSTRUCK_TOTAL_RESULT t_total
-    on t_receipt.RESULT_TOTAL_ID=t_total.RESULT_TOTAL_ID
-    left join OMSTRUCK_ORDER o_torder
-    on t_total.ORDER_ID=o_torder.ORDER_ID
-    left join RMS_CAPACITY r_capacity
-    on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
-    left join RMS_DRIVER_CAPACITY r_d_capacity
-    on r_capacity.CAPACITY_ID=r_d_capacity.CAPACITY_ID
-    left join RMS_CARRIER r_carrier
-    on o_torder.CARRIER_ID=r_carrier.CARRIER_ID
-    left join RMS_CAR_DRIVER r_driver
-    on r_d_capacity.DRIVER_ID=r_driver.DRIVER_ID
-    left join AMS_SALE_ORDER_MATERIAL sale_material
-    on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
-    left join RMS_RECEIVE_ADDRESS receive_address
-    on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
-    left join RMS_MATERIAL r_material
-    on sale_material.MATERIAL_ID=r_material.MATERIAL_ID
-    left join AMS_SALE_ORDER a_s_order
-    on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
-    left join RMS_SHIPPER r_shipper
-    on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
-    left join RMS_CONSIGNEE r_consignee
-    on a_s_order.CONSIGNEE_ID=r_consignee.CONSIGNEE_ID
-    left join TMSTRUCK_RECEIPT_RESULT_CHILD t_receiptchild
-    on t_receipt.RESULT_ID=t_receiptchild.RECEIPT_RESULT_ID
-    left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
-    on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
-    LEFT JOIN RMS_GATEPOST r_gatepost
-    ON t_leave.GATEPOST_ID = r_gatepost.GATEPOST_ID
-    left join TMSTRUCK_ARRIVAL_RESULT t_arrival
-    on t_total.RESULT_TOTAL_ID=t_arrival.RESULT_TOTAL_ID
-    order by t_receipt.INSERT_TIME desc)
-    <where>
-      <if test="productClassification != null and productClassification != '其他' and productClassification != '螺纹钢'">
-        and  "materialName" like '%${productClassification}%'
-      </if>
-      <if test="productClassification != null and '螺纹钢' == productClassification">
-        and ("materialName" like '%螺纹钢%' or "materialName" like '%盘螺%'
-        or  "materialName" like '%盘圆%' or "materialName" like '%非定尺材%')
-      </if>
-      <if test="productClassification != null and '其他' == productClassification">
-        and  "materialName" not like '%带钢%' and "materialName" not like '%微粉%'
-        and  "materialName" not like '%螺纹钢%'  and  "materialName" not like '%非定尺材%' and "materialName" not like '%钢坯%'
-        and  "materialName" not like '%盘螺%' and "materialName" not like '%盘圆%'
-      </if>
-      <if test="carrierName1 != null">
-        and "carrierName" like  '%${carrierName1}%'
-      </if>
-      <if test="gatepostName1 !=null">
-        and "gatepostName" like '%${gatepostName1}%'
-      </if>
-      <if test="capacityNumber1 != null">
-        and  "capacityNumber" like '%${capacityNumber1}%'
-      </if>
-      <if test="consigneeCompanyName1 != null">
-        and  "consigneeCompanyName" like '%${consigneeCompanyName1}%'
-      </if>
-      <if test="startTime != null">
-        and "receiptTime" &gt;= to_date('${startTime}','yyyy-mm-dd')
-      </if>
-      <if test="endTime != null">
-        and "receiptTime" &lt;= to_date('${endTime}','yyyy-mm-dd')
-      </if>
-
-      <if test="saleNumber != null">
-        and
-        <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
-          "saleNumber" 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="materialName != null">
-        and
-        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-          "materialName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="materialModel != null">
-        and
-        <foreach collection="materialModel" item="item" open="(" separator="or" close=")">
-          "materialModel" 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="shipperName != null">
-        and
-        <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
-          "shipperName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="consigneeCompanyName != null">
-        and
-        <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
-          "consigneeCompanyName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="resultReceiptAddress != null">
-        and
-        <foreach collection="resultReceiptAddress" item="item" open="(" separator="or" close=")">
-          "resultReceiptAddress" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="addressDeliveryAddress != null">
-        and
-        <foreach collection="addressDeliveryAddress" item="item" open="(" separator="or" close=")">
-          "addressDeliveryAddress" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="receiptTime != null">
-        and
-        <foreach collection="receiptTime" item="item" open="(" separator="or" close=")">
-          "receiptTime" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="carrierName != null">
-        and
-        <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
-          "carrierName" like '%${item}%'
-        </foreach>
-      </if>
-      <if test="gatepostName != null">
-        and
-        <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
-          "gatepostName" like '%${item}%'
-        </foreach>
-      </if>
-    </where>
-    <include refid="orderBy"></include>
-  </select>
-
-  <sql id="orderBy">
-    <if test="orderField != null and orderField != ''">
-      order by  "${orderField}"
-      <if test="orderType != null and orderType != ''">
-        ${orderType}
-      </if>
-    </if>
-  </sql>
-</mapper>