| 
					
				 | 
			
			
				@@ -6,10 +6,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.usky.common.core.exception.BusinessException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.common.core.util.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.common.security.utils.SecurityUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.fire.domain.PatrolInspectionAttendance; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.usky.fire.domain.PatrolInspectionPersonnel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.fire.mapper.PatrolInspectionAttendanceMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.usky.fire.mapper.PatrolInspectionPersonnelMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.fire.service.PatrolInspectionAttendanceService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.common.mybatis.core.AbstractCrudService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.usky.fire.service.PatrolInspectionPersonnelService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,6 +47,9 @@ public class PatrolInspectionAttendanceServiceImpl extends AbstractCrudService<P 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private PatrolInspectionPersonnelService patrolInspectionPersonnelService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PatrolInspectionPersonnelMapper patrolInspectionPersonnelMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public IPage<Map<String, Object>> pageList(Integer pageNum, Integer pageSize, String operateCode, String operator, LocalDateTime startTime, LocalDateTime endTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         IPage<PatrolInspectionAttendance> page = new Page<>(pageNum, pageSize); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -100,6 +106,12 @@ public class PatrolInspectionAttendanceServiceImpl extends AbstractCrudService<P 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void add(PatrolInspectionAttendance patrolInspectionAttendance) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LambdaQueryWrapper<PatrolInspectionPersonnel> wrapper = Wrappers.lambdaQuery(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        wrapper.eq(PatrolInspectionPersonnel::getUserId,SecurityUtils.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<PatrolInspectionPersonnel> personnelList = patrolInspectionPersonnelMapper.selectList(wrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (personnelList.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BusinessException("您不是巡检人员,不可进行此操作"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         patrolInspectionAttendance.setTenantId(SecurityUtils.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         patrolInspectionAttendance.setOperator(SecurityUtils.getUsername()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         patrolInspectionAttendance.setOperatorId(SecurityUtils.getUserId()); 
			 |