| 
					
				 | 
			
			
				@@ -6,10 +6,12 @@ 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; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.math.BigDecimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.Date; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,6 +44,8 @@ public class WmspRestackMakeResultServiceImpl  implements IWmspRestackMakeResult 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private WmspGridMaterialMapper wmspGridMaterialMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private WmspRestackScanResultServiceImpl wmspRestackScanResultService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private WmspRestackMakeTypeResultServiceImpl wmspRestackMakeTypeResultService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public List<Map<String, Object>> selectRestackMakeResultList(Map<String, Object> mapval) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return wmspRestackMakeResultMapper.selectRestackMakeResultList(mapval); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -259,4 +263,61 @@ public class WmspRestackMakeResultServiceImpl  implements IWmspRestackMakeResult 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return wmspRestackMakeResultMapper.selectRestackForPc(map); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * //创建倒垛单和倒垛单类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param keeperId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param resultStackNumber 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param afterStackingId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param afterWarehouseId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param afterBeforeStackingId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param resultRemark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param maps 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public WmspRestackMakeResult createRestackMakeResult( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal keeperId, String resultStackNumber, BigDecimal afterStackingId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              BigDecimal afterWarehouseId, BigDecimal afterBeforeStackingId, String resultRemark, List<Map<String, Object>> maps) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //初始化倒垛单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WmspRestackMakeResult wmspRestackMakeResult=new WmspRestackMakeResult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //获得序号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        BigDecimal makeresultid =IDUtils.createIDYMDHMS( wmspRestackMakeResultMapper.selectMaxId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //主键赋值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setResultId(makeresultid); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛单编号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setResultStackNumber(resultStackNumber); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛后垛位id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setAfterStackingId(afterStackingId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛日期 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setResultMovelistTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //库管员ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setKeeperId(keeperId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //创建人 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setInsertTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setInsertUsername(keeperId.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //删除状态:0为未删除,1删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setDeleted(new BigDecimal(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //下发状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setDistributionstatus(new BigDecimal(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛后仓库id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setAfterWarehouseId(afterWarehouseId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛完成状态倒垛完成状态(0:未完成;1:已完成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setResultStatus(new BigDecimal((0))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛单备注 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setResultRemark(resultRemark); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //倒垛前的垛位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setAfterBeforeStackingId(afterBeforeStackingId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //首先创建倒垛类型,再创建倒垛单 makeresultid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Integer totalCount= wmspRestackMakeTypeResultService.createMakeTypeList(makeresultid,maps); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //添加总是 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResult.setQuantity(new BigDecimal(totalCount)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wmspRestackMakeResultMapper.insertSelective(wmspRestackMakeResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return wmspRestackMakeResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |