瀏覽代碼

修改查询

zx 3 年之前
父節點
當前提交
ac9f6cd2b6

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

@@ -53,9 +53,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                Integer pageSize,
                                                Integer pageSize,
                                                String startTime,
                                                String startTime,
                                                String endTime,
                                                String endTime,
-                                               Integer orderType
+                                               Integer orderType,
+                                               String con
     ){
     ){
         mapValue.put("orderTypee", orderType);
         mapValue.put("orderTypee", orderType);
+        if (con!=null && !"null".equals(con) && !"".equals(con)){
+            mapValue.put("con",con);
+        }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         //分页数据
@@ -86,6 +90,7 @@ public class StatisticalReportController extends BaseRESTfulController {
                                           String receiveName,
                                           String receiveName,
                                           String materialName
                                           String materialName
     ){
     ){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         if(carrierSsoId != null){
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
                 mapValue.put("carrierSsoId", carrierSsoId);
@@ -97,14 +102,12 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
         if (materialName != null && !"".equals(materialName) && !"null".equals(materialName)) {
             mapValue.put("remark","%" + materialName + "%");
             mapValue.put("remark","%" + materialName + "%");
         }
         }
-        mapValue.put("orderType",orderType);
+        mapValue.put("orderTypee",orderType);
         mapValue.put("shipperId",shipperId);
         mapValue.put("shipperId",shipperId);
-        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
-        List<Map<String, Object>> allReport =  statisticalReportService.getAllSaleReportNum(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
         List<Map<String, Object>> report = statisticalReportService.getAllSaleReport(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData2(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
         return success(pageList);
     }
     }
 
 
@@ -172,14 +175,13 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (userIds!=null){
         if (userIds!=null){
             mapValue.put("userIds",userIds);
             mapValue.put("userIds",userIds);
         }
         }
-        if (con!=null&&!con.equals("undefined")){
+        if (con!=null&&!"null".equals(con)){
             mapValue.put("con","%"+con+"%");
             mapValue.put("con","%"+con+"%");
         }
         }
-        List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum1(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport1(mapValue);
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport1(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
         return success(pageList);
     }
     }
 
 
@@ -210,7 +212,7 @@ public class StatisticalReportController extends BaseRESTfulController {
             }
             }
         }
         }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
-        if (con!=null&&!con.equals("undefined")){
+        if (con!=null&&!"null".equals(con)){
             mapValue.put("con","%"+con+"%");
             mapValue.put("con","%"+con+"%");
         }
         }
         if (userId!=null){
         if (userId!=null){
@@ -222,11 +224,10 @@ public class StatisticalReportController extends BaseRESTfulController {
         if (userIds!=null){
         if (userIds!=null){
             mapValue.put("userIds",userIds);
             mapValue.put("userIds",userIds);
         }
         }
-        List<Map<String, Object>> allReport =  statisticalReportService.getSporadicSuppliesReportNum2(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport2(mapValue);
         List<Map<String, Object>> report = statisticalReportService.getSporadicSuppliesReport2(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReport, report);
+        PageListAdd pageList = columnDataUtil.tableColumnData4(apiId, null, report);
         return success(pageList);
         return success(pageList);
     }
     }
 
 
@@ -268,9 +269,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                             Integer pageNum,
                                             Integer pageNum,
                                             Integer pageSize,
                                             Integer pageSize,
                                             String startTime,
                                             String startTime,
-                                            String endTime
+                                            String endTime,
+                                           String con
     ){
     ){
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        if(con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getLXInwardReport(mapValue);
         List<Map<String, Object>> report = statisticalReportService.getLXInwardReport(mapValue);
@@ -394,10 +399,9 @@ public class StatisticalReportController extends BaseRESTfulController {
                                               String startTime,
                                               String startTime,
                                               String endTime,
                                               String endTime,
                                               String orgCode,
                                               String orgCode,
-                                               String isPage,
+                                                String isPage,
                                              String index
                                              String index
     ){
     ){
-
         if (index!=null&&!"null".equals(index)){
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
             mapValue.put("index",index);
         }
         }
@@ -434,7 +438,6 @@ public class StatisticalReportController extends BaseRESTfulController {
                                        String isPage,
                                        String isPage,
                                        String index
                                        String index
     ){
     ){
-
         if (index!=null&&!"null".equals(index)){
         if (index!=null&&!"null".equals(index)){
             mapValue.put("index",index);
             mapValue.put("index",index);
         }
         }
@@ -453,15 +456,6 @@ public class StatisticalReportController extends BaseRESTfulController {
     }
     }
 
 
 
 
-
-
-
-
-
-
-
-
-
     @ApiOperation(value="查询拼装车统计报表")
     @ApiOperation(value="查询拼装车统计报表")
     @ApiImplicitParams({
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
@@ -514,8 +508,6 @@ public class StatisticalReportController extends BaseRESTfulController {
     }
     }
 
 
 
 
-
-
     @ApiOperation("对内转车辆装货点进行统计")
     @ApiOperation("对内转车辆装货点进行统计")
     @PostMapping("/getLoading")
     @PostMapping("/getLoading")
     public RESTfulResult getLoading(@RequestBody(required=false) Map<String,Object> mapValue,
     public RESTfulResult getLoading(@RequestBody(required=false) Map<String,Object> mapValue,
@@ -575,14 +567,18 @@ public class StatisticalReportController extends BaseRESTfulController {
                                              Integer pageSize,
                                              Integer pageSize,
                                              String startTime,
                                              String startTime,
                                              String endTime,
                                              String endTime,
-                                             String con){
-        if (con != null && !"undefined".equals(con)) {
+                                             String con,
+                                             String yes){
+        if (con != null && !"null".equals(con)) {
             map.put("con",con);
             map.put("con",con);
         }
         }
         DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime ,endTime, map, sdfDateTime);//根据时间段查询数据
+        if(yes != null && !"null".equals(yes)){
+            return success(statisticalReportService.getCapacityByDefend(map));
+        }
         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.tableColumnData4(apiId, null, report);
         return success(pageList);
         return success(pageList);
 
 
     }
     }

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

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.*;
 
 
 /**
 /**
@@ -46,6 +47,9 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
     @Autowired
     @Autowired
     ColumnDataUtil columnDataUtil;
     ColumnDataUtil columnDataUtil;
 
 
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @ApiOperation(value="生成装车实绩 :远程调用专用")
     @ApiOperation(value="生成装车实绩 :远程调用专用")
     @ApiImplicitParams({
     @ApiImplicitParams({
             @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
@@ -103,8 +107,8 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
                                         Integer orderType,
                                         Integer orderType,
                                         String con,
                                         String con,
                                         String userId,
                                         String userId,
-                                        String userIds){
-
+                                        String userIds, String startTime, String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         if (status!=null){
         if (status!=null){
             mapValue.put("status", status);
             mapValue.put("status", status);
         }
         }
@@ -117,7 +121,9 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
         if (userIds!=null){
         if (userIds!=null){
             mapValue.put("userIds",userIds);
             mapValue.put("userIds",userIds);
         }
         }
-
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
         PageHelper.startPage(pageNum,pageSize);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
         List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
@@ -163,6 +169,8 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
                 return failed("该订单没有装货作业");
                 return failed("该订单没有装货作业");
             }else if (i==-5){
             }else if (i==-5){
                 return failed("请勿重复装车");
                 return failed("请勿重复装车");
+            }else if( i == -6){
+                return failed("请通知司机完成前序操作再来装货!");
             }else {
             }else {
                 return failed("装货异常,请联系管理员!");
                 return failed("装货异常,请联系管理员!");
             }
             }

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

@@ -101,7 +101,10 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
             return failed("已卸过此物资");
             return failed("已卸过此物资");
         }else if(i == -3){
         }else if(i == -3){
             return failed("该订单没有卸货作业");
             return failed("该订单没有卸货作业");
-        } else{
+        }else if( i == -6) {
+            return failed("请通知司机完成前序操作再来卸货!");
+        }
+        else{
             return failed("卸货失败,请联系管理员!");
             return failed("卸货失败,请联系管理员!");
         }
         }
     }
     }

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

@@ -49,8 +49,10 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
     @Autowired
     @Autowired
     ColumnDataUtil columnDataUtil;
     ColumnDataUtil columnDataUtil;
 
 
+
     private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
 
+
     @ApiOperation(value="新增计量实绩 ")
     @ApiOperation(value="新增计量实绩 ")
     @ApiImplicitParams({
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "总实绩ID、计皮点、计毛点", required = false, dataType = "Map"),
             @ApiImplicitParam(name = "mapValue", value = "总实绩ID、计皮点、计毛点", required = false, dataType = "Map"),
@@ -79,8 +81,10 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                                String con,
                                                String con,
                                                String userId,
                                                String userId,
                                                String usersId,
                                                String usersId,
+
                                                String startTime,
                                                String startTime,
                                                String endTime
                                                String endTime
+
     ){
     ){
         if (orderType!=null) {
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
             mapValue.put("orderTypee", orderType);
@@ -94,7 +98,9 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
         if (usersId!=null){
         if (usersId!=null){
             mapValue.put("usersId",usersId);
             mapValue.put("usersId",usersId);
         }
         }
+
         DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
         DataChange.queryDataByDateTime(startTime, endTime, mapValue,sdfDateTime);//根据时间段查询数据
+
         PageHelper.startPage(pageNum,pageSize);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         //分页数据
         List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
         List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.java

@@ -128,4 +128,7 @@ public interface TmstruckLoadResultMapper extends IBaseMapper<TmstruckLoadResult
 
 
     //通过钢材运输订单号查询装车实绩
     //通过钢材运输订单号查询装车实绩
     Map<String, Object> getSteelLoadResult(Map<String, Object> map);
     Map<String, Object> getSteelLoadResult(Map<String, Object> map);
+
+    Map<String, Object> getLoadResultMap(BigDecimal resultTotalId);
+
 }
 }

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

@@ -94,8 +94,10 @@ public class StatisticalReportImpl implements IStatisticalReportService {
                 map1.put("transportStatus", "已抵达");
                 map1.put("transportStatus", "已抵达");
                 continue;
                 continue;
             }
             }
-            else
+            else{
                 map1.put("transportStatus", "已签收");
                 map1.put("transportStatus", "已签收");
+            }
+
         }
         }
         for (Map<String, Object> mesMap : mapList) {
         for (Map<String, Object> mesMap : mapList) {
             calculateDifferenceTime(mesMap);
             calculateDifferenceTime(mesMap);

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

@@ -3,6 +3,7 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.feign.*;
 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.TmstruckLoadResultMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
 import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
 import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
@@ -39,6 +40,9 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
     @Autowired
     @Autowired
     private TmstruckEnfactoryResultMapper tmstruckEnfactoryResultMapper;
     private TmstruckEnfactoryResultMapper tmstruckEnfactoryResultMapper;
 
 
+    @Autowired
+    private TmstruckLoadResultMapper tmstruckLoadResultMapper;
+
     @Autowired
     @Autowired
     private UtilsServiceImpl utilsService;
     private UtilsServiceImpl utilsService;
 
 
@@ -191,6 +195,13 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
                 throw  new Exception("该车作业环节未全部完成!");
                 throw  new Exception("该车作业环节未全部完成!");
             }
             }
         }
         }
+        if(orderType == 2){
+            //根据总实绩ID查询该车有没有装货
+            Map<String,Object> loadResultMap = tmstruckLoadResultMapper.getLoadResultMap(DataChange.dataToBigDecimal(mesMap.get("resultTotalId")));
+            if(loadResultMap == null || loadResultMap.get("loadEndTime") == null){
+                throw new Exception("该车未扫装货,请提醒司机去扫装货");
+            }
+        }
         map.putAll(mesMap);
         map.putAll(mesMap);
         map.putAll(selectMap);
         map.putAll(selectMap);
         map.remove("Sqe");
         map.remove("Sqe");

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

@@ -67,6 +67,8 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
 
 
     @Autowired
     @Autowired
     private  TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
     private  TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
+    @Autowired
+    private TmstruckUnloadResultMapper tmstruckUnloadResultMapper;
 
 
     /**
     /**
      * 生成销售装车实绩(虚拟装车实绩)
      * 生成销售装车实绩(虚拟装车实绩)
@@ -203,6 +205,8 @@ 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"));
+        //装货时查询是否含有净重
+        Integer netWeight = tmstruckUnloadResultMapper.getNetWeightByTotalId(resultTotalId);
         if(orderType == 11 || orderType == 15 || orderType == 16){
         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;
@@ -245,6 +249,13 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         if(dataMap == null){
         if(dataMap == null){
             return -3; //该订单没有装车作业
             return -3; //该订单没有装车作业
         }
         }
+        //获取该实绩的路段顺序号
+        BigDecimal segmentSqe = DataChange.dataToBigDecimal(dataMap.get("segmentSqe"));
+        //获取订单的路段顺序号
+        BigDecimal orderSegmentSqe = DataChange.dataToBigDecimal(mesMap.get("orderSegmentSqe"));
+        if(segmentSqe.intValue() > (orderSegmentSqe.intValue() + 1)){
+            return -6;
+        }
         //查询装车实绩ID
         //查询装车实绩ID
         map.putAll(dataMap);
         map.putAll(dataMap);
         tmstruckLoadResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
         tmstruckLoadResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
@@ -269,8 +280,13 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         }
         }
         // 更新装货点
         // 更新装货点
         tmstruckLoadResult.setLoadingId(DataChange.dataToBigDecimal(map.get("warehouseId")));
         tmstruckLoadResult.setLoadingId(DataChange.dataToBigDecimal(map.get("warehouseId")));
-        //更新路段顺序号
-        utilsService.updateOrderLineSequence(map);
+        if(netWeight == 0){ //如果没有净重 则更新路段顺序号  有则不更新
+            //路段顺序号 + 1
+            map.put("orderId", mesMap.get("orderId"));
+            utilsService.updateOrderLineSequence(map);
+        }
+        ////更新路段顺序号
+        //utilsService.updateOrderLineSequence(map);
         //判断是否为未装货
         //判断是否为未装货
         if (map.get("insertUpdateRemark")!=null) {
         if (map.get("insertUpdateRemark")!=null) {
             String insertUpdateRemark = (String) map.get("insertUpdateRemark");
             String insertUpdateRemark = (String) map.get("insertUpdateRemark");

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

@@ -193,9 +193,16 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
         if(dataMap == null){
         if(dataMap == null){
             return -3;  //该订单没有卸货作业
             return -3;  //该订单没有卸货作业
         }
         }
+        //获取该实绩的路段顺序号
+        BigDecimal segmentSqe = DataChange.dataToBigDecimal(dataMap.get("segmentSqe"));
+        //获取订单的路段顺序号
+        BigDecimal orderSegmentSqe = DataChange.dataToBigDecimal(mesMap.get("orderSegmentSqe"));
+        if(segmentSqe.intValue() > (orderSegmentSqe.intValue() + 1)){
+            return -6;
+        }
         map.putAll(dataMap);
         map.putAll(dataMap);
         updateUnloadResultBy(map); //更新卸货实绩
         updateUnloadResultBy(map); //更新卸货实绩
-        if(netWeight == 0){ //如果没有净重 则更新路段顺序号  有则不更新
+        if(netWeight == 0 || (netWeight == 1 && (orderType == 10 || orderType == 20))){ //如果没有净重 则更新路段顺序号  有则不更新
             //路段顺序号 + 1
             //路段顺序号 + 1
             map.put("orderId", mesMap.get("orderId"));
             map.put("orderId", mesMap.get("orderId"));
             utilsService.updateOrderLineSequence(map);
             utilsService.updateOrderLineSequence(map);

+ 0 - 2
src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java

@@ -44,8 +44,6 @@ public class ColumnDataUtil {
 
 
 
 
 
 
-
-
     public PageListAdd tableColumnData2(Integer apiId, List<Map<String, Object>> list,List<Map<String,Object>> data) {
     public PageListAdd tableColumnData2(Integer apiId, List<Map<String, Object>> list,List<Map<String,Object>> data) {
         List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
         List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
         for (Map<String, Object> columnData : columnDataList) {
         for (Map<String, Object> columnData : columnDataList) {

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

@@ -9,9 +9,9 @@ spring:
     name: dil-tms-truck-dev
     name: dil-tms-truck-dev
   #Redis相关配置
   #Redis相关配置
   redis:
   redis:
-    host: 172.16.33.161
+    host: 172.16.33.166
     port: 6379
     port: 6379
-    password: 123456
+    password: adhykdj
   cache:
   cache:
     type: redis
     type: redis
     redis:
     redis:

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

@@ -10,9 +10,9 @@ spring:
     name: dil-tms-truck-dev
     name: dil-tms-truck-dev
   #Redis相关配置
   #Redis相关配置
   redis:
   redis:
-    host: 172.16.33.161
+    host: 172.16.33.166
     port: 6379
     port: 6379
-    password: 123456
+    password: adhykdj
   cache:
   cache:
     type: redis
     type: redis
     redis:
     redis:

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

@@ -16,7 +16,7 @@ spring:
 eureka:
 eureka:
   client:
   client:
     service-url:
     service-url:
-      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.161}:${EUREKA_PORT:8081}/eureka/
+      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.166}:${EUREKA_PORT:8081}/eureka/
     register-with-eureka: false #表示向EurekaServer注册自己 默认为true
     register-with-eureka: false #表示向EurekaServer注册自己 默认为true
     fetch-registry: false #是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
     fetch-registry: false #是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
 
 
@@ -32,7 +32,7 @@ cache:
 redis:
 redis:
   host: 10.10.50.28
   host: 10.10.50.28
   port: 6379
   port: 6379
-  pwd: 123456
+  pwd: adhykdj
   project:
   project:
     prefix: sysmanage
     prefix: sysmanage
   pool:
   pool:

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

@@ -86,7 +86,6 @@
                             on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
                             on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
                        left join RMS_CONSIGNEE RCON
                        left join RMS_CONSIGNEE RCON
                             on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
                             on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
-
               where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
               where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
                 and OO.ORDER_TYPE = #{orderTypee}
                 and OO.ORDER_TYPE = #{orderTypee}
                 <if test="oneDate != null">
                 <if test="oneDate != null">
@@ -96,6 +95,10 @@
                     and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
                     and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
                     and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
                     and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
                 </if>
                 </if>
+               <if test="con!=null">
+                and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
+                   instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
+               </if>
              )
              )
         <where>
         <where>
             <if test="capacityNumber != null">
             <if test="capacityNumber != null">
@@ -246,6 +249,10 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
         </if>
         </if>
+        <if test="con!=null">
+            and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
+            instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
+        </if>
         )
         )
         <where>
         <where>
             <if test="capacityNumber != null">
             <if test="capacityNumber != null">
@@ -326,7 +333,6 @@
 <!--  查询销售统计报表  -->
 <!--  查询销售统计报表  -->
     <!--  查询销售统计报表  -->
     <!--  查询销售统计报表  -->
     <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
     <select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
-        select * from (
         select
         select
         *
         *
         from (
         from (
@@ -350,11 +356,13 @@
         RM.MATERIAL_NAME "materialName",
         RM.MATERIAL_NAME "materialName",
         TLR.INSERT_UPDATE_REMARK "materialRemark",
         TLR.INSERT_UPDATE_REMARK "materialRemark",
         ASO.SALE_NUMBER "saleNumber",
         ASO.SALE_NUMBER "saleNumber",
+        ASM.SALE_WAREHOUSE "saleWarehouse",
         TLR.CASE_NUMBER "caseNumber",
         TLR.CASE_NUMBER "caseNumber",
         RC2.CARRIER_NAME "carrierName",
         RC2.CARRIER_NAME "carrierName",
         TAR.RESULT_ARRIVAL_ADDRESS "arrivalAddress",
         TAR.RESULT_ARRIVAL_ADDRESS "arrivalAddress",
         TRR.RESULT_ARRIVAL_ADDRESS "receiptAddress",
         TRR.RESULT_ARRIVAL_ADDRESS "receiptAddress",
-        CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
+        RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialCode",
+        RM.MATERIAL_NAME  || TLR.INSERT_UPDATE_REMARK || ASM.SALE_WAREHOUSE || RW.WAREHOUSE_NAME "likeRemark"
         from TMSTRUCK_WEIGHT_RESULT TWR
         from TMSTRUCK_WEIGHT_RESULT TWR
         left join TMSTRUCK_TOTAL_RESULT TTR
         left join TMSTRUCK_TOTAL_RESULT TTR
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
@@ -362,6 +370,10 @@
         on TTR.ORDER_ID = OO.ORDER_ID
         on TTR.ORDER_ID = OO.ORDER_ID
         left join AMS_SALE_ORDER_MATERIAL ASOM
         left join AMS_SALE_ORDER_MATERIAL ASOM
         on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
         on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
+        left join AMS_SALE_TRUCKNO_MATERIAL ASTM
+        on ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
+        left join AMS_SALE_MATERIAL ASM
+        on ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
         left join AMS_DISPATCH_SALE_ORDER ADSO
         left join AMS_DISPATCH_SALE_ORDER ADSO
         on ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
         on ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
         left join RMS_CARRIER RC2
         left join RMS_CARRIER RC2
@@ -397,7 +409,7 @@
         on TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         on TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         left join TMStRUCK_RECEIPT_RESULT TRR
         left join TMStRUCK_RECEIPT_RESULT TRR
         on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
         on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-        WHERE OO.ORDER_TYPE = #{orderType}
+        WHERE OO.ORDER_TYPE = #{orderTypee}
         AND ASO.SHIPPER_ID = #{shipperId}
         AND ASO.SHIPPER_ID = #{shipperId}
         <if test="carrierSsoId != null">
         <if test="carrierSsoId != null">
             and RC2.CARRIER_SSO_ID = #{carrierSsoId}
             and RC2.CARRIER_SSO_ID = #{carrierSsoId}
@@ -412,104 +424,10 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
             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
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
         </if>
         </if>
-        ) RRR
-            <where>
-                <if test="remark != null" >
-                    and RRR."materialName" LIKE #{remark} or RRR."materialRemark" LIKE #{remark}
-                </if>
-            </where>
         )
         )
         <where>
         <where>
-            <if test="orderNumber != null">
-                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-                    "orderNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="carrierName != null">
-                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
-                    "carrierName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="enGatepostName != null">
-                <foreach collection="enGatepostName" item="item" open="(" separator="or" close=")">
-                    "enGatepostName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="outGatepostName != null">
-                <foreach collection="outGatepostName" item="item" open="(" separator="or" close=")">
-                    "outGatepostName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="caseNumber != null">
-                <foreach collection="caseNumber" item="item" open="(" separator="or" close=")">
-                    "caseNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="capacityNumber != null">
-                and
-                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
-                    "capacityNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="materialRemark != null">
-                and
-                <foreach collection="materialRemark" item="item" open="(" separator="or" close=")">
-                    "materialRemark" = #{item}
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultEntryGateTime != null">
-                and
-                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
-                    "resultEntryGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeightTime != null">
-                and
-                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultTareWeightTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeight != null">
-                and
-                <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
-                    "resultTareWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultLoadEndTime != null">
-                and
-                <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
-                    "resultLoadEndTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="warehouseName != null">
-                and
-                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
-                    "warehouseName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeightTime != null">
-                and
-                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeightTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeight != null">
-                and
-                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeight" like '%${item}%'
-                </foreach>
+            <if test="remark != null">
+               and "likeRemark" like #{remark}
             </if>
             </if>
             <if test="materialName != null">
             <if test="materialName != null">
                 and
                 and
@@ -517,18 +435,6 @@
                     "materialName" like '%${item}%'
                     "materialName" like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
-            <if test="resultNetWeight != null">
-                and
-                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-                    "resultNetWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultOutGateTime != null">
-                and
-                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
-                    "resultOutGateTime" like '%${item}%'
-                </foreach>
-            </if>
         </where>
         </where>
         <include refid="orderBy"></include>
         <include refid="orderBy"></include>
         <if test="orderField == null">
         <if test="orderField == null">
@@ -562,6 +468,7 @@
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RS.SUPPLIER_NAME            "sendName",
         RS.SUPPLIER_NAME            "sendName",
         RM.MATERIAL_NAME                     "materialName",
         RM.MATERIAL_NAME                     "materialName",
+        RS.SUPPLIER_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conLike",
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
         from OMSTRUCK_ORDER OO
         from OMSTRUCK_ORDER OO
         join TMSTRUCK_TOTAL_RESULT TTR
         join TMSTRUCK_TOTAL_RESULT TTR
@@ -611,10 +518,6 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
         </if>
         </if>
-        <if test="con!=null">
-            where  "receiveName" like #{con} or  "sendName" like #{con} or "materialName" like #{con}
-            or "capacityNumber" like #{con}
-        </if>
         <if test="userId!=null">
         <if test="userId!=null">
             and ASO.INSERT_USERNAME=#{userId}
             and ASO.INSERT_USERNAME=#{userId}
         </if>
         </if>
@@ -623,100 +526,8 @@
         </if>
         </if>
         )
         )
         <where>
         <where>
-            <if test="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="materialName != null">
-                and
-                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-                    "materialName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="orderNumber != null">
-                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-                    "orderNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="capacityNumber != null">
-                and
-                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
-                    "capacityNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultEntryGateTime != null">
-                and
-                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
-                    "resultEntryGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeightTime != null">
-                and
-                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeight != null">
-                and
-                <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
-                    "resultTareWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultEndTime != null">
-                and
-                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultEndTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
-                </foreach>
-            </if>
-            <if test="warehouseName != null">
-                and
-                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
-                    "warehouseName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeightTime != null">
-                and
-                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeight != null">
-                and
-                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultNetWeight != null">
-                and
-                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-                    "resultNetWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultOutGateTime != null">
-                and
-                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
-                    "resultOutGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostEntryName != null">
-                and
-                <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
-                    "gatepostEntryName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostOutName != null">
-                and
-                <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
-                    "gatepostOutName" like '%${item}%'
-                </foreach>
+            <if test="con != null">
+                and "conLike" like #{con}
             </if>
             </if>
         </where>
         </where>
         <include refid="orderBy"></include>
         <include refid="orderBy"></include>
@@ -751,8 +562,8 @@
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RCON.CONSIGNEE_COMPANY_NAME "receiveName",
         RS.SUPPLIER_NAME            "sendName",
         RS.SUPPLIER_NAME            "sendName",
         RM.MATERIAL_NAME                     "materialName",
         RM.MATERIAL_NAME                     "materialName",
+        RCON.CONSIGNEE_COMPANY_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conlike",
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
-
         from OMSTRUCK_ORDER OO
         from OMSTRUCK_ORDER OO
         join TMSTRUCK_TOTAL_RESULT TTR
         join TMSTRUCK_TOTAL_RESULT TTR
             on TTR.ORDER_ID = OO.ORDER_ID
             on TTR.ORDER_ID = OO.ORDER_ID
@@ -801,10 +612,6 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_GROSS_WEIGHT_TIME
             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
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
         </if>
         </if>
-        <if test="con!=null">
-            where  "receiveName" like #{con} or  "sendName" like #{con} or "materialName" like #{con}
-           or "capacityNumber" like #{con}
-        </if>
         <if test="userId!=null">
         <if test="userId!=null">
             and ASO.INSERT_USERNAME=#{userId}
             and ASO.INSERT_USERNAME=#{userId}
         </if>
         </if>
@@ -813,100 +620,8 @@
         </if>
         </if>
         )
         )
         <where>
         <where>
-            <if test="receiveName != null">
-                and
-                <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
-                    "receiveName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="sendName != null">
-                and
-                <foreach collection="sendName" item="item" open="(" separator="or" close=")">
-                    "sendName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="materialName != null">
-                and
-                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-                    "materialName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="orderNumber != null">
-                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-                    "orderNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="capacityNumber != null">
-                and
-                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
-                    "capacityNumber" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultEntryGateTime != null">
-                and
-                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
-                    "resultEntryGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeightTime != null">
-                and
-                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultTareWeightTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultTareWeight != null">
-                and
-                <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
-                    "resultTareWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultLoadEndTime != null">
-                and
-                <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
-                    "resultLoadEndTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="warehouseName != null">
-                and
-                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
-                    "warehouseName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeightTime != null">
-                and
-                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeightTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultGrossWeight != null">
-                and
-                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
-                    "resultGrossWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultNetWeight != null">
-                and
-                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
-                    "resultNetWeight" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="resultOutGateTime != null">
-                and
-                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
-                    "resultOutGateTime" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostEntryName != null">
-                and
-                <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
-                    "gatepostEntryName" like '%${item}%'
-                </foreach>
-            </if>
-            <if test="gatepostOutName != null">
-                and
-                <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
-                    "gatepostOutName" like '%${item}%'
-                </foreach>
+            <if test="con != null">
+                and "conlike" like #{con}
             </if>
             </if>
         </where>
         </where>
         <include refid="orderBy"></include>
         <include refid="orderBy"></include>
@@ -1383,7 +1098,8 @@
         TLFR2.RESULT_OUT_GATE_TIME    "outGatepostTimeSecond",
         TLFR2.RESULT_OUT_GATE_TIME    "outGatepostTimeSecond",
         TLFR2.RESULT_OUT_GATE_TIME    "resultOutGateTime",
         TLFR2.RESULT_OUT_GATE_TIME    "resultOutGateTime",
         TLFR2.RESULT_OUT_MODE         "outModeSecond",
         TLFR2.RESULT_OUT_MODE         "outModeSecond",
-        RG4.GATEPOST_NAME             "gatepostNameSecond"
+        RG4.GATEPOST_NAME             "gatepostNameSecond",
+        RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RS.SUPPLIER_NAME || RCE.CONSIGNEE_COMPANY_NAME "likeCon"
         FROM OMSTRUCK_ORDER OO
         FROM OMSTRUCK_ORDER OO
         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
@@ -1412,8 +1128,7 @@
         LEFT JOIN RMS_TRUCK_CALCULATE RTC4  ON RTC4.TRUCK_CALCULATE_ID = TWR4.RESULT_TARE_PLACE_ID
         LEFT JOIN RMS_TRUCK_CALCULATE RTC4  ON RTC4.TRUCK_CALCULATE_ID = TWR4.RESULT_TARE_PLACE_ID
         LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR2  ON TLFR2.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR2  ON TLFR2.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         LEFT JOIN RMS_GATEPOST RG4  ON TLFR2.GATEPOST_ID = RG4.GATEPOST_ID
         LEFT JOIN RMS_GATEPOST RG4  ON TLFR2.GATEPOST_ID = RG4.GATEPOST_ID
-        WHERE OO.ORDER_TYPE = 14
-        AND TER1.SEGMEN_SQE = 1
+        WHERE  TER1.SEGMEN_SQE = 1
         AND TWR1.TARE_SEGMENT_SQE = 2
         AND TWR1.TARE_SEGMENT_SQE = 2
         AND TLR.SEGMENT_SQE = 3
         AND TLR.SEGMENT_SQE = 3
         AND TWR2.GROSS_SEGMENT_SQE = 4
         AND TWR2.GROSS_SEGMENT_SQE = 4
@@ -1424,6 +1139,7 @@
         AND TWR4.TARE_SEGMENT_SQE = 9
         AND TWR4.TARE_SEGMENT_SQE = 9
         AND TLFR2.SEGMENT_SQE = 10
         AND TLFR2.SEGMENT_SQE = 10
         AND TWR2.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
         AND TWR2.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
+        AND OO.ORDER_TYPE = 14
         <if test="oneDate != null">
         <if test="oneDate != null">
             and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR4.RESULT_TARE_WEIGHT_TIME
             and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR4.RESULT_TARE_WEIGHT_TIME
         </if>
         </if>
@@ -1433,8 +1149,11 @@
         </if>
         </if>
         )
         )
         <where>
         <where>
+            <if test="con != null">
+                and "likeCon" like #{con}
+            </if>
             <if test="consigneeName != null">
             <if test="consigneeName != null">
-                <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
+                and <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
                     "consigneeName" like '%${item}%'
                     "consigneeName" like '%${item}%'
                 </foreach>
                 </foreach>
             </if>
             </if>
@@ -2049,7 +1768,6 @@
                TWR.RESULT_NET_WEIGHT "resultNetWeight",
                TWR.RESULT_NET_WEIGHT "resultNetWeight",
                RL.LINE_NAME "lineName",
                RL.LINE_NAME "lineName",
                RC3.CARRIER_NAME "carrierName"
                RC3.CARRIER_NAME "carrierName"
-
         from OMSTRUCK_ORDER OO
         from OMSTRUCK_ORDER OO
         LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
         LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
         ON OO.ORDER_ID=OOM.ORDER_ID
         ON OO.ORDER_ID=OOM.ORDER_ID
@@ -2109,7 +1827,8 @@
         TWR.RESULT_GROSS_WEIGHT_TIME "grossweightTime",
         TWR.RESULT_GROSS_WEIGHT_TIME "grossweightTime",
         TWR.RESULT_GROSS_WEIGHT "grossWeight",
         TWR.RESULT_GROSS_WEIGHT "grossWeight",
         RL.LINE_NAME "lineName",
         RL.LINE_NAME "lineName",
-        RC2.CARRIER_NAME "carrierName"
+        RC2.CARRIER_NAME "carrierName",
+        RMT.MATERIAL_TYPE_NAME "materialTypeName"
         from OMSTRUCK_ORDER OO
         from OMSTRUCK_ORDER OO
         left join TMSTRUCK_TOTAL_RESULT TTR on OO.ORDER_ID = TTR.ORDER_ID
         left join TMSTRUCK_TOTAL_RESULT TTR on OO.ORDER_ID = TTR.ORDER_ID
         left join RMS_LINE RL ON OO.LINE_ID=RL.LINE_ID
         left join RMS_LINE RL ON OO.LINE_ID=RL.LINE_ID
@@ -2126,6 +1845,7 @@
         left join RMS_MATERIAL RM on ARM.MATERIAL_ID = RM.MATERIAL_ID
         left join RMS_MATERIAL RM on ARM.MATERIAL_ID = RM.MATERIAL_ID
         left join RMS_WAREHOUSE RW1 on ARM.REQUIREMENT_UNLOAD_UNIT_ID = RW1.WAREHOUSE_ID
         left join RMS_WAREHOUSE RW1 on ARM.REQUIREMENT_UNLOAD_UNIT_ID = RW1.WAREHOUSE_ID
         left join RMS_WAREHOUSE RW2 on ARM.REQUIREMENT_PLATFORM_ID = RW2.WAREHOUSE_ID
         left join RMS_WAREHOUSE RW2 on ARM.REQUIREMENT_PLATFORM_ID = RW2.WAREHOUSE_ID
+        left join RMS_MATERIAL_TYPE RMT ON RMT.MATERIAL_TYPE_ID = RM.MATERIAL_TYPE_ID
         <where>
         <where>
             OO.ORDER_TYPE in (11,15,16)  AND  TWR.RESULT_NET_WEIGHT IS NOT NULL
             OO.ORDER_TYPE in (11,15,16)  AND  TWR.RESULT_NET_WEIGHT IS NOT NULL
             <if test="orgCode!=null">
             <if test="orgCode!=null">

+ 17 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -1480,7 +1480,8 @@
     TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
     TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
     RW.WAREHOUSE_NAME          "warehouseName",
     RW.WAREHOUSE_NAME          "warehouseName",
-    TWR.RESULT_NET_WEIGHT     "resultNetWeight"
+    TWR.RESULT_NET_WEIGHT     "resultNetWeight",
+    RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RW.WAREHOUSE_NAME "likeCon"
     FROM TMSTRUCK_LOAD_RESULT TLR
     FROM TMSTRUCK_LOAD_RESULT TLR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
     ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
@@ -1498,10 +1499,20 @@
     ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
     ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
     WHERE OO.ORDER_TYPE = #{orderTypee}
     WHERE OO.ORDER_TYPE = #{orderTypee}
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
+    <if test="oneDate != null">
+      and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLR.RESULT_LOAD_END_TIME
+    </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TLR.RESULT_LOAD_END_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLR.RESULT_LOAD_END_TIME
+    </if>
     )
     )
     <where>
     <where>
+      <if test="con != null">
+        and "likeCon" like #{con}
+      </if>
       <if test="resultLoadEndTime != null">
       <if test="resultLoadEndTime != null">
-        <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
+        and <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
           "resultLoadEndTime" like '%${item}%'
           "resultLoadEndTime" like '%${item}%'
         </foreach>
         </foreach>
       </if>
       </if>
@@ -1762,5 +1773,9 @@
          )
          )
     WHERE ROWNUM = 1
     WHERE ROWNUM = 1
   </select>
   </select>
+  <select id="getLoadResultMap" resultType="java.util.Map" parameterType="decimal">
+    select TLR.RESULT_LOAD_END_TIME "loadEndTime" from TMSTRUCK_LOAD_RESULT TLR
+    WHERE TLR.RESULT_TOTAL_ID = #{resultTotalId}
+  </select>
 
 
 </mapper>
 </mapper>

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

@@ -2110,7 +2110,8 @@
         TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
         TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
         TWR.RESULT_NET_WEIGHT "resultNetWeight",
         TWR.RESULT_NET_WEIGHT "resultNetWeight",
         TWR.RESULT_POUND_NO "resultPoundNo",
         TWR.RESULT_POUND_NO "resultPoundNo",
-        TWR.INSERT_UPDATE_REMARK "insertUpdateRemark"
+        TWR.INSERT_UPDATE_REMARK "insertUpdateRemark",
+        RC.CAPACITY_NUMBER
         from TMSTRUCK_WEIGHT_RESULT TWR
         from TMSTRUCK_WEIGHT_RESULT TWR
         left join TMSTRUCK_TOTAL_RESULT TTR
         left join TMSTRUCK_TOTAL_RESULT TTR
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID