|
|
@ -6,6 +6,8 @@ import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
|
|
|
import com.epmet.commons.tools.enums.OrgTypeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
@ -59,7 +61,12 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
} |
|
|
|
String orgIdPath = queryOrgIdPath(formDTO.getCustomerId(), formDTO.getStaffId(), formDTO.getOrgId(), formDTO.getOrgType()); |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
|
List<LingshanOfficeHallServiceRecordDTO> resultList = baseDao.pageList(formDTO.getCustomerId(), orgIdPath, formDTO.getCategoryCode(), formDTO.getContent(), formDTO.getSatisfication(), formDTO.getStartDate(), formDTO.getEndDate(), formDTO.getStatus()); |
|
|
|
List<LingshanOfficeHallServiceRecordDTO> resultList = baseDao.pageList(formDTO.getCustomerId(), orgIdPath, |
|
|
|
formDTO.getCategoryCode(), formDTO.getContent(), |
|
|
|
formDTO.getSatisfication(), |
|
|
|
formDTO.getApplicantStartDate(), formDTO.getApplicantEndDate(), |
|
|
|
formDTO.getCloseStartDate(), formDTO.getCloseEndDate(), |
|
|
|
formDTO.getStatus()); |
|
|
|
if (CollectionUtils.isNotEmpty(resultList)) { |
|
|
|
Result<Map<String, String>> categoryRes = adminOpenFeignClient.dictMap(DictTypeEnum.LINGSHAN_OFFICE_HALL_SERVICE_RECORD.getCode()); |
|
|
|
resultList.forEach(dto -> { |
|
|
@ -79,12 +86,42 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
@Override |
|
|
|
public LingshanOfficeHallServiceRecordDTO get(String id) { |
|
|
|
LingshanOfficeHallServiceRecordEntity entity = baseDao.selectById(id); |
|
|
|
return ConvertUtils.sourceToTarget(entity, LingshanOfficeHallServiceRecordDTO.class); |
|
|
|
if (null == entity) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"办事大厅服务记录不存在","服务记录不存在"); |
|
|
|
} |
|
|
|
LingshanOfficeHallServiceRecordDTO resultDto=ConvertUtils.sourceToTarget(entity, LingshanOfficeHallServiceRecordDTO.class); |
|
|
|
Result<Map<String, String>> categoryRes = adminOpenFeignClient.dictMap(DictTypeEnum.LINGSHAN_OFFICE_HALL_SERVICE_RECORD.getCode()); |
|
|
|
resultDto.setCategoryName(MapUtils.isNotEmpty(categoryRes.getData()) ? categoryRes.getData().get(resultDto.getCategoryCode()) : StrConstant.EPMETY_STR); |
|
|
|
//未办结:0;已办结:1
|
|
|
|
if(NumConstant.ZERO_STR.equals(resultDto.getStatus())){ |
|
|
|
resultDto.setStatusName("未办结"); |
|
|
|
}else if(NumConstant.ONE_STR.equals(resultDto.getStatus())){ |
|
|
|
resultDto.setStatusName("已办结"); |
|
|
|
} |
|
|
|
if(null!=resultDto.getSatisfication()){ |
|
|
|
// 满意度评价。-1不满意,0基本满意,1非常满意
|
|
|
|
switch(resultDto.getSatisfication()) |
|
|
|
{ |
|
|
|
case -1: |
|
|
|
resultDto.setSatisficationName("不满意"); |
|
|
|
break; |
|
|
|
case 0: |
|
|
|
resultDto.setSatisficationName("基本满意"); |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
resultDto.setSatisficationName("非常满意"); |
|
|
|
break; |
|
|
|
default: |
|
|
|
resultDto.setSatisficationName(StrConstant.EPMETY_STR); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return resultDto; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void save(LingshanOfficeHallServiceRecordDTO dto) { |
|
|
|
public String save(LingshanOfficeHallServiceRecordDTO dto) { |
|
|
|
LingshanOfficeHallServiceRecordEntity entity = ConvertUtils.sourceToTarget(dto, LingshanOfficeHallServiceRecordEntity.class); |
|
|
|
entity.setStatus(NumConstant.ZERO_STR); |
|
|
|
if (StringUtils.isNotBlank(dto.getApplicantOrgId())) { |
|
|
@ -95,7 +132,7 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
|
|
|
|
// 本条数据属于网格
|
|
|
|
entity.setOrgId(gridInfoCache.getId()); |
|
|
|
entity.setOrgType(dto.getOrgType()); |
|
|
|
entity.setOrgType(dto.getApplicantOrgType()); |
|
|
|
entity.setOrgIdPath(entity.getApplicantOrgIdPath()); |
|
|
|
} else if (OrgTypeEnum.AGENCY.getCode().equals(dto.getApplicantOrgType())) { |
|
|
|
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(dto.getApplicantOrgId()); |
|
|
@ -103,7 +140,7 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
entity.setApplicantOrgName(agencyInfoCache.getOrganizationName()); |
|
|
|
// 本条数据属于组织
|
|
|
|
entity.setOrgId(agencyInfoCache.getId()); |
|
|
|
entity.setOrgType(dto.getOrgType()); |
|
|
|
entity.setOrgType(dto.getApplicantOrgType()); |
|
|
|
entity.setOrgIdPath(entity.getApplicantOrgIdPath()); |
|
|
|
} |
|
|
|
} else { |
|
|
@ -113,6 +150,7 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
entity.setOrgIdPath(CustomerOrgRedis.getOrgIdPath(entity.getOrgId(), entity.getOrgType())); |
|
|
|
} |
|
|
|
insert(entity); |
|
|
|
return entity.getId(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -126,7 +164,7 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
entity.setApplicantOrgName(gridInfoCache.getGridNamePath()); |
|
|
|
// 本条数据属于网格
|
|
|
|
entity.setOrgId(gridInfoCache.getId()); |
|
|
|
entity.setOrgType(dto.getOrgType()); |
|
|
|
entity.setOrgType(dto.getApplicantOrgType()); |
|
|
|
entity.setOrgIdPath(entity.getApplicantOrgIdPath()); |
|
|
|
} else if (OrgTypeEnum.AGENCY.getCode().equals(dto.getApplicantOrgType())) { |
|
|
|
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(dto.getApplicantOrgId()); |
|
|
@ -134,7 +172,7 @@ public class LingshanOfficeHallServiceRecordServiceImpl extends BaseServiceImpl< |
|
|
|
entity.setApplicantOrgName(agencyInfoCache.getOrganizationName()); |
|
|
|
// 本条数据属于组织
|
|
|
|
entity.setOrgId(agencyInfoCache.getId()); |
|
|
|
entity.setOrgType(dto.getOrgType()); |
|
|
|
entity.setOrgType(dto.getApplicantOrgType()); |
|
|
|
entity.setOrgIdPath(entity.getApplicantOrgIdPath()); |
|
|
|
} |
|
|
|
} else { |
|
|
|