Browse Source

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

dev
yinzuomei 3 years ago
parent
commit
5e1d0ae997
  1. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  2. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
  3. 25
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  4. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java
  5. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  6. 10
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java

@ -27,7 +27,9 @@ public interface NumConstant {
int ELEVEN = 11;
int TWELVE = 12;
int THIRTEEN = 13;
int SIXTEEN = 16;
int SEVENTEEN = 17;
int EIGHTEEN = 18;
int FIFTEEN = 15;
int FOURTEEN=14;
int TWENTY = 20;

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

@ -82,4 +82,14 @@ public class VaccinationListFormDTO extends PageFormDTO implements Serializable
* user所属组织ID
*/
private String orgId;
/**
* 开始时间 eg20220706
*/
private String startDate;
/**
* 结束时间 eg20220706
*/
private String endDate;
}

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

@ -2,6 +2,7 @@ package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
@ -39,6 +40,7 @@ public class VaccinationListResultDTO implements Serializable {
* 身份证
*/
private String idCard;
private String sex;
/**
* 备注
@ -110,4 +112,27 @@ public class VaccinationListResultDTO implements Serializable {
this.lastInformTime = "";
this.reason = "";
}
public void setSex(){
if (StringUtils.isBlank(getIdCard())){
this.sex = "未知";
}else {
if (this.idCard.length() == NumConstant.FIFTEEN){
if (Integer.parseInt(this.idCard.substring(NumConstant.FOURTEEN, NumConstant.FIFTEEN)) % NumConstant.TWO == NumConstant.ZERO) {
sex = "女";
} else {
sex = "男";
}
}else if (this.idCard.length() == NumConstant.EIGHTEEN){
if (Integer.parseInt(this.idCard.substring(NumConstant.SIXTEEN).substring(NumConstant.ZERO,NumConstant.ONE)) % NumConstant.TWO == NumConstant.ZERO) {
sex = "女";
} else {
sex = "男";
}
}else {
this.sex = "未知";
}
}
}
}

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

@ -23,6 +23,12 @@ public class VaccinationExportExcel {
@Excel(name = "身份证",width = 30)
private String idCard;
@Excel(name = "性别",width = 30)
private String sex;
@Excel(name = "关注原因",width = 40)
private String reason;
@Excel(name = "备注",width = 40)
private String remark;

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

@ -165,7 +165,11 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
result.setTotal(list.size());
}
}
if (CollectionUtils.isNotEmpty(result.getList())){
result.getList().forEach(v -> {
v.setSex();
});
}
//需求调整 列表和导出增加所属房屋(小区+楼栋+单元+房间)一列值 sun
Map<String, HouseInfoDTO> houseInfoMap = new HashMap<>();
//查询房屋信息

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

@ -24,7 +24,7 @@
a.`NAME`,
a.MOBILE,
a.ID_CARD,
a.reason,
IFNULL(a.reason,'') AS reason,
a.REMARK,
b.VILLAGE_ID,
b.BUILD_ID,
@ -34,7 +34,7 @@
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 AND b.del_flag = '0' and b.CUSTOMER_ID=a.CUSTOMER_ID
LEFT JOIN (SELECT id_card , CUSTOMER_ID, count(1) AS vaccinationCount FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD, CUSTOMER_ID) v ON (v.ID_CARD = a.ID_CARD and v.CUSTOMER_ID=a.CUSTOMER_ID)
LEFT JOIN (SELECT id_card , CUSTOMER_ID, count(1) AS vaccinationCount, CREATED_TIME FROM ic_vaccine WHERE DEL_FLAG = 0 GROUP BY ID_CARD, CUSTOMER_ID) v ON (v.ID_CARD = a.ID_CARD and v.CUSTOMER_ID=a.CUSTOMER_ID)
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND a.ATTENTION_TYPE = #{attentionType}
@ -59,6 +59,12 @@
<if test='null != homeId and "" != homeId'>
AND b.home_id = #{homeId}
</if>
<if test='null != startDate and "" != startDate'>
AND DATE_FORMAT(v.CREATED_TIME,'%Y%m%d') >= #{startDate}
</if>
<if test='null != endDate and "" != endDate'>
AND DATE_FORMAT(v.CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endDate}
</if>
<if test=' null != vaccinationCount'>
HAVING vaccinationCount = #{vaccinationCount}
</if>

Loading…
Cancel
Save