| 
						
						
							
								
							
						
						
					 | 
					@ -12,6 +12,7 @@ import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.dao.CustomerAgencyDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.CustomerGridDao; | 
					 | 
					 | 
					import com.epmet.dao.CustomerGridDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dao.IcWorkLogDao; | 
					 | 
					 | 
					import com.epmet.dao.IcWorkLogDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.CustomerStaffDTO; | 
					 | 
					 | 
					import com.epmet.dto.CustomerStaffDTO; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -19,6 +20,8 @@ import com.epmet.dto.IcWorkLogDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.IcWorkLogFileDTO; | 
					 | 
					 | 
					import com.epmet.dto.IcWorkLogFileDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.CustomerGridFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.CustomerGridFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.GridDetailResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.GridDetailResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.entity.CustomerAgencyEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.entity.CustomerGridEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.IcWorkLogEntity; | 
					 | 
					 | 
					import com.epmet.entity.IcWorkLogEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.entity.IcWorkLogFileEntity; | 
					 | 
					 | 
					import com.epmet.entity.IcWorkLogFileEntity; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.feign.EpmetAdminOpenFeignClient; | 
					 | 
					 | 
					import com.epmet.feign.EpmetAdminOpenFeignClient; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -64,6 +67,9 @@ public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLo | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Resource | 
					 | 
					 | 
					    @Resource | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private CustomerGridDao customerGridDao; | 
					 | 
					 | 
					    private CustomerGridDao customerGridDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Resource | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private CustomerAgencyDao customerAgencyDao; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PageData<IcWorkLogDTO> page(Map<String, Object> params) { | 
					 | 
					 | 
					    public PageData<IcWorkLogDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -110,6 +116,11 @@ public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLo | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public IcWorkLogDTO get(String id) { | 
					 | 
					 | 
					    public IcWorkLogDTO get(String id) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcWorkLogEntity entity = baseDao.selectById(id); | 
					 | 
					 | 
					        IcWorkLogEntity entity = baseDao.selectById(id); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcWorkLogDTO dto = ConvertUtils.sourceToTarget(entity, IcWorkLogDTO.class); | 
					 | 
					 | 
					        IcWorkLogDTO dto = ConvertUtils.sourceToTarget(entity, IcWorkLogDTO.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(entity.getGridId())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            CustomerGridEntity grid = customerGridDao.selectById(entity.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setGridName(grid.getGridName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Map<String, Object> params = new HashMap<>(2); | 
					 | 
					 | 
					        Map<String, Object> params = new HashMap<>(2); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        params.put("logId", id); | 
					 | 
					 | 
					        params.put("logId", id); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcWorkLogFileDTO> files = icWorkLogFileService.list(params); | 
					 | 
					 | 
					        List<IcWorkLogFileDTO> files = icWorkLogFileService.list(params); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -132,14 +143,9 @@ public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLo | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setCreatedUser(staffInfo.getData().getRealName()); | 
					 | 
					 | 
					            dto.setCreatedUser(staffInfo.getData().getRealName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setMobile(staffInfo.getData().getMobile()); | 
					 | 
					 | 
					            dto.setMobile(staffInfo.getData().getMobile()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        // 查询网格信息
 | 
					 | 
					 | 
					        // 组织机构处理
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); | 
					 | 
					 | 
					        orgHandle(dto); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        customerGridFormDTO.setGridId(dto.getGridId()); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        GridDetailResultDTO gridDetailResultDTO = customerGridDao.griddetail(customerGridFormDTO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (gridDetailResultDTO != null) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setAgencyId(gridDetailResultDTO.getAgencyId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setPids(gridDetailResultDTO.getPIds()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); | 
					 | 
					 | 
					        IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        insert(entity); | 
					 | 
					 | 
					        insert(entity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -150,14 +156,9 @@ public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLo | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void update(IcWorkLogDTO dto) { | 
					 | 
					 | 
					    public void update(IcWorkLogDTO dto) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        // 查询网格信息
 | 
					 | 
					 | 
					        // 组织机构处理
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); | 
					 | 
					 | 
					        orgHandle(dto); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        customerGridFormDTO.setGridId(dto.getGridId()); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        GridDetailResultDTO gridDetailResultDTO = customerGridDao.griddetail(customerGridFormDTO); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (gridDetailResultDTO != null) { | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setAgencyId(gridDetailResultDTO.getAgencyId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            dto.setPids(gridDetailResultDTO.getPIds()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); | 
					 | 
					 | 
					        IcWorkLogEntity entity = ConvertUtils.sourceToTarget(dto, IcWorkLogEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        updateById(entity); | 
					 | 
					 | 
					        updateById(entity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -195,4 +196,31 @@ public class IcWorkLogServiceImpl extends BaseServiceImpl<IcWorkLogDao, IcWorkLo | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * 组织机构处理 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param dto | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @author zhy | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @date 2022/8/12 17:30 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private void orgHandle(IcWorkLogDTO dto) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (StringUtils.isNotBlank(dto.getGridId())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            // 查询网格信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            customerGridFormDTO.setGridId(dto.getGridId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            GridDetailResultDTO gridDetailResultDTO = customerGridDao.griddetail(customerGridFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (gridDetailResultDTO != null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                dto.setAgencyId(gridDetailResultDTO.getAgencyId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                dto.setPids(gridDetailResultDTO.getPIds()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            CustomerAgencyEntity agency = customerAgencyDao.getAgencyByUserId(loginUserUtil.getLoginUserId(), loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (agency != null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                dto.setAgencyId(agency.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                dto.setPids(agency.getPids()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} |