Browse Source

2.14收发存

zhouzh 3 years ago
parent
commit
f25c1f6d3a
70 changed files with 1270 additions and 270 deletions
  1. 4 0
      pom.xml
  2. 0 3
      src/main/java/com/steerinfo/dil/controller/RmsMaterialController.java
  3. 0 3
      src/main/java/com/steerinfo/dil/controller/RmsPwarehouseGridController.java
  4. 0 1
      src/main/java/com/steerinfo/dil/controller/RmsStackingController.java
  5. 13 12
      src/main/java/com/steerinfo/dil/controller/WmsInboundResultController.java
  6. 0 4
      src/main/java/com/steerinfo/dil/controller/WmsInboundScanResultController.java
  7. 0 3
      src/main/java/com/steerinfo/dil/controller/WmsOffSiteLibaryOutboundController.java
  8. 0 1
      src/main/java/com/steerinfo/dil/controller/WmsOffSiteLibraryInboundController.java
  9. 0 8
      src/main/java/com/steerinfo/dil/controller/WmsReboundResultController.java
  10. 0 7
      src/main/java/com/steerinfo/dil/controller/WmspGridMaterialController.java
  11. 0 2
      src/main/java/com/steerinfo/dil/controller/WmspInboundDrivingController.java
  12. 0 2
      src/main/java/com/steerinfo/dil/controller/WmspInboundGroupController.java
  13. 0 7
      src/main/java/com/steerinfo/dil/controller/WmspIntransitInventoryController.java
  14. 0 1
      src/main/java/com/steerinfo/dil/controller/WmspInventoryCheckController.java
  15. 0 2
      src/main/java/com/steerinfo/dil/controller/WmspIvboundMakeResultController.java
  16. 81 119
      src/main/java/com/steerinfo/dil/controller/WmspOutboundResultController.java
  17. 107 0
      src/main/java/com/steerinfo/dil/controller/WmspOutboundResultMaterialController.java
  18. 0 1
      src/main/java/com/steerinfo/dil/controller/WmspOutboundScanResultController.java
  19. 0 4
      src/main/java/com/steerinfo/dil/controller/WmspRestackMakeResultController.java
  20. 2 0
      src/main/java/com/steerinfo/dil/mapper/RmsMaterialMapper.java
  21. 3 0
      src/main/java/com/steerinfo/dil/mapper/RmsMaterialSteelMapper.java
  22. 2 1
      src/main/java/com/steerinfo/dil/mapper/WmspGridMaterialMapper.java
  23. 22 0
      src/main/java/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.java
  24. 6 0
      src/main/java/com/steerinfo/dil/mapper/WmspOutboundScanResultMapper.java
  25. 198 0
      src/main/java/com/steerinfo/dil/model/WmspOutboundResultMaterial.java
  26. 0 3
      src/main/java/com/steerinfo/dil/service/IRmsMaterialService.java
  27. 3 0
      src/main/java/com/steerinfo/dil/service/IRmsMaterialSteelService.java
  28. 1 1
      src/main/java/com/steerinfo/dil/service/IRmsPwarehouseGridService.java
  29. 0 3
      src/main/java/com/steerinfo/dil/service/IRmsStackingService.java
  30. 0 3
      src/main/java/com/steerinfo/dil/service/IWmsInboundDrivingResultService.java
  31. 0 2
      src/main/java/com/steerinfo/dil/service/IWmsInboundResultService.java
  32. 0 1
      src/main/java/com/steerinfo/dil/service/IWmsOffSiteLibaryOutboundService.java
  33. 0 1
      src/main/java/com/steerinfo/dil/service/IWmsOffSiteLibraryInboundService.java
  34. 0 2
      src/main/java/com/steerinfo/dil/service/IWmspGridMaterialService.java
  35. 0 4
      src/main/java/com/steerinfo/dil/service/IWmspIntransitInventoryService.java
  36. 0 1
      src/main/java/com/steerinfo/dil/service/IWmspInventoryCheckService.java
  37. 32 0
      src/main/java/com/steerinfo/dil/service/IWmspOutboundResultMaterialService.java
  38. 7 0
      src/main/java/com/steerinfo/dil/service/IWmspOutboundResultService.java
  39. 8 1
      src/main/java/com/steerinfo/dil/service/IWmspOutboundScanResultService.java
  40. 0 4
      src/main/java/com/steerinfo/dil/service/IWmspRestackDrivingResultService.java
  41. 0 4
      src/main/java/com/steerinfo/dil/service/IWmspRestackMakeMaterialService.java
  42. 0 1
      src/main/java/com/steerinfo/dil/service/IWmspRestackMakeResultService.java
  43. 3 1
      src/main/java/com/steerinfo/dil/service/impl/RmsMaterialServiceImpl.java
  44. 6 1
      src/main/java/com/steerinfo/dil/service/impl/RmsMaterialSteelServiceImpl.java
  45. 14 3
      src/main/java/com/steerinfo/dil/service/impl/RmsPwarehouseGridServiceImpl.java
  46. 0 3
      src/main/java/com/steerinfo/dil/service/impl/RmsStackingServiceImpl.java
  47. 0 2
      src/main/java/com/steerinfo/dil/service/impl/WmsOffSiteLibaryOutboundServiceImpl.java
  48. 0 2
      src/main/java/com/steerinfo/dil/service/impl/WmsOffSiteLibraryInboundServiceImpl.java
  49. 3 4
      src/main/java/com/steerinfo/dil/service/impl/WmspGridMaterialServiceImpl.java
  50. 0 4
      src/main/java/com/steerinfo/dil/service/impl/WmspIntransitInventoryServiceImpl.java
  51. 0 1
      src/main/java/com/steerinfo/dil/service/impl/WmspInventoryCheckServiceImpl.java
  52. 0 2
      src/main/java/com/steerinfo/dil/service/impl/WmspIvboundMakeMaterialServiceImpl.java
  53. 64 0
      src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultMaterialServiceImpl.java
  54. 162 2
      src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultServiceImpl.java
  55. 35 2
      src/main/java/com/steerinfo/dil/service/impl/WmspOutboundScanResultServiceImpl.java
  56. 0 5
      src/main/java/com/steerinfo/dil/service/impl/WmspRestackDrivingResultServiceImpl.java
  57. 0 4
      src/main/java/com/steerinfo/dil/service/impl/WmspRestackMakeMaterialServiceImpl.java
  58. 0 3
      src/main/java/com/steerinfo/dil/service/impl/WmspRestackMakeResultServiceImpl.java
  59. 0 1
      src/main/java/com/steerinfo/dil/service/impl/WmspRestackMakeTypeResultServiceImpl.java
  60. 0 2
      src/main/java/com/steerinfo/dil/service/impl/WmspRestackScanResultServiceImpl.java
  61. 10 0
      src/main/java/com/steerinfo/dil/vo/OutBoundDetailed.java
  62. 16 0
      src/main/java/com/steerinfo/dil/vo/OutBoundMaterialDetailedInfo.java
  63. 13 0
      src/main/java/com/steerinfo/dil/vo/OutBoundTypeDetailedInfo.java
  64. 5 0
      src/main/resources/com/steerinfo/dil/mapper/RmsMaterialMapper.xml
  65. 8 0
      src/main/resources/com/steerinfo/dil/mapper/RmsMaterialSteelMapper.xml
  66. 1 1
      src/main/resources/com/steerinfo/dil/mapper/RmsStackingMapper.xml
  67. 2 2
      src/main/resources/com/steerinfo/dil/mapper/WmspGridMaterialMapper.xml
  68. 15 13
      src/main/resources/com/steerinfo/dil/mapper/WmspOutboundResultMapper.xml
  69. 404 0
      src/main/resources/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.xml
  70. 20 0
      src/main/resources/com/steerinfo/dil/mapper/WmspOutboundScanResultMapper.xml

+ 4 - 0
pom.xml

@@ -117,7 +117,11 @@
 <!--                        <param>WMSP_INBOUND_CORRECT_RESULT</param>-->
 <!--                        <param>WMSP_INBOUND_DRIVING_RESULT</param>-->
 <!--                        <param>WMSP_GRID_MATERIAL</param>-->
+<<<<<<< HEAD
+                        <param>WMSP_OUTBOUND_RESULT_MATERIAL</param>
+=======
                         <param>WMSP_CHECK_WAREHOUSE</param>
+>>>>>>> 1b83fb0abea144c61e3a1d3257a6b7dd1a51811d
                     </tables>
                 </configuration>
                 <executions>

+ 0 - 3
src/main/java/com/steerinfo/dil/controller/RmsMaterialController.java

@@ -9,9 +9,6 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.awt.*;
-import java.util.LinkedList;
-
 /**
  * @author luobang
  * @create 2021-10-10 17:59

+ 0 - 3
src/main/java/com/steerinfo/dil/controller/RmsPwarehouseGridController.java

@@ -1,7 +1,6 @@
 package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.model.RmsPwarehouseGrid;
-import com.steerinfo.dil.service.IRmsPwarehouseGridService;
 
 import com.steerinfo.dil.service.impl.RmsPwarehouseGridServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
@@ -10,9 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
-import java.util.Arrays;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/RmsStackingController.java

@@ -1,6 +1,5 @@
 package com.steerinfo.dil.controller;
 
-import com.steerinfo.dil.service.IRmsStackingService;
 import com.steerinfo.dil.service.impl.RmsStackingServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;

+ 13 - 12
src/main/java/com/steerinfo/dil/controller/WmsInboundResultController.java

@@ -149,7 +149,7 @@ public class WmsInboundResultController extends BaseRESTfulController {
                 BigDecimal houseGrid = wmsInboundResultServiceImpl.getGrid(conditionMap.get("distributeId").toString(), i+1);
                 //如果差不多、说明上一个人少扫了一次
                 if (houseGrid==null){
-                    houseGrid = rmsPwarehouseGridService.selectGrid(mapList.size()-1, personnelWorkshopid);
+                    houseGrid = rmsPwarehouseGridService.selectGrid(mapList.size()-(i+1), personnelWorkshopid,new BigDecimal(item.get("materialId").toString()));
                     //创建实时库存
                     wmspGridMaterialService.initInsertWmspGridMaterial(item,houseGrid);
                 }
@@ -163,6 +163,7 @@ public class WmsInboundResultController extends BaseRESTfulController {
                 }
             }
                int status3= wmspInboundDistributeService.updateDistributeStatus(conditionMap.get("distributeId").toString());
+
                 return success("下发成功");
         //第n批第一次提交
         }else{
@@ -182,7 +183,7 @@ public class WmsInboundResultController extends BaseRESTfulController {
                     Map<String,Object> item=mapList.get(i);
 
                     //获得一个默认的网格  解释:目前还没有设计出来网格的结构 没有做默认为 第一库、第一月台、第一垛位、第一行、第一列 \推送信息给行车工、让他们抢单代码备注了
-                    BigDecimal houseGrid = rmsPwarehouseGridService.selectGrid(mapList.size()-1, personnelWorkshopid);
+                    BigDecimal houseGrid = rmsPwarehouseGridService.selectGrid(mapList.size()-(i+1), personnelWorkshopid,new BigDecimal(item.get("materialId").toString()));
                     //创建一个入库作业实绩
                     WmspInboundResult wmspInboundResult = wmsInboundResultServiceImpl.initAndWmspInboundResult(0,i+1,personnelWorkshopid,groupId,userName,wmspInboundDistribute.getDistributeId(),houseGrid,item);
                     //改变扫码实绩里面的状态
@@ -195,17 +196,8 @@ public class WmsInboundResultController extends BaseRESTfulController {
                 //如果是线材直接结束
                 //将下面的订单都录入这个批次里面
                 for (int i=0;i<mapList.size();i++) {
-
                     Map<String, Object> item = mapList.get(i);
-/*                    //获取物资大类id
-                    BigDecimal materialSteelId = DataChange.dataToBigDecimal(item.get("materialId"));
-                    BigDecimal materialId = wmspSendReceiveService.getMaterialId(materialSteelId);
-                    Map<String,Object> map4 = new HashMap<>();
-                    map4.put("materialId",materialId);
-                    map4.put("warehouseId",3);
-                    wmspSendReceiveService.addInBoundSendReceive(map4);
-                    wmspSendReceiveService.addThisdayInventorySendReceive(map4);
-                    //获得高线库*/
+                    //获得高线库
                     HashMap<String, Object> map3 = new HashMap<>();
                     map3.put("warehouseId",3);
                     BigDecimal houseGrid=rmsPwarehouseGridService.getGridId(map3);;
@@ -219,6 +211,15 @@ public class WmsInboundResultController extends BaseRESTfulController {
                     if(mapList.size()==i+1){
                         int status2= wmsInboundResultServiceImpl.updateInboundStatus(wmspInboundDistribute.getDistributeId());
                     }
+
+                    //获取物资大类id
+//                    BigDecimal materialSteelId = DataChange.dataToBigDecimal(item.get("materialId"));
+//                    BigDecimal materialId = wmspSendReceiveService.getMaterialId(materialSteelId);
+//                    Map<String,Object> map4 = new HashMap<>();
+//                    map4.put("materialId",materialId);
+//                    map4.put("warehouseId",3);
+//                    wmspSendReceiveService.addInBoundSendReceive(map4);
+//                    wmspSendReceiveService.addThisdayInventorySendReceive(map4);
                 }
                 int status3= wmspInboundDistributeService.updateDistributeStatus(wmspInboundDistribute.getDistributeId().toString());
                // wmspSendReceiveService.addInBoundSendReceive();

+ 0 - 4
src/main/java/com/steerinfo/dil/controller/WmsInboundScanResultController.java

@@ -1,7 +1,5 @@
 package com.steerinfo.dil.controller;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.TypeReference;
 import com.github.pagehelper.PageHelper;
 import com.steerinfo.dil.feign.ColumnDataFeign;
 import com.steerinfo.dil.mapper.WmspInboundResultMapper;
@@ -17,14 +15,12 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.collections.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 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 springfox.documentation.spring.web.json.Json;
 
 import java.math.BigDecimal;
 import java.text.ParseException;

+ 0 - 3
src/main/java/com/steerinfo/dil/controller/WmsOffSiteLibaryOutboundController.java

@@ -1,9 +1,6 @@
 package com.steerinfo.dil.controller;
 import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.WmsOffSiteLibaryOutbound;
-import com.steerinfo.dil.model.WmspGridMaterial;
-import com.steerinfo.dil.service.IWmsOffSiteLibaryOutboundService;
-import com.steerinfo.dil.service.IWmspGridMaterialService;
 import com.steerinfo.dil.service.impl.WmsOffSiteLibaryOutboundServiceImpl;
 import com.steerinfo.dil.service.impl.WmspGridMaterialServiceImpl;
 import com.steerinfo.dil.util.ColumnDataUtil;

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/WmsOffSiteLibraryInboundController.java

@@ -3,7 +3,6 @@ package com.steerinfo.dil.controller;
 import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.WmsOffSiteLibraryInbound;
 import com.steerinfo.dil.model.WmspIntransitInventory;
-import com.steerinfo.dil.service.IWmsOffSiteLibraryInboundService;
 import com.steerinfo.dil.service.impl.WmsOffSiteLibraryInboundServiceImpl;
 import com.steerinfo.dil.util.ColumnDataUtil;
 import com.steerinfo.dil.util.PageListAdd;

+ 0 - 8
src/main/java/com/steerinfo/dil/controller/WmsReboundResultController.java

@@ -1,14 +1,10 @@
 package com.steerinfo.dil.controller;
 import com.steerinfo.dil.feign.ESFeign;
-import com.steerinfo.dil.service.IWmsInboundResultService;
-import com.steerinfo.dil.service.IWmsInboundScanResultService;
-import com.steerinfo.dil.service.WmsReboundResultService;
 import com.steerinfo.dil.service.impl.WmsInboundResultServiceImpl;
 import com.steerinfo.dil.service.impl.WmsInboundScanResultServiceImpl;
 import com.steerinfo.dil.service.impl.WmspReboundResultServiceImpl;
 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;
@@ -21,10 +17,6 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;

+ 0 - 7
src/main/java/com/steerinfo/dil/controller/WmspGridMaterialController.java

@@ -2,7 +2,6 @@ package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.WmspGridMaterial;
-import com.steerinfo.dil.service.IWmspGridMaterialService;
 import com.steerinfo.dil.service.impl.WmspGridMaterialServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
@@ -10,21 +9,15 @@ import com.steerinfo.dil.util.PageListAdd;
 
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
-import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.xmlbeans.impl.xb.xsdschema.Public;
-import org.omg.PortableInterceptor.INACTIVE;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
-import java.text.DateFormat;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**

+ 0 - 2
src/main/java/com/steerinfo/dil/controller/WmspInboundDrivingController.java

@@ -9,8 +9,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.math.BigDecimal;
-
 /**
  * @author luobang
  * @create 2021-10-09 14:07

+ 0 - 2
src/main/java/com/steerinfo/dil/controller/WmspInboundGroupController.java

@@ -1,12 +1,10 @@
 package com.steerinfo.dil.controller;
 
-import com.steerinfo.dil.feign.IMFeign;
 import com.steerinfo.dil.model.WmspInboundGroup;
 import com.steerinfo.dil.service.IWmspInboundGroupService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;

+ 0 - 7
src/main/java/com/steerinfo/dil/controller/WmspIntransitInventoryController.java

@@ -1,24 +1,17 @@
 package com.steerinfo.dil.controller;
 
-import com.steerinfo.dil.model.WmspIntransitInventory;
-import com.steerinfo.dil.service.IWmspIntransitInventoryService;
 import com.steerinfo.dil.service.impl.WmspIntransitInventoryServiceImpl;
 import com.steerinfo.dil.util.ColumnDataUtil;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
-import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.framework.utils.collection.ListUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/WmspInventoryCheckController.java

@@ -1,6 +1,5 @@
 package com.steerinfo.dil.controller;
 
-import com.steerinfo.dil.feign.ColumnDataFeign;
 import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.WmspInventoryCheck;
 import com.steerinfo.dil.service.impl.WmspInventoryCheckServiceImpl;

+ 0 - 2
src/main/java/com/steerinfo/dil/controller/WmspIvboundMakeResultController.java

@@ -13,8 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 

+ 81 - 119
src/main/java/com/steerinfo/dil/controller/WmspOutboundResultController.java

@@ -5,10 +5,13 @@ import com.steerinfo.dil.mapper.CommonSeq;
 import com.steerinfo.dil.mapper.WmspInboundScanResultMapper;
 import com.steerinfo.dil.model.WmspOutboundResult;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
+import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
 import com.steerinfo.dil.service.impl.WmspOutboundResultServiceImpl;
+import com.steerinfo.dil.service.impl.WmspOutboundScanResultServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
 import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.dil.vo.OutBoundDetailed;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
 import io.swagger.annotations.ApiImplicitParam;
@@ -19,7 +22,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -43,13 +45,17 @@ import java.util.Map;
 public class WmspOutboundResultController extends BaseRESTfulController {
 
     @Autowired
-    WmspOutboundResultServiceImpl wmspOutboundResultService;
+    private WmspOutboundResultServiceImpl wmspOutboundResultService;
     @Autowired
-    WmspInboundScanResultMapper wmspInboundScanResultMapper;
+    private WmspInboundScanResultMapper wmspInboundScanResultMapper;
     @Autowired
-    CommonSeq commonSeq;
+    private IWmspOutboundResultMaterialService wmspOutboundResultMaterialService;
     @Autowired
-    ESFeign esFeign;
+    private WmspOutboundScanResultServiceImpl wmspOutboundScanResultService;
+    @Autowired
+    private CommonSeq commonSeq;
+    @Autowired
+    private  ESFeign esFeign;
 
 
     /**
@@ -107,6 +113,13 @@ public class WmspOutboundResultController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, libaryOutBoundList, columnList);
         return success(pageList);
     }
+    @ApiOperation("进入出库扫码页面,查询出库物资信息详情")
+    @GetMapping("/getInitOutboundScanResultMaterialInfo")
+    @ApiImplicitParam(name = "resultId",value = "出库实绩id",paramType = "BigDecimal",required = true)
+    public RESTfulResult getInitOutboundScanResultMaterialInfo(@RequestParam(value = "resultId",required = true) BigDecimal resultId){
+        OutBoundDetailed outBoundDetailed= wmspOutboundResultService.getInitOutboundScanResultMaterialInfo(resultId);
+        return success(outBoundDetailed);
+    }
 
     /**
      * 编写人:hukui
@@ -116,7 +129,6 @@ public class WmspOutboundResultController extends BaseRESTfulController {
      * 返回值:
      *   list:出库单实绩
      * */
-    @Transactional
     @PostMapping(value = "/insertWmspOutBoundResult")
     public Map<String, Object> insertWmspOutBoundResult(@RequestBody(required = false) Map<String, Object> mapval){
         /**拿到前端传递的运输订单号*/
@@ -125,117 +137,29 @@ public class WmspOutboundResultController extends BaseRESTfulController {
         Map<String, Object> order = wmspOutboundResultService.getOrder(orderNumber);
         /**拿运输订单信息中的运输订单Id*/
         BigDecimal orderId = (BigDecimal) order.get("orderId");
-//        根据该运输订单Id判断当前订单是否已经完成出厂,若完成直接返回null
+        //根据该运输订单Id判断当前订单是否已经完成出厂,若完成直接返回null
         if (wmspOutboundResultService.getOutboundStatus(orderId)==0){
-            /**根据运输订单号,查询出该订单还没有装货的物资*/
-            List<Map<String,Object>> orderList = wmspOutboundResultService.getMaterial(orderId.intValue());
-            //拿到还没装货的物资的物资编码
-            String materialCode = (String) orderList.get(0).get("materialCode");
-            //拿到还没装货的物资的物资名称
-            String materialName = (String) orderList.get(0).get("materialName");
-            //拿到还没装货的物资的规格
-            String materialSpecification = (String) orderList.get(0).get("materialSpecification");
-            //拿到还没装货的物资的型号
-            String materialModel = (String) orderList.get(0).get("materialModel");
-            //拿到还没装货的物资的物资理重
-            BigDecimal materialTheoreticalWeight = (BigDecimal) orderList.get(0).get("materialTheoreticalWeight");
-            //获取装卸工工号
-            //String personnelJobNumber = mapval.get("personnelJobNumber").toString();
-            //通过装卸工工号查询装卸工名称
-            //String personnelName = wmspOutboundResultService.getPersonnelNameByJobnumber(personnelJobNumber);
-
-        //拿到还没装货的物资id的第一条
-        BigDecimal materialId = (BigDecimal) orderList.get(0).get("materialId");
-        /**根据运输订单ID和物资id查询出库单(没有逻辑删除)
-         *          若orderNum大于0,则不是第一次扫描,已经新增出库单,返回详情信息
-         *          若orderNum等于0,则是第一次扫描,需要增加出库单,再返回详情信息
-         * */
-        Map<String,Object> map = new HashMap<>();
-        map.put("orderId",orderId);
-        map.put("materialId",materialId);
-        //初始化出库单详情信息
-        Map<String, Object> outBoundDetailedInfo=null;
+
+            Map<String,Object> map = new HashMap<>();
+            map.put("orderId",orderId);
+            /**根据运输订单ID和物资id查询出库单(没有逻辑删除)
+             *若orderNum大于0,则不是第一次扫描,已经新增出库单,返回详情信息
+             *若orderNum等于0,则是第一次扫描,需要增加出库单,再返回详情信息
+             * */
             int orderNum = wmspOutboundResultService.ExistWmspOutboundResult(map);
             if(orderNum == 0){
-                /**创建出库单实体*/
-                WmspOutboundResult wmspOutboundResult = new WmspOutboundResult();
-                /**使用序列号增加生成主键id*/
-                int seq_wmspoutboundresult = commonSeq.getSeqNumber("seq__WMSP_OUTBOUND_RESULT");
-                /**获取到当前时间*/
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-                /**生成出库单编号*/
-                String resultNumber = "XSCK" + sdf.format(new Date());
-                if(seq_wmspoutboundresult < 10){
-                    resultNumber += "0000000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 100){
-                    resultNumber += "000000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 1000){
-                    resultNumber += "00000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 10000){
-                    resultNumber += "0000" + seq_wmspoutboundresult;
-                }else  if(seq_wmspoutboundresult < 100000){
-                    resultNumber += "000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 1000000){
-                    resultNumber += "00" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 10000000){
-                    resultNumber += "0" + seq_wmspoutboundresult;
-                }else{
-                    resultNumber += seq_wmspoutboundresult;
-                }
-                /**拿到运输订单类型*/
-                BigDecimal orderType = (BigDecimal) order.get("orderType");
-                /**运输订单类型判断
-                 *    orderType : 1 为普通出库
-                 *    orderType : 4 为调拨出库
-                 * */
-                String resultOutboundType = "普通出库";
-                if(orderType.intValue() == 4){
-                    resultOutboundType = "调拨出库";
-                }
-                /**把出库单主键id添加到出库单实体中*/
-                wmspOutboundResult.setResultId(new BigDecimal(seq_wmspoutboundresult));
-                /**把出库单编号添加到出库单实体中*/
-                wmspOutboundResult.setResultNumber(resultNumber);
-                /**把运输订单主键添加到出库单实体中*/
-                wmspOutboundResult.setBillLadingId(orderId);
-                /**把出库类型添加到出库单实体中*/
-                wmspOutboundResult.setResultOutboundType(resultOutboundType);
-                /**第一次添加为待出库*/
-                wmspOutboundResult.setResultStatus(new BigDecimal(0));
-                //常规字段
-                wmspOutboundResult.setInsertUsername("admin");
-                wmspOutboundResult.setInsertTime(new Date());
-                wmspOutboundResult.setUpdateUsername("admin");
-                wmspOutboundResult.setUpdateTime(new Date());
-                wmspOutboundResult.setInsertUpdateRemark("无");
-                wmspOutboundResult.setDeleted(new BigDecimal(0));
-                //还没装货的物资id的第一条添加到出库单实体中
-                wmspOutboundResult.setMaterialId(materialId);
-                Integer res = wmspOutboundResultService.insertSelective(wmspOutboundResult);
-                if(res == 1){
-
-                    //返回出库单详情信息
-                    outBoundDetailedInfo = wmspOutboundResultService.getOutBoundDetailedInfo(orderId);
-                    outBoundDetailedInfo.put("orderNumber",orderNumber);
-//                outBoundDetailedInfo.put("personnelName",personnelName);
-                    outBoundDetailedInfo.put("materialCode",materialCode);
-                    outBoundDetailedInfo.put("materialName",materialName);
-                    outBoundDetailedInfo.put("materialSpecification",materialSpecification);
-                    outBoundDetailedInfo.put("materialModel",materialModel);
-                    outBoundDetailedInfo.put("materialTheoreticalWeight",materialTheoreticalWeight);
+                //创建出货单
+                WmspOutboundResult wmspOutboundResult=wmspOutboundResultService.createOutboundResult(orderId,new BigDecimal(order.get("orderType").toString()));
+                if (wmspOutboundResult!=null){
+                    /**根据运输订单号,查询出该订单还没有装货的物资*/
+                    List<Map<String,Object>> orderList = wmspOutboundResultService.getMaterial(orderId.intValue());
+                    int status= wmspOutboundResultMaterialService.insertOutboundMaterial(wmspOutboundResult.getResultId(),orderList);
+
                 }
-            }else{
-                //返回出库单详情信息
-                outBoundDetailedInfo = wmspOutboundResultService.getOutBoundDetailedInfo(orderId);
-                outBoundDetailedInfo.put("orderNumber",orderNumber);
-//            outBoundDetailedInfo.put("personnelName",personnelName);
-                outBoundDetailedInfo.put("materialCode",materialCode);
-                outBoundDetailedInfo.put("materialName",materialName);
-                outBoundDetailedInfo.put("materialSpecification",materialSpecification);
-                outBoundDetailedInfo.put("materialModel",materialModel);
-                outBoundDetailedInfo.put("materialTheoreticalWeight",materialTheoreticalWeight);
             }
-            return outBoundDetailedInfo;
+            //查询运单相关信息
+
+            return wmspOutboundResultService.getOutBoundDetailedInfo(orderId);
         }
         return null;
     }
@@ -255,8 +179,10 @@ public class WmspOutboundResultController extends BaseRESTfulController {
         return success(i);
     }
 
+
+
     /**
-     * 编写人:zouzhendon
+     * 编写人:yanghaiming
      * 装卸工PDA前端扫描钢材吊牌二维码,新增出库单扫描实绩并返回已扫描并稽核成功的物资信息
      * 参数:
      *   map(resultNumber 出库单号,personnelJobNumber 装卸工工号 resultMaterial 装卸工扫描吊牌结果)
@@ -264,17 +190,49 @@ public class WmspOutboundResultController extends BaseRESTfulController {
      *   list:出库单实绩
      * */
     @Transactional
-    @PostMapping(value = "/insertwmspOutboundScanResult")
+    @PostMapping(value = "/insertwmspOutboundScanResult6")
     public synchronized RESTfulResult insertwmspOutboundScanResult(@RequestBody(required = false) Map<String, Object> map){
+        //判断物资是否满足要求,目前一下三种不做处理的判断
+        //获取装卸工扫描吊牌结果   HRB400-14-21706854-9-3049-280-20211001015115-7a63cd87a4095e7f-08010103010100003-4
+        String subResultMaterial = map.get("resultMaterial").toString().substring(0,map.get("resultMaterial").toString().length() - 1);
+        //获取出库单号
+        BigDecimal resultId = new BigDecimal(map.get("resultId").toString());
+        //物资唯一编码
+        String MaterialOnlyCode=subResultMaterial.split("-")[7];
+        //判断物质是否已经被扫描
+        int isScan = wmspOutboundResultService.ExistScanResult(subResultMaterial);
+        //判断物资是否是需要出库的物资,需要出库物资数量不等于0,通过物资唯一编码和出库实绩
+        Integer materialNumber = wmspOutboundResultMaterialService.isOutboundResultMaterial(MaterialOnlyCode,resultId);
+        //判断物资是否数量已满
+        int scanCount = wmspOutboundScanResultService.getScanCount(MaterialOnlyCode,resultId);
+        if(isScan==0&&(materialNumber!=null&&materialNumber!=0)&&(materialNumber>scanCount)){
+            //创建扫描实绩
+            //通过装卸工工号查询装卸工Id
+            BigDecimal personnelId = wmspOutboundResultService.getPersonnelIdByJobnumber(map.get("personnelJobNumber").toString());
+            int status= wmspOutboundResultService.createOutboundScanResult(subResultMaterial,personnelId,resultId);
+        }
+
+        //返回值展示结果
+        return failed();
+    }
+    /**
+     * 编写人:zouzhendon
+     * 装卸工PDA前端扫描钢材吊牌二维码,新增出库单扫描实绩并返回已扫描并稽核成功的物资信息
+     * 参数:
+     *   map(resultNumber 出库单号,personnelJobNumber 装卸工工号 resultMaterial 装卸工扫描吊牌结果)
+     * 返回值:
+     *   list:出库单实绩
+     * */
+    @Transactional
+    @PostMapping(value = "/insertwmspOutboundScanResult2")
+    public synchronized RESTfulResult insertwmspOutboundScanResult2(@RequestBody(required = false) Map<String, Object> map){
       ///获得前台传来得信息
 
-       //获取装卸工扫描吊牌结果                                                           HRB400-14-21706854-9-3049-280-20211001015115-7a63cd87a4095e7f-08010103010100003-4
+       //获取装卸工扫描吊牌结果   HRB400-14-21706854-9-3049-280-20211001015115-7a63cd87a4095e7f-08010103010100003-4
         String resultMaterial = (String) map.get("resultMaterial");
         String subResultMaterial = resultMaterial.substring(0,resultMaterial.length() - 1);
         //获取出库单号
-        Integer resultId1 = (Integer) map.get("resultId");
-        //通过出库单号查询出库实绩ID
-        BigDecimal resultId = new BigDecimal(resultId1);
+        BigDecimal resultId = new BigDecimal(map.get("resultId").toString());
         /**根据扫描结果查询扫描实绩、判断是否一件出库
          *          若scanCount大于0,则不是第一次扫描,已经新增出库扫描实绩,返回已扫描过
          *          若scanCount等于0,则是第一次扫描,需要增加出库扫描实绩,再返回已扫描并稽核成功的物资信息
@@ -310,8 +268,12 @@ public class WmspOutboundResultController extends BaseRESTfulController {
                 wmspOutboundScanResult.setResultId(new BigDecimal(seq_wmspOutboundScanResult));
                 //根据物资id查询相对应的入库实绩ID,并将其赋值给相对应的入库扫描实绩表
                 List<Map<String, Object>> list= wmspInboundScanResultMapper.getInboundResultIdByMaterial(subResultMaterial);
-//                默认以获取到的第一个值作为入库实绩Id
+                //默认以获取到的第一个值作为入库实绩Id
                 Map<String ,Object> map1 = list.get(0);
+                //如果等于0说明该物资没有录入系统
+                if (list.size()==0){
+
+                }
                 wmspOutboundScanResult.setInboundResultId((BigDecimal) map1.get("inboundResultId"));
                 //插入出库实绩ID
                 wmspOutboundScanResult.setOutboundResultId(resultId);

+ 107 - 0
src/main/java/com/steerinfo/dil/controller/WmspOutboundResultMaterialController.java

@@ -0,0 +1,107 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * WmspOutboundResultMaterial RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 03:23
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:WmspOutboundResultMaterial RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/wmspoutboundresultmaterials")
+public class WmspOutboundResultMaterialController extends BaseRESTfulController {
+
+    @Autowired
+    IWmspOutboundResultMaterialService wmspOutboundResultMaterialService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("wmspoutboundresultmaterial:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<WmspOutboundResultMaterial> list = wmspOutboundResultMaterialService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("wmspoutboundresultmaterial:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<WmspOutboundResultMaterial> list = wmspOutboundResultMaterialService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据WmspOutboundResultMaterial对象创建")
+    @ApiImplicitParam(name = "wmspOutboundResultMaterial", value = "详细实体wmspOutboundResultMaterial", required = true, dataType = "WmspOutboundResultMaterial")
+    //@RequiresPermissions("wmspoutboundresultmaterial:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute WmspOutboundResultMaterial model){
+        WmspOutboundResultMaterial wmspOutboundResultMaterial = wmspOutboundResultMaterialService.add(model);
+        return success(wmspOutboundResultMaterial);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    //@RequiresPermissions("wmspoutboundresultmaterial:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable BigDecimal id){
+        WmspOutboundResultMaterial wmspOutboundResultMaterial = wmspOutboundResultMaterialService.getById(id);
+        return success(wmspOutboundResultMaterial);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的wmspOutboundResultMaterial信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal"),
+        @ApiImplicitParam(name = "wmspOutboundResultMaterial", value = "详细实体wmspOutboundResultMaterial", required = true, dataType = "WmspOutboundResultMaterial")
+    })
+    //@RequiresPermissions("wmspoutboundresultmaterial:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable BigDecimal id, @RequestBody WmspOutboundResultMaterial model){
+        model.setId(id);
+        WmspOutboundResultMaterial wmspOutboundResultMaterial = wmspOutboundResultMaterialService.modify(model);
+        return success(wmspOutboundResultMaterial);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    //@RequiresPermissions("wmspoutboundresultmaterial:delete")
+    @DeleteMapping(value = "/{id}")//BigDecimal
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<BigDecimal> ids = ListUtils.convertList(list);
+			  wmspOutboundResultMaterialService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/WmspOutboundScanResultController.java

@@ -2,7 +2,6 @@ package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.mapper.CommonSeq;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
-import com.steerinfo.dil.service.IWmspOutboundResultService;
 import com.steerinfo.dil.service.impl.WmspOutboundResultServiceImpl;
 import com.steerinfo.dil.service.impl.WmspOutboundScanResultServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;

+ 0 - 4
src/main/java/com/steerinfo/dil/controller/WmspRestackMakeResultController.java

@@ -1,8 +1,6 @@
 package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.feign.ESFeign;
-import com.steerinfo.dil.service.IRmsPwarehouseGridService;
-import com.steerinfo.dil.service.IWmspRestackScanResultService;
 import com.steerinfo.dil.service.impl.RmsPwarehouseGridServiceImpl;
 import com.steerinfo.dil.service.impl.WmspRestackMakeResultServiceImpl;
 import com.steerinfo.dil.service.impl.WmspRestackScanResultServiceImpl;
@@ -12,8 +10,6 @@ import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.dil.model.WmspRestackMakeResult;
-import com.steerinfo.dil.service.IWmspRestackMakeResultService;
-import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;

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

@@ -18,4 +18,6 @@ public interface RmsMaterialMapper extends IBaseMapper<RmsMaterial, BigDecimal>
     List<Map<String, Object>> getMaterial();
 
     Map<String, Object> getMaterialId2(HashMap<String, Object> mapMaterial);
+
+    String getMaterialCode(BigDecimal materialId);
 }

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

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 @Mapper
@@ -16,4 +17,6 @@ public interface RmsMaterialSteelMapper extends IBaseMapper<RmsMaterialSteel, Bi
     BigDecimal getCount();
 
     Map<String, Object> getMaterialSteel(HashMap<String, Object> mapRmsMaterialSteel);
+
+    Integer getScanCount(String onlyCode, List<String> onlyCodes);
 }

+ 2 - 1
src/main/java/com/steerinfo/dil/mapper/WmspGridMaterialMapper.java

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -53,7 +54,7 @@ public interface WmspGridMaterialMapper extends IBaseMapper<WmspGridMaterial, Bi
 //  根据物资编码查询对应的物资ID
   BigDecimal getMaterialIds(String materialCode);
 
-  int updateByMaterialId(BigDecimal materialSteelId);
+  int updateByMaterialId(@Param("materialSteelId") BigDecimal materialSteelId, @Param("updateTime")Date updateTime);
 
   //查询id
     List<Map<String,Object>> getMaterialId(BigDecimal warehouseId);

+ 22 - 0
src/main/java/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.java

@@ -0,0 +1,22 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.dil.vo.OutBoundTypeDetailedInfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface WmspOutboundResultMaterialMapper extends IBaseMapper<WmspOutboundResultMaterial, BigDecimal> {
+
+    int insertOutboundMaterial(@Param("orderId") BigDecimal orderId, @Param("orderList") List<Map<String, Object>> orderList, @Param("nowDate") Date nowDate, @Param("user") String user);
+
+    List<OutBoundTypeDetailedInfo> getOutBoundTypeDetailedInfo(BigDecimal resultId);
+
+    Integer isOutboundResultMaterial(String onlycode, BigDecimal resultId);
+}

+ 6 - 0
src/main/java/com/steerinfo/dil/mapper/WmspOutboundScanResultMapper.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.mapper;
 
 import com.steerinfo.dil.model.WmspOutboundScanResult;
+import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -14,6 +15,11 @@ public interface WmspOutboundScanResultMapper extends IBaseMapper<WmspOutboundSc
     List<Map<String, Object>> getResultMaterial(Integer resultId);
     //通过物资唯一编码找寻物资名称、规格型号、物资唯一编码和物资质检是否合格
     List<Map<String, Object>> getRmsMaterial (String materialOnlyCode);
+
+    List<OutBoundMaterialDetailedInfo> getOutBoundMaterialDetailedInfos(List<String> onlyCodes);
+
+    List<String> getResultStrs(BigDecimal resultId);
     //通过物资唯一编码查询钢材物资唯一id
     List<Map<String, Object>> getMaterialSteelId(String materialOnlyCode);
+
 }

+ 198 - 0
src/main/java/com/steerinfo/dil/model/WmspOutboundResultMaterial.java

@@ -0,0 +1,198 @@
+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 WmspOutboundResultMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 实绩与物资ID中间表(RESULT_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩与物资ID中间表",required=true)
+    private BigDecimal resultMaterialId;
+
+    /**
+     * 出库实绩ID(OUTBOUND_RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="出库实绩ID",required=false)
+    private BigDecimal outboundResultId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,200)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,200)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 物资数量(MATERIAL_NUMBER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资数量",required=false)
+    private BigDecimal materialNumber;
+
+    /**
+     * 物资重量(MATERIAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资重量",required=false)
+    private BigDecimal materialWeight;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultMaterialId) {
+        this.resultMaterialId = resultMaterialId;
+    }
+
+    public BigDecimal getResultMaterialId() {
+        return resultMaterialId;
+    }
+
+    public void setResultMaterialId(BigDecimal resultMaterialId) {
+        this.resultMaterialId = resultMaterialId;
+    }
+
+    public BigDecimal getOutboundResultId() {
+        return outboundResultId;
+    }
+
+    public void setOutboundResultId(BigDecimal outboundResultId) {
+        this.outboundResultId = outboundResultId;
+    }
+
+    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 getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(BigDecimal materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public BigDecimal getMaterialWeight() {
+        return materialWeight;
+    }
+
+    public void setMaterialWeight(BigDecimal materialWeight) {
+        this.materialWeight = materialWeight;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultMaterialId=").append(resultMaterialId);
+        sb.append(", outboundResultId=").append(outboundResultId);
+        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(", deleted=").append(deleted);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", materialNumber=").append(materialNumber);
+        sb.append(", materialWeight=").append(materialWeight);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 0 - 3
src/main/java/com/steerinfo/dil/service/IRmsMaterialService.java

@@ -1,8 +1,5 @@
 package com.steerinfo.dil.service;
 
-import com.baomidou.mybatisplus.extension.api.R;
-import com.steerinfo.dil.model.RmsMaterial;
-
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;

+ 3 - 0
src/main/java/com/steerinfo/dil/service/IRmsMaterialSteelService.java

@@ -2,6 +2,7 @@ package com.steerinfo.dil.service;
 
 import java.math.BigDecimal;
 import java.text.ParseException;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -36,4 +37,6 @@ public interface IRmsMaterialSteelService {
   根据物资唯一编码查询钢材物资ID
    */
     BigDecimal getMaterialSteelId(Map<String, Object> map);
+
+    Integer getScanCount(String onlyCode, List<String> onlyCodes);
 }

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

@@ -30,5 +30,5 @@ public interface IRmsPwarehouseGridService {
     //根据优先级和启用状态以及垛位上的物资ID来确定物资即将入库哪个垛位
     Map<String, Object> getStackingId(Map<String, Object> map);
     //分配网格
-    BigDecimal selectGrid(Integer size,BigDecimal warehouseId);
+    BigDecimal selectGrid(Integer size,BigDecimal warehouseId,BigDecimal materialId);
 }

+ 0 - 3
src/main/java/com/steerinfo/dil/service/IRmsStackingService.java

@@ -1,8 +1,5 @@
 package com.steerinfo.dil.service;
 
-import com.steerinfo.dil.model.RmsStacking;
-import com.steerinfo.framework.service.IBaseService;
-
 import java.math.BigDecimal;
 import java.util.Map;
 

+ 0 - 3
src/main/java/com/steerinfo/dil/service/IWmsInboundDrivingResultService.java

@@ -1,9 +1,6 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspInboundDrivingResult;
-import io.swagger.models.auth.In;
-
-import java.math.BigDecimal;
 
 /**
  * @author luobang

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

@@ -1,10 +1,8 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspInboundResult;
-import io.swagger.models.auth.In;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 

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

@@ -1,7 +1,6 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmsOffSiteLibaryOutbound;
-import com.steerinfo.framework.service.IBaseService;
 
 import java.math.BigDecimal;
 import java.util.List;

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

@@ -1,7 +1,6 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmsOffSiteLibraryInbound;
-import com.steerinfo.framework.service.IBaseService;
 import org.apache.ibatis.annotations.MapKey;
 
 import java.math.BigDecimal;

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

@@ -1,10 +1,8 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspGridMaterial;
-import com.steerinfo.framework.service.IBaseService;
 
 import java.math.BigDecimal;
-import java.text.ParseException;
 import java.util.List;
 import java.util.Map;
 

+ 0 - 4
src/main/java/com/steerinfo/dil/service/IWmspIntransitInventoryService.java

@@ -1,9 +1,5 @@
 package com.steerinfo.dil.service;
 
-import com.steerinfo.dil.model.WmspIntransitInventory;
-import com.steerinfo.framework.service.IBaseService;
-
-import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 

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

@@ -1,6 +1,5 @@
 package com.steerinfo.dil.service;
 
-import com.steerinfo.dil.model.WmspGridMaterial;
 import com.steerinfo.dil.model.WmspInventoryCheck;
 
 import java.util.HashMap;

+ 32 - 0
src/main/java/com/steerinfo/dil/service/IWmspOutboundResultMaterialService.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.dil.vo.OutBoundTypeDetailedInfo;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * WmspOutboundResultMaterial服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 03:23
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:WmspOutboundResultMaterial服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IWmspOutboundResultMaterialService extends IBaseService<WmspOutboundResultMaterial, BigDecimal>{
+
+    int insertOutboundMaterial(BigDecimal orderId, List<Map<String, Object>> orderList);
+
+    List<OutBoundTypeDetailedInfo> getOutBoundTypeDetailedInfo(BigDecimal resultId);
+
+    Integer isOutboundResultMaterial(String onlycode, BigDecimal resultId);
+
+}

+ 7 - 0
src/main/java/com/steerinfo/dil/service/IWmspOutboundResultService.java

@@ -2,6 +2,7 @@ package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspOutboundResult;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
+import com.steerinfo.dil.vo.OutBoundDetailed;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -75,6 +76,12 @@ public interface IWmspOutboundResultService {
     int EqualMaterialsNumber(BigDecimal resultId);
 //    根据orderId判断当前运输订单的状态
     int getOutboundStatus(BigDecimal orderId);
+
+    WmspOutboundResult createOutboundResult(BigDecimal orderId, BigDecimal orderType);
+
+    OutBoundDetailed getInitOutboundScanResultMaterialInfo(BigDecimal resultId);
+
+    int createOutboundScanResult(String subResultMaterial, BigDecimal personnelId, BigDecimal resultId);
     //删除实时库存
     int deleteGridMaterial(String materialOnlyCode);
 }

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

@@ -1,7 +1,7 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspOutboundScanResult;
-import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -26,4 +26,11 @@ public interface IWmspOutboundScanResultService {
     List<Map<String, Object>> getResultMaterial(Integer resultId);
     //通过物资唯一编码找寻物资名称、规格型号、物资唯一编码和物资质检是否合格
     List<Map<String, Object>> getRmsMaterial (String materialOnlyCode);
+
+    List<OutBoundMaterialDetailedInfo> getOutBoundMaterialDetailedInfos(List<String> onlyCodes);
+
+
+    List<String> getOutBoundScanResultOnlyCodes(BigDecimal resultId);
+
+    int getScanCount(String s, BigDecimal resultId);
 }

+ 0 - 4
src/main/java/com/steerinfo/dil/service/IWmspRestackDrivingResultService.java

@@ -1,9 +1,5 @@
 package com.steerinfo.dil.service;
 
-import com.steerinfo.dil.model.WmspRestackDrivingResult;
-import com.steerinfo.framework.service.IBaseService;
-
-import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 

+ 0 - 4
src/main/java/com/steerinfo/dil/service/IWmspRestackMakeMaterialService.java

@@ -1,10 +1,6 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspRestackMakeMaterial;
-import com.steerinfo.dil.model.WmspRestackMakeResult;
-import com.steerinfo.framework.service.IBaseService;
-
-import java.math.BigDecimal;
 
 /**
  * WmspRestackMakeMaterial服务接口:

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

@@ -1,7 +1,6 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.WmspRestackMakeResult;
-import com.steerinfo.framework.service.IBaseService;
 
 import java.math.BigDecimal;
 import java.util.List;

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

@@ -2,7 +2,6 @@ package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.RmsMaterialMapper;
 import com.steerinfo.dil.service.IRmsMaterialService;
-import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -30,4 +29,7 @@ public class RmsMaterialServiceImpl implements IRmsMaterialService {
         return rmsMaterialMapper.getMaterial();
     }
 
+    public String getMaterialCode(BigDecimal materialId) {
+        return rmsMaterialMapper.getMaterialCode(materialId);
+    }
 }

+ 6 - 1
src/main/java/com/steerinfo/dil/service/impl/RmsMaterialSteelServiceImpl.java

@@ -6,7 +6,6 @@ import com.steerinfo.dil.mapper.RmsMaterialMapper;
 import com.steerinfo.dil.mapper.RmsMaterialSteelMapper;
 import com.steerinfo.dil.model.RmsMaterialSteel;
 import com.steerinfo.dil.service.IRmsMaterialSteelService;
-import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.DecompileUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -16,6 +15,7 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -221,4 +221,9 @@ public class RmsMaterialSteelServiceImpl implements IRmsMaterialSteelService {
     public BigDecimal getMaterialSteelId(Map<String, Object> map) {
         return rmsMaterialSteelMapper.selectMaterialSteelId(map);
     }
+
+    @Override
+    public Integer getScanCount(String onlyCode, List<String> onlyCodes) {
+        return rmsMaterialSteelMapper.getScanCount(onlyCode,onlyCodes);
+    }
 }

+ 14 - 3
src/main/java/com/steerinfo/dil/service/impl/RmsPwarehouseGridServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.RmsPwarehouseGridMapper;
+import com.steerinfo.dil.model.RmsMaterial;
 import com.steerinfo.dil.model.RmsPwarehouseGrid;
 import com.steerinfo.dil.service.IRmsPwarehouseGridService;
 import com.steerinfo.dil.util.DataChange;
@@ -31,6 +32,8 @@ public class RmsPwarehouseGridServiceImpl  implements IRmsPwarehouseGridService
     private RmsPwarehouseGridServiceImpl rmsPwarehouseGridService;
     @Autowired
     private RmsStackingServiceImpl rmsStackingService;
+    @Autowired
+    private RmsMaterialServiceImpl rmsMaterialService;
     @Override
     public int insertSelective(RmsPwarehouseGrid rmsPwarehouseGrid) {
         long id;
@@ -62,7 +65,7 @@ public class RmsPwarehouseGridServiceImpl  implements IRmsPwarehouseGridService
     @Override
     public Map<String,Object> getStackingId(Map<String, Object> map){
         //获取入库的物资数量,物资编码
-        Integer materialNum = DataChange.dataToBigDecimal(map.get("materialNum")).intValue();
+        //Integer materialNum = DataChange.dataToBigDecimal(map.get("materialNum")).intValue();
         String materialCode = (String)map.get("materialCode");
         Integer inboundSize = DataChange.dataToBigDecimal(map.get("materialSize")).intValue();
         //获取入库的仓库
@@ -125,10 +128,18 @@ public class RmsPwarehouseGridServiceImpl  implements IRmsPwarehouseGridService
 
 
     @Override
-    public BigDecimal selectGrid(Integer size,BigDecimal warehouseId) {
-
+    public BigDecimal selectGrid(Integer size,BigDecimal warehouseId,BigDecimal materialId) {
         //查询入库垛位信息
         Map<String,Object> stackingMap = rmsStackingService.getStackingToUpdate(size,warehouseId,"1");
+        //创建一个查询条件
+//        Map<String ,Object> stackingResult=new HashMap<>();
+//        stackingResult.put("materialSize",size);
+//        //根据物资实绩ID查询物资编码
+//        String materialCode =rmsMaterialService.getMaterialCode(materialId);
+//        stackingResult.put("materialCode",materialCode);
+//        stackingResult.put("warehouseId",warehouseId);
+        //查询朵唯信息
+       // Map<String,Object> stackingMap=getStackingId(stackingResult);
         //获取入库垛位ID
         BigDecimal ST = (BigDecimal) stackingMap.get("stackingId");
 

+ 0 - 3
src/main/java/com/steerinfo/dil/service/impl/RmsStackingServiceImpl.java

@@ -4,10 +4,7 @@ import com.steerinfo.dil.feign.IMFeign;
 import com.steerinfo.dil.mapper.RmsStackingMapper;
 import com.steerinfo.dil.model.RmsStacking;
 import com.steerinfo.dil.service.IRmsStackingService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;

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

@@ -3,8 +3,6 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.WmsOffSiteLibaryOutboundMapper;
 import com.steerinfo.dil.model.WmsOffSiteLibaryOutbound;
 import com.steerinfo.dil.service.IWmsOffSiteLibaryOutboundService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

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

@@ -3,8 +3,6 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.WmsOffSiteLibraryInboundMapper;
 import com.steerinfo.dil.model.WmsOffSiteLibraryInbound;
 import com.steerinfo.dil.service.IWmsOffSiteLibraryInboundService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

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

@@ -7,8 +7,6 @@ import com.steerinfo.dil.model.WmspRestackMakeResult;
 import com.steerinfo.dil.model.WmspRestackScanResult;
 import com.steerinfo.dil.service.IWmspGridMaterialService;
 import com.steerinfo.dil.util.DataChange;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -141,7 +139,6 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
         wmspGridMaterial.setInsertUsername("admin");
         wmspGridMaterial.setInsertTime(new Date());
         wmspGridMaterial.setUpdateUsername("admin");
-        wmspGridMaterial.setUpdateTime(new Date());
         wmspGridMaterial.setInsertUpdateRemark("无");
         wmspGridMaterial.setStatus(new BigDecimal(2));
         insertWmspGridMaterial(wmspGridMaterial);
@@ -277,8 +274,10 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
         BigDecimal checkId = wmspCheckWarehouseMapper.getMaxId();
         if (checkId==null){
             checkId=new BigDecimal(1);
+        }else{
+            checkId.add(new BigDecimal(1));
         }
-        wmspCheckWarehouse.setCheckId(checkId.add(new BigDecimal(1)));
+        wmspCheckWarehouse.setCheckId(checkId);
         int result = wmspCheckWarehouseMapper.insertSelective(wmspCheckWarehouse);
 
         return result;

+ 0 - 4
src/main/java/com/steerinfo/dil/service/impl/WmspIntransitInventoryServiceImpl.java

@@ -1,14 +1,10 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.WmspIntransitInventoryMapper;
-import com.steerinfo.dil.model.WmspIntransitInventory;
 import com.steerinfo.dil.service.IWmspIntransitInventoryService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 

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

@@ -1,6 +1,5 @@
 package com.steerinfo.dil.service.impl;
 
-import com.netflix.discovery.converters.Auto;
 import com.steerinfo.dil.mapper.WmspInventoryCheckMapper;
 import com.steerinfo.dil.model.WmspInventoryCheck;
 import com.steerinfo.dil.service.IWmspInventoryCheckService;

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

@@ -1,8 +1,6 @@
 package com.steerinfo.dil.service.impl;
 
-import com.steerinfo.dil.mapper.WmspIvboundMakeMaterialMapper;
 import com.steerinfo.dil.service.IWmspIvboundMakeMaterialService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 /**

+ 64 - 0
src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultMaterialServiceImpl.java

@@ -0,0 +1,64 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.WmspOutboundResultMaterialMapper;
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
+import com.steerinfo.dil.vo.OutBoundTypeDetailedInfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * WmspOutboundResultMaterial服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 03:23
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:WmspOutboundResultMaterial服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "wmspOutboundResultMaterialService")
+public class WmspOutboundResultMaterialServiceImpl extends BaseServiceImpl<WmspOutboundResultMaterial, BigDecimal> implements IWmspOutboundResultMaterialService {
+
+    @Autowired
+    private WmspOutboundResultMaterialMapper wmspOutboundResultMaterialMapper;
+    @Autowired
+    CommonServiceImpl commonService;
+
+    @Override
+    protected IBaseMapper<WmspOutboundResultMaterial, BigDecimal> getMapper() {
+        return wmspOutboundResultMaterialMapper;
+    }
+
+    @Override
+    public int insertOutboundMaterial(BigDecimal orderId, List<Map<String, Object>> orderList) {
+        //为集合创建个个主键
+        List<Map<String, Object>> list = orderList.stream().map(item -> {
+            item.put("resultMaterialId", commonService.getSeqCount("seq__WMSP_OUTBOUND_RESUL_TMATRIAL"));
+            return item;
+        }).collect(Collectors.toList());
+        //创建出库类型
+        return wmspOutboundResultMaterialMapper.insertOutboundMaterial(orderId,list,new Date(),"admin");
+    }
+
+    @Override
+    public List<OutBoundTypeDetailedInfo> getOutBoundTypeDetailedInfo(BigDecimal resultId) {
+        return wmspOutboundResultMaterialMapper.getOutBoundTypeDetailedInfo(resultId);
+    }
+
+    @Override
+    public Integer isOutboundResultMaterial(String onlycode, BigDecimal resultId) {
+        return wmspOutboundResultMaterialMapper.isOutboundResultMaterial(onlycode,resultId);
+    }
+}

+ 162 - 2
src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultServiceImpl.java

@@ -1,17 +1,26 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.feign.TmstruckFeign;
+import com.steerinfo.dil.mapper.CommonSeq;
+import com.steerinfo.dil.mapper.WmspInboundScanResultMapper;
 import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
 import com.steerinfo.dil.mapper.WmspOutboundResultMapper;
 import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
 import com.steerinfo.dil.model.WmspOutboundResult;
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
 import com.steerinfo.dil.service.IWmspOutboundResultService;
+import com.steerinfo.dil.vo.OutBoundDetailed;
+import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
+import com.steerinfo.dil.vo.OutBoundTypeDetailedInfo;
 import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
 import java.util.List;
 import java.util.Map;
 
@@ -38,7 +47,14 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
     private WmspOutboundScanResultMapper wmspOutboundScanResultMapper;
     @Autowired
     private WmsInboundResultServiceImpl wmsInboundResultService;
-
+    @Autowired
+    private WmspOutboundResultMaterialServiceImpl wmspOutboundResultMaterialService;
+    @Autowired
+    private WmspOutboundScanResultServiceImpl wmspOutboundScanResultService;
+    @Autowired
+    private WmspInboundScanResultMapper wmspInboundScanResultMapper;
+    @Autowired
+    CommonSeq commonSeq;
     @Autowired
     private TmstruckFeign tmstruckFeign;
 
@@ -232,6 +248,149 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
     }
 
     @Override
+    public WmspOutboundResult createOutboundResult(BigDecimal orderId, BigDecimal orderType) {
+        /**创建出库单实体*/
+        WmspOutboundResult wmspOutboundResult = new WmspOutboundResult();
+        /**使用序列号增加生成主键id*/
+        int seq_wmspoutboundresult = commonSeq.getSeqNumber("seq__WMSP_OUTBOUND_RESULT");
+        /**获取到当前时间*/
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        /**生成出库单编号*/
+        String resultNumber = "XSCK" + sdf.format(new Date());
+        if(seq_wmspoutboundresult < 10){
+            resultNumber += "0000000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 100){
+            resultNumber += "000000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 1000){
+            resultNumber += "00000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 10000){
+            resultNumber += "0000" + seq_wmspoutboundresult;
+        }else  if(seq_wmspoutboundresult < 100000){
+            resultNumber += "000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 1000000){
+            resultNumber += "00" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 10000000){
+            resultNumber += "0" + seq_wmspoutboundresult;
+        }else{
+            resultNumber += seq_wmspoutboundresult;
+        }
+
+        /**运输订单类型判断
+         *    orderType : 1 为普通出库
+         *    orderType : 4 为调拨出库
+         * */
+        String resultOutboundType = "普通出库";
+        if(orderType.intValue() == 4){
+            resultOutboundType = "调拨出库";
+        }
+        /**把出库单主键id添加到出库单实体中*/
+        wmspOutboundResult.setResultId(new BigDecimal(seq_wmspoutboundresult));
+        /**把出库单编号添加到出库单实体中*/
+        wmspOutboundResult.setResultNumber(resultNumber);
+        /**把运输订单主键添加到出库单实体中*/
+        wmspOutboundResult.setBillLadingId(orderId);
+        /**把出库类型添加到出库单实体中*/
+        wmspOutboundResult.setResultOutboundType(resultOutboundType);
+        /**第一次添加为待出库*/
+        wmspOutboundResult.setResultStatus(new BigDecimal(0));
+        //常规字段
+        wmspOutboundResult.setInsertUsername("admin");
+        wmspOutboundResult.setInsertTime(new Date());
+        wmspOutboundResult.setUpdateUsername("admin");
+        wmspOutboundResult.setUpdateTime(new Date());
+        wmspOutboundResult.setInsertUpdateRemark("无");
+        wmspOutboundResult.setDeleted(new BigDecimal(0));
+        //还没装货的物资id的第一条添加到出库单实体中
+        //wmspOutboundResult.setMaterialId(materialId);
+        Integer res =insertSelective(wmspOutboundResult);
+        if (res>0){
+            return wmspOutboundResult;
+        }
+        return null;
+    }
+
+    /**
+     * 通过出库实绩id查询出 出库物资的详情信息
+     * @param resultId
+     * @return
+     */
+    @Override
+    public OutBoundDetailed getInitOutboundScanResultMaterialInfo(BigDecimal resultId) {
+
+        //查询待出库物资类型详情
+        List<OutBoundTypeDetailedInfo> outBoundTypeDetailedInfos= wmspOutboundResultMaterialService.getOutBoundTypeDetailedInfo(resultId);
+        //查询扫码实绩的扫码结构
+        List<String> onlycodes= wmspOutboundScanResultService.getOutBoundScanResultOnlyCodes(resultId);
+        //出库信息展示
+        OutBoundDetailed outBoundDetailed=new OutBoundDetailed();
+        if (onlycodes.size()>0){
+            //查询出已经扫码的物资信息
+            List<OutBoundMaterialDetailedInfo> outBoundMaterialDetailedInfos= wmspOutboundScanResultService.getOutBoundMaterialDetailedInfos(onlycodes);
+            //统计出已经扫码的物资数量
+            for (OutBoundTypeDetailedInfo typeDetailedInfo :outBoundTypeDetailedInfos){
+                int count=0;
+                for (OutBoundMaterialDetailedInfo outBoundMaterialDetailedInfo: outBoundMaterialDetailedInfos){
+                    if (typeDetailedInfo.getMaterialId().equals(outBoundMaterialDetailedInfo.getMaterialId())){
+                        count++;
+                    }
+                }
+                //统计完数量赋值
+                typeDetailedInfo.setNumber(count);
+            }
+            outBoundDetailed.setOutBoundMaterialDetailedInfos(outBoundMaterialDetailedInfos);
+        }
+        outBoundDetailed.setOutBoundTypeDetailedInfos(outBoundTypeDetailedInfos);
+        return outBoundDetailed;
+    }
+
+    @Override
+    public int createOutboundScanResult(String resultMaterial, BigDecimal personnelId, BigDecimal resultId) {
+        //截取扫描结果,得到物资唯一编码
+        String[] split = resultMaterial.split("-");
+        //唯一编码
+        String MaterialOnlyCode = split[7];
+        //通过物资物资唯一编码查询钢材物资表的物资Id
+        BigDecimal SteelMaterialId = getSteelMaterialIdByMaterialOnlyCode(MaterialOnlyCode);
+        //通过出库实绩Id查询物资Id
+        BigDecimal OutboundMaterialId = getOutboundMaterialByResultId(resultId);
+
+        //初始化出库扫描实绩
+        WmspOutboundScanResult wmspOutboundScanResult = new WmspOutboundScanResult();
+
+        //使用序列号增加生成主键id
+        int seq_wmspOutboundScanResult = commonSeq.getSeqNumber("seq__WMSP_OUTBOUND_SCAN_RESULT");
+        //插入主键id
+        wmspOutboundScanResult.setResultId(new BigDecimal(seq_wmspOutboundScanResult));
+        //根据物资id查询相对应的入库实绩ID,并将其赋值给相对应的入库扫描实绩表
+        List<Map<String, Object>> list = wmspInboundScanResultMapper.getInboundResultIdByMaterial(resultMaterial);
+        //默认以获取到的第一个值作为入库实绩Id
+        Map<String, Object> map1 = list.get(0);
+        //如果等于0说明该物资没有录入系统
+        if (list.size() == 0) {
+
+        }
+        wmspOutboundScanResult.setInboundResultId((BigDecimal) map1.get("inboundResultId"));
+        //插入出库实绩ID
+        wmspOutboundScanResult.setOutboundResultId(resultId);
+        //插入装卸工Id
+        wmspOutboundScanResult.setLoadId(personnelId);
+        //插入装卸工扫描吊牌结果
+        wmspOutboundScanResult.setResultMaterial(resultMaterial);
+        //插入装卸工扫描吊牌时间
+        wmspOutboundScanResult.setResultLoadTime(new Date());
+        //插入出库物资数量
+        wmspOutboundScanResult.setOutboundMaterialNumber(new BigDecimal(1));
+        //常规字段
+        wmspOutboundScanResult.setInsertUsername("admin");
+        wmspOutboundScanResult.setInsertTime(new Date());
+        wmspOutboundScanResult.setUpdateUsername("admin");
+        wmspOutboundScanResult.setUpdateTime(new Date());
+        wmspOutboundScanResult.setInsertUpdateRemark("无");
+        //稽核成功,设定扫描实绩稽核结果为成功
+        wmspOutboundScanResult.setResultCheck(new BigDecimal(0));
+        //插入扫描实绩
+        return scanResultInsert(wmspOutboundScanResult);
+    }
     public int deleteGridMaterial(String materialOnlyCode) {
         //获取扫描的物资
        // List<Map<String,Object>> scanList = wmspOutboundScanResultMapper.getResultMaterial(resultId);
@@ -246,6 +405,7 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
             List<Map<String,Object>> listMap  = wmspOutboundScanResultMapper.getMaterialSteelId(tag1[7]);
 
             for(Map<String,Object> map:listMap) {
+
                 BigDecimal materialSteelId = DataChange.dataToBigDecimal(map.get("materialId"));
          /*       if(materialSteelId == null){
                     return -1;
@@ -258,7 +418,7 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
                 wmspSendReceiveService.addOutBoundSendReceive(map1);
                 wmspSendReceiveService.addThisdayInventorySendReceive(map1);*/
                 //将这些物资钢材id进行逻辑删除
-                i += wmspGridMaterialMapper.updateByMaterialId(materialSteelId);
+                i += wmspGridMaterialMapper.updateByMaterialId(materialSteelId,new Date());
             }
 
         return i;

+ 35 - 2
src/main/java/com/steerinfo/dil/service/impl/WmspOutboundScanResultServiceImpl.java

@@ -3,14 +3,14 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
 import com.steerinfo.dil.service.IWmspOutboundScanResultService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * WmspOutboundScanResult服务实现:
@@ -30,6 +30,8 @@ public class WmspOutboundScanResultServiceImpl implements IWmspOutboundScanResul
 
     @Autowired
     private WmspOutboundScanResultMapper wmspOutboundScanResultMapper;
+    @Autowired
+    private RmsMaterialSteelServiceImpl rmsMaterialSteelService;
 
     @Override
     public int insertSelective(WmspOutboundScanResult wmspOutboundScanResult) {
@@ -45,4 +47,35 @@ public class WmspOutboundScanResultServiceImpl implements IWmspOutboundScanResul
     public List<Map<String, Object>> getRmsMaterial(String materialOnlyCode) {
         return wmspOutboundScanResultMapper.getRmsMaterial(materialOnlyCode);
     }
+
+    @Override
+    public List<OutBoundMaterialDetailedInfo> getOutBoundMaterialDetailedInfos(List<String> onlyCodes) {
+        return wmspOutboundScanResultMapper.getOutBoundMaterialDetailedInfos(onlyCodes);
+    }
+
+    @Override
+    public List<String> getOutBoundScanResultOnlyCodes(BigDecimal resultId) {
+        //通过出库单实绩查询已经扫码结果
+        List<String> resultStrs= wmspOutboundScanResultMapper.getResultStrs(resultId);
+        //通过扫码结果获得,唯一编码
+        List<String> onlyCodes = resultStrs.stream().map(resultStr -> {
+            return resultStr.split("-")[7];
+        }).collect(Collectors.toList());
+        return onlyCodes;
+    }
+
+    /**
+     * 查询出onlyCode数据类型的数据
+     * @param onlyCode
+     * @param resultId
+     * @return
+     */
+    @Override
+    public int getScanCount(String onlyCode, BigDecimal resultId) {
+        List<String> onlyCodes=getOutBoundScanResultOnlyCodes(resultId);
+        Integer scanCount= rmsMaterialSteelService.getScanCount(onlyCode,onlyCodes);
+        return scanCount;
+    }
+
+
 }

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

@@ -1,17 +1,12 @@
 package com.steerinfo.dil.service.impl;
 
-import com.baomidou.mybatisplus.extension.api.R;
 import com.steerinfo.dil.mapper.RmsStackingMapper;
 import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
 import com.steerinfo.dil.mapper.WmspRestackDrivingResultMapper;
 import com.steerinfo.dil.mapper.WmspRestackMakeResultMapper;
 import com.steerinfo.dil.model.*;
 import com.steerinfo.dil.service.IWmspRestackDrivingResultService;
-import com.steerinfo.dil.service.IWmspRestackMakeMaterialService;
-import com.steerinfo.dil.service.IWmspRestackScanResultService;
 import com.steerinfo.dil.util.DataChange;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 0 - 4
src/main/java/com/steerinfo/dil/service/impl/WmspRestackMakeMaterialServiceImpl.java

@@ -3,13 +3,9 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.WmspRestackMakeMaterialMapper;
 import com.steerinfo.dil.model.WmspRestackMakeMaterial;
 import com.steerinfo.dil.service.IWmspRestackMakeMaterialService;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.math.BigDecimal;
-
 /**
  * WmspRestackMakeMaterial服务实现:
  * @author generator

+ 0 - 3
src/main/java/com/steerinfo/dil/service/impl/WmspRestackMakeResultServiceImpl.java

@@ -3,12 +3,9 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.*;
 import com.steerinfo.dil.model.*;
 import com.steerinfo.dil.service.IWmspRestackMakeResultService;
-import com.steerinfo.dil.service.IWmspRestackScanResultService;
 import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.model.WmspGridMaterial;
 import com.steerinfo.dil.util.IDUtils;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;

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

@@ -11,7 +11,6 @@ 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;
 

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

@@ -5,8 +5,6 @@ import com.steerinfo.dil.mapper.WmspRestackScanResultMapper;
 import com.steerinfo.dil.model.WmspRestackScanResult;
 import com.steerinfo.dil.service.IWmspRestackScanResultService;
 import com.steerinfo.dil.util.DataChange;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;

+ 10 - 0
src/main/java/com/steerinfo/dil/vo/OutBoundDetailed.java

@@ -0,0 +1,10 @@
+package com.steerinfo.dil.vo;
+
+import lombok.Data;
+
+import java.util.List;
+@Data
+public class OutBoundDetailed {
+    private List<OutBoundTypeDetailedInfo> outBoundTypeDetailedInfos;
+    private List<OutBoundMaterialDetailedInfo> outBoundMaterialDetailedInfos;
+}

+ 16 - 0
src/main/java/com/steerinfo/dil/vo/OutBoundMaterialDetailedInfo.java

@@ -0,0 +1,16 @@
+package com.steerinfo.dil.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+@Data
+public class OutBoundMaterialDetailedInfo {
+
+    private String onlyCode;
+    private String materialId;
+    private String materialCode;
+    private String materialName;
+    private String materialSpecification;
+    private String materialModel;
+    private BigDecimal materialTheoreticalWeight;
+}

+ 13 - 0
src/main/java/com/steerinfo/dil/vo/OutBoundTypeDetailedInfo.java

@@ -0,0 +1,13 @@
+package com.steerinfo.dil.vo;
+
+import lombok.Data;
+
+@Data
+public class OutBoundTypeDetailedInfo {
+    private String materialId;
+    private String materialName;
+    private String materialSpecification;
+    private String materialModel;
+    private Integer number;
+    private Integer scanCodeNumber;
+}

+ 5 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsMaterialMapper.xml

@@ -447,6 +447,11 @@ select rm.material_id "id",
     from rms_material rm
     where rm.material_code = #{materialCode}
   </select>
+  <select id="getMaterialCode" resultType="java.lang.String">
+    select  rm.MATERIAL_CODE "materialCode" from RMS_MATERIAL_STEEL rms
+    left join rms_material rm on rms.material_id=rm.material_id
+    where  rms.MATERIAL_STEEL_ID =#{materialId}
+  </select>
 
 
 </mapper>

+ 8 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsMaterialSteelMapper.xml

@@ -499,4 +499,12 @@
       from rms_material_steel rms
         where rms.material_only_code=#{materialOnlyCode}
   </select>
+  <select id="getScanCount" resultType="java.lang.Integer">
+    select count(*) from rms_material_steel
+    where material_id=(select material_id from rms_material_steel where material_only_code=#{onlyCode})
+    and material_only_code in
+    <foreach collection="onlyCodes" item="item" open="(" close=")" separator=",">
+      #{item}
+    </foreach>
+  </select>
 </mapper>

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

@@ -514,7 +514,7 @@
         set (rs.stacking_material_number, rs.stacking_remain_number)=
                 (select rs.stacking_material_number + 1,
                         rs.stacking_remain_number - 1
-                 from rms_stackingrs
+                 from rms_stacking rs
                  where rs.stacking_id = #{stackId})
         where rs.stacking_id = #{stackId}
     </update>

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

@@ -737,8 +737,8 @@
   </select>
 
 
-  <update id="updateByMaterialId" parameterType="java.math.BigDecimal">
-    update WMSP_GRID_MATERIAL WGM set WGM.DELETED = 1
+  <update id="updateByMaterialId" >
+    update WMSP_GRID_MATERIAL WGM set WGM.DELETED = 1,UPDATE_TIME = #{updateTime}
     where WGM.MATERIAL_ID = #{materialSteelId}
   </update>
   

+ 15 - 13
src/main/resources/com/steerinfo/dil/mapper/WmspOutboundResultMapper.xml

@@ -689,8 +689,10 @@
 
   <!--  根据运输订单id查询还没装货的物资id-->
   <select id="getMaterial" parameterType="Integer" resultType="java.util.Map">
-    SELECT
-      TLR.MATERIAL_ID "materialId",
+     SELECT
+      oom.MATERIAL_ID "materialId",
+      oom.ORDER_MATERIAL_NUMBER "materialNumber",
+      oom.ORDER_MATERIAL_WEIGHT "materialWeight",
       RM.MATERIAL_CODE "materialCode",
       RM.MATERIAL_NAME "materialName",
       RM.MATERIAL_SPECIFICATION "materialSpecification",
@@ -698,20 +700,19 @@
       RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight"
     FROM
       OMSTRUCK_ORDER OO
-        LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON OO.ORDER_ID = TTR.ORDER_ID
-        LEFT JOIN TMSTRUCK_LOAD_RESULT TLR ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
-        LEFT JOIN RMS_MATERIAL RM ON TLR.MATERIAL_ID = RM.MATERIAL_ID
+        LEFT JOIN Omstruck_Order_Material oom ON OO.ORDER_ID = oom.ORDER_ID
+        LEFT JOIN RMS_MATERIAL RM ON oom.material_id = RM.MATERIAL_ID
     WHERE
       OO.ORDER_ID = #{orderId}
-      AND TLR.RESULT_LOAD_END_TIME IS NULL
-    ORDER BY
-      LOADING_SEQUENCE ASC
+--       AND TLR.RESULT_LOAD_END_TIME IS NULL
+--     ORDER BY
+--       LOADING_SEQUENCE ASC
   </select>
 
   <select id="ExistWmspOutboundResult" parameterType="java.util.Map" resultType="int">
     select count(*)
     from WMSP_OUTBOUND_RESULT w_outbound
-    where w_outbound.DELETED=0  and w_outbound.BILL_LADING_ID=#{orderId} and w_outbound.MATERIAL_ID=#{materialId}
+    where w_outbound.DELETED=0  and w_outbound.BILL_LADING_ID=#{orderId}
   </select>
 
   <select id="getOutBoundDetailedInfo" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
@@ -719,10 +720,11 @@
            w_outbound.RESULT_NUMBER "resultNumber",
            w_outbound.RESULT_OUTBOUND_TYPE "resultOutboundType",
            r_capacity.CAPACITY_NUMBER "capacityNumber",
-           r_unit.UNIT_OF_MEASURE_NAME "unitOfMeasureName",
-           t_load.RESULT_LOAD_END_TIME "resultLoadEndTime",
-           order_material.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
-           w_outbound.INSERT_UPDATE_REMARK "insertUpdateRemark"
+           o_order.ORDER_NUMBER "orderNumber"
+--            r_unit.UNIT_OF_MEASURE_NAME "unitOfMeasureName",
+--            t_load.RESULT_LOAD_END_TIME "resultLoadEndTime",
+--            order_material.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
+--            w_outbound.INSERT_UPDATE_REMARK "insertUpdateRemark"
     from WMSP_OUTBOUND_RESULT w_outbound
            left join OMSTRUCK_ORDER o_order
                      on w_outbound.BILL_LADING_ID=o_order.ORDER_ID

+ 404 - 0
src/main/resources/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.xml

@@ -0,0 +1,404 @@
+<?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.WmspOutboundResultMaterialMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    <id column="RESULT_MATERIAL_ID" jdbcType="DECIMAL" property="resultMaterialId" />
+    <result column="OUTBOUND_RESULT_ID" jdbcType="DECIMAL" property="outboundResultId" />
+    <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="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
+    <result column="MATERIAL_WEIGHT" jdbcType="DECIMAL" property="materialWeight" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_MATERIAL_ID, OUTBOUND_RESULT_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, MATERIAL_ID,MATERIAL_NUMBER,MATERIAL_WEIGHT
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_MATERIAL_ID, t.OUTBOUND_RESULT_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.MATERIAL_ID,t.MATERIAL_NUMBER,t.MATERIAL_WEIGHT
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM WMSP_OUTBOUND_RESULT_MATERIAL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM WMSP_OUTBOUND_RESULT_MATERIAL t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultMaterialId != null">
+        and RESULT_MATERIAL_ID = #{resultMaterialId}
+      </if>
+      <if test="outboundResultId != null">
+        and OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="materialWeight != null">
+        and MATERIAL_WEIGHT = #{materialWeight}
+      </if>
+      
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultMaterialId != null">
+        and RESULT_MATERIAL_ID = #{resultMaterialId}
+      </if>
+      <if test="outboundResultId != null">
+        and OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="materialWeight != null">
+        and MATERIAL_WEIGHT = #{materialWeight}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where 1!=1 
+      <if test="outboundResultId != null">
+        or OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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="deleted != null">
+        or DELETED = #{deleted}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+      <if test="materialNumber != null">
+        or MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="materialWeight != null">
+    or MATERIAL_WEIGHT = #{materialWeight}
+  </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL (RESULT_MATERIAL_ID, OUTBOUND_RESULT_ID, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, 
+      MATERIAL_ID,MATERIAL_NUMBER,MATERIAL_WEIGHT)
+    values (#{resultMaterialId,jdbcType=DECIMAL}, #{outboundResultId,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, 
+      #{materialId,jdbcType=DECIMAL},#{materialNumber,jdbcType=DECIMAL},#{materialWeight,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultMaterialId != null">
+        RESULT_MATERIAL_ID,
+      </if>
+      <if test="outboundResultId != null">
+        OUTBOUND_RESULT_ID,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER,
+      </if>
+      <if test="materialWeight != null">
+        MATERIAL_WEIGHT,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultMaterialId != null">
+        #{resultMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="outboundResultId != null">
+        #{outboundResultId,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="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="materialWeight != null">
+        #{materialWeight,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    update WMSP_OUTBOUND_RESULT_MATERIAL
+    set OUTBOUND_RESULT_ID = #{outboundResultId,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},
+      DELETED = #{deleted,jdbcType=DECIMAL},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      MATERIAL_WEIGHT = #{materialWeight,jdbcType=DECIMAL}
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    update WMSP_OUTBOUND_RESULT_MATERIAL
+    <set>
+      <if test="outboundResultId != null">
+        OUTBOUND_RESULT_ID = #{outboundResultId,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="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="materialWeight != null">
+        MATERIAL_WEIGHT = #{materialWeight,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where RESULT_MATERIAL_ID = #{resultMaterialId,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_OUTBOUND_RESULT_MATERIAL 
+      (RESULT_MATERIAL_ID, 
+      OUTBOUND_RESULT_ID, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      DELETED, MATERIAL_ID,MATERIAL_NUMBER,MATERIAL_WEIGHT)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultMaterialId,jdbcType=DECIMAL}, 
+      #{item.outboundResultId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+      #{item.deleted,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL} , #{item.materialNumber,jdbcType=DECIMAL} , #{item.materialWeight,jdbcType=DECIMAL} from dual
+   </foreach> )
+  </insert>
+  
+  <update id="batchUpdate" parameterType="java.util.List">
+     update WMSP_OUTBOUND_RESULT_MATERIAL
+     set
+       RESULT_MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.resultMaterialId,jdbcType=DECIMAL}
+       </foreach>
+       ,OUTBOUND_RESULT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.outboundResultId,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+      ,MATERIAL_NUMBER=
+      <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+        when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
+      </foreach>
+      ,MATERIAL_WEIGHT=
+      <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+        when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.materialWeight,jdbcType=DECIMAL}
+      </foreach>
+     where RESULT_MATERIAL_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.resultMaterialId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where RESULT_MATERIAL_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <insert id="insertOutboundMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL(RESULT_MATERIAL_ID,OUTBOUND_RESULT_ID,MATERIAL_ID,INSERT_USERNAME,INSERT_TIME,MATERIAL_NUMBER)
+    <foreach collection="orderList" index="index" item="item" separator="union all" >
+      select
+      #{item.resultMaterialId},#{orderId},#{item.materialId},#{user},#{nowDate},#{item.materialNumber} from dual
+    </foreach>
+  </insert>
+  
+<!--  <id column="RESULT_MATERIAL_ID" jdbcType="DECIMAL" property="resultMaterialId" />-->
+<!--  <result column="OUTBOUND_RESULT_ID" jdbcType="DECIMAL" property="outboundResultId" />-->
+<!--  <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="DELETED" jdbcType="DECIMAL" property="deleted" />-->
+<!--  <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />-->
+<!--  <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />-->
+<!--  <result column="MATERIAL_WEIGHT" jdbcType="DECIMAL" property="materialWeight" />-->
+  
+  <select id="getOutBoundTypeDetailedInfo" resultType="com.steerinfo.dil.vo.OutBoundTypeDetailedInfo">
+     select
+      RM.material_Id "materialId",
+      RM.MATERIAL_CODE "materialCode",
+      RM.MATERIAL_NAME "materialName",
+      RM.MATERIAL_SPECIFICATION "materialSpecification",
+      RM.MATERIAL_MODEL "materialModel",
+      worm.MATERIAL_NUMBER "number"
+    FROM
+      WMSP_OUTBOUND_RESULT_MATERIAL worm
+        LEFT JOIN RMS_MATERIAL RM ON worm.material_id = RM.MATERIAL_ID
+    where worm.OUTBOUND_RESULT_ID=#{resultId}
+  </select>
+  <select id="isOutboundResultMaterial" resultType="java.lang.Integer">
+     select material_number
+     from  wmsp_outbound_result_material
+     where material_id in ( select material_id from rms_material_steel  where  material_only_code=#{onlycode}) and OUTBOUND_RESULT_ID=#{resultId}
+  </select>
+</mapper>

+ 20 - 0
src/main/resources/com/steerinfo/dil/mapper/WmspOutboundScanResultMapper.xml

@@ -445,6 +445,26 @@
     ON gcwz.MATERIAL_ID = wz.MATERIAL_ID
     WHERE gcwz.MATERIAL_ONLY_CODE = #{materialOnlyCode}
   </select>
+  
+  <select id="getOutBoundMaterialDetailedInfos"  resultType="com.steerinfo.dil.vo.OutBoundMaterialDetailedInfo">
+     select
+      rms.MATERIAL_ONLY_CODE "onlyCode",
+      RM.material_Id "materialId",
+      RM.MATERIAL_CODE "materialCode",
+      RM.MATERIAL_NAME "materialName",
+      RM.MATERIAL_SPECIFICATION "materialSpecification",
+      RM.MATERIAL_MODEL "materialModel"
+      from RMS_MATERIAL_STEEL rms
+      left join RMS_MATERIAL RM on rms.material_id = RM.MATERIAL_ID
+      where
+     MATERIAL_ONLY_CODE in
+     <foreach collection="onlyCodes" item="item" open="(" close=")" separator=",">
+       #{item}
+     </foreach>
+  </select>
+  <select id="getResultStrs" resultType="java.lang.String">
+     select RESULT_MATERIAL "resultMaterial" from  WMSP_OUTBOUND_SCAN_RESULT where OUTBOUND_RESULT_ID=#{resultId}
+  </select>
 
   <select id="getMaterialSteelId" resultType="java.util.LinkedHashMap" parameterType="String">
     SELECT