Browse Source

Merge remote-tracking branch 'origin/dev_ic_mp' into develop

dev
yinzuomei 4 years ago
parent
commit
ca9eb64891
  1. 32
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  2. 17
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

32
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -771,16 +771,6 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName));
}
//查询字典表
Result<Map<String, String>> reportTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_REPORT_TYPE.getCode());
Map<String,String> reportTypeMap=reportTypeRes.success()&& MapUtils.isNotEmpty(reportTypeRes.getData())?reportTypeRes.getData():new HashMap<>();
Result<Map<String, String>> statusRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_STATUS.getCode());
Map<String,String> statusMap=statusRes.success()&& MapUtils.isNotEmpty(statusRes.getData())?statusRes.getData():new HashMap<>();
Result<Map<String, String>> serviceTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_SERVICE_TYPE.getCode());
Map<String,String> serviceTypeMap=serviceTypeRes.success()&& MapUtils.isNotEmpty(serviceTypeRes.getData())?serviceTypeRes.getData():new HashMap<>();
for(DemandRecResultDTO res:list){
if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) {
res.setGridName(gridInfoMap.get(res.getGridId()).getGridName());
@ -794,11 +784,27 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
res.setServiceName(userInfoMap.get(res.getServerId()));
}
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
res.setReportTypeName(reportTypeMap.containsKey(res.getReportType())?reportTypeMap.get(res.getReportType()):StrConstant.EPMETY_STR);
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR);
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType())?res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")"):StrConstant.EPMETY_STR);
switch (res.getServiceType())
{
case UserDemandConstant.PARTY_UNIT:
res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)"));
break;
case UserDemandConstant.SOCIAL_ORG:
res.setServiceShowName(res.getServiceName().concat("(社会组织)"));
break;
case UserDemandConstant.COMMUNITY_ORG:
res.setServiceShowName(res.getServiceName().concat("(社区自组织)"));
break;
case UserDemandConstant.VOLUNTEER:
res.setServiceShowName(res.getServiceName().concat("(志愿者)"));
break;
default:
res.setServiceShowName(res.getServiceName());
log.warn("serviceType 错误");
break;
}
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()));
}
}

17
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -233,10 +233,27 @@
r.PARENT_CODE as parentCode,
r.CONTENT,
r.REPORT_TYPE as reportType,
(
case when r.REPORT_TYPE='community' then '社区帮办'
when r.REPORT_TYPE='building_caption' then '楼长帮办'
when r.REPORT_TYPE='party' then '党员帮办'
when r.REPORT_TYPE='self_help' then '自身上报'
else ''
end
)as reportTypeName,
r.REPORT_TIME as reportTime,
r.REPORT_USER_NAME as reportUserName,
r.REPORT_USER_MOBILE as reportUserMobile,
r.`STATUS` as status,
(
case when r.`STATUS`='pending' then '待处理'
when r.`STATUS`='canceled' then '已取消'
when r.`STATUS`='assigned' then '已派单'
when r.`STATUS`='have_order' then '已接单'
when r.`STATUS`='finished' then '已完成'
else ''
end
)as statusName,
r.DEMAND_USER_ID as demandUserId,
r.DEMAND_USER_NAME as demandUserName,
r.DEMAND_USER_MOBILE as demandUserMobile,

Loading…
Cancel
Save