| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -21,6 +21,7 @@ import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -233,6 +234,8 @@ public class DepartmentServiceImpl implements DepartmentService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            customerStaffDepartmentEntity.setCustomerId(customerIdDTO.getCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            customerStaffDepartmentEntity.setUserId(userId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            customerStaffDepartmentDao.insert(customerStaffDepartmentEntity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //2021.8.24 sun 部门添加工作人员时删除工作人员的缓存信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerStaffRedis.delStaffInfoFormCache(addDepartmentStaffFormDTO.getCustomerId(), userId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        customerStaffDepartmentDao.updateDepartmentStaffCount(addDepartmentStaffFormDTO.getSelectedList().size(),addDepartmentStaffFormDTO.getDepartmentId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new Result(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -266,6 +269,9 @@ public class DepartmentServiceImpl implements DepartmentService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    ? 0 : dept.getTotalUser() - NumConstant.ONE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dept2Update.setUpdatedBy(departmentStaffInfoFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            customerDepartmentService.update(dept2Update); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //2021.8.24 sun 部门移除工作人员时删除工作人员的缓存信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerStaffRedis.delStaffInfoFormCache(departmentStaffInfoFormDTO.getCustomerId(), departmentStaffInfoFormDTO.getStaffId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new Result(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        log.warn(ModuleConstant.DEPT_INFO_NOT_FOUND); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |