Browse Source

关注名单列表组织范围改成本级及以下

新增没手机号不做限制
dev
zxc 3 years ago
parent
commit
a6cabe5566
  1. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
  2. 24
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
  3. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java

@ -70,7 +70,7 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
/**
* 手机号
*/
@NotBlank(message = "mobile不能为空",groups = IcEpidemicSpecialAttentionAdd.class)
// @NotBlank(message = "mobile不能为空",groups = IcEpidemicSpecialAttentionAdd.class)
private String mobile;
/**

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

@ -5,6 +5,7 @@ import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.regex.Pattern;
/**
* @Author zxc
@ -118,21 +119,40 @@ public class VaccinationListResultDTO implements Serializable {
this.sex = "未知";
}else {
if (this.idCard.length() == NumConstant.FIFTEEN){
if (Integer.parseInt(this.idCard.substring(NumConstant.FOURTEEN, NumConstant.FIFTEEN)) % NumConstant.TWO == NumConstant.ZERO) {
String substring = this.idCard.substring(NumConstant.FOURTEEN, NumConstant.FIFTEEN);
if (!isNumeric2(substring)){
this.sex = "未知";
}else {
if (Integer.parseInt(substring) % 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) {
String substring = this.idCard.substring(NumConstant.SIXTEEN).substring(NumConstant.ZERO, NumConstant.ONE);
if (!isNumeric2(substring)){
this.sex = "未知";
}else {
if (Integer.parseInt(substring) % NumConstant.TWO == NumConstant.ZERO) {
sex = "女";
} else {
sex = "男";
}
}
}else {
this.sex = "未知";
}
}
}
private static final Pattern NUMBER_PATTERN = Pattern.compile("-?\\d+(\\.\\d+)?");
public static boolean isNumeric2(String str) {
return str != null && NUMBER_PATTERN.matcher(str).matches();
}
public static void main(String[] args) {
System.out.println(isNumeric2("1"));
}
}

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

@ -36,7 +36,7 @@
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, 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.pids like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
@ -87,7 +87,7 @@
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 a.CUSTOMER_ID = b.CUSTOMER_ID
WHERE a.DEL_FLAG = 0
AND a.ORG_ID = #{orgId}
AND a.pids like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` LIKE CONCAT('%',#{name},'%')

Loading…
Cancel
Save