33 コミット d7c0f385c1 ... 022d913ffa

作者 SHA1 メッセージ 日付
  zx 022d913ffa 修改 3 年 前
  txf 833da1e80c Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  txf ba5436c4b3 一厂焦炭外销 3 年 前
  wing 7b3522c2ad '保卫查询' 3 年 前
  luobang b0cee9c932 asjdakjs 3 年 前
  Tiroble 5cf285e85d 修改 3 年 前
  Tiroble badf3e41ae 修改 3 年 前
  Tiroble 6fec2ea538 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  Tiroble 745c6408a0 修改 3 年 前
  HUJIANGUO a384a89eeb Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  HUJIANGUO f28b51af5d '提货单' 3 年 前
  txf 906bf67a15 合并dev 3 年 前
  txf 56f0b6423a 修改钢材 3 年 前
  Tiroble b987600e05 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  Tiroble a6dfb635e1 修改 3 年 前
  luobang e4aa8e3a70 fasjfk 3 年 前
  luobang 289039034b adhkd 3 年 前
  luobang c0c2d048a3 tuijajdk 3 年 前
  HUJIANGUO c7f483506b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  HUJIANGUO fd15cd0e69 '提货单和送货单' 3 年 前
  txf 75fa655f42 委托添加数据 3 年 前
  luobang 1dfb2a33b4 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  luobang fa98f154c4 ataidj 3 年 前
  Tiroble cb9c93bcae Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  Tiroble 6104e28ee1 修改 3 年 前
  HUJIANGUO 5d10417f3b Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  HUJIANGUO cd1aa3ca6c '统计报表' 3 年 前
  Tiroble e520962149 Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  Tiroble 759f8f1c99 修改 3 年 前
  luobang ad9a2f4253 tijiao 3 年 前
  luobang e430e7857f Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  luobang 6e365be43d Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU1/DAL-TMS-TRUCK-API 3 年 前
  luobang c508d99da8 ytaj 3 年 前
38 ファイル変更956 行追加254 行削除
  1. 1 2
      pom.xml
  2. 13 0
      src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java
  3. 11 3
      src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java
  4. 24 0
      src/main/java/com/steerinfo/dil/controller/TestController.java
  5. 11 0
      src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java
  6. 6 6
      src/main/java/com/steerinfo/dil/controller/TmstruckSelfMachineController.java
  7. 15 0
      src/main/java/com/steerinfo/dil/feign/OtmsFeign.java
  8. 1 1
      src/main/java/com/steerinfo/dil/mapper/StatisticalReportMapper.java
  9. 14 1
      src/main/java/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.java
  10. 4 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckSmsRusultMapper.java
  11. 154 0
      src/main/java/com/steerinfo/dil/model/DilVersion.java
  12. 3 0
      src/main/java/com/steerinfo/dil/service/OffSiteTransportationService.java
  13. 4 0
      src/main/java/com/steerinfo/dil/service/impl/OffSiteTransportationServiceImpl.java
  14. 34 3
      src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java
  15. 6 6
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java
  16. 1 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java
  17. 14 5
      src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java
  18. 10 9
      src/main/java/com/steerinfo/dil/service/impl/TmstruckSelfMachineService.java
  19. 2 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckSmsRusultServiceImpl.java
  20. 1 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java
  21. 1 1
      src/main/java/com/steerinfo/dil/service/impl/UtilsServiceImpl.java
  22. 19 0
      src/main/java/com/steerinfo/route/mapper/DilVersionMapper.java
  23. 2 0
      src/main/java/com/steerinfo/route/service/RouteService.java
  24. 83 4
      src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java
  25. 13 10
      src/main/java/com/steerinfo/route/threeRequest/ZhongJiaoXingLu.java
  26. 2 1
      src/main/resources/application-dev.yml
  27. 2 1
      src/main/resources/application-prod.yml
  28. 1 1
      src/main/resources/bootstrap.yml
  29. 104 124
      src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml
  30. 47 41
      src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml
  31. 14 8
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml
  32. 7 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml
  33. 6 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.xml
  34. 4 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckSmsRusultMapper.xml
  35. 14 11
      src/main/resources/com/steerinfo/dil/mapper/TmstruckTimeTaskResultMapper.xml
  36. 1 8
      src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml
  37. 14 4
      src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml
  38. 293 0
      src/main/resources/com/steerinfo/route/mapper/DilVersionMapper.xml

+ 1 - 2
pom.xml

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

+ 13 - 0
src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java

@@ -15,6 +15,7 @@ import com.steerinfo.route.threeRequest.ZhongJiaoXingLu;
 import com.steerinfo.route.util.DataConversionTool;
 import com.steerinfo.route.util.DataConversionTool;
 import com.steerinfo.route.util.HTTPRequestUtils;
 import com.steerinfo.route.util.HTTPRequestUtils;
 import com.steerinfo.route.vo.FullPathVisualizationTo.ViewVisualization;
 import com.steerinfo.route.vo.FullPathVisualizationTo.ViewVisualization;
+import com.steerinfo.route.vo.Map.RouteVo;
 import com.steerinfo.route.vo.ResultWarn;
 import com.steerinfo.route.vo.ResultWarn;
 import com.steerinfo.route.vo.resultJson.SearchPoint;
 import com.steerinfo.route.vo.resultJson.SearchPoint;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
@@ -430,4 +431,16 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId,transportAbnormalInfo,transportAbnormalInfo1);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId,transportAbnormalInfo,transportAbnormalInfo1);
         return success(pageList);
         return success(pageList);
     }
     }
+    @ApiOperation(value="查询路径")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "查询条件", required = false, dataType = "HashMap")
+    })
+    @PostMapping("/fullPathVisualizationByCarNumber")
+    public RouteVo fullPathVisualizationByCarNumber(@RequestBody HashMap mapValue) throws Exception {
+
+        CompletableFuture<RouteVo> createOrder =routeService.fullPathVisualizationByCarNumber(mapValue);
+
+        return createOrder.get();
+    }
+
 }
 }

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

@@ -80,14 +80,17 @@ public class StatisticalReportController extends BaseRESTfulController {
                                        Integer pageSize,
                                        Integer pageSize,
                                        String startTime,
                                        String startTime,
                                        String endTime,
                                        String endTime,
-                                       String carrierSsoId
+                                       String carrierSsoId,
+                                          Integer orderType,
+                                          Integer shipperId
     ){
     ){
         if(carrierSsoId != null){
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
             }
         }
         }
-
+        mapValue.put("orderType",orderType);
+        mapValue.put("shipperId",shipperId);
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
@@ -348,8 +351,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                              Integer apiId,
                                              Integer apiId,
                                              Integer pageNum,
                                              Integer pageNum,
                                              Integer pageSize,
                                              Integer pageSize,
+                                             String startTime,
+                                             String endTime,
                                              String con){
                                              String con){
-        map.put("con",con);
+        if (con != null && !"undefined".equals(con)) {
+            map.put("con",con);
+        }
+        DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
         List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);

+ 24 - 0
src/main/java/com/steerinfo/dil/controller/TestController.java

@@ -2,8 +2,11 @@ package com.steerinfo.dil.controller;
 
 
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
 import com.steerinfo.dil.service.impl.TmstruckMeasureCommissionServiceImpl;
 import com.steerinfo.dil.service.impl.TmstruckMeasureCommissionServiceImpl;
+import com.steerinfo.dil.service.impl.UtilsServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
+import com.steerinfo.route.vo.Map.RouteVo;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -13,8 +16,10 @@ import org.springframework.web.bind.annotation.RestController;
 
 
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
 
 
 @RestController
 @RestController
+@RequestMapping("/${api.version}/Test")
 public class TestController extends BaseRESTfulController {
 public class TestController extends BaseRESTfulController {
 
 
     @Autowired
     @Autowired
@@ -24,6 +29,10 @@ public class TestController extends BaseRESTfulController {
 
 
     @Autowired
     @Autowired
     TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
     TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
+
+    @Autowired
+    private UtilsServiceImpl utilsService;
+
     @PostMapping("/savePath")
     @PostMapping("/savePath")
     public String savePath() throws Exception {
     public String savePath() throws Exception {
 
 
@@ -57,4 +66,19 @@ public class TestController extends BaseRESTfulController {
         return tmstruckMeasureCommissionService.addMaoMeasureCommission(map);
         return tmstruckMeasureCommissionService.addMaoMeasureCommission(map);
     }
     }
 
 
+    @PostMapping("/fullPathVisualizationByCarNumber")
+    public RouteVo fullPathVisualizationByCarNumber(@RequestBody HashMap mapValue) throws Exception {
+
+        CompletableFuture<RouteVo> createOrder =routeService.fullPathVisualizationByCarNumber(mapValue);
+
+        return createOrder.get();
+    }
+
+
+    @PostMapping("/Test")
+    public int test(){
+        utilsService.pushMesToWebsocket("湘M99999","排队信息");
+        return 1;
+    }
+
 }
 }

+ 11 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -233,5 +233,16 @@ public class TmstruckReceiptResultController extends BaseRESTfulController {
 
 
         return success(mapList.get(0));
         return success(mapList.get(0));
     }
     }
+    @ApiOperation(value = "获取收货作业照片")
+    @PostMapping("/getReceivingPhotoByUrl")
+    public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber) throws Exception {
+        List<Map<String,Object>> mapList = tmstruckReceiptResultService.getReceivingPhoto(orderNumber);
+        Map<String,Object> mapvalue = null;
+        if (mapList!=null){
+            mapvalue=mapList.get(0);
+        }
+        
+        return mapvalue;
+    }
 
 
 }
 }

+ 6 - 6
src/main/java/com/steerinfo/dil/controller/TmstruckSelfMachineController.java

@@ -32,14 +32,14 @@ public class TmstruckSelfMachineController extends BaseRESTfulController {
        return map;
        return map;
     }
     }
 
 
+    /**
+     * 送货单
+     * @param orderNumber
+     * @return
+     */
     @PostMapping("/getDeliveryOrder")
     @PostMapping("/getDeliveryOrder")
-    public Map<String,Object>getDeliveryOrder(String orderNumber){
+    public Map<String,Object>getDeliveryOrder(@RequestParam String orderNumber){
         Map<String,Object>map=tmstruckSelfMachineService.getDeliveryOrder(orderNumber);
         Map<String,Object>map=tmstruckSelfMachineService.getDeliveryOrder(orderNumber);
         return map;
         return map;
     }
     }
-//    public static void main(String[] args) {
-//            TmstruckSelfMachineController tmstruckSelfMachineController = new TmstruckSelfMachineController();
-//        Map<String, Object> wysdd2021091000000002 = tmstruckSelfMachineController.getBILLOrder("WYSDD2021091000000002");
-//        System.out.println(wysdd2021091000000002);
-//    }
 }
 }

+ 15 - 0
src/main/java/com/steerinfo/dil/feign/OtmsFeign.java

@@ -0,0 +1,15 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.Map;
+
+@FeignClient(value = "DAL-OTMS-API-DEV", url = "${openfeign.OTMSFeign.url}")
+public interface OtmsFeign {
+
+    @PostMapping("/api/v1/otms/pathDisplay/createTotalResult")
+    public RESTfulResult createTotalResult(@RequestBody(required=true) Map<String, Object> mapValue) throws Exception;
+}

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

@@ -46,5 +46,5 @@ public interface StatisticalReportMapper {
     //获取装机统计报表
     //获取装机统计报表
     List<Map<String,Object>> getLoaderResult(Map<String,Object> map);
     List<Map<String,Object>> getLoaderResult(Map<String,Object> map);
     //保卫部随机抽查车牌号
     //保卫部随机抽查车牌号
-    List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map);
+    List<Map<String, Object>>   getCapacityByDefend(Map<String, Object> map);
 }
 }

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

@@ -56,7 +56,7 @@ public interface TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfac
 
 
     Map<String, Object> getBillOrder(String orderNumber);
     Map<String, Object> getBillOrder(String orderNumber);
 
 
-    List<Map<String, Object>> getBillOrderMaterial(String orderNumber);
+    List<Map<String, Object>>getBillOrderMaterial(String orderNumber);
 
 
      //通过运输订单获取零星物资进厂实绩
      //通过运输订单获取零星物资进厂实绩
     List<Map<String, Object>> getSporadicSuppliesEnFactoryResult(Map<String, Object> map);
     List<Map<String, Object>> getSporadicSuppliesEnFactoryResult(Map<String, Object> map);
@@ -73,4 +73,17 @@ public interface TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfac
 
 
     List<Map<String, Object>> getEnResult();
     List<Map<String, Object>> getEnResult();
 
 
+
+    //查询是否拼装
+    Map<String, Object> getSteelIsSpelling(BigDecimal resultTotalId);
+
+    //删除多拼队列表实绩
+    int deleteQQSL(Object listId);
+
+    //删除单拼队列实绩
+    int deleteQQL(Object listId);
+
+    //修改排队实绩表添加排队结束时间
+    int updateQQR(Object resultId);
+
 }
 }

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

@@ -11,6 +11,10 @@ import java.util.Map;
 
 
 @Mapper
 @Mapper
 public interface TmstruckSmsRusultMapper extends IBaseMapper<TmstruckSmsRusult, BigDecimal> {
 public interface TmstruckSmsRusultMapper extends IBaseMapper<TmstruckSmsRusult, BigDecimal> {
+
+
+    String getDriverTel(BigDecimal orderId);
+
     //查询最大ID
     //查询最大ID
     @Select("select seq_tmstruck_sms.nextval from dual")
     @Select("select seq_tmstruck_sms.nextval from dual")
     BigDecimal selectMaxId();
     BigDecimal selectMaxId();

+ 154 - 0
src/main/java/com/steerinfo/dil/model/DilVersion.java

@@ -0,0 +1,154 @@
+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="app版本号")
+public class DilVersion implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(VERSION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal versionId;
+
+    /**
+     * 版本号(VERSION_VALUE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="版本号",required=false)
+    private String versionValue;
+
+    /**
+     * 记录创建人(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:APP   1:PDA)(VERSION_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="版本类型(0:APP   1:PDA)",required=false)
+    private Short versionType;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.versionId;
+    }
+
+    @Override
+    public void setId(BigDecimal versionId) {
+        this.versionId = versionId;
+    }
+
+    public BigDecimal getVersionId() {
+        return versionId;
+    }
+
+    public void setVersionId(BigDecimal versionId) {
+        this.versionId = versionId;
+    }
+
+    public String getVersionValue() {
+        return versionValue;
+    }
+
+    public void setVersionValue(String versionValue) {
+        this.versionValue = versionValue == null ? null : versionValue.trim();
+    }
+
+    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 Short getVersionType() {
+        return versionType;
+    }
+
+    public void setVersionType(Short versionType) {
+        this.versionType = versionType;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", versionId=").append(versionId);
+        sb.append(", versionValue=").append(versionValue);
+        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(", versionType=").append(versionType);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -1,10 +1,12 @@
 package com.steerinfo.dil.service;
 package com.steerinfo.dil.service;
 
 
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.route.vo.Map.RouteVo;
 
 
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
 
 
 public interface OffSiteTransportationService {
 public interface OffSiteTransportationService {
     List<Map<String, Object>> getInTransitTransportation(Map<String, Object> mapValue);
     List<Map<String, Object>> getInTransitTransportation(Map<String, Object> mapValue);
@@ -29,4 +31,5 @@ public interface OffSiteTransportationService {
     List<Map<String, Object>> getHaveAbnormalTruckOrderInfo(Map<String, Object> mapValue);
     List<Map<String, Object>> getHaveAbnormalTruckOrderInfo(Map<String, Object> mapValue);
 
 
     List<Map<String, Object>> getTransportAbnormalInfo(Map<String, Object> mapValue);
     List<Map<String, Object>> getTransportAbnormalInfo(Map<String, Object> mapValue);
+
 }
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/service/impl/OffSiteTransportationServiceImpl.java

@@ -13,6 +13,7 @@ import com.steerinfo.route.mapper.TmstruckArrivalResultMapper;
 import com.steerinfo.route.model.TmstruckReceiptResultChild;
 import com.steerinfo.route.model.TmstruckReceiptResultChild;
 import com.steerinfo.route.service.ITmstruckReceiptResultChildService;
 import com.steerinfo.route.service.ITmstruckReceiptResultChildService;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
+import com.steerinfo.route.vo.Map.RouteVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -23,6 +24,8 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
 @Service
 @Service
 public class OffSiteTransportationServiceImpl implements OffSiteTransportationService {
 public class OffSiteTransportationServiceImpl implements OffSiteTransportationService {
     @Autowired
     @Autowired
@@ -153,6 +156,7 @@ public class OffSiteTransportationServiceImpl implements OffSiteTransportationSe
         return offSiteTransportationMapper.getTransportAbnormalInfo(mapValue);
         return offSiteTransportationMapper.getTransportAbnormalInfo(mapValue);
     }
     }
 
 
+
     public synchronized int addTransportationAlarm(TmstruckAbnormalResult tmstruckAbnormalResult,String tripId) {
     public synchronized int addTransportationAlarm(TmstruckAbnormalResult tmstruckAbnormalResult,String tripId) {
         long id;
         long id;
         if(tmstruckAbnormalResultMapper.selectMaxId()==null){
         if(tmstruckAbnormalResultMapper.selectMaxId()==null){

+ 34 - 3
src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java

@@ -182,9 +182,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         int checkMeasureCommission = 0;
         int checkMeasureCommission = 0;
         switch (orderType){
         switch (orderType){
             case 1:
             case 1:
-                //发送空委托
-                map.put("firstMC", 1); //空委托依据
-                checkMeasureCommission = tmstruckMeasureCommissionService.addSteelMeasureCommission(map);
+                checkMeasureCommission = steelOrderEnFactory(map, selectMap, resultTotalId);
                 break;
                 break;
             case 2:
             case 2:
             case 3:
             case 3:
@@ -236,6 +234,39 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
 
 
     }
     }
 
 
+    /**
+     * 钢材进厂处理方法
+     * @param map
+     * @param selectMap
+     * @param resultTotalId
+     * @return
+     * @throws Exception
+     */
+    public int steelOrderEnFactory(Map<String, Object> map, Map<String, Object> selectMap,BigDecimal resultTotalId) throws Exception{
+        if(!"OK".equals(selectMap.get("insertUpdateRemark"))){
+            throw new Exception("钢材科未确认进厂!");
+        }
+        //发送空委托
+        map.put("firstMC", 1); //空委托依据
+        int checkMeasureCommission = tmstruckMeasureCommissionService.addSteelMeasureCommission(map);
+        if(checkMeasureCommission == 1){
+            //查询是否拼装
+            Map<String, Object> isSpellingMap = tmstruckEnfactoryResultMapper.getSteelIsSpelling(resultTotalId);
+            int isSpelling = DataChange.dataToBigDecimal(isSpellingMap.get("isSpelling")).intValue();
+            if(isSpelling == 1){
+                //拼装移出队列
+                tmstruckEnfactoryResultMapper.deleteQQSL(isSpellingMap.get("listId"));
+            }else {
+                //单拼移出队列
+                tmstruckEnfactoryResultMapper.deleteQQL(isSpellingMap.get("listId"));
+            }
+            //修改排队实绩表
+            tmstruckEnfactoryResultMapper.updateQQR(isSpellingMap.get("resultId"));
+        }
+        return checkMeasureCommission;
+    }
+
+
     /**
     /**
      * 计时作业方法
      * 计时作业方法
      * @Author TXF
      * @Author TXF

+ 6 - 6
src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java

@@ -1,9 +1,6 @@
 package com.steerinfo.dil.service.impl;
 package com.steerinfo.dil.service.impl;
 
 
-import com.steerinfo.dil.feign.AmsFeign;
-import com.steerinfo.dil.feign.BmsShipFeign;
-import com.steerinfo.dil.feign.BmsTruckFeign;
-import com.steerinfo.dil.feign.OmsFeign;
+import com.steerinfo.dil.feign.*;
 import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
 import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
 import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
 import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
@@ -54,6 +51,9 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
     @Autowired
     @Autowired
     private UtilsMapper utilsMapper;
     private UtilsMapper utilsMapper;
 
 
+    @Autowired
+    private OtmsFeign otmsFeign;
+
     @Autowired
     @Autowired
     private TmstruckEnfactoryResultServiceImpl tmstruckEnfactoryResultService;
     private TmstruckEnfactoryResultServiceImpl tmstruckEnfactoryResultService;
 
 
@@ -184,7 +184,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
         Map<String, Object> mesMap = utilsMapper.getOrderTypeByOrderNumber(orderNumber);
         Map<String, Object> mesMap = utilsMapper.getOrderTypeByOrderNumber(orderNumber);
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         String capacityNumber = (String) mesMap.get("capacityNumber");
         String capacityNumber = (String) mesMap.get("capacityNumber");
-        if(orderType == 11){
+        if(orderType == 11 || orderType == 15 || orderType == 16){
            return orderType11Use(map, mesMap,capacityNumber);
            return orderType11Use(map, mesMap,capacityNumber);
         }else if(orderType == 21){
         }else if(orderType == 21){
             return tmstruckEnfactoryResultService.orderType21Use(map, orderNumber, DataChange.dataToBigDecimal(mesMap.get("orderId")));
             return tmstruckEnfactoryResultService.orderType21Use(map, orderNumber, DataChange.dataToBigDecimal(mesMap.get("orderId")));
@@ -225,7 +225,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
                     //销售厂外监控
                     //销售厂外监控
                     Map<String, Object> parem=tmstruckLeaveFactoryResultService.getTruckFactoryResult(orderNumber);
                     Map<String, Object> parem=tmstruckLeaveFactoryResultService.getTruckFactoryResult(orderNumber);
                     parem.put("turnOf","0");
                     parem.put("turnOf","0");
-                    routeService.createTotalResult(parem);
+                    otmsFeign.createTotalResult(parem);
                 }catch (Exception ex){
                 }catch (Exception ex){
 
 
                 }
                 }

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

@@ -201,7 +201,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         String capacityNumber = (String) mesMap.get("capacityNumber");
         String capacityNumber = (String) mesMap.get("capacityNumber");
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         BigDecimal resultTotalId = DataChange.dataToBigDecimal(mesMap.get("totalId"));
         BigDecimal resultTotalId = DataChange.dataToBigDecimal(mesMap.get("totalId"));
-        if(orderType == 11){
+        if(orderType == 11 || orderType == 15 || orderType == 16){
             int sqe = DataChange.dataToBigDecimal(mesMap.get("Sqe")).intValue();
             int sqe = DataChange.dataToBigDecimal(mesMap.get("Sqe")).intValue();
             sqe = sqe + 1;
             sqe = sqe + 1;
             map.put("resultId",tmstruckLoadResultMapper.selectMaxId());
             map.put("resultId",tmstruckLoadResultMapper.selectMaxId());

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

@@ -60,7 +60,7 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
     private static final String daXingUrl = "http://172.16.59.251:8121/daXingWeight/OrderBusiness/addOrder.do";
     private static final String daXingUrl = "http://172.16.59.251:8121/daXingWeight/OrderBusiness/addOrder.do";
 
 
     //给达钢发送委托
     //给达钢发送委托
-    private static final List<Integer> judgeDaGangNum = Arrays.asList(5, 6, 8, 11, 17);
+    private static final List<Integer> judgeDaGangNum = Arrays.asList(5, 6, 8, 11, 17,15,16);
 
 
     //给达兴发委托
     //给达兴发委托
     private static final List<Integer> judgeDaXinNum = Arrays.asList(7, 18);
     private static final List<Integer> judgeDaXinNum = Arrays.asList(7, 18);
@@ -140,7 +140,7 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
         //发送数据给计量系统 必要数据 orderTypee:订单类型  resultTotalId: 总实绩Id   orderId
         //发送数据给计量系统 必要数据 orderTypee:订单类型  resultTotalId: 总实绩Id   orderId
         //获取当前订单是属于哪个厂区订单
         //获取当前订单是属于哪个厂区订单
         Map<String, Object> mesMap = tmstruckMeasureCommissionMapper.getShipperIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
         Map<String, Object> mesMap = tmstruckMeasureCommissionMapper.getShipperIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
-        if(map.get("saleWarehouse") != null){
+        if(mesMap.get("saleWarehouse") != null){
             if(judgeCoke.equals(map.get("saleWarehouse"))){ //如果是一厂焦炭库则向达钢发送委托
             if(judgeCoke.equals(map.get("saleWarehouse"))){ //如果是一厂焦炭库则向达钢发送委托
                 return sendMeasureCommissionMes(map);
                 return sendMeasureCommissionMes(map);
             }
             }
@@ -200,6 +200,8 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
                 measureCommission.put("IsAssembly", false);
                 measureCommission.put("IsAssembly", false);
             }
             }
         }
         }
+//        System.out.println(measureCommission);
+//        return 1;
         return sendMesToMeasure(measureCommission);
         return sendMesToMeasure(measureCommission);
     }
     }
 
 
@@ -383,10 +385,15 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
                 measureCommission.put("packagesNum", 0);
                 measureCommission.put("packagesNum", 0);
                 break;
                 break;
             case 20://采购内转委托总厂区
             case 20://采购内转委托总厂区
+            case 15:
+            case 16:
                 measureCommission=tmstruckMeasureCommissionMapper.purchaseXqCgNzMeasure(map);
                 measureCommission=tmstruckMeasureCommissionMapper.purchaseXqCgNzMeasure(map);
                 if(measureCommission == null){
                 if(measureCommission == null){
                     return 0;
                     return 0;
                 }
                 }
+                if(orderType == 16){
+                    measureCommission.put("factory","dg");
+                }
                 measureCommission.put("isRelationEAS",false);
                 measureCommission.put("isRelationEAS",false);
                 measureCommission.put("flowTo","进厂");
                 measureCommission.put("flowTo","进厂");
                 measureCommission.put("isDel",false);
                 measureCommission.put("isDel",false);
@@ -394,8 +401,9 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
                 measureCommission.put("deliveryMethod", "磅重交货");
                 measureCommission.put("deliveryMethod", "磅重交货");
                 measureCommission.put("packagesNum", 0);
                 measureCommission.put("packagesNum", 0);
         }
         }
-        if(measureCommission != null)
+        if(measureCommission != null){
             map.put("materialId", measureCommission.get("materialId"));
             map.put("materialId", measureCommission.get("materialId"));
+        }
         addMeasureCommission(map); // 添加计量委托
         addMeasureCommission(map); // 添加计量委托
         /*访问接口发送数据*/
         /*访问接口发送数据*/
         return sendMesToMeasure(measureCommission);
         return sendMesToMeasure(measureCommission);
@@ -600,9 +608,8 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
             case 14:
             case 14:
 
 
                 break;
                 break;
-            case 15:
             case 20:
             case 20:
-            case 16: //发送计量委托(查询物资顺序第一个装卸货的物资)
+                //发送计量委托(查询物资顺序第一个装卸货的物资)
                 //拿到需要计量的物资ID
                 //拿到需要计量的物资ID
                 Integer materialId = utilsMapper.getLxFirstMaterialId(DataChange.dataToBigDecimal(map.get("orderId")));
                 Integer materialId = utilsMapper.getLxFirstMaterialId(DataChange.dataToBigDecimal(map.get("orderId")));
                 map.put("materialId", materialId);
                 map.put("materialId", materialId);
@@ -616,6 +623,8 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
             case 11:
             case 11:
             case 17:
             case 17:
             case 18:
             case 18:
+            case 15:
+            case 16:
                 i+=addMaoMeasureCommission(map);
                 i+=addMaoMeasureCommission(map);
         }
         }
         return i;
         return i;

+ 10 - 9
src/main/java/com/steerinfo/dil/service/impl/TmstruckSelfMachineService.java

@@ -29,23 +29,24 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
      */
      */
     @Override
     @Override
     public Map<String, Object> getBillOrder(String orderNumber) {
     public Map<String, Object> getBillOrder(String orderNumber) {
-
         //1.根据运输订单号查询主干信息
         //1.根据运输订单号查询主干信息
-
         Map<String,Object>map=tmstruckEnfactoryResultMapper.getBillOrder(orderNumber);
         Map<String,Object>map=tmstruckEnfactoryResultMapper.getBillOrder(orderNumber);
-
-        //2.根据运输订单号查询枝叶信息-物资
-
-        List<Map<String,Object>>list=tmstruckEnfactoryResultMapper.getBillOrderMaterial(orderNumber);
-        map.put("materialList",list);
+        if(map !=null){
+            //2.根据运输订单号查询枝叶信息-物资
+            List<Map<String,Object>>list=tmstruckEnfactoryResultMapper.getBillOrderMaterial(orderNumber);
+            map.put("materialList",list);
+        }
         return map;
         return map;
     }
     }
 
 
     @Override
     @Override
     public Map<String, Object> getDeliveryOrder(String orderNumber) {
     public Map<String, Object> getDeliveryOrder(String orderNumber) {
+        //1.根据运输订单号查询主干信息
         Map<String,Object> map = tmstruckLeaveFactoryResultMapper.getDeliveryOrder(orderNumber);
         Map<String,Object> map = tmstruckLeaveFactoryResultMapper.getDeliveryOrder(orderNumber);
-        List<Map<String, Object>> deliveryOrderMaterialList = tmstruckLeaveFactoryResultMapper.getDeliveryOrderMaterial(orderNumber);
-        map.put("deliveryOrderMaterialList",deliveryOrderMaterialList);
+        if(map !=null){
+            List<Map<String, Object>> deliveryOrderMaterialList = tmstruckLeaveFactoryResultMapper.getDeliveryOrderMaterial(orderNumber);
+            map.put("deliveryOrderMaterialList",deliveryOrderMaterialList);
+        }
         return map;
         return map;
     }
     }
 }
 }

+ 2 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckSmsRusultServiceImpl.java

@@ -66,8 +66,9 @@ public class TmstruckSmsRusultServiceImpl  implements ITmstruckSmsRusultService
         String url = "http://www.btom.cn:8080/simpleinter/sendSMS?appId=EUCP-EMY-SMS1-10QNI&";
         String url = "http://www.btom.cn:8080/simpleinter/sendSMS?appId=EUCP-EMY-SMS1-10QNI&";
         String tmpTmp = MD5Util.formatTimeTmp();
         String tmpTmp = MD5Util.formatTimeTmp();
         String sign = MD5Util.sign("EUCP-EMY-SMS1-10QNI","EE20B0B28B75E567");
         String sign = MD5Util.sign("EUCP-EMY-SMS1-10QNI","EE20B0B28B75E567");
+        String driverTel = tmstruckSmsRusultMapper.getDriverTel(orderId);
         String mobile1 = mobile;
         String mobile1 = mobile;
-        String content = "【达州钢铁】您好!您在达钢购买的钢材已发车。欲知详情,请前往https://wl.dasteel.cn:32322,浏览车辆实时运输状态。退订";
+        String content = "【达州钢铁】您好!您在达钢购买的钢材已发车。司机电话:" + driverTel + "。欲知详情,请前往达州钢铁智慧物流平台查看车辆实时轨迹。退订";
         String sendUrl = url+"timestamp=" + tmpTmp + "&sign=" + sign + "&mobiles=" + mobile1 + "&content=" + content;
         String sendUrl = url+"timestamp=" + tmpTmp + "&sign=" + sign + "&mobiles=" + mobile1 + "&content=" + content;
         String jsonData = null;
         String jsonData = null;
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();

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

@@ -149,7 +149,7 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
         Map<String, Object> mesMap = utilsMapper.getOrderTypeByOrderNumber(orderNumber);
         Map<String, Object> mesMap = utilsMapper.getOrderTypeByOrderNumber(orderNumber);
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         int orderType = DataChange.dataToBigDecimal(mesMap.get("orderType")).intValue();
         //判断是不是内转
         //判断是不是内转
-        if(orderType == 11){
+        if(orderType == 11 || orderType == 15 || orderType == 16){
             //如果是内转新增卸货实绩
             //如果是内转新增卸货实绩
             Integer sqe = utilsMapper.getLineSequenceByOrderNumber((String) map.get("orderNumber"));
             Integer sqe = utilsMapper.getLineSequenceByOrderNumber((String) map.get("orderNumber"));
             sqe = sqe == null ? 1 : sqe +1;
             sqe = sqe == null ? 1 : sqe +1;

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

@@ -6,6 +6,7 @@ import com.steerinfo.dil.feign.IMFeign;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.service.IUtilsService;
 import com.steerinfo.dil.service.IUtilsService;
 import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.DataChange;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -187,7 +188,6 @@ public class UtilsServiceImpl implements IUtilsService {
         imFeign.sendToUser(sendMap);
         imFeign.sendToUser(sendMap);
     }
     }
 
 
-
     public int randomGetValue(List<Integer> dataList){
     public int randomGetValue(List<Integer> dataList){
         if(dataList.size() != 0&&dataList !=null){
         if(dataList.size() != 0&&dataList !=null){
             if(dataList.size() == 1){
             if(dataList.size() == 1){

+ 19 - 0
src/main/java/com/steerinfo/route/mapper/DilVersionMapper.java

@@ -0,0 +1,19 @@
+package com.steerinfo.route.mapper;
+
+import com.steerinfo.dil.model.DilVersion;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface DilVersionMapper extends IBaseMapper<DilVersion, BigDecimal> {
+    @Select("select VERSION_VALUE from DIL_VERSION where VERSION_TYPE = 3")
+    String getToken();
+
+    @Update("update DIL_VERSION set VERSION_VALUE = #{token}, UPDATE_TIME = SYSDATE where VERSION_TYPE = 3")
+    int updateToken(@Param("token") String token);
+}

+ 2 - 0
src/main/java/com/steerinfo/route/service/RouteService.java

@@ -13,4 +13,6 @@ public interface RouteService {
 
 
     public CompletableFuture<String> saveRequstionDate(Map mapValue) throws Exception;
     public CompletableFuture<String> saveRequstionDate(Map mapValue) throws Exception;
 
 
+    public CompletableFuture<RouteVo> fullPathVisualizationByCarNumber(HashMap mapValue) throws Exception;
+
 }
 }

+ 83 - 4
src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java

@@ -94,7 +94,7 @@ public class RouteServiceImpl implements RouteService {
                 String searchPointJson2 = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+URLEncoder.encode(mapValue.get("receiveAddress").toString()==null?"长沙市":mapValue.get("receiveAddress").toString(),"utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
                 String searchPointJson2 = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+URLEncoder.encode(mapValue.get("receiveAddress").toString()==null?"长沙市":mapValue.get("receiveAddress").toString(),"utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
                 SearchPoint searchPoint2= (SearchPoint) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint.class);
                 SearchPoint searchPoint2= (SearchPoint) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint.class);
                 if (searchPoint2.getStatus()==0&&searchPoint2.getResult()!=null){
                 if (searchPoint2.getStatus()==0&&searchPoint2.getResult()!=null){
-                    System.out.println(searchPoint2);
+
                     if (searchPoint2.getResult().getAddress_components()!=null){
                     if (searchPoint2.getResult().getAddress_components()!=null){
                         materieldesMap.put("addressProvince",searchPoint2.getResult().getAddress_components().getProvince()==null?"湖南省":searchPoint2.getResult().getAddress_components().getProvince());
                         materieldesMap.put("addressProvince",searchPoint2.getResult().getAddress_components().getProvince()==null?"湖南省":searchPoint2.getResult().getAddress_components().getProvince());
                         materieldesMap.put("addressDistrict",searchPoint2.getResult().getAddress_components().getDistrict()==null?"开福区":searchPoint2.getResult().getAddress_components().getDistrict());
                         materieldesMap.put("addressDistrict",searchPoint2.getResult().getAddress_components().getDistrict()==null?"开福区":searchPoint2.getResult().getAddress_components().getDistrict());
@@ -500,10 +500,8 @@ public class RouteServiceImpl implements RouteService {
                         calendar2.add(Calendar.MONTH,2);
                         calendar2.add(Calendar.MONTH,2);
                         long late= calendar2.getTime().getTime();
                         long late= calendar2.getTime().getTime();
                         long save=(lateTime-agoTime)/1000;
                         long save=(lateTime-agoTime)/1000;
-                        System.out.println(redisMap);
-                        System.out.println("置60天后过期");
+
                         json = zhongJiaoXingLu.visualRoute(redisMap);
                         json = zhongJiaoXingLu.visualRoute(redisMap);
-                        System.out.println(json.length()>100?json.substring(0,100):json);
                         if (json!=null){
                         if (json!=null){
                             redisTemplate.opsForValue().set(prefixLine+":"+mapValue.get("orderNumber").toString(), json, save>0?save:3184000, TimeUnit.SECONDS);
                             redisTemplate.opsForValue().set(prefixLine+":"+mapValue.get("orderNumber").toString(), json, save>0?save:3184000, TimeUnit.SECONDS);
                         }
                         }
@@ -765,6 +763,87 @@ public class RouteServiceImpl implements RouteService {
         }
         }
 
 
     }
     }
+    @Override
+    public CompletableFuture<RouteVo> fullPathVisualizationByCarNumber(HashMap mapValue) throws Exception {
+
+        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", mapValue.get("capacityNumber").toString());
+        redisMap.put("vco","2");
+        redisMap.put("qryBtm", mapValue.get("startTime").toString());
+        redisMap.put("qryEtm",mapValue.get("endTime").toString());
+        String json = zhongJiaoXingLu.visualRoute2(redisMap);
+
+        JSONObject jsonObject = JSONObject.parseObject(json);
+        if (json!=null&&jsonObject.get("status").toString().equals(1001+"")){
+            //初始开始链路和结束线路、开始点、结束点、当前点的集合
+            List<StartAndEndRoute> startAndEndRouteList=new ArrayList<>();
+            //一条路线,开始链路和结束线路、开始点、结束点、当前点
+            StartAndEndRoute startAndEndRoute=new StartAndEndRoute();
+
+            ViewVisualization to= (ViewVisualization) DataConversionTool.jsonToBean(json,ViewVisualization.class);
+            //初始化vo对象
+            RouteVo vo=new RouteVo();
+            //当前所在的点
+            //当前所在的点
+            if ((!StringUtils.isEmpty(to.getResult().getLat()))&& (!StringUtils.isEmpty(to.getResult().getLon()))){
+                Double[] centerpoint = LngLonUtil.gps84_To_Gcj02((Double.valueOf(to.getResult().getLat()) / 600000), (Double.valueOf(to.getResult().getLon()) / 600000));
+                //当前所在的点
+                Point currentPoint=new Point();
+                currentPoint.setLat(centerpoint[0]+"");
+                currentPoint.setLon(centerpoint[1]+"");
+                startAndEndRoute.setCurrentPoint(currentPoint);
+            }
+            //当前所在地名称
+            startAndEndRoute.setCurrentPointName(to.getResult().getAdr());
+            //初始已行驶轨迹集合
+            if (to.getResult().getRunRoute()!=null){
+                List<RunRoutePoint> routes =new ArrayList();
+                List<Double[]> routesPath =new ArrayList();
+                for(RunRoutePoint item : to.getResult().getRunRoute()){
+                    RunRoutePoint runRoutePoint=item;
+                    //将已行驶轨迹转义数据格式
+                    Double[] points = LngLonUtil.gps84_To_Gcj02((Double.valueOf(item.getLat()) / 600000), (Double.valueOf(item.getLon()) / 600000));
+                    routesPath.add(new Double[]{points[1],points[0]});
+                    //经纬度
+                    runRoutePoint.setLat(points[0]+"");
+                    runRoutePoint.setLon(points[1]+"");
+                    //坐标点
+                    routes.add(runRoutePoint);
+                }
+                //初始化起始点,已经经过路段的第一个点
+                Point startPoint=new Point();
+                startPoint.setLat(routes.get(0).getLat());
+                startPoint.setLon(routes.get(0).getLon());
+                startAndEndRoute.setStartPoint(startPoint);
+                //点集合
+                startAndEndRoute.setRunPath(routesPath);
+                //已经完成路线点集合
+                startAndEndRoute.setRunRoute(routes);
+            }
+            //当前所行驶历程数
+            String mil=to.getResult().getRunDistance()+"km";
+            startAndEndRoute.setMiled(mil);
+            startAndEndRouteList.add(startAndEndRoute);
+            vo.setStartAndEndRoutes(startAndEndRouteList);
+            //
+            //设置返回值对象
+            return CompletableFuture.completedFuture(vo) ;
+        }else {
+            return  CompletableFuture.completedFuture(new RouteVo());
+        }
+
+    }
 
 
 
 
 }
 }

+ 13 - 10
src/main/java/com/steerinfo/route/threeRequest/ZhongJiaoXingLu.java

@@ -3,11 +3,13 @@ package com.steerinfo.route.threeRequest;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.openapi.sdk.service.DataExchangeService;
 import com.openapi.sdk.service.DataExchangeService;
 
 
+import com.steerinfo.route.mapper.DilVersionMapper;
 import com.steerinfo.route.util.DataConversionTool;
 import com.steerinfo.route.util.DataConversionTool;
 import com.steerinfo.route.util.LngLonUtil;
 import com.steerinfo.route.util.LngLonUtil;
 import com.steerinfo.route.vo.FullPathVisualizationTo.ViewVisualization;
 import com.steerinfo.route.vo.FullPathVisualizationTo.ViewVisualization;
 import com.steerinfo.route.vo.Map.RouteVo;
 import com.steerinfo.route.vo.Map.RouteVo;
 import com.steerinfo.route.vo.Map.StartAndEndRoute;
 import com.steerinfo.route.vo.Map.StartAndEndRoute;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
@@ -32,7 +34,7 @@ public class ZhongJiaoXingLu {
     private String outMins;
     private String outMins;
     @Value("${str.ZhongJiaoXingLu.type}")
     @Value("${str.ZhongJiaoXingLu.type}")
     private String type;
     private String type;
-    private  String token="238684c3-1817-4e5e-8695-a8c85f8fd231";
+//    private  String token="238684c3-1817-4e5e-8695-a8c85f8fd231";
     @Value("${str.ZhongJiaoXingLu.cid}")
     @Value("${str.ZhongJiaoXingLu.cid}")
     private  String cid;
     private  String cid;
     @Value("${str.ZhongJiaoXingLu.srt}")
     @Value("${str.ZhongJiaoXingLu.srt}")
@@ -41,16 +43,16 @@ public class ZhongJiaoXingLu {
     private  String user;
     private  String user;
     @Value("${str.ZhongJiaoXingLu.pwd}")
     @Value("${str.ZhongJiaoXingLu.pwd}")
     private  String pwd;
     private  String pwd;
-    //"238684c3-1817-4e5e-8695-a8c85f8fd231"
-    //"2667ca1f-e003-4822-b4c1-f25561c27f31"
-    //"3dbdc182-b235-4c33-be30-88c0fe8999c5"
+    @Autowired
+    private DilVersionMapper dilVersionMapper;
 
 
 
 
     public  String visualRoute(HashMap routeMap) {
     public  String visualRoute(HashMap routeMap) {
         try {
         try {
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             Map<String, String> map = new HashMap<String, String>(3);
             Map<String, String> map = new HashMap<String, String>(3);
-            map.put("token", token);
+            String token=dilVersionMapper.getToken();
+            map.put("token",token);
             map.put("cid", cid);
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("srt", srt);
             map.put("startLonlat", routeMap.get("startLonlat").toString());
             map.put("startLonlat", routeMap.get("startLonlat").toString());
@@ -92,6 +94,7 @@ public class ZhongJiaoXingLu {
         try {
         try {
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             Map<String, String> map = new HashMap<String, String>(3);
             Map<String, String> map = new HashMap<String, String>(3);
+            String token=dilVersionMapper.getToken();
             map.put("token", token);
             map.put("token", token);
             map.put("cid", cid);
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("srt", srt);
@@ -100,13 +103,10 @@ public class ZhongJiaoXingLu {
             map.put("vclN", routeMap.get("vclN").toString());
             map.put("vclN", routeMap.get("vclN").toString());
             map.put("vco",routeMap.get("vco").toString());
             map.put("vco",routeMap.get("vco").toString());
             map.put("qryBtm", routeMap.get("qryBtm").toString());
             map.put("qryBtm", routeMap.get("qryBtm").toString());
-            //2021-12-22 12:45:07
-            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd 23:59:59");
-            map.put("qryEtm", simpleDateFormat.format(new Date()));
+            map.put("qryEtm", routeMap.get("qryEtm").toString());
 
 
             //routeMap.get("qryEtm").toString()
             //routeMap.get("qryEtm").toString()
             map.put("timeNearby", "30");
             map.put("timeNearby", "30");
-            System.out.println(map);
             String url = "https://openapi.sinoiov.cn/save/apis/visualRoute";
             String url = "https://openapi.sinoiov.cn/save/apis/visualRoute";
             DataExchangeService des = new DataExchangeService(5000, 8000);
             DataExchangeService des = new DataExchangeService(5000, 8000);
 
 
@@ -130,6 +130,7 @@ public class ZhongJiaoXingLu {
         try {
         try {
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             Map<String, String> map = new HashMap<String, String>(3);
             Map<String, String> map = new HashMap<String, String>(3);
+            String token=dilVersionMapper.getToken();
             map.put("token", token);
             map.put("token", token);
             map.put("cid", cid);
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("srt", srt);
@@ -177,6 +178,7 @@ public class ZhongJiaoXingLu {
         try {
         try {
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             //登陆之后返回的token:d21661ca-e0fe-4934-866a-7d78a0756bd4
             Map<String, String> map = new HashMap<String, String>(4);
             Map<String, String> map = new HashMap<String, String>(4);
+            String token=dilVersionMapper.getToken();
             map.put("token", token);
             map.put("token", token);
             map.put("cid", cid);
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("srt", srt);
@@ -211,7 +213,8 @@ public class ZhongJiaoXingLu {
             String res = des.postHttps(url, map);
             String res = des.postHttps(url, map);
             System.out.println("login"+res);
             System.out.println("login"+res);
             JSONObject jsonObject = JSONObject.parseObject(res);
             JSONObject jsonObject = JSONObject.parseObject(res);
-            this.token=jsonObject.get("result").toString();
+            String token=jsonObject.get("result").toString();
+            dilVersionMapper.updateToken(token);
             //System.out.println("返回:"+ res);
             //System.out.println("返回:"+ res);
         } catch (Exception e) {
         } catch (Exception e) {
             System.out.println("e:" + e.getMessage());
             System.out.println("e:" + e.getMessage());

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

@@ -45,6 +45,7 @@ openfeign:
     url: ${IMFEIGN_URL:172.16.33.166:8055}
     url: ${IMFEIGN_URL:172.16.33.166:8055}
   AmsFeign:
   AmsFeign:
     url: ${AMSFEIGN_URL:172.16.33.162:8015}
     url: ${AMSFEIGN_URL:172.16.33.162:8015}
-
+  OTMSFeign:
+    url: ${OTMSFEIGN_URL:172.16.33.166:8038}
 server:
 server:
   port: 8008
   port: 8008

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

@@ -45,6 +45,7 @@ openfeign:
     url: ${IMFEIGN_URL:172.16.33.166:8055}
     url: ${IMFEIGN_URL:172.16.33.166:8055}
   AmsFeign:
   AmsFeign:
     url: ${AMSFEIGN_URL:172.16.33.166:8079}
     url: ${AMSFEIGN_URL:172.16.33.166:8079}
-
+  OTMSFeign:
+    url: ${OTMSFEIGN_URL:172.16.33.166:8038}
 server:
 server:
   port: 8088
   port: 8088

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,7 +1,7 @@
 api.version: api/v1/truckTms
 api.version: api/v1/truckTms
 spring:
 spring:
   profiles:
   profiles:
-    include: ${SPRING_PROFILES:dev}
+    include: ${SPRING_PROFILES:prod}
   jackson:
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8
     time-zone: GMT+8

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

@@ -319,82 +319,82 @@
     <!--  查询销售统计报表  -->
     <!--  查询销售统计报表  -->
     <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
     <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
         select
         select
-               *
+        *
         from (
         from (
-                 select DISTINCT OO.ORDER_NUMBER              "orderNumber",
-                        RC.CAPACITY_NUMBER           "capacityNumber",
-                        TER.RESULT_ENTRY_GATE_TIME   "resultEntryGateTime",
-                        TWR.RESULT_TARE_WEIGHT_TIME  "resultTareWeightTime",
-                        TWR.RESULT_TARE_WEIGHT       "resultTareWeight",
-                        TLR.RESULT_LOAD_END_TIME     "resultLoadEndTime",
-                        RW.WAREHOUSE_NAME            "warehouseName",
-                        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
-                        TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
-                        TWR.RESULT_NET_WEIGHT        "resultNetWeight",
-                        TLFR.RESULT_OUT_GATE_TIME    "resultOutGateTime",
-                        RTCMAO.TRUCK_CALCULATE_NUMBER       "maoCalculate",
-                        RTCPI.TRUCK_CALCULATE_NUMBER        "piCalculate",
-                        RGEN.GATEPOST_NAME                  "enGatepostName",
-                        RGOUT.GATEPOST_NAME                 "outGatepostName",
-                        RCON.CONSIGNEE_COMPANY_NAME         "receiveName",
-                        RS.SUPPLIER_NAME                    "sendName",
-                        RM.MATERIAL_NAME                     "materialName",
-                        TLR.INSERT_UPDATE_REMARK             "materialRemark",
-                        ASO.SALE_NUMBER                      "saleNumber",
-                        TLR.CASE_NUMBER                      "caseNumber",
-                        RC2.CARRIER_NAME                     "carrierName",
-                        CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
-                 from OMSTRUCK_ORDER OO
-                          left join AMS_SALE_ORDER_MATERIAL ASOM
-                               on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
-                          left join AMS_DISPATCH_SALE_ORDER ADSO
-                               on ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
-                          left join RMS_CARRIER RC2
-                               on RC2.CARRIER_ID = ADSO.CARRIER_ID
-                          left join AMS_SALE_ORDER ASO
-                               on ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
-                          left join RMS_CONSIGNEE RCON
-                               on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
-                          left join RMS_SUPPLIER RS
-                               on RS.SUPPLIER_ID = ASO.SHIPPER_ID
-                          join TMSTRUCK_TOTAL_RESULT TTR
-                               on TTR.ORDER_ID = OO.ORDER_ID
-                          join TMSTRUCK_LOAD_RESULT TLR
-                               on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-                          left join RMS_WAREHOUSE RW
-                               on RW.WAREHOUSE_ID = TLR.LOADING_ID
-                          join TMSTRUCK_WEIGHT_RESULT TWR
-                               on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-                          left join RMS_TRUCK_CALCULATE RTCMAO
-                               on TWR.RESULT_GROSS_PLACE_ID = RTCMAO.TRUCK_CALCULATE_ID
-                          left join RMS_TRUCK_CALCULATE RTCPI
-                               on TWR.RESULT_TARE_PLACE_ID = RTCPI.TRUCK_CALCULATE_ID
-                          join TMSTRUCK_ENFACTORY_RESULT TER
-                               on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-                          left join RMS_GATEPOST RGEN
-                               on RGEN.GATEPOST_ID = TER.GATEPOST_ID
-                          join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
-                               on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-                          left join RMS_GATEPOST RGOUT
-                               on RGOUT.GATEPOST_ID = TLFR.GATEPOST_ID
-                          join RMS_CAPACITY RC
-                               on RC.CAPACITY_ID = OO.CAPACITY_ID
-                          join OMSTRUCK_ORDER_MATERIAL OOM
-                               on OOM.ORDER_ID = OO.ORDER_ID
-                          join RMS_MATERIAL RM
-                               on RM.MATERIAL_ID = OOM.MATERIAL_ID
-                 where OO.ORDER_TYPE in (1, 2)
-                          <if test="carrierSsoId != null">
-                              and RC2.CARRIER_SSO_ID = #{carrierSsoId}
-                          </if>
-                          <if test="oneDate != null">
-                              and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
-                          </if>
-                          <if test="startDate != null">
-                              and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
-                              and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
-                          </if>
-             )
+        select DISTINCT OO.ORDER_NUMBER "orderNumber",
+        RC.CAPACITY_NUMBER "capacityNumber",
+        TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+        TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+        TWR.RESULT_TARE_WEIGHT "resultTareWeight",
+        TLR.RESULT_LOAD_END_TIME "resultLoadEndTime",
+        RW.WAREHOUSE_NAME "warehouseName",
+        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+        TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
+        TWR.RESULT_NET_WEIGHT "resultNetWeight",
+        TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
+        RTCMAO.TRUCK_CALCULATE_NUMBER "maoCalculate",
+        RTCPI.TRUCK_CALCULATE_NUMBER "piCalculate",
+        RGEN.GATEPOST_NAME "enGatepostName",
+        RGOUT.GATEPOST_NAME "outGatepostName",
+        RCON.CONSIGNEE_COMPANY_NAME "receiveName",
+        RS.SUPPLIER_NAME "sendName",
+        RM.MATERIAL_NAME "materialName",
+        TLR.INSERT_UPDATE_REMARK "materialRemark",
+        ASO.SALE_NUMBER "saleNumber",
+        TLR.CASE_NUMBER "caseNumber",
+        RC2.CARRIER_NAME "carrierName",
+        CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
+        from TMSTRUCK_WEIGHT_RESULT TWR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+        on TTR.ORDER_ID = OO.ORDER_ID
+        left join AMS_SALE_ORDER_MATERIAL ASOM
+        on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
+        left join AMS_DISPATCH_SALE_ORDER ADSO
+        on ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
+        left join RMS_CARRIER RC2
+        on RC2.CARRIER_ID = ADSO.CARRIER_ID
+        left join AMS_SALE_ORDER ASO
+        on ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
+        left join RMS_CONSIGNEE RCON
+        on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
+        left join RMS_SUPPLIER RS
+        on RS.SUPPLIER_ID = ASO.SHIPPER_ID
+        join TMSTRUCK_LOAD_RESULT TLR
+        on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        and TLR.MATERIAL_ID = TWR.MATERIAL_ID
+        left join RMS_WAREHOUSE RW
+        on RW.WAREHOUSE_ID = TLR.LOADING_ID
+        left join RMS_TRUCK_CALCULATE RTCMAO
+        on TWR.RESULT_GROSS_PLACE_ID = RTCMAO.TRUCK_CALCULATE_ID
+        left join RMS_TRUCK_CALCULATE RTCPI
+        on TWR.RESULT_TARE_PLACE_ID = RTCPI.TRUCK_CALCULATE_ID
+        join TMSTRUCK_ENFACTORY_RESULT TER
+        on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join RMS_GATEPOST RGEN
+        on RGEN.GATEPOST_ID = TER.GATEPOST_ID
+        join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+        on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join RMS_GATEPOST RGOUT
+        on RGOUT.GATEPOST_ID = TLFR.GATEPOST_ID
+        join RMS_CAPACITY RC
+        on RC.CAPACITY_ID = OO.CAPACITY_ID
+        join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = TWR.MATERIAL_ID
+        WHERE OO.ORDER_TYPE = #{orderType}
+        AND ASO.SHIPPER_ID = #{shipperId}
+        <if test="carrierSsoId != null">
+            and RC2.CARRIER_SSO_ID = #{carrierSsoId}
+        </if>
+        <if test="oneDate != null">
+            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
+        </if>
+        <if test="startDate != null">
+            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
+            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
+        </if>
+        )
         <where>
         <where>
             <if test="orderNumber != null">
             <if test="orderNumber != null">
                 <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
                 <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
@@ -478,7 +478,7 @@
             <if test="resultGrossWeightTime != null">
             <if test="resultGrossWeightTime != null">
                 and
                 and
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                        "resultGrossWeightTime" like '%${item}%'
+                    "resultGrossWeightTime" like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultGrossWeight != null">
             <if test="resultGrossWeight != null">
@@ -576,7 +576,7 @@
             join RMS_CARRIER RCA
             join RMS_CARRIER RCA
                 on RCA.CARRIER_ID = RC.CARRIER_ID
                 on RCA.CARRIER_ID = RC.CARRIER_ID
         </if>
         </if>
-        where OO.ORDER_TYPE in (12,15)
+        where OO.ORDER_TYPE = 12
         <if test="carrierSsoId != null">
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
         </if>
@@ -597,9 +597,6 @@
         <if test="userIds!=null">
         <if test="userIds!=null">
             and ASO.UPDATE_USERNAME=#{userIds}
             and ASO.UPDATE_USERNAME=#{userIds}
         </if>
         </if>
-        <if test="orderType!=null">
-            and OO.ORDER_TYPE=#{orderType}
-        </if>
         )
         )
         <where>
         <where>
             <if test="receiveName != null">
             <if test="receiveName != null">
@@ -640,7 +637,7 @@
             <if test="resultTareWeightTime != null">
             <if test="resultTareWeightTime != null">
                 and
                 and
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultTareWeightTime" like '%${item}%'
+                    to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultTareWeight != null">
             <if test="resultTareWeight != null">
@@ -652,7 +649,7 @@
             <if test="resultEndTime != null">
             <if test="resultEndTime != null">
                 and
                 and
                 <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
-                    "resultEndTime" like '%${item}%'
+                    to_char("resultEndTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="warehouseName != null">
             <if test="warehouseName != null">
@@ -664,7 +661,7 @@
             <if test="resultGrossWeightTime != null">
             <if test="resultGrossWeightTime != null">
                 and
                 and
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeightTime" like '%${item}%'
+                    to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultGrossWeight != null">
             <if test="resultGrossWeight != null">
@@ -769,7 +766,7 @@
             join RMS_CARRIER RCA
             join RMS_CARRIER RCA
             on RCA.CARRIER_ID = RC.CARRIER_ID
             on RCA.CARRIER_ID = RC.CARRIER_ID
         </if>
         </if>
-        where OO.ORDER_TYPE in (13,16)
+        where OO.ORDER_TYPE = 13
         <if test="carrierSsoId != null">
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
         </if>
@@ -790,9 +787,6 @@
         <if test="userIds!=null">
         <if test="userIds!=null">
             and ASO.UPDATE_USERNAME=#{userIds}
             and ASO.UPDATE_USERNAME=#{userIds}
         </if>
         </if>
-        <if test="orderType!=null">
-            and OO.ORDER_TYPE=#{orderType}
-        </if>
         )
         )
         <where>
         <where>
             <if test="receiveName != null">
             <if test="receiveName != null">
@@ -1160,7 +1154,7 @@
             <if test="resultTareWeightTime != null">
             <if test="resultTareWeightTime != null">
                 and
                 and
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultTareWeightTime" like '%${item}%'
+                    to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
 
 
@@ -1172,7 +1166,7 @@
             <if test="resultGrossWeightTime != null">
             <if test="resultGrossWeightTime != null">
                 and
                 and
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeightTime" like '%${item}%'
+                    to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultGrossWeight != null">
             <if test="resultGrossWeight != null">
@@ -1493,24 +1487,14 @@
 
 
 
 
     <select id="getCapacityByDefend" resultType="java.util.Map" parameterType="java.util.Map">
     <select id="getCapacityByDefend" resultType="java.util.Map" parameterType="java.util.Map">
-        select * from(
+        select distinct * from(
         select rc.CAPACITY_NUMBER "capacityNumber",
         select rc.CAPACITY_NUMBER "capacityNumber",
-               oo.ORDER_NUMBER "orderNumber",
-               twr.RESULT_GROSS_WEIGHT "resultGrossWeight",
-               twr.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
-               rtc1.TRUCK_CALCULATE_NUMBER "truckCalculateNumber1",
-               twr.RESULT_TARE_WEIGHT "resultTareWeight",
-               twr.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
-               rtc2.TRUCK_CALCULATE_NUMBER "truckCalculateNumber2",
-               twr.RESULT_NET_WEIGHT "resultNetWeight",
-               ter.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
-               rg1.GATEPOST_NAME "gatepostName1",
-               tlfr.RESULT_OUT_GATE_TIME "resultOutGateTime",
-               rg2.GATEPOST_NAME "gatepostName2",
-               tlr.RESULT_LOAD_END_TIME "resultLoadEndTime",
-               rw1.WAREHOUSE_NAME "warehouseName1",
-               tur.RESULT_END_TIME "resultEndTime",
-               rw2.WAREHOUSE_NAME "warehouseName2"
+        oo.ORDER_NUMBER "orderNumber",
+        ter.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+        rg1.GATEPOST_NAME "gatepostName1",
+        tlfr.RESULT_OUT_GATE_TIME "resultOutGateTime",
+        rg2.GATEPOST_NAME "gatepostName2",
+        rm.material_name "materialName"
         from OMSTRUCK_ORDER oo
         from OMSTRUCK_ORDER oo
         left join OMSTRUCK_ORDER_MATERIAL oom
         left join OMSTRUCK_ORDER_MATERIAL oom
         on oom.ORDER_ID = oo.ORDER_ID
         on oom.ORDER_ID = oo.ORDER_ID
@@ -1520,32 +1504,28 @@
         on rc.CAPACITY_ID = oo.CAPACITY_ID
         on rc.CAPACITY_ID = oo.CAPACITY_ID
         left join TMSTRUCK_TOTAL_RESULT ttr
         left join TMSTRUCK_TOTAL_RESULT ttr
         on ttr.ORDER_ID = oo.ORDER_ID
         on ttr.ORDER_ID = oo.ORDER_ID
-        left join TMSTRUCK_WEIGHT_RESULT twr
-        on twr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
-        left join RMS_TRUCK_CALCULATE rtc1
-        on twr.RESULT_GROSS_PLACE_ID = rtc1.TRUCK_CALCULATE_ID
-        left join RMS_TRUCK_CALCULATE rtc2
-        on twr.RESULT_GROSS_PLACE_ID = rtc2.TRUCK_CALCULATE_ID
         left join TMSTRUCK_ENFACTORY_RESULT ter
         left join TMSTRUCK_ENFACTORY_RESULT ter
         on ter.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
         on ter.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
         left join RMS_GATEPOST rg1
         left join RMS_GATEPOST rg1
         on rg1.GATEPOST_ID = ter.GATEPOST_ID
         on rg1.GATEPOST_ID = ter.GATEPOST_ID
         left join TMSTRUCK_LEAVE_FACTORY_RESULT tlfr
         left join TMSTRUCK_LEAVE_FACTORY_RESULT tlfr
         on tlfr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
         on tlfr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
-        left join  RMS_GATEPOST rg2
+        left join RMS_GATEPOST rg2
         on rg2.GATEPOST_ID = tlfr.GATEPOST_ID
         on rg2.GATEPOST_ID = tlfr.GATEPOST_ID
-        left join TMSTRUCK_LOAD_RESULT tlr
-        on tlr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
-        left join RMS_WAREHOUSE rw1
-        on tlr.LOADING_ID = rw1.WAREHOUSE_ID
-        left join TMSTRUCK_UNLOAD_RESULT tur
-        on tur.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
-        left join RMS_WAREHOUSE rw2
-        on tur.RESULT_UNLOAD_PLACE_ID = rw2.WAREHOUSE_ID
-		where trunc(ter.RESULT_ENTRY_GATE_TIME) =  trunc(sysdate)
-		<if test="con!=null">
-           and instr(rc.CAPACITY_NUMBER , #{con})>0
+        <where>
+        <if test="oneDate != null">
+           and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = tlfr.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="startDate != null" >
+           and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = tlfr.RESULT_OUT_GATE_TIME
+        </if>
+        <if test="endDate != null" >
+            and to_date(#{endDate},'yyyy-mm-dd hh24:mi:ss') >= tlfr.RESULT_OUT_GATE_TIME
         </if>
         </if>
+        <if test="con != null">
+            and (instr(rc.CAPACITY_NUMBER, #{con}) > 0 or instr(rg1.GATEPOST_NAME, #{con}) > 0 or instr(rg2.GATEPOST_NAME, #{con}) > 0 )
+        </if>
+        </where>
 		order by ter.RESULT_ENTRY_GATE_TIME desc
 		order by ter.RESULT_ENTRY_GATE_TIME desc
 		)
 		)
 		<where>
 		<where>

+ 47 - 41
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -435,6 +435,7 @@
             #{item.resultId,jdbcType=DECIMAL}
             #{item.resultId,jdbcType=DECIMAL}
         </foreach>
         </foreach>
     </update>
     </update>
+
     <delete id="batchDelete" parameterType="java.util.List">
     <delete id="batchDelete" parameterType="java.util.List">
         delete from TMSTRUCK_ENFACTORY_RESULT
         delete from TMSTRUCK_ENFACTORY_RESULT
         where RESULT_ID in
         where RESULT_ID in
@@ -673,7 +674,8 @@
         select *
         select *
         from (select TER.RESULT_ID       "resultId",
         from (select TER.RESULT_ID       "resultId",
                      TER.SEGMEN_SQE      "segmentSqe", --进厂的路段顺序号
                      TER.SEGMEN_SQE      "segmentSqe", --进厂的路段顺序号
-                     TER.RESULT_ENTRY_GATE_TIME
+                     TER.RESULT_ENTRY_GATE_TIME,
+                     TER.INSERT_UPDATE_REMARK   "insertUpdateRemark"
               from TMSTRUCK_ENFACTORY_RESULT TER
               from TMSTRUCK_ENFACTORY_RESULT TER
               where TER.RESULT_TOTAL_ID = #{resultTotalId}
               where TER.RESULT_TOTAL_ID = #{resultTotalId}
                 and TER.RESULT_ENTRY_GATE_TIME is null
                 and TER.RESULT_ENTRY_GATE_TIME is null
@@ -1137,57 +1139,41 @@
     </select>
     </select>
 
 
     <select id="getBillOrder" parameterType="java.lang.String" resultType="java.util.Map">
     <select id="getBillOrder" parameterType="java.lang.String" resultType="java.util.Map">
-        select
+        SELECT
             oo.order_number "orderNumber",
             oo.order_number "orderNumber",
             rc.capacity_number "capacityNumber",
             rc.capacity_number "capacityNumber",
             rce.consignee_company_name "consigeeName",
             rce.consignee_company_name "consigeeName",
             rcr.carrier_name "carrierName",
             rcr.carrier_name "carrierName",
-            TO_CHAR(SYSDATE,'YYYY-MM-DD') "billDate"
-        from omstruck_order oo
-                 left join
-             rms_capacity rc
-             on
-                 rc.capacity_id = oo.capacity_id
-                 left join
-             ams_sale_order_material asom
-             on
-                 asom.sale_order_material_id = oo.order_plan_id
-                 left join
-             ams_sale_order aso
-             on
-                 aso.sale_order_id = asom.sale_order_id
-                 left join
-             rms_consignee rce
-             on
-                 rce.consignee_id = aso.receive_id
-                 left join
-             ams_dispatch_sale_order adso
-             on
-                 adso.sale_order_material_id = asom.sale_order_material_id
-                 left join
-             rms_carrier rcr
-             on
-                 rcr.carrier_id = adso.carrier_id
-        where oo.order_number = #{orderNumber}
+            TO_CHAR( SYSDATE, 'YYYY-MM-DD' ) "billDate"
+        FROM
+            omstruck_order oo
+                LEFT JOIN rms_capacity rc ON rc.capacity_id = oo.capacity_id
+                LEFT JOIN ams_sale_order_material asom ON asom.sale_order_material_id = oo.order_plan_id
+                LEFT JOIN ams_sale_order aso ON aso.sale_order_id = asom.sale_order_id
+                LEFT JOIN rms_consignee rce ON rce.consignee_id = aso.receive_id
+                LEFT JOIN ams_dispatch_sale_order adso ON adso.sale_order_material_id = asom.sale_order_material_id
+                LEFT JOIN rms_carrier rcr ON rcr.carrier_id = adso.carrier_id
+        WHERE
+            oo.order_number = #{orderNumber}
+          and oo.ORDER_STATUS = 5
+          and oo.ORDER_PRINT_STATUS is null
     </select>
     </select>
 
 
     <select id="getBillOrderMaterial" parameterType="java.lang.String" resultType="java.util.Map" >
     <select id="getBillOrderMaterial" parameterType="java.lang.String" resultType="java.util.Map" >
-        select
+        SELECT
             rm.material_name "materialName",
             rm.material_name "materialName",
             rm.material_specification "materialSpe",
             rm.material_specification "materialSpe",
             rm.material_model "materialModel",
             rm.material_model "materialModel",
             oom.order_material_number "materialNumber",
             oom.order_material_number "materialNumber",
-            oom.order_material_weight "materialWeight"
-        from omstruck_order oo
-                 left join
-             omstruck_order_material oom
-             on
-                 oom.order_id = oo.order_id
-                 left join
-             rms_material rm
-             on
-                 rm.material_id = oom.order_material_id
-        where oo.order_number = #{orderNumber}
+            oom.order_material_weight "materialWeight",
+            RW.WAREHOUSE_NAME "wareHouseName"
+        FROM
+            omstruck_order oo
+                LEFT JOIN omstruck_order_material oom ON oom.order_id = oo.order_id
+                LEFT JOIN rms_material rm ON rm.material_id = oom.material_id
+                LEFT JOIN RMS_WAREHOUSE RW ON RW.WAREHOUSE_ID = OOM.MATERIAL_PRIORITY
+        WHERE
+            oo.order_number = #{ orderNumber}
     </select>
     </select>
 
 
     <!--    通过id获取零星物资id-->
     <!--    通过id获取零星物资id-->
@@ -1484,4 +1470,24 @@
         AND TER.SEGMEN_SQE = 5
         AND TER.SEGMEN_SQE = 5
     </select>
     </select>
 
 
+    <select id="getSteelIsSpelling" resultType="map" parameterType="java.math.BigDecimal">
+        select LIST_ID  "listId",
+               IS_SPELLING "isSpelling",
+               RESULT_ID    "resultId"
+        from QMS_QUEUE_RESULT where RESULT_TOTAL_ID = #{resultTotalId}
+    </select>
+
+
+    <delete id="deleteQQSL">
+        delete from QMS_QUEUE_SPELLING_LIST where SPELLING_RESULT_ID = #{listId}
+    </delete>
+
+    <delete id="deleteQQL">
+        delete from QMS_QUEUE_LIST where LIST_ID = #{listId}
+    </delete>
+
+    <update id="updateQQR">
+        update QMS_QUEUE_RESULT QQR set QQR.RESULT_END_TIME = SYSDATE where QQR.RESULT_ID = #{resultId}
+    </update>
+
 </mapper>
 </mapper>

+ 14 - 8
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -1039,13 +1039,11 @@
             rca.address_province "province",
             rca.address_province "province",
             rca.address_district "district",
             rca.address_district "district",
             rca.address_town "town",
             rca.address_town "town",
-            rca.address_delivery_address "deliveryAddress",
+            rrp.address_delivery_address "deliveryAddress",
             asom.sale_order_consignee "consignee",
             asom.sale_order_consignee "consignee",
             asom.sale_order_consignee_tel "consigneeTel",
             asom.sale_order_consignee_tel "consigneeTel",
-            asom.sale_date_of_receipt "receiptDate",
             rsh.SHIPPER_NAME "shippername",
             rsh.SHIPPER_NAME "shippername",
             sysdate "sendDate"
             sysdate "sendDate"
-
         from omstruck_order oo
         from omstruck_order oo
                  left join
                  left join
              rms_capacity rc
              rms_capacity rc
@@ -1072,9 +1070,13 @@
              on
              on
                  rcr.carrier_id = adso.carrier_id
                  rcr.carrier_id = adso.carrier_id
                  left join
                  left join
+             RMS_RECEIVE_PLACE rrp
+             on
+                 rrp.PLACE_ID = asom.SALE_SHIPPING_ADDRESS_ID
+                 left join
              rms_receive_address rca
              rms_receive_address rca
              on
              on
-                 rca.address_id = asom.sale_shipping_address_id
+                 rca.address_id = rrp.ADDRESS_ID
         left join RMS_SHIPPER rsh
         left join RMS_SHIPPER rsh
         on rsh.SHIPPER_ID = aso.SHIPPER_ID
         on rsh.SHIPPER_ID = aso.SHIPPER_ID
         where oo.order_number =#{orderNumber}
         where oo.order_number =#{orderNumber}
@@ -1087,8 +1089,7 @@
             rm.material_model "materialModel",
             rm.material_model "materialModel",
             oom.order_material_number "materialNumber",
             oom.order_material_number "materialNumber",
             oom.order_material_weight "materialWeight",
             oom.order_material_weight "materialWeight",
-            ruom.unit_of_measure_name "measureName",
-            twr.RESULT_NET_WEIGHT "resultWeight"
+            tlr.RESULT_LOAD_START_TIME "makeDate"
         from omstruck_order oo
         from omstruck_order oo
                  left join
                  left join
              omstruck_order_material oom
              omstruck_order_material oom
@@ -1097,7 +1098,7 @@
                  left join
                  left join
              rms_material rm
              rms_material rm
              on
              on
-                 rm.material_id = oom.order_material_id
+                 rm.material_id = oom.MATERIAL_ID
                  left join
                  left join
              rms_unit_of_measure ruom
              rms_unit_of_measure ruom
              on
              on
@@ -1108,8 +1109,13 @@
                 left  join
                 left  join
             TMSTRUCK_WEIGHT_RESULT twr
             TMSTRUCK_WEIGHT_RESULT twr
             on
             on
-                 twr.RESULT_TOTAL_ID =   ttr.ORDER_ID
+                 twr.RESULT_TOTAL_ID =   ttr.RESULT_TOTAL_ID
             and twr.MATERIAL_ID = oom.MATERIAL_ID
             and twr.MATERIAL_ID = oom.MATERIAL_ID
+                left  join
+            TMSTRUCK_LOAD_RESULT tlr
+            on
+                  tlr.RESULT_TOTAL_ID =   ttr.RESULT_TOTAL_ID
+            and tlr.MATERIAL_ID = oom.MATERIAL_ID
         where oo.order_number = #{orderNumber}
         where oo.order_number = #{orderNumber}
     </select>
     </select>
     <!--零星物资出厂实绩列表 -->
     <!--零星物资出厂实绩列表 -->

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

@@ -1538,7 +1538,13 @@
       <if test="resultLoadStartTime != null">
       <if test="resultLoadStartTime != null">
         and
         and
         <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
         <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
-          "resultLoadStartTime" like '%${item}%'
+          to_char("resultLoadStartTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultLoadEndTime != null">
+        and
+        <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
+          to_char("resultLoadEndTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
         </foreach>
         </foreach>
       </if>
       </if>
       <if test="warehouseName != null">
       <if test="warehouseName != null">

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

@@ -747,6 +747,8 @@
         select
         select
             APO.PURCHASE_ORDER_NO   "purchaseOrder",
             APO.PURCHASE_ORDER_NO   "purchaseOrder",
             APO.SUPPLIER_SCREEN_INFO    "supplierScreenInfo",
             APO.SUPPLIER_SCREEN_INFO    "supplierScreenInfo",
+            APO.QIITEM              "qiItem",
+            APO.RESOURCE_POINT      "resourcePoint",
             OO.ORDER_NUMBER         "transportNum",
             OO.ORDER_NUMBER         "transportNum",
             RC.CAPACITY_NUMBER      "carNum",
             RC.CAPACITY_NUMBER      "carNum",
             RTC.TRUCK_CALCULATE_NUMBER "steelyardNum",
             RTC.TRUCK_CALCULATE_NUMBER "steelyardNum",
@@ -1106,6 +1108,8 @@
                 SELECT
                 SELECT
                     OO.ORDER_NUMBER "transportNum",
                     OO.ORDER_NUMBER "transportNum",
                     RC.CAPACITY_NUMBER "carNum",
                     RC.CAPACITY_NUMBER "carNum",
+                    APO.QIITEM              "qiItem",
+                    APO.RESOURCE_POINT      "resourcePoint",
                     APO.PURCHASE_ORDER_NO "purchaseOrder",
                     APO.PURCHASE_ORDER_NO "purchaseOrder",
                     RS.SUPPLIER_NAME "sendUnit",
                     RS.SUPPLIER_NAME "sendUnit",
                     RCE.CONSIGNEE_COMPANY_NAME "ReceivUnit",
                     RCE.CONSIGNEE_COMPANY_NAME "ReceivUnit",
@@ -1113,6 +1117,7 @@
                     TWR.INSERT_UPDATE_REMARK "demo",
                     TWR.INSERT_UPDATE_REMARK "demo",
                     RM.MATERIAL_ID "materialId",
                     RM.MATERIAL_ID "materialId",
                     RM.MATERIAL_NAME "materiaName",
                     RM.MATERIAL_NAME "materiaName",
+                    DB.RESULT_FOREIGN_SHIP_NAME "shipNum",
                     concat( RM.MATERIAL_SPECIFICATION, RM.MATERIAL_MODEL ) "goodsType",
                     concat( RM.MATERIAL_SPECIFICATION, RM.MATERIAL_MODEL ) "goodsType",
                     RTC.TRUCK_CALCULATE_NUMBER "steelyardNum"
                     RTC.TRUCK_CALCULATE_NUMBER "steelyardNum"
                 FROM
                 FROM
@@ -1131,6 +1136,7 @@
                         LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OOM.ORDER_ID = OO.ORDER_ID
                         LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OOM.ORDER_ID = OO.ORDER_ID
                         LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
                         LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
                         LEFT JOIN RMS_TRUCK_CALCULATE RTC ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
                         LEFT JOIN RMS_TRUCK_CALCULATE RTC ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+                        LEFT JOIN DIL_BATCH DB ON DB.BATCH_ID = APO.BATCH_ID
                 WHERE
                 WHERE
                     OO.ORDER_ID = #{orderId}
                     OO.ORDER_ID = #{orderId}
                 ORDER BY
                 ORDER BY

+ 4 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckSmsRusultMapper.xml

@@ -378,4 +378,8 @@
       from   RMS_SHIPPER RS
       from   RMS_SHIPPER RS
       where  rs.SHIPPER_ID=#{bigDecimal}
       where  rs.SHIPPER_ID=#{bigDecimal}
     </select>
     </select>
+  <select id="getDriverTel" resultType="java.lang.String" parameterType="decimal">
+      select OO.DRIVER_TEL from OMSTRUCK_ORDER OO
+        where OO.ORDER_ID = #{orderId}
+  </select>
 </mapper>
 </mapper>

+ 14 - 11
src/main/resources/com/steerinfo/dil/mapper/TmstruckTimeTaskResultMapper.xml

@@ -667,12 +667,13 @@
 
 
   <!-- 查询计时作业 -->
   <!-- 查询计时作业 -->
   <select id="getAllTimeTaskResult" resultType="java.util.Map">
   <select id="getAllTimeTaskResult" resultType="java.util.Map">
-    select RC.CAPACITY_NUMBER "capacityNumber",
-           OO.ORDER_ID "orderId",
+    select * from (select RC.CAPACITY_NUMBER "capacityNumber",
+    OO.ORDER_ID "orderId",
     OO.ORDER_NUMBER "orderNumber",
     OO.ORDER_NUMBER "orderNumber",
-    CONCAT(TTTR.RESULT_VALUE,RUOM.UNIT_OF_MEASURE_NAME)  AS "resultTime",
+    CONCAT(TTTR.RESULT_VALUE,RUOM.UNIT_OF_MEASURE_NAME) AS "resultTime",
     RCT.CAPACITY_TYPE_NAME "capacityTypeName",
     RCT.CAPACITY_TYPE_NAME "capacityTypeName",
     TTTR.INSERT_TIME "insertTime",
     TTTR.INSERT_TIME "insertTime",
+    RP.PERSONNEL_NAME  "personName",
     (
     (
     SELECT TTTR2.RESULT_TIME
     SELECT TTTR2.RESULT_TIME
     FROM TMSTRUCK_TIME_TASK_RESULT TTTR2
     FROM TMSTRUCK_TIME_TASK_RESULT TTTR2
@@ -715,17 +716,19 @@
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     ON TTR.ORDER_ID=OO.ORDER_ID
     ON TTR.ORDER_ID=OO.ORDER_ID
     LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
     LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
-    ON  TTR.RESULT_TOTAL_ID=TTTR.RESULT_TOTAL_ID
+    ON TTR.RESULT_TOTAL_ID=TTTR.RESULT_TOTAL_ID
+    LEFT JOIN RMS_PERSONNEL RP
+    ON RP.PERSONNEL_SSO_ID=TTTR.INSERT_USERNAME
     LEFT JOIN RMS_UNIT_OF_MEASURE RUOM
     LEFT JOIN RMS_UNIT_OF_MEASURE RUOM
     ON TTTR.RESULT_UOM_ID=RUOM.UNIT_OF_MEASURE_ID
     ON TTTR.RESULT_UOM_ID=RUOM.UNIT_OF_MEASURE_ID
-    LEFT JOIN  RMS_CAPACITY RC
+    LEFT JOIN RMS_CAPACITY RC
     ON RC.CAPACITY_ID=OO.CAPACITY_ID
     ON RC.CAPACITY_ID=OO.CAPACITY_ID
     LEFT JOIN RMS_CAPACITY_TYPE RCT
     LEFT JOIN RMS_CAPACITY_TYPE RCT
     ON RCT.CAPACITY_TYPE_ID=RC.CAPACITY_TYPE_ID
     ON RCT.CAPACITY_TYPE_ID=RC.CAPACITY_TYPE_ID
-    where TTTR.RESULT_TIME_TYPE = 3  AND   TTTR.RESULT_VALUE IS NOT NULL
+    where TTTR.RESULT_TIME_TYPE = 3 AND TTTR.RESULT_VALUE IS NOT NULL
     <if test="con!=null">
     <if test="con!=null">
-      AND RC.CAPACITY_NUMBER LIKE #{con} or  RM.MATERIAL_NAME LIKE  #{con}
-      or  RS.SHIPPER_NAME LIKE #{con}
+      AND RC.CAPACITY_NUMBER LIKE #{con} or RM.MATERIAL_NAME LIKE #{con}
+      or RS.SHIPPER_NAME LIKE #{con}
     </if>
     </if>
     <if test="userId!=null">
     <if test="userId!=null">
       AND oo.INSERT_USERNAME LIKE #{userId}
       AND oo.INSERT_USERNAME LIKE #{userId}
@@ -736,7 +739,7 @@
     <if test="startDate != null">
     <if test="startDate != null">
       and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TTTR.INSERT_TIME
       and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TTTR.INSERT_TIME
       and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TTTR.INSERT_TIME
       and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TTTR.INSERT_TIME
-    </if>
+    </if>)
     <where>
     <where>
       <if test="orderNumber != null">
       <if test="orderNumber != null">
         <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
         <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
@@ -776,13 +779,13 @@
       <if test="startTime != null">
       <if test="startTime != null">
         and
         and
         <foreach collection="startTime" item="item" open="(" separator="or" close=")">
         <foreach collection="startTime" item="item" open="(" separator="or" close=")">
-          "startTime" like '%${item}%'
+          to_char("startTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
         </foreach>
         </foreach>
       </if>
       </if>
       <if test="endTime != null">
       <if test="endTime != null">
         and
         and
         <foreach collection="endTime" item="item" open="(" separator="or" close=")">
         <foreach collection="endTime" item="item" open="(" separator="or" close=")">
-          "endTime" like '%${item}%'
+          to_char("endTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
         </foreach>
         </foreach>
       </if>
       </if>
       <if test="timingTime != null">
       <if test="timingTime != null">

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

@@ -865,7 +865,6 @@
 
 
     <!--  查询内转厂内卸货实绩  -->
     <!--  查询内转厂内卸货实绩  -->
     <select id="getInFactoryUnloadResult" parameterType="java.util.Map" resultType="java.util.Map">
     <select id="getInFactoryUnloadResult" parameterType="java.util.Map" resultType="java.util.Map">
-
         SELECT *
         SELECT *
         FROM (
         FROM (
         SELECT TUR.RESULT_ID             "resultId",
         SELECT TUR.RESULT_ID             "resultId",
@@ -924,16 +923,10 @@
                     "warehouseName" like '%${item}%'
                     "warehouseName" like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
-            <if test="resultStartTime != null">
-                and
-                <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">
-                    "resultStartTime" like '%${item}%'
-                </foreach>
-            </if>
             <if test="resultEndTime != null">
             <if test="resultEndTime != null">
                 and
                 and
                 <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
-                    "resultEndTime" like '%${item}%'
+                    to_char("resultEndTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultNetWeight != null">
             <if test="resultNetWeight != null">

+ 14 - 4
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -2078,8 +2078,10 @@
         OO.ORDER_NUMBER "orderNumber",
         OO.ORDER_NUMBER "orderNumber",
         RC.CAPACITY_NUMBER "capacityNumber",
         RC.CAPACITY_NUMBER "capacityNumber",
         RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
         RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
+        RTC1.TRUCK_CALCULATE_NUMBER "grossCalculateNumber",
         TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
         TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
         TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
         TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+        GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME,TWR.RESULT_TARE_WEIGHT_TIME) "netWeightTime",
         TWR.RESULT_TARE_WEIGHT "resultTareWeight",
         TWR.RESULT_TARE_WEIGHT "resultTareWeight",
         TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
         TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
         TWR.RESULT_NET_WEIGHT "resultNetWeight",
         TWR.RESULT_NET_WEIGHT "resultNetWeight",
@@ -2094,11 +2096,13 @@
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         left join RMS_TRUCK_CALCULATE RTC
         left join RMS_TRUCK_CALCULATE RTC
         on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
         on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+        left join RMS_TRUCK_CALCULATE RTC1
+        on RTC1.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
         left join OMSTRUCK_ORDER_MATERIAL OOM
         left join OMSTRUCK_ORDER_MATERIAL OOM
         on OOM.ORDER_ID = OO.ORDER_ID
         on OOM.ORDER_ID = OO.ORDER_ID
         left join RMS_MATERIAL RM
         left join RMS_MATERIAL RM
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
         on RM.MATERIAL_ID = OOM.MATERIAL_ID
-        where RESULT_TARE_WEIGHT_TIME is not null
+        where TWR.RESULT_NET_WEIGHT IS NOT NULL
         and OO.ORDER_TYPE = #{orderTypee}
         and OO.ORDER_TYPE = #{orderTypee}
         )
         )
         <where>
         <where>
@@ -2134,7 +2138,7 @@
             <if test="resultGrossWeightTime != null">
             <if test="resultGrossWeightTime != null">
                 and
                 and
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeightTime" like '%${item}%'
+                    to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultTareWeight != null">
             <if test="resultTareWeight != null">
@@ -2152,7 +2156,7 @@
             <if test="resultTareWeightTime != null">
             <if test="resultTareWeightTime != null">
                 and
                 and
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
                 <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultTareWeightTime" like '%${item}%'
+                    to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
             <if test="resultNetWeight != null">
             <if test="resultNetWeight != null">
@@ -2161,10 +2165,16 @@
                     "resultNetWeight" like '%${item}%'
                     "resultNetWeight" like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
+            <if test="netWeightTime != null">
+                and
+                <foreach collection="netWeightTime" item="item" open="(" separator="or" close=")">
+                    to_char("netWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
+                </foreach>
+            </if>
         </where>
         </where>
         <include refid="orderBy"></include>
         <include refid="orderBy"></include>
         <if test="orderField == null  ">
         <if test="orderField == null  ">
-            order by "resultTareWeightTime" desc
+            order by "netWeightTime" desc
         </if>
         </if>
     </select>
     </select>
 
 

+ 293 - 0
src/main/resources/com/steerinfo/route/mapper/DilVersionMapper.xml

@@ -0,0 +1,293 @@
+<?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.DilVersionMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilVersion">
+    <id column="VERSION_ID" jdbcType="DECIMAL" property="versionId" />
+    <result column="VERSION_VALUE" jdbcType="VARCHAR" property="versionValue" />
+    <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="VERSION_TYPE" jdbcType="DECIMAL" property="versionType" />
+  </resultMap>
+  <sql id="columns">
+    VERSION_ID, VERSION_VALUE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK, VERSION_TYPE
+  </sql>
+  <sql id="columns_alias">
+    t.VERSION_ID, t.VERSION_VALUE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.VERSION_TYPE
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM DIL_VERSION
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM DIL_VERSION t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="versionId != null">
+        and VERSION_ID = #{versionId}
+      </if>
+      <if test="versionValue != null and versionValue != ''">
+        and VERSION_VALUE = #{versionValue}
+      </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="versionType != null">
+        and VERSION_TYPE = #{versionType}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="versionId != null">
+        and VERSION_ID = #{versionId}
+      </if>
+      <if test="versionValue != null and versionValue != ''">
+        and VERSION_VALUE LIKE '%${versionValue}%'
+      </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="versionType != null">
+        and VERSION_TYPE = #{versionType}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from DIL_VERSION
+    where VERSION_ID = #{versionId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DIL_VERSION
+    where 1!=1 
+      <if test="versionValue != null and versionValue != ''">
+        or VERSION_VALUE = #{versionValue}
+      </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="versionType != null">
+        or VERSION_TYPE = #{versionType}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.DilVersion">
+    insert into DIL_VERSION (VERSION_ID, VERSION_VALUE, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, VERSION_TYPE)
+    values (#{versionId,jdbcType=DECIMAL}, #{versionValue,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR}, #{versionType,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilVersion">
+    insert into DIL_VERSION
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="versionId != null">
+        VERSION_ID,
+      </if>
+      <if test="versionValue != null">
+        VERSION_VALUE,
+      </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="versionType != null">
+        VERSION_TYPE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="versionId != null">
+        #{versionId,jdbcType=DECIMAL},
+      </if>
+      <if test="versionValue != null">
+        #{versionValue,jdbcType=VARCHAR},
+      </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="versionType != null">
+        #{versionType,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilVersion">
+    update DIL_VERSION
+    set VERSION_VALUE = #{versionValue,jdbcType=VARCHAR},
+      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},
+      VERSION_TYPE = #{versionType,jdbcType=DECIMAL}
+    where VERSION_ID = #{versionId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilVersion">
+    update DIL_VERSION
+    <set>
+      <if test="versionValue != null">
+        VERSION_VALUE = #{versionValue,jdbcType=VARCHAR},
+      </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="versionType != null">
+        VERSION_TYPE = #{versionType,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where VERSION_ID = #{versionId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where VERSION_ID = #{versionId,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 DIL_VERSION 
+      (VERSION_ID, 
+      VERSION_VALUE, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      VERSION_TYPE)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.versionId,jdbcType=DECIMAL}, 
+      #{item.versionValue,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.versionType,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DIL_VERSION
+     set
+       VERSION_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.versionId,jdbcType=DECIMAL}
+       </foreach>
+       ,VERSION_VALUE=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.versionValue,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,VERSION_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=DECIMAL} then #{item.versionType,jdbcType=DECIMAL}
+       </foreach>
+     where VERSION_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.versionId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DIL_VERSION
+    where VERSION_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>