From 8f15203c0eb8fbc43761593eacff9bb692929ecc Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 Jul 2022 11:01:49 +0800 Subject: [PATCH 01/57] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/CustomerStaffDTO.java | 6 ++++++ .../src/main/java/com/epmet/entity/CustomerStaffEntity.java | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java index 71efe0c029..5f6e2685a3 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/CustomerStaffDTO.java @@ -138,4 +138,10 @@ public class CustomerStaffDTO implements Serializable { * 登录密码 */ private String password; + + /** + * 身份证号 + */ + private String idCard; + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java index 86bedb482c..690bf326c2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/CustomerStaffEntity.java @@ -101,4 +101,9 @@ public class CustomerStaffEntity extends BaseEpmetEntity { * 登录密码 */ private String password; + + /** + * 身份证号 + */ + private String idCard; } From 422b6b05ce212d6d30610ee435e940e06b81ed08 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 22 Jul 2022 11:14:10 +0800 Subject: [PATCH 02/57] =?UTF-8?q?=E3=80=90=E5=AF=B9=E6=8E=A5=E5=BA=93?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventreportPingyinController.java | 31 +++ .../controller/GridInfoPingyinController.java | 31 +++ .../GridstaffInfoPingyinController.java | 30 +++ .../GridstaffWorkInfoPingyinController.java | 32 +++ .../opendata/dao/EventreportPingyinDao.java | 16 ++ .../opendata/dao/GridInfoPingyinDao.java | 16 ++ .../opendata/dao/GridstaffInfoPingyinDao.java | 16 ++ .../dao/GridstaffWorkInfoPingyinDao.java | 16 ++ .../entity/EventreportPingyinEntity.java | 195 ++++++++++++++++++ .../entity/GridInfoPingyinEntity.java | 105 ++++++++++ .../entity/GridstaffInfoPingyinEntity.java | 159 ++++++++++++++ .../GridstaffWorkInfoPingyinEntity.java | 89 ++++++++ .../service/EventreportPingyinService.java | 14 ++ .../service/GridInfoPingyinService.java | 16 ++ .../service/GridstaffInfoPingyinService.java | 16 ++ .../GridstaffWorkInfoPingyinService.java | 16 ++ .../impl/EventreportPingyinServiceImpl.java | 19 ++ .../impl/GridInfoPingyinServiceImpl.java | 19 ++ .../impl/GridstaffInfoPingyinServiceImpl.java | 18 ++ .../GridstaffWorkInfoPingyinServiceImpl.java | 17 ++ .../mapper/EventreportPingyinDao.xml | 44 ++++ .../resources/mapper/GridInfoPingyinDao.xml | 26 +++ .../mapper/GridstaffInfoPingyinDao.xml | 37 ++++ .../mapper/GridstaffWorkInfoPingyinDao.xml | 23 +++ 24 files changed, 1001 insertions(+) create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/EventreportPingyinController.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffInfoPingyinController.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffWorkInfoPingyinController.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/EventreportPingyinDao.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffWorkInfoPingyinDao.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffWorkInfoPingyinEntity.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/EventreportPingyinService.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffWorkInfoPingyinService.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml create mode 100755 epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/EventreportPingyinController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/EventreportPingyinController.java new file mode 100755 index 0000000000..fabedc32da --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/EventreportPingyinController.java @@ -0,0 +1,31 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 平阴区事件上报中间表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@RestController +@RequestMapping("eventreportPingyin") +public class EventreportPingyinController { + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java new file mode 100755 index 0000000000..26e84cad1a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java @@ -0,0 +1,31 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + + +/** + * 平阴区网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@RestController +@RequestMapping("gridInfoPingyin") +public class GridInfoPingyinController { + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffInfoPingyinController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffInfoPingyinController.java new file mode 100755 index 0000000000..9fb4b2a2a2 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffInfoPingyinController.java @@ -0,0 +1,30 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + + +/** + * 平阴区网格员基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@RestController +@RequestMapping("gridstaffInfoPingyin") +public class GridstaffInfoPingyinController { + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffWorkInfoPingyinController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffWorkInfoPingyinController.java new file mode 100755 index 0000000000..3dd7d54d03 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridstaffWorkInfoPingyinController.java @@ -0,0 +1,32 @@ +package com.epmet.opendata.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 平阴区网格员例行工作信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@RestController +@RequestMapping("gridstaffWorkInfoPingyin") +public class GridstaffWorkInfoPingyinController { + + + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/EventreportPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/EventreportPingyinDao.java new file mode 100755 index 0000000000..ec20e7f1c4 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/EventreportPingyinDao.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.EventreportPingyinEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 平阴区事件上报中间表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Mapper +public interface EventreportPingyinDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java new file mode 100755 index 0000000000..fc6be9e1db --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.GridInfoPingyinEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 平阴区网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Mapper +public interface GridInfoPingyinDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java new file mode 100755 index 0000000000..05b862b40f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 平阴区网格员基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Mapper +public interface GridstaffInfoPingyinDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffWorkInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffWorkInfoPingyinDao.java new file mode 100755 index 0000000000..d515ae9fd6 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffWorkInfoPingyinDao.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.opendata.entity.GridstaffWorkInfoPingyinEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 平阴区网格员例行工作信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Mapper +public interface GridstaffWorkInfoPingyinDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java new file mode 100755 index 0000000000..84cddbe1d3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java @@ -0,0 +1,195 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 平阴区事件上报中间表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("eventreport_pingyin") +public class EventreportPingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 数据库主键自增字段,请勿指定 + */ + private Long id; + + /** + * 上报区县代码,参照6位行政区划代码 + */ + private String qxBm; + + /** + * 上报区县名称 + */ + private String qxMc; + + /** + * 网格编码,参照《山东省社会治理网格化智能工作平台数据标准》 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 事件编号,可以使用区县系统中的事件唯一识别码 + */ + private String eventCode; + + /** + * 事件名称 + */ + private String eventName; + + /** + * 事件类别,参照《山东省社会治理网格化智能工作平台数据标准》10.19 + */ + private String eventCategory; + + /** + * 上报网格员姓名 + */ + private String gridUserName; + + /** + * 上报网格员的身份证号码 + */ + private String gridUserCardid; + + /** + * 事件上报时间 + */ + private Date reportTime; + + /** + * 事件发生时间 + */ + private Date happenTime; + + /** + * 事件发生地点描述 + */ + private String happenPlace; + + /** + * 事件简述,详细一些,文字数量不少于10字 + */ + private String eventDescription; + + /** + * 事件办结方式,符合《标准》10.20 + */ + private String waysOfResolving; + + /** + * 是否办结,填写Y、N(Y 是 N 否) + */ + private String successfulOrNo; + + /** + * 办结层级,符合《标准》10.21 + */ + private String completeLevel; + + /** + * 办结时间,办结后填写 + */ + private Date completeTime; + + /** + * 事件发生位置经度,wgs84坐标系,请勿用火星坐标系,不得跑出辖区 + */ + private BigDecimal lng; + + /** + * 事件发生位置纬度,wgs84坐标系,请勿用火星坐标系,不得跑出辖区 + */ + private BigDecimal lat; + + /** + * 事件主要当事人姓名 + */ + private String name; + + /** + * 事件涉及人数 + */ + private Integer numberInvolved; + + /** + * 事件涉及单位名称 + */ + private String relatedUnites; + + /** + * 出租人姓名 + */ + private String lessorName; + + /** + * 出租屋巡查结果,符合《标准》10.24 + */ + private String rentingResult; + + /** + * 重点场所类别,符合《标准》10.25 + */ + private String keyAreaType; + + /** + * 宗教活动规模,符合《标准》10.26 + */ + private String religionScale; + + /** + * 宗教类别,符合《标准》10.27 + */ + private String religionType; + + /** + * 重点场所是否变动,填写Y、N(Y 是 N 否) + */ + private String isKeyareaState; + + /** + * 重点人员是否在当地,填写Y、N(Y 是 N 否) + */ + private String isKeypeopleLocate; + + /** + * 重点人员现状描述 + */ + private String keypeopleStatus; + + /** + * 例行工作编辑插入、更新时间,县市区填写 + */ + private Date updateTime; + + /** + * 事件是否删除,Y:是、N:否 + */ + private String isDel; + + /** + * 入库时间,自动生成,请勿设置 + */ + private Date recoredInsertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java new file mode 100755 index 0000000000..6051db5f01 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java @@ -0,0 +1,105 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 平阴区网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("grid_info_pingyin") +public class GridInfoPingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 数据库主键自增字段,请勿指定 + */ + private Long id; + + /** + * 上报区县代码,参照6位行政区划代码 + */ + private String qxBm; + + /** + * 上报区县名称 + */ + private String qxMc; + + /** + * 网格编码,参照《标准》 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格层级,应符合10.1组织层级,所有层级上报 + */ + private Integer gridLevel; + + /** + * 专属网格类型,应符合10.28专属网格类型 + */ + private String gridType; + + /** + * 网格内人口规模,如果为农村和城市网格,字段必填,应符合10.29.网格内人口规模 + */ + private String populationSize; + + /** + * 是否成立网格党支部或网格党小组,Y:是、N:否 + */ + private String isPartyBranch; + + /** + * 网格党组织类型,是否成立党支部或党小组为是,此项必填。应符合10.37网格党组织类型。 + */ + private String partyBranchType; + + /** + * 网格中心点的经度 + */ + private BigDecimal lng; + + /** + * 网格中心点纬度 + */ + private BigDecimal lat; + + /** + * 网格颜色,如 #000000 + */ + private String gridColor; + + /** + * 网格信息编辑插入、更新时间,,县市区填写 + */ + private Date updateTime; + + /** + * 此网格是否删除,Y:是、N:否 + */ + private String isDel; + + /** + * 入库时间,自动生成,请勿设置 + */ + private Date recoredInsertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java new file mode 100755 index 0000000000..0a53873f89 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java @@ -0,0 +1,159 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 平阴区网格员基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("gridstaff_info_pingyin") +public class GridstaffInfoPingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 数据库主键自增字段,请勿指定 + */ + private Long id; + + /** + * 上报区县代码,参照6位行政区划代码 + */ + private String qxBm; + + /** + * 上报区县名称 + */ + private String qxMc; + + /** + * 区县系统中的网格员唯一编码 + */ + private String gridUserId; + + /** + * 网格编码 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格员姓名 + */ + private String nickName; + + /** + * 网格员身份证号码 + */ + private String cardNum; + + /** + * 网格员类型,符合《标准》10.3 + */ + private String userType; + + /** + * 网格员手机号 + */ + private String phonenumber; + + /** + * 网格员性别,应符合10.31中性别,不要有 其他 + */ + private String sex; + + /** + * 网格员民族,应符合10.32中民族 + */ + private String nation; + + /** + * 网格员政治面貌,符合GB/T 4762 + */ + private String paerty; + + /** + * 网格员出生日期 + */ + private Date birthday; + + /** + * 网格员学历,符合GB/T4658,博士、研究生会进行预警 + */ + private String education; + + /** + * 入职时间,格式为“YYYY-MM-DD” + */ + private Date entryDate; + + /** + * 是否离职,格式为Y:是、N:否 + */ + private String isLeave; + + /** + * 离职时间,格式为“YYYY-MM-DD” + */ + private Date leaveDate; + + /** + * 网格员年收入,含福利、补贴和保险等,应符合10.30中的网格员年收入,专职低于1w5、兼职大于3w会预警 + */ + private String income; + + /** + * 是否社区(村)两委委员,Y:是、N:否 + */ + private String isCommittee; + + /** + * 是否社区工作者,Y:是、N:否 + */ + private String isCommunityWorkers; + + /** + * 是否社会工作者,Y:是、N:否 + */ + private String isSocialWorker; + + /** + * 是否村(居)民小组长,Y:是、N:否 + */ + private String isVillageLeader; + + /** + * 是否警务助理,Y:是、N:否 + */ + private String isPoliceAssistant; + + /** + * 是否人民调解员,Y:是、N:否 + */ + private String isMediator; + + /** + * 网格员信息编辑插入、更新时间,,县市区填写 + */ + private Date updateTime; + + /** + * 入库时间,自动生成,请勿设置 + */ + private Date recoredInsertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffWorkInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffWorkInfoPingyinEntity.java new file mode 100755 index 0000000000..4583256c90 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffWorkInfoPingyinEntity.java @@ -0,0 +1,89 @@ +package com.epmet.opendata.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 平阴区网格员例行工作信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("gridstaff_work_info_pingyin") +public class GridstaffWorkInfoPingyinEntity { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 上报区县代码,参照6位行政区划代码 + */ + private String qxBm; + + /** + * 上报区县名称 + */ + private String qxMc; + + /** + * 网格编码 + */ + private String gridCode; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 例行工作类型,应符合10.27中的例行工作类型 + */ + private String workType; + + /** + * 发生日期,格式为“YYYY-MM-DD” + */ + private Date happenTime; + + /** + * 基础信息主键,出租房巡查、重点场所巡查、刑满释放人员、社区矫正、吸毒人员、信访人员重点青少年和精神障碍者必填 + */ + private Integer baseInfoId; + + /** + * 有无变动(异常),Y:是、N:否 + */ + private String workResult; + + /** + * 说明 + */ + private String workContent; + + /** + * 例行工作编辑插入、更新时间,,县市区填写 + */ + private Date updateTime; + + /** + * 例行工作是否删除,Y:是、N:否 + */ + private String isDel; + + /** + * 入库时间,自动生成,请勿设置 + */ + private Date recoredInsertTime; + +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/EventreportPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/EventreportPingyinService.java new file mode 100755 index 0000000000..68433043d3 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/EventreportPingyinService.java @@ -0,0 +1,14 @@ +package com.epmet.opendata.service; + + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.opendata.entity.EventreportPingyinEntity; + +/** + * 平阴区事件上报中间表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +public interface EventreportPingyinService extends BaseService { +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java new file mode 100755 index 0000000000..096739ee37 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.opendata.entity.GridInfoPingyinEntity; + +import java.util.Map; + +/** + * 平阴区网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +public interface GridInfoPingyinService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java new file mode 100755 index 0000000000..ccf0cbc681 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; + +import java.util.Map; + +/** + * 平阴区网格员基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +public interface GridstaffInfoPingyinService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffWorkInfoPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffWorkInfoPingyinService.java new file mode 100755 index 0000000000..39c7d2bfe8 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffWorkInfoPingyinService.java @@ -0,0 +1,16 @@ +package com.epmet.opendata.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.opendata.entity.GridstaffWorkInfoPingyinEntity; + +import java.util.Map; + +/** + * 平阴区网格员例行工作信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +public interface GridstaffWorkInfoPingyinService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java new file mode 100755 index 0000000000..7a4a5e69ac --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -0,0 +1,19 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.opendata.dao.EventreportPingyinDao; +import com.epmet.opendata.entity.EventreportPingyinEntity; +import com.epmet.opendata.service.EventreportPingyinService; +import org.springframework.stereotype.Service; + +/** + * 平阴区事件上报中间表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Service +public class EventreportPingyinServiceImpl extends BaseServiceImpl implements EventreportPingyinService { + + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java new file mode 100755 index 0000000000..2e0574706a --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -0,0 +1,19 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.opendata.dao.GridInfoPingyinDao; +import com.epmet.opendata.entity.GridInfoPingyinEntity; +import com.epmet.opendata.service.GridInfoPingyinService; +import org.springframework.stereotype.Service; + + +/** + * 平阴区网格表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Service +public class GridInfoPingyinServiceImpl extends BaseServiceImpl implements GridInfoPingyinService { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java new file mode 100755 index 0000000000..6bd94f326d --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -0,0 +1,18 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.opendata.dao.GridstaffInfoPingyinDao; +import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; +import com.epmet.opendata.service.GridstaffInfoPingyinService; +import org.springframework.stereotype.Service; + +/** + * 平阴区网格员基础信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Service +public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl implements GridstaffInfoPingyinService { + +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java new file mode 100755 index 0000000000..405640c9db --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java @@ -0,0 +1,17 @@ +package com.epmet.opendata.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.opendata.dao.GridstaffWorkInfoPingyinDao; +import com.epmet.opendata.entity.GridstaffWorkInfoPingyinEntity; +import com.epmet.opendata.service.GridstaffWorkInfoPingyinService; +import org.springframework.stereotype.Service; + +/** + * 平阴区网格员例行工作信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-22 + */ +@Service +public class GridstaffWorkInfoPingyinServiceImpl extends BaseServiceImpl implements GridstaffWorkInfoPingyinService { +} \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml new file mode 100755 index 0000000000..a4e026b73b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/EventreportPingyinDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml new file mode 100755 index 0000000000..3cb20d2d76 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml new file mode 100755 index 0000000000..c42fd9482b --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml new file mode 100755 index 0000000000..44396702fc --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 7ccf7dc2d9749e5f8b8b974f3d42b4d6dbaa2f6d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 Jul 2022 14:06:59 +0800 Subject: [PATCH 03/57] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=8B=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/GridStaffUploadtFormDTO.java | 26 +++++++++++++ .../dto/result/GridStaffUploadResultDTO.java | 39 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 3 ++ .../EpmetUserOpenFeignClientFallback.java | 5 +++ .../controller/CustomerStaffController.java | 9 +++++ .../java/com/epmet/dao/CustomerStaffDao.java | 2 + .../epmet/service/CustomerStaffService.java | 2 + .../impl/CustomerStaffServiceImpl.java | 6 +++ .../resources/mapper/CustomerStaffDao.xml | 15 +++++++ 9 files changed, 107 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java new file mode 100644 index 0000000000..687adcaafc --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @description: 网格工作人员数据上报-查询客户网格下有效工作人员信息数据 + * @author: sun + */ +@NoArgsConstructor +@Data +public class GridStaffUploadtFormDTO { + + /** + * 客户Id + */ + private String customerId; + /** + * 网格Id + */ + private List gridId; + + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java new file mode 100644 index 0000000000..bc1c086578 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.util.List; + +/** + * @description: 网格工作人员数据上报-查询客户网格下有效工作人员信息数据 + * @author: sun + */ +@Data +public class GridStaffUploadResultDTO { + /** + * 区县系统中的网格员唯一编码 + */ + private String gridUserId; + + /** + * 网格员姓名 + */ + private String nickName; + + /** + * 网格员身份证号码 + */ + private String cardNum; + + /** + * 网格员手机号 + */ + private String phonenumber; + + /** + * 网格员性别,应符合10.31中性别,不要有 其他 + */ + private String sex; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index d52625b704..84dfc8ecb6 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -846,4 +846,7 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icResiUserDataSync/icDataSyncTask") Result icDataSyncTask(String customerId); + + @PostMapping("/epmetuser/customerstaff/gridstaffupload") + Result> gridStaffUploadt(@RequestBody GridStaffUploadtFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 56b203743a..701c47715d 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -641,4 +641,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "icDataSyncTask", customerId); } + @Override + public Result> gridStaffUploadt(GridStaffUploadtFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "gridStaffUploadt", formDTO); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index 274cb8ed87..ccb7f1ba12 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -493,5 +493,14 @@ public class CustomerStaffController { return new Result>().ok(customerStaffService.gridMobileList(formDTO.getGridId(), tokenDto.getUserId())); } + /** + * @Author sun + * @Description 网格工作人员数据上报-查询客户网格下有效工作人员信息数据 + **/ + @PostMapping(value = "gridstaffupload") + public Result> gridStaffUploadt(@RequestBody GridStaffUploadtFormDTO formDTO) { + return new Result>().ok(customerStaffService.gridStaffUploadt(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java index 725a456b46..a21621d56f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java @@ -229,4 +229,6 @@ public interface CustomerStaffDao extends BaseDao { * @Description 工作人员基本信息 **/ List gridStaffMobileList(List staffIdList); + + List getStaffByCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index e986aa8f07..ce456354e3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -347,4 +347,6 @@ public interface CustomerStaffService extends BaseService { * @Description 【事件】网格员服务电话 **/ List gridMobileList(String gridId, String userId); + + List gridStaffUploadt(GridStaffUploadtFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 024d3aed37..4653fc8316 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -856,4 +856,10 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl gridStaffUploadt(GridStaffUploadtFormDTO formDTO) { + //1.查询客户下有效工作人员信息 + return baseDao.getStaffByCustomerId(formDTO.getCustomerId()); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 10965b93ce..4335ca3468 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -456,4 +456,19 @@ + + From b15826578238208a5d5241a6666a688b887c36d4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 Jul 2022 14:38:09 +0800 Subject: [PATCH 04/57] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E4=B8=8B=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=BA=BA=E5=91=98=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/CustomerGridStaffListFormDTO.java | 16 +++++++++ .../CustomerGridStaffListResultDTO.java | 34 +++++++++++++++++++ .../epmet/feign/GovOrgOpenFeignClient.java | 4 +++ .../GovOrgOpenFeignClientFallback.java | 5 +++ .../CustomerStaffGridController.java | 15 ++++++-- .../com/epmet/dao/CustomerStaffGridDao.java | 2 ++ .../service/CustomerStaffGridService.java | 3 ++ .../impl/CustomerStaffGridServiceImpl.java | 8 +++++ .../resources/mapper/CustomerStaffGridDao.xml | 16 +++++++++ .../dto/form/GridStaffUploadtFormDTO.java | 4 --- .../epmet/feign/EpmetUserOpenFeignClient.java | 4 +-- .../EpmetUserOpenFeignClientFallback.java | 4 +-- .../controller/CustomerStaffController.java | 6 ++-- .../epmet/service/CustomerStaffService.java | 2 +- .../impl/CustomerStaffServiceImpl.java | 2 +- 15 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridStaffListFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffListResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridStaffListFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridStaffListFormDTO.java new file mode 100644 index 0000000000..49b8dbc6c6 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/CustomerGridStaffListFormDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + + +@Data +public class CustomerGridStaffListFormDTO implements Serializable { + + /** + * 客户Id + */ + private String customerId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffListResultDTO.java new file mode 100644 index 0000000000..9d138437e9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffListResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @DESC + */ +@Data +public class CustomerGridStaffListResultDTO implements Serializable { + + /** + * 网格Id + */ + private String gridId; + + /** + * 网格编码 + */ + private String gridCode; + + /** + * 网格名 + */ + private String gridName; + + /** + * 区县系统中的网格员唯一编码 + */ + private String gridUserId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index b7c17a255d..8ffbd28528 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -695,4 +695,8 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/coverage/dictinit/{customerId}") Result dictInit(@PathVariable(value = "customerId") String customerId); + + @PostMapping("/gov/org/customerstaffgrid/gridstaff") + Result> gridStaff(CustomerGridStaffListFormDTO dto); + } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index 0a8e690f38..c64544ef0f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -445,4 +445,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "dictInit", customerId); } + @Override + public Result> gridStaff(CustomerGridStaffListFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaff", dto); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java index 8858cac625..392594a1da 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java @@ -29,10 +29,10 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.CommonGridIdFormDTO; +import com.epmet.dto.form.CustomerGridStaffListFormDTO; +import com.epmet.dto.form.GridStaffUploadtFormDTO; import com.epmet.dto.form.LatestGridFormDTO; -import com.epmet.dto.result.CustomerGridByUserIdResultDTO; -import com.epmet.dto.result.EventTitleOrgResultDTO; -import com.epmet.dto.result.GridStaffResultDTO; +import com.epmet.dto.result.*; import com.epmet.excel.CustomerStaffGridExcel; import com.epmet.service.CustomerStaffGridService; import org.springframework.beans.factory.annotation.Autowired; @@ -156,4 +156,13 @@ public class CustomerStaffGridController { public Result> getAllStaffByGridId(@RequestParam("gridId")String gridId){ return new Result>().ok(customerStaffGridService.getAllStaffByGridId(gridId)); } + + /** + * @Author sun + * @Description 网格下工作人员列表 + **/ + @PostMapping(value = "gridstaff") + public Result> gridStaff(@RequestBody CustomerGridStaffListFormDTO formDTO) { + return new Result>().ok(customerStaffGridService.gridStaff(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java index ed00369f86..fa95c587e4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.StaffOrgRelationDTO; import com.epmet.dto.form.LatestGridFormDTO; +import com.epmet.dto.result.CustomerGridStaffListResultDTO; import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; @@ -130,4 +131,5 @@ public interface CustomerStaffGridDao extends BaseDao { */ List getAllStaffByGridId(String gridId); + List getGridStaffByCustomerId(@Param("customerId") String customerId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java index c6b606e7df..899256eaf4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java @@ -22,8 +22,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.CommonGridIdFormDTO; +import com.epmet.dto.form.CustomerGridStaffListFormDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.CustomerGridStaffListResultDTO; import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; @@ -142,4 +144,5 @@ public interface CustomerStaffGridService extends BaseService getAllStaffByGridId(String gridId); + List gridStaff(CustomerGridStaffListFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java index 4cc572edc8..c80d01bb9e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java @@ -29,8 +29,10 @@ import com.epmet.dao.CustomerStaffGridDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerStaffGridDTO; import com.epmet.dto.form.CommonGridIdFormDTO; +import com.epmet.dto.form.CustomerGridStaffListFormDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.CustomerGridByUserIdResultDTO; +import com.epmet.dto.result.CustomerGridStaffListResultDTO; import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; import com.epmet.entity.CustomerStaffGridEntity; @@ -202,4 +204,10 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl getAllStaffByGridId(String gridId) { return baseDao.getAllStaffByGridId(gridId); } + + @Override + public List gridStaff(CustomerGridStaffListFormDTO formDTO) { + return baseDao.getGridStaffByCustomerId(formDTO.getCustomerId()); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index db1fa9571b..1cca1f20a0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -196,4 +196,20 @@ WHERE DEL_FLAG = '0' AND GRID_ID = #{gridId} + + + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java index 687adcaafc..78cd488d87 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffUploadtFormDTO.java @@ -17,10 +17,6 @@ public class GridStaffUploadtFormDTO { * 客户Id */ private String customerId; - /** - * 网格Id - */ - private List gridId; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 84dfc8ecb6..58cc398678 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -847,6 +847,6 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/icResiUserDataSync/icDataSyncTask") Result icDataSyncTask(String customerId); - @PostMapping("/epmetuser/customerstaff/gridstaffupload") - Result> gridStaffUploadt(@RequestBody GridStaffUploadtFormDTO formDTO); + @PostMapping("/epmetuser/customerstaff/customerstaff") + Result> customerStaff(@RequestBody GridStaffUploadtFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 701c47715d..906c1a3e85 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -642,8 +642,8 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien } @Override - public Result> gridStaffUploadt(GridStaffUploadtFormDTO formDTO) { - return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "gridStaffUploadt", formDTO); + public Result> customerStaff(GridStaffUploadtFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "customerStaff", formDTO); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index ccb7f1ba12..586bacf3c2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -497,9 +497,9 @@ public class CustomerStaffController { * @Author sun * @Description 网格工作人员数据上报-查询客户网格下有效工作人员信息数据 **/ - @PostMapping(value = "gridstaffupload") - public Result> gridStaffUploadt(@RequestBody GridStaffUploadtFormDTO formDTO) { - return new Result>().ok(customerStaffService.gridStaffUploadt(formDTO)); + @PostMapping(value = "customerstaff") + public Result> customerStaff(@RequestBody GridStaffUploadtFormDTO formDTO) { + return new Result>().ok(customerStaffService.customerStaff(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index ce456354e3..3f0819ad85 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -348,5 +348,5 @@ public interface CustomerStaffService extends BaseService { **/ List gridMobileList(String gridId, String userId); - List gridStaffUploadt(GridStaffUploadtFormDTO formDTO); + List customerStaff(GridStaffUploadtFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 4653fc8316..ef4ca7de13 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -857,7 +857,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl gridStaffUploadt(GridStaffUploadtFormDTO formDTO) { + public List customerStaff(GridStaffUploadtFormDTO formDTO) { //1.查询客户下有效工作人员信息 return baseDao.getStaffByCustomerId(formDTO.getCustomerId()); } From 508caf19c97921f7345636d10c9660037e09cd9b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 15:42:06 +0800 Subject: [PATCH 05/57] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=E5=88=B0pingyin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/org/result/CustomerAgencyDTO.java | 10 ++ .../feign/DataStatisticalOpenFeignClient.java | 4 +- .../resources/mapper/org/CustomerGridDao.xml | 2 + .../mapper/org/StatsCustomerAgencyDao.xml | 2 + .../form/ExractGridInfoPingYinFormDTO.java | 38 ++++ .../controller/GridInfoPingyinController.java | 39 +++-- .../opendata/dao/GridInfoPingyinDao.java | 17 +- .../OpenDataOrgChangeEventListener.java | 30 +++- .../service/GridInfoPingyinService.java | 15 +- .../impl/GridInfoPingyinServiceImpl.java | 164 ++++++++++++++++++ .../resources/mapper/GridInfoPingyinDao.xml | 21 +++ 11 files changed, 318 insertions(+), 24 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java index 658a3e9c2d..e281c7400e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerAgencyDTO.java @@ -147,4 +147,14 @@ public class CustomerAgencyDTO implements Serializable { * 社区 */ private String community; + + /** + * 中心位置经度 + */ + private String longitude; + + /** + * 中心位置纬度 + */ + private String latitude; } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 67f56957dc..1c865240ea 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -36,8 +36,8 @@ import java.util.List; * @author: jianjun liu */ //url="http://localhost:8108" -//@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallback = DataStatisticalOpenFeignClientFallBack.class, url = "http://localhost:6666") -@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class) +@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class, url = "http://localhost:8108") +// @FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class) public interface DataStatisticalOpenFeignClient { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index 7ab6ca322c..8622167974 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -160,6 +160,8 @@ customer_grid WHERE del_flag = '0' AND customer_id = #{customerId} + and CODE is not null + and CODE !='' #{gridId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml index fa5da30046..105a4efcc7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml @@ -216,6 +216,8 @@ customer_agency WHERE del_flag = '0' AND customer_id = #{customerId} + and CODE is not null + and CODE !='' #{agencyId} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java new file mode 100644 index 0000000000..d57c25a387 --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java @@ -0,0 +1,38 @@ +package com.epmet.opendata.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/7/22 14:02 + */ +@Data +public class ExractGridInfoPingYinFormDTO implements Serializable { + + public interface GridInfo extends CustomerClientShowGroup { + } + + /** + * 客户Id + */ + @NotBlank(message = "客户Id不能为空", groups = {GridInfo.class}) + private String customerId = ""; + + /** + * 网格Id或者组织id + */ + private List orgIdList; + + /** + * 操作类型【新增:add 修改删除:edit 初始化所有数据:all】 + */ + @NotBlank(message = "操作类型【新增:add 修改删除:edit 初始化所有数据:all】不能为空", groups = {GridInfo.class}) + private String type; +} + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java index 26e84cad1a..2a1ac80444 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/GridInfoPingyinController.java @@ -1,19 +1,14 @@ package com.epmet.opendata.controller; -import com.epmet.commons.tools.aop.NoRepeatSubmit; -import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.opendata.dto.form.ExractGridInfoPingYinFormDTO; +import com.epmet.opendata.service.GridInfoPingyinService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.Map; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** @@ -26,6 +21,28 @@ import java.util.Map; @RequestMapping("gridInfoPingyin") public class GridInfoPingyinController { + @Autowired + private GridInfoPingyinService gridInfoPingyinService; + /** + * @Author yzm + * @Description 组织基础信息中间库同步 + **/ + @PostMapping("extract-agency") + public Result getAgencyBaseInfo(@RequestBody ExractGridInfoPingYinFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ExractGridInfoPingYinFormDTO.GridInfo.class); + gridInfoPingyinService.exractAgency(formDTO); + return new Result(); + } + /** + * @Author yzm + * @Description 网格基础信息中间库同步 + **/ + @PostMapping("extract-grid") + public Result getGridBaseInfo(@RequestBody ExractGridInfoPingYinFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ExractGridInfoPingYinFormDTO.GridInfo.class); + gridInfoPingyinService.exractGrid(formDTO); + return new Result(); + } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java index fc6be9e1db..e070cc30ce 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -3,6 +3,10 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.opendata.entity.GridInfoPingyinEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.math.BigDecimal; +import java.util.List; /** * 平阴区网格表 @@ -12,5 +16,16 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GridInfoPingyinDao extends BaseDao { - + + int deleteAllAgencyData(); + + int deleteAllGridData(); + + List selectByGridCode(String gridCode); + + int updateSomeCol(@Param("id") Long id, + @Param("gridName")String gridName, + @Param("gridLevel")Integer gridLevel, + @Param("lng")BigDecimal lng, + @Param("lat")BigDecimal lat); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java index 928489f8b0..02fc563a78 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java @@ -10,8 +10,8 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; -import com.epmet.opendata.dto.form.ExDeptFormDTO; -import com.epmet.opendata.service.ExDeptService; +import com.epmet.opendata.dto.form.ExractGridInfoPingYinFormDTO; +import com.epmet.opendata.service.GridInfoPingyinService; import org.apache.commons.lang.StringUtils; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; @@ -78,17 +78,31 @@ public class OpenDataOrgChangeEventListener implements MessageListenerConcurrent lock = distributedLock.getLock(String.format("lock:open_data_org:%s", obj.getOrgId()), 30L, 30L, TimeUnit.SECONDS); - ExDeptFormDTO dto = new ExDeptFormDTO(); - dto.setCustomerId(obj.getCustomerId()); - dto.setType(obj.getType()); + // ExDeptFormDTO dto = new ExDeptFormDTO(); + // dto.setCustomerId(obj.getCustomerId()); + // dto.setType(obj.getType()); + // List orgIdList = new ArrayList<>(); + // orgIdList.add(obj.getOrgId()); + // dto.setOrgIdList(orgIdList); + // if ("agency".equals(obj.getOrgType())) { + // SpringContextUtils.getBean(ExDeptService.class).getAgencyBaseInfo(dto); + // } else { + // SpringContextUtils.getBean(ExDeptService.class).getGridBaseInfo(dto); + // } + + // 抽取到grid_info_pingyin + ExractGridInfoPingYinFormDTO extractFormDto = new ExractGridInfoPingYinFormDTO(); + extractFormDto.setCustomerId(obj.getCustomerId()); + extractFormDto.setType(obj.getType()); List orgIdList = new ArrayList<>(); orgIdList.add(obj.getOrgId()); - dto.setOrgIdList(orgIdList); + extractFormDto.setOrgIdList(orgIdList); if ("agency".equals(obj.getOrgType())) { - SpringContextUtils.getBean(ExDeptService.class).getAgencyBaseInfo(dto); + SpringContextUtils.getBean(GridInfoPingyinService.class).exractAgency(extractFormDto); } else { - SpringContextUtils.getBean(ExDeptService.class).getGridBaseInfo(dto); + SpringContextUtils.getBean(GridInfoPingyinService.class).exractGrid(extractFormDto); } + } catch (RenException e) { // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 logger.error("【开放数据事件监听器】-组织信息变更-同步信息到中间库失败:".concat(ExceptionUtils.getErrorStackTrace(e))); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java index 096739ee37..3feaabc3eb 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridInfoPingyinService.java @@ -1,10 +1,9 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.opendata.dto.form.ExractGridInfoPingYinFormDTO; import com.epmet.opendata.entity.GridInfoPingyinEntity; -import java.util.Map; - /** * 平阴区网格表 * @@ -12,5 +11,17 @@ import java.util.Map; * @since v1.0.0 2022-07-22 */ public interface GridInfoPingyinService extends BaseService { + /** + * 抽取customer_agency到grid_info_pingyin表 + * + * @param formDTO + */ + void exractAgency(ExractGridInfoPingYinFormDTO formDTO); + /** + * 抽取customer_grid到grid_info_pingyin表 + * + * @param formDTO + */ + void exractGrid(ExractGridInfoPingYinFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 2e0574706a..d9e505adef 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -1,11 +1,27 @@ package com.epmet.opendata.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dto.org.result.CustomerAgencyDTO; +import com.epmet.dto.org.result.CustomerGridDTO; +import com.epmet.feign.DataStatisticalOpenFeignClient; import com.epmet.opendata.dao.GridInfoPingyinDao; +import com.epmet.opendata.dto.form.ExractGridInfoPingYinFormDTO; import com.epmet.opendata.entity.GridInfoPingyinEntity; import com.epmet.opendata.service.GridInfoPingyinService; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + /** * 平阴区网格表 @@ -15,5 +31,153 @@ import org.springframework.stereotype.Service; */ @Service public class GridInfoPingyinServiceImpl extends BaseServiceImpl implements GridInfoPingyinService { + @Autowired + private DataStatisticalOpenFeignClient dataStatisticalOpenFeignClient; + + + /** + * 抽取customer_agency到grid_info_pingyin表 + * + * @param formDTO + */ + @Override + public void exractAgency(ExractGridInfoPingYinFormDTO formDTO) { + // 1.查询组织基础信息,customer_agency.code为空的不抽取 + com.epmet.dto.org.form.GridBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.org.form.GridBaseInfoFormDTO.class); + Result> result = dataStatisticalOpenFeignClient.getAgencyBaseInfo(formDTO1); + if (!result.success()) { + throw new RenException(result.getInternalMsg()); + } + if (null == result.getData() || result.getData().size() < NumConstant.ONE) { + return; + } + // 2.封装数据 + List gridInfoList = new ArrayList<>(); + result.getData().forEach(ag -> { + GridInfoPingyinEntity entity = new GridInfoPingyinEntity(); + entity.setQxBm("370124"); + entity.setQxMc("平阴县"); + entity.setGridCode(ag.getCode()); + entity.setGridName(ag.getOrganizationName()); + if ("district".equals(ag.getLevel())) { + entity.setGridLevel(3); + } else if ("street".equals(ag.getLevel())) { + entity.setGridLevel(4); + } else if ("community".equals(ag.getLevel())) { + entity.setGridLevel(6); + } + entity.setLat(new BigDecimal(ag.getLatitude())); + entity.setLng(new BigDecimal(ag.getLongitude())); + gridInfoList.add(entity); + }); + // 3、初始化传all;新增或者编辑 + if ("all".equals(formDTO.getType())) { + // 全删,全增 + baseDao.deleteAllAgencyData(); + // 一次100 + List> partition = ListUtils.partition(gridInfoList, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> { + this.insertBatch(list); + }); + + } else if ("add".equals(formDTO.getType())) { + // 单独新增组织 + this.insertBatch(gridInfoList); + + } else if ("edit".equals(formDTO.getType())) { + // 修改组织时,先根据code查询,如果有数据,更新 + for (GridInfoPingyinEntity entity : gridInfoList) { + + List orginList = baseDao.selectByGridCode(entity.getGridCode()); + + if (CollectionUtils.isNotEmpty(orginList)) { + + // 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度 + for (GridInfoPingyinEntity oigin : orginList) { + baseDao.updateSomeCol(oigin.getId(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat()); + } + + } else { + // 插入 + baseDao.insert(entity); + } + } + } + + } + + /** + * 抽取customer_grid到grid_info_pingyin表 + * + * @param formDTO + */ + @Override + public void exractGrid(ExractGridInfoPingYinFormDTO formDTO) { + // 1.查询网格基础信息 + com.epmet.dto.org.form.GridBaseInfoFormDTO formDTO1 = ConvertUtils.sourceToTarget(formDTO, com.epmet.dto.org.form.GridBaseInfoFormDTO.class); + Result> result = dataStatisticalOpenFeignClient.getGridBaseInfo(formDTO1); + if (!result.success()) { + throw new RenException(result.getInternalMsg()); + } + if (null == result.getData() || result.getData().size() < NumConstant.ONE) { + return; + } + + // 2.封装数据 + List gridInfoList = new ArrayList<>(); + result.getData().forEach(ag -> { + GridInfoPingyinEntity entity = new GridInfoPingyinEntity(); + entity.setQxBm("370124"); + entity.setQxMc("平阴县"); + entity.setGridCode(ag.getCode()); + entity.setGridName(ag.getGridName()); + entity.setGridLevel(7); + if (ag.getLatitude().length() > 10) { + entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); + } else { + entity.setLat(new BigDecimal(ag.getLatitude())); + } + if (ag.getLongitude().length() > 10) { + entity.setLng(new BigDecimal(ag.getLongitude().substring(0, 10))); + } else { + entity.setLng(new BigDecimal(ag.getLongitude())); + } + gridInfoList.add(entity); + }); + // 3、初始化传all;新增或者编辑 + if ("all".equals(formDTO.getType())) { + // 全删,全增 + baseDao.deleteAllGridData(); + // 一次100 + List> partition = ListUtils.partition(gridInfoList, IndexCalConstant.INSERT_SIZE); + partition.forEach(list -> { + this.insertBatch(list); + }); + } else if ("add".equals(formDTO.getType())) { + // 单独新增组织 + this.insertBatch(gridInfoList); + + } else if ("edit".equals(formDTO.getType())) { + // 修改组织时,先根据code查询,如果有数据,更新 + for (GridInfoPingyinEntity entity : gridInfoList) { + + List orginList = baseDao.selectByGridCode(entity.getGridCode()); + + if (CollectionUtils.isNotEmpty(orginList)) { + + // 更新网格名称、网格层级、网格中心点的经度,网格中心点纬度 + for (GridInfoPingyinEntity oigin : orginList) { + baseDao.updateSomeCol(oigin.getId(), entity.getGridName(), entity.getGridLevel(), entity.getLng(), entity.getLat()); + } + + } else { + // 插入 + baseDao.insert(entity); + } + } + } + + } + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml index 3cb20d2d76..fd75c023f0 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -22,5 +22,26 @@ + + delete from grid_info_pingyin where grid_level !='7' + + + + delete from grid_info_pingyin where grid_level ='7' + + + + + + update grid_info_pingyin + set grid_name = #{gridName}, + grid_level = #{gridLevel}, + lng = #{lng}, + lat = #{lat} + where id = #{id} + \ No newline at end of file From 1846909e2b8de063627a64308583773459e72d46 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 15:43:25 +0800 Subject: [PATCH 06/57] DataStatisticalOpenFeignClient --- .../java/com/epmet/feign/DataStatisticalOpenFeignClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 1c865240ea..7bdcd41b37 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -36,8 +36,8 @@ import java.util.List; * @author: jianjun liu */ //url="http://localhost:8108" -@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class, url = "http://localhost:8108") -// @FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class) +// @FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class, url = "http://localhost:8108") +@FeignClient(name = ServiceConstant.DATA_STATISTICAL_SERVER, fallbackFactory = DataStatisticalOpenFeignClientFallBackFactory.class) public interface DataStatisticalOpenFeignClient { /** From 4f55bf2bbbc7ef6bf7b0c38b77c35abb76988f20 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 15:52:16 +0800 Subject: [PATCH 07/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/basereport/form/EventInfoFormDTO.java | 7 + .../feign/DataStatisticalOpenFeignClient.java | 3 +- ...ataStatisticalOpenFeignClientFallBack.java | 5 + .../controller/DataReportingController.java | 5 +- .../screen/ScreenProjectDataDao.java | 1 + .../epmet/service/DataReportingService.java | 9 ++ .../screen/ScreenProjectDataService.java | 2 +- .../impl/ScreenProjectDataServiceImpl.java | 5 + .../impl/DataReportingServiceImpl.java | 63 +++++++++ .../screen/ScreenProjectDataDao.xml | 74 +++++++++++ .../EventreportPingyinController.java | 34 +++-- .../opendata/dao/EventreportPingyinDao.java | 2 +- .../OpenDataProjectChangeEventListener.java | 5 +- .../service/EventreportPingyinService.java | 9 ++ .../impl/EventreportPingyinServiceImpl.java | 125 ++++++++++++++++++ .../mapper/EventreportPingyinDao.xml | 3 + 16 files changed, 333 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java index 8e6c99d562..c54642b6f1 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/basereport/form/EventInfoFormDTO.java @@ -20,4 +20,11 @@ public class EventInfoFormDTO extends PageFormDTO implements Serializable { * 操作类型【新增:add 修改删除:edit】 */ private String type; + /** + * 是否初始化, 通常用于初期初始化数据,由自己控制 + * 0不初始化,有则更新,没有则新增 + * 1完全初始化,删除全部数据 + * 2在完全初始化之后,由于eventreport_pingyin表没有客户ID,初始化其他客户的数据时候可以设2,直接新增 + */ + private String initFlag = "0"; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java index 7bdcd41b37..ffd9da0f11 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java @@ -341,7 +341,8 @@ public interface DataStatisticalOpenFeignClient { */ @PostMapping("/data/stats/datareporting/eventinfo") Result> getEventInfo(@RequestBody EventInfoFormDTO formDTO); - + @PostMapping("/data/stats/datareporting/eventinfoV2") + Result> getEventInfoV2(@RequestBody EventInfoFormDTO formDTO); /** * wangxianzhang * diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java index b5bb0013c4..a46ceb0635 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java @@ -333,6 +333,11 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getEventInfo", formDTO); } + @Override + public Result> getEventInfoV2(EventInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "getEventInfoV2", formDTO); + } + @Override public Result statsVolunteerDemandServicesDaily(String customerId) { return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "statsVolunteerDemandServicesDaily", customerId); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java index 85706430c4..a61a208f34 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DataReportingController.java @@ -102,5 +102,8 @@ public class DataReportingController { public Result> getEventInfo(@RequestBody(required = false) EventInfoFormDTO formDTO) { return new Result>().ok(dataReportingService.getEventInfo(formDTO)); } - + @PostMapping("eventinfoV2") + public Result> getEventInfoV2(@RequestBody(required = false) EventInfoFormDTO formDTO) { + return new Result>().ok(dataReportingService.getEventInfoV2(formDTO)); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java index db2b42ba5b..36a31e24cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -72,6 +72,7 @@ public interface ScreenProjectDataDao extends BaseDao { int updateProjectSatisfactionScore(@Param("projectId")String projectId, @Param("score")BigDecimal score); List selectProjectList(@Param("customerId") String customerId, @Param("projectIds") List projectIds); + List selectProjectListV2(@Param("customerId") String customerId, @Param("projectIds") List projectIds); /** * @Description 查询网格下的项目分类 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java index 921a2b3dde..db3012c803 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/DataReportingService.java @@ -69,4 +69,13 @@ public interface DataReportingService { */ List getEventInfo(EventInfoFormDTO formDTO); + /** + * 事件上报 + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/15 14:10 + */ + List getEventInfoV2(EventInfoFormDTO formDTO); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java index c0d124698f..e0b4386790 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java @@ -139,7 +139,7 @@ public interface ScreenProjectDataService extends BaseService getProjectList(String customerId, List projectId, Integer pageNo, Integer pageSize); - + List getProjectListV2(String customerId, List projectId, Integer pageNo, Integer pageSize); /** * 项目变更MQ * @Param msg diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index db975af203..f611edf8f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -309,6 +309,11 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl getProjectListV2(String customerId, List projectId, Integer pageNo, Integer pageSize) { + PageHelper.startPage(pageNo, pageSize, false); + return baseDao.selectProjectListV2(customerId, projectId); + } /** * @Description 项目变更MQ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 8b33031420..9501d90fd6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -201,12 +201,72 @@ public class DataReportingServiceImpl implements DataReportingService { return list.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<>(Comparator.comparing(EventInfoResultDTO::getId))), ArrayList::new)); } + /** + * 事件上报 + * + * @param formDTO + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/15 14:10 + */ + @Override + public List getEventInfoV2(EventInfoFormDTO formDTO) { + List list; + //根据入参,获取项目 + long start = System.currentTimeMillis(); + List projectList = screenProjectDataService.getProjectList(formDTO.getCustomerId(), formDTO.getProjectId(), formDTO.getPageNo(), formDTO.getPageSize()); + log.info("事件上报-查询项目列表耗时:{}ms",System.currentTimeMillis()-start); + //项目列表为空,返回空数组 + if(CollectionUtils.isEmpty(projectList)) { + return Collections.emptyList(); + } + start = System.currentTimeMillis(); + Map epmetCodeMap = new HashMap<>(); + Result parentCustomer = operCrmOpenFeignClient.getExternalAndParentCustomerId(formDTO.getCustomerId()); + if (StringUtils.isNotBlank(parentCustomer.getData())) { + epmetCodeMap = customerProjectCategoryDictService.getByCategoryCodeMap(parentCustomer.getData()); + } + Map codeMap = customerProjectCategoryDictService.getByCategoryCodeMap(formDTO.getCustomerId()); + //项目ID不为空时,因为只有一条,可以直接处理 + Map finalEpmetCodeMap = epmetCodeMap; + if (CollectionUtils.isNotEmpty(formDTO.getProjectId())) { + list = projectList.stream().map(project -> { + EventInfoResultDTO dto = getEventInfoResultDTO(project, finalEpmetCodeMap, codeMap); + ScreenCustomerGridDTO grid = screenCustomerGridService.getGridById(project.getOrgId()); + dto.setOrgId(project.getOrgId()); + if (null != grid) { + dto.setOrgCode(grid.getCode()); + dto.setOrgName(grid.getGridName()); + } + return dto; + }).collect(Collectors.toList()); + } else { + //项目ID不为空时,提前取出客户下的组织和网格 + Map agencyMap = screenCustomerAgencyService.getAgencyList(formDTO.getCustomerId()); + Map gridMap = screenCustomerGridService.getGridList(formDTO.getCustomerId()); + list = projectList.stream().map(project -> { + EventInfoResultDTO dto = getEventInfoResultDTO(project, finalEpmetCodeMap, codeMap); + ScreenCustomerGridDTO grid = gridMap.get(project.getOrgId()); + dto.setOrgId(project.getOrgId()); + if (null != grid) { + dto.setOrgCode(grid.getCode()); + dto.setOrgName(grid.getGridName()); + } + return dto; + }).collect(Collectors.toList()); + } + log.info("事件上报-组装数据耗时:{}ms",System.currentTimeMillis()-start); + return list.stream().collect(collectingAndThen(toCollection(() -> new TreeSet<>(Comparator.comparing(EventInfoResultDTO::getId))), ArrayList::new)); + } + private EventInfoResultDTO getEventInfoResultDTO(ScreenProjectDataDTO project, Map epmetCodeMap, Map codeMap) { EventInfoResultDTO dto = new EventInfoResultDTO(); dto.setId(project.getProjectId()); dto.setCustomerId(project.getCustomerId()); dto.setEventName(project.getProjectTitle()); dto.setReporterId(project.getProjectCreator()); + //获取工作人员姓名和身份证 String categoryCode = project.getCategoryCode().split(StrConstant.COMMA)[0]; String parentCode = null == codeMap.get(categoryCode)?null:codeMap.get(categoryCode).getParentCategoryCode(); //如果是孔村、榆山、锦水的项目需要关联分类字典表 @@ -333,4 +393,7 @@ public class DataReportingServiceImpl implements DataReportingService { return userService.getPatrolDetailList(formDTO); } + + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 6cf57e3109..68e2d9d27f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -269,6 +269,80 @@ ORDER BY a.CREATED_TIME ASC + + SELECT '370124' AS qxBm, + '平阴县' AS qxMc, + w.SECOND_WORK_TYPE AS workType, + w.GRID_ID, + w.GRID_NAME, + concat(w.HAPPEN_TIME,' 00:00:00') as happenTimeString, + w.WORK_RESULT, + w.WORK_CONTENT, + w.update_time, + w.create_time as recoredInsertTime + FROM base_grid_dailywork w + WHERE w.CUSTOMER_ID = #{customerId} + ORDER BY w.CREATE_TIME ASC + LIMIT #{size},1000 + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml index 44396702fc..ea3bc11030 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml @@ -18,6 +18,9 @@ + + delete from gridstaff_work_info_pingyin LIMIT 1000 + \ No newline at end of file From fa20c3cbee39c1521527833bf719045654ebe8af Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 16:23:05 +0800 Subject: [PATCH 12/57] =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=AD=A5=E4=B8=93?= =?UTF-8?q?=E5=B1=9E=E7=BD=91=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/org/CustomerGridDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index 8622167974..5d6dc4042c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -162,6 +162,7 @@ AND customer_id = #{customerId} and CODE is not null and CODE !='' + and grid_name not like '%专属网格' #{gridId} From ecf1072176a09418969c22f93c2bec9666a59731 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 22 Jul 2022 16:41:44 +0800 Subject: [PATCH 13/57] =?UTF-8?q?=E4=BE=8B=E8=A1=8C=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/service/impl/BaseGridDailyworkServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index 6c2e15dbe2..9542670330 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -189,7 +189,7 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 16:45:45 +0800 Subject: [PATCH 14/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/DataReportingServiceImpl.java | 1 + .../service/impl/EventreportPingyinServiceImpl.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 344911d767..22a853c0ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -350,6 +350,7 @@ public class DataReportingServiceImpl implements DataReportingService { dto.setCompleteTime(project.getCloseCaseTime()); dto.setLat(project.getLatitude()); dto.setLng(project.getLongitude()); + dto.setWaysOfResolving(ProjectConstant.PROJECT_SELF_CLOSED); return dto; } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index ca06381b14..082b46ae5d 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -93,6 +93,14 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl(); + staffWrapper.eq(GridstaffInfoPingyinEntity::getGridCode, item.getOrgCode()); + staffList = gridstaffInfoPingyinDao.selectList(staffWrapper); + if (CollectionUtils.isNotEmpty(staffList)) { + entity.setGridUserCardid(staffList.get(NumConstant.ZERO).getCardNum()); + entity.setGridUserName(staffList.get(NumConstant.ZERO).getNickName()); + } } entity.setReportTime(item.getReportTime()); From 56c91544f17ec85373878c300fd17417ba91a971 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 16:53:24 +0800 Subject: [PATCH 15/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EventreportPingyinServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 082b46ae5d..5c097e2a54 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -98,8 +98,13 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 16:55:46 +0800 Subject: [PATCH 16/57] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/feign/GovOrgOpenFeignClient.java | 2 +- .../epmet/feign/fallback/GovOrgOpenFeignClientFallback.java | 2 +- .../com/epmet/controller/CustomerStaffGridController.java | 6 +++--- .../java/com/epmet/service/CustomerStaffGridService.java | 2 +- .../epmet/service/impl/CustomerStaffGridServiceImpl.java | 3 ++- .../src/main/resources/mapper/CustomerStaffGridDao.xml | 2 +- .../service/impl/GridstaffInfoPingyinServiceImpl.java | 4 ++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 8ffbd28528..8967a44663 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -696,7 +696,7 @@ public interface GovOrgOpenFeignClient { @PostMapping("/gov/org/coverage/dictinit/{customerId}") Result dictInit(@PathVariable(value = "customerId") String customerId); - @PostMapping("/gov/org/customerstaffgrid/gridstaff") + @PostMapping("/gov/org/customerstaffgrid/gridstafflist") Result> gridStaff(CustomerGridStaffListFormDTO dto); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index c64544ef0f..9f16e0dc8e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -447,7 +447,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { @Override public Result> gridStaff(CustomerGridStaffListFormDTO dto) { - return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaff", dto); + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaffList", dto); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java index 392594a1da..1d7206e877 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java @@ -161,8 +161,8 @@ public class CustomerStaffGridController { * @Author sun * @Description 网格下工作人员列表 **/ - @PostMapping(value = "gridstaff") - public Result> gridStaff(@RequestBody CustomerGridStaffListFormDTO formDTO) { - return new Result>().ok(customerStaffGridService.gridStaff(formDTO)); + @PostMapping("gridstafflist") + public Result> gridStaffList(@RequestBody CustomerGridStaffListFormDTO formDTO) { + return new Result>().ok(customerStaffGridService.gridStaffList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java index 899256eaf4..49ac4b16b4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java @@ -144,5 +144,5 @@ public interface CustomerStaffGridService extends BaseService getAllStaffByGridId(String gridId); - List gridStaff(CustomerGridStaffListFormDTO formDTO); + List gridStaffList(CustomerGridStaffListFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java index c80d01bb9e..28896d3a8a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java @@ -206,7 +206,8 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl gridStaff(CustomerGridStaffListFormDTO formDTO) { + public List gridStaffList(CustomerGridStaffListFormDTO formDTO) { + //查询客户下未被禁用的工作人员基本信息 return baseDao.getGridStaffByCustomerId(formDTO.getCustomerId()); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index 1cca1f20a0..a6569342fd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -205,7 +205,7 @@ a.user_id gridUserId FROM customer_staff_grid a - INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' + INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' AND b.`code` is not null WHERE a.del_flag = '0' AND a.customer_id = #{customerId} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index f8d7b78a79..9af3b733fa 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -44,7 +44,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl> orgList = govOrgOpenFeignClient.gridStaff(org); @@ -53,7 +53,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl> userList = epmetUserOpenFeignClient.customerStaff(user); From e21ccd16cd59d72aadaacebb6d5c1f9a7a06a180 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 17:19:43 +0800 Subject: [PATCH 17/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EventreportPingyinServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 5c097e2a54..db470aacf0 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -107,7 +107,9 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getGridUserCardid())).collect(Collectors.toList()); if (NumConstant.ZERO_STR.equals(initFlag)) { entityList.forEach(entity -> { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); From 1f787e4262a64d71cfa6c4fd3d05f43db71dd770 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 Jul 2022 17:44:24 +0800 Subject: [PATCH 18/57] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8A=E6=8A=A5=20mq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/user/result/GridUserInfoDTO.java | 7 ++++ .../impl/DataReportingServiceImpl.java | 1 + .../epmet/feign/GovOrgOpenFeignClient.java | 4 +- .../opendata/dao/GridstaffInfoPingyinDao.java | 2 + .../OpenDataStaffChangeEventListener.java | 4 +- .../service/GridstaffInfoPingyinService.java | 7 ++++ .../impl/GridstaffInfoPingyinServiceImpl.java | 41 +++++++++++++++++++ .../mapper/GridstaffInfoPingyinDao.xml | 12 ++++++ .../dto/result/GridStaffUploadResultDTO.java | 13 +++++- .../epmet/feign/EpmetUserOpenFeignClient.java | 4 +- .../resources/mapper/CustomerStaffDao.xml | 4 +- 11 files changed, 91 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java index c70b0332e4..0cec8927b6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java @@ -20,6 +20,7 @@ package com.epmet.dto.user.result; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** @@ -78,6 +79,12 @@ public class GridUserInfoDTO implements Serializable { */ private String sex; + /** + * 网格员信息编辑插入、更新时间,,县市区填写 + */ + private Date updateTime; + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 22a853c0ed..6b75d8d8d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -118,6 +118,7 @@ public class DataReportingServiceImpl implements DataReportingService { st.setUserType(dto.getWorkType().equals("fulltime") ? "01" : "02"); st.setPhonenumber(dto.getMobile()); st.setSex(0 == dto.getGender() ? "9" : dto.getGender().toString()); + st.setUpdateTime(dto.getUpdatedTime()); } }); diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 8967a44663..a1cd92ff01 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -21,8 +21,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:37 */ -// @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092") -@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class) + @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092") +//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class) public interface GovOrgOpenFeignClient { /** diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java index d607093a12..ccbf1d6405 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java @@ -14,4 +14,6 @@ import org.apache.ibatis.annotations.Mapper; public interface GridstaffInfoPingyinDao extends BaseDao { void del(); + + void edit(GridstaffInfoPingyinEntity entity); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java index ad7bd79b62..0171205e28 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; import com.epmet.opendata.service.ExUserService; +import com.epmet.opendata.service.GridstaffInfoPingyinService; import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; @@ -86,7 +87,8 @@ public class OpenDataStaffChangeEventListener implements MessageListenerConcurre List staffIdList = new ArrayList<>(); staffIdList.add(obj.getOrgId()); dto.setStaffIdList(staffIdList); - SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto); + //SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto); + SpringContextUtils.getBean(GridstaffInfoPingyinService.class).getStaffBaseInfo(dto); } catch (RenException e) { // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 logger.error("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java index fc0ae09ed3..9164dad0ac 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/GridstaffInfoPingyinService.java @@ -2,6 +2,7 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.opendata.dto.form.GridStaffInfoFormDTO; +import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; import java.util.Map; @@ -15,4 +16,10 @@ import java.util.Map; public interface GridstaffInfoPingyinService extends BaseService { void gridStaffInfo(GridStaffInfoFormDTO formDTO); + + /** + * @Author sun + * @Description 网格员信息中间库同步 + **/ + void getStaffBaseInfo(StaffBaseInfoFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index 9af3b733fa..eb4bf5adc0 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -8,10 +8,14 @@ import com.epmet.dto.form.CustomerGridStaffListFormDTO; import com.epmet.dto.form.GridStaffUploadtFormDTO; import com.epmet.dto.result.CustomerGridStaffListResultDTO; import com.epmet.dto.result.GridStaffUploadResultDTO; +import com.epmet.dto.user.result.GridUserInfoDTO; +import com.epmet.feign.DataStatisticalOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.opendata.dao.GridstaffInfoPingyinDao; import com.epmet.opendata.dto.form.GridStaffInfoFormDTO; +import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; +import com.epmet.opendata.entity.ExUserEntity; import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; import com.epmet.opendata.service.GridstaffInfoPingyinService; import lombok.extern.slf4j.Slf4j; @@ -39,6 +43,8 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl> result = dataStatisticalOpenFeignClient.getStaffBaseInfo(formDTO1); + if (!result.success()) { + throw new RenException(result.getInternalMsg()); + } + + //2.中间库新增/修改数据【基本一个人一条数据,程序按批量处理】 + result.getData().forEach(r -> { + GridstaffInfoPingyinEntity entity = ConvertUtils.sourceToTarget(r, GridstaffInfoPingyinEntity.class); + entity.setQxBm("370124"); + entity.setQxMc("平阴县"); + entity.setGridCode(r.getCode()); + entity.setGridName(r.getGridName()); + entity.setUserType("01"); + entity.setIsLeave("N"); + if (!"staff_create".equals(formDTO.getType())) { + baseDao.edit(entity); + }else { + insert(entity); + } + }); + + + } + + } \ No newline at end of file diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml index 50b086ad03..9929895e9e 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml @@ -3,6 +3,18 @@ + + UPDATE gridstaff_info_pingyin + SET grid_name = #{gridName}, + nick_name = #{nickName}, + card_num = #{cardNum}, + phonenumber = #{phonenumber}, + sex = #{sex} + WHERE + grid_user_id = #{gridUserId} + AND grid_code = #{gridCode} + + delete from gridstaff_info_pingyin diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java index bc1c086578..16d0d386f5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GridStaffUploadResultDTO.java @@ -1,9 +1,8 @@ package com.epmet.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; -import java.util.List; +import java.util.Date; /** * @description: 网格工作人员数据上报-查询客户网格下有效工作人员信息数据 @@ -36,4 +35,14 @@ public class GridStaffUploadResultDTO { */ private String sex; + /** + * 网格员类型,符合《标准》10.3 + */ + private String userType; + + /** + * 网格员信息编辑插入、更新时间,,县市区填写 + */ + private Date updateTime; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index ff820d789f..9469423a92 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -25,8 +25,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 4335ca3468..e5d2289e5b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -462,7 +462,9 @@ real_name nickName, id_card cardNum, gender sex, - mobile phonenumber + mobile phonenumber, + IF(work_type = 'fulltime', '01', '02') userType, + updated_time updateTime FROM customer_staff WHERE From adcdda9cbf772352544aef5df0eafd164082909b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 Jul 2022 17:50:02 +0800 Subject: [PATCH 19/57] =?UTF-8?q?=E9=94=99=E6=8F=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java | 4 ++-- .../main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index a1cd92ff01..de9a14c512 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -21,8 +21,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:37 */ - @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092") -//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class) + //@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092") +@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class) public interface GovOrgOpenFeignClient { /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 9469423a92..ff820d789f 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -25,8 +25,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** From c34398b8febb465ac0a80ce395c783859a74e9d7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 18:17:24 +0800 Subject: [PATCH 20/57] =?UTF-8?q?=E4=BE=8B=E8=A1=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=20=E7=BD=91=E6=A0=BC=E7=A9=BA=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BaseGridDailyworkServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index 9542670330..bcb4df6f14 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -281,7 +281,12 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl list){ List insertList = new ArrayList<>(); - list.forEach(o-> insertList.add(buildNewEntity(o))); + list.forEach(o-> { + if (StringUtils.isBlank(o.getGridCode())){ + return; + } + insertList.add(buildNewEntity(o)); + }); //insert if (CollectionUtils.isEmpty(insertList)){ log.error("新构建要插入的数据为空,param:{}", JSON.toJSONString(list)); From 09550bd81c877556ea6376b7022fae2700bfcc52 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 18:20:05 +0800 Subject: [PATCH 21/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EventreportPingyinServiceImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index db470aacf0..d1a61e8de3 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -138,8 +138,15 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getGridUserCardid())).collect(Collectors.toList()); + //过滤掉必填字段为空的数据 + entityList = entityList.stream().filter(item -> + StringUtils.isNotBlank(item.getGridCode()) && StringUtils.isNotBlank(item.getGridName()) && + StringUtils.isNotBlank(item.getEventCategory()) && StringUtils.isNotBlank(item.getGridUserName()) && + StringUtils.isNotBlank(item.getGridUserCardid()) && null != item.getReportTime() && + null != item.getHappenTime() && StringUtils.isNotBlank(item.getHappenPlace()) && + StringUtils.isNotBlank(item.getGridUserCardid()) && StringUtils.isNotBlank(item.getEventDescription()) && + StringUtils.isNotBlank(item.getWaysOfResolving()) && null != item.getLng() && null != item.getLat() + ).collect(Collectors.toList()); if (NumConstant.ZERO_STR.equals(initFlag)) { entityList.forEach(entity -> { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); From 4c95d193732ed4ba9976649472153f256b6695c0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 19:22:13 +0800 Subject: [PATCH 22/57] =?UTF-8?q?=E5=AE=9E=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/dto/form/ExractGridInfoPingYinFormDTO.java | 4 +++- .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java index d57c25a387..b4324bb2ee 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java @@ -30,9 +30,11 @@ public class ExractGridInfoPingYinFormDTO implements Serializable { private List orgIdList; /** - * 操作类型【新增:add 修改删除:edit 初始化所有数据:all】 + * 废弃:这个不对。操作类型【新增:add 修改删除:edit 初始化所有数据:all】 + * 操作类型【组织新增:agency_create 组织变更:agency_change 网格新增:grid_create 网格变更:grid_change 人员新增:staff_create 人员变更:staff_change】 */ @NotBlank(message = "操作类型【新增:add 修改删除:edit 初始化所有数据:all】不能为空", groups = {GridInfo.class}) + private String type; } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index d9e505adef..b7a15afd09 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -80,11 +80,11 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl { this.insertBatch(list); }); - } else if ("add".equals(formDTO.getType())) { + } else if (formDTO.getType().contains("create")) { // 单独新增组织 this.insertBatch(gridInfoList); - } else if ("edit".equals(formDTO.getType())) { + } else if (formDTO.getType().contains("change")) { // 修改组织时,先根据code查询,如果有数据,更新 for (GridInfoPingyinEntity entity : gridInfoList) { From 426ea1a2902158b478b4daea9931248b51276457 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 19:31:44 +0800 Subject: [PATCH 23/57] =?UTF-8?q?=E6=96=B0=E7=89=88=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E7=AC=AC=E4=B8=89=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/service/impl/EventreportPingyinServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index d1a61e8de3..1924b99d49 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -76,6 +76,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl entityList = list.stream().map(item -> { EventreportPingyinEntity entity = new EventreportPingyinEntity(); entity.setQxBm("370124"); @@ -138,6 +139,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getGridCode()) && StringUtils.isNotBlank(item.getGridName()) && From 6e9b8ee5f5aae91a2e6d396216adcbca053d3d10 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 19:38:23 +0800 Subject: [PATCH 24/57] =?UTF-8?q?log=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/logback-spring.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml index 36ddc6f222..151f385f11 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml @@ -188,12 +188,12 @@ - + - + From b8476c1add9fb36404a6cb646ab3d3cb67f9f033 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 19:41:36 +0800 Subject: [PATCH 25/57] =?UTF-8?q?log=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/service/impl/EventreportPingyinServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 1924b99d49..08d3ffccf7 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -76,7 +76,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl entityList = list.stream().map(item -> { EventreportPingyinEntity entity = new EventreportPingyinEntity(); entity.setQxBm("370124"); @@ -149,6 +149,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); From aed1d0a9c48bf282cee8e84101d8585ed02073da Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 19:43:48 +0800 Subject: [PATCH 26/57] editgrid --- .../src/main/resources/mapper/CustomerGridDao.xml | 4 +++- .../opendata/mq/listener/OpenDataOrgChangeEventListener.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index bd6f04bbc8..c3d15d75e0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -240,7 +240,9 @@ set grid_name = #{gridName}, manage_district = #{manageDistrict}, - code = #{code}, + + code = #{code}, + grid_type = #{gridType}, contacts = #{contacts}, mobile = #{mobile}, diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java index 02fc563a78..deb7384c61 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java @@ -95,7 +95,9 @@ public class OpenDataOrgChangeEventListener implements MessageListenerConcurrent extractFormDto.setCustomerId(obj.getCustomerId()); extractFormDto.setType(obj.getType()); List orgIdList = new ArrayList<>(); - orgIdList.add(obj.getOrgId()); + if(StringUtils.isNotBlank(obj.getOrgId())){ + orgIdList.add(obj.getOrgId()); + } extractFormDto.setOrgIdList(orgIdList); if ("agency".equals(obj.getOrgType())) { SpringContextUtils.getBean(GridInfoPingyinService.class).exractAgency(extractFormDto); From 77c215872805a7606b47f34302f342a869138603 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 20:19:25 +0800 Subject: [PATCH 27/57] =?UTF-8?q?log=E7=BA=A7=E5=88=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EventreportPingyinServiceImpl.java | 6 ------ .../src/main/resources/logback-spring.xml | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 08d3ffccf7..85eda36cfb 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -76,7 +76,6 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl entityList = list.stream().map(item -> { EventreportPingyinEntity entity = new EventreportPingyinEntity(); entity.setQxBm("370124"); @@ -108,9 +107,6 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getGridCode()) && StringUtils.isNotBlank(item.getGridName()) && @@ -149,7 +144,6 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml index 151f385f11..36ddc6f222 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/logback-spring.xml @@ -188,12 +188,12 @@ - + - + From eb8f40088f0b4ee44da4f7f00674278ce1e21347 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 20:23:18 +0800 Subject: [PATCH 28/57] =?UTF-8?q?=E5=8E=BB=E6=8E=89id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/entity/EventreportPingyinEntity.java | 7 ------- .../epmet/opendata/entity/GridInfoPingyinEntity.java | 7 ------- .../opendata/entity/GridstaffInfoPingyinEntity.java | 11 ++--------- .../service/impl/BaseGridDailyworkServiceImpl.java | 2 ++ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java index 84cddbe1d3..0dc15d325a 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java @@ -1,8 +1,6 @@ package com.epmet.opendata.entity; import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -22,11 +20,6 @@ public class EventreportPingyinEntity { private static final long serialVersionUID = 1L; - /** - * 数据库主键自增字段,请勿指定 - */ - private Long id; - /** * 上报区县代码,参照6位行政区划代码 */ diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java index 6051db5f01..9f64f9175d 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java @@ -1,8 +1,6 @@ package com.epmet.opendata.entity; import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -22,11 +20,6 @@ public class GridInfoPingyinEntity { private static final long serialVersionUID = 1L; - /** - * 数据库主键自增字段,请勿指定 - */ - private Long id; - /** * 上报区县代码,参照6位行政区划代码 */ diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java index 0a53873f89..ef5fc9d982 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridstaffInfoPingyinEntity.java @@ -1,8 +1,6 @@ package com.epmet.opendata.entity; import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; @@ -21,11 +19,6 @@ public class GridstaffInfoPingyinEntity { private static final long serialVersionUID = 1L; - /** - * 数据库主键自增字段,请勿指定 - */ - private Long id; - /** * 上报区县代码,参照6位行政区划代码 */ @@ -97,7 +90,7 @@ public class GridstaffInfoPingyinEntity { private String education; /** - * 入职时间,格式为“YYYY-MM-DD” + * 入职时间,格式为“YYYY-MM-DD” */ private Date entryDate; @@ -107,7 +100,7 @@ public class GridstaffInfoPingyinEntity { private String isLeave; /** - * 离职时间,格式为“YYYY-MM-DD” + * 离职时间,格式为“YYYY-MM-DD” */ private Date leaveDate; diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index bcb4df6f14..4cc15727fb 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -209,6 +209,7 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl data; do { Result> record = epmetUserOpenFeignClient.getPatrolRoutineWorkListV2(midPatrolFormDTO); + midPatrolFormDTO.setPageNo(midPatrolFormDTO.getPageNo() + 1); if (record == null || !record.success()) { log.error("获取例行工作记录V2失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); @@ -231,6 +232,7 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 21:03:30 +0800 Subject: [PATCH 29/57] log --- .../opendata/service/impl/EventreportPingyinServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 85eda36cfb..8a7a330b06 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -135,6 +135,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl StringUtils.isNotBlank(item.getGridCode()) && StringUtils.isNotBlank(item.getGridName()) && @@ -144,6 +145,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); From d6c25932dfbbe552c828e33ec95700fcc08e08a0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 21:07:45 +0800 Subject: [PATCH 30/57] log --- .../opendata/service/impl/EventreportPingyinServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 8a7a330b06..3a695437ba 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -154,8 +154,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 21:14:41 +0800 Subject: [PATCH 31/57] id --- .../service/impl/GridstaffInfoPingyinServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index eb4bf5adc0..6c58d2565a 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -15,7 +15,6 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.opendata.dao.GridstaffInfoPingyinDao; import com.epmet.opendata.dto.form.GridStaffInfoFormDTO; import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; -import com.epmet.opendata.entity.ExUserEntity; import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; import com.epmet.opendata.service.GridstaffInfoPingyinService; import lombok.extern.slf4j.Slf4j; @@ -118,6 +117,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 21:21:18 +0800 Subject: [PATCH 32/57] id --- .../java/com/epmet/opendata/dao/GridInfoPingyinDao.java | 4 ++-- .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 6 +++--- .../src/main/resources/mapper/GridInfoPingyinDao.xml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java index e070cc30ce..0ae3ac01e9 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -23,9 +23,9 @@ public interface GridInfoPingyinDao extends BaseDao { List selectByGridCode(String gridCode); - int updateSomeCol(@Param("id") Long id, + int updateSomeCol(@Param("gridCode") String gridCode, @Param("gridName")String gridName, @Param("gridLevel")Integer gridLevel, @Param("lng")BigDecimal lng, @Param("lat")BigDecimal lat); -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index b7a15afd09..454ef351fc 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -94,7 +94,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl select g.* from grid_info_pingyin g - where g.grid_code = #{gridCode} + where g.grid_code = #{gridCode} and is_del = 'N' @@ -42,6 +42,6 @@ grid_level = #{gridLevel}, lng = #{lng}, lat = #{lat} - where id = #{id} + where grid_code = #{gridCode} and is_del = 'N' - \ No newline at end of file + From e42b5c11e6ef9a47be72d2bcc627a88126bda9af Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 21:31:11 +0800 Subject: [PATCH 33/57] id --- .../opendata/service/impl/BaseGridDailyworkServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index 4cc15727fb..d23eddb40e 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -226,7 +226,8 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl { GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(d.getGridId()); if (null == gridInfo){ - throw new EpmetException("未查询到网格信息:"+ d.getGridId()); + log.warn("未查询到网格信息:"+ d.getGridId()); + return; } d.setGridCode(gridInfo.getCode()); d.setGridName(gridInfo.getGridName()); From 47dee44a4129625ba44efe00c29a0c697b705db9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 21:53:45 +0800 Subject: [PATCH 34/57] =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/NumConstant.java | 2 +- .../epmet/commons/tools/utils/StrUtil.java | 29 +++++++++++++++++++ .../impl/BaseGridDailyworkServiceImpl.java | 3 ++ .../impl/EventreportPingyinServiceImpl.java | 14 +++++---- 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java 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 0d18e6f706..95158b2929 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 @@ -49,7 +49,7 @@ public interface NumConstant { BigDecimal ONE_HUNDRED_DECIMAL = new BigDecimal(100); BigDecimal ZERO_DECIMAL = new BigDecimal(0); int ONE_THOUSAND = 1000; - int TEN_THOUSAND = 10000; + int THREE_THOUSAND = 3000; int MAX = 99999999; int EIGHTY_EIGHT = 88; int EIGHTY = 80; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java new file mode 100644 index 0000000000..055b7a2ae2 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java @@ -0,0 +1,29 @@ +package com.epmet.commons.tools.utils; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * desc: + * + * @author: LiuJanJun + * @date: 2022/7/22 9:45 下午 + * @version: 1.0 + */ +public class StrUtil { + + private static final Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]", Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE); + + public static String filterEmoji(String source) { + + if (source != null) { + Matcher emojiMatcher = emoji.matcher(source); + if (emojiMatcher.find()) { + source = emojiMatcher.replaceAll(""); + return source; + } + return source; + } + return source; + } +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index d23eddb40e..c02ed2d50f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -11,6 +11,7 @@ import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.StrUtil; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.dto.form.patrol.PatrolQueryFormDTO; @@ -229,6 +230,8 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl NumConstant.ONE_THOUSAND) { - eventDescription = eventDescription.substring(NumConstant.ZERO, NumConstant.ONE_THOUSAND); + //如果不为空 长度控制3000以内 + if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.THREE_THOUSAND) { + eventDescription = eventDescription.substring(NumConstant.ZERO, NumConstant.THREE_THOUSAND); } + eventDescription = StrUtil.filterEmoji(eventDescription); entity.setEventDescription(eventDescription); entity.setWaysOfResolving(item.getWaysOfResolving()); //业务不确定 @@ -163,4 +167,4 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl Date: Fri, 22 Jul 2022 22:21:47 +0800 Subject: [PATCH 35/57] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BB=84=E7=BB=87=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rocketmq/messages/OrgOrStaffMQMsg.java | 1 + .../dto/org/form/GridBaseInfoFormDTO.java | 2 +- .../resources/mapper/org/CustomerGridDao.xml | 6 +- .../mapper/org/StatsCustomerAgencyDao.xml | 6 +- .../epmet/controller/AgencyController.java | 11 +++- .../com/epmet/controller/GridController.java | 13 +++- .../dto/constant/DataWorkerConstant.java | 8 +++ .../form/ExractGridInfoPingYinFormDTO.java | 2 +- .../impl/GridInfoPingyinServiceImpl.java | 59 ++++++++++++++++--- 9 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/DataWorkerConstant.java diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java index 14a5a24ff8..bda7f50a7a 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java @@ -18,6 +18,7 @@ public class OrgOrStaffMQMsg implements Serializable { //数据类型【组织:agency 网格:grid 人员:staff】 private String orgType; //操作类型【组织新增:agency_create 组织变更:agency_change 网格新增:grid_create 网格变更:grid_change 人员新增:staff_create 人员变更:staff_change】 + //删除网格:grid_delete;删除组织:agency_delete private String type; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/form/GridBaseInfoFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/form/GridBaseInfoFormDTO.java index 9d39ef6b81..768fad2827 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/form/GridBaseInfoFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/form/GridBaseInfoFormDTO.java @@ -28,7 +28,7 @@ public class GridBaseInfoFormDTO implements Serializable { * 操作类型【新增:add 修改删除:edit 初始化所有数据:all】 */ private String type; - + private String delFlag; public interface Grid extends CustomerClientShowGroup {} } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index 5d6dc4042c..edab6411d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -158,8 +158,10 @@ * FROM customer_grid - WHERE del_flag = '0' - AND customer_id = #{customerId} + WHERE customer_id = #{customerId} + + AND del_flag = #{delFlag} + and CODE is not null and CODE !='' and grid_name not like '%专属网格' diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml index 105a4efcc7..fec3627bc0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml @@ -214,10 +214,12 @@ * FROM customer_agency - WHERE del_flag = '0' - AND customer_id = #{customerId} + WHERE customer_id = #{customerId} and CODE is not null and CODE !='' + + AND del_flag = #{delFlag} + #{agencyId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index ae07816fa2..893bc95cda 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -201,7 +201,16 @@ public class AgencyController { public Result removeAgency(@LoginUser TokenDto tokenDTO, @RequestBody RemoveAgencyFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); formDTO.setCustomerId(tokenDTO.getCustomerId()); - return agencyService.removeAgency(formDTO); + Result result= agencyService.removeAgency(formDTO); + //2021-11-30 推送mq,数据同步到中介库 start + OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); + mq.setCustomerId(tokenDTO.getCustomerId()); + mq.setOrgId(formDTO.getAgencyId()); + mq.setOrgType("agency"); + mq.setType("agency_delete"); + SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendOrgStaffMqMsg(mq); + //2021-11-30 end + return result; } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java index 8f026e9f44..171197d40e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java @@ -100,7 +100,18 @@ public class GridController { @RequirePermission(requirePermission = RequirePermissionEnum.ORG_GRID_DELETE) public Result deleteGrid(@LoginUser TokenDto tokenDto, @RequestBody DeleteGridFormDTO deleteGridFormDTO){ deleteGridFormDTO.setCustomerId(tokenDto.getCustomerId()); - return customerGridService.deleteGrid(tokenDto,deleteGridFormDTO); + Result result =customerGridService.deleteGrid(tokenDto,deleteGridFormDTO); + //2021-10-18 推送mq,数据同步到中介库 start + if (result.success()) { + OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); + mq.setCustomerId(tokenDto.getCustomerId()); + mq.setOrgId(deleteGridFormDTO.getGridId()); + mq.setOrgType("grid"); + mq.setType("grid_delete"); + SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendOrgStaffMqMsg(mq); + } + //2021-10-18 end + return result; } /** diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/DataWorkerConstant.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/DataWorkerConstant.java new file mode 100644 index 0000000000..df1781038f --- /dev/null +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/constant/DataWorkerConstant.java @@ -0,0 +1,8 @@ +package com.epmet.opendata.dto.constant; + +public interface DataWorkerConstant { + String ALL = "all"; + String CREATE = "create"; + String CHANGE = "change"; + String DELETE = "delete"; +} diff --git a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java index b4324bb2ee..970f98e1ab 100644 --- a/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java +++ b/epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/ExractGridInfoPingYinFormDTO.java @@ -32,9 +32,9 @@ public class ExractGridInfoPingYinFormDTO implements Serializable { /** * 废弃:这个不对。操作类型【新增:add 修改删除:edit 初始化所有数据:all】 * 操作类型【组织新增:agency_create 组织变更:agency_change 网格新增:grid_create 网格变更:grid_change 人员新增:staff_create 人员变更:staff_change】 + * 删除网格grid_delete,删除组织agency_delete */ @NotBlank(message = "操作类型【新增:add 修改删除:edit 初始化所有数据:all】不能为空", groups = {GridInfo.class}) - private String type; } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index b7a15afd09..1056aa8361 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.opendata.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; @@ -10,11 +11,13 @@ import com.epmet.dto.org.result.CustomerAgencyDTO; import com.epmet.dto.org.result.CustomerGridDTO; import com.epmet.feign.DataStatisticalOpenFeignClient; import com.epmet.opendata.dao.GridInfoPingyinDao; +import com.epmet.opendata.dto.constant.DataWorkerConstant; import com.epmet.opendata.dto.form.ExractGridInfoPingYinFormDTO; import com.epmet.opendata.entity.GridInfoPingyinEntity; import com.epmet.opendata.service.GridInfoPingyinService; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -44,6 +47,15 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl> result = dataStatisticalOpenFeignClient.getAgencyBaseInfo(formDTO1); if (!result.success()) { throw new RenException(result.getInternalMsg()); @@ -59,11 +71,11 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); + if (CollectionUtils.isNotEmpty(orginList)) { + for (GridInfoPingyinEntity oigin : orginList) { + baseDao.deleteById(oigin.getId()); + } + } + } } } @@ -115,6 +137,15 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl> result = dataStatisticalOpenFeignClient.getGridBaseInfo(formDTO1); if (!result.success()) { throw new RenException(result.getInternalMsg()); @@ -145,7 +176,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl { this.insertBatch(list); }); - } else if (formDTO.getType().contains("create")) { + } else if (formDTO.getType().contains(DataWorkerConstant.CREATE)) { // 单独新增组织 this.insertBatch(gridInfoList); - } else if (formDTO.getType().contains("change")) { + } else if (formDTO.getType().contains(DataWorkerConstant.CHANGE)) { // 修改组织时,先根据code查询,如果有数据,更新 for (GridInfoPingyinEntity entity : gridInfoList) { @@ -175,6 +206,16 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); + if (CollectionUtils.isNotEmpty(orginList)) { + for (GridInfoPingyinEntity oigin : orginList) { + baseDao.deleteById(oigin.getId()); + } + } + } } } From 8cf2da63a313ae9ce75bb4bd6d589612367dc4e2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 22:26:52 +0800 Subject: [PATCH 36/57] =?UTF-8?q?=E6=A0=B9=E6=8D=AEcode=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java | 2 ++ .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 4 ++-- .../src/main/resources/mapper/GridInfoPingyinDao.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java index 0ae3ac01e9..986b8f2ff7 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -28,4 +28,6 @@ public interface GridInfoPingyinDao extends BaseDao { @Param("gridLevel")Integer gridLevel, @Param("lng")BigDecimal lng, @Param("lat")BigDecimal lat); + + int deleteByCode(String gridCode); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 21886ce34f..2f54aecee6 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -120,7 +120,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); if (CollectionUtils.isNotEmpty(orginList)) { for (GridInfoPingyinEntity oigin : orginList) { - baseDao.deleteById(oigin.getId()); + baseDao.deleteByCode(oigin.getGridCode()); } } } @@ -212,7 +212,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); if (CollectionUtils.isNotEmpty(orginList)) { for (GridInfoPingyinEntity oigin : orginList) { - baseDao.deleteById(oigin.getId()); + baseDao.deleteByCode(oigin.getGridCode()); } } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml index a6f7c2ef5a..c79ef11f2a 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -44,4 +44,9 @@ lat = #{lat} where grid_code = #{gridCode} and is_del = 'N' + + + update grid_info_pingyin set is_del = 'Y' + where grid_code = #{gridCode} + From 90823cfdbb56b7985f0ff39c4a2d5fcd12db7b62 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 22:44:18 +0800 Subject: [PATCH 37/57] int TEN_THOUSAND = 10000; --- .../main/java/com/epmet/commons/tools/constant/NumConstant.java | 2 ++ 1 file changed, 2 insertions(+) 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 95158b2929..1f0d76e14f 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 @@ -49,6 +49,8 @@ public interface NumConstant { BigDecimal ONE_HUNDRED_DECIMAL = new BigDecimal(100); BigDecimal ZERO_DECIMAL = new BigDecimal(0); int ONE_THOUSAND = 1000; + int TEN_THOUSAND = 10000; + int THREE_THOUSAND = 3000; int MAX = 99999999; int EIGHTY_EIGHT = 88; From 6fc8b0b3836498a0ab59e3302cae1083d5e38762 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 22:49:26 +0800 Subject: [PATCH 38/57] zhuanzhuanzhuan --- .../epmet/commons/tools/utils/StrUtil.java | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java index 055b7a2ae2..8a6b63230c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/StrUtil.java @@ -1,10 +1,9 @@ package com.epmet.commons.tools.utils; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import org.apache.commons.lang3.StringUtils; /** - * desc: + * desc:utf8mb4转为utf8 * * @author: LiuJanJun * @date: 2022/7/22 9:45 下午 @@ -12,18 +11,27 @@ import java.util.regex.Pattern; */ public class StrUtil { - private static final Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]", Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE); + private static final int LAST_BMP = 0xFFFF; public static String filterEmoji(String source) { - - if (source != null) { - Matcher emojiMatcher = emoji.matcher(source); - if (emojiMatcher.find()) { - source = emojiMatcher.replaceAll(""); - return source; - } + if (StringUtils.isBlank(source)) { return source; } - return source; + StringBuilder sb = new StringBuilder(source.length()); + for (int i = 0; i < source.length(); i++) { + int codePoint = source.codePointAt(i); + if (codePoint < LAST_BMP) { + sb.appendCodePoint(codePoint); + } else { + i++; + } + } + return sb.toString(); + } + + + public static void main(String[] args) { + String x = StrUtil.filterEmoji("😀😁😆😅🥹🥹😇😗😀😂666"); + System.out.println(x); } } From a87b60005041a36114125d001483d336f0f56792 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 23:31:45 +0800 Subject: [PATCH 39/57] =?UTF-8?q?=E4=BE=8B=E8=A1=8C=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=8D=E7=BD=AE=20=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenDataPatrolChangeEventListener.java | 4 +- .../service/BaseGridDailyworkService.java | 17 -- .../GridstaffWorkInfoPingyinService.java | 12 +- .../impl/BaseGridDailyworkServiceImpl.java | 166 +++--------------- .../GridstaffWorkInfoPingyinServiceImpl.java | 134 +++++++++++++- 5 files changed, 165 insertions(+), 168 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java index e5e7a1f577..5c3bbb4404 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java @@ -15,7 +15,7 @@ import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.constant.SystemMessageType; import com.epmet.opendata.dto.form.UpsertPatrolRecordForm; -import com.epmet.opendata.service.BaseGridDailyworkService; +import com.epmet.opendata.service.GridstaffWorkInfoPingyinService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; @@ -99,7 +99,7 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr break; case SystemMessageType.PATROL_ROUTINE_WORK_ADD: // aBoolean = SpringContextUtils.getBean(BaseGridDailyworkService.class).insertBaseGridWorkRecord(patrolRecordForm); - aBoolean = SpringContextUtils.getBean(BaseGridDailyworkService.class).insertBaseGridWorkRecordV2(patrolRecordForm); + aBoolean = SpringContextUtils.getBean(GridstaffWorkInfoPingyinService.class).insertBaseGridWorkRecordV2(patrolRecordForm); break; default: log.error("错误的消息类型:{}", tags); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java index 6fccfe29e7..010b698d63 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/BaseGridDailyworkService.java @@ -18,7 +18,6 @@ package com.epmet.opendata.service; import com.epmet.commons.mybatis.service.BaseService; -import com.epmet.opendata.dto.form.HistoryDataSyncFormDTO; import com.epmet.opendata.dto.form.UpsertPatrolRecordForm; import com.epmet.opendata.entity.BaseGridDailyworkEntity; @@ -37,14 +36,6 @@ public interface BaseGridDailyworkService extends BaseService { + /** + * Desc: 2022-07-22 新表 例行工作同步 + * @param formDTO + * @author zxc + * @date 2022/7/22 11:16 + */ + Boolean insertBaseGridWorkRecordV2(UpsertPatrolRecordForm formDTO); - Integer delAllGridStaffWorkInfoPY(); - -} \ No newline at end of file +} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java index c02ed2d50f..b8232b5ca1 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseGridDailyworkServiceImpl.java @@ -1,3 +1,20 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.epmet.opendata.service.impl; import com.alibaba.fastjson.JSON; @@ -6,12 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; -import com.epmet.commons.tools.redis.common.CustomerOrgRedis; -import com.epmet.commons.tools.redis.common.bean.GridInfoCache; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.StrUtil; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.dto.form.patrol.PatrolQueryFormDTO; @@ -20,18 +32,15 @@ import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.BaseGridDailyworkDao; import com.epmet.opendata.dto.ExDeptDTO; import com.epmet.opendata.dto.ExUserDTO; -import com.epmet.opendata.dto.form.HistoryDataSyncFormDTO; import com.epmet.opendata.dto.form.UpsertPatrolRecordForm; import com.epmet.opendata.entity.BaseGridDailyworkEntity; -import com.epmet.opendata.entity.GridstaffWorkInfoPingyinEntity; -import com.epmet.opendata.service.*; +import com.epmet.opendata.service.BaseGridDailyworkService; +import com.epmet.opendata.service.ExDeptService; +import com.epmet.opendata.service.ExUserService; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.ListUtils; -import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.ArrayList; @@ -55,12 +64,6 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl list, Map deptMap, Map userMap){ List insertList = new ArrayList<>(); list.forEach(o-> insertList.add(buildEntity(o, deptMap, userMap))); @@ -128,6 +130,7 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl deptMap, Map userMap) { BaseGridDailyworkEntity entity = new BaseGridDailyworkEntity(); entity.setCustomerId(record.getCustomerId()); @@ -175,132 +178,9 @@ public class BaseGridDailyworkServiceImpl extends BaseServiceImpl data; - do { - Result> record = epmetUserOpenFeignClient.getPatrolRoutineWorkListV2(midPatrolFormDTO); - midPatrolFormDTO.setPageNo(midPatrolFormDTO.getPageNo() + 1); - if (record == null || !record.success()) { - log.error("获取例行工作记录V2失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); - } - data = record.getData(); - if (CollectionUtils.isEmpty(data)) { - //数据已被删除了 - //暂时设置error 用于排错 - log.error("获取例行工作记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); - int effectRow = baseDao.deleteById(patrolRecordForm.getId()); - log.warn("del effectRow:{}", effectRow); - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); - } - data.forEach(d -> { - GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(d.getGridId()); - if (null == gridInfo){ - log.warn("未查询到网格信息:"+ d.getGridId()); - return; - } - String s = StrUtil.filterEmoji(d.getWorkContent()); - d.setWorkContent(s); - d.setGridCode(gridInfo.getCode()); - d.setGridName(gridInfo.getGridName()); - }); - insertNewRecordBatch(data); - - }while (data.size() == NumConstant.ONE_THOUSAND); - return true; - } - - /** - * Desc: 历史数据处理 - * @param formDTO - * @author zxc - * @date 2022/7/22 13:24 - */ - @Override - public void historyDataSync(HistoryDataSyncFormDTO formDTO) { - Integer pageSize = NumConstant.ONE_THOUSAND; - Integer pageNo = NumConstant.ONE; - List baseGridDailyWork; - do { - baseGridDailyWork = baseDao.getBaseGridDailyWork(formDTO.getCustomerId(),(pageNo - NumConstant.ONE) * pageSize); - List newEntities = ConvertUtils.sourceToTarget(baseGridDailyWork, GridstaffWorkInfoPingyinEntity.class); - newEntities.forEach(n -> { - GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(n.getGridId()); - if (null == gridInfo){ - throw new EpmetException("未查询到网格信息:"+ n.getGridId()); - } - n.setGridCode(gridInfo.getCode()); - n.setHappenTime(DateUtils.parseDate(n.getHappenTimeString(),DateUtils.DATE_PATTERN)); - n.setIsDel(NumConstant.ZERO_STR); - }); - insertGridStaffWorkInfoPY(newEntities); - pageNo++; - }while (baseGridDailyWork.size() == NumConstant.ONE_THOUSAND); - } - - /** - * Desc: 数据存入 - * @param newEntities - * @author zxc - * @date 2022/7/22 14:17 - */ - @Transactional(rollbackFor = Exception.class) - public void insertGridStaffWorkInfoPY(List newEntities){ - if (!CollectionUtils.isEmpty(newEntities)){ - List> partition = ListUtils.partition(newEntities, NumConstant.ONE_HUNDRED); - partition.forEach(p -> { - pingYinService.insertBatch(p); - }); - } - } - - private Boolean insertNewRecordBatch(List list){ - List insertList = new ArrayList<>(); - list.forEach(o-> { - if (StringUtils.isBlank(o.getGridCode())){ - return; - } - insertList.add(buildNewEntity(o)); - }); - //insert - if (CollectionUtils.isEmpty(insertList)){ - log.error("新构建要插入的数据为空,param:{}", JSON.toJSONString(list)); - return false; - } - insertGridStaffWorkInfoPY(insertList); -// pingYinService.saveOrUpdateBatch(insertList, NumConstant.ONE_HUNDRED); - return true; - } - } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java index db80164c1d..ffa08d0286 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffWorkInfoPingyinServiceImpl.java @@ -1,10 +1,36 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.StrUtil; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.dto.form.patrol.PatrolQueryFormDTO; +import com.epmet.dto.result.PatrolRoutineWorkResult; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.opendata.dao.GridstaffWorkInfoPingyinDao; +import com.epmet.opendata.dto.form.UpsertPatrolRecordForm; import com.epmet.opendata.entity.GridstaffWorkInfoPingyinEntity; import com.epmet.opendata.service.GridstaffWorkInfoPingyinService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.StringUtils; +import org.jetbrains.annotations.NotNull; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; /** * 平阴区网格员例行工作信息 @@ -12,12 +38,114 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2022-07-22 */ +@Slf4j @Service public class GridstaffWorkInfoPingyinServiceImpl extends BaseServiceImpl implements GridstaffWorkInfoPingyinService { + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override - public Integer delAllGridStaffWorkInfoPY() { - return baseDao.delAllGridStaffWorkInfoPY(); + public Boolean insertBaseGridWorkRecordV2(UpsertPatrolRecordForm patrolRecordForm) { + log.info("insertBaseGridWorkRecordV2 param:{}", JSON.toJSONString(patrolRecordForm)); + ValidatorUtils.validateEntity(patrolRecordForm, AddGroup.class); + // 构建传参 + PatrolQueryFormDTO midPatrolFormDTO = buildParam(patrolRecordForm); + if (StringUtils.isBlank(patrolRecordForm.getId())) { + Integer row; + do { + row = baseDao.delAllGridStaffWorkInfoPY(); + } while (row == NumConstant.ONE_THOUSAND); + } + List data; + do { + Result> record = epmetUserOpenFeignClient.getPatrolRoutineWorkListV2(midPatrolFormDTO); + midPatrolFormDTO.setPageNo(midPatrolFormDTO.getPageNo() + 1); + if (record == null || !record.success()) { + log.error("获取例行工作记录V2失败,param:{}", JSON.toJSONString(midPatrolFormDTO)); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); + } + data = record.getData(); + if (CollectionUtils.isEmpty(data)) { + //数据已被删除了 + //暂时设置error 用于排错 + log.error("获取例行工作记录返回为空,param:{}", JSON.toJSONString(midPatrolFormDTO)); + int effectRow = baseDao.deleteById(patrolRecordForm.getId()); + log.warn("del effectRow:{}", effectRow); + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); + } + data.forEach(d -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(d.getGridId()); + if (null == gridInfo) { + log.warn("未查询到网格信息:" + d.getGridId()); + return; + } + String s = StrUtil.filterEmoji(d.getWorkContent()); + d.setWorkContent(s); + d.setGridCode(gridInfo.getCode()); + d.setGridName(gridInfo.getGridName()); + }); + insertNewRecordBatch(data); + + } while (data.size() == NumConstant.ONE_THOUSAND); + return true; + } + + /** + * Desc: 数据存入 + * + * @param newEntities + * @author zxc + * @date 2022/7/22 14:17 + */ + @Transactional(rollbackFor = Exception.class) + public void insertGridStaffWorkInfoPY(List newEntities) { + if (!CollectionUtils.isEmpty(newEntities)) { + List> partition = ListUtils.partition(newEntities, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + this.insertBatch(p); + }); + } + } + + private Boolean insertNewRecordBatch(List list) { + List insertList = new ArrayList<>(); + list.forEach(o -> { + if (StringUtils.isBlank(o.getGridCode())) { + return; + } + insertList.add(buildNewEntity(o)); + }); + //insert + if (CollectionUtils.isEmpty(insertList)) { + log.error("新构建要插入的数据为空,param:{}", JSON.toJSONString(list)); + return false; + } + insertGridStaffWorkInfoPY(insertList); + return true; + } + + private GridstaffWorkInfoPingyinEntity buildNewEntity(PatrolRoutineWorkResult record) { + GridstaffWorkInfoPingyinEntity entity = ConvertUtils.sourceToTarget(record, GridstaffWorkInfoPingyinEntity.class); + entity.setQxBm("370124"); + entity.setQxMc("平阴县"); + entity.setHappenTime(DateUtils.parseDate(record.getHappenTime().concat(" 00:00:00"), DateUtils.DATE_PATTERN)); + entity.setWorkResult(NumConstant.ONE == record.getIsNormal() ? "Y" : "N"); + entity.setWorkType(record.getWorkTypeSecondCode()); + entity.setRecoredInsertTime(record.getCreatedTime()); + entity.setUpdateTime(record.getUpdatedTime()); + entity.setId(null); + entity.setIsDel(NumConstant.ZERO_STR); + return entity; + } + + @NotNull + private PatrolQueryFormDTO buildParam(UpsertPatrolRecordForm patrolRecordForm) { + PatrolQueryFormDTO midPatrolFormDTO = new PatrolQueryFormDTO(); + midPatrolFormDTO.setCustomerId(patrolRecordForm.getCustomerId()); + midPatrolFormDTO.setId(StringUtils.isBlank(patrolRecordForm.getId()) ? "" : patrolRecordForm.getId()); + midPatrolFormDTO.setPageNo(patrolRecordForm.getPageNo()); + midPatrolFormDTO.setPageSize(NumConstant.ONE_THOUSAND); + return midPatrolFormDTO; } -} \ No newline at end of file +} From 50a12a841aaf23bc07475d0cd9fcd19edc4595cf Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 22 Jul 2022 23:37:10 +0800 Subject: [PATCH 40/57] =?UTF-8?q?=E5=8F=98=E5=BC=82=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseGridDailyworkController.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java index a57bd5c201..7bb809d167 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/BaseGridDailyworkController.java @@ -21,9 +21,9 @@ package com.epmet.opendata.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.opendata.dto.form.HistoryDataSyncFormDTO; import com.epmet.opendata.dto.form.UpsertPatrolRecordForm; import com.epmet.opendata.service.BaseGridDailyworkService; +import com.epmet.opendata.service.GridstaffWorkInfoPingyinService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -43,6 +43,8 @@ public class BaseGridDailyworkController { @Autowired private BaseGridDailyworkService baseGridDailyworkService; + @Autowired + private GridstaffWorkInfoPingyinService gridstaffWorkInfoPingyinService; /** * @Author sun @@ -64,20 +66,9 @@ public class BaseGridDailyworkController { @PostMapping("syncV2") public Result getStaffBaseInfoV2(@RequestBody(required = false) UpsertPatrolRecordForm formDTO) { ValidatorUtils.validateEntity(formDTO, DefaultGroup.class); - baseGridDailyworkService.insertBaseGridWorkRecordV2(formDTO); + gridstaffWorkInfoPingyinService.insertBaseGridWorkRecordV2(formDTO); return new Result(); } - /** - * Desc: 历史数据处理 - * @param formDTO - * @author zxc - * @date 2022/7/22 13:24 - */ - @PostMapping("historyDataSync") - public Result historyDataSync(@RequestBody HistoryDataSyncFormDTO formDTO){ - baseGridDailyworkService.historyDataSync(formDTO); - return new Result(); - } } From bb0da98c51ecf970ab7610b1fd0916141271270e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 25 Jul 2022 10:42:37 +0800 Subject: [PATCH 41/57] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/user/result/CustomerStaffDTO.java | 5 +++++ .../java/com/epmet/dto/user/result/GridUserInfoDTO.java | 5 ++++- .../com/epmet/service/impl/DataReportingServiceImpl.java | 1 + .../service/impl/GridstaffInfoPingyinServiceImpl.java | 9 +++++---- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CustomerStaffDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CustomerStaffDTO.java index a5458793dd..7328788cb6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CustomerStaffDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/CustomerStaffDTO.java @@ -134,4 +134,9 @@ public class CustomerStaffDTO implements Serializable { */ private String roleName; + /** + * 身份证号 + */ + private String idCard; + } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java index 0cec8927b6..71c7ded5b4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/user/result/GridUserInfoDTO.java @@ -84,7 +84,10 @@ public class GridUserInfoDTO implements Serializable { */ private Date updateTime; - + /** + * 身份证号 + */ + private String idCard; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index 6b75d8d8d7..f993b0d3c4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -119,6 +119,7 @@ public class DataReportingServiceImpl implements DataReportingService { st.setPhonenumber(dto.getMobile()); st.setSex(0 == dto.getGender() ? "9" : dto.getGender().toString()); st.setUpdateTime(dto.getUpdatedTime()); + st.setIdCard(dto.getIdCard()); } }); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index 6c58d2565a..a1a5df7991 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -73,11 +73,13 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl> result = dataStatisticalOpenFeignClient.getStaffBaseInfo(formDTO1); if (!result.success()) { @@ -115,9 +117,9 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl Date: Mon, 25 Jul 2022 11:16:49 +0800 Subject: [PATCH 42/57] =?UTF-8?q?screen=5Fproject=5Fdata=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8A=BD=E5=8F=96=E6=B7=BB=E5=8A=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20eventreport=5Fpingyin=E8=A1=A8=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=8F=92=E5=85=A5=E6=94=B9=E6=88=90=E5=8D=95=E6=9D=A1?= =?UTF-8?q?=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenProjectDataDao.java | 2 ++ .../impl/ScreenProjectDataServiceImpl.java | 17 ++++++++++++++--- .../screen/ScreenProjectDataDao.xml | 6 ++++++ .../impl/EventreportPingyinServiceImpl.java | 8 +++++++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java index 36a31e24cc..1809319a3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -133,4 +133,6 @@ public interface ScreenProjectDataDao extends BaseDao { * @Date 2022/3/16 9:48 */ void updateHistoryData(CustomerStaffGridDTO dto); + + int getProjectCount(@Param("customerId") String customerId,@Param("dateId") String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index f611edf8f7..27b5255863 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -260,10 +260,21 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl NumConstant.ZERO) { - affectedRows = baseDao.deleteByProjectTimeAndCustomerId(customerId, dateId); + int count = baseDao.getProjectCount(customerId, dateId); + if (meta.size() < count) { + //meta的数据量小于表里的数据量,意味着指定部分数据进行重新抽取,只需要删除指定的项目数据即可 + List projectIds = meta.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList()); + List> projectPartition = ListUtils.partition(projectIds, NumConstant.FIFTY); + projectPartition.forEach(part -> { + baseDao.deleteByProjectIds(customerId, part); + }); + } else { + int affectedRows = baseDao.deleteByProjectTimeAndCustomerId(customerId,dateId); + while (affectedRows > NumConstant.ZERO) { + affectedRows = baseDao.deleteByProjectTimeAndCustomerId(customerId, dateId); + } } + List> partition = ListUtils.partition(meta, NumConstant.ONE_HUNDRED); partition.forEach(part -> { List list = ConvertUtils.sourceToTarget(part, ScreenProjectDataEntity.class); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml index 68e2d9d27f..64b783c786 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml @@ -539,4 +539,10 @@ AND ORG_ID = #{agencyId} AND ORIGIN = 'agency' + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index df1d77eca2..fbf68fc8c5 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -162,7 +162,13 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl Date: Mon, 25 Jul 2022 13:53:21 +0800 Subject: [PATCH 43/57] =?UTF-8?q?screen=5Fproject=5Fdata=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8A=BD=E5=8F=96=E6=B7=BB=E5=8A=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ScreenProjectDataServiceImpl.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java index 27b5255863..004085496a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java @@ -260,20 +260,11 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl projectIds = meta.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList()); - List> projectPartition = ListUtils.partition(projectIds, NumConstant.FIFTY); - projectPartition.forEach(part -> { - baseDao.deleteByProjectIds(customerId, part); - }); - } else { - int affectedRows = baseDao.deleteByProjectTimeAndCustomerId(customerId,dateId); - while (affectedRows > NumConstant.ZERO) { - affectedRows = baseDao.deleteByProjectTimeAndCustomerId(customerId, dateId); - } - } + List projectIds = meta.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList()); + List> projectPartition = ListUtils.partition(projectIds, NumConstant.FIFTY); + projectPartition.forEach(part -> { + baseDao.deleteByProjectIds(customerId, part); + }); List> partition = ListUtils.partition(meta, NumConstant.ONE_HUNDRED); partition.forEach(part -> { From 7129953a647c4ea65c729d75e806c42b6b7cdb08 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 25 Jul 2022 15:46:46 +0800 Subject: [PATCH 44/57] =?UTF-8?q?eventreport=5Fpingyin=E8=A1=A8=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendata/entity/EventreportPingyinEntity.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java index 0dc15d325a..1298790b7c 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/EventreportPingyinEntity.java @@ -130,16 +130,6 @@ public class EventreportPingyinEntity { */ private String relatedUnites; - /** - * 出租人姓名 - */ - private String lessorName; - - /** - * 出租屋巡查结果,符合《标准》10.24 - */ - private String rentingResult; - /** * 重点场所类别,符合《标准》10.25 */ From 02e5ff85028e1c51f318e641238001658aa3956d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 25 Jul 2022 15:47:06 +0800 Subject: [PATCH 45/57] gridLevel String --- .../java/com/epmet/opendata/dao/GridInfoPingyinDao.java | 2 +- .../com/epmet/opendata/entity/GridInfoPingyinEntity.java | 2 +- .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java index 986b8f2ff7..0aae21b99f 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -25,7 +25,7 @@ public interface GridInfoPingyinDao extends BaseDao { int updateSomeCol(@Param("gridCode") String gridCode, @Param("gridName")String gridName, - @Param("gridLevel")Integer gridLevel, + @Param("gridLevel")String gridLevel, @Param("lng")BigDecimal lng, @Param("lat")BigDecimal lat); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java index 9f64f9175d..d469072534 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/entity/GridInfoPingyinEntity.java @@ -43,7 +43,7 @@ public class GridInfoPingyinEntity { /** * 网格层级,应符合10.1组织层级,所有层级上报 */ - private Integer gridLevel; + private String gridLevel; /** * 专属网格类型,应符合10.28专属网格类型 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 2f54aecee6..18c2f11420 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -72,11 +72,11 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl 10) { entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); } else { From ffc127b5dd671fb46f55857fd1693b3284a6ab70 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 25 Jul 2022 16:42:15 +0800 Subject: [PATCH 46/57] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rocketmq/messages/OrgOrStaffMQMsg.java | 4 ++++ .../service/impl/CustomerGridServiceImpl.java | 13 +++++++++++++ .../resources/mapper/CustomerStaffGridDao.xml | 2 +- .../opendata/dao/GridstaffInfoPingyinDao.java | 3 +++ .../OpenDataStaffChangeEventListener.java | 5 +++-- .../impl/GridstaffInfoPingyinServiceImpl.java | 6 ++++-- .../resources/mapper/GridstaffInfoPingyinDao.xml | 16 ++++++++++++++++ .../controller/CustomerStaffController.java | 9 +++++++-- 8 files changed, 51 insertions(+), 7 deletions(-) diff --git a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java index bda7f50a7a..fdd9e5d860 100644 --- a/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java +++ b/epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/OrgOrStaffMQMsg.java @@ -3,6 +3,7 @@ package com.epmet.commons.rocketmq.messages; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * 组织、网格、人员中间库数据上报MQ @@ -21,5 +22,8 @@ public class OrgOrStaffMQMsg implements Serializable { //删除网格:grid_delete;删除组织:agency_delete private String type; + //工作人员Id集合 + private List staffIdList; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index 431200b560..af626daac1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -55,6 +56,7 @@ import com.epmet.entity.CustomerStaffGridEntity; import com.epmet.entity.StaffOrgRelationEntity; import com.epmet.feign.*; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; +import com.epmet.send.SendMqMsgUtil; import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerGridService; import com.epmet.util.ModuleConstant; @@ -112,6 +114,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl { CustomerStaffRedis.delStaffInfoFormCache(staffListFormDTO.getCustomerId(), staffId); }); + //22.7.25 网格添加工作人员推送mq 同步工作人员信息到中间库 start + OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); + mq.setCustomerId(staffListFormDTO.getCustomerId()); + mq.setStaffIdList(staffListFormDTO.getSelectedList()); + mq.setOrgType("staff"); + mq.setType("staff_create"); + SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendOrgStaffMqMsg(mq); + //22.7.25 网格添加工作人员推送mq 同步工作人员信息到中间库 end return new Result(); } } + return new Result().error(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index a6569342fd..5cfece3eb1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -205,7 +205,7 @@ a.user_id gridUserId FROM customer_staff_grid a - INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' AND b.`code` is not null + INNER JOIN customer_grid b ON a.grid_id = b.id AND b.del_flag = '0' AND a.customer_id = b.customer_id AND b.`code`!= '' AND b.`code` is not null WHERE a.del_flag = '0' AND a.customer_id = #{customerId} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java index ccbf1d6405..0df03ede97 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridstaffInfoPingyinDao.java @@ -3,6 +3,7 @@ package com.epmet.opendata.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.opendata.entity.GridstaffInfoPingyinEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 平阴区网格员基础信息 @@ -16,4 +17,6 @@ public interface GridstaffInfoPingyinDao extends BaseDao staffIdList = new ArrayList<>(); + /*List staffIdList = new ArrayList<>(); staffIdList.add(obj.getOrgId()); dto.setStaffIdList(staffIdList); - //SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto); + SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto);*/ + dto.setStaffIdList(obj.getStaffIdList()); SpringContextUtils.getBean(GridstaffInfoPingyinService.class).getStaffBaseInfo(dto); } catch (RenException e) { // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index a1a5df7991..a4a9909efa 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -120,9 +120,11 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index 586bacf3c2..702469ea31 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -43,6 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -221,7 +222,9 @@ public class CustomerStaffController { if (result.success()) { OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); mq.setCustomerId(fromDTO.getCustomerId()); - mq.setOrgId(result.getData().getUserId()); + List st = new ArrayList<>(); + st.add(result.getData().getUserId()); + mq.setStaffIdList(st); mq.setOrgType("staff"); mq.setType("staff_create"); SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendOrgStaffMqMsg(mq); @@ -245,7 +248,9 @@ public class CustomerStaffController { if (result.success()) { OrgOrStaffMQMsg mq = new OrgOrStaffMQMsg(); mq.setCustomerId(fromDTO.getCustomerId()); - mq.setOrgId(fromDTO.getStaffId()); + List st = new ArrayList<>(); + st.add(fromDTO.getStaffId()); + mq.setStaffIdList(st); mq.setOrgType("staff"); mq.setType("staff_change"); SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendOrgStaffMqMsg(mq); From d4599288a80a1774c2020187a119a0cd97fd64d0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 25 Jul 2022 17:35:36 +0800 Subject: [PATCH 47/57] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DataReportingServiceImpl.java | 1 + .../opendata/service/impl/GridstaffInfoPingyinServiceImpl.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index f993b0d3c4..bf042e7c91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -120,6 +120,7 @@ public class DataReportingServiceImpl implements DataReportingService { st.setSex(0 == dto.getGender() ? "9" : dto.getGender().toString()); st.setUpdateTime(dto.getUpdatedTime()); st.setIdCard(dto.getIdCard()); + st.setStaffId(dto.getUserId()); } }); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index a4a9909efa..95a48de722 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.opendata.service.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; @@ -103,6 +104,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl> result = dataStatisticalOpenFeignClient.getStaffBaseInfo(formDTO1); @@ -122,6 +124,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl Date: Mon, 25 Jul 2022 17:41:47 +0800 Subject: [PATCH 48/57] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/GridstaffInfoPingyinDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml index e15c75a5a7..81143e89e0 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffInfoPingyinDao.xml @@ -30,8 +30,8 @@ FROM gridstaff_info_pingyin WHERE - grid_user_id = #{gridUserId} - AND grid_code = #{gridCode} + grid_user_id = #{staffId} + AND grid_code = #{code} LIMIT 1 From 9cadbc8e5ee7904866cf3effc56a8f77592b3758 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 26 Jul 2022 09:43:09 +0800 Subject: [PATCH 49/57] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DataReportingServiceImpl.java | 3 +++ .../src/main/resources/mapper/org/CustomerGridDao.xml | 2 +- .../opendata/service/impl/GridstaffInfoPingyinServiceImpl.java | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java index bf042e7c91..a7cceb6fa2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java @@ -100,6 +100,9 @@ public class DataReportingServiceImpl implements DataReportingService { public List getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { //1.查询工作人员所属网格信息 List resultList = customerGridService.getStaffGrid(formDTO); + if (CollectionUtils.isEmpty(resultList)) { + return new ArrayList<>(); + } //2.查询工作人员基础信息 List staffDTOList = userService.getStaffBaseInfo(formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index edab6411d7..061b1e43bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -181,7 +181,7 @@ cg.`code` code FROM customer_staff_grid csg - INNER JOIN customer_grid cg ON csg.grid_id = cg.id + INNER JOIN customer_grid cg ON csg.grid_id = cg.id AND cg.`CODE` != '' AND cg.`CODE` is not null WHERE csg.del_flag = '0' AND csg.customer_id = #{customerId} diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index 95a48de722..060a9ec449 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -111,6 +111,9 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl { From b2713613d88c8a4626d33514bd869bba16aefc8d Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 29 Jul 2022 09:41:27 +0800 Subject: [PATCH 50/57] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 18c2f11420..67fd29285b 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -162,7 +162,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl 10) { entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); } else { From f23b9f9ec38e81302d735f875612180f8590fa6b Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 29 Jul 2022 09:54:32 +0800 Subject: [PATCH 51/57] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 67fd29285b..4a997b1f6d 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -163,6 +163,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl 10) { entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); } else { From 46137f924eb61b1146b22e28c3d1c5caa9124d81 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 29 Jul 2022 09:56:03 +0800 Subject: [PATCH 52/57] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 4a997b1f6d..48cdf626bb 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -71,6 +71,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl Date: Fri, 29 Jul 2022 10:21:30 +0800 Subject: [PATCH 53/57] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAN=20=E4=BB=A5=E5=8F=8A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=20=E6=9B=B4=E6=96=B0=E6=97=B6=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EventreportPingyinServiceImpl.java | 6 ++++-- .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 2 ++ .../service/impl/GridstaffInfoPingyinServiceImpl.java | 2 ++ .../service/impl/GridstaffWorkInfoPingyinServiceImpl.java | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index fbf68fc8c5..380df961e4 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -21,6 +21,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -129,9 +130,10 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl 10) { entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); } else { diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index 060a9ec449..fc42fd2dda 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -25,6 +25,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -129,6 +130,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl Date: Fri, 29 Jul 2022 10:28:43 +0800 Subject: [PATCH 54/57] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAN=20=E4=BB=A5=E5=8F=8A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4=20=E6=9B=B4=E6=96=B0=E6=97=B6=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/GridInfoPingyinDao.xml | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml index c79ef11f2a..c2eeb0baa9 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -3,32 +3,13 @@ - - - - - - - - - - - - - - - - - - - - delete from grid_info_pingyin where grid_level !='7' + delete from grid_info_pingyin where grid_level !='07' - delete from grid_info_pingyin where grid_level ='7' + delete from grid_info_pingyin where grid_level ='07'