|  | @ -39,6 +39,7 @@ import com.epmet.feign.GovOrgOpenFeignClient; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.PatrolRoutineWorkService; |  |  | import com.epmet.service.PatrolRoutineWorkService; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.PatrolRoutineWorkTypeService; |  |  | import com.epmet.service.PatrolRoutineWorkTypeService; | 
			
		
	
		
		
			
				
					|  |  | import lombok.extern.slf4j.Slf4j; |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.beans.factory.annotation.Autowired; |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.stereotype.Service; |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.transaction.annotation.Transactional; |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
	
		
		
			
				
					|  | @ -76,6 +77,11 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineW | 
			
		
	
		
		
			
				
					|  |  |     @Transactional(rollbackFor = Exception.class) |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public void add(PatrolRoutineWorkFormDTO formDTO) { |  |  |     public void add(PatrolRoutineWorkFormDTO formDTO) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         if (formDTO.getWorkTypeList().toString().contains("02") | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 && (formDTO.getIsKeyPeopleLocate() == null || StringUtils.isBlank(formDTO.getKeyPeopleStatus()))){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             log.warn("add patrolRoutineWork fail,param is error,param:{}", JSON.toJSONString(formDTO)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |         PatrolRoutineWorkEntity entity = ConvertUtils.sourceToTarget(formDTO, PatrolRoutineWorkEntity.class); |  |  |         PatrolRoutineWorkEntity entity = ConvertUtils.sourceToTarget(formDTO, PatrolRoutineWorkEntity.class); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         CustomerGridFormDTO gridFormDTO = new CustomerGridFormDTO(); |  |  |         CustomerGridFormDTO gridFormDTO = new CustomerGridFormDTO(); | 
			
		
	
	
		
		
			
				
					|  | @ -110,7 +116,7 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineW | 
			
		
	
		
		
			
				
					|  |  |             typeEntity.setRoutineWorkId(entity.getId()); |  |  |             typeEntity.setRoutineWorkId(entity.getId()); | 
			
		
	
		
		
			
				
					|  |  |             typeEntity.setWorkTypeCode(code); |  |  |             typeEntity.setWorkTypeCode(code); | 
			
		
	
		
		
			
				
					|  |  |             StringBuilder pids = pidsMap.get(code); |  |  |             StringBuilder pids = pidsMap.get(code); | 
			
		
	
		
		
			
				
					
					|  |  |             typeEntity.setAllPCode(pids.length() == 0 ? NumConstant.ZERO_STR : pids.toString()); |  |  |             typeEntity.setAllPCode(pids.length() == NumConstant.ZERO ? NumConstant.ZERO_STR : pids.toString()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |             workTypeList.add(typeEntity); |  |  |             workTypeList.add(typeEntity); | 
			
		
	
		
		
			
				
					|  |  |         }); |  |  |         }); | 
			
		
	
		
		
			
				
					|  |  |         patrolRoutineWorkTypeService.insertBatch(workTypeList); |  |  |         patrolRoutineWorkTypeService.insertBatch(workTypeList); | 
			
		
	
	
		
		
			
				
					|  | @ -131,8 +137,8 @@ public class PatrolRoutineWorkServiceImpl extends BaseServiceImpl<PatrolRoutineW | 
			
		
	
		
		
			
				
					|  |  |         StringBuilder pidSb = result.get(pid); |  |  |         StringBuilder pidSb = result.get(pid); | 
			
		
	
		
		
			
				
					|  |  |         if (pidSb == null) { |  |  |         if (pidSb == null) { | 
			
		
	
		
		
			
				
					|  |  |             pidSb = new StringBuilder(); |  |  |             pidSb = new StringBuilder(); | 
			
		
	
		
		
			
				
					
					|  |  |         } else if (pidSb.indexOf(pid) == -1) { |  |  |         } else if (pidSb.indexOf(pid) == NumConstant.ONE_NEG) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |             if (pidSb.length() > 0) { |  |  |             if (pidSb.length() > NumConstant.ZERO) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |                 pidSb.append(StrConstant.COLON); |  |  |                 pidSb.append(StrConstant.COLON); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             pidSb.append(pid); |  |  |             pidSb.append(pid); | 
			
		
	
	
		
		
			
				
					|  | 
 |