zhouzh 3 anni fa
parent
commit
fa30330ae2

+ 33 - 21
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -5,9 +5,11 @@ import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.service.ITmstruckReceiptResultService;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.route.config.ImageFileUtils;
 import com.steerinfo.route.mapper.TmstruckArrivalResultMapper;
 import com.steerinfo.route.model.TmstruckReceiptResultChild;
 import com.steerinfo.route.service.impl.TmstruckReceiptResultChildServiceImpl;
@@ -15,10 +17,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
@@ -57,6 +56,13 @@ public class TmstruckReceiptResultController extends BaseRESTfulController {
     @Autowired
     ColumnDataUtil columnDataUtil;
 
+    @Autowired
+    ImageFileUtils imageFileUtils;
+
+    private final SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
     @ApiOperation(value="查询收货实绩")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
@@ -151,30 +157,36 @@ public class TmstruckReceiptResultController extends BaseRESTfulController {
 
     @ApiOperation(value="展示收货实绩信息")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "apiId(137)", value = "表头", required = false, dataType = "Interger")
+            @ApiImplicitParam(name = "apiId(470)", value = "表头", required = false, dataType = "Interger")
     })
     @PostMapping("/getReceiptResult")
     public RESTfulResult getReceiptResult(@RequestBody(required=false) Map<String, Object> mapValue,
                                           Integer apiId,
                                           Integer pageNum,
-                                          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);
+                                          Integer pageSize,
+                                          String startTime,
+                                          String endTime,
+                                          String con){
+        if(con!=null) {
+            mapValue.put("con", con);
         }
-        List<Map<String, Object>> receiptResultInfo = tmstruckReceiptResultService.getReceiptResultInfo(mapValue);
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);
         PageHelper.startPage(pageNum,pageSize);
-        List<Map<String, Object>> receiptResultInfo1 = tmstruckReceiptResultService.getReceiptResultInfo(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,receiptResultInfo,receiptResultInfo1);
+        List<Map<String, Object>> receiptResultInfo = tmstruckReceiptResultService.getReceiptResultInfo(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,null,receiptResultInfo);
         return success(pageList);
     }
+
+    @ApiOperation(value = "获取抵达作业照片")
+    @PostMapping("/getReceiptPhoto")
+    public RESTfulResult getReceiptPhoto(@RequestParam String orderNumber){
+        String receiptPhoto = tmstruckReceiptResultService.getReceiptPhoto(orderNumber);
+        String photo =null;
+        try {
+            photo = imageFileUtils.downloadFile(receiptPhoto).toString();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return success(photo);
+    }
 }

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

@@ -32,4 +32,6 @@ public interface TmstruckReceiptResultMapper extends IBaseMapper<TmstruckReceipt
 
     //获取收货实绩信息
     List<Map<String, Object>> getReceiptResultInfo(Map<String, Object> map);
+
+    String getReceiptPhoto(String orderNumber);
 }

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

@@ -33,5 +33,6 @@ public interface ITmstruckReceiptResultService{
     BigDecimal addTmstruckReceiptResult(String orderNumber, TmstruckReceiptResult tmstruckReceiptResult);
     //获取收货实绩信息
     List<Map<String, Object>> getReceiptResultInfo(Map<String, Object> map);
-
+    //获取抵达作业照片
+    String getReceiptPhoto(String orderNumber);
 }

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

@@ -70,6 +70,12 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
     public List<Map<String, Object>> getReceiptResultInfo(Map<String, Object> map) {
         return tmstruckReceiptResultMapper.getReceiptResultInfo(map);
     }
+
+    @Override
+    public String getReceiptPhoto(String orderNumber) {
+        return tmstruckReceiptResultMapper.getReceiptPhoto(orderNumber);
+    }
+
     /**
      * 查询所有收货实绩
      * @param map

+ 177 - 124
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -784,166 +784,219 @@
   <!--  </select>-->
   
   <select id="getReceiptResultInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
-    select * from(
-    select distinct a_s_order.SALE_NUMBER "saleNumber",
-    o_torder.ORDER_NUMBER "orderNumber",
-    r_material.MATERIAL_NAME "materialName",
-    r_material.MATERIAL_MODEL "materialModel",
-    r_capacity.CAPACITY_NUMBER "capacityNumber",
-    r_shipper.SHIPPER_NAME "shipperName",
-    r_consignee.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
-    t_receipt.RESULT_ARRIVAL_ADDRESS "resultReceiptAddress",
-    receive_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
-    t_receipt.RESULT_EMPTY_CONTAINER_PHOTO "resultEmptyContainerPhoto",
-    t_arrival.RESULT_FULL_CONTAINER_PHOTO "resultFullContainerPhoto",
-    t_receipt.RESULT_SIGNED_NOTE_PHOTO "resultSignedNotePhoto",
-    t_receipt.RESULT_RECEIVE_NOTE_PHOTO "resultReceiveNotePhoto",
-    t_receiptchild.OTHER_PHOTO1 "otherPhoto1",
-    t_receiptchild.OTHER_PHOTO2 "otherPhoto2",
-    t_receiptchild.OTHER_PHOTO3 "otherPhoto3",
-    t_receipt.INSERT_TIME "receiptTime",
-    r_carrier.CARRIER_NAME "carrierName",
-    r_gatepost.GATEPOST_NAME "gatepostName"
-    from TMSTRUCK_RECEIPT_RESULT t_receipt
-    left join TMSTRUCK_TOTAL_RESULT t_total
-    on t_receipt.RESULT_TOTAL_ID=t_total.RESULT_TOTAL_ID
-    left join OMSTRUCK_ORDER o_torder
-    on t_total.ORDER_ID=o_torder.ORDER_ID
-    left join RMS_CAPACITY r_capacity
-    on o_torder.CAPACITY_ID=r_capacity.CAPACITY_ID
-    left join RMS_DRIVER_CAPACITY r_d_capacity
-    on r_capacity.CAPACITY_ID=r_d_capacity.CAPACITY_ID
-    left join RMS_CARRIER r_carrier
-    on o_torder.CARRIER_ID=r_carrier.CARRIER_ID
-    left join RMS_CAR_DRIVER r_driver
-    on r_d_capacity.DRIVER_ID=r_driver.DRIVER_ID
-    left join AMS_SALE_ORDER_MATERIAL sale_material
-    on o_torder.ORDER_PLAN_ID=sale_material.SALE_ORDER_MATERIAL_ID
-    left join RMS_RECEIVE_ADDRESS receive_address
-    on sale_material.SALE_SHIPPING_ADDRESS_ID=receive_address.ADDRESS_ID
-    left join RMS_MATERIAL r_material
-    on sale_material.MATERIAL_ID=r_material.MATERIAL_ID
-    left join AMS_SALE_ORDER a_s_order
-    on sale_material.SALE_ORDER_ID=a_s_order.SALE_ORDER_ID
-    left join RMS_SHIPPER r_shipper
-    on a_s_order.SHIPPER_ID=r_shipper.SHIPPER_ID
-    left join RMS_CONSIGNEE r_consignee
-    on a_s_order.CONSIGNEE_ID=r_consignee.CONSIGNEE_ID
-    left join TMSTRUCK_RECEIPT_RESULT_CHILD t_receiptchild
-    on t_receipt.RESULT_ID=t_receiptchild.RECEIPT_RESULT_ID
-    left join TMSTRUCK_LEAVE_FACTORY_RESULT t_leave
-    on t_total.RESULT_TOTAL_ID=t_leave.RESULT_TOTAL_ID
-    LEFT JOIN RMS_GATEPOST r_gatepost
-    ON t_leave.GATEPOST_ID = r_gatepost.GATEPOST_ID
-    left join TMSTRUCK_ARRIVAL_RESULT t_arrival
-    on t_total.RESULT_TOTAL_ID=t_arrival.RESULT_TOTAL_ID
-    order by t_receipt.INSERT_TIME desc)
+    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",--客户名称
+    TAR.RESULT_ARRIVAL_ADDRESS "resultArrivalAddress",--抵达收货点的地址
+    TAR.INSERT_TIME "insertTime",--抵达作业时间
+    TAR.RESULT_FULL_CONTAINER_PHOTO "resultFullContainerPhoto" --车箱照片
+    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 TMSTRUCK_ARRIVAL_RESULT TAR
+    on TAR.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 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 TAR.INSERT_TIME IS NOT NULL
+    <if test="oneDate != null">
+      and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = TAR.INSERT_TIME
+    </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TAR.INSERT_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TAR.INSERT_TIME
+    </if>
+    <if test="con!=null">
+      and (instr(RC.CAPACITY_NUMBER,#{con})>0 or instr(RM.MATERIAL_NAME,#{con})>0
+      or instr(RCON.CONSIGNEE_COMPANY_NAME,#{con})>0)
+    </if>
+    )
     <where>
-      <if test="productClassification != null and productClassification != '其他' and productClassification != '螺纹钢'">
-        and  "materialName" like '%${productClassification}%'
+      <if test="orderNumbers !=null">
+        and "orderNumber" like '${orderNumbers}'
       </if>
-      <if test="productClassification != null and '螺纹钢' == productClassification">
-        and ("materialName" like '%螺纹钢%' or "materialName" like '%盘螺%'
-        or  "materialName" like '%盘圆%' or "materialName" like '%非定尺材%')
+      <if test="capacityNumbers !=null">
+        and "capacityNumber" like '${capacityNumbers}'
       </if>
-      <if test="productClassification != null and '其他' == productClassification">
-        and  "materialName" not like '%带钢%' and "materialName" not like '%微粉%'
-        and  "materialName" not like '%螺纹钢%'  and  "materialName" not like '%非定尺材%' and "materialName" not like '%钢坯%'
-        and  "materialName" not like '%盘螺%' and "materialName" not like '%盘圆%'
+      <if test="resultGrossWeightTimes !=null">
+        and "resultGrossWeightTime" like '${resultGrossWeightTimes}'
       </if>
-      <if test="carrierName1 != null">
-        and "carrierName" like  '%${carrierName1}%'
+      <if test="resultGrossWeightTimes !=null">
+        and "resultGrossWeightTime" like '${resultGrossWeightTimes}'
       </if>
-      <if test="gatepostName1 !=null">
-        and "gatepostName" like '%${gatepostName1}%'
+      <if test="resultOutGateTimes !=null">
+        and "resultOutGateTime" like '${resultOutGateTimes}'
       </if>
-      <if test="capacityNumber1 != null">
-        and  "capacityNumber" like '%${capacityNumber1}%'
+      <if test="resultNetWeights !=null">
+        and "resultNetWeight" like '${resultNetWeights}'
       </if>
-      <if test="consigneeCompanyName1 != null">
-        and  "consigneeCompanyName" like '%${consigneeCompanyName1}%'
+      <if test="resultOutGateTimes !=null">
+        and "resultOutGateTime" like '${resultOutGateTimes}'
       </if>
-      <if test="startTime != null">
-        and "receiptTime" &gt;= to_date('${startTime}','yyyy-mm-dd')
+      <if test="outGatepostNames !=null">
+        and "outGatepostName" like '${outGatepostNames}'
       </if>
-      <if test="endTime != null">
-        and "receiptTime" &lt;= to_date('${endTime}','yyyy-mm-dd')
+      <if test="carrierNames !=null">
+        and "carrierName" like '${carrierNames}'
       </if>
-      
-      <if test="saleNumber != null">
-        and
-        <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
-          "saleNumber" like '%${item}%'
+      <if test="deliveryAddresss !=null">
+        and "deliveryAddress" like '${deliveryAddresss}'
+      </if>
+      <if test="materialNames !=null">
+        and "materialName" like '${materialNames}'
+      </if>
+      <if test="materialSpecifications !=null">
+        and "materialSpecification" like '${materialSpecifications}'
+      </if>
+      <if test="materialModels !=null">
+        and "materialModel" like '${materialModels}'
+      </if>
+      <if test="receiveNames !=null">
+        and "receiveName" like '${receiveNames}'
+      </if>
+      <if test="orderNumber !=null">
+        and  "orderNumber" in
+        <foreach collection="orderNumber" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="orderNumber != null">
-        and
-        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
-          "orderNumber" like '%${item}%'
+      <if test="capacityNumber !=null">
+        and  "capacityNumber" in
+        <foreach collection="capacityNumber" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="materialName != null">
-        and
-        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-          "materialName" like '%${item}%'
+      <if test="resultGrossWeightTime !=null">
+        and  "resultGrossWeightTime" in
+        <foreach collection="resultGrossWeightTime" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="materialModel != null">
-        and
-        <foreach collection="materialModel" item="item" open="(" separator="or" close=")">
-          "materialModel" like '%${item}%'
+      <if test="resultNetWeight !=null">
+        and  "resultNetWeight" in
+        <foreach collection="resultNetWeight" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="capacityNumber != null">
-        and
-        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
-          "capacityNumber" like '%${item}%'
+      <if test="resultOutGateTime !=null">
+        and  "resultOutGateTime" in
+        <foreach collection="resultOutGateTime" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="shipperName != null">
-        and
-        <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
-          "shipperName" like '%${item}%'
+      <if test="outGatepostName !=null">
+        and  "outGatepostName" in
+        <foreach collection="outGatepostName" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="consigneeCompanyName != null">
-        and
-        <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
-          "consigneeCompanyName" like '%${item}%'
+      <if test="carrierName !=null">
+        and  "carrierName" in
+        <foreach collection="carrierName" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="resultReceiptAddress != null">
-        and
-        <foreach collection="resultReceiptAddress" item="item" open="(" separator="or" close=")">
-          "resultReceiptAddress" like '%${item}%'
+      <if test="deliveryAddress !=null">
+        and  "deliveryAddress" in
+        <foreach collection="deliveryAddress" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="addressDeliveryAddress != null">
-        and
-        <foreach collection="addressDeliveryAddress" item="item" open="(" separator="or" close=")">
-          "addressDeliveryAddress" like '%${item}%'
+      <if test="materialSpecification !=null">
+        and  "materialSpecification" in
+        <foreach collection="materialSpecification" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="receiptTime != null">
-        and
-        <foreach collection="receiptTime" item="item" open="(" separator="or" close=")">
-          "receiptTime" like '%${item}%'
+      <if test="materialModel !=null">
+        and  "materialModel" in
+        <foreach collection="materialModel" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="carrierName != null">
-        and
-        <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
-          "carrierName" like '%${item}%'
+      <if test="receiveName !=null">
+        and  "receiveName" in
+        <foreach collection="receiveName" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
-      <if test="gatepostName != null">
-        and
-        <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
-          "gatepostName" like '%${item}%'
+      <if test="resultArrivalAddress !=null">
+        and  "resultArrivalAddress" in
+        <foreach collection="resultArrivalAddress" separator="," open="(" close=")" item="item" >
+          #{item}
+        </foreach>
+      </if>
+      <if test="insertTime !=null">
+        and  "insertTime" in
+        <foreach collection="insertTime" separator="," open="(" close=")" item="item" >
+          #{item}
+        </foreach>
+      </if>
+      <if test="resultFullContainerPhoto !=null">
+        and  "resultFullContainerPhoto" in
+        <foreach collection="resultFullContainerPhoto" separator="," open="(" close=")" item="item" >
+          #{item}
         </foreach>
       </if>
     </where>
     <include refid="orderBy"></include>
   </select>
 
+
+  <select id="getReceiptPhoto" parameterType="java.lang.String" resultType="java.lang.String">
+    select  tar.RESULT_FULL_CONTAINER_PHOTO
+    from TMSTRUCK_ARRIVAL_RESULT tar
+    left join TMSTRUCK_TOTAL_RESULT ttr
+    on ttr.RESULT_TOTAL_ID = tar.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER oo
+    on oo.ORDER_ID = ttr.ORDER_ID
+    where oo.ORDER_NUMBER = #{orderNumber}
+  </select>
 </mapper>