|  |  | @ -60,10 +60,7 @@ import org.springframework.web.context.request.ServletRequestAttributes; | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.annotation.Resource; |  |  |  | import javax.annotation.Resource; | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.servlet.http.HttpServletRequest; |  |  |  | import javax.servlet.http.HttpServletRequest; | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.validation.Valid; |  |  |  | import javax.validation.Valid; | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.ArrayList; |  |  |  | import java.util.*; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Date; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.List; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import java.util.Map; |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import java.util.stream.Collectors; |  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | @RestController |  |  |  | @RestController | 
			
		
	
	
		
		
			
				
					|  |  | @ -99,7 +96,6 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     CompanyProductRelevanceService companyProductRelevanceService; |  |  |  |     CompanyProductRelevanceService companyProductRelevanceService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     SystemParamConfigService systemParamConfigService; |  |  |  |     SystemParamConfigService systemParamConfigService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     Logger logger = LoggerFactory.getLogger(StockOrderController.class); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     StockOrderService stockOrderService; |  |  |  |     StockOrderService stockOrderService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
	
		
		
			
				
					|  |  | @ -282,11 +278,6 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     @AuthRuleAnnotation("") |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
		
			
				
					
					|  |  |  |     @GetMapping("warehouse/inout/submitOrderWeb") |  |  |  |     @GetMapping("warehouse/inout/submitOrderWeb") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse submitOrderWeb(AddOrderRequest orderEntity) { |  |  |  |     public BaseResponse submitOrderWeb(AddOrderRequest orderEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  | //        if (null != orderEntity) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            if (StrUtil.isBlank(orderEntity.getInvWarehouseCode())) {
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //                return ResultVOUtils.error(500, "分仓未选择");
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //            }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //        }
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderService.updateOrderStatus(orderEntity.getOrderId(), ConstantStatus.ORDER_STATUS_PROCESS); |  |  |  |         orderService.updateOrderStatus(orderEntity.getOrderId(), ConstantStatus.ORDER_STATUS_PROCESS); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return saveOrderWeb(orderEntity); |  |  |  |         return saveOrderWeb(orderEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
	
		
		
			
				
					|  |  | @ -321,6 +312,30 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     @AuthRuleAnnotation("") |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
		
			
				
					
					|  |  |  |     @PostMapping("warehouse/inout/saveTempCode") |  |  |  |     @PostMapping("warehouse/inout/saveTempCode") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse saveCode(@RequestBody WarehouseEntity warehouseEntity) { |  |  |  |     public BaseResponse saveCode(@RequestBody WarehouseEntity warehouseEntity) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (StrUtil.isNotEmpty(warehouseEntity.getSerialNo()) && warehouseEntity.getSerialNo().length() > 20) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return ResultVOUtils.error(500, "无效条码!序列号超出最大范围"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (StrUtil.isNotEmpty(warehouseEntity.getBatchNo()) && warehouseEntity.getBatchNo().length() > 20) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return ResultVOUtils.error(500, "无效条码!批次号超出最大范围"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (StrUtil.isEmpty(warehouseEntity.getSerialNo()) && StrUtil.isEmpty(warehouseEntity.getBatchNo())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             return ResultVOUtils.error(500, "批次号不能为空!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (StrUtil.isNotEmpty(warehouseEntity.getSerialNo())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             List<WarehouseEntity> warehouseEntityList = codesTempService.findByOrderId(warehouseEntity.getOrderId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             for (WarehouseEntity object : warehouseEntityList) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (object.getId() != warehouseEntity.getId() && object.getCode().equals(warehouseEntity.getCode()) && StrUtil.nullToEmpty(object.getCode()).equals(warehouseEntity.getSerialNo())) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     return ResultVOUtils.error(500, "条码重复!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean b = codesTempService.update(warehouseEntity); |  |  |  |         boolean b = codesTempService.update(warehouseEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (b) |  |  |  |         if (b) | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.success("修改成功"); |  |  |  |             return ResultVOUtils.success("修改成功"); | 
			
		
	
	
		
		
			
				
					|  |  | @ -373,11 +388,7 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success(); |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | //
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
	
		
		
			
				
					|  |  | @ -584,6 +595,9 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         AddCodeResult addCodeResult = new AddCodeResult(); |  |  |  |         AddCodeResult addCodeResult = new AddCodeResult(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (addOrderRequest.getAction() == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             addOrderRequest.setAction(addOrderRequest.getBillType()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(addOrderRequest.getAction()); |  |  |  |         BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(addOrderRequest.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String code = addOrderRequest.getCode(); |  |  |  |         String code = addOrderRequest.getCode(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (StringUtils.isBlank(code)) return ResultVOUtils.error(ResultEnum.DATA_ERROR); |  |  |  |         if (StringUtils.isBlank(code)) return ResultVOUtils.error(ResultEnum.DATA_ERROR); | 
			
		
	
	
		
		
			
				
					|  |  | @ -909,7 +923,7 @@ public class WareHouseController { | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getUdi()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) { |  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getUdi()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 continue; |  |  |  |                 continue; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getBatchNo()).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()))) { |  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getBatchNo()).toUpperCase(Locale.ROOT).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()).toUpperCase(Locale.ROOT))) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 continue; |  |  |  |                 continue; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) { |  |  |  |             if (!StrUtil.emptyIfNull(originUdiEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |