Browse Source

页面上展示的接种信息,同样加到导出的表格里。

feature/yujt_vim
zhangyuan 4 years ago
parent
commit
ae5a50bf61
  1. 5
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java
  2. 2
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java
  3. 22
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java
  4. 3
      epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java
  5. 12
      epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml

5
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/controller/EpidemicUserInfoController.java

@ -40,6 +40,7 @@ public class EpidemicUserInfoController {
@GetMapping("page") @GetMapping("page")
public Result<PageData<EpidemicRecordListDTO>> page(@RequestParam Map<String, Object> params) { public Result<PageData<EpidemicRecordListDTO>> page(@RequestParam Map<String, Object> params) {
// 按人员往返时间倒序排列
PageData<EpidemicRecordListDTO> page = epidemicUserInfoService.getPageList(params); PageData<EpidemicRecordListDTO> page = epidemicUserInfoService.getPageList(params);
return new Result<PageData<EpidemicRecordListDTO>>().ok(page); return new Result<PageData<EpidemicRecordListDTO>>().ok(page);
@ -82,10 +83,10 @@ public class EpidemicUserInfoController {
@LogOperation("导出") @LogOperation("导出")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<EpidemicRecordListDTO> list = epidemicUserInfoService.getList(params); List<EpidemicRecordListDTO> list = epidemicUserInfoService.getList(params);
ExcelUtils.exportExcelToTarget(response, null, list, EpidecmicUserNewExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, EpidecmicUserNewExcel.class);
} }
/** /**
* @return io.pingyin.common.utils.Result<io.pingyin.common.page.PageData < io.pingyin.modules.epidemic.dto.result.EpidemicPageResultDTO>> * @return io.pingyin.common.utils.Result<io.pingyin.common.page.PageData < io.pingyin.modules.epidemic.dto.result.EpidemicPageResultDTO>>
* @describe: 接种信息列表 * @describe: 接种信息列表
@ -95,11 +96,11 @@ public class EpidemicUserInfoController {
*/ */
@GetMapping("getEpidemicPage") @GetMapping("getEpidemicPage")
public Result<PageData<EpidemicPageResultDTO>> getEpidemicPage(@RequestParam Map<String, Object> params) { public Result<PageData<EpidemicPageResultDTO>> getEpidemicPage(@RequestParam Map<String, Object> params) {
// 按人员录入时间倒序排列
PageData<EpidemicPageResultDTO> page = epidemicUserInfoService.getEpidemicPage(params); PageData<EpidemicPageResultDTO> page = epidemicUserInfoService.getEpidemicPage(params);
return new Result<PageData<EpidemicPageResultDTO>>().ok(page); return new Result<PageData<EpidemicPageResultDTO>>().ok(page);
} }
@GetMapping("getinfo/{id}") @GetMapping("getinfo/{id}")
public Result<VaccinationInfoResultDTO> getinfo(@PathVariable("id") Long id) { public Result<VaccinationInfoResultDTO> getinfo(@PathVariable("id") Long id) {
VaccinationInfoResultDTO data = epidemicUserInfoService.getInfo(id); VaccinationInfoResultDTO data = epidemicUserInfoService.getInfo(id);

2
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/excel/EpidecmicUserNewExcel.java

@ -112,5 +112,7 @@ public class EpidecmicUserNewExcel{
private String destinationAddressName; private String destinationAddressName;
@Excel(name = "拟去往目的地详细地址") @Excel(name = "拟去往目的地详细地址")
private String destinationAddressDetail; private String destinationAddressDetail;
@Excel(name = "是否接种",replace = { "未接种_0", "接种中_1", "接种完成_2"})
private Integer vaccinationState;
} }

22
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java

@ -78,22 +78,6 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
@Override @Override
public PageData<EpidemicRecordListDTO> getPageList(Map<String, Object> params) { public PageData<EpidemicRecordListDTO> getPageList(Map<String, Object> params) {
// 查询项的年龄段和公司处理为list,用于sql查询,没有改查询条件则删除key,防止sql报错
if (params.containsKey("age")) {
if (StringUtils.isNotBlank(params.get("age").toString())) {
params.put("age", new ArrayList<>(Arrays.asList(params.get("age").toString().split(","))));
} else {
params.put("age", null);
}
}
if (params.containsKey("company")) {
if (StringUtils.isNotBlank(params.get("company").toString())) {
params.put("company", new ArrayList<>(Arrays.asList(params.get("company").toString().split(","))));
} else {
params.put("company", null);
}
}
IPage<EpidemicRecordListDTO> page = getPage(params); IPage<EpidemicRecordListDTO> page = getPage(params);
List<EpidemicRecordListDTO> list = baseDao.getEpidemicUserRecordList(params); List<EpidemicRecordListDTO> list = baseDao.getEpidemicUserRecordList(params);
for (EpidemicRecordListDTO eru : list) { for (EpidemicRecordListDTO eru : list) {
@ -383,9 +367,9 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl<EpidemicUserInf
@Override @Override
public List<EpidemicRecordListDTO> getList(Map<String, Object> params) { public List<EpidemicRecordListDTO> getList(Map<String, Object> params) {
// params.put("deptIdList", SecurityUser.getUser().getDeptIdList()); // params.put("deptIdList", SecurityUser.getUser().getDeptIdList());
params.put("age", new ArrayList<>()); // params.put("age", new ArrayList<>());
params.put("company", new ArrayList<>()); // params.put("company", new ArrayList<>());
// for (EpidemicRecordListDTO eru : list) { // for (EpidemicRecordListDTO eru : list) {
// eru.setIdCard(idEncrypt(eru.getIdCard())); // eru.setIdCard(idEncrypt(eru.getIdCard()));
// eru.setMobile(mobileEncrypt(eru.getMobile())); // eru.setMobile(mobileEncrypt(eru.getMobile()));
// eru.setUserName(nameDesensitization(eru.getUserName())); // eru.setUserName(nameDesensitization(eru.getUserName()));

3
epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/vim/excel/VaccinationInfoExcel.java

@ -65,5 +65,6 @@ public class VaccinationInfoExcel {
private Date updatedTime; private Date updatedTime;
@Excel(name = "创建人姓名") @Excel(name = "创建人姓名")
private String creatorName; private String creatorName;
@Excel(name = "是否接种",replace = { "未接种_0", "接种中_1", "接种完成_2"})
private Integer vaccinationState;
} }

12
epdc-cloud-vim-yushan/src/main/resources/mapper/epidemic/EpidemicUserInfoDao.xml

@ -34,7 +34,8 @@
</update> </update>
<select id="getEpidemicUserRecordList" resultType="com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordListDTO"> <select id="getEpidemicUserRecordList" resultType="com.elink.esua.epdc.vaccine.epidemic.dto.EpidemicRecordListDTO">
select select
'榆山街道' as street, uir.LIVE_ADDRESS_NAME as street,
uir.LIVE_ADDRESS_NAME,
ui.USER_NAME, ui.USER_NAME,
ui.ID_CARD, ui.ID_CARD,
ui.age, ui.age,
@ -51,6 +52,8 @@
uir.PLOT, uir.PLOT,
uir.BUILDING_NO, uir.BUILDING_NO,
uir.UNIT, uir.UNIT,
IFNULL(uir.RETURN_STATE,'') AS RETURN_STATE ,
IFNULL(uir.RISK_GRADE,'') AS RISK_GRADE,
uir.ROOM_NO uir.ROOM_NO
from epidemic_user_info ui from epidemic_user_info ui
left join epidemic_user_inout_record uir on ui.ID_CARD=uir.ID_CARD left join epidemic_user_inout_record uir on ui.ID_CARD=uir.ID_CARD
@ -83,6 +86,9 @@
<if test="outStreet != null and outStreet != ''"> <if test="outStreet != null and outStreet != ''">
and uir.LIVE_ADDRESS_CODE like '%${outStreet}%' and uir.LIVE_ADDRESS_CODE like '%${outStreet}%'
</if> </if>
<if test="street != null and street != ''">
and uir.LIVE_ADDRESS_NAME like '%${street}%'
</if>
<if test="community != null and community != ''"> <if test="community != null and community != ''">
and uir.COMMUNITY like '%${community}%' and uir.COMMUNITY like '%${community}%'
</if> </if>
@ -113,6 +119,9 @@
<if test="isInoculate != null and isInoculate != '' and isInoculate == 11"> <if test="isInoculate != null and isInoculate != '' and isInoculate == 11">
and ui.VACCINATION_STATE = 2 and ui.VACCINATION_STATE = 2
</if> </if>
<if test="isInoculate != null and isInoculate != '' and isInoculate == 12">
and ui.VACCINATION_STATE IN ('1', '2')
</if>
GROUP BY ui.ID GROUP BY ui.ID
ORDER BY uir.CREATED_TIME DESC ORDER BY uir.CREATED_TIME DESC
</select> </select>
@ -258,6 +267,7 @@
<if test="userName!=null and userName!=''"> <if test="userName!=null and userName!=''">
and i.USER_NAME like '%${userName}%' and i.USER_NAME like '%${userName}%'
</if> </if>
ORDER BY i.CREATED_TIME DESC
</select> </select>
<select id="selectInfo" resultType="com.elink.esua.epdc.vaccine.epidemic.dto.result.VaccinationInfoResultDTO"> <select id="selectInfo" resultType="com.elink.esua.epdc.vaccine.epidemic.dto.result.VaccinationInfoResultDTO">
select select

Loading…
Cancel
Save