From 36172d0bd05139915f9173a6edeae9ecfa66ceaa Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Wed, 6 Jul 2022 16:10:42 +0800
Subject: [PATCH 01/32] =?UTF-8?q?=E5=B9=B4=E9=BE=84=E6=AE=B5=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dto/form/EpidemicPreventionFormDTO.java | 17 +++++++++++++++++
.../dto/result/EpidemicPreventionResultDTO.java | 6 ++++++
.../src/main/resources/mapper/IcResiUserDao.xml | 7 +++++++
3 files changed, 30 insertions(+)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
index 345d7496b0..c1663d71d5 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
@@ -1,10 +1,13 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
+import java.util.Date;
/**
* @Description
@@ -80,4 +83,18 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab
* 关注类型,核酸检测:2,疫苗接种:1
*/
private Integer attentionType;
+
+ /**
+ * 年龄段查询,起始生日
+ */
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date startBirthDay;
+
+ /**
+ * 年龄段查询,截止生日
+ */
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date endBirthDay;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
index 0639371186..0632fd9025 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
@@ -1,9 +1,11 @@
package com.epmet.dto.result;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
+import java.util.Date;
/**
* @Description
@@ -37,6 +39,10 @@ public class EpidemicPreventionResultDTO implements Serializable {
* 身份证
*/
private String idCard;
+
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date birthDay;
+
/**
* 疫苗接种次数
*/
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
index 9105d1d48b..688745f515 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
@@ -815,6 +815,7 @@
HOME_ID,
MOBILE,
a.ID_CARD,
+ a.BIRTHDAY,
IFNULL( b.count, 0 ) AS vaccineCount,
IFNULL( c.count, 0 ) AS natCount
FROM
@@ -877,6 +878,12 @@
AND a.ID_CARD LIKE concat( '%', #{idCard}, '%' )
+
+ AND DATE_FORMAT(a.BIRTHDAY,'%Y-%m-%d') = ]]> #{startBirthDay}
+
+
+ AND DATE_FORMAT(a.BIRTHDAY,'%Y-%m-%d') #{endBirthDay}
+
ORDER BY GRID_ID,VILLAGE_ID,BUILD_ID,UNIT_ID,HOME_ID, convert(NAME using gbk)
) t
WHERE
From 0cfe3eb0e379d4c8a24fd4c7f80abc22acde378a Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Wed, 6 Jul 2022 16:28:47 +0800
Subject: [PATCH 02/32] birthday
---
.../com/epmet/dto/result/EpidemicPreventionResultDTO.java | 5 +----
.../src/main/resources/mapper/IcResiUserDao.xml | 4 ++--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
index 0632fd9025..bb825e022d 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
@@ -1,11 +1,9 @@
package com.epmet.dto.result;
-import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
-import java.util.Date;
/**
* @Description
@@ -40,8 +38,7 @@ public class EpidemicPreventionResultDTO implements Serializable {
*/
private String idCard;
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date birthDay;
+ private String birthDay;
/**
* 疫苗接种次数
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
index 688745f515..6bbefbd93b 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
@@ -879,10 +879,10 @@
AND a.ID_CARD LIKE concat( '%', #{idCard}, '%' )
- AND DATE_FORMAT(a.BIRTHDAY,'%Y-%m-%d') = ]]> #{startBirthDay}
+ AND a.BIRTHDAY = ]]> #{startBirthDay}
- AND DATE_FORMAT(a.BIRTHDAY,'%Y-%m-%d') #{endBirthDay}
+ AND a.BIRTHDAY #{endBirthDay}
ORDER BY GRID_ID,VILLAGE_ID,BUILD_ID,UNIT_ID,HOME_ID, convert(NAME using gbk)
) t
From 229a9f5dbfce870589f169e0bae2bcf8f0378985 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Wed, 6 Jul 2022 16:29:15 +0800
Subject: [PATCH 03/32] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D?=
=?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=90=8D=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../commons/tools/constant/NumConstant.java | 2 ++
.../dto/form/VaccinationListFormDTO.java | 10 ++++++++
.../dto/result/VaccinationListResultDTO.java | 25 +++++++++++++++++++
.../epmet/excel/VaccinationExportExcel.java | 6 +++++
...IcEpidemicSpecialAttentionServiceImpl.java | 6 ++++-
.../mapper/IcEpidemicSpecialAttentionDao.xml | 10 ++++++--
6 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
index 2fe5b49d9a..0d18e6f706 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
+++ b/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;
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
index 6d365c9955..c50649b4a9 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VaccinationListFormDTO.java
+++ b/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;
+
+ /**
+ * 开始时间 eg:20220706
+ */
+ private String startDate;
+
+ /**
+ * 结束时间 eg:20220706
+ */
+ private String endDate;
}
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
index 01c7374dff..63d56ebac2 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
+++ b/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 = "未知";
+ }
+ }
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java
index 8fe217466f..34c11ea835 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/VaccinationExportExcel.java
+++ b/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;
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
index 6175e742c5..e649c87328 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
@@ -165,7 +165,11 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl {
+ v.setSex();
+ });
+ }
//需求调整 列表和导出增加所属房屋(小区+楼栋+单元+房间)一列值 sun
Map houseInfoMap = new HashMap<>();
//查询房屋信息
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
index c6249ea224..d6b175e3d2 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
+++ b/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 @@
AND b.home_id = #{homeId}
+
+ AND DATE_FORMAT(v.CREATED_TIME,'%Y%m%d') >= #{startDate}
+
+
+ AND DATE_FORMAT(v.CREATED_TIME,'%Y%m%d') #{endDate}
+
HAVING vaccinationCount = #{vaccinationCount}
From 8a9e700701dfc0fd3dfe8e7c8533f902aabe0e73 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Wed, 6 Jul 2022 16:36:50 +0800
Subject: [PATCH 04/32] bir
---
.../com/epmet/dto/form/EpidemicPreventionFormDTO.java | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
index c1663d71d5..4cd9156ea1 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
@@ -1,13 +1,10 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
-import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
-import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
-import java.util.Date;
/**
* @Description
@@ -87,14 +84,10 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab
/**
* 年龄段查询,起始生日
*/
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date startBirthDay;
+ private String startBirthDay;
/**
* 年龄段查询,截止生日
*/
- @DateTimeFormat(pattern = "yyyy-MM-dd")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date endBirthDay;
+ private String endBirthDay;
}
From 23c1e0cf3d40d2e48384c57796f470126715f731 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Wed, 6 Jul 2022 17:40:08 +0800
Subject: [PATCH 05/32] =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=B1=85=E6=B0=91?=
=?UTF-8?q?=E3=80=82=E8=B0=83=E6=95=B4status=3D'0'=E5=88=99=E4=B8=BA1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/epmet/service/impl/IcNatServiceImpl.java | 1 +
.../main/java/com/epmet/service/impl/IcVaccineServiceImpl.java | 1 +
.../epmet-user-server/src/main/resources/mapper/IcNatDao.xml | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
index d44c421e5a..40d9818db8 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
@@ -591,6 +591,7 @@ public class IcNatServiceImpl extends BaseServiceImpl imp
LambdaQueryWrapper query = new LambdaQueryWrapper();
query.eq(IcResiUserEntity::getCustomerId, customerId);
query.eq(IcResiUserEntity::getIdCard, idCard);
+ query.eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR);
if (StringUtils.isNotBlank(pids)) {
query.likeRight(IcResiUserEntity::getPids, pids);
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
index 1f33bbb603..269ba6f123 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
@@ -394,6 +394,7 @@ public class IcVaccineServiceImpl extends BaseServiceImpl query = new LambdaQueryWrapper();
query.eq(IcResiUserEntity::getCustomerId, customerId);
query.eq(IcResiUserEntity::getIdCard, idCard);
+ query.eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR);
if (StringUtils.isNotBlank(pids)) {
query.likeRight(IcResiUserEntity::getPids, pids);
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml
index 5c4ad0b6e7..1baf8a507a 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcNatDao.xml
@@ -160,7 +160,7 @@
UPDATE ic_nat m,
(
- SELECT if(DEL_FLAG,0,1) resiFlag, ID_CARD FROM ic_resi_user
+ SELECT if(STATUS ='0', 1, 0) resiFlag, ID_CARD FROM ic_resi_user
WHERE
1=1
From 4dc1ac068aa7268dd4876441cdfa09e02534bc75 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Thu, 7 Jul 2022 10:01:29 +0800
Subject: [PATCH 06/32] =?UTF-8?q?=E5=8F=8D=E5=8F=82=E5=8A=A0=E4=B8=AA?=
=?UTF-8?q?=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/epmet/dto/result/EpidemicPreventionResultDTO.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
index bb825e022d..4946982090 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java
@@ -48,4 +48,6 @@ public class EpidemicPreventionResultDTO implements Serializable {
* 核酸检测次数
*/
private Integer natCount;
+
+ private String createdTime;
}
From 7dd7cb413bd17a363506884d2c383e540242932d Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 11:05:44 +0800
Subject: [PATCH 07/32] =?UTF-8?q?=E7=96=AB=E8=8B=97=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tools/exception/EpmetErrorCode.java | 1 +
.../epmet/dto/form/AddIcVaccineFormDTO.java | 96 +++++++++++++++++++
.../epmet/controller/IcVaccineController.java | 39 ++++++++
.../main/java/com/epmet/dao/IcVaccineDao.java | 6 +-
.../com/epmet/service/IcVaccineService.java | 8 ++
.../service/impl/IcVaccineServiceImpl.java | 92 +++++++++++++++++-
.../main/resources/mapper/IcVaccineDao.xml | 27 +++++-
7 files changed, 265 insertions(+), 4 deletions(-)
create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
index 425417c7d5..03d26cb96e 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
@@ -257,6 +257,7 @@ public enum EpmetErrorCode {
IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"),
NOT_REGEIST_RESI(8927,"未注册居民"),
UNIT_EXIST_HOUSES_ERROR(8928,"单元下存在房屋,不可修改单元数"),
+ IC_VACCINE(8929,"已存在相同记录,请去修改原有记录"),
MISMATCH(10086,"人员与房屋信息不匹配,请与工作人员联系。"),
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
new file mode 100644
index 0000000000..1f6eea9602
--- /dev/null
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
@@ -0,0 +1,96 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description 核酸检测-上报核酸记录
+ * @Author sun
+ */
+@Data
+public class AddIcVaccineFormDTO implements Serializable {
+ private static final long serialVersionUID = 9156247659994638103L;
+
+ public interface Vaccine extends CustomerClientShowGroup {
+ }
+ public interface Edit extends CustomerClientShowGroup {
+ }
+
+ /**
+ * 核酸记录Id,修改时使用
+ */
+ @NotBlank(message = "组织Id不能为空", groups = Edit.class)
+ private String icVaccineId;
+ /**
+ * 当前网格所属组织Id
+ */
+ @NotBlank(message = "组织Id不能为空", groups = Vaccine.class)
+ private String agencyId;
+ /**
+ * 居民端小程序的用户id、数字社区的icResiUserId、其他情况无值
+ */
+ private String userId;
+ /**
+ * 数据来源【居民端小程序的人:resi; 数字社区的居民:icresi; 导入的:import;】
+ */
+ @NotBlank(message = "居民来源不能为空", groups = Vaccine.class)
+ private String userType;
+ /**
+ * 姓名
+ */
+ @NotBlank(message = "姓名不能为空", groups = Vaccine.class)
+ private String name;
+ /**
+ * 手机号
+ */
+ @NotBlank(message = "手机号不能为空", groups = Vaccine.class)
+ private String mobile;
+ /**
+ * 身份证号
+ */
+ @NotBlank(message = "身份证号不能为空", groups = Vaccine.class)
+ private String idCard;
+ /**
+ * 接种时间
+ */
+ @NotNull(message = "接种时间不能为空", groups = Vaccine.class)
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm")
+ private Date inoculateTime;
+ /**
+ * 接种地点
+ */
+ @NotBlank(message = "接种地点不能为空", groups = Vaccine.class)
+ private String inoculateAddress;
+ /**
+ * 疫苗厂家
+ */
+ @NotBlank(message = "疫苗厂家不能为空", groups = Vaccine.class)
+ private String manufacturer;
+ /**
+ * 是否客户下居民(0:否 1:是)
+ */
+ private String isResiUser = "0";
+ /**
+ * 通知渠道 0小程序通知,1短信通知,多选是数组
+ */
+ private List channel = new ArrayList<>();
+ /**
+ * 通知内容
+ */
+ private String content = "";
+
+ //token中信息
+ private String customerId;
+ private String staffId;
+ private String client;
+
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java
index ce9f895a60..bb34afd612 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java
@@ -20,6 +20,7 @@ import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.IcVaccineDTO;
+import com.epmet.dto.form.AddIcVaccineFormDTO;
import com.epmet.dto.form.IcVaccineFormDTO;
import com.epmet.dto.form.VaccineListFormDTO;
import com.epmet.dto.result.IcVaccineListCommonExcelResultDTO;
@@ -237,5 +238,43 @@ public class IcVaccineController implements ResultDataResolver {
return new Result().ok(icVaccineService.detail(formDTO.getVaccineId()));
}
+ /**
+ * @Author sun
+ * @Description 【疫苗】疫苗接种信息新增
+ **/
+ @PostMapping("add")
+ public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddIcVaccineFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, AddIcVaccineFormDTO.Vaccine.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ formDTO.setClient(tokenDto.getClient());
+ icVaccineService.add(formDTO);
+ return new Result();
+ }
+
+ /**
+ * @Author sun
+ * @Description 【疫苗】疫苗接种信息修改
+ **/
+ @PostMapping("edit")
+ public Result edit(@LoginUser TokenDto tokenDto, @RequestBody AddIcVaccineFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, AddIcVaccineFormDTO.Edit.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ icVaccineService.edit(formDTO);
+ return new Result();
+ }
+
+ /**
+ * @Author sun
+ * @Description 【疫苗】疫苗接种信息删除
+ **/
+ @PostMapping("del")
+ public Result del(@RequestBody IcVaccineFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, IcVaccineFormDTO.Detail.class);
+ icVaccineService.del(formDTO);
+ return new Result<>();
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java
index 0471d9496b..6f6eef59ba 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccineDao.java
@@ -2,6 +2,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcNatDTO;
+import com.epmet.dto.IcVaccineDTO;
import com.epmet.dto.form.MyNatListFormDTO;
import com.epmet.dto.form.VaccineListFormDTO;
import com.epmet.dto.result.IcVaccineListResultDTO;
@@ -44,7 +45,7 @@ public interface IcVaccineDao extends BaseDao {
* @Author sun
* @Description 删除操作--物理删除业务数据
**/
- int delById(@Param("icNatId") String icNatId);
+ int delById(@Param("icVaccineId") String icVaccineId);
/**
* 插入或者更新
@@ -67,4 +68,7 @@ public interface IcVaccineDao extends BaseDao {
* @return
*/
int updateIsResiFlag(@Param("customerId") String customerId, @Param("icResiUserId") String icResiUserId);
+
+ IcVaccineDTO getVaccineDTO(@Param("customerId") String customerId, @Param("icVaccineId") String icVaccineId, @Param("idCard") String idCard, @Param("inoculateTime") String inoculateTime);
+
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java
index 154b6f9558..c89b5f2db4 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccineService.java
@@ -3,6 +3,8 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcVaccineDTO;
+import com.epmet.dto.form.AddIcVaccineFormDTO;
+import com.epmet.dto.form.IcVaccineFormDTO;
import com.epmet.dto.form.VaccineListFormDTO;
import com.epmet.dto.result.IcVaccineListResultDTO;
import com.epmet.dto.result.VaccineListDTO;
@@ -60,4 +62,10 @@ public interface IcVaccineService extends BaseService {
* @Description 疫苗接种情况-列表点击查询详情
**/
IcVaccineDTO detail(String vaccineId);
+
+ void add(AddIcVaccineFormDTO formDTO);
+
+ void edit(AddIcVaccineFormDTO formDTO);
+
+ void del(IcVaccineFormDTO formDTO);
}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
index 269ba6f123..d5ed007528 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
@@ -10,21 +10,25 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
+import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
+import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache;
import com.epmet.commons.tools.utils.*;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcResiUserDao;
import com.epmet.dao.IcVaccineDao;
import com.epmet.dao.IcVaccineRelationDao;
+import com.epmet.dto.IcNatDTO;
import com.epmet.dto.IcVaccineDTO;
-import com.epmet.dto.form.ImportTaskCommonFormDTO;
-import com.epmet.dto.form.VaccineListFormDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.IcVaccineListResultDTO;
import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.dto.result.VaccineListDTO;
+import com.epmet.entity.IcNatEntity;
import com.epmet.entity.IcResiUserEntity;
import com.epmet.entity.IcVaccineEntity;
import com.epmet.entity.IcVaccineRelationEntity;
@@ -33,6 +37,7 @@ import com.epmet.excel.data.IcVaccineImportExcelData;
import com.epmet.excel.handler.IcVaccineExcelImportListener;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.OssFeignClient;
+import com.epmet.service.IcNoticeService;
import com.epmet.service.IcVaccineService;
import com.epmet.service.UserService;
import com.epmet.utils.ImportTaskUtils;
@@ -77,6 +82,8 @@ public class IcVaccineServiceImpl extends BaseServiceImpl NumConstant.ZERO) {
+ SendNoticeFormDTO dto = new SendNoticeFormDTO();
+ List userList = new ArrayList<>();
+ userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class));
+ dto.setCustomerId(formDTO.getCustomerId());
+ dto.setUserList(userList);
+ dto.setChannel(formDTO.getChannel());
+ dto.setOrigin("1");
+ dto.setContent(formDTO.getContent());
+ dto.setStaffId(formDTO.getStaffId());
+ icNoticeService.sendNotice(dto);
+ }
+ }
+
+ @Override
+ public void edit(AddIcVaccineFormDTO formDTO) {
+ //0.先根据身份证号和接种时间校验除当前数据是否还存在相同数据
+ IcVaccineDTO icVaccineDTO = baseDao.getVaccineDTO(formDTO.getCustomerId(), formDTO.getIcVaccineId(), formDTO.getIdCard(), DateUtils.format(formDTO.getInoculateTime(), DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE));
+ if (null != icVaccineDTO) {
+ throw new RenException(EpmetErrorCode.IC_VACCINE.getCode(), EpmetErrorCode.IC_VACCINE.getMsg());
+ }
+ //1.更新核酸记录基础信息表数据
+ IcVaccineEntity entity = ConvertUtils.sourceToTarget(formDTO, IcVaccineEntity.class);
+ entity.setId(formDTO.getIcVaccineId());
+ if (!updateById(entity)) {
+ log.error(String.format("数据修改失败,核酸记录Id->%s", formDTO.getIcVaccineId()));
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种记录信息修改失败");
+ }
+ //修改只涉及到基础信息的修改 不会修改关系数据 关系表不涉及更新
+
+ //3.新增通知表信息
+ if (CollectionUtils.isNotEmpty(formDTO.getChannel())) {
+ SendNoticeFormDTO dto = new SendNoticeFormDTO();
+ List userList = new ArrayList<>();
+ userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class));
+ dto.setCustomerId(formDTO.getCustomerId());
+ dto.setUserList(userList);
+ dto.setChannel(formDTO.getChannel());
+ dto.setOrigin("1");
+ dto.setContent(formDTO.getContent());
+ dto.setStaffId(formDTO.getStaffId());
+ icNoticeService.sendNotice(dto);
+ }
+ }
+
+ @Override
+ public void del(IcVaccineFormDTO formDTO) {
+ //1.确定删除则需要删除基础数据以及所有可能存在的关系数据,物理删除业务数据
+ if (baseDao.delById(formDTO.getVaccineId()) < NumConstant.ONE) {
+ log.error(String.format("数据删除失败,疫苗接种记录Id->%s", formDTO.getVaccineId()));
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "数据删除失败");
+ }
+ //关系数据删除
+ icVaccineRelationDao.delRelation(formDTO.getVaccineId(), null);
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
index 4ee69e7e3d..2beda4364d 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
@@ -126,8 +126,33 @@
LIMIT 1
+
+
- DELETE FROM ic_nat WHERE id = #{icNatId}
+ DELETE FROM ic_vaccine WHERE id = #{icVaccineId}
From 3728139e730e08dc82821cd631348866f9620f48 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 15:02:04 +0800
Subject: [PATCH 08/32] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/epmet/dto/IcVaccineDTO.java | 5 +++++
.../main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java | 4 ++--
.../src/main/java/com/epmet/entity/IcVaccineEntity.java | 5 +++++
.../java/com/epmet/service/impl/IcVaccineServiceImpl.java | 6 +++---
.../src/main/resources/mapper/IcVaccineDao.xml | 4 +++-
5 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java
index 585b4ef550..115eeb2154 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java
@@ -47,6 +47,11 @@ public class IcVaccineDTO implements Serializable {
*/
private String isResiUser;
+ /**
+ * 数字社区的icResiUserId、其他情况无值
+ */
+ private String userId;
+
/**
* 数据来源【导入的:import;】
*/
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
index 1f6eea9602..860bb25aaf 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
@@ -27,8 +27,8 @@ public class AddIcVaccineFormDTO implements Serializable {
/**
* 核酸记录Id,修改时使用
*/
- @NotBlank(message = "组织Id不能为空", groups = Edit.class)
- private String icVaccineId;
+ @NotBlank(message = "核酸记录Id不能为空", groups = Edit.class)
+ private String vaccineId;
/**
* 当前网格所属组织Id
*/
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java
index 215fd77173..b17256f3a0 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineEntity.java
@@ -48,6 +48,11 @@ public class IcVaccineEntity extends BaseEpmetEntity {
*/
private String isResiUser;
+ /**
+ * 数字社区的icResiUserId、其他情况无值
+ */
+ private String userId;
+
/**
* 数据来源【导入的:import;】
*/
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
index d5ed007528..09da4b8ee2 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
@@ -525,15 +525,15 @@ public class IcVaccineServiceImpl extends BaseServiceImpl%s", formDTO.getIcVaccineId()));
+ log.error(String.format("数据修改失败,核酸记录Id->%s", formDTO.getVaccineId()));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "疫苗接种记录信息修改失败");
}
//修改只涉及到基础信息的修改 不会修改关系数据 关系表不涉及更新
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
index 2beda4364d..13b3fa3f75 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
@@ -40,7 +40,8 @@
b.id_card,
b.INOCULATE_TIME,
b.INOCULATE_ADDRESS,
- b.MANUFACTURER
+ b.MANUFACTURER,
+ b.user_id,
FROM ic_vaccine_relation a
INNER JOIN ic_vaccine b ON a.IC_VACCINE_ID = b.ID AND b.DEL_FLAG = '0'
WHERE a.DEL_FLAG = '0'
@@ -71,6 +72,7 @@
SELECT
id vaccineId,
is_resi_user isResiUser,
+ user_id userId,
user_type userType,
`name` `name`,
mobile mobile,
From 09ee9b9ebe4e70242f22e9aded7ce7fa7616ea17 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 15:15:12 +0800
Subject: [PATCH 09/32] =?UTF-8?q?=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/db/migration/V0.0.59__alter_ic_vaccine.sql | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
new file mode 100644
index 0000000000..0c96934859
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
@@ -0,0 +1,6 @@
+
+ALTER TABLE `ic_vaccine`
+ADD COLUMN `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数字社区的icResiUserId、其他情况无值' AFTER `USER_TYPE`;
+
+
+
From 42c66469dfc63c07b5967c24f59e73c8559a8157 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 15:26:38 +0800
Subject: [PATCH 10/32] =?UTF-8?q?=E3=80=82=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/IcVaccineDao.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
index 13b3fa3f75..d2c9aa3488 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccineDao.xml
@@ -41,7 +41,7 @@
b.INOCULATE_TIME,
b.INOCULATE_ADDRESS,
b.MANUFACTURER,
- b.user_id,
+ b.user_id
FROM ic_vaccine_relation a
INNER JOIN ic_vaccine b ON a.IC_VACCINE_ID = b.ID AND b.DEL_FLAG = '0'
WHERE a.DEL_FLAG = '0'
From 1292ae08b2e56dc630c1d68f47d8a681124f3370 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 15:30:49 +0800
Subject: [PATCH 11/32] =?UTF-8?q?=E6=8F=90=E9=94=99=E5=88=86=E6=94=AF?=
=?UTF-8?q?=E4=BA=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/db/migration/V0.0.59__alter_ic_vaccine.sql | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
deleted file mode 100644
index 0c96934859..0000000000
--- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-
-ALTER TABLE `ic_vaccine`
-ADD COLUMN `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数字社区的icResiUserId、其他情况无值' AFTER `USER_TYPE`;
-
-
-
From eea506363c0044d30955538a7d1a656205e5ecf3 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Thu, 7 Jul 2022 15:32:28 +0800
Subject: [PATCH 12/32] =?UTF-8?q?=E8=84=9A=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/db/migration/V0.0.59__alter_ic_vaccine.sql | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
new file mode 100644
index 0000000000..0c96934859
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.59__alter_ic_vaccine.sql
@@ -0,0 +1,6 @@
+
+ALTER TABLE `ic_vaccine`
+ADD COLUMN `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数字社区的icResiUserId、其他情况无值' AFTER `USER_TYPE`;
+
+
+
From e458cf50950601a0c6ec95a487578c82208932fe Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Fri, 8 Jul 2022 10:40:29 +0800
Subject: [PATCH 13/32] =?UTF-8?q?/epmetuser/icresiuser/getpeoplebyroom?=
=?UTF-8?q?=E9=99=90=E5=88=B6=E5=B1=85=E6=B0=91=E7=8A=B6=E6=80=810?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/epmet/service/impl/IcResiUserServiceImpl.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
index bf854634e8..1e90281665 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
@@ -767,6 +767,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IcResiUserEntity::getHomeId, homeId);
+ wrapper.eq(IcResiUserEntity::getStatus,NumConstant.ZERO_STR);
wrapper.orderByAsc(IcResiUserEntity::getYhzgx);
List list = baseDao.selectList(wrapper);
From 0e61469278ce5bb75ce63ba947426975aa894789 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 14:35:07 +0800
Subject: [PATCH 14/32] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=E8=A1=A8=EF=BC=8C=E5=86=85=E5=AE=B9=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/db/migration/V0.0.12__alert_draft.sql | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
new file mode 100644
index 0000000000..9073b92eec
--- /dev/null
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
@@ -0,0 +1,3 @@
+
+ALTER TABLE `draft_content`
+ MODIFY COLUMN `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容' AFTER `ARTICLE_ID`;
From c21e2e46c022fcf263ec21aea7cc1b61bcb01e6b Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 14:36:38 +0800
Subject: [PATCH 15/32] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=E8=A1=A8=EF=BC=8C=E5=86=85=E5=AE=B9=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/db/migration/V0.0.12__alert_draft.sql | 3 ---
1 file changed, 3 deletions(-)
delete mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
deleted file mode 100644
index 9073b92eec..0000000000
--- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.12__alert_draft.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-
-ALTER TABLE `draft_content`
- MODIFY COLUMN `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容' AFTER `ARTICLE_ID`;
From 7ef55dc01dc4c08b5c223492c371ef72f1ac5efe Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Fri, 8 Jul 2022 14:40:12 +0800
Subject: [PATCH 16/32] =?UTF-8?q?pc=E7=AB=AF=E5=85=9A=E5=BB=BA=E5=A3=B0?=
=?UTF-8?q?=E9=9F=B3=E5=8F=91=E5=B8=83=E5=8D=95=E4=BD=8D=E5=8E=BB=E6=8E=89?=
=?UTF-8?q?=E8=A7=92=E8=89=B2=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/epmet/service/impl/CustomerAgencyServiceImpl.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
index 5839114b8b..d7f4e95ac1 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
@@ -813,7 +813,9 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl
Date: Fri, 8 Jul 2022 15:06:44 +0800
Subject: [PATCH 17/32] =?UTF-8?q?/icServiceProject/serviceProjectList?=
=?UTF-8?q?=E5=BD=93=E5=89=8D=E7=BB=84=E7=BB=87=E5=8F=8A=E4=B8=8B=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/epmet/service/impl/IcServiceProjectServiceImpl.java | 1 +
.../src/main/resources/mapper/IcServiceProjectDao.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java
index ecc399cfb3..88075ff9cd 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceProjectServiceImpl.java
@@ -150,6 +150,7 @@ public class IcServiceProjectServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getServiceProjectList(formDTO));
if (CollectionUtils.isNotEmpty(pageInfo.getList())){
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml
index 17f4de965a..c042978f80 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceProjectDao.xml
@@ -43,7 +43,7 @@
AND ID = #{serviceProjectId}
- AND AGENCY_ID = #{agencyId}
+ AND AGENCY_ID_PATH like concat( '%',#{agencyId},'%')
AND SERVICE_CATEGORY_KEY = #{serviceCategoryKey}
From ffbde498f1d84430973b39e4cb66bed0bc3c80d2 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Fri, 8 Jul 2022 16:26:21 +0800
Subject: [PATCH 18/32] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=85=9A=E5=91=98?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/IcPartyMemberController.java | 20 +++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
index a1fdca4c49..cea3a59fdb 100644
--- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
+++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
@@ -32,6 +33,8 @@ import com.epmet.dto.form.IcPartyMemberListFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.PartyMemberAgeResultDTO;
import com.epmet.dto.result.PartyMemberEducationResultDTO;
+import com.epmet.modules.partyOrg.dao.IcPartyOrgDao;
+import com.epmet.modules.partyOrg.entity.IcPartyOrgEntity;
import com.epmet.modules.partymember.excel.IcPartyMemberExcel;
import com.epmet.modules.partymember.service.IcPartyMemberService;
import com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO;
@@ -55,6 +58,7 @@ import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.nio.file.Path;
+import java.util.Collections;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
@@ -73,6 +77,8 @@ public class IcPartyMemberController implements ResultDataResolver {
@Autowired
private IcPartyMemberService icPartyMemberService;
+ @Autowired
+ private IcPartyOrgDao icPartyOrgDao;
@RequestMapping("page")
@MaskResponse(fieldNames = { "mobile", "idCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
@@ -246,12 +252,22 @@ public class IcPartyMemberController implements ResultDataResolver {
@PostMapping("partymemberagelist")
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
public Result> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) {
- if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){
+ if(StringUtils.isBlank(formDTO.getOrgId())){
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
if (null == staffInfo) {
throw new EpmetException("获取工作人员信息失败");
}
- formDTO.setAgencyId(staffInfo.getAgencyId());
+ //获取工作人员所属组织同级的党组织
+ LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>();
+ orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId());
+ orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
+ orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
+ IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper);
+ if (null == org) {
+ return new Result>().ok(new PageData<>(Collections.emptyList(), 0));
+ }
+ formDTO.setOrgId(org.getId());
+// formDTO.setAgencyId(staffInfo.getAgencyId());
}
return new Result>().ok(icPartyMemberService.getPartyMemberAgeList(formDTO));
}
From 8aa8e298f7b2c10f4ad548a1c63c032bfdc82a21 Mon Sep 17 00:00:00 2001
From: Jackwang
Date: Fri, 8 Jul 2022 16:55:02 +0800
Subject: [PATCH 19/32] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=85=9A=E5=91=98?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1-?=
=?UTF-8?q?=E6=8A=BD=E5=8F=96=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/IcPartyMemberController.java | 63 +++++++++++--------
1 file changed, 37 insertions(+), 26 deletions(-)
diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
index cea3a59fdb..2059c84f4b 100644
--- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
+++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
@@ -58,6 +58,7 @@ import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.nio.file.Path;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
@@ -232,12 +233,12 @@ public class IcPartyMemberController implements ResultDataResolver {
*/
@PostMapping("partymembereducationstatistics")
public Result> partyMemberEducationStatistics(@LoginUser TokenDto tokenDto, @RequestBody IcPartyMemberFormDTO formDTO) {
- if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
- if (null == staffInfo) {
- throw new EpmetException("获取工作人员信息失败");
+ if(StringUtils.isBlank(formDTO.getOrgId())){
+ IcPartyOrgEntity org = setOrgId(tokenDto);
+ if (null == org) {
+ return new Result>().ok(new ArrayList<>());
}
- formDTO.setAgencyId(staffInfo.getAgencyId());
+ formDTO.setOrgId(org.getId());
}
return new Result>().ok(icPartyMemberService.partyMemberEducationStatistics(formDTO));
}
@@ -253,21 +254,11 @@ public class IcPartyMemberController implements ResultDataResolver {
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
public Result> partyMemberAgelist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) {
if(StringUtils.isBlank(formDTO.getOrgId())){
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
- if (null == staffInfo) {
- throw new EpmetException("获取工作人员信息失败");
- }
- //获取工作人员所属组织同级的党组织
- LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>();
- orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId());
- orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
- orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
- IcPartyOrgEntity org = icPartyOrgDao.selectOne(orgWrapper);
+ IcPartyOrgEntity org = setOrgId(tokenDto);
if (null == org) {
return new Result>().ok(new PageData<>(Collections.emptyList(), 0));
}
formDTO.setOrgId(org.getId());
-// formDTO.setAgencyId(staffInfo.getAgencyId());
}
return new Result>().ok(icPartyMemberService.getPartyMemberAgeList(formDTO));
}
@@ -282,12 +273,12 @@ public class IcPartyMemberController implements ResultDataResolver {
@PostMapping("partymembereducationlist")
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
public Result> partyMemberEducationlist(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberListFormDTO formDTO) {
- if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
- if (null == staffInfo) {
- throw new EpmetException("获取工作人员信息失败");
+ if(StringUtils.isBlank(formDTO.getOrgId())){
+ IcPartyOrgEntity org = setOrgId(tokenDto);
+ if (null == org) {
+ return new Result>().ok(new PageData<>(Collections.emptyList(), 0));
}
- formDTO.setAgencyId(staffInfo.getAgencyId());
+ formDTO.setOrgId(org.getId());
}
return new Result>().ok(icPartyMemberService.getPartyMemberEducationList(formDTO));
}
@@ -301,16 +292,36 @@ public class IcPartyMemberController implements ResultDataResolver {
*/
@PostMapping("partymemberagestatistics")
public Result> partyMemberAgeStatistics(@LoginUser TokenDto tokenDto,@RequestBody IcPartyMemberFormDTO formDTO) {
- if(StringUtils.isBlank(formDTO.getOrgId()) && StringUtils.isBlank(formDTO.getAgencyId())){
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
- if (null == staffInfo) {
- throw new EpmetException("获取工作人员信息失败");
+ if(StringUtils.isBlank(formDTO.getOrgId())){
+ IcPartyOrgEntity org = setOrgId(tokenDto);
+ if (null == org) {
+ return new Result>().ok(new ArrayList<>());
}
- formDTO.setAgencyId(staffInfo.getAgencyId());
+ formDTO.setOrgId(org.getId());
}
return new Result>().ok(icPartyMemberService.partyMemberAgeStatistics(formDTO));
}
+ /**
+ * @describe: 组装党组织信息
+ * @author wangtong
+ * @date 2022/7/8 16:46
+ * @params [tokenDto, formDTO]
+ * @return com.epmet.modules.partyOrg.entity.IcPartyOrgEntity
+ */
+ public IcPartyOrgEntity setOrgId(TokenDto tokenDto){
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(),tokenDto.getUserId());
+ if (null == staffInfo) {
+ throw new EpmetException("获取工作人员信息失败");
+ }
+ //获取工作人员所属组织同级的党组织
+ LambdaQueryWrapper orgWrapper = new LambdaQueryWrapper<>();
+ orgWrapper.eq(IcPartyOrgEntity::getCustomerId, tokenDto.getCustomerId());
+ orgWrapper.eq(IcPartyOrgEntity::getAgencyId, staffInfo.getAgencyId());
+ orgWrapper.ne(IcPartyOrgEntity::getPartyOrgType, NumConstant.FIVE_STR);
+ return icPartyOrgDao.selectOne(orgWrapper);
+ }
+
@RequestMapping(value = "downloadTemplate", method = {RequestMethod.GET, RequestMethod.POST})
public void downloadTemplate(HttpServletResponse response) throws IOException {
From a6cabe556645a8dd6a40304df13a6800add5dfed Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 17:30:57 +0800
Subject: [PATCH 20/32] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=90=8D=E5=8D=95?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=84=E7=BB=87=E8=8C=83=E5=9B=B4=E6=94=B9?=
=?UTF-8?q?=E6=88=90=E6=9C=AC=E7=BA=A7=E5=8F=8A=E4=BB=A5=E4=B8=8B=20?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B2=A1=E6=89=8B=E6=9C=BA=E5=8F=B7=E4=B8=8D?=
=?UTF-8?q?=E5=81=9A=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dto/IcEpidemicSpecialAttentionDTO.java | 2 +-
.../dto/result/VaccinationListResultDTO.java | 36 ++++++++++++++-----
.../mapper/IcEpidemicSpecialAttentionDao.xml | 4 +--
3 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
index ef59cb992b..9b2a5274b6 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
+++ b/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;
/**
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
index 63d56ebac2..e4e34c26ff 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
+++ b/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,16 +119,26 @@ 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) {
- sex = "女";
- } else {
- sex = "男";
+ 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) {
- sex = "女";
- } else {
- sex = "男";
+ 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 = "未知";
@@ -135,4 +146,13 @@ public class VaccinationListResultDTO implements Serializable {
}
}
+ 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"));
+ }
+
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
index 778ece8433..fcadba645e 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
+++ b/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}
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}
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
From ee13b06bc79a81df717e97c3a13f37b0080c826c Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 17:33:33 +0800
Subject: [PATCH 21/32] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=90=8D=E5=8D=95?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=84=E7=BB=87=E8=8C=83=E5=9B=B4=E6=94=B9?=
=?UTF-8?q?=E6=88=90=E6=9C=AC=E7=BA=A7=E5=8F=8A=E4=BB=A5=E4=B8=8B=20?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B2=A1=E6=89=8B=E6=9C=BA=E5=8F=B7=E4=B8=8D?=
=?UTF-8?q?=E5=81=9A=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../V0.0.60__alter_ic_epidemic_special_attention.sql | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
new file mode 100644
index 0000000000..cdd598d470
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
@@ -0,0 +1,6 @@
+
+ALTER TABLE `ic_epidemic_special_attention`
+ADD COLUMN `MOBILE` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号';
+
+
+
From ab9e57e3d1309bd7d71ca5324439c27d3c8eff51 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 17:41:01 +0800
Subject: [PATCH 22/32] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/epmet/dto/result/VaccinationListResultDTO.java | 4 ----
.../V0.0.60__alter_ic_epidemic_special_attention.sql | 5 +----
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
index e4e34c26ff..29ebb13231 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java
@@ -151,8 +151,4 @@ public class VaccinationListResultDTO implements Serializable {
return str != null && NUMBER_PATTERN.matcher(str).matches();
}
- public static void main(String[] args) {
- System.out.println(isNumeric2("1"));
- }
-
}
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
index cdd598d470..6a34b24ec5 100644
--- a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
+++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.60__alter_ic_epidemic_special_attention.sql
@@ -1,6 +1,3 @@
ALTER TABLE `ic_epidemic_special_attention`
-ADD COLUMN `MOBILE` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号';
-
-
-
+ MODIFY COLUMN `MOBILE` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号';
From 212effb04ea089c30f6fc0c9539b844f66ddd7ca Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 17:55:44 +0800
Subject: [PATCH 23/32] emm
---
.../main/resources/mapper/IcEpidemicSpecialAttentionDao.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
index fcadba645e..08088612bb 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
+++ b/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.pids like concat('%',#{orgId},'%')
+ AND concat(a.pids,':',#{orgId}) like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
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.pids like concat('%',#{orgId},'%')
+ AND concat(a.pids,':',#{orgId}) like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
From a5dde1d705271aef88539aa5fc7d4ec4afd2ae27 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Fri, 8 Jul 2022 18:18:57 +0800
Subject: [PATCH 24/32] emm
---
.../main/resources/mapper/IcEpidemicSpecialAttentionDao.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
index 08088612bb..fe16fb2908 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml
+++ b/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 concat(a.pids,':',#{orgId}) like concat('%',#{orgId},'%')
+ AND concat(a.pids,':',ORG_ID) like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
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 concat(a.pids,':',#{orgId}) like concat('%',#{orgId},'%')
+ AND concat(a.pids,':',ORG_ID) like concat('%',#{orgId},'%')
AND a.ATTENTION_TYPE = #{attentionType}
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
From 18a01a77f83a91dddbba80f114bade172e2eb1eb Mon Sep 17 00:00:00 2001
From: yujt
Date: Fri, 8 Jul 2022 21:15:28 +0800
Subject: [PATCH 25/32] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/HouseInformationServiceImpl.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
index 47faf87ea9..182a405e5d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
@@ -58,10 +58,12 @@ public class HouseInformationServiceImpl implements HouseInformationService {
*/
@Override
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) {
+ //获取工作人员所属组织
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (StringUtils.isEmpty(formDTO.getCommunityId())) {
//获取工作人员所属组织
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
- if(null == staffInfo) {
+// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
+ if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
formDTO.setCommunityId(staffInfo.getAgencyId());
@@ -69,7 +71,10 @@ public class HouseInformationServiceImpl implements HouseInformationService {
String orgName;
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId());
if (null == agency) {
- throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
+ agency = customerAgencyDao.selectById(staffInfo.getAgencyId());
+ if (null == agency) {
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
+ }
}
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
if (null == parentAgency) {
@@ -254,7 +259,7 @@ public class HouseInformationServiceImpl implements HouseInformationService {
//排序
list = list.stream().sorted(Comparator.comparing(BuildingListResultDTO::getDifferPersonCount).reversed()).collect(Collectors.toList());
//分页
- list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
+ list = list.stream().skip((long) (formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
}
}
@@ -387,7 +392,7 @@ public class HouseInformationServiceImpl implements HouseInformationService {
//排序
list = list.stream().sorted(Comparator.comparing(HomeListResultDTO::getPersonCount).reversed()).collect(Collectors.toList());
//分页
- list = list.stream().skip((long)(formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
+ list = list.stream().skip((long) (formDTO.getPageNo() - 1) * formDTO.getPageSize()).limit(formDTO.getPageSize()).collect(Collectors.toList());
}
}
From 4ff48e4a094bcfc8c653dafdf28032e8e26e5b02 Mon Sep 17 00:00:00 2001
From: yujt
Date: Fri, 8 Jul 2022 21:26:31 +0800
Subject: [PATCH 26/32] append
---
.../com/epmet/service/impl/HouseInformationServiceImpl.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
index 182a405e5d..5be772b499 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
@@ -74,6 +74,8 @@ public class HouseInformationServiceImpl implements HouseInformationService {
agency = customerAgencyDao.selectById(staffInfo.getAgencyId());
if (null == agency) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
+ } else {
+ formDTO.setCommunityId(staffInfo.getAgencyId());
}
}
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
From 119c6970e184c2e552243e55bae4dd09a5c35334 Mon Sep 17 00:00:00 2001
From: yujt
Date: Fri, 8 Jul 2022 21:46:18 +0800
Subject: [PATCH 27/32] append+1
---
.../impl/HouseInformationServiceImpl.java | 28 +++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
index 5be772b499..1acb3f8184 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
@@ -129,6 +129,34 @@ public class HouseInformationServiceImpl implements HouseInformationService {
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
+ } else {
+ return deleteAfetrEmergency(formDTO);
+ }
+ return new PageData<>(list, pageInfo.getTotal());
+ }
+
+ private PageData deleteAfetrEmergency(HouseInformationFormDTO formDTO) {
+ //获取工作人员所属组织
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
+ formDTO.setCommunityId(staffInfo.getAgencyId());
+ PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
+ List list = icNeighborHoodDao.getGridList(formDTO);
+ PageInfo pageInfo = new PageInfo<>(list);
+ if (CollectionUtils.isNotEmpty(list)) {
+ //获取录入人口数
+ IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
+ countFormDTO.setOrgType(NumConstant.ZERO_STR);
+ countFormDTO.setOrgId(formDTO.getCommunityId());
+ countFormDTO.setType(NumConstant.ONE_STR);
+ Map map = getMapResult(countFormDTO);
+
+ list.forEach(item -> {
+ if (map.containsKey(item.getId())) {
+ item.setPersonCount(map.get(item.getId()));
+ }
+ item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
+ });
+
}
return new PageData<>(list, pageInfo.getTotal());
}
From d665c10a32ea765a852f48c01686d60111fd87df Mon Sep 17 00:00:00 2001
From: zhaoqifeng
Date: Mon, 11 Jul 2022 09:34:03 +0800
Subject: [PATCH 28/32] =?UTF-8?q?=E5=8F=8C=E5=AE=9Ebug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/epmet/dto/result/BuildingListResultDTO.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java
index 67b4642640..084d69cdc2 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java
@@ -16,7 +16,7 @@ public class BuildingListResultDTO implements Serializable {
private static final long serialVersionUID = -1423424057500044373L;
private String id;
private String name;
- private Integer unitCoun = 0;
+ private Integer unitCount = 0;
private Integer houseCount = 0;
private Integer personCount = 0;
private Integer differHouseCount = 0;
From 4f3dfc736393484d728d8c5de7b5ef1a6046194a Mon Sep 17 00:00:00 2001
From: YUJT
Date: Mon, 11 Jul 2022 09:34:07 +0800
Subject: [PATCH 29/32] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=BA=94=E6=80=A5?=
=?UTF-8?q?=E7=9A=84=E6=94=B9=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/HouseInformationServiceImpl.java | 40 +------------------
1 file changed, 2 insertions(+), 38 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
index 1acb3f8184..33f3e3ab33 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java
@@ -58,11 +58,9 @@ public class HouseInformationServiceImpl implements HouseInformationService {
*/
@Override
public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) {
- //获取工作人员所属组织
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (StringUtils.isEmpty(formDTO.getCommunityId())) {
//获取工作人员所属组织
-// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败");
}
@@ -71,12 +69,7 @@ public class HouseInformationServiceImpl implements HouseInformationService {
String orgName;
CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId());
if (null == agency) {
- agency = customerAgencyDao.selectById(staffInfo.getAgencyId());
- if (null == agency) {
- throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
- } else {
- formDTO.setCommunityId(staffInfo.getAgencyId());
- }
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在");
}
CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid());
if (null == parentAgency) {
@@ -128,35 +121,6 @@ public class HouseInformationServiceImpl implements HouseInformationService {
}
item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
});
-
- } else {
- return deleteAfetrEmergency(formDTO);
- }
- return new PageData<>(list, pageInfo.getTotal());
- }
-
- private PageData deleteAfetrEmergency(HouseInformationFormDTO formDTO) {
- //获取工作人员所属组织
- CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
- formDTO.setCommunityId(staffInfo.getAgencyId());
- PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
- List list = icNeighborHoodDao.getGridList(formDTO);
- PageInfo pageInfo = new PageInfo<>(list);
- if (CollectionUtils.isNotEmpty(list)) {
- //获取录入人口数
- IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO();
- countFormDTO.setOrgType(NumConstant.ZERO_STR);
- countFormDTO.setOrgId(formDTO.getCommunityId());
- countFormDTO.setType(NumConstant.ONE_STR);
- Map map = getMapResult(countFormDTO);
-
- list.forEach(item -> {
- if (map.containsKey(item.getId())) {
- item.setPersonCount(map.get(item.getId()));
- }
- item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount());
- });
-
}
return new PageData<>(list, pageInfo.getTotal());
}
From 84910faa9333ab503f53b4ec34ca4b2c5f7a9b77 Mon Sep 17 00:00:00 2001
From: sunyuchao
Date: Mon, 11 Jul 2022 14:07:53 +0800
Subject: [PATCH 30/32] =?UTF-8?q?=E5=BA=94=E9=9C=80=E6=B1=82=E8=A6=81?=
=?UTF-8?q?=E6=B1=82=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=81=E5=AF=BC=E5=85=A5=E6=97=B6=E7=96=AB?=
=?UTF-8?q?=E8=8B=97=E6=8E=A5=E7=A7=8D=E5=9C=B0=E7=82=B9=E5=92=8C=E7=96=AB?=
=?UTF-8?q?=E8=8B=97=E5=8E=82=E5=AE=B6=E4=B8=8D=E5=9C=A8=E6=98=AF=E5=BF=85?=
=?UTF-8?q?=E5=A1=AB=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java | 4 ++--
.../java/com/epmet/excel/data/IcVaccineImportExcelData.java | 4 ++--
.../main/resources/db/migration/V0.0.61__alter_ic_vaccine.sql | 4 ++++
3 files changed, 8 insertions(+), 4 deletions(-)
create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.61__alter_ic_vaccine.sql
diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
index 860bb25aaf..482ef97839 100644
--- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
+++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcVaccineFormDTO.java
@@ -67,12 +67,12 @@ public class AddIcVaccineFormDTO implements Serializable {
/**
* 接种地点
*/
- @NotBlank(message = "接种地点不能为空", groups = Vaccine.class)
+ //@NotBlank(message = "接种地点不能为空", groups = Vaccine.class)
private String inoculateAddress;
/**
* 疫苗厂家
*/
- @NotBlank(message = "疫苗厂家不能为空", groups = Vaccine.class)
+ //@NotBlank(message = "疫苗厂家不能为空", groups = Vaccine.class)
private String manufacturer;
/**
* 是否客户下居民(0:否 1:是)
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcVaccineImportExcelData.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcVaccineImportExcelData.java
index 60a83b2582..83625be4d8 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcVaccineImportExcelData.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcVaccineImportExcelData.java
@@ -35,11 +35,11 @@ public class IcVaccineImportExcelData implements Serializable {
@ExcelProperty("接种时间")
private Date inoculateTime;
- @NotBlank(message = "接种地点为必填项")
+ //@NotBlank(message = "接种地点为必填项")
@ExcelProperty("接种地点")
private String inoculateAddress;
- @NotBlank(message = "疫苗厂家为必填项")
+ //@NotBlank(message = "疫苗厂家为必填项")
@ExcelProperty("疫苗厂家")
private String manufacturer;
diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.61__alter_ic_vaccine.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.61__alter_ic_vaccine.sql
new file mode 100644
index 0000000000..ab40652c5f
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.61__alter_ic_vaccine.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `ic_vaccine`
+MODIFY COLUMN `INOCULATE_ADDRESS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '接种地点' AFTER `INOCULATE_TIME`,
+MODIFY COLUMN `MANUFACTURER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '疫苗厂家' AFTER `INOCULATE_ADDRESS`;
+
From 4805ebc3551f02b06858c18608014aa541a4ee78 Mon Sep 17 00:00:00 2001
From: wangxianzhang
Date: Mon, 11 Jul 2022 15:48:54 +0800
Subject: [PATCH 31/32] =?UTF-8?q?=E3=80=90=E5=B1=85=E6=B0=91=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E5=AF=BC=E5=85=A5=E3=80=91=E4=B8=8D=E5=86=8D=E4=BF=9D?=
=?UTF-8?q?=E7=95=99=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=B8=8D=E5=86=8D=E6=89=93=E5=8D=B0=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=96=87=E4=BB=B6=E8=B7=AF?=
=?UTF-8?q?=E5=BE=84=E7=9A=84=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/epmet/controller/IcResiUserController.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
index 9becc91a97..fc6dce18f9 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
@@ -619,11 +619,12 @@ public class IcResiUserController implements ResultDataResolver {
try {
// 都导入成功了没问题,才删除
if (importTempFileSavePath != null) {
- if (isAllSuccess) {
- Files.delete(importTempFileSavePath);
- } else {
- log.error("【导入居民信息】未完全成功,上传文件:{}", importTempFileSavePath);
- }
+ Files.delete(importTempFileSavePath);
+ //if (isAllSuccess) {
+ // Files.delete(importTempFileSavePath);
+ //} else {
+ // log.error("【导入居民信息】未完全成功,上传文件:{}", importTempFileSavePath);
+ //}
}
} catch (IOException e) {
log.error("【导入居民信息失败】清理上传的文件失败:{}", ExceptionUtils.getErrorStackTrace(e));
From 1c7efe6803f8873e6aaf4f61cc13da66eaf1b969 Mon Sep 17 00:00:00 2001
From: zhaoqifeng
Date: Mon, 11 Jul 2022 16:21:41 +0800
Subject: [PATCH 32/32] =?UTF-8?q?=E5=8F=8C=E5=AE=9Ebug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/IcNeighborHoodDao.xml | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
index ba47187e06..7314031436 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
@@ -530,7 +530,8 @@
SELECT
a.ID,
a.BUILDING_NAME AS name,
- IFNULL( a.TOTAL_UNIT_NUM, 0 ) AS unitCount,
+ IFNULL( a.TOTAL_UNIT_NUM, 0 ) AS unitRealCount,
+ IFNULL(c.unitCount, 0) AS unitCount,
SUM( IFNULL( a.TOTAL_HOUSE_NUM, 0 ) ) AS houseRealCount,
SUM( IFNULL( a.REAL_PERSON, 0 ) ) AS personRealCount,
IFNULL(b.houseCount, 0) AS houseCount,
@@ -541,6 +542,10 @@
FROM ic_house WHERE DEL_FLAG = '0'
AND NEIGHBOR_HOOD_ID = #{neighborHoodId}
GROUP BY BUILDING_ID ) b ON a.ID = b.BUILDING_ID
+ LEFT JOIN ( SELECT BUILDING_ID, COUNT( ID ) AS unitCount
+ FROM ic_building_unit
+ WHERE DEL_FLAG = '0'
+ GROUP BY BUILDING_ID ) c ON a.ID = c.BUILDING_ID
WHERE
a.DEL_FLAG = '0'
AND a.NEIGHBOR_HOOD_ID = #{neighborHoodId}
@@ -578,7 +583,8 @@
a.ID AS buildingId,
a.TYPE AS buildingType,
CONCAT(NEIGHBOR_HOOD_NAME,' ',BUILDING_NAME) AS buildingName,
- IFNULL( a.TOTAL_UNIT_NUM, 0 ) AS unitCount,
+ IFNULL( a.TOTAL_UNIT_NUM, 0 ) AS unitRealCount,
+ IFNULL( d.unitCount, 0 ) AS unitCount,
SUM( IFNULL( a.TOTAL_HOUSE_NUM, 0 ) ) AS houseRealCount,
SUM( IFNULL( a.REAL_PERSON, 0 ) ) AS personRealCount,
IFNULL( b.houseCount, 0 ) AS houseCount,
@@ -590,6 +596,11 @@
WHERE DEL_FLAG = '0'
AND BUILDING_ID = #{buildingId}
GROUP BY BUILDING_ID ) b ON a.ID = b.BUILDING_ID
+ LEFT JOIN ( SELECT BUILDING_ID, COUNT( ID ) AS unitCount
+ FROM ic_building_unit
+ WHERE DEL_FLAG = '0'
+ AND BUILDING_ID = #{buildingId}
+ GROUP BY BUILDING_ID ) d ON a.ID = d.BUILDING_ID
INNER JOIN ic_neighbor_hood c ON a.NEIGHBOR_HOOD_ID = c.ID
WHERE
a.DEL_FLAG = '0'