luobang 2 роки тому
батько
коміт
cea1f5fd5b

+ 2 - 1
pom.xml

@@ -131,7 +131,8 @@
 <!--                        <param>WMSP_INBOUND_CORRECT_RESULT</param>-->
 <!--                        <param>WMSP_INBOUND_DRIVING_RESULT</param>-->
 <!--                        <param>WMSP_INBOUND_SCAN_RESULT</param>-->
-                            <param>RMS_PWAREHOUSE_GRID</param>
+<!--                            <param>RMS_PWAREHOUSE_GRID</param>-->
+                        <param>WMSP_INBOUND_EAS</param>-->
                     </tables>
                 </configuration>
                 <executions>

+ 19 - 2
src/main/java/com/steerinfo/dil/controller/WmspGridMaterialController.java

@@ -13,6 +13,7 @@ import com.steerinfo.framework.service.pagehelper.PageHelper;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -225,8 +226,9 @@ public class WmspGridMaterialController extends BaseRESTfulController {
             @ApiImplicitParam(name = "quantity",dataType = "Integer",value = "物资数量"),
     })
     @PostMapping("/insertReserved")
-    public  RESTfulResult insertReserved(String warehouseId, String materialCode,String materialSpecification, String materialModel, Integer quantity){
-        int result = wmspGridMaterialService.insertReserved(warehouseId,materialCode,materialSpecification,materialModel,quantity);
+    public  RESTfulResult insertReserved(String warehouseId, String materialCode,String materialSpecification, String materialModel, Integer quantity,String actuallyWeight,
+                                         String materialTheWeight,String remark){
+        int result = wmspGridMaterialService.insertReserved(warehouseId,materialCode,materialSpecification,materialModel,quantity,actuallyWeight,materialTheWeight,remark);
 //        判断当前的result是否大于0
         if (result<1){
             return failed(-1);
@@ -251,6 +253,18 @@ public class WmspGridMaterialController extends BaseRESTfulController {
         }
         return success(result);
     }
+
+    @PostMapping("getTheoreticalByInfo")
+    public RESTfulResult getTheoreticalByInfo(@RequestParam String warehouseId,
+                                              @RequestParam String  materialCode,
+                                              @RequestParam String materialSpecification,
+                                              @RequestParam String materialModel,
+                                              @RequestParam Integer status,
+                                              @RequestParam Integer num){
+        BigDecimal theoreticalByInfo = wmspGridMaterialService.getTheoreticalByInfo(warehouseId,materialCode,materialSpecification,materialModel,status,num);
+        return success(theoreticalByInfo);
+    }
+
 //    查询盘库实绩
     @ApiOperation(value = "查询盘库实绩",notes = "查询盘库实绩")
     @ApiImplicitParams({
@@ -351,6 +365,9 @@ public class WmspGridMaterialController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId,columnList,mapList);
         return success(pageList);
     }
+
+
+
 }
 
 

+ 57 - 0
src/main/java/com/steerinfo/dil/controller/WmspInboundEasController.java

@@ -0,0 +1,57 @@
+package com.steerinfo.dil.controller;
+
+
+import com.steerinfo.dil.service.impl.WmspInboundEasServiceImpl;
+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 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 java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("${api.version}/inboundEas")
+public class WmspInboundEasController extends BaseRESTfulController {
+
+    @Autowired
+    WmspInboundEasServiceImpl wmspInboundEasService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    @ApiOperation("查询上传金蝶数据")
+    @PostMapping("/getInboundEasInfo")
+    public RESTfulResult getInboundEasInfo(@RequestBody(required = false) Map<String, Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize,
+                                           Integer warehouseId,
+                                           String startTime,
+                                           String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        mapValue.put("warehouseId",warehouseId);
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> inboundEasInfo = wmspInboundEasService.getInboundEasInfo(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null,inboundEasInfo);
+        return success(pageList);
+    }
+
+    @ApiOperation("根据上传金蝶id查询入库数据将它还原")
+    @PostMapping("reduceInboundEas")
+    public RESTfulResult reduceInboundEas(Integer inboundEasId){
+        return success(wmspInboundEasService.reduceInboundEas(inboundEasId));
+
+    }
+}

+ 22 - 0
src/main/java/com/steerinfo/dil/feign/JoinFeign.java

@@ -0,0 +1,22 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author hujianguo
+ * @create 2021-10-29 11:23
+ */
+@FeignClient(value = "dil-join-api-dev", url = "${openfeign.JoinFeign.url}")
+public interface JoinFeign {
+
+    @PostMapping("/api/v1/join/wsface/pushWmsMessagesToEas")
+    String toInboundResultEas(Map<String, Object> totalMap);
+
+}

+ 25 - 0
src/main/java/com/steerinfo/dil/mapper/WmspInboundEasMapper.java

@@ -0,0 +1,25 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.WmspInboundEas;
+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 WmspInboundEasMapper extends IBaseMapper<WmspInboundEas, BigDecimal> {
+
+
+    @Select("select seq__WMSP_INBOUND_EAS.nextval from dual")
+    BigDecimal inboundEasId();
+
+
+
+    List<Map<String, Object>> getInboundEasInfo(Map<String, Object> mapValue);
+
+    List<BigDecimal> getInboundResult(Integer inboundEasId);
+
+}

+ 228 - 0
src/main/java/com/steerinfo/dil/model/WmspInboundEas.java

@@ -0,0 +1,228 @@
+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 WmspInboundEas implements IBasePO<BigDecimal> {
+    /**
+     * 入库上传金蝶ID(INBOUND_EAS_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="入库上传金蝶ID",required=true)
+    private BigDecimal inboundEasId;
+
+    /**
+     * 入库上传金蝶编号(INBOUND_EAS_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="入库上传金蝶编号",required=false)
+    private String inboundEasNo;
+
+    /**
+     * 上传金蝶物资理论重量(MATERIAL_THEROTICAL_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="上传金蝶物资理论重量",required=false)
+    private BigDecimal materialTheroticalWeight;
+
+    /**
+     * 入库上传金蝶实绩重量(MATERIAL_ACTUALLY_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="入库上传金蝶实绩重量",required=false)
+    private BigDecimal materialActuallyWeight;
+
+    /**
+     * 上传金蝶物资件数(MATERIAL_NUM,DECIMAL,38)
+     */
+    @ApiModelProperty(value="上传金蝶物资件数",required=false)
+    private BigDecimal materialNum;
+
+    /**
+     * 记录创建人(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,500)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,1000)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 仓库ID(WAREHOUSE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="仓库ID",required=false)
+    private BigDecimal warehouseId;
+
+    /**
+     * 0:未撤销,1:已撤销(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="0:未撤销,1:已撤销",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 报文(SOUT_REPORT_VALUE,BLOB,4000)
+     */
+    @ApiModelProperty(value="报文",required=false)
+    private byte[] soutReportValue;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.inboundEasId;
+    }
+
+    @Override
+    public void setId(BigDecimal inboundEasId) {
+        this.inboundEasId = inboundEasId;
+    }
+
+    public BigDecimal getInboundEasId() {
+        return inboundEasId;
+    }
+
+    public void setInboundEasId(BigDecimal inboundEasId) {
+        this.inboundEasId = inboundEasId;
+    }
+
+    public String getInboundEasNo() {
+        return inboundEasNo;
+    }
+
+    public void setInboundEasNo(String inboundEasNo) {
+        this.inboundEasNo = inboundEasNo == null ? null : inboundEasNo.trim();
+    }
+
+    public BigDecimal getMaterialTheroticalWeight() {
+        return materialTheroticalWeight;
+    }
+
+    public void setMaterialTheroticalWeight(BigDecimal materialTheroticalWeight) {
+        this.materialTheroticalWeight = materialTheroticalWeight;
+    }
+
+    public BigDecimal getMaterialActuallyWeight() {
+        return materialActuallyWeight;
+    }
+
+    public void setMaterialActuallyWeight(BigDecimal materialActuallyWeight) {
+        this.materialActuallyWeight = materialActuallyWeight;
+    }
+
+    public BigDecimal getMaterialNum() {
+        return materialNum;
+    }
+
+    public void setMaterialNum(BigDecimal materialNum) {
+        this.materialNum = materialNum;
+    }
+
+    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 getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(BigDecimal warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public byte[] getSoutReportValue() {
+        return soutReportValue;
+    }
+
+    public void setSoutReportValue(byte[] soutReportValue) {
+        this.soutReportValue = soutReportValue;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", inboundEasId=").append(inboundEasId);
+        sb.append(", inboundEasNo=").append(inboundEasNo);
+        sb.append(", materialTheroticalWeight=").append(materialTheroticalWeight);
+        sb.append(", materialActuallyWeight=").append(materialActuallyWeight);
+        sb.append(", materialNum=").append(materialNum);
+        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(", warehouseId=").append(warehouseId);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", soutReportValue=").append(soutReportValue);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 103 - 60
src/main/java/com/steerinfo/dil/model/WmspInboundResult.java

@@ -15,13 +15,6 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="主键ID",required=true)
     private BigDecimal inboundId;
 
-
-    /**
-     * 主键(INBOUND_DISTRIBUTE_ID,DECIMAL,0)
-     */
-    @ApiModelProperty(value="主键",required=true)
-    private BigDecimal inboundDistributeId;
-
     /**
      * 入库类型:0:生产入库;1:退货入库;2:倒库入库(INBOUND_TYPE,DECIMAL,0)
      */
@@ -41,7 +34,7 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     private BigDecimal gridId;
 
     /**
-     * 入库单是否下发:0:未下发;1:下发;  2:已下发 3:已经接收(RESULT_STATUS,DECIMAL,0)
+     * 入库单是否下发:0:未下发;1:下发;  2:已接收(RESULT_STATUS,DECIMAL,0)
      */
     @ApiModelProperty(value="入库单是否下发:0:未下发;1:已下发;  2:已接收",required=false)
     private BigDecimal resultStatus;
@@ -53,9 +46,9 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     private BigDecimal materialId;
 
     /**
-     * 入库是否完成(0:未完成,1:已完成)(INBOUND_ISCOMPLETE,DECIMAL,0)
+     * 入库是否完成(0:未完成,1:已完成,2:已预留)(INBOUND_ISCOMPLETE,DECIMAL,0)
      */
-    @ApiModelProperty(value="入库是否完成(0:未完成,1:已完成)",required=false)
+    @ApiModelProperty(value="入库是否完成(0:未完成,1:已完成,2:已预留)",required=false)
     private BigDecimal inboundIscomplete;
 
     /**
@@ -64,23 +57,12 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除:1:删除;0:未删除",required=false)
     private BigDecimal resultDeleted;
 
-    /**
-     * 逻辑删除:1:删除;0:未删除(RESULT_DELETED,DECIMAL,0)
-     */
-    @ApiModelProperty(value="是否上传金蝶:1:上传了;0:未上传",required=false)
-    private BigDecimal isupload;
     /**
      * 入库日期(INBOUND_TIME,TIMESTAMP,7)
      */
     @ApiModelProperty(value="入库日期",required=false)
     private Date inboundTime;
 
-    /**
-     * 分组 ID(LOAD_ID,DECIMAL,0)
-     */
-    @ApiModelProperty(value="分组 ID",required=false)
-    private BigDecimal inboundGroupId;
-
     /**
      * 记录创建人(INSERT_USERNAME,VARCHAR,20)
      */
@@ -123,25 +105,52 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="车间",required=false)
     private BigDecimal personnelWorkshopid;
 
-    /**
-     * 吊钢工已扫物资次数(RESULT_NUMBER,DECIMAL,0)
-     */
-    @ApiModelProperty(value="吊钢工已扫物资次数",required=false)
-    private BigDecimal resultNumber;
     /**
      * 班次(PERSONNEL_SHIFTS,VARCHAR,20)
      */
     @ApiModelProperty(value="班次",required=false)
     private String personnelShifts;
 
+    /**
+     * 批次(INBOUND_DISTRIBUTE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="批次",required=false)
+    private BigDecimal inboundDistributeId;
+
+    /**
+     * 分组(INBOUND_GROUP_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="分组",required=false)
+    private BigDecimal inboundGroupId;
+
+    /**
+     * 扫码数(RESULT_NUMBER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="扫码数",required=false)
+    private BigDecimal resultNumber;
+
+    /**
+     * 是否上传金蝶系统(0:没上传,1:已经上传)(ISUPLOAD,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否上传金蝶系统(0:没上传,1:已经上传)",required=false)
+    private BigDecimal isupload;
+
+    /**
+     * 入库唯一值(INBOUND_ONLY_VALUE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="入库唯一值",required=false)
+    private BigDecimal inboundOnlyValue;
+
     private static final long serialVersionUID = 1L;
 
-    public BigDecimal getResultNumber() {
-        return resultNumber;
+    @Override
+    public BigDecimal getId() {
+        return this.inboundId;
     }
 
-    public void setResultNumber(BigDecimal resultNumber) {
-        this.resultNumber = resultNumber;
+    @Override
+    public void setId(BigDecimal inboundId) {
+        this.inboundId = inboundId;
     }
 
     public BigDecimal getInboundId() {
@@ -152,14 +161,6 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
         this.inboundId = inboundId;
     }
 
-    public BigDecimal getInboundDistributeId() {
-        return inboundDistributeId;
-    }
-
-    public void setInboundDistributeId(BigDecimal inboundDistributeId) {
-        this.inboundDistributeId = inboundDistributeId;
-    }
-
     public BigDecimal getInboundType() {
         return inboundType;
     }
@@ -172,16 +173,8 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
         return inboundNumber;
     }
 
-    public BigDecimal getInboundGroupId() {
-        return inboundGroupId;
-    }
-
-    public void setInboundGroupId(BigDecimal inboundGroupId) {
-        this.inboundGroupId = inboundGroupId;
-    }
-
     public void setInboundNumber(String inboundNumber) {
-        this.inboundNumber = inboundNumber;
+        this.inboundNumber = inboundNumber == null ? null : inboundNumber.trim();
     }
 
     public BigDecimal getGridId() {
@@ -237,7 +230,7 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     }
 
     public void setInsertUsername(String insertUsername) {
-        this.insertUsername = insertUsername;
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
     }
 
     public Date getInsertTime() {
@@ -253,7 +246,7 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     }
 
     public void setUpdateUsername(String updateUsername) {
-        this.updateUsername = updateUsername;
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
     }
 
     public Date getUpdateTime() {
@@ -269,7 +262,7 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     }
 
     public void setInsertUpdateRemark(String insertUpdateRemark) {
-        this.insertUpdateRemark = insertUpdateRemark;
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
     }
 
     public String getPersonnelTeam() {
@@ -277,7 +270,7 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     }
 
     public void setPersonnelTeam(String personnelTeam) {
-        this.personnelTeam = personnelTeam;
+        this.personnelTeam = personnelTeam == null ? null : personnelTeam.trim();
     }
 
     public BigDecimal getPersonnelWorkshopid() {
@@ -293,11 +286,31 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
     }
 
     public void setPersonnelShifts(String personnelShifts) {
-        this.personnelShifts = personnelShifts;
+        this.personnelShifts = personnelShifts == null ? null : personnelShifts.trim();
     }
 
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
+    public BigDecimal getInboundDistributeId() {
+        return inboundDistributeId;
+    }
+
+    public void setInboundDistributeId(BigDecimal inboundDistributeId) {
+        this.inboundDistributeId = inboundDistributeId;
+    }
+
+    public BigDecimal getInboundGroupId() {
+        return inboundGroupId;
+    }
+
+    public void setInboundGroupId(BigDecimal inboundGroupId) {
+        this.inboundGroupId = inboundGroupId;
+    }
+
+    public BigDecimal getResultNumber() {
+        return resultNumber;
+    }
+
+    public void setResultNumber(BigDecimal resultNumber) {
+        this.resultNumber = resultNumber;
     }
 
     public BigDecimal getIsupload() {
@@ -308,14 +321,44 @@ public class WmspInboundResult implements IBasePO<BigDecimal> {
         this.isupload = isupload;
     }
 
-    @Override
-    public BigDecimal getId() {
-        return null;
+    public BigDecimal getInboundOnlyValue() {
+        return inboundOnlyValue;
     }
 
-    @Override
-    public void setId(BigDecimal bigDecimal) {
-
+    public void setInboundOnlyValue(BigDecimal inboundOnlyValue) {
+        this.inboundOnlyValue = inboundOnlyValue;
     }
 
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", inboundId=").append(inboundId);
+        sb.append(", inboundType=").append(inboundType);
+        sb.append(", inboundNumber=").append(inboundNumber);
+        sb.append(", gridId=").append(gridId);
+        sb.append(", resultStatus=").append(resultStatus);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", inboundIscomplete=").append(inboundIscomplete);
+        sb.append(", resultDeleted=").append(resultDeleted);
+        sb.append(", inboundTime=").append(inboundTime);
+        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(", personnelTeam=").append(personnelTeam);
+        sb.append(", personnelWorkshopid=").append(personnelWorkshopid);
+        sb.append(", personnelShifts=").append(personnelShifts);
+        sb.append(", inboundDistributeId=").append(inboundDistributeId);
+        sb.append(", inboundGroupId=").append(inboundGroupId);
+        sb.append(", resultNumber=").append(resultNumber);
+        sb.append(", isupload=").append(isupload);
+        sb.append(", inboundOnlyValue=").append(inboundOnlyValue);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
 }

+ 12 - 0
src/main/java/com/steerinfo/dil/service/IWmsInboundEasService.java

@@ -0,0 +1,12 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+
+import java.util.List;
+import java.util.Map;
+
+public interface IWmsInboundEasService {
+    List<Map<String, Object>> getInboundEasInfo(Map<String, Object> mapValue);
+
+    int reduceInboundEas(Integer inboundEasId);
+}

+ 10 - 1
src/main/java/com/steerinfo/dil/service/IWmspGridMaterialService.java

@@ -2,6 +2,8 @@ package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspGridMaterial;
 import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
+import io.swagger.models.auth.In;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -61,7 +63,7 @@ public interface IWmspGridMaterialService  {
 
     List<Map<String, Object>> getSteelMaterialModelList(Map<String,Object> map);
 //    新增入库转预留
-    int insertReserved(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity);
+    int insertReserved(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity, String actuallyWeight,String materialTheWeight,String remark);
 //    新增预留转入库
     int insertInbounds(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity);
 
@@ -71,4 +73,11 @@ public interface IWmspGridMaterialService  {
     List<Map<String, Object>> getGridMaterialAgeList(Map<String,Object> mapVal,Integer warehouseId);
 //    查询所有的钢材库信息
     List<Map<String, Object>> getSteelWarehouseList(Map<String, Object> mapVal);
+
+    BigDecimal getTheoreticalByInfo(String warehouseId,
+                                    String  materialCode,
+                                    String materialSpecification,
+                                    String materialModel,
+                                    Integer status,
+                                    Integer num);
 }

+ 109 - 4
src/main/java/com/steerinfo/dil/service/impl/WmspGridMaterialServiceImpl.java

@@ -1,12 +1,20 @@
 package com.steerinfo.dil.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.primitives.Bytes;
+import com.google.gson.JsonObject;
+import com.steerinfo.dil.feign.JoinFeign;
 import com.steerinfo.dil.mapper.*;
 import com.steerinfo.dil.model.*;
 import com.steerinfo.dil.service.IWmspGridMaterialService;
 import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.util.EASUtil;
 import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
+import io.swagger.models.auth.In;
+import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
@@ -42,7 +50,12 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
     private WmspCheckWarehouseMapper wmspCheckWarehouseMapper;
     @Autowired
     private WmspInboundResultMapper wmspInboundResultMapper;
-
+    @Autowired
+    private WmspInboundEasMapper  wmspInboundEasMapper;
+    @Autowired
+    private EASUtil easUtil;
+    @Autowired
+    private JoinFeign joinFeign;
 
     //新增
     @Override
@@ -356,8 +369,15 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
     }
 
     @Override
-    public int  insertReserved(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity) {
-//        设置状态为入库转预留
+    public int  insertReserved(String warehouseId,
+                               String materialCode,
+                               String materialSpecification,
+                               String materialModel,
+                               Integer quantity,
+                               String actuallyWeight,
+                               String materialTheWeight,
+                               String remark) {
+//        设置状态为预留转入库
         Integer status = 1;
 //        根据前端传过来的物资型号,物资规格查询当前实时库存中的物资id
         List<Map<String,Object>> materialIdList=wmspGridMaterialMapper.getMaterialIdes(warehouseId,materialCode,materialSpecification,materialModel,status);
@@ -371,6 +391,63 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
         }else{
             int count = 0;
 //        遍历materialList
+            //创建金蝶报文
+            BigDecimal inboundEasId = wmspInboundEasMapper.inboundEasId();
+            Map<String, Object> head = new HashMap<>();
+            head.put("number",inboundEasId);
+            head.put("status","ADD");
+            //事务类型--完工合格入库024
+            head.put("transactionTypeNumber","024");
+            //获取当前日期
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            //业务日期-当天
+            head.put("bizDate",simpleDateFormat.format(new Date()));
+            //产品类别--钢材产成品001
+            head.put("productTypeNumber","001");
+            //库存组织--物资仓储站
+            head.put("StorageOrgUnitNumber","DG001.20.06.02");
+            if(DataChange.dataToBigDecimal(warehouseId).intValue() == 3){
+                head.put("costCenterOrgUnitNumber","DG001.19.07");
+            }else if(DataChange.dataToBigDecimal(warehouseId).intValue() == 2){
+                head.put("costCenterOrgUnitNumber","DG001.19.06");
+            }else if(DataChange.dataToBigDecimal(warehouseId).intValue() == 1){
+                head.put("costCenterOrgUnitNumber","DG001.19.05");
+            }
+            head.put("adminOrgUnitNumber","DG001.19.00");
+            List<Map<String,Object>> entries = new ArrayList<>();
+            Map<String, Object> entry = new HashMap<>();
+            entry.put("InvUpdateTypeNumber","001");
+            entry.put("materialNum",materialCode);
+            entry.put("asstQty",quantity);
+            entry.put("wareHouseNumber","WZCCZ-CP-002");
+            entry.put("poundwei",actuallyWeight);
+            entry.put("remark",remark);
+            entries.add(entry);
+            Map<String,Object> input = new HashMap<>();
+            input.put("head",head);
+            input.put("entries",entries);
+            //获取其他信息
+            Map<String,Object> totalMap = easUtil.getTotalMap();
+            totalMap.put("input",input);
+            System.out.println(totalMap);
+            JSONObject json = new JSONObject(totalMap);
+            String resultMap = joinFeign.toInboundResultEas(totalMap);
+            //JSONObject responseJson = new JSONObject(resultMap);
+            System.out.println(resultMap);
+            //根据当前时间获取早班、夜班、中班
+            //新入库上传金蝶实体类
+            WmspInboundEas wmspInboundEas = new WmspInboundEas();
+            wmspInboundEas.setId(inboundEasId);
+            wmspInboundEas.setInboundEasNo("TOEAS" + inboundEasId);
+            wmspInboundEas.setInsertTime(new Date());
+            wmspInboundEas.setMaterialActuallyWeight(new BigDecimal(actuallyWeight));
+            wmspInboundEas.setMaterialNum(new BigDecimal(quantity));
+            wmspInboundEas.setMaterialTheroticalWeight(new BigDecimal(materialTheWeight));
+            wmspInboundEas.setInsertUsername(remark);
+            wmspInboundEas.setInsertUpdateRemark(json.toString());
+            wmspInboundEas.setUpdateUsername(resultMap);
+            wmspInboundEas.setWarehouseId(new BigDecimal(warehouseId));
+            wmspInboundEasMapper.insertSelective(wmspInboundEas);
             for (int i =0;i<quantity;i++){
                 Map<String,Object> map =materialIdList.get(i);
                 BigDecimal inboundId=(BigDecimal) map.get("inboundId");
@@ -378,6 +455,8 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
                 WmspInboundResult wmspInboundResult = new WmspInboundResult();
                 wmspInboundResult.setInboundId(inboundId);
                 wmspInboundResult.setInboundIscomplete(new BigDecimal(2));
+                wmspInboundResult.setInboundOnlyValue(inboundEasId);
+                wmspInboundResult.setIsupload(new BigDecimal(1));
 //            修改入库实绩
                 count += wmspInboundResultMapper.updateByPrimaryKeySelective(wmspInboundResult);
             }
@@ -385,9 +464,32 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
         }
     }
 
+
+    @Override
+    public BigDecimal getTheoreticalByInfo(String warehouseId,
+                                           String  materialCode,
+                                           String materialSpecification,
+                                           String materialModel,
+                                           Integer status,
+                                           Integer num) {
+        //根据物资信息查询理重(规格、型号)
+        List<Map<String,Object>> materialIdList =wmspGridMaterialMapper.getMaterialIdes(warehouseId,materialCode,materialSpecification,materialModel,status);
+        BigDecimal sumTheoreticalWeight = new BigDecimal(0);
+        //遍历数组,获取理重
+        if(num > materialIdList.size()){
+            return new BigDecimal(-1);
+        }
+        for(int i=0; i<num;i++){
+            Map<String,Object> map =materialIdList.get(i);
+            BigDecimal theoreticalWeight = DataChange.dataToBigDecimal(map.get("theoreticalWeight"));
+            sumTheoreticalWeight = sumTheoreticalWeight.add(theoreticalWeight);
+        }
+        return sumTheoreticalWeight.divide(new BigDecimal(1000));
+    }
+
     @Override
     public int insertInbounds(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity) {
-//        设置状态为预留转入库
+//        设置状态为入库转预留
         Integer status = 2;
         //        根据前端传过来的物资型号,物资规格查询当前实时库存中的物资id
         List<Map<String,Object>> materialIdList=wmspGridMaterialMapper.getMaterialIdesNoTime(warehouseId,materialCode,materialSpecification,materialModel,status);
@@ -408,6 +510,7 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
                 WmspInboundResult wmspInboundResult = new WmspInboundResult();
                 wmspInboundResult.setInboundId(inboundId);
                 wmspInboundResult.setInboundIscomplete(new BigDecimal(1));
+                wmspInboundResult.setIsupload(new BigDecimal(0));
                 wmspInboundResult.setInsertTime(new Date());
 //            修改入库实绩
                 count += wmspInboundResultMapper.updateByPrimaryKeySelective(wmspInboundResult);
@@ -497,4 +600,6 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
         List<Map<String, Object>> list =wmspGridMaterialMapper.getGridMaterialAgeList(mapVal);
         return list;
     }
+
+
 }

+ 73 - 0
src/main/java/com/steerinfo/dil/service/impl/WmspInboundEasServiceImpl.java

@@ -0,0 +1,73 @@
+package com.steerinfo.dil.service.impl;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.steerinfo.dil.feign.JoinFeign;
+import com.steerinfo.dil.mapper.WmspInboundEasMapper;
+import com.steerinfo.dil.mapper.WmspInboundResultMapper;
+import com.steerinfo.dil.model.WmspInboundEas;
+import com.steerinfo.dil.model.WmspInboundResult;
+import com.steerinfo.dil.service.IWmsInboundEasService;
+import com.steerinfo.dil.util.EASUtil;
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class WmspInboundEasServiceImpl implements IWmsInboundEasService {
+
+
+    @Autowired
+    WmspInboundEasMapper wmspInboundEasMapper;
+
+    @Autowired
+    WmspInboundResultMapper wmspInboundResultMapper;
+
+    @Autowired
+    private EASUtil easUtil;
+
+    @Autowired
+    private JoinFeign joinFeign;
+
+    @Override
+    public List<Map<String, Object>> getInboundEasInfo(Map<String, Object> mapValue) {
+        return wmspInboundEasMapper.getInboundEasInfo(mapValue);
+    }
+
+    @Override
+    public int reduceInboundEas(Integer inboundEasId) {
+        //根据入库上传金蝶ID去查询入库实绩
+        Map<String, Object> head = new HashMap<>();
+        head.put("status","DELETE");
+        head.put("number",inboundEasId);
+        Map<String, Object> input = new HashMap<>();
+        input.put("head",head);
+        Map<String,Object> totalMap = easUtil.getTotalMap();
+        totalMap.put("input",input);
+        System.out.println(totalMap);
+        JSONObject json = new JSONObject(totalMap);
+        String resultMap = joinFeign.toInboundResultEas(totalMap);
+        System.out.println(resultMap);
+        List<BigDecimal> inboundResultIds = wmspInboundEasMapper.getInboundResult(inboundEasId);
+        WmspInboundEas wmspInboundEas = new WmspInboundEas();
+        wmspInboundEas.setInboundEasId(new BigDecimal(inboundEasId));
+        wmspInboundEas.setDeleted(new BigDecimal(1));
+        wmspInboundEasMapper.updateByPrimaryKeySelective(wmspInboundEas);
+        int count = 0;
+        for(BigDecimal inboundResultId:inboundResultIds){
+            WmspInboundResult wmspInboundResult = new WmspInboundResult();
+            wmspInboundResult.setInboundId(inboundResultId);
+            wmspInboundResult.setInboundIscomplete(new BigDecimal(1));
+            wmspInboundResult.setIsupload(new BigDecimal(0));
+            wmspInboundResult.setUpdateTime(new Date());
+            count += wmspInboundResultMapper.updateByPrimaryKeySelective(wmspInboundResult);
+        }
+        return count;
+    }
+}

+ 73 - 0
src/main/java/com/steerinfo/dil/util/EASUtil.java

@@ -0,0 +1,73 @@
+package com.steerinfo.dil.util;
+
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 配置金蝶正式环境连接常量Map
+ * @Description:
+ * @Author:HuJianGuo
+ * @GreateTime:2021/11/15 19:44
+ * @Version:V2.0
+ */
+@Component
+public class EASUtil {
+    // totalMap
+    public final Map<String,Object> totalMap = new HashMap<>();
+    // context
+    public final Map<String,Object> context = new HashMap<>();
+    public final boolean logError = true;
+    public final boolean logData = true;
+    // context
+    public final Map<String,Object> login = new HashMap<>();
+    public  final String dcNameTest = "D002";
+    public final String password = "dgjt@kingdee";
+    public final String dcName = "zseas85";
+    public final String dbType = "0";
+    public final String userName = "user";
+    // context
+    public final String command = "saveManufactureRecHandler";
+
+    /**
+     * 得到context的map
+     * @return
+     */
+    public Map<String,Object> getContext(){
+        this.context.put("logError",logError);
+        this.context.put("logData",logData);
+        return this.context;
+    }
+
+    /**
+     * 得到login的map
+     * @return
+     */
+    public Map<String,Object> getLogin(){
+        this.login.put("password",password);
+        this.login.put("dcName",dcName);
+        this.login.put("dbType",dbType);
+        this.login.put("userName",userName);
+        return this.login;
+    }
+
+    /**
+     * 得到command字符串
+     * @return
+     */
+    public String getCommand(){
+        return this.command;
+    }
+
+    /**
+     * 将所有的配置放入到totalMap的map里面
+     * @return
+     */
+    public Map<String,Object> getTotalMap() {
+        totalMap.put("context",getContext());
+        totalMap.put("login",getLogin());
+        totalMap.put("command",getCommand());
+        return this.totalMap;
+    }
+}

+ 5 - 3
src/main/resources/application-prod.yml

@@ -10,13 +10,15 @@ spring:
 #feign设置
 openfeign:
   ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+    url: ${COLUMNDATAFEIGN_URL:172.16.33.161:8083}
   Im:
     url: ${IMFEIGN_URL:172.16.33.166:8055}
   TmsTruckFeign:
     url: ${TMSTRUCKFEIGN_URL:172.16.33.166:8088}
   OmsFeign:
-    url: ${OMSFEIGN_URL:172.16.33.166:8095}
+    url: ${OMSFEIGN_URL:localhost:8095}
+  JoinFeign:
+    url: ${JOINFEIGN_URL:localhost:8066}
 #图片上传配置
 piction:
   # path: /usr/share/nginx/html/image
@@ -24,4 +26,4 @@ piction:
   #path: C:\Users\24390\Desktop\work\a
    path: /shared
 server:
-  port: 8093
+  port: 8095

+ 0 - 2
src/main/resources/com/steerinfo/dil/mapper/WmspCheckWarehouseMapper.xml

@@ -456,9 +456,7 @@
                            ON WIR.MATERIAL_ID=WGM.MATERIAL_ID
   
                  WHERE RPG.WAREHOUSE_ID =#{warehouseId}
-                 AND WGM.DELETED = 0
                  AND WIR.INBOUND_ISCOMPLETE=#{status}
-                 AND WGM.UPDATE_TIME IS NULL
                 <if test="startDate != null">
                   AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= WIR.INBOUND_TIME
                   AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WIR.INBOUND_TIME

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

@@ -774,10 +774,11 @@
     on wgm.GRID_ID = wpg.GRID_ID
     where wpg.WAREHOUSE_ID = #{warehouseId}
  </select>
-  <select id="getMaterialIdes" resultType="java.util.Map">
+  <select id="getMaterialIdes" resultType="java.util.LinkedHashMap" >
     SELECT
            RMS.MATERIAL_STEEL_ID "materialId",
-           WIR.INBOUND_ID "inboundId"
+           WIR.INBOUND_ID "inboundId",
+           RMS.MATERIAL_THEORETICAL_WEIGHT  "theoreticalWeight"
     FROM RMS_MATERIAL_STEEL RMS
     LEFT JOIN RMS_MATERIAL RM
     ON RM.MATERIAL_ID = RMS.MATERIAL_ID
@@ -822,7 +823,6 @@
         LEFT JOIN WMSP_INBOUND_RESULT WIR
         ON WIR.MATERIAL_ID = WGM.MATERIAL_ID
         WHERE WIR.RESULT_DELETED =0
-          AND WGM.DELETED = 0
           AND WIR.INBOUND_ISCOMPLETE =#{status}
           AND WIR.RESULT_STATUS >1
           AND RPG.WAREHOUSE_ID = #{warehouseId}

+ 455 - 0
src/main/resources/com/steerinfo/dil/mapper/WmspInboundEasMapper.xml

@@ -0,0 +1,455 @@
+<?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.WmspInboundEasMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspInboundEas">
+    <id column="INBOUND_EAS_ID" jdbcType="DECIMAL" property="inboundEasId" />
+    <result column="INBOUND_EAS_NO" jdbcType="VARCHAR" property="inboundEasNo" />
+    <result column="MATERIAL_THEROTICAL_WEIGHT" jdbcType="DECIMAL" property="materialTheroticalWeight" />
+    <result column="MATERIAL_ACTUALLY_WEIGHT" jdbcType="DECIMAL" property="materialActuallyWeight" />
+    <result column="MATERIAL_NUM" jdbcType="DECIMAL" property="materialNum" />
+    <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="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="SOUT_REPORT_VALUE" jdbcType="BLOB" property="soutReportValue" />
+  </resultMap>
+  <sql id="columns">
+    INBOUND_EAS_ID, INBOUND_EAS_NO, MATERIAL_THEROTICAL_WEIGHT, MATERIAL_ACTUALLY_WEIGHT, 
+    MATERIAL_NUM, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    WAREHOUSE_ID, DELETED, SOUT_REPORT_VALUE
+  </sql>
+  <sql id="columns_alias">
+    t.INBOUND_EAS_ID, t.INBOUND_EAS_NO, t.MATERIAL_THEROTICAL_WEIGHT, t.MATERIAL_ACTUALLY_WEIGHT, 
+    t.MATERIAL_NUM, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.WAREHOUSE_ID, t.DELETED, t.SOUT_REPORT_VALUE
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM WMSP_INBOUND_EAS
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM WMSP_INBOUND_EAS t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="inboundEasId != null">
+        and INBOUND_EAS_ID = #{inboundEasId}
+      </if>
+      <if test="inboundEasNo != null and inboundEasNo != ''">
+        and INBOUND_EAS_NO = #{inboundEasNo}
+      </if>
+      <if test="materialTheroticalWeight != null">
+        and MATERIAL_THEROTICAL_WEIGHT = #{materialTheroticalWeight}
+      </if>
+      <if test="materialActuallyWeight != null">
+        and MATERIAL_ACTUALLY_WEIGHT = #{materialActuallyWeight}
+      </if>
+      <if test="materialNum != null">
+        and MATERIAL_NUM = #{materialNum}
+      </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="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="soutReportValue != null">
+        and SOUT_REPORT_VALUE = #{soutReportValue}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="inboundEasId != null">
+        and INBOUND_EAS_ID = #{inboundEasId}
+      </if>
+      <if test="inboundEasNo != null and inboundEasNo != ''">
+        and INBOUND_EAS_NO LIKE '%${inboundEasNo}%'
+      </if>
+      <if test="materialTheroticalWeight != null">
+        and MATERIAL_THEROTICAL_WEIGHT = #{materialTheroticalWeight}
+      </if>
+      <if test="materialActuallyWeight != null">
+        and MATERIAL_ACTUALLY_WEIGHT = #{materialActuallyWeight}
+      </if>
+      <if test="materialNum != null">
+        and MATERIAL_NUM = #{materialNum}
+      </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="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="soutReportValue != null">
+        and SOUT_REPORT_VALUE = #{soutReportValue}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from WMSP_INBOUND_EAS
+    where INBOUND_EAS_ID = #{inboundEasId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from WMSP_INBOUND_EAS
+    where 1!=1
+    <if test="inboundEasNo != null and inboundEasNo != ''">
+      or INBOUND_EAS_NO = #{inboundEasNo}
+    </if>
+    <if test="materialTheroticalWeight != null">
+      or MATERIAL_THEROTICAL_WEIGHT = #{materialTheroticalWeight}
+    </if>
+    <if test="materialActuallyWeight != null">
+      or MATERIAL_ACTUALLY_WEIGHT = #{materialActuallyWeight}
+    </if>
+    <if test="materialNum != null">
+      or MATERIAL_NUM = #{materialNum}
+    </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="warehouseId != null">
+      or WAREHOUSE_ID = #{warehouseId}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="soutReportValue != null">
+      or SOUT_REPORT_VALUE = #{soutReportValue}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.WmspInboundEas">
+    insert into WMSP_INBOUND_EAS (INBOUND_EAS_ID, INBOUND_EAS_NO, MATERIAL_THEROTICAL_WEIGHT,
+                                  MATERIAL_ACTUALLY_WEIGHT, MATERIAL_NUM, INSERT_USERNAME,
+                                  INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                                  INSERT_UPDATE_REMARK, WAREHOUSE_ID, DELETED,
+                                  SOUT_REPORT_VALUE)
+    values (#{inboundEasId,jdbcType=DECIMAL}, #{inboundEasNo,jdbcType=VARCHAR}, #{materialTheroticalWeight,jdbcType=DECIMAL},
+            #{materialActuallyWeight,jdbcType=DECIMAL}, #{materialNum,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{warehouseId,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL},
+            #{soutReportValue,jdbcType=BLOB})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspInboundEas">
+    insert into WMSP_INBOUND_EAS
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="inboundEasId != null">
+        INBOUND_EAS_ID,
+      </if>
+      <if test="inboundEasNo != null">
+        INBOUND_EAS_NO,
+      </if>
+      <if test="materialTheroticalWeight != null">
+        MATERIAL_THEROTICAL_WEIGHT,
+      </if>
+      <if test="materialActuallyWeight != null">
+        MATERIAL_ACTUALLY_WEIGHT,
+      </if>
+      <if test="materialNum != null">
+        MATERIAL_NUM,
+      </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="warehouseId != null">
+        WAREHOUSE_ID,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="soutReportValue != null">
+        SOUT_REPORT_VALUE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="inboundEasId != null">
+        #{inboundEasId,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundEasNo != null">
+        #{inboundEasNo,jdbcType=VARCHAR},
+      </if>
+      <if test="materialTheroticalWeight != null">
+        #{materialTheroticalWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="materialActuallyWeight != null">
+        #{materialActuallyWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNum != null">
+        #{materialNum,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="warehouseId != null">
+        #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="soutReportValue != null">
+        #{soutReportValue,jdbcType=BLOB},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspInboundEas">
+    update WMSP_INBOUND_EAS
+    set INBOUND_EAS_NO = #{inboundEasNo,jdbcType=VARCHAR},
+        MATERIAL_THEROTICAL_WEIGHT = #{materialTheroticalWeight,jdbcType=DECIMAL},
+        MATERIAL_ACTUALLY_WEIGHT = #{materialActuallyWeight,jdbcType=DECIMAL},
+        MATERIAL_NUM = #{materialNum,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},
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        SOUT_REPORT_VALUE = #{soutReportValue,jdbcType=BLOB}
+    where INBOUND_EAS_ID = #{inboundEasId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspInboundEas">
+    update WMSP_INBOUND_EAS
+    <set>
+      <if test="inboundEasNo != null">
+        INBOUND_EAS_NO = #{inboundEasNo,jdbcType=VARCHAR},
+      </if>
+      <if test="materialTheroticalWeight != null">
+        MATERIAL_THEROTICAL_WEIGHT = #{materialTheroticalWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="materialActuallyWeight != null">
+        MATERIAL_ACTUALLY_WEIGHT = #{materialActuallyWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNum != null">
+        MATERIAL_NUM = #{materialNum,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="warehouseId != null">
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="soutReportValue != null">
+        SOUT_REPORT_VALUE = #{soutReportValue,jdbcType=BLOB},
+      </if>
+    </set>
+    where INBOUND_EAS_ID = #{inboundEasId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where INBOUND_EAS_ID = #{inboundEasId,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 WMSP_INBOUND_EAS
+    (INBOUND_EAS_ID,
+    INBOUND_EAS_NO, MATERIAL_THEROTICAL_WEIGHT,
+    MATERIAL_ACTUALLY_WEIGHT, MATERIAL_NUM,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, WAREHOUSE_ID,
+    DELETED, SOUT_REPORT_VALUE)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.inboundEasId,jdbcType=DECIMAL},
+    #{item.inboundEasNo,jdbcType=VARCHAR}, #{item.materialTheroticalWeight,jdbcType=DECIMAL},
+    #{item.materialActuallyWeight,jdbcType=DECIMAL}, #{item.materialNum,jdbcType=DECIMAL},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.warehouseId,jdbcType=DECIMAL},
+    #{item.deleted,jdbcType=DECIMAL}, #{item.soutReportValue,jdbcType=BLOB} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update WMSP_INBOUND_EAS
+    set
+    INBOUND_EAS_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.inboundEasId,jdbcType=DECIMAL}
+    </foreach>
+    ,INBOUND_EAS_NO=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.inboundEasNo,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_THEROTICAL_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.materialTheroticalWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_ACTUALLY_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.materialActuallyWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_NUM=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.materialNum,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,WAREHOUSE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,SOUT_REPORT_VALUE=
+    <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_EAS_ID" separator=" ">
+      when #{item.inboundEasId,jdbcType=DECIMAL} then #{item.soutReportValue,jdbcType=BLOB}
+    </foreach>
+    where INBOUND_EAS_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.inboundEasId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from WMSP_INBOUND_EAS
+    where INBOUND_EAS_ID in
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+ 
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getInboundEasInfo" resultType="java.util.Map">
+    SELECT distinct
+           WIE.INBOUND_EAS_ID "inboundEasId",
+           WIE.INBOUND_EAS_NO	"inboundEasNo",
+           WIE.MATERIAL_ACTUALLY_WEIGHT	"actuallyWeight",
+           WIE.MATERIAL_THEROTICAL_WEIGHT	"theroticalWeight",
+           WIE.MATERIAL_NUM	"materialNum",
+           WIE.INSERT_USERNAME	"remark",
+           RM.MATERIAL_NAME "materialName",
+           RM.MATERIAL_SPECIFICATION    "materialSpe"
+    FROM WMSP_INBOUND_EAS WIE
+    LEFT JOIN WMSP_INBOUND_RESULT WIR
+    ON WIR.INBOUND_ONLY_VALUE = WIE.INBOUND_EAS_ID
+    LEFT JOIN RMS_MATERIAL_STEEL RMS
+    ON RMS.MATERIAL_STEEL_ID = WIR.MATERIAL_ID
+    LEFT JOIN RMS_MATERIAL RM
+    ON RM.MATERIAL_ID = RMS.MATERIAL_ID
+    where WIE.WAREHOUSE_ID = #{warehouseId}
+
+    <if test="oneDate != null">
+      and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt; = WIE.INSERT_TIME
+    </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;=  WIE.INSERT_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=  WIE.INSERT_TIME
+    </if>
+  </select>
+  <select id="getInboundResult" resultType="java.math.BigDecimal" parameterType="java.lang.Integer">
+    SELECT WIR.INBOUND_ID FROM WMSP_INBOUND_RESULT WIR
+    WHERE WIR.INBOUND_ONLY_VALUE = #{inboundEasId}
+  </select>
+</mapper>

+ 203 - 194
src/main/resources/com/steerinfo/dil/mapper/WmspInboundResultMapper.xml

@@ -5,12 +5,7 @@
         <id column="INBOUND_ID" jdbcType="DECIMAL" property="inboundId" />
         <result column="INBOUND_TYPE" jdbcType="DECIMAL" property="inboundType" />
         <result column="INBOUND_NUMBER" jdbcType="VARCHAR" property="inboundNumber" />
-        <result column="INBOUND_DISTRIBUTE_ID" jdbcType="DECIMAL" property="inboundDistributeId" />
         <result column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
-        <result column="INBOUND_GROUP_ID" jdbcType="DECIMAL" property="inboundGroupId" />
-        <result column="PERSONNEL_WORKSHOPID" jdbcType="DECIMAL" property="personnelWorkshopid" />
-        <result column="RESULT_NUMBER" jdbcType="DECIMAL" property="resultNumber" />
-        <result column="ISUPLOAD" jdbcType="DECIMAL" property="isupload" />
         <result column="RESULT_STATUS" jdbcType="DECIMAL" property="resultStatus" />
         <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
         <result column="INBOUND_ISCOMPLETE" jdbcType="DECIMAL" property="inboundIscomplete" />
@@ -22,22 +17,27 @@
         <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
         <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
         <result column="PERSONNEL_TEAM" jdbcType="VARCHAR" property="personnelTeam" />
+        <result column="PERSONNEL_WORKSHOPID" jdbcType="DECIMAL" property="personnelWorkshopid" />
         <result column="PERSONNEL_SHIFTS" jdbcType="VARCHAR" property="personnelShifts" />
-        
-        
-
+        <result column="INBOUND_DISTRIBUTE_ID" jdbcType="DECIMAL" property="inboundDistributeId" />
+        <result column="INBOUND_GROUP_ID" jdbcType="DECIMAL" property="inboundGroupId" />
+        <result column="RESULT_NUMBER" jdbcType="DECIMAL" property="resultNumber" />
+        <result column="ISUPLOAD" jdbcType="DECIMAL" property="isupload" />
+        <result column="INBOUND_ONLY_VALUE" jdbcType="DECIMAL" property="inboundOnlyValue" />
     </resultMap>
     <sql id="columns">
-    INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER,INBOUND_DISTRIBUTE_ID, GRID_ID,INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID,RESULT_NUMBER,ISUPLOAD, RESULT_STATUS, MATERIAL_ID, INBOUND_ISCOMPLETE,
-    RESULT_DELETED, INBOUND_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-    INSERT_UPDATE_REMARK, PERSONNEL_TEAM,, PERSONNEL_SHIFTS
-  </sql>
+        INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER, GRID_ID, RESULT_STATUS, MATERIAL_ID, INBOUND_ISCOMPLETE,
+    RESULT_DELETED, INBOUND_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, PERSONNEL_TEAM, PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, INBOUND_DISTRIBUTE_ID,
+    INBOUND_GROUP_ID, RESULT_NUMBER, ISUPLOAD, INBOUND_ONLY_VALUE
+    </sql>
     <sql id="columns_alias">
-    t.INBOUND_ID, t.INBOUND_TYPE, t.INBOUND_NUMBER,t.INBOUND_DISTRIBUTE_ID, t.GRID_ID,INBOUND_GROUP_ID,t.PERSONNEL_WORKSHOPID,t.RESULT_NUMBER,ISUPLOAD, t.RESULT_STATUS, t.MATERIAL_ID,
-    t.INBOUND_ISCOMPLETE, t.RESULT_DELETED, t.INBOUND_TIME, t.INSERT_USERNAME, t.INSERT_TIME, 
-    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.PERSONNEL_TEAM, ,
-    t.PERSONNEL_SHIFTS
-  </sql>
+        t.INBOUND_ID, t.INBOUND_TYPE, t.INBOUND_NUMBER, t.GRID_ID, t.RESULT_STATUS, t.MATERIAL_ID,
+    t.INBOUND_ISCOMPLETE, t.RESULT_DELETED, t.INBOUND_TIME, t.INSERT_USERNAME, t.INSERT_TIME,
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.PERSONNEL_TEAM, t.PERSONNEL_WORKSHOPID,
+    t.PERSONNEL_SHIFTS, t.INBOUND_DISTRIBUTE_ID, t.INBOUND_GROUP_ID, t.RESULT_NUMBER,
+    t.ISUPLOAD, t.INBOUND_ONLY_VALUE
+    </sql>
     <sql id="select">
         SELECT <include refid="columns" /> FROM WMSP_INBOUND_RESULT
     </sql>
@@ -55,28 +55,9 @@
             <if test="inboundNumber != null and inboundNumber != ''">
                 and INBOUND_NUMBER = #{inboundNumber}
             </if>
-            
-            <if test="inboundDistributeId != null and inboundDistributeId != ''">
-                and INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
-            </if>
-            
             <if test="gridId != null">
                 and GRID_ID = #{gridId}
             </if>
-            
-            <if test="inboundGroupId != null">
-                and INBOUND_GROUP_ID = #{inboundGroupId}
-            </if>
-            
-            <if test="personnelWorkshopid != null">
-                and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
-            </if>
-            <if test="resultNumber != null">
-                and RESULT_NUMBER = #{resultNumber}
-            </if>
-            <if test="isupload != null">
-                and ISUPLOAD = #{isupload}
-            </if>
             <if test="resultStatus != null">
                 and RESULT_STATUS = #{resultStatus}
             </if>
@@ -110,9 +91,27 @@
             <if test="personnelTeam != null and personnelTeam != ''">
                 and PERSONNEL_TEAM = #{personnelTeam}
             </if>
+            <if test="personnelWorkshopid != null">
+                and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
+            </if>
             <if test="personnelShifts != null and personnelShifts != ''">
                 and PERSONNEL_SHIFTS = #{personnelShifts}
             </if>
+            <if test="inboundDistributeId != null">
+                and INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
+            </if>
+            <if test="inboundGroupId != null">
+                and INBOUND_GROUP_ID = #{inboundGroupId}
+            </if>
+            <if test="resultNumber != null">
+                and RESULT_NUMBER = #{resultNumber}
+            </if>
+            <if test="isupload != null">
+                and ISUPLOAD = #{isupload}
+            </if>
+            <if test="inboundOnlyValue != null">
+                and INBOUND_ONLY_VALUE = #{inboundOnlyValue}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -123,29 +122,12 @@
             <if test="inboundType != null">
                 and INBOUND_TYPE = #{inboundType}
             </if>
-            
             <if test="inboundNumber != null and inboundNumber != ''">
                 and INBOUND_NUMBER LIKE '%${inboundNumber}%'
             </if>
-            <if test="inboundDistributeId != null and inboundDistributeId != ''">
-                and INBOUND_DISTRIBUTE_ID LIKE '%${inboundDistributeId}%'
-            </if>
             <if test="gridId != null">
                 and GRID_ID = #{gridId}
             </if>
-            <if test="inboundGroupId != null">
-                and INBOUND_GROUP_ID = #{inboundGroupId}
-            </if>
-            
-            <if test="personnelWorkshopid != null">
-                and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
-            </if>
-            <if test="resultNumber != null">
-                and RESULT_NUMBER = #{resultNumber}
-            </if>
-            <if test="isupload != null">
-                and ISUPLOAD = #{isupload}
-            </if>
             <if test="resultStatus != null">
                 and RESULT_STATUS = #{resultStatus}
             </if>
@@ -179,46 +161,45 @@
             <if test="personnelTeam != null and personnelTeam != ''">
                 and PERSONNEL_TEAM LIKE '%${personnelTeam}%'
             </if>
+            <if test="personnelWorkshopid != null">
+                and PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
+            </if>
             <if test="personnelShifts != null and personnelShifts != ''">
                 and PERSONNEL_SHIFTS LIKE '%${personnelShifts}%'
             </if>
+            <if test="inboundDistributeId != null">
+                and INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
+            </if>
+            <if test="inboundGroupId != null">
+                and INBOUND_GROUP_ID = #{inboundGroupId}
+            </if>
+            <if test="resultNumber != null">
+                and RESULT_NUMBER = #{resultNumber}
+            </if>
+            <if test="isupload != null">
+                and ISUPLOAD = #{isupload}
+            </if>
+            <if test="inboundOnlyValue != null">
+                and INBOUND_ONLY_VALUE = #{inboundOnlyValue}
+            </if>
         </where>
     </sql>
-    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-    delete from WMSP_INBOUND_RESULT
-    where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
-  </delete>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+        delete from WMSP_INBOUND_RESULT
+        where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
+    </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
         delete from WMSP_INBOUND_RESULT
         where 1!=1
         <if test="inboundType != null">
             or INBOUND_TYPE = #{inboundType}
         </if>
-        
         <if test="inboundNumber != null and inboundNumber != ''">
             or INBOUND_NUMBER = #{inboundNumber}
         </if>
-        <if test="inboundDistributeId != null and inboundDistributeId != ''">
-            or INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
-        </if>
-        
         <if test="gridId != null">
             or GRID_ID = #{gridId}
         </if>
-        
-        <if test="inboundGroupId != null">
-            or INBOUND_GROUP_ID = #{inboundGroupId}
-        </if>
-        
-        <if test="personnelWorkshopid != null">
-            or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
-        </if>
-        <if test="resultNumber != null">
-            or RESULT_NUMBER = #{resultNumber}
-        </if>
-        <if test="isupload != null">
-            or ISUPLOAD = #{isupload}
-        </if>
         <if test="resultStatus != null">
             or RESULT_STATUS = #{resultStatus}
         </if>
@@ -252,24 +233,46 @@
         <if test="personnelTeam != null and personnelTeam != ''">
             or PERSONNEL_TEAM = #{personnelTeam}
         </if>
+        <if test="personnelWorkshopid != null">
+            or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
+        </if>
         <if test="personnelShifts != null and personnelShifts != ''">
             or PERSONNEL_SHIFTS = #{personnelShifts}
         </if>
+        <if test="inboundDistributeId != null">
+            or INBOUND_DISTRIBUTE_ID = #{inboundDistributeId}
+        </if>
+        <if test="inboundGroupId != null">
+            or INBOUND_GROUP_ID = #{inboundGroupId}
+        </if>
+        <if test="resultNumber != null">
+            or RESULT_NUMBER = #{resultNumber}
+        </if>
+        <if test="isupload != null">
+            or ISUPLOAD = #{isupload}
+        </if>
+        <if test="inboundOnlyValue != null">
+            or INBOUND_ONLY_VALUE = #{inboundOnlyValue}
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.WmspInboundResult">
-    insert into WMSP_INBOUND_RESULT (INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER, INBOUND_DISTRIBUTE_ID,
-      GRID_ID,INBOUND_GROUP_ID, PERSONNEL_WORKSHOPID,RESULT_NUMBER,ISUPLOAD,RESULT_STATUS, MATERIAL_ID,
-      INBOUND_ISCOMPLETE, RESULT_DELETED, INBOUND_TIME, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, PERSONNEL_TEAM,
-      PERSONNEL_SHIFTS)
-    values (#{inboundId,jdbcType=DECIMAL}, #{inboundType,jdbcType=DECIMAL}, #{inboundNumber,jdbcType=VARCHAR},#{inboundDistributeId,jdbcType=DECIMAL},
-      #{gridId,jdbcType=DECIMAL},#{inboundGroupId,jdbcType=DECIMAL},#{personnelWorkshopid,jdbcType=DECIMAL},#{resultNumber,jdbcType=DECIMAL},#{isupload,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
-      #{inboundIscomplete,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL}, #{inboundTime,jdbcType=TIMESTAMP}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR}, 
-      #{personnelShifts,jdbcType=VARCHAR})
-  </insert>
+        insert into WMSP_INBOUND_RESULT (INBOUND_ID, INBOUND_TYPE, INBOUND_NUMBER,
+                                         GRID_ID, RESULT_STATUS, MATERIAL_ID,
+                                         INBOUND_ISCOMPLETE, RESULT_DELETED, INBOUND_TIME,
+                                         INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                         UPDATE_TIME, INSERT_UPDATE_REMARK, PERSONNEL_TEAM,
+                                         PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, INBOUND_DISTRIBUTE_ID,
+                                         INBOUND_GROUP_ID, RESULT_NUMBER, ISUPLOAD,
+                                         INBOUND_ONLY_VALUE)
+        values (#{inboundId,jdbcType=DECIMAL}, #{inboundType,jdbcType=DECIMAL}, #{inboundNumber,jdbcType=VARCHAR},
+                #{gridId,jdbcType=DECIMAL}, #{resultStatus,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
+                #{inboundIscomplete,jdbcType=DECIMAL}, #{resultDeleted,jdbcType=DECIMAL}, #{inboundTime,jdbcType=TIMESTAMP},
+                #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+                #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
+                #{personnelWorkshopid,jdbcType=DECIMAL}, #{personnelShifts,jdbcType=VARCHAR}, #{inboundDistributeId,jdbcType=DECIMAL},
+                #{inboundGroupId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=DECIMAL}, #{isupload,jdbcType=DECIMAL},
+                #{inboundOnlyValue,jdbcType=DECIMAL})
+    </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspInboundResult">
         insert into WMSP_INBOUND_RESULT
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -282,26 +285,9 @@
             <if test="inboundNumber != null">
                 INBOUND_NUMBER,
             </if>
-            <if test="inboundDistributeId != null">
-                INBOUND_DISTRIBUTE_ID,
-            </if>
-            
             <if test="gridId != null">
                 GRID_ID,
             </if>
-            
-            <if test="inboundGroupId != null">
-                INBOUND_GROUP_ID,
-            </if>
-            <if test="personnelWorkshopid != null">
-                PERSONNEL_WORKSHOPID,
-            </if>
-            <if test="resultNumber != null">
-                RESULT_NUMBER,
-            </if>
-            <if test="isupload != null">
-                ISUPLOAD,
-            </if>
             <if test="resultStatus != null">
                 RESULT_STATUS,
             </if>
@@ -335,9 +321,27 @@
             <if test="personnelTeam != null">
                 PERSONNEL_TEAM,
             </if>
+            <if test="personnelWorkshopid != null">
+                PERSONNEL_WORKSHOPID,
+            </if>
             <if test="personnelShifts != null">
                 PERSONNEL_SHIFTS,
             </if>
+            <if test="inboundDistributeId != null">
+                INBOUND_DISTRIBUTE_ID,
+            </if>
+            <if test="inboundGroupId != null">
+                INBOUND_GROUP_ID,
+            </if>
+            <if test="resultNumber != null">
+                RESULT_NUMBER,
+            </if>
+            <if test="isupload != null">
+                ISUPLOAD,
+            </if>
+            <if test="inboundOnlyValue != null">
+                INBOUND_ONLY_VALUE,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="inboundId != null">
@@ -349,26 +353,9 @@
             <if test="inboundNumber != null">
                 #{inboundNumber,jdbcType=VARCHAR},
             </if>
-            <if test="inboundDistributeId != null">
-                #{inboundDistributeId,jdbcType=VARCHAR},
-            </if>
-            
             <if test="gridId != null">
                 #{gridId,jdbcType=DECIMAL},
             </if>
-            
-            <if test="inboundGroupId != null">
-                #{inboundGroupId,jdbcType=DECIMAL},
-            </if>
-            <if test="personnelWorkshopid != null">
-                #{personnelWorkshopid,jdbcType=DECIMAL},
-            </if>
-            <if test="resultNumber != null">
-                #{resultNumber,jdbcType=DECIMAL},
-            </if>
-            <if test="isupload != null">
-                #{isupload,jdbcType=DECIMAL},
-            </if>
             <if test="resultStatus != null">
                 #{resultStatus,jdbcType=DECIMAL},
             </if>
@@ -402,36 +389,54 @@
             <if test="personnelTeam != null">
                 #{personnelTeam,jdbcType=VARCHAR},
             </if>
+            <if test="personnelWorkshopid != null">
+                #{personnelWorkshopid,jdbcType=DECIMAL},
+            </if>
             <if test="personnelShifts != null">
                 #{personnelShifts,jdbcType=VARCHAR},
             </if>
+            <if test="inboundDistributeId != null">
+                #{inboundDistributeId,jdbcType=DECIMAL},
+            </if>
+            <if test="inboundGroupId != null">
+                #{inboundGroupId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultNumber != null">
+                #{resultNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="isupload != null">
+                #{isupload,jdbcType=DECIMAL},
+            </if>
+            <if test="inboundOnlyValue != null">
+                #{inboundOnlyValue,jdbcType=DECIMAL},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspInboundResult">
-    update WMSP_INBOUND_RESULT
-    set INBOUND_TYPE = #{inboundType,jdbcType=DECIMAL},
-      INBOUND_NUMBER = #{inboundNumber,jdbcType=VARCHAR},
-       INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
-      GRID_ID = #{gridId,jdbcType=DECIMAL},
-      PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
-      RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
-      ISUPLOAD = #{isupload,jdbcType=DECIMAL},
-      INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
-      RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
-      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
-      INBOUND_ISCOMPLETE = #{inboundIscomplete,jdbcType=DECIMAL},
-      RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
-      INBOUND_TIME = #{inboundTime,jdbcType=TIMESTAMP},
-      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},
-      PERSONNEL_TEAM = #{personnelTeam,jdbcType=VARCHAR},
-      
-      PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR}
-    where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
-  </update>
+        update WMSP_INBOUND_RESULT
+        set INBOUND_TYPE = #{inboundType,jdbcType=DECIMAL},
+            INBOUND_NUMBER = #{inboundNumber,jdbcType=VARCHAR},
+            GRID_ID = #{gridId,jdbcType=DECIMAL},
+            RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
+            MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+            INBOUND_ISCOMPLETE = #{inboundIscomplete,jdbcType=DECIMAL},
+            RESULT_DELETED = #{resultDeleted,jdbcType=DECIMAL},
+            INBOUND_TIME = #{inboundTime,jdbcType=TIMESTAMP},
+            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},
+            PERSONNEL_TEAM = #{personnelTeam,jdbcType=VARCHAR},
+            PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
+            PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
+            INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
+            INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
+            RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
+            ISUPLOAD = #{isupload,jdbcType=DECIMAL},
+            INBOUND_ONLY_VALUE = #{inboundOnlyValue,jdbcType=DECIMAL}
+        where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
+    </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspInboundResult">
         update WMSP_INBOUND_RESULT
         <set>
@@ -441,26 +446,9 @@
             <if test="inboundNumber != null">
                 INBOUND_NUMBER = #{inboundNumber,jdbcType=VARCHAR},
             </if>
-            <if test="inboundDistributeId != null">
-                INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
-            </if>
-            
             <if test="gridId != null">
                 GRID_ID = #{gridId,jdbcType=DECIMAL},
             </if>
-            
-            <if test="inboundGroupId != null">
-                INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
-            </if>
-            <if test="personnelWorkshopid != null">
-                PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
-            </if>
-            <if test="resultNumber != null">
-                RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
-            </if>
-            <if test="isupload != null">
-                ISUPLOAD = #{isupload,jdbcType=DECIMAL},
-            </if>
             <if test="resultStatus != null">
                 RESULT_STATUS = #{resultStatus,jdbcType=DECIMAL},
             </if>
@@ -494,14 +482,31 @@
             <if test="personnelTeam != null">
                 PERSONNEL_TEAM = #{personnelTeam,jdbcType=VARCHAR},
             </if>
-        
+            <if test="personnelWorkshopid != null">
+                PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
+            </if>
             <if test="personnelShifts != null">
                 PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
             </if>
+            <if test="inboundDistributeId != null">
+                INBOUND_DISTRIBUTE_ID = #{inboundDistributeId,jdbcType=DECIMAL},
+            </if>
+            <if test="inboundGroupId != null">
+                INBOUND_GROUP_ID = #{inboundGroupId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultNumber != null">
+                RESULT_NUMBER = #{resultNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="isupload != null">
+                ISUPLOAD = #{isupload,jdbcType=DECIMAL},
+            </if>
+            <if test="inboundOnlyValue != null">
+                INBOUND_ONLY_VALUE = #{inboundOnlyValue,jdbcType=DECIMAL},
+            </if>
         </set>
         where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
     </update>
-    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
         <include refid="select" />
         where INBOUND_ID = #{inboundId,jdbcType=DECIMAL}
     </select>
@@ -516,24 +521,28 @@
     <insert id="batchInsert" parameterType="java.util.List">
         insert into WMSP_INBOUND_RESULT
         (INBOUND_ID,
-        INBOUND_TYPE, INBOUND_NUMBER, GRID_ID,INBOUND_GROUP_ID,PERSONNEL_WORKSHOPID,RESULT_NUMBER,ISUPLOAD,INBOUND_DISTRIBUTE_ID,
+        INBOUND_TYPE, INBOUND_NUMBER, GRID_ID,
         RESULT_STATUS, MATERIAL_ID, INBOUND_ISCOMPLETE,
         RESULT_DELETED, INBOUND_TIME,
         INSERT_USERNAME, INSERT_TIME,
         UPDATE_USERNAME, UPDATE_TIME,
         INSERT_UPDATE_REMARK, PERSONNEL_TEAM,
-         PERSONNEL_SHIFTS
+        PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS,
+        INBOUND_DISTRIBUTE_ID, INBOUND_GROUP_ID,
+        RESULT_NUMBER, ISUPLOAD, INBOUND_ONLY_VALUE
         )
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.inboundId,jdbcType=DECIMAL},
-        #{item.inboundType,jdbcType=DECIMAL}, #{item.inboundNumber,jdbcType=VARCHAR}, #{item.inboundGroupId,jdbcType=DECIMAL}, #{item.gridId,jdbcType=DECIMAL}, #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.resultNumber,jdbcType=DECIMAL}, #{item.isupload,jdbcType=DECIMAL} , #{item.inboundDistributeId,jdbcType=DECIMAL},
+        #{item.inboundType,jdbcType=DECIMAL}, #{item.inboundNumber,jdbcType=VARCHAR}, #{item.gridId,jdbcType=DECIMAL},
         #{item.resultStatus,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.inboundIscomplete,jdbcType=DECIMAL},
         #{item.resultDeleted,jdbcType=DECIMAL}, #{item.inboundTime,jdbcType=TIMESTAMP},
         #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
         #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
         #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.personnelTeam,jdbcType=VARCHAR},
-         #{item.personnelShifts,jdbcType=VARCHAR}
+        #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.personnelShifts,jdbcType=VARCHAR},
+        #{item.inboundDistributeId,jdbcType=DECIMAL}, #{item.inboundGroupId,jdbcType=DECIMAL},
+        #{item.resultNumber,jdbcType=DECIMAL}, #{item.isupload,jdbcType=DECIMAL}, #{item.inboundOnlyValue,jdbcType=DECIMAL}
         from dual
     </foreach> )
     </insert>
@@ -552,31 +561,10 @@
         <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
             when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundNumber,jdbcType=VARCHAR}
         </foreach>
-        ,INBOUND_DISTRIBUTE_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
-            when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundDistributeId,jdbcType=VARCHAR}
-        </foreach>
         ,GRID_ID=
         <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
             when #{item.inboundId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
         </foreach>
-        
-        ,INBOUND_GROUP_ID=
-        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
-            when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
-        </foreach>
-        ,PERSONNEL_WORKSHOPID=
-        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
-            when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
-        </foreach>
-        ,RESULT_NUMBER=
-        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
-            when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=DECIMAL}
-        </foreach>
-        ,ISUPLOAD=
-        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
-            when #{item.inboundId,jdbcType=DECIMAL} then #{item.isupload,jdbcType=DECIMAL}
-        </foreach>
         ,RESULT_STATUS=
         <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
             when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultStatus,jdbcType=DECIMAL}
@@ -621,16 +609,39 @@
         <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
             when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
         </foreach>
+        ,PERSONNEL_WORKSHOPID=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
+        </foreach>
         ,PERSONNEL_SHIFTS=
         <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
             when #{item.inboundId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
         </foreach>
+        ,INBOUND_DISTRIBUTE_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundDistributeId,jdbcType=DECIMAL}
+        </foreach>
+        ,INBOUND_GROUP_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundGroupId,jdbcType=DECIMAL}
+        </foreach>
+        ,RESULT_NUMBER=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=DECIMAL}
+        </foreach>
+        ,ISUPLOAD=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.isupload,jdbcType=DECIMAL}
+        </foreach>
+        ,INBOUND_ONLY_VALUE=
+        <foreach close="end" collection="list" index="index" item="item" open="case INBOUND_ID" separator=" ">
+            when #{item.inboundId,jdbcType=DECIMAL} then #{item.inboundOnlyValue,jdbcType=DECIMAL}
+        </foreach>
         where INBOUND_ID in
         <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.inboundId,jdbcType=DECIMAL}
         </foreach>
     </update>
-    
     <delete id="batchDelete" parameterType="java.util.List">
         delete from WMSP_INBOUND_RESULT
         where INBOUND_ID in
@@ -675,7 +686,6 @@
         AND wir.INBOUND_ISCOMPLETE != 2
         AND wir.ISUPLOAD='0'
         AND rpg.WAREHOUSE_ID = #{warehouseId}
-        AND wgm.UPDATE_TIME IS NULL
         <if test="oneDate != null">
             and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= wir.inbound_time
         </if>
@@ -948,7 +958,6 @@
         where wir.inbound_type = 0
         and wir.result_deleted = 0
         and wir.INBOUND_ISCOMPLETE = 2
-        and wgm.UPDATE_TIME is null
         and rpg.WAREHOUSE_ID = #{warehouseId}
         order by wir.inbound_time desc
         )