Bläddra i källkod

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

zhouzh 3 år sedan
förälder
incheckning
8aa808de45

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

@@ -105,12 +105,83 @@ public class OffSiteTransportationController extends BaseRESTfulController {
                                                     @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
                                                     )
     {
+        if(mapValue.containsKey("startTime")&&mapValue.containsKey("endTime")){
+            Date  startDate=new Date(Long.parseLong(mapValue.get("startTime").toString())) ;
+            Date  endDate=new Date(Long.parseLong(mapValue.get("endTime").toString())) ;
+            Calendar ca = Calendar.getInstance();
+            ca.setTime(endDate);
+            ca.add(Calendar.DATE,1);
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+            String startTime1=simpleDateFormat.format(startDate);
+            String endTime1=simpleDateFormat.format(ca.getTime());
+            mapValue.replace("startTime",startTime1);
+            mapValue.replace("endTime",endTime1);
+        }else {
+            Date  startDate=new Date() ;
+            Date  endDate=new Date() ;
+            Calendar ca = Calendar.getInstance();
+            ca.setTime(endDate);
+            ca.add(Calendar.DATE,1);
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+            String startTime1=simpleDateFormat.format(startDate);
+            String endTime1=simpleDateFormat.format(ca.getTime());
+            mapValue.replace("startTime",startTime1);
+            mapValue.replace("endTime",endTime1);
+        }
         List<Map<String,Object>> filter= offSiteTransportationService.getInTransitTransportation(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String,Object>> list= offSiteTransportationService.getInTransitTransportation(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, filter,list);
         return success(pageList);
-    }//headers = "content-type=multipart/form-data"
+    }
+
+
+
+    @ApiOperation("查询在途运输")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer")
+    })
+    @PostMapping("/getFinishTruckOrderInfo")
+    public RESTfulResult getFinishTruckOrderInfo(@RequestBody Map<String,Object> mapValue,
+                                                    @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
+                                                    @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
+                                                    @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
+    )
+    {
+        if(mapValue.containsKey("startTime")&&mapValue.containsKey("endTime")){
+            Date  startDate=new Date(Long.parseLong(mapValue.get("startTime").toString())) ;
+            Date  endDate=new Date(Long.parseLong(mapValue.get("endTime").toString())) ;
+            Calendar ca = Calendar.getInstance();
+            ca.setTime(endDate);
+            ca.add(Calendar.DATE,1);
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+            String startTime1=simpleDateFormat.format(startDate);
+            String endTime1=simpleDateFormat.format(ca.getTime());
+            mapValue.replace("startTime",startTime1);
+            mapValue.replace("endTime",endTime1);
+        }else {
+            Date  startDate=new Date() ;
+            Date  endDate=new Date() ;
+            Calendar ca = Calendar.getInstance();
+            ca.setTime(endDate);
+            ca.add(Calendar.DATE,1);
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+            String startTime1=simpleDateFormat.format(startDate);
+            String endTime1=simpleDateFormat.format(ca.getTime());
+            mapValue.replace("startTime",startTime1);
+            mapValue.replace("endTime",endTime1);
+        }
+        //已经完成
+        mapValue.put("orderStatus",2);
+        List<Map<String,Object>> filter= offSiteTransportationService.getInTransitTransportation(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        List<Map<String,Object>> list= offSiteTransportationService.getInTransitTransportation(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, filter,list);
+        return success(pageList);
+    }
 
     @PostMapping(value = "/addTmstruckReceiptResult" )
     public synchronized RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value , Integer num, String orderNumber, String resultArrivalAddress, Integer imgcount3, Integer imgcount4) throws Exception {
@@ -119,10 +190,12 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         map.put("orderNumber",orderNumber);
         map.put("resultArrivalAddress",resultArrivalAddress);
         Integer orderStatus = offSiteTransportationService.getOrderStatus(map);
+        //判断是否已经结束
         if (orderStatus!=null&&orderStatus==2){
-            return failed();
+            return failed(-3);
         }
         map.putAll(value);
+        //添加入库实绩
         Integer resTfulResult = offSiteTransportationService.addTmstruckReceiptResult(map);
         if (!resTfulResult.equals("4")){
             //保存路线
@@ -158,7 +231,7 @@ public class OffSiteTransportationController extends BaseRESTfulController {
                     }
                 }
             }
-
+            //设置运输距离,并且结束订单
             if (to!=null&&to.getResult()!=null&&to.getResult().getRunDistance()!=null){
                 Map<String,Object> ordermap=new HashMap<>();
                 ordermap.put("orderNumber",orderNumber);
@@ -185,10 +258,12 @@ public class OffSiteTransportationController extends BaseRESTfulController {
                 }
 
             }
+            //关闭运输订单
+            offSiteTransportationService.orderClose(orderNumber);
         }
 
 
-        return null;
+        return success(1);
     }
 
     //如果内容丢失重新获得
@@ -198,9 +273,9 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         String netValidationResult = zhongJiaoXingLu.netValidation(capacityNumber);
         Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
         if (Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
-            String searchPointJson = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+ URLEncoder.encode("安钢集团信阳钢铁有限责任公司","utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
+            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");
+            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<>();

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

@@ -40,12 +40,6 @@ public class TmstruckSmsRusultController extends BaseRESTfulController{
     ESFeign esFeign;
     @Autowired
     ColumnDataUtil columnDataUtil;
-    @ApiOperation(value = "新增短信实绩", notes = "通过人工稽核判断点击新增短信实绩")
-    @PostMapping(value = "/insertSmsResult")//BigDecimal
-    public RESTfulResult insertSmsResult(@RequestBody(required = false) Map<String, Object> map) {
-        int i = tmstruckSmsRusultService.addSmsResult(map);
-        return success(i);
-    }
     //查询短信实绩
     @ApiOperation(value="查询短信实绩")
     @ApiImplicitParams({

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

@@ -62,4 +62,6 @@ public interface TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLe
 
     Integer getSeq(BigDecimal orderId);
 
+    Map<String, Object> getMessageMap(BigDecimal orderId);
+
 }

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

@@ -58,7 +58,7 @@ public interface UtilsMapper {
     //通过运输订单号查询订单ID
     BigDecimal getOrderIdByOrderNumber(String orderNumber);
 
-    //通过运输订单查询总实绩ID
+    //通过运输订单id查询总实绩ID
     BigDecimal getTotalIdByOrderNumber(String orderNumber);
 
 
@@ -131,4 +131,6 @@ public interface UtilsMapper {
     //通过车牌号和运输订单号去寻找装车实绩
     BigDecimal getLoadResultId(Map<String,Object> map);
 
+    BigDecimal getTotalIdByOrderId(BigDecimal orderId);
+
 }

+ 2 - 3
src/main/java/com/steerinfo/dil/service/ITmstruckSmsRusultService.java

@@ -20,9 +20,8 @@ import java.util.Map;
  * @see null
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
-public interface ITmstruckSmsRusultService extends IBaseService<TmstruckSmsRusult, BigDecimal>{
-  //新增短信
- int addSmsResult(Map<String ,Object> map);
+public interface ITmstruckSmsRusultService{
+
  //查询短信实绩
  List<Map<String,Object>> getSmsResult(Map<String,Object> map);
 }

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

@@ -60,6 +60,9 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
     @Autowired
     OffSiteTransportationServiceImpl offSiteTransportationService;
 
+    @Autowired
+    TmstruckSmsRusultServiceImpl tmstruckSmsRusultService;
+
     @Autowired
     OmsFeign omsFeign;
 
@@ -211,6 +214,13 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
                     throw new Exception("请提醒司机确认订单!");
                 }
                 try {
+                    //发送短信
+                    Map<String,Object>messageMap = tmstruckLeaveFactoryResultMapper.getMessageMap(orderId);
+                    if(messageMap.get("saleOrderConsigneeTEL") != null){
+                            String capacityNum = (String) messageMap.get("capacityNumber");
+                            String mobile = (String)messageMap.get("saleOrderConsigneeTEL");
+                            tmstruckSmsRusultService.generaSendMessage(mobile,capacityNum,orderId);
+                    }
                     //销售厂外监控
                     Map<String, Object> parem=tmstruckLeaveFactoryResultService.getTruckFactoryResult(orderNumber);
                     parem.put("turnOf","0");

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

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

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

@@ -172,6 +172,7 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
             measureCommission.put("isInsert", true);
             measureCommission.put("isRelationEAS", true);
             measureCommission.put("flowTo", "出厂钢材");
+            measureCommission.put("numberOfFurnaces",map.get("numberOfFurnaces"));
             Object isPoundSale = measureCommission.get("isPoundSale");
             measureCommission.remove("isPoundSale");
             if(isPoundSale != null){

+ 37 - 57
src/main/java/com/steerinfo/dil/service/impl/TmstruckSmsRusultServiceImpl.java

@@ -1,18 +1,18 @@
 package com.steerinfo.dil.service.impl;
 
-import com.steerinfo.dil.feign.JoinFeign;
-import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.dil.mapper.TmstruckSmsRusultMapper;
 import com.steerinfo.dil.mapper.UtilsMapper;
 import com.steerinfo.dil.model.TmstruckSmsRusult;
 import com.steerinfo.dil.service.ITmstruckSmsRusultService;
+import com.steerinfo.dil.util.HTTPRequestUtils;
 import com.steerinfo.dil.util.MD5Util;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.HashMap;
@@ -33,78 +33,58 @@ import java.util.Map;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 @Service(value = "tmstruckSmsRusultService")
-public class TmstruckSmsRusultServiceImpl extends BaseServiceImpl<TmstruckSmsRusult, BigDecimal> implements ITmstruckSmsRusultService {
+public class TmstruckSmsRusultServiceImpl  implements ITmstruckSmsRusultService {
 
     @Autowired
     private TmstruckSmsRusultMapper tmstruckSmsRusultMapper;
     @Autowired
     private UtilsMapper utilsMapper;
-    @Autowired
-    JoinFeign joinFeign;
-//    @Autowired
-//    private OmstruckOrderMapper omstruckOrderMapper;
 
-    @Override
-    protected IBaseMapper<TmstruckSmsRusult, BigDecimal> getMapper() {
-        return tmstruckSmsRusultMapper;
-    }
 
     /**
-     * 销售物流通过点击确认新增短信实绩
-     * @param map
+     * 新增短信实绩
+      * @param orderId
      * @return
+     * @throws Exception
      */
-    @Override
-    public int addSmsResult(Map<String,Object> map) {
-        //获取用户名
-//        Integer personnelId=(Integer) map.get("personnelId");
-//        String personnelName=omstruckOrderMapper.selectPersonNameByPersonnelId(personnelId);
-        //获取订单号
-        String orderNumber = map.get("orderNumber").toString();
+    public int addSmsResult(BigDecimal orderId) throws Exception {
         //新增短信实绩
         TmstruckSmsRusult tmstruckSmsRusult=new TmstruckSmsRusult();
         tmstruckSmsRusult.setResultId(tmstruckSmsRusultMapper.selectMaxId());
         //新增总实绩id
-        BigDecimal resultTotalId = utilsMapper.getTotalIdByOrderNumber(orderNumber);
+        BigDecimal resultTotalId = utilsMapper.getTotalIdByOrderId(orderId);
         tmstruckSmsRusult.setTotalResultId(resultTotalId);
-        Integer shipperId = tmstruckSmsRusultMapper.selectShipperIdByOrderNumber(orderNumber);
-        //设置发送方id
-        tmstruckSmsRusult.setSenderId(new BigDecimal(shipperId));
-        //通过发送方ID查询appId和秘钥
-        Map<String,Object>map5=tmstruckSmsRusultMapper.selectIdApp(new BigDecimal(shipperId));
-        String AppId= (String) map5.get("AppId");
-        String secretKey=(String) map5.get("secretKey");
-
         tmstruckSmsRusult.setResultSendingTime(new Date());
-        //根据运输订单号查找司机电话号码
-        String driverPhone=tmstruckSmsRusultMapper.selectCarDriverByOrderNumber(orderNumber);
-        String content="您好!您在达钢购买的钢材已发车,司机电话"+driverPhone+"欲知详情,请前往xxxxx地址,下载APP 达钢物流";
-        tmstruckSmsRusult.setResultSmsContent("您好!您在达钢购买的钢材已发车,司机电话"+driverPhone+"欲知详情,请前往xxxxx地址,下载APP 达钢物流");
-
         //新增短信实绩
         tmstruckSmsRusult.setInsertTime(new Date());
-        //调用接口发送短信
-        Map<String, Object> map2 = new HashMap<>();
-        String timestamp=String.valueOf(new Date().getTime());
-        String sign=AppId+secretKey+timestamp;
-        try {
-            String signMd5=MD5Util.md5Encode(sign);
-            map2.put("sign",signMd5);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-      	map2.put("AppId",AppId);
-        map2.put("timestamp",timestamp);
-        map2.put("content",content);
-        map2.put("mobiles",driverPhone);
-        if (joinFeign.push(map2)){
-            int i=tmstruckSmsRusultMapper.insertSelective(tmstruckSmsRusult);
-            return i;
-        }
-        else return 0;
-
-
+        tmstruckSmsRusultMapper.insertSelective(tmstruckSmsRusult);
+        return 1;
+    }
 
+    public int generaSendMessage(String mobile,String capacityNum,BigDecimal orderId) throws Exception {
+        String url = "http://www.btom.cn:8080/simpleinter/sendSMS?appId=EUCP-EMY-SMS1-10QNI&";
+        String tmpTmp = MD5Util.formatTimeTmp();
+        String sign = MD5Util.sign("EUCP-EMY-SMS1-10QNI","EE20B0B28B75E567");
+        String mobile1 = mobile;
+        String content = "【达州钢铁】您好,您在达钢购买的钢材已发车,司机车牌号:" + capacityNum + "。退订";
+        String sendUrl = url+"timestamp=" + tmpTmp + "&sign=" + sign + "&mobiles=" + mobile1 + "&content=" + content;
+        String jsonData = null;
+        JSONObject jsonObject = new JSONObject();
+        jsonData = HTTPRequestUtils.send(sendUrl,jsonObject,"utf-8");
+        if(!"null".equals(jsonData)){
+            System.out.println(jsonData);
+            HashMap hashMap = JSON.parseObject(jsonData, HashMap.class);
+            String code = (String) hashMap.get("code");
+            System.out.println(hashMap.get("code"));
+            if("SUCCESS".equals(code)){
+                return addSmsResult(orderId);
+            }else{
+                return 0;
+            }
+        }else{
+            System.out.println("短信发送失败:" + jsonData);
+            return 0;
+        }
     }
 
     @Override

+ 6 - 1
src/main/java/com/steerinfo/dil/util/MD5Util.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.util;
 
+
 import java.security.MessageDigest;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -59,8 +60,12 @@ import java.util.SimpleTimeZone;
          */
         public static void main(String[] args) throws Exception {
             String str = "123456";
-            System.out.println(MD5Util.md5Encode(str));
+            String ApiId = "EUCP-EMY-SMS1-10QNI";
+            String sererct = "EE20B0B28B75E567";
+            System.out.println(formatTimeTmp());
+            System.out.println(sign(ApiId,sererct));
         }
 
+
     }
 

+ 3 - 2
src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java

@@ -432,10 +432,10 @@ public class RouteServiceImpl implements RouteService {
                 String netValidationResult = zhongJiaoXingLu.netValidation(resultMap.get("capacityNumber").toString());
                 Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
                 if (Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
-                    String searchPointJson = HTTPRequestUtils.sendGet("https://apis.map.qq.com/ws/geocoder/v1/", "address="+URLEncoder.encode("安钢集团信阳钢铁有限责任公司","utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
+                    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(mapValue.get("receiveAddress")==null||"".equals(String.valueOf(mapValue.get("receiveAddress")))?"长沙市":resultMap.get("addressDeliveryAddress").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(resultMap.get("receiveAddress")==null||"".equals(String.valueOf(resultMap.get("receiveAddress")))?"长沙市":resultMap.get("receiveAddress").toString(),"utf-8")+"&key=WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y");
                     SearchPoint searchPoint2= (SearchPoint) DataConversionTool.jsonToBean(searchPointJson2, SearchPoint.class);
                     //运单生成之后保存
                     HashMap<String,String> redisMap=new HashMap<>();
@@ -478,6 +478,7 @@ public class RouteServiceImpl implements RouteService {
                         String redisStr=JSON.toJSONString(redisMap);
                         json = zhongJiaoXingLu.visualRoute(redisMap);
                         redisTemplate.opsForValue().set(orderUrl, redisStr, saveTime<0?1000:saveTime, TimeUnit.SECONDS);
+                        redisTemplate.opsForValue().set(orderUrl+suffix, redisStr);
 
                     }else {
 

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

@@ -178,8 +178,8 @@ public class ZhongJiaoXingLu {
             map.put("token", token);
             map.put("cid", cid);
             map.put("srt", srt);
-            map.put("vclN", vclN);
-            String url = "https://openapi.sinoiov.cn/save/apis/checkTruckExist";
+            map.put("vclN", vclN+"_2");
+            String url = "https://openapi.sinoiov.cn/save/apis/checkTruckExistV2";
             DataExchangeService des = new DataExchangeService(5000, 8000);
 
             // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送

+ 21 - 13
src/main/java/com/steerinfo/route/util/DataConversionTool.java

@@ -10,6 +10,7 @@ import java.lang.reflect.Type;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.logging.SimpleFormatter;
 
 //@Auther Tiroble
 //@meil 2439003195@qq.com
@@ -30,7 +31,8 @@ public class DataConversionTool {
             if (json instanceof String){
                 //将json转为JSONOject
                 jsonObject= JSONObject.parseObject(json.toString());
-            }else {
+            }
+            else {
                 jsonObject= (JSONObject) json;
             }
             //获得Class对象
@@ -53,17 +55,20 @@ public class DataConversionTool {
                     //判断jsonObject的item是否是String或者Integer,是简单类型直接赋值
                     if ((objectValue instanceof Long)||(objectValue instanceof String)||(objectValue instanceof Integer)||(objectValue instanceof Boolean)||(objectValue instanceof BigDecimal)){
                         //进行数据判断
-                        if (field.getType()== BigDecimal.class){
+                        if (field.getType()==BigDecimal.class){
                             field.set(classObject,new BigDecimal(objectValue.toString()));
-                        } else if (field.getType()== Short.class){
-                            field.set(classObject, Short.parseShort(objectValue.toString()));
-                        }else if (field.getType()== Date.class){
+                        } else if (field.getType()==Short.class){
+                            field.set(classObject,Short.parseShort(objectValue.toString()));
+                        }else if (field.getType()==Date.class){
                             SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                             Date time = formatter.parse(objectValue.toString());
                             field.set(classObject,time);
                         }
                         else {
-                            field.set(classObject,objectValue);
+                            if(field.getType()==Long.class||field.getType()==String.class||field.getType()==Integer.class||field.getType()==Boolean.class){
+                                field.set(classObject,objectValue);
+                            }
+
                         }
                     }
                     //集合类型类型
@@ -75,7 +80,7 @@ public class DataConversionTool {
                         Type genericType = field.getGenericType();
                         //如果是空的
                         if(genericType == null) {
-                            genericType= Object.class;
+                            genericType=Object.class;
                         }
                         // 如果是泛型参数的类型
                         else if(genericType instanceof ParameterizedType){
@@ -91,6 +96,9 @@ public class DataConversionTool {
                         }
                         field.set(classObject,list);
                     }
+//                    else if(field.getType()==Object.class){
+//                        field.set(classObject,objectValue);
+//                    }
                     //如果不是再判断是否是JSONOArray,复杂数据类型
                     else{
                         //如果是JSONObject需要判断是否是引用类型,如果是引用类型就还需要将值转为对应类型
@@ -117,7 +125,7 @@ public class DataConversionTool {
      * @throws IllegalAccessException
      */
     public static Map<String, Object> objectToMap(Object obj) throws IllegalAccessException {
-        Map<String, Object> map = new HashMap<String, Object>();
+        Map<String, Object> map = new HashMap<String,Object>();
         Class<?> clazz = obj.getClass();
         for (Field field : clazz.getDeclaredFields()) {
             field.setAccessible(true);
@@ -157,14 +165,14 @@ public class DataConversionTool {
                     //判断jsonObject的item是否是String或者Integer,是简单类型直接赋值
                     if ((objectValue instanceof String)||(objectValue instanceof Integer)||(objectValue instanceof Boolean)){
                         //进行数据判断
-                        if (field.getType()== BigDecimal.class){
+                        if (field.getType()==BigDecimal.class){
                             field.set(classObject,new BigDecimal(objectValue.toString()));
-                        } else if (field.getType()== Short.class){
+                        } else if (field.getType()==Short.class){
                             if(objectValue.toString()=="0.00"){
                                 field.set(classObject,0);
                             }
-                            field.set(classObject, Short.parseShort(objectValue.toString()));
-                        }else if (field.getType()== Date.class){
+                            field.set(classObject,Short.parseShort(objectValue.toString()));
+                        }else if (field.getType()==Date.class){
                             SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                             Date time = formatter.parse(objectValue.toString());
                             field.set(classObject,time);
@@ -183,7 +191,7 @@ public class DataConversionTool {
                         Type genericType = field.getGenericType();
                         //如果是空的
                         if(genericType == null) {
-                            genericType= Object.class;
+                            genericType=Object.class;
                         }
                         // 如果是泛型参数的类型
                         else if(genericType instanceof ParameterizedType){

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

@@ -21,7 +21,7 @@ spring:
 piction:
   # path: /usr/share/nginx/html/image
   #  path: /test/data/nginx/html/image
-#  path: C:\Users\24390\Desktop\work\a
+  #path: C:\Users\24390\Desktop\work\a
   path: /shared
 #feign设置
 openfeign:

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

@@ -53,10 +53,10 @@ str:
   tengxun:
     key: WDTBZ-A5VKJ-UDLFI-KYJY6-WTP2S-A6B4Y
   ZhongJiaoXingLu:
-    cid: 72c918a9-49d7-434e-ae24-e3b36a589800
-    srt: b6549e66-e3a2-44f2-a1a3-d1f77d6c96f2
-    user: f760f293-4234-4495-90c0-fa1bf5f29bf6
-    pwd: 5T91u0h5SVg132G41440MD1jj2B77I
+    cid: 84254ac6-9f05-47c7-ba3c-1d3398590d70
+    srt: b7c4b6ee-09c8-4865-a0b7-934d42205012
+    user: 108e0bda-1795-4e43-9df9-426a446eb77f
+    pwd: cKyp9G98yFy3gHBHG21us7z85377S1
     #停车
     parkMins: 60
     #离线时长

+ 128 - 105
src/main/resources/com/steerinfo/dil/mapper/OffSiteTransportationMapper.xml

@@ -15,105 +15,119 @@
       select
            *
         from (
-                 select  distinct  OO.ORDER_NUMBER              "orderNumber", --运单订单号
-                        RC.CAPACITY_NUMBER           "capacityNumber",--车牌号
-                        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",--计毛时间
-                        TWR.RESULT_NET_WEIGHT        "resultNetWeight",--净重
-                        TLFR.RESULT_OUT_GATE_TIME    "resultOutGateTime",--出厂时间
-                        RGOUT.GATEPOST_NAME          "outGatepostName",--出厂门禁
-                        RCR.CARRIER_NAME             "carrierName" , --承运商名称
-                        RRP.ADDRESS_DELIVERY_ADDRESS "deliveryAddress",  --详细收货地址
-                        RM.MATERIAL_NAME             "materialName" , --"物质名称"
-                        RM.MATERIAL_SPECIFICATION    "materialSpecification", -- "物质规格"
-                        RM.MATERIAL_MODEL            "materialModel", --"物质型号"
-                        RCON.CONSIGNEE_COMPANY_NAME   "receiveName"--客户名称
-                        
-                 from OMSTRUCK_ORDER OO --运输订单
-                          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 RCON --收货客户
-                               on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
-                          left join TMSTRUCK_TOTAL_RESULT TTR --运输总实绩
-                               on TTR.ORDER_ID = OO.ORDER_ID
-                          left 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
-                          
-                          left 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
-                          left join RMS_CAPACITY RC --运力
-                               on RC.CAPACITY_ID = OO.CAPACITY_ID
-                               
-                               
-                          left join AMS_DISPATCH_SALE_ORDER  ADSO
-                               on ASOM.SALE_ORDER_MATERIAL_ID=ADSO.SALE_ORDER_MATERIAL_ID
-                          left join RMS_CARRIER RCR --承运单位
-                               on ADSO.CARRIER_ID=RCR.CARRIER_ID
-                               
-                               
-                          left join RMS_RECEIVE_PLACE RRP  --收货地址
-                               on ASOM.SALE_SHIPPING_ADDRESS_ID=RRP.PLACE_ID
-                          left join RMS_RECEIVE_ADDRESS REA
-                               on RRP.ADDRESS_ID=REA.ADDRESS_ID
-                               
-                          left join AMS_SALE_TRUCKNO_MATERIAL ASTM
-                               on ASOM.SALE_ORDER_MATERIAL_ID=ASTM.SALE_ORDER_MATERIAL_ID
-                        left join TMSTRUCK_WEIGHT_RESULT TWR --运输实绩计重
-                        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID  and  ASTM.MATERIAL_ID =TWR.MATERIAL_ID
-                        left join AMS_SALE_MATERIAL ASM1
-                               on ASTM.MATERIAL_ID =ASM1.SALE_MATERIAL_ID
-                      
-                          left join RMS_MATERIAL RM
-                               on ASM1.MATERIAL_ID=RM.MATERIAL_ID
-                 where OO.ORDER_TYPE in (1) and TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
+        select  distinct
+                    OO.ORDER_STATUS               "orderStatus",
+                    OO.ORDER_NUMBER              "orderNumber", --运单订单号
+                    RC.CAPACITY_NUMBER           "capacityNumber",--车牌号
+                    TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",--计毛时间
+                    TWR.RESULT_NET_WEIGHT        "resultNetWeight",--净重
+                    TLFR.RESULT_OUT_GATE_TIME    "resultOutGateTime",--出厂时间
+                    RGOUT.GATEPOST_NAME          "outGatepostName",--出厂门禁
+                    RCR.CARRIER_NAME             "carrierName" , --承运商名称
+        CONCAT( CONCAT( CONCAT(RRA.ADDRESS_PROVINCE,RRA.ADDRESS_DISTRICT),RRA.Address_Town),RRP.ADDRESS_DELIVERY_ADDRESS) "deliveryAddress",  --详细收货地址
+                    RM.MATERIAL_NAME             "materialName" , --"物质名称"
+                    RM.MATERIAL_SPECIFICATION    "materialSpecification", -- "物质规格"
+                    RM.MATERIAL_MODEL            "materialModel", --"物质型号"
+                    RCON.CONSIGNEE_COMPANY_NAME   "receiveName"--客户名称
+                
+                
+                    from OMSTRUCK_ORDER OO --运输订单
+                    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 RCON --收货客户
+                    on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
+                    left join TMSTRUCK_TOTAL_RESULT TTR --运输总实绩
+                    on TTR.ORDER_ID = OO.ORDER_ID
+                    left 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
+                
+                    left 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
+                    left join RMS_CAPACITY RC --运力
+                    on RC.CAPACITY_ID = OO.CAPACITY_ID
+                
+                
+                    left join AMS_DISPATCH_SALE_ORDER  ADSO
+                    on ASOM.SALE_ORDER_MATERIAL_ID=ADSO.SALE_ORDER_MATERIAL_ID
+                    left join RMS_CARRIER RCR --承运单位
+                    on ADSO.CARRIER_ID=RCR.CARRIER_ID
+                
+                
+                    left join RMS_RECEIVE_PLACE RRP  --收货地址
+                    on ASOM.SALE_SHIPPING_ADDRESS_ID=RRP.PLACE_ID
+                    left join RMS_RECEIVE_ADDRESS RRA
+                    on RRP.ADDRESS_ID=RRA.ADDRESS_ID
+                
+                    left join AMS_SALE_TRUCKNO_MATERIAL ASTM
+                    on ASOM.SALE_ORDER_MATERIAL_ID=ASTM.SALE_ORDER_MATERIAL_ID
+                
+                    left join AMS_SALE_MATERIAL ASM1
+                    on ASTM.MATERIAL_ID =ASM1.SALE_MATERIAL_ID
+                
+                    left join TMSTRUCK_WEIGHT_RESULT TWR --运输实绩计重
+                    on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID  and  ASM1.MATERIAL_ID =TWR.MATERIAL_ID
+                
+                    left join RMS_MATERIAL RM
+                    on ASM1.MATERIAL_ID=RM.MATERIAL_ID
+                    where OO.ORDER_TYPE in (1) and TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
              )
              <where>
-                <if test="orderNumbers !=null">
-                    and "orderNumber" like '${orderNumbers}'
+                <if test="orderStatus !=null">
+                    and "orderStatus" ='${orderStatus}'
+                </if>
+                <if test="orderNumbers !=null and orderNumbers !=''">
+                    and "orderNumber" like '%${orderNumbers}%'
                 </if>
-                 <if test="capacityNumbers !=null">
-                     and "capacityNumber" like '${capacityNumbers}'
+                 <if test="capacityNumbers !=null and capacityNumbers !=''">
+                     and "capacityNumber" like '%${capacityNumbers}%'
+                 </if>
+                 <if test="resultGrossWeightTimes !=null and resultGrossWeightTimes !=''">
+                     and "resultGrossWeightTime" like '%${resultGrossWeightTimes}%'
                  </if>
-                 <if test="resultGrossWeightTimes !=null">
-                     and "resultGrossWeightTime" like '${resultGrossWeightTimes}'
+                 <if test="resultGrossWeightTimes !=null and resultGrossWeightTimes !=''">
+                     and "resultGrossWeightTime" like '%${resultGrossWeightTimes}%'
                  </if>
-                 <if test="resultGrossWeightTimes !=null">
-                     and "resultGrossWeightTime" like '${resultGrossWeightTimes}'
+                 <if test="resultOutGateTimes !=null and resultOutGateTimes !=''">
+                     and "resultOutGateTime" like '%${resultOutGateTimes}%'
                  </if>
-                 <if test="resultOutGateTimes !=null">
-                     and "resultOutGateTime" like '${resultOutGateTimes}'
+                 <if test="resultNetWeights !=null and resultNetWeights !=''">
+                     and "resultNetWeight" like '%${resultNetWeights}%'
                  </if>
-                 <if test="resultNetWeights !=null">
-                     and "resultNetWeight" like '${resultNetWeights}'
+                 <if test="resultOutGateTimes !=null and resultOutGateTimes !=''">
+                     and "resultOutGateTime" like '%${resultOutGateTimes}%'
                  </if>
-                 <if test="resultOutGateTimes !=null">
-                     and "resultOutGateTime" like '${resultOutGateTimes}'
+                 <if test="outGatepostNames !=null and outGatepostNames !=''">
+                     and "outGatepostName" like '%${outGatepostNames}%'
                  </if>
-                 <if test="outGatepostNames !=null">
-                     and "outGatepostName" like '${outGatepostNames}'
+                 <if test="carrierNames !=null and carrierNames !=''">
+                     and "carrierName" like '%${carrierNames}%'
                  </if>
-                 <if test="carrierNames !=null">
-                     and "carrierName" like '${carrierNames}'
+                 <if test="deliveryAddresss !=null and deliveryAddresss !=''">
+                     and "deliveryAddress" like '%${deliveryAddresss}%'
                  </if>
-                 <if test="deliveryAddresss !=null">
-                     and "deliveryAddress" like '${deliveryAddresss}'
+                 <if test="materialNames !=null and materialNames !=''">
+                     and "materialName" like '%${materialNames}%'
                  </if>
-                 <if test="materialNames !=null">
-                     and "materialName" like '${materialNames}'
+                 <if test="materialSpecifications !=null and materialSpecifications !=''">
+                     and "materialSpecification" like '%${materialSpecifications}%'
                  </if>
-                 <if test="materialSpecifications !=null">
-                     and "materialSpecification" like '${materialSpecifications}'
+                 <if test="materialModels !=null and materialModels !=''">
+                     and "materialModel" like '%${materialModels}%'
                  </if>
-                 <if test="materialModels !=null">
-                     and "materialModel" like '${materialModels}'
+                 <if test="receiveNames !=null and receiveNames!=''">
+                     and "receiveName" like '%${receiveNames}%'
                  </if>
-                 <if test="receiveNames !=null">
-                     and "receiveName" like '${receiveNames}'
+                 <if test="startTime != null">
+                     and "resultOutGateTime" &gt;= to_date('${startTime}','yyyy-mm-dd')
+                 </if>
+                 <if test="endTime != null">
+                     and "resultOutGateTime" &lt;= to_date('${endTime}','yyyy-mm-dd')
                  </if>
                  <if test="orderNumber !=null">
                      and  "orderNumber" in
@@ -251,27 +265,36 @@
         where o_order.ORDER_NUMBER = #{orderNumber}
     </select>
     <select id="getStartAndEndCapacityNumber" resultType="java.util.Map">
-         select distinct
-           r_shipper.SHIPPER_NAME "shipperName",
-           receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
-           r_capacity.CAPACITY_NUMBER "capacityNumber",
-           t_leave.RESULT_OUT_GATE_TIME "resultOutGateTime"
-        from OMSTRUCK_ORDER o_torder
-               left join TMSTRUCK_TOTAL_RESULT t_total
-                         on o_torder.ORDER_ID=t_total.ORDER_ID
-               left join RMS_CAPACITY r_capacity
-                         on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
-               left join AMS_SALE_ORDER_MATERIAL sale_material
-                         on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
-               left join RMS_RECEIVE_ADDRESS receive_address
-                         on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
-               left join AMS_SALE_ORDER a_s_order
-                         on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
-               left join RMS_SHIPPER r_shipper
-                         on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
-               left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
-                         on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
-        where o_torder.ORDER_NUMBER=#{orderNumber}
+                SELECT
+                    -- 出厂时间
+                    to_char(TLFR.RESULT_OUT_GATE_TIME,'yyyy-mm-dd hh24:mi:ss')  "resultOutGateTime",
+                    -- 车牌号
+                    RC.CAPACITY_NUMBER "capacityNumber",
+                    -- 收货地址
+                     CONCAT( CONCAT(RRA.ADDRESS_PROVINCE,RRA.ADDRESS_DISTRICT),RRA.Address_Town) "addressDeliveryAddress"
+                    
+                FROM
+                    -- 出厂实绩
+                    TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+                    --  总实绩
+                    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+                    -- 运输订单
+                    LEFT JOIN OMSTRUCK_ORDER OO ON TTR.ORDER_ID = OO.ORDER_ID
+                    -- 运力信息
+                    LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
+                     -- 销售订单中间表
+                    LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON    ASOM.SALE_ORDER_MATERIAL_ID =OO.ORDER_PLAN_ID
+                    --收货地址
+                    left join RMS_RECEIVE_PLACE RRP  on ASOM.SALE_SHIPPING_ADDRESS_ID=RRP.PLACE_ID
+                    
+                    left join RMS_RECEIVE_ADDRESS RRA on RRP.ADDRESS_ID=RRA.ADDRESS_ID
+                    
+                    
+                WHERE
+                    -- 判断出厂实绩的出厂时间不为空
+                    TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
+                    --   并且订单类型等于1(销售订单),2(焦炭发运计划),3(水渣发运计划)
+                    AND OO.ORDER_TYPE =1 AND OO.ORDER_NUMBER=#{orderNumber}
     </select>
     <select id="getReceiptData" resultType="java.util.Map">
         select result_id resultId,result_total_id resultTotalId,insert_username inserUserName,insert_time insertTime,status status from TMSTRUCK_RECEIPT_RESULT

+ 16 - 3
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -734,7 +734,7 @@
                     -- 销售订单号
                     ASO.SALE_NUMBER  "saleNum",
                     -- 收货地址
-                    RRA.ADDRESS_DELIVERY_ADDRESS "receiveAddress",
+                     CONCAT( CONCAT(RRA.ADDRESS_PROVINCE,RRA.ADDRESS_DISTRICT),RRA.Address_Town) "receiveAddress",
                     -- 收货单位
                     RS.SUPPLIER_NAME  "supplierName" ,
                     -- 发货单位
@@ -760,8 +760,10 @@
                     LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
                      -- 销售订单中间表
                     LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON    ASOM.SALE_ORDER_MATERIAL_ID =OO.ORDER_PLAN_ID
-                    -- 收货地址
-                    LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON    ASOM.SALE_SHIPPING_ADDRESS_ID =RRA.ADDRESS_ID
+                    --收货地址
+                    left join RMS_RECEIVE_PLACE RRP  on ASOM.SALE_SHIPPING_ADDRESS_ID=RRP.PLACE_ID
+                    
+                    left join RMS_RECEIVE_ADDRESS RRA on RRP.ADDRESS_ID=RRA.ADDRESS_ID
                     -- 收货单位
                     LEFT JOIN RMS_SHIPPER RS2 ON ASO.SHIPPER_ID = RS2.SHIPPER_ID
                     
@@ -1230,4 +1232,15 @@
         where oo.order_id =#{orderId}
     </select>
     <select id="getLeaveFactoryList" resultType="java.util.Map"></select>
+    <select id="getMessageMap" resultType="java.util.Map" parameterType="decimal">
+        SELECT
+            ASOM.SALE_ORDER_CONSIGNEE_TEL AS "saleOrderConsigneeTEL",
+            RC.CAPACITY_NUMBER AS "capacityNumber"
+        FROM
+            OMSTRUCK_ORDER OO
+                LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON OO.ORDER_PLAN_ID = ASOM.SALE_ORDER_MATERIAL_ID
+                LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
+        WHERE
+            OO.ORDER_ID = #{orderId}
+    </select>
 </mapper>