Kaynağa Gözat

厂外监控

Tiroble 3 yıl önce
ebeveyn
işleme
d6cb5f9d3e
18 değiştirilmiş dosya ile 1131 ekleme ve 63 silme
  1. 1 1
      pom.xml
  2. 17 0
      src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java
  3. 2 0
      src/main/java/com/steerinfo/dil/mapper/StatisticalReportMapper.java
  4. 0 4
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java
  5. 27 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.java
  6. 184 0
      src/main/java/com/steerinfo/dil/model/TmstruckReceiveResult.java
  7. 2 0
      src/main/java/com/steerinfo/dil/service/IStatisticalReportService.java
  8. 23 0
      src/main/java/com/steerinfo/dil/service/ITmstruckReceiveResultService.java
  9. 5 0
      src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java
  10. 2 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java
  11. 27 23
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java
  12. 51 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiveResultServiceImpl.java
  13. 4 1
      src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java
  14. 163 0
      src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml
  15. 10 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml
  16. 26 24
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml
  17. 578 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiveResultMapper.xml
  18. 9 8
      src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

+ 1 - 1
pom.xml

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

+ 17 - 0
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -336,7 +336,24 @@ public class StatisticalReportController extends BaseRESTfulController {
         //分页数据
         List<Map<String, Object>> report = statisticalReportService.getUnLoading(mapValue);
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+
         return success(pageList);
     }
 
+    //保卫部随机抽查车牌号查看所有信息
+    @ApiOperation("保卫部随机抽查车牌号查看所有信息")
+    @PostMapping("/getCapacityByDefend")
+    public RESTfulResult getCapacityByDefend(@RequestBody(required = false) Map<String,Object> map,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             String con){
+        map.put("con",con);
+        PageHelper.startPage(pageNum, pageSize);
+        List<Map<String, Object>> report = statisticalReportService.getCapacityByDefend(map);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, report);
+        return success(pageList);
+
+    }
+
 }

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

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

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

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

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

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

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

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

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IStatisticalReportService.java

@@ -45,5 +45,7 @@ public interface IStatisticalReportService {
     List<Map<String, Object>> getUnLoading(Map<String, Object> mapValue);
 
     List<Map<String, Object>> getLoaderResult(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map);
 }
 

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

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

+ 5 - 0
src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java

@@ -174,4 +174,9 @@ public class StatisticalReportImpl implements IStatisticalReportService {
         return statisticalReportMapper.getLoaderResult(mapValue);
     }
 
+    @Override
+    public List<Map<String, Object>> getCapacityByDefend(Map<String, Object> map) {
+        return statisticalReportMapper.getCapacityByDefend(map);
+    }
+
 }

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

@@ -13,6 +13,7 @@ import com.steerinfo.dil.service.IUtilsService;
 import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.route.service.impl.RouteServiceImpl;
 import com.steerinfo.framework.controller.RESTfulResult;
+import org.apache.commons.lang3.builder.ToStringExclude;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -243,7 +244,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
                 //判断出厂路段顺序号是否为最后一个 采购订单关闭订单
                 i += utilsService.closeOrderNormally(map);
                 //查询是否为一车多趟采购订单类型
-                Integer isMoreTripsStatus = tmstruckLeaveFactoryResultMapper.getIsMoreTripsStatus(DataChange.dataToBigDecimal(selectMap.get("orderId")));
+                Integer isMoreTripsStatus = tmstruckLeaveFactoryResultMapper.getIsMoreTripsStatus(DataChange.dataToBigDecimal(map.get("orderId")));
                 if(isMoreTripsStatus != null && isMoreTripsStatus == 1){
                     //如果是一车多趟 则重新下一个运输订单
                     omsFeign.addNewTransportOrder(orderId.intValue());

+ 27 - 23
src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java

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

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

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

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

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

+ 163 - 0
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1490,4 +1490,167 @@
         </if>
         </where>
     </select>
+
+
+    <select id="getCapacityByDefend" resultType="java.util.Map" parameterType="java.util.Map">
+        select * from(
+        select rc.CAPACITY_NUMBER "capacityNumber",
+               oo.ORDER_NUMBER "orderNumber",
+               twr.RESULT_GROSS_WEIGHT "resultGrossWeight",
+               twr.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+               rtc1.TRUCK_CALCULATE_NUMBER "truckCalculateNumber1",
+               twr.RESULT_TARE_WEIGHT "resultTareWeight",
+               twr.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+               rtc2.TRUCK_CALCULATE_NUMBER "truckCalculateNumber2",
+               twr.RESULT_NET_WEIGHT "resultNetWeight",
+               ter.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+               rg1.GATEPOST_NAME "gatepostName1",
+               tlfr.RESULT_OUT_GATE_TIME "resultOutGateTime",
+               rg2.GATEPOST_NAME "gatepostName2",
+               tlr.RESULT_LOAD_END_TIME "resultLoadEndTime",
+               rw1.WAREHOUSE_NAME "warehouseName1",
+               tur.RESULT_END_TIME "resultEndTime",
+               rw2.WAREHOUSE_NAME "warehouseName2"
+        from OMSTRUCK_ORDER oo
+        left join OMSTRUCK_ORDER_MATERIAL oom
+        on oom.ORDER_ID = oo.ORDER_ID
+        left join RMS_MATERIAL rm
+        on rm.MATERIAL_ID = oom.MATERIAL_ID
+        left join RMS_CAPACITY rc
+        on rc.CAPACITY_ID = oo.CAPACITY_ID
+        left join TMSTRUCK_TOTAL_RESULT ttr
+        on ttr.ORDER_ID = oo.ORDER_ID
+        left join TMSTRUCK_WEIGHT_RESULT twr
+        on twr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_TRUCK_CALCULATE rtc1
+        on twr.RESULT_GROSS_PLACE_ID = rtc1.TRUCK_CALCULATE_ID
+        left join RMS_TRUCK_CALCULATE rtc2
+        on twr.RESULT_GROSS_PLACE_ID = rtc2.TRUCK_CALCULATE_ID
+        left join TMSTRUCK_ENFACTORY_RESULT ter
+        on ter.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_GATEPOST rg1
+        on rg1.GATEPOST_ID = ter.GATEPOST_ID
+        left join TMSTRUCK_LEAVE_FACTORY_RESULT tlfr
+        on tlfr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join  RMS_GATEPOST rg2
+        on rg2.GATEPOST_ID = tlfr.GATEPOST_ID
+        left join TMSTRUCK_LOAD_RESULT tlr
+        on tlr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_WAREHOUSE rw1
+        on tlr.LOADING_ID = rw1.WAREHOUSE_ID
+        left join TMSTRUCK_UNLOAD_RESULT tur
+        on tur.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID
+        left join RMS_WAREHOUSE rw2
+        on tur.RESULT_UNLOAD_PLACE_ID = rw2.WAREHOUSE_ID
+		where trunc(ter.RESULT_ENTRY_GATE_TIME) =  trunc(sysdate)
+		<if test="con!=null">
+           and instr(rc.CAPACITY_NUMBER , #{con})>0
+        </if>
+		order by ter.RESULT_ENTRY_GATE_TIME desc
+		)
+		<where>
+            <if test=" capacityNumber!= null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeight != null">
+                and
+                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeight" 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="truckCalculateNumber1 != null">
+                and
+                <foreach collection="truckCalculateNumber1" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber1" 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=" resultTareWeightTime != null">
+                and
+                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultTareWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber2 != null">
+                and
+                <foreach collection="truckCalculateNumber2" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber2" 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=" resultEntryGateTime!= null">
+                and
+                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
+                    "resultEntryGateTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" gatepostName1!= null">
+                and
+                <foreach collection="gatepostName1" item="item" open="(" separator="or" close=")">
+                    "gatepostName1" 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=" gatepostName2 != null">
+                and
+                <foreach collection="gatepostName2" item="item" open="(" separator="or" close=")">
+                    "gatepostName2" 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=" warehouseName1 != null">
+                and
+                <foreach collection="warehouseName1" item="item" open="(" separator="or" close=")">
+                    "warehouseName1" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" resultEndTime != null">
+                and
+                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
+                    "resultEndTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test=" warehouseName2 != null">
+                and
+                <foreach collection="warehouseName2" item="item" open="(" separator="or" close=")">
+                    "warehouseName2" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+    </select>
 </mapper>

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

@@ -1479,7 +1479,8 @@
     TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
     TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_DURATION   "resultLoadDuration",
-    RW.WAREHOUSE_NAME          "warehouseName"
+    RW.WAREHOUSE_NAME          "warehouseName",
+    TWR.RESULT_NET_WEIGHT     "resultNetWeight"
     FROM TMSTRUCK_LOAD_RESULT TLR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
     ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
@@ -1493,6 +1494,8 @@
     ON RC.CAPACITY_ID = OO.CAPACITY_ID
     LEFT JOIN RMS_WAREHOUSE RW
     ON RW.WAREHOUSE_ID = TLR.LOADING_ID
+    LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+    ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
     WHERE OO.ORDER_TYPE = #{orderTypee}
     AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
     )
@@ -1544,6 +1547,12 @@
           "warehouseName" like '%${item}%'
         </foreach>
       </if>
+      <if test="resultNetWeight != null">
+        and
+        <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+          "resultNetWeight" like '%${item}%'
+        </foreach>
+      </if>
     </where>
     <include refid="orderBy"></include>
     <if test="orderField == null  ">

+ 26 - 24
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -603,28 +603,29 @@
     <include refid="orderBy"></include>
   </select>
   
-  <!--  查询内转钢材到异地库收货实绩-->
-  <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
-    
-    SELECT *
-    FROM (
-    SELECT TRR.RESULT_ID       "resultId",
-    OO.ORDER_NUMBER     "orderNumber",
-    RC.CAPACITY_NUMBER  "capacityNumber",
-    RW.WAREHOUSE_NAME   "warehouseName",
-    TRR.INSERT_TIME     "insertTime",
-    TRR.INSERT_USERNAME "insertUsername"
-    FROM TMSTRUCK_RECEIPT_RESULT TRR
-    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
-    ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-    LEFT JOIN OMSTRUCK_ORDER OO
-    ON OO.ORDER_ID = TTR.ORDER_ID
-    LEFT JOIN RMS_WAREHOUSE RW
-    ON RW.WAREHOUSE_ID = TRR.WAREHOUSE_ID
-    LEFT JOIN RMS_CAPACITY RC
-    ON RC.CAPACITY_ID = OO.CAPACITY_ID
-    WHERE OO.ORDER_TYPE = 4 AND TRR.STATUS = 1
-    )
+
+<!--  查询内转钢材到异地库收货实绩-->
+    <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
+
+      SELECT *
+      FROM (
+             SELECT TRR.RESULT_ID       "resultId",
+                    OO.ORDER_NUMBER     "orderNumber",
+                    RC.CAPACITY_NUMBER  "capacityNumber",
+                    RW.WAREHOUSE_NAME   "warehouseName",
+                    TRR.INSERT_TIME     "insertTime",
+                    TRR.INSERT_USERNAME "insertUsername"
+             FROM TMSTRUCK_RECEIPT_RESULT TRR
+                    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                              ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                    LEFT JOIN OMSTRUCK_ORDER OO
+                              ON OO.ORDER_ID = TTR.ORDER_ID
+                    LEFT JOIN RMS_WAREHOUSE RW
+                              ON RW.WAREHOUSE_ID = TRR.WAREHOUSE_ID
+                    LEFT JOIN RMS_CAPACITY RC
+                              ON RC.CAPACITY_ID = OO.CAPACITY_ID
+            WHERE OO.ORDER_TYPE = 4 AND TRR.STATUS = 1
+           )
     <where>
       <if test="orderNumber != null">
         <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
@@ -771,8 +772,9 @@
     <include refid="orderBy"></include>
   </select>
   
-  <!-- 查询是否已收过货 -->
-  <select id="getReceiptResult" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
+
+<!-- 查询是否已收过货 -->
+    <select id="getReceiptResult" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
         select TRR.RESULT_ID
         from TMSTRUCK_RECEIPT_RESULT TRR
         where TRR.RESULT_TOTAL_ID = #{resultTotalId}

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

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

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

@@ -873,10 +873,9 @@
         RC.CAPACITY_NUMBER        "capacityNumber",
         RM.MATERIAL_NAME          "materialName",
         OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
-        TUR.RESULT_START_TIME     "resultStartTime",
         TUR.RESULT_END_TIME       "resultEndTime",
-        TUR.RESULT_DURATION       "resultDuration",
-        RW.WAREHOUSE_NAME         "warehouseName"
+        RW.WAREHOUSE_NAME         "warehouseName",
+        TWR.RESULT_NET_WEIGHT     "resultNetWeight"
         FROM TMSTRUCK_UNLOAD_RESULT TUR
         LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
         ON TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
@@ -890,8 +889,10 @@
         ON RM.MATERIAL_ID = OOM.MATERIAL_ID
         LEFT JOIN RMS_WAREHOUSE RW
         ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
-        WHERE TUR.RESULT_START_TIME IS NOT NULL
-        AND OO.ORDER_TYPE = #{orderTypee}
+        LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+        ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+        WHERE OO.ORDER_TYPE = #{orderTypee}
+        ORDER BY TUR.RESULT_END_TIME desc
         )
         <where>
             <if test="orderNumber != null">
@@ -935,10 +936,10 @@
                     "resultEndTime" like '%${item}%'
                 </foreach>
             </if>
-            <if test="resultDuration != null">
+            <if test="resultNetWeight != null">
                 and
-                <foreach collection="resultDuration" item="item" open="(" separator="or" close=")">
-                    "resultDuration" like '%${item}%'
+                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+                    "resultNetWeight" like '%${item}%'
                 </foreach>
             </if>
         </where>