From 77c215872805a7606b47f34302f342a869138603 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 22 Jul 2022 20:19:25 +0800 Subject: [PATCH 1/8] =?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 2/8] =?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 3/8] 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 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] =?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