Browse Source

22、疫苗接种关注名单、核酸检测关注名单列表增加所属房屋一列,根据身份证号显示该身份证号所属房屋,没有的不显示;增加查询条件所属房屋

release
sunyuchao 3 years ago
parent
commit
270f49dc85
  1. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
  2. 45
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  3. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java
  4. 23
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  5. 38
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java

@ -54,6 +54,26 @@ public class VaccinationListFormDTO extends PageFormDTO implements Serializable
* 备注核酸检测关注名单此字段可填可不填
*/
private String remark;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 单元id
*/
private String unitId;
/**
* 所属家庭Id
*/
private String homeId;
private String userId;

45
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java

@ -55,6 +55,51 @@ public class VaccinationListResultDTO implements Serializable {
*/
private String lastInformTime;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属小区名称
*/
private String villageName;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 所属楼宇名称
*/
private String buildName;
/**
* 单元id
*/
private String unitId;
/**
* 单元名称
*/
private String unitName;
/**
* 所属家庭Id
*/
private String homeId;
/**
* 所属家庭名称
*/
private String homeName;
/**
* 小区名+楼栋名+单元名+房屋名
*/
private String allName;
public VaccinationListResultDTO() {
this.vaccinationCount = NumConstant.ZERO;
this.name = "";

3
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java

@ -32,4 +32,7 @@ public class VaccinationExportExcel {
@Excel(name = "最近一次通知时间",width = 20)
private String lastInformTime;
@Excel(name = "所属房屋",width = 40)
private String allName;
}

23
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcEpidemicSpecialAttentionDao;
import com.epmet.dto.IcEpidemicSpecialAttentionDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.VaccinationListResultDTO;
import com.epmet.entity.IcEpidemicSpecialAttentionEntity;
@ -30,6 +31,7 @@ import com.epmet.enums.ChannelEnum;
import com.epmet.excel.ImportEpidemicSpecialAttention;
import com.epmet.excel.error.EpidemicSpecialAttentionErrorModel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OssFeignClient;
import com.epmet.service.IcEpidemicSpecialAttentionService;
import com.epmet.service.IcNoticeService;
@ -53,6 +55,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
@ -71,6 +74,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
private OssFeignClient ossFeignClient;
@Autowired
private IcNoticeService noticeService;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Override
public PageData<IcEpidemicSpecialAttentionDTO> page(Map<String, Object> params) {
@ -160,10 +165,28 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
result.setTotal(list.size());
}
}
//需求调整 列表和导出增加所属房屋(小区+楼栋+单元+房间)一列值 sun
Map<String, HouseInfoDTO> houseInfoMap = new HashMap<>();
//查询房屋信息
if (result.getList().size() > NumConstant.ZERO) {
Set<String> houseIds = result.getList().stream().filter(l -> StringUtils.isNotBlank(l.getHomeId())).map(m -> m.getHomeId()).collect(Collectors.toSet());
Result<List<HouseInfoDTO>> houseInfoRes = govOrgOpenFeignClient.queryListHouseInfo(houseIds, formDTO.getCustomerId());
List<HouseInfoDTO> houseInfoDTOList = houseInfoRes.success() && !CollectionUtils.isEmpty(houseInfoRes.getData()) ? houseInfoRes.getData() : new ArrayList<>();
houseInfoMap = houseInfoDTOList.stream().collect(Collectors.toMap(HouseInfoDTO::getHomeId, Function.identity()));
}
int i = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
for (VaccinationListResultDTO v : result.getList()) {
i += 1;
v.setSort(i);
if (null != houseInfoMap && houseInfoMap.containsKey(v.getHomeId())) {
v.setVillageName(houseInfoMap.get(v.getHomeId()).getNeighborHoodName());
v.setBuildName(houseInfoMap.get(v.getHomeId()).getBuildingName());
v.setUnitName(houseInfoMap.get(v.getHomeId()).getUnitName());
v.setHomeName(houseInfoMap.get(v.getHomeId()).getDoorName());
v.setAllName(houseInfoMap.get(v.getHomeId()).getAllName());
}
}
return result;
}

38
epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

@ -26,13 +26,18 @@
a.ID_CARD,
a.reason,
a.REMARK,
b.VILLAGE_ID,
b.BUILD_ID,
b.UNIT_ID,
b.HOME_ID,
IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime,
IFNULL(v.vaccinationCount,0) AS vaccinationCount
FROM ic_epidemic_special_attention a
LEFT JOIN ic_resi_user b ON a.id_card = b.id_card
LEFT JOIN (SELECT id_card ,count(1) AS vaccinationCount FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD) v ON (v.ID_CARD = a.ID_CARD)
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
@ -42,6 +47,18 @@
<if test='null != mobile and "" != mobile'>
AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
<if test='null != villageId and "" != villageId'>
AND b.village_id = #{villageId}
</if>
<if test='null != buildId and "" != buildId'>
AND b.build_id = #{buildId}
</if>
<if test='null != unitId and "" != unitId'>
AND b.unit_id = #{unitId}
</if>
<if test='null != homeId and "" != homeId'>
AND b.home_id = #{homeId}
</if>
<if test=' null != vaccinationCount'>
HAVING vaccinationCount = #{vaccinationCount}
</if>
@ -56,11 +73,16 @@
a.ID_CARD,
a.REMARK,
a.REASON,
b.VILLAGE_ID,
b.BUILD_ID,
b.UNIT_ID,
b.HOME_ID,
IFNULL((SELECT DATE_FORMAT(CREATED_TIME,'%Y-%m-%d %H:%i:%s') FROM ic_notice WHERE DEL_FLAG = '0' AND ORIGIN = #{attentionType} AND ID_CARD = a.ID_CARD ORDER BY CREATED_TIME DESC LIMIT 1),'') AS lastInformTime
FROM ic_epidemic_special_attention a
LEFT JOIN ic_resi_user b ON a.id_card = b.id_card
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
@ -76,6 +98,18 @@
<if test='null != remark and "" != remark'>
AND a.REMARK LIKE CONCAT('%',#{remark},'%')
</if>
<if test='null != villageId and "" != villageId'>
AND b.village_id = #{villageId}
</if>
<if test='null != buildId and "" != buildId'>
AND b.build_id = #{buildId}
</if>
<if test='null != unitId and "" != unitId'>
AND b.unit_id = #{unitId}
</if>
<if test='null != homeId and "" != homeId'>
AND b.home_id = #{homeId}
</if>
ORDER BY a.CREATED_TIME DESC
</select>

Loading…
Cancel
Save