|  |  | @ -88,7 +88,7 @@ public class ThrDeptController { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @PostMapping("/spms/thrsys/warehouse/edit") |  |  |  |     @PostMapping("/spms/thrsys/warehouse/edit") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse edit(@RequestBody @Valid ThrDeptEntity thrDeptEntity, |  |  |  |     public BaseResponse edit(@RequestBody @Valid ThrDeptEntity thrDeptEntity, | 
			
		
	
		
		
			
				
					
					|  |  |  |                              BindingResult bindingResult) { |  |  |  |                              BindingResult bindingResult,FilterThrSubInvWarehouseRequest filterThrSubInvWarehouseRequest) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (bindingResult.hasErrors()) { |  |  |  |         if (bindingResult.hasErrors()) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -96,6 +96,16 @@ public class ThrDeptController { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (thrDeptEntity.getId() == null) { |  |  |  |         if (thrDeptEntity.getId() == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         String id = Integer.toString(thrDeptEntity.getId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         ThrDeptEntity thrDeptEntity1 = thrDeptService.selectById(id); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         //查询该部门下的仓库
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         filterThrSubInvWarehouseRequest.setParentId(thrDeptEntity1.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         List<ThrInvWarehouseEntity> thrDept = thrInvWarehouseService.filterThrInvWarehouse(filterThrSubInvWarehouseRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         for (ThrInvWarehouseEntity thrInvWarehouseEntity : thrDept) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             thrInvWarehouseEntity.setParentId(thrDeptEntity.getCode()); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             //修改仓库
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             thrInvWarehouseService.updateThrInvWarehouse(thrInvWarehouseEntity); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         thrDeptEntity.setPid(null); // 不能修改父级 pid
 |  |  |  |         thrDeptEntity.setPid(null); // 不能修改父级 pid
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         thrDeptEntity.setUpdateTime(new Date()); |  |  |  |         thrDeptEntity.setUpdateTime(new Date()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         boolean b = thrDeptService.updateInvWarehouse(thrDeptEntity); |  |  |  |         boolean b = thrDeptService.updateInvWarehouse(thrDeptEntity); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |