|  | @@ -15,6 +15,7 @@ import com.jeeplus.core.excel.ExcelOptions;
 | 
	
		
			
				|  |  |  import com.jeeplus.core.excel.annotation.ExportMode;
 | 
	
		
			
				|  |  |  import com.jeeplus.core.query.QueryWrapperGenerator;
 | 
	
		
			
				|  |  |  import com.jeeplus.sys.service.UserService;
 | 
	
		
			
				|  |  | +import com.jeeplus.sys.service.dto.RoleDTO;
 | 
	
		
			
				|  |  |  import com.jeeplus.sys.service.dto.UserDTO;
 | 
	
		
			
				|  |  |  import com.jeeplus.sys.utils.UserUtils;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
	
		
			
				|  | @@ -106,9 +107,33 @@ public class GwFlowController {
 | 
	
		
			
				|  |  |  		//新增或编辑表单保存
 | 
	
		
			
				|  |  |  		gwFlowService.saveOrUpdate (gwFlowWrapper.toEntity (gwFlowDTO));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +		//取当前角色,不是办公室管理员\办公室主任的时候两个角色的时候,处理完自己的需要新增一条待办人到办公室主任
 | 
	
		
			
				|  |  | +		UserDTO userDTO=UserUtils.getCurrentUserDTO();
 | 
	
		
			
				|  |  | +		List<RoleDTO> list=userDTO.getRoleDTOList();
 | 
	
		
			
				|  |  | +		boolean isadmin=false;
 | 
	
		
			
				|  |  | +		for (RoleDTO aa:list) {
 | 
	
		
			
				|  |  | +			if(aa.getName().equals("租户管理员")||aa.getName().equals("管理员")||aa.getName().equals("办公室管理员")||aa.getName().equals("办公室主任")){
 | 
	
		
			
				|  |  | +				isadmin=true;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(isadmin){
 | 
	
		
			
				|  |  | +			//默认一条待办
 | 
	
		
			
				|  |  | +			GwFlowDTO a1=new GwFlowDTO();
 | 
	
		
			
				|  |  | +			a1.setGwId(gwFlowDTO.getGwId());
 | 
	
		
			
				|  |  | +			a1.setState("1");
 | 
	
		
			
				|  |  | +			UserDTO userDTO2=userService.getUserByLoginName("bgszr","10000");//////////////这边后期需要指定某个办公室主任
 | 
	
		
			
				|  |  | +			a1.setCreateBy(userDTO);
 | 
	
		
			
				|  |  | +			a1.setUpdateBy(userDTO2);
 | 
	
		
			
				|  |  | +			a1.setCreateTruename(userDTO.getName());
 | 
	
		
			
				|  |  | +			a1.setNextTruename(userDTO2.getName());
 | 
	
		
			
				|  |  | +			a1.setNextUser(userDTO2.getId());
 | 
	
		
			
				|  |  | +			a1.setWhich("1");
 | 
	
		
			
				|  |  | +			gwFlowService.saveOrUpdate (gwFlowWrapper.toEntity (a1));
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		//此时是办公室主任选人后的操作
 | 
	
		
			
				|  |  |  		if(gwFlowDTO.getNext()!=null&&gwFlowDTO.getNext().equals("1")){
 | 
	
		
			
				|  |  | -			UserDTO userDTO= UserUtils.getCurrentUserDTO();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  			//有选择领导的时候新增
 | 
	
		
			
				|  |  |  			if(gwFlowDTO.getNextLeadUser()!=null&&gwFlowDTO.getNextLeadUser().contains(",")) {
 | 
	
		
			
				|  |  |  			   String [] NextLeadUsers=gwFlowDTO.getNextLeadUser().split(",");
 |