Browse Source

Merge remote-tracking branch 'origin/dev_tripreport' into dev_tripreport

master
yinzuomei 3 years ago
parent
commit
a9365299d7
  1. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java
  2. 30
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  3. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PageTripReportFormDTO.java

@ -54,4 +54,10 @@ public class PageTripReportFormDTO extends PageFormDTO implements Serializable {
* 查看详情时此列有值
*/
private String id;
/**
* 7天内旅居史情况字典表(sojourn_history)磐石
*/
private String sojournHistory;
}

30
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -353,6 +353,36 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
PageInfo<IcTripReportRecordDTO> result = PageHelper.startPage(formDTO.getPageNo(),
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectMyReported(formDTO.getUserId(),
formDTO.getCustomerId(),idCard));
if(CollectionUtils.isEmpty(result.getList())){
return new ArrayList<>();
}
//获取需要的字典表数据
//交通方式
Result<Map<String, String>> trafficTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRAFFIC_TYPE.getCode());
Map<String, String> tMap = trafficTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//7天内旅居史情况
Result<Map<String, String>> sojournHistoryMap = adminOpenFeignClient.dictMap(DictTypeEnum.SOJOURN_HISTORY.getCode());
Map<String, String> sMap = sojournHistoryMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//隔离状态
Result<Map<String, String>> isolateTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.ISOLATE_TYPE.getCode());
Map<String, String> iMap = isolateTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
//行程记录类型
Result<Map<String, String>> tripDataTypeMap = adminOpenFeignClient.dictMap(DictTypeEnum.TRIP_DATA_TYPE.getCode());
Map<String, String> tdMap = tripDataTypeMap.getData().entrySet().stream().collect(Collectors.toMap(entry -> entry.getValue(), entry -> entry.getKey()));
for (IcTripReportRecordDTO dto : result.getList()) {
//字典表字段、是否字段赋值对应中国字
dto.setTrafficTypeName(tMap.containsKey(dto.getTrafficType()) ? tMap.get(dto.getTrafficType()) : "无");
dto.setVaccineNumName(StringUtils.isNotBlank(dto.getVaccineNum()) ? dto.getVaccineNum().concat("针") : "");
dto.setIsNatRecordName("1".equals(dto.getIsNatRecord()) ? "是" : "否");
dto.setNatOutcomeName("1".equals(dto.getIsNatRecord()) ? "阳性" : "阴性");
dto.setSojournHistoryName(sMap.containsKey(dto.getSojournHistory()) ? sMap.get(dto.getSojournHistory()) : "无");
dto.setIsolateTypeName(iMap.containsKey(dto.getIsolateType()) ? iMap.get(dto.getIsolateType()) : "无");
dto.setIsArriveCheckName("1".equals(dto.getIsArriveCheck()) ? "是" : "否");
dto.setIsArriveName("1".equals(dto.getIsArrive()) ? "是" : "否");
dto.setTripDataTypeName(tdMap.containsKey(dto.getTripDataType()) ? tdMap.get(dto.getTripDataType()) : "无");
}
return result.getList();
}

3
epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

@ -62,6 +62,9 @@
<if test='null != id and "" != id'>
AND r.id=#{id}
</if>
<if test='null != sojournHistory and "" != sojournHistory'>
AND r.sojourn_history = #{sojournHistory}
</if>
ORDER BY
r.ARRIVE_DATE DESC
</select>

Loading…
Cancel
Save