| 
					
				 | 
			
			
				@@ -1,26 +1,20 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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.mapper.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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.util.DataChange; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -392,34 +386,23 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return scanResultInsert(wmspOutboundScanResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int deleteGridMaterial(String materialOnlyCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //获取扫描的物资 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-       // List<Map<String,Object>> scanList = wmspOutboundScanResultMapper.getResultMaterial(resultId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //根据扫描的吊牌数据查询钢材物资id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      /*  List<Map<String,Object>> listMap = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for(Map<String,Object> scanMaterial:scanList){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String materialOnlyCode = scanMaterial.get("RESULT_MATERIAL").toString();*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            int i=0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String[] tag1 = materialOnlyCode.split("\\-"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<Map<String,Object>> listMap  = wmspOutboundScanResultMapper.getMaterialSteelId(tag1[7]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for(Map<String,Object> map:listMap) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           Map<String,Object> map  = wmspOutboundScanResultMapper.getMaterialSteelId(tag1[7]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(map == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return -2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 BigDecimal materialSteelId = DataChange.dataToBigDecimal(map.get("materialId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         /*       if(materialSteelId == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                Date date = (Date) map.get("updateTime"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //如果修改时间为空,就表示该钢材还未出库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(date==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //将这些物资钢材id进行逻辑删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    i += wmspGridMaterialMapper.updateByMaterialId(materialSteelId,new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //表示该钢材已出库,请勿重复扫码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return -1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //根据物资钢材id查询仓库id和物资大类id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                BigDecimal materialId = wmspSendReceiveService.getMaterialId(materialSteelId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Map<String,Object> map1 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                map1.put("materialId",materialId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                map1.put("warehouseId",3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                wmspSendReceiveService.addOutBoundSendReceive(map1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                wmspSendReceiveService.addThisdayInventorySendReceive(map1);*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                //将这些物资钢材id进行逻辑删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                i += wmspGridMaterialMapper.updateByMaterialId(materialSteelId,new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return i; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |