Browse Source

列表和详情需要返回一级分类编码和一级分类名称

master
yinzuomei 4 years ago
parent
commit
7efe46fa04
  1. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java
  2. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  3. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java

@ -22,7 +22,8 @@ public class DemandRecResultDTO implements Serializable {
private String categoryCode;
private String parentCode;
private String categoryName;
private String firstCategoryCode;
private String firstCategoryName;
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help

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

@ -263,7 +263,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) {
res.setCategoryName(dictMap.get(res.getCategoryCode()));
}
res.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(), res.getFirstCategoryCode()));
if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) {
res.setServiceName(userInfoMap.get(res.getServerId()));
}
@ -503,6 +503,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
res.setGridName(gridInfoRes.success() && null != gridInfoRes.getData() ? gridInfoRes.getData().getGridNamePath() : StrConstant.EPMETY_STR);
res.setCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(), res.getCategoryCode()));
res.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),res.getFirstCategoryCode()));
if (UserDemandConstant.VOLUNTEER.equals(res.getServiceType())) {
// 如果服务方是志愿者,需要查询小程序端的志愿者姓名
List<String> userIdList = Arrays.asList(res.getServerId());

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

@ -70,7 +70,12 @@
s.SERVICE_END_TIME as serviceEndTime,
IFNULL(s.FINISH_DESC,'') as finishDesc,
'' AS serviceShowName,
s.id as serviceId
s.id as serviceId,
(
case when r.PARENT_CODE !='0' then r.PARENT_CODE
ELSE R.CATEGORY_CODE
END
) as firstCategoryCode
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )
@ -169,7 +174,12 @@
s.SERVICE_END_TIME as serviceEndTime,
IFNULL(s.FINISH_DESC,'') as finishDesc,
'' AS serviceShowName,
s.id as serviceId
s.id as serviceId,
(
case when r.PARENT_CODE !='0' then r.PARENT_CODE
ELSE R.CATEGORY_CODE
END
) as firstCategoryCode
FROM
ic_user_demand_rec r
left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' )

Loading…
Cancel
Save