From a8476a44e0bf4fbdc7e7e102c70b9b660d40ce7e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 22 Nov 2022 15:07:04 +0800 Subject: [PATCH 01/28] =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcTripReportRecordDTO.java | 202 ++++++++++++++++++ .../entity/IcTripReportRecordEntity.java | 161 ++++++++++++++ 2 files changed, 363 insertions(+) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 60491f0b17..2c24205126 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -375,4 +375,206 @@ public class IcTripReportRecordDTO implements Serializable { */ @ExcelIgnore private String createdByName; + + /** + * 核酸检测报告异常 是/否【烟台】 + */ + @ExcelIgnore + private String detectionAbnormal; + /** + * 两码一报告状态 (正常 异常)【烟台】 + */ + @ExcelIgnore + private String twoCodeOneReportStatus; + /** + * 申报状态( 0未审核 1审核通过 2无效数据)【烟台】 + */ + @ExcelIgnore + private String declarationStatus; + /** + * 是否有外地旅居史 是/否【烟台】 + */ + @ExcelIgnore + private String nonlocalResidenceHistory; + /** + * 途经省【烟台】 + */ + @ExcelIgnore + private String viaProvince; + /** + * 途经市【烟台】 + */ + @ExcelIgnore + private String viaCity; + /** + * 途经县区【烟台】 + */ + @ExcelIgnore + private String viaCounty; + /** + * 同行人员【烟台】 + */ + @ExcelIgnore + private String travelPersonnel; + /** + * 户籍地【烟台】 + */ + @ExcelIgnore + private String registeredResidenceCity; + /** + * 户籍地详细【烟台】 + */ + @ExcelIgnore + private String registeredResidenceAddress; + /** + * 是否带车 是/否 【烟台】 + */ + @ExcelIgnore + private String carryVehicle; + /** + * 带车车牌号【烟台】 + */ + @ExcelIgnore + private String carryVehicleNumber; + /** + * 车牌颜色【烟台】 + */ + @ExcelIgnore + private String carryVehiclenumberColor; + /** + * 目的地交通场站【烟台】 + */ + @ExcelIgnore + private String destinationStation; + /** + * 入鲁时间【烟台】 + */ + @ExcelIgnore + private String arriveLuTime; + /** + * 行程码【烟台】 + */ + @ExcelIgnore + private String travelCodeImg; + /** + * 无效时间【烟台】 + */ + @ExcelIgnore + private String invalidTime; + /** + * 证件类型【烟台】 + */ + @ExcelIgnore + private String cardType; + /** + * 区域【烟台】 + */ + @ExcelIgnore + private String area; + /** + * 年龄【烟台】 + */ + @ExcelIgnore + private String age; + /** + * 性别【烟台】 + */ + @ExcelIgnore + private String sex; + /** + * 是否有新冠肺炎病史 是/否 【烟台】 + */ + @ExcelIgnore + private String covidFlag; + /** + * 来烟方式【烟台】 + */ + @ExcelIgnore + private String comeMode; + /** + * 班次【烟台】 + */ + @ExcelIgnore + private String shift; + /** + * 抵烟时间【烟台】 + */ + @ExcelIgnore + private String arriveTime; + /** + * 上报街道【烟台】 + */ + @ExcelIgnore + private String reportStreet; + /** + * 来源地区全【烟台】 + */ + @ExcelIgnore + private String comeAreaFull; + /** + * 离开风险区域的时间【烟台】 + */ + @ExcelIgnore + private String leaveTheRiskAreaTime; + /** + * 是否携带48小时核算证明 是/否【烟台】 + */ + @ExcelIgnore + private String carryHesuanProof; + /** + * 省【烟台】 + */ + @ExcelIgnore + private String provinceName; + /** + * 市【烟台】 + */ + @ExcelIgnore + private String cityName; + /** + * 县【烟台】 + */ + @ExcelIgnore + private String countyName; + /** + * 详细地址【烟台】 + */ + @ExcelIgnore + private String twonName; + /** + * 健康码异常 是/否【烟台】 + */ + @ExcelIgnore + private String healthCodeAbnormal; + /** + * 行程码异常 是/否【烟台】 + */ + @ExcelIgnore + private String travelCodeAbnormal; + /** + * 【烟台】 + */ + @ExcelIgnore + private String iId; + /** + * 【烟台】 + */ + @ExcelIgnore + private String iDate; + /** + * 【烟台】 + */ + @ExcelIgnore + private String iType; + /** + * 【烟台】 + */ + @ExcelIgnore + private String iTime; + /** + * 【烟台】 + */ + @ExcelIgnore + private String iFlag; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java index 3ab91a19b5..20f851210c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java @@ -180,4 +180,165 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { */ private String tripDataType; + /** + * 核酸检测报告异常 是/否【烟台】 + */ + private String detectionAbnormal; + /** + * 两码一报告状态 (正常 异常)【烟台】 + */ + private String twoCodeOneReportStatus; + /** + * 申报状态( 0未审核 1审核通过 2无效数据)【烟台】 + */ + private String declarationStatus; + /** + * 是否有外地旅居史 是/否【烟台】 + */ + private String nonlocalResidenceHistory; + /** + * 途经省【烟台】 + */ + private String viaProvince; + /** + * 途经市【烟台】 + */ + private String viaCity; + /** + * 途经县区【烟台】 + */ + private String viaCounty; + /** + * 同行人员【烟台】 + */ + private String travelPersonnel; + /** + * 户籍地【烟台】 + */ + private String registeredResidenceCity; + /** + * 户籍地详细【烟台】 + */ + private String registeredResidenceAddress; + /** + * 是否带车 是/否 【烟台】 + */ + private String carryVehicle; + /** + * 带车车牌号【烟台】 + */ + private String carryVehicleNumber; + /** + * 车牌颜色【烟台】 + */ + private String carryVehiclenumberColor; + /** + * 目的地交通场站【烟台】 + */ + private String destinationStation; + /** + * 入鲁时间【烟台】 + */ + private String arriveLuTime; + /** + * 行程码【烟台】 + */ + private String travelCodeImg; + /** + * 无效时间【烟台】 + */ + private String invalidTime; + /** + * 证件类型【烟台】 + */ + private String cardType; + /** + * 区域【烟台】 + */ + private String area; + /** + * 年龄【烟台】 + */ + private String age; + /** + * 性别【烟台】 + */ + private String sex; + /** + * 是否有新冠肺炎病史 是/否 【烟台】 + */ + private String covidFlag; + /** + * 来烟方式【烟台】 + */ + private String comeMode; + /** + * 班次【烟台】 + */ + private String shift; + /** + * 抵烟时间【烟台】 + */ + private String arriveTime; + /** + * 上报街道【烟台】 + */ + private String reportStreet; + /** + * 来源地区全【烟台】 + */ + private String comeAreaFull; + /** + * 离开风险区域的时间【烟台】 + */ + private String leaveTheRiskAreaTime; + /** + * 是否携带48小时核算证明 是/否【烟台】 + */ + private String carryHesuanProof; + /** + * 省【烟台】 + */ + private String provinceName; + /** + * 市【烟台】 + */ + private String cityName; + /** + * 县【烟台】 + */ + private String countyName; + /** + * 详细地址【烟台】 + */ + private String twonName; + /** + * 健康码异常 是/否【烟台】 + */ + private String healthCodeAbnormal; + /** + * 行程码异常 是/否【烟台】 + */ + private String travelCodeAbnormal; + /** + * 【烟台】 + */ + private String iId; + /** + * 【烟台】 + */ + private String iDate; + /** + * 【烟台】 + */ + private String iType; + /** + * 【烟台】 + */ + private String iTime; + /** + * 【烟台】 + */ + private String iFlag; + } From 90ccc25bb3d9d27c47bdfaf2b82d4b0a4c368d7e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 22 Nov 2022 17:37:56 +0800 Subject: [PATCH 02/28] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E8=A1=8C=E7=A8=8B?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcTripReportRecordDTO.java | 18 +- .../epmet/dto/form/IcYtTripReportFormDTO.java | 339 ++++++++++++++++++ .../IcTripReportRecordController.java | 93 +++++ .../entity/IcTripReportRecordEntity.java | 18 +- .../IcYtTripReportRecordExportExcel.java | 194 ++++++++++ .../service/IcTripReportRecordService.java | 10 +- .../impl/IcTripReportRecordServiceImpl.java | 146 ++++++++ .../mapper/IcTripReportRecordDao.xml | 23 +- 8 files changed, 819 insertions(+), 22 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcYtTripReportFormDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 2c24205126..19cd71a0a5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -411,6 +411,11 @@ public class IcTripReportRecordDTO implements Serializable { */ @ExcelIgnore private String viaCounty; + /** + * 途经地区全拼 + */ + @ExcelIgnore + private String via; /** * 同行人员【烟台】 */ @@ -450,6 +455,7 @@ public class IcTripReportRecordDTO implements Serializable { * 入鲁时间【烟台】 */ @ExcelIgnore + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String arriveLuTime; /** * 行程码【烟台】 @@ -460,6 +466,7 @@ public class IcTripReportRecordDTO implements Serializable { * 无效时间【烟台】 */ @ExcelIgnore + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String invalidTime; /** * 证件类型【烟台】 @@ -475,7 +482,7 @@ public class IcTripReportRecordDTO implements Serializable { * 年龄【烟台】 */ @ExcelIgnore - private String age; + private int age; /** * 性别【烟台】 */ @@ -500,6 +507,7 @@ public class IcTripReportRecordDTO implements Serializable { * 抵烟时间【烟台】 */ @ExcelIgnore + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String arriveTime; /** * 上报街道【烟台】 @@ -515,7 +523,8 @@ public class IcTripReportRecordDTO implements Serializable { * 离开风险区域的时间【烟台】 */ @ExcelIgnore - private String leaveTheRiskAreaTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date leaveTheRiskAreaTime; /** * 是否携带48小时核算证明 是/否【烟台】 */ @@ -570,11 +579,16 @@ public class IcTripReportRecordDTO implements Serializable { * 【烟台】 */ @ExcelIgnore + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private String iTime; /** * 【烟台】 */ @ExcelIgnore private String iFlag; + /** + * 烟台数据主键【烟台】 + */ + private String ytId; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcYtTripReportFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcYtTripReportFormDTO.java new file mode 100644 index 0000000000..a3872b4926 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcYtTripReportFormDTO.java @@ -0,0 +1,339 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 行程上报烟台入参 + */ +@Data +public class IcYtTripReportFormDTO implements Serializable { + + public interface YtAdd extends CustomerClientShowGroup { + } + public interface YtEdit extends CustomerClientShowGroup { + } + + @NotBlank(message = "主键不能为空", groups = {YtEdit.class}) + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 姓名 + */ + @NotBlank(message = "姓名不能为空", groups = {YtAdd.class}) + private String name; + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空", groups = {YtAdd.class}) + private String mobile; + + /** + * 身份证号 + */ + @NotBlank(message = "证件号能为空", groups = {YtAdd.class}) + private String idCard; + + /** + * 是否添加到核算检测关注名单,true加入;默认false不加入 + */ + @NotNull(message = "是否添加到核算检测关注名单", groups = {YtAdd.class}) + private Boolean heSuanCheck; + /** + * 现居地编码 + */ + private String presentAddressCode; + + /** + * 现居地编码路径:"presentAddressPathCode":"37,3702,370203,370203026,370203026002" + */ + private String presentAddressPathCode; + + /** + * 现居地名称eg:山东省青岛市黄岛区玫瑰山路社区 + */ + private String presentAddress; + + /** + * 详细地址 + */ + private String detailAddress; + + /** + * 来源地区编码 + */ + private String sourceAddressCode; + + /** + * 来源地编码路径: "sourceAddressPathCode": "37,3702,370203,370203026,370203026002" + */ + private String sourceAddressPathCode; + + /** + * 来源地区地址 + */ + private String sourceAddress; + + /** + * 到达日期 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date arriveDate; + + /** + * 离开日期 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date leaveDate; + + /** + * 备注信息 + */ + @Length(max = 500, message = "备注最多可输入500字", groups = {YtAdd.class}) + private String remark; + + /** + * userType=icresi时,必填,取值居民所属的网格ID; + * 居民端小程序上报前端赋值当前用户所在的网格id + */ + private String gridId; + + /** + * 用户id + * 居民端上报时后端自己赋值 + * pc录入如果是从居民信息选择,此列有值 + */ + private String userId; + + /** + * 居民端小程序的人:resi;数字社区的居民:icresi;单独录入:input; 导入:import + * 居民端上报是后端赋值;导入后端赋值 + * pc录入是前端赋值 + */ + private String userType; + + /** + * userType=icresi时,必填。 + * 居民所属的组织id + */ + @NotBlank(message = "agencyId不能为空", groups = {YtAdd.class}) + private String agencyId; + + /** + * pc录入时用 + */ + private String currentStaffId; + + /** + * pc录入时用 + * 通知渠道 0小程序通知,1短信通知 + */ + private List channel = new ArrayList<>(); + /** + * pc录入时用 + * 通知内容 + */ + private String content = ""; + + /** + * 交通方式,来源字典表(traffic_type) + */ + private String trafficType; + /** + * 其他返回方式,交通方式为其他时此列需要有值 + */ + private String trafficTypeExplain; + /** + * 来源地详细信息 source_address字段的说明 + */ + private String sourceDetailAddress; + /** + * 核酸检测报告异常 是/否【烟台】 + */ + private String detectionAbnormal; + /** + * 两码一报告状态 (正常 异常)【烟台】 + */ + private String twoCodeOneReportStatus; + /** + * 申报状态( 0未审核 1审核通过 2无效数据)【烟台】 + */ + private String declarationStatus; + /** + * 是否有外地旅居史 是/否【烟台】 + */ + private String nonlocalResidenceHistory; + /** + * 途经省【烟台】 + */ + private String viaProvince; + /** + * 途经市【烟台】 + */ + private String viaCity; + /** + * 途经县区【烟台】 + */ + private String viaCounty; + /** + * 同行人员【烟台】 + */ + private String travelPersonnel; + /** + * 户籍地【烟台】 + */ + private String registeredResidenceCity; + /** + * 户籍地详细【烟台】 + */ + private String registeredResidenceAddress; + /** + * 是否带车 是/否 【烟台】 + */ + private String carryVehicle; + /** + * 带车车牌号【烟台】 + */ + private String carryVehicleNumber; + /** + * 车牌颜色【烟台】 + */ + private String carryVehiclenumberColor; + /** + * 目的地交通场站【烟台】 + */ + private String destinationStation; + /** + * 入鲁时间【烟台】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date arriveLuTime; + /** + * 行程码【烟台】 + */ + private String travelCodeImg; + /** + * 无效时间【烟台】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date invalidTime; + /** + * 证件类型【烟台】 + */ + private String cardType; + /** + * 区域【烟台】 + */ + private String area; + /** + * 年龄【烟台】 + */ + private int age; + /** + * 性别【烟台】 + */ + private String sex; + /** + * 是否有新冠肺炎病史 是/否 【烟台】 + */ + private String covidFlag; + /** + * 来烟方式【烟台】 + */ + private String comeMode; + /** + * 班次【烟台】 + */ + private String shift; + /** + * 抵烟时间【烟台】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date arriveTime; + /** + * 上报街道【烟台】 + */ + private String reportStreet; + /** + * 来源地区全【烟台】 + */ + private String comeAreaFull; + /** + * 离开风险区域的时间【烟台】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date leaveTheRiskAreaTime; + /** + * 是否携带48小时核算证明 是/否【烟台】 + */ + private String carryHesuanProof; + /** + * 省【烟台】 + */ + private String provinceName; + /** + * 市【烟台】 + */ + private String cityName; + /** + * 县【烟台】 + */ + private String countyName; + /** + * 详细地址【烟台】 + */ + private String twonName; + /** + * 健康码异常 是/否【烟台】 + */ + private String healthCodeAbnormal; + /** + * 行程码异常 是/否【烟台】 + */ + private String travelCodeAbnormal; + /** + * 【烟台】 + */ + private String iId; + /** + * 【烟台】 + */ + private String iDate; + /** + * 【烟台】 + */ + private String iType; + /** + * 【烟台】 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date iTime; + /** + * 【烟台】 + */ + private String iFlag; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java index 0e149ed9df..83b232bec7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java @@ -30,6 +30,7 @@ import com.epmet.dto.result.EmphasisTripPieDetailResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.excel.IcPsTripReportRecordExportExcel; import com.epmet.excel.IcTripReportRecordExportExcel; +import com.epmet.excel.IcYtTripReportRecordExportExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.IcTripReportRecordService; import lombok.extern.slf4j.Slf4j; @@ -494,4 +495,96 @@ public class IcTripReportRecordController implements ResultDataResolver { return new Result>().ok(icTripReportRecordService.emphasisTripPieDetail(formDTO)); } + /** + * pc: 行程上报-列表--烟台 + */ + @PostMapping("yt-page") + @MaskResponse(fieldNames = {"mobile", "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) + public Result> ytPage(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(PageFormDTO.AddUserInternalGroup.class); + PageData page = icTripReportRecordService.ytPage(formDTO); + return new Result>().ok(page); + } + + /** + * 查看详情--烟台 + */ + @MaskResponse(fieldNames = {"showMobile", "showIdCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) + @PostMapping("yt-detail") + public Result ytDetail(@LoginUser TokenDto tokenDto, @RequestBody IcTripReportRecordDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcTripReportRecordDTO.DetailViewGroup.class); + PageTripReportFormDTO pageTripReportFormDTO = new PageTripReportFormDTO(); + pageTripReportFormDTO.setCustomerId(tokenDto.getCustomerId()); + pageTripReportFormDTO.setUserId(tokenDto.getUserId()); + pageTripReportFormDTO.setId(formDTO.getId()); + return new Result().ok(icTripReportRecordService.ytDetail(pageTripReportFormDTO)); + } + + /** + * pc: 行程上报-新增--烟台 + * + * @param formDTO + * @return + */ + @NoRepeatSubmit + @PostMapping("yt-save") + public Result ytSave(@LoginUser TokenDto tokenDto, @RequestBody IcYtTripReportFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + String id = icTripReportRecordService.ytSave(formDTO); + return new Result().ok(id); + } + + /** + * pc: 行程上报-修改--烟台 + * + * @param formDTO + * @return + */ + @NoRepeatSubmit + @PostMapping("yt-update") + public Result ytUpdate(@LoginUser TokenDto tokenDto, @RequestBody IcYtTripReportFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentStaffId(tokenDto.getUserId()); + return new Result().ok(icTripReportRecordService.ytUpdate(formDTO)); + } + + /** + * pc:行程上报-导出--烟台 + */ + @NoRepeatSubmit + @PostMapping("yt-export") + public void ytEexport(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO, HttpServletResponse response) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setIsPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + int pageNo = formDTO.getPageNo(); + try { + // 这里 需要指定写用哪个class去写 + String today = DateUtils.format(new Date(), DateUtils.DATE_PATTERN_MMDD); + String fileName = "行程上报信息".concat(today); + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcYtTripReportRecordExportExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + PageData data = null; + List list = null; + do { + data = icTripReportRecordService.ytPage(formDTO); + list = ConvertUtils.sourceToTarget(data.getList(), IcYtTripReportRecordExportExcel.class); + formDTO.setPageNo(++pageNo); + excelWriter.write(list, writeSheet); + } while (CollectionUtils.isNotEmpty(data.getList()) && data.getList().size() == formDTO.getPageSize()); + + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java index 20f851210c..d9dee65f52 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java @@ -239,7 +239,7 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 入鲁时间【烟台】 */ - private String arriveLuTime; + private Date arriveLuTime; /** * 行程码【烟台】 */ @@ -247,7 +247,7 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 无效时间【烟台】 */ - private String invalidTime; + private Date invalidTime; /** * 证件类型【烟台】 */ @@ -259,7 +259,7 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 年龄【烟台】 */ - private String age; + private int age; /** * 性别【烟台】 */ @@ -279,19 +279,19 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 抵烟时间【烟台】 */ - private String arriveTime; + private Date arriveTime; /** * 上报街道【烟台】 */ private String reportStreet; /** - * 来源地区全【烟台】 + * 来源地区 全【烟台】 */ private String comeAreaFull; /** * 离开风险区域的时间【烟台】 */ - private String leaveTheRiskAreaTime; + private Date leaveTheRiskAreaTime; /** * 是否携带48小时核算证明 是/否【烟台】 */ @@ -335,10 +335,14 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 【烟台】 */ - private String iTime; + private Date iTime; /** * 【烟台】 */ private String iFlag; + /** + * 烟台数据主键【烟台】 + */ + private String ytId; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java new file mode 100644 index 0000000000..ae1b520d22 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java @@ -0,0 +1,194 @@ +package com.epmet.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.HeadStyle; +import com.alibaba.excel.enums.poi.FillPatternTypeEnum; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 烟台-行程上报信息-导出 + * + */ +@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44) +@Data +public class IcYtTripReportRecordExportExcel implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + @ColumnWidth(12) + @ExcelProperty(value = "姓名") + private String name; + /** + * 证件号 + */ + @ColumnWidth(20) + @ExcelProperty(value = "证件号") + private String idCard; + /** + * 手机号 + */ + @ColumnWidth(15) + @ExcelProperty(value = "手机号") + private String mobile; + /** + * 现居地 + */ + @ColumnWidth(20) + @ExcelProperty(value = "现居地") + private String presentAddress; + /** + * 现居地详细地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "现居地详细地址") + private String detailAddress; + /** + * 来自地区 + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区") + private String comeAreaFull; + /** + * 来自地区详细地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "来自地区详细地址") + private String sourceDetailAddress; + /** + * 来到本地时间 + */ + @ColumnWidth(20) + @ExcelProperty(value = "来到本地时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private String arriveTime; + + /** + * 返回方式 + */ + @ColumnWidth(15) + @ExcelProperty(value = "返回方式") + private String comeMode; + /** + * 班次 + */ + @ColumnWidth(15) + @ExcelProperty(value = "班次") + private String shift; + /** + * 48小时核酸检测 + */ + @ColumnWidth(20) + @ExcelProperty(value = "48小时核酸检测") + private String carryHesuanProof; + /** + * 健康码异常 + */ + @ColumnWidth(15) + @ExcelProperty(value = "健康码异常") + private String healthCodeAbnormal; + /** + * 行程码异常 + */ + @ColumnWidth(15) + @ExcelProperty(value = "行程码异常") + private String travelCodeAbnormal; + /** + * 核酸检测报告异常 + */ + @ColumnWidth(20) + @ExcelProperty(value = "核酸检测报告异常") + private String detectionAbnormal; + /** + * 两码一报告状态 + */ + @ColumnWidth(20) + @ExcelProperty(value = "两码一报告状态") + private String twoCodeOneReportStatus; + /** + * 是否有外地旅居史 + */ + @ColumnWidth(20) + @ExcelProperty(value = "是否有外地旅居史") + private String nonlocalResidenceHistory; + /** + * 途径地区 + */ + @ColumnWidth(30) + @ExcelProperty(value = "途径地区") + private String via; + /** + * 同行人 + */ + @ColumnWidth(15) + @ExcelProperty(value = "同行人") + private String travelPersonnel; + /** + * 户籍地 + */ + @ColumnWidth(20) + @ExcelProperty(value = "户籍地") + private String registeredResidenceCity; + /** + * 户籍详细地址 + */ + @ColumnWidth(30) + @ExcelProperty(value = "户籍详细地址") + private String registeredResidenceAddress; + /** + * 是否带车 + */ + @ColumnWidth(15) + @ExcelProperty(value = "是否带车") + private String carryVehicle; + /** + * 带车车牌号 + */ + @ColumnWidth(20) + @ExcelProperty(value = "带车车牌号") + private String carryVehicleNumber; + /** + * 车辆颜色 + */ + @ColumnWidth(15) + @ExcelProperty(value = "车辆颜色") + private String carryVehiclenumberColor; + /** + * 目的地交通场站 + */ + @ColumnWidth(25) + @ExcelProperty(value = "目的地交通场站") + private String destinationStation; + /** + * 入鲁时间 + */ + @ColumnWidth(20) + @ExcelProperty(value = "入鲁时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private String arriveLuTime; + /** + * 行程码 + */ + @ColumnWidth(30) + @ExcelProperty(value = "行程码") + private String travelCodeImg; + /** + * 离开本地时间 + */ + @ColumnWidth(20) + @ExcelProperty(value = "离开本地时间") + @JsonFormat(pattern = "yyyy-MM-dd") + private String leaveDate; + /** + * 备注 + */ + @ColumnWidth(30) + @ExcelProperty(value = "备注") + private String remark; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java index d90f8907f7..7a1d1fc607 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java @@ -10,8 +10,6 @@ import com.epmet.dto.result.EmphasisTripPieDetailResultDTO; import com.epmet.dto.result.TripListDTO; import com.epmet.entity.IcTripReportRecordEntity; -import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; import java.nio.file.Path; import java.util.List; import java.util.Map; @@ -131,4 +129,12 @@ public interface IcTripReportRecordService extends BaseService emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO); + + PageData ytPage(PageTripReportFormDTO formDTO); + + IcTripReportRecordDTO ytDetail(PageTripReportFormDTO pageTripReportFormDTO); + + String ytSave(IcYtTripReportFormDTO formDTO); + + String ytUpdate(IcYtTripReportFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index 06ae46b36a..feb26f1aae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -835,5 +835,151 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl ytPage(PageTripReportFormDTO formDTO) { + //1.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getUserId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + //2.按条件查询业务数据 + PageInfo data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()) + .doSelectPageInfo(() -> baseDao.pageList(formDTO)); + List list = data.getList(); + if (CollectionUtils.isEmpty(list)) { + return new PageData(list, data.getTotal()); + } + //3.查询最近一次通知时间、核算检测关注名单 + if (CollectionUtils.isNotEmpty(list)) { + Map latestNotice = new HashMap<>(); + List gzIdCardList = new ArrayList<>(); + List idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList()); + //如果不分页可能会有很多个身份证号 + List> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED); + partionList.forEach(l -> { + Map map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l); + List gzIdCards = epidemicSpecialAttentionService.getHeSuanIdCardList(formDTO.getCustomerId(), l); + latestNotice.putAll(map); + gzIdCardList.addAll(gzIdCards); + }); + for (IcTripReportRecordDTO dto : list) { + //默认未加入 + dto.setHeSuanCheck(false); + dto.setHeSuanCheckDesc("未加入"); + if (CollectionUtils.isNotEmpty(gzIdCardList) && gzIdCardList.contains(dto.getIdCard())) { + dto.setHeSuanCheck(true); + dto.setHeSuanCheckDesc("已加入"); + } + if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) { + dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard())); + } + } + } + return new PageData(list, data.getTotal()); + } + + @Override + public IcTripReportRecordDTO ytDetail(PageTripReportFormDTO formDTO) { + //1.获取工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getUserId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + //2.按条件查询业务数据 + List list = baseDao.pageList(formDTO); + if (CollectionUtils.isEmpty(list)) { + return null; + } + //3.查询最近一次通知时间、核算检测关注名单 + Map latestNotice = new HashMap<>(); + List gzIdCardList = new ArrayList<>(); + List idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList()); + //如果不分页可能会有很多个身份证号 + List> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED); + partionList.forEach(l -> { + Map map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l); + List gzIdCards = epidemicSpecialAttentionService.getHeSuanIdCardList(formDTO.getCustomerId(), l); + latestNotice.putAll(map); + gzIdCardList.addAll(gzIdCards); + }); + + for (IcTripReportRecordDTO dto : list) { + //默认未加入 + dto.setHeSuanCheck(false); + dto.setHeSuanCheckDesc("未加入"); + if (CollectionUtils.isNotEmpty(gzIdCardList) && gzIdCardList.contains(dto.getIdCard())) { + dto.setHeSuanCheck(true); + dto.setHeSuanCheckDesc("已加入"); + } + if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) { + dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard())); + } + } + IcTripReportRecordDTO resultDto = list.get(NumConstant.ZERO); + if (null != resultDto) { + resultDto.setShowIdCard(resultDto.getIdCard()); + resultDto.setShowMobile(resultDto.getMobile()); + } + return resultDto; + } + + @Override + public String ytSave(IcYtTripReportFormDTO formDTO) { + //如果是单个录入的,默认数据属于当前用户所属组织id + if (IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())) { + //获取当前登录用户所属组织id + CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + } + IcTripReportRecordEntity entity = ConvertUtils.sourceToTarget(formDTO, IcTripReportRecordEntity.class); + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId()); + if (null == agencyInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询组织信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); + } + entity.setPids(agencyInfoCache.getPids()); + //1.插入行程记录表 + entity.setYtId(IdWorker.getIdStr()); + insert(entity); + IcTripReportFormDTO dto = ConvertUtils.sourceToTarget(formDTO, IcTripReportFormDTO.class); + if (formDTO.getHeSuanCheck()) { + // 2.加入核算检测关注名单 + vaccinationAdd(dto); + } + //3.新增通知表信息 + if (formDTO.getChannel().size() > NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { + sendNotice(dto, agencyInfoCache.getOrganizationName()); + } + return entity.getId(); + } + + @Override + public String ytUpdate(IcYtTripReportFormDTO formDTO) { + IcTripReportRecordEntity origin = baseDao.selectById(formDTO.getId()); + if (null == origin) { + log.warn("ic_trip_report_record记录不存在id:", formDTO.getId()); + return formDTO.getId(); + } + //如果是单个录入的,默认数据属于当前用户所属组织id + if (IcResiUserConstant.USER_TYPE_INPUT.equals(formDTO.getUserType())) { + //获取当前登录用户所属组织id + CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getCurrentStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + } + IcTripReportRecordEntity entity = ConvertUtils.sourceToTarget(formDTO, IcTripReportRecordEntity.class); + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(entity.getAgencyId()); + if (null == agencyInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询组织信息异常", EpmetErrorCode.SERVER_ERROR.getMsg()); + } + entity.setPids(agencyInfoCache.getPids()); + //1.修改行程记录表 + updateById(entity); + IcTripReportFormDTO dto = ConvertUtils.sourceToTarget(formDTO, IcTripReportFormDTO.class); + if (formDTO.getHeSuanCheck()) { + // 2.加入核算检测关注名单,如果之前关注了,会在通知的service层移除 + vaccinationAdd(dto); + } + //3.新增通知表信息 + if (formDTO.getChannel().size() > NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) { + sendNotice(dto, agencyInfoCache.getOrganizationName()); + } + return entity.getId(); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index 92cb344f9f..20fe1d8f9a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -33,17 +33,18 @@ + SELECT + i_id + FROM ic_trip_report_record + WHERE DEL_FLAG = '0' + AND ID_CARD IN ( + #{idCard} + ) + + update ic_trip_report_record set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=NOW() WHERE AGENCY_ID=#{agencyId} @@ -161,4 +172,193 @@ ) + + + + UPDATE ic_trip_report_record + + + + when yt_id = #{l.ytId} then #{l.travelCodeAbnormal} + + + + + when yt_id = #{l.ytId} then #{l.healthCodeAbnormal} + + + + + when yt_id = #{l.ytId} then #{l.twonName} + + + + + when yt_id = #{l.ytId} then #{l.countyName} + + + + + when yt_id = #{l.ytId} then #{l.cityName} + + + + + when yt_id = #{l.ytId} then #{l.provinceName} + + + + + when yt_id = #{l.ytId} then #{l.carryHesuanProof} + + + + + when yt_id = #{l.ytId} then #{l.leaveTheRiskAreaTime} + + + + + when yt_id = #{l.ytId} then #{l.comeAreaFull} + + + + + when yt_id = #{l.ytId} then #{l.reportStreet} + + + + + when yt_id = #{l.ytId} then #{l.arriveTime} + + + + + when yt_id = #{l.ytId} then #{l.shift} + + + + + when yt_id = #{l.ytId} then #{l.comeMode} + + + + + when yt_id = #{l.ytId} then #{l.covidFlag} + + + + + when yt_id = #{l.ytId} then #{l.sex} + + + + + when yt_id = #{l.ytId} then #{l.age} + + + + + when yt_id = #{l.ytId} then #{l.area} + + + + + when yt_id = #{l.ytId} then #{l.cardType} + + + + + when yt_id = #{l.ytId} then #{l.invalidTime} + + + + + when yt_id = #{l.ytId} then #{l.travelCodeImg} + + + + + when yt_id = #{l.ytId} then #{l.arriveLuTime} + + + + + when yt_id = #{l.ytId} then #{l.destinationStation} + + + + + when yt_id = #{l.ytId} then #{l.carryVehicleNumberColor} + + + + + when yt_id = #{l.ytId} then #{l.carryVehicleNumber} + + + + + when yt_id = #{l.ytId} then #{l.carryVehicle} + + + + + when yt_id = #{l.ytId} then #{l.registeredResidenceAddress} + + + + + when yt_id = #{l.ytId} then #{l.registeredResidenceCity} + + + + + when yt_id = #{l.ytId} then #{l.travelPersonnel} + + + + + when yt_id = #{l.ytId} then #{l.viaCounty} + + + + + when yt_id = #{l.ytId} then #{l.viaCity} + + + + + when yt_id = #{l.ytId} then #{l.viaProvince} + + + + + when yt_id = #{l.ytId} then #{l.nonlocalResidenceHistory} + + + + + when yt_id = #{l.ytId} then #{l.declarationStatus} + + + + + when yt_id = #{l.ytId} then #{l.twoCodeOneReportStatus} + + + + + when yt_id = #{l.ytId} then #{l.detectionAbnormal} + + + UPDATED_TIME = NOW() + + WHERE DEL_FLAG = '0' + AND yt_id IN ( + + #{l.ytId} + + ) + \ No newline at end of file From 6999878ed9492a669110be75e877279c898deb78 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 23 Nov 2022 08:58:00 +0800 Subject: [PATCH 04/28] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/DataSyncConfigServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java index 2cf5d3ae80..be0b76bf00 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java @@ -1085,7 +1085,7 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl>> partition = ListUtils.partition(tripReportList, NumConstant.ONE_HUNDRED); partition.forEach(p -> { From 6c0e8165419acb0699dc4f41d5e8d6605e274801 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 23 Nov 2022 10:26:50 +0800 Subject: [PATCH 05/28] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E6=8B=89=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/IcTripReportRecordEntity.java | 2 +- .../impl/DataSyncConfigServiceImpl.java | 21 ++++++++++++------- .../mapper/IcTripReportRecordDao.xml | 7 ++++++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java index d9dee65f52..dcb1c01e0b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java @@ -231,7 +231,7 @@ public class IcTripReportRecordEntity extends BaseEpmetEntity { /** * 车牌颜色【烟台】 */ - private String carryVehiclenumberColor; + private String carryVehicleNumberColor; /** * 目的地交通场站【烟台】 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java index be0b76bf00..7c57304fa5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java @@ -1080,12 +1080,21 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl idCards = new ArrayList<>(idCardAndResiInfoMap.keySet()); Map args = new HashMap<>(); args.put("idcards", idCards); + String json = "[\n" + + " {\"ytId\": \"10100101010\",\"travelCodeAbnormal\": \"否\",\"healthCodeAbnormal\": \"否\",\"twonName\": \"山东路\",\"countyName\": \"市北区\",\"cityName\": \"青岛市\",\"provinceName\": \"山东省\",\"carryHesuanProof\": \"是\",\"leaveTheRiskAreaTime\": \"2022-11-11 10:20:02\",\"comeAreaFull\": \"山东省青岛市市北区辽宁路街道\",\"reportStreet\": \"山东路街道\",\"arriveTime\": \"2022-11-20 11:11:11\",\"shift\": \"D909\",\"comeMode\": \"动车\",\"covidFlag\": \"1\",\"sex\": \"1\",\"age\": \"50\",\"area\": \"哈哈哈\",\"cardType\": \"身份证\",\"invalidTime\": \"2022-12-01 00:00:00\",\"travelCodeImg\": \"/aaa/aaa\",\"arriveLuTime\": \"2022-11-21 11:11:11\",\"destinationStation\": \"青岛北站\",\"carryVehicleNumberColor\": \"蓝\",\"carryVehicleNumber\": \"11111\",\"carryVehicle\": \"是\",\"registeredResidenceAddress\": \"山东青岛市北镇江路街道\",\"registeredResidenceCity\": \"山东青岛\",\"travelPersonnel\": \"无\",\"viaCounty\": \"市北区\",\"viaCity\": \"青岛市\",\"viaProvince\": \"山东省\",\"nonlocalResidenceHistory\": \"否\",\"declarationStatus\": \"1\",\"twoCodeOneReportStatus\": \"正常\",\"detectionAbnormal\": \"否\",\"detailAddress\": \"山东路163号\",\"idCard\": \"370785195001012558\"\n" + + " },\n" + + " {\"ytId\": \"02020191919\",\"travelCodeAbnormal\": \"否\",\"healthCodeAbnormal\": \"否\",\"twonName\": \"山东路\",\"countyName\": \"市北区\",\"cityName\": \"青岛市\",\"provinceName\": \"山东省\",\"carryHesuanProof\": \"是\",\"leaveTheRiskAreaTime\": \"2022-11-11 10:20:02\",\"comeAreaFull\": \"山东省青岛市市北区辽宁路街道\",\"reportStreet\": \"山东路街道\",\"arriveTime\": \"2022-11-20 11:11:11\",\"shift\": \"D909\",\"comeMode\": \"动车\",\"covidFlag\": \"1\",\"sex\": \"1\",\"age\": \"50\",\"area\": \"哈哈哈\",\"cardType\": \"身份证\",\"invalidTime\": \"2022-12-01 00:00:00\",\"travelCodeImg\": \"/aaa/aaa\",\"arriveLuTime\": \"2022-11-21 11:11:11\",\"destinationStation\": \"青岛北站\",\"carryVehicleNumberColor\": \"蓝\",\"carryVehicleNumber\": \"11111\",\"carryVehicle\": \"是\",\"registeredResidenceAddress\": \"山东青岛市北镇江路街道\",\"registeredResidenceCity\": \"山东青岛\",\"travelPersonnel\": \"无\",\"viaCounty\": \"市北区\",\"viaCity\": \"青岛市\",\"viaProvince\": \"山东省\",\"nonlocalResidenceHistory\": \"否\",\"declarationStatus\": \"1\",\"twoCodeOneReportStatus\": \"正常\",\"detectionAbnormal\": \"否\",\"detailAddress\": \"山东路163号\",\"idCard\": \"370785195101012558\"\n" + + " }\n" + + "]"; +// List> tripReportList = new ArrayList<>(); List> tripReportList = yantaiNamedParamLantuJdbcTemplate.queryForList( - "select card_id as idCard, address as presentAddress, i_flag, i_time, i_type, i_date,i_id, travel_code_abnormal, health_code_abnormal, twon_name, county_name, city_name, province_name,\n" + + "select card_id as idCard, address as detailAddress, i_flag, i_time, i_type, i_date,i_id, travel_code_abnormal, health_code_abnormal, twon_name, county_name, city_name, province_name,\n" + "carry_hesuan_proof, leave_the_risk_area_time, come_area_full, report_street, arrive_time, shift, come_mode, covid_flag, sex, age,\n" + "area, card_type, invalid_time, travel_code_img, arrive_lu_time, destination_station, carry_vehicle_number_color, carry_vehicle_number,\n" + "carry_vehicle, registered_residence_address, registered_residence_city, travel_personnel, via_county, via_city, via_province,\n" + "nonlocal_residence_history, declaration_status, two_code_one_report_status, detection_abnormal from t_ymjz_info where cardno in (:idcards)", args); + /*Map objectObjectHashMap = new HashMap<>(); + tripReportList.add(objectObjectHashMap);*/ if (CollectionUtils.isNotEmpty(tripReportList)){ List>> partition = ListUtils.partition(tripReportList, NumConstant.ONE_HUNDRED); partition.forEach(p -> { @@ -1093,11 +1102,12 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl needUpdate = new ArrayList<>(); // 要新增的 List entities = ConvertUtils.sourceToTarget(p, IcTripReportRecordEntity.class); +// List entities = JSON.parseArray(json,IcTripReportRecordEntity.class); // 数据库存在的 List existsTripReport = icTripReportRecordDao.getExistsTripReport(idCards); if (CollectionUtils.isNotEmpty(existsTripReport)){ // 要更新的 - existsTripReport.forEach(etr -> entities.stream().filter(e -> e.getIId().equals(etr)).forEach(e -> { + existsTripReport.forEach(etr -> entities.stream().filter(e -> e.getYtId().equals(etr)).forEach(e -> { needUpdate.add(e); })); // 要新增的 @@ -1105,15 +1115,12 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl iterator = entities.iterator(); while (iterator.hasNext()){ IcTripReportRecordEntity next = iterator.next(); - if (next.getIId().equals(etr)){ + if (next.getYtId().equals(etr)){ iterator.remove(); } } }); if (CollectionUtils.isNotEmpty(entities)){ - entities.forEach(e -> { - - }); entities.forEach(e -> resiInfos.stream().filter(r ->r.getIdCard().equals(e.getIdCard())).forEach(r -> { e.setGridId(r.getGridId()); e.setCustomerId(r.getCustomerId()); @@ -1123,8 +1130,6 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl + SELECT user_id AS "userId", - `password` AS "passWord" + `password` AS "passWord", + ENABLE_FLAG as enableFlag FROM `customer_staff` WHERE From 3945eb56a0e1d1ae56dfb74481822b7894caf268 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 14:15:17 +0800 Subject: [PATCH 11/28] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E5=A4=B1=E8=B4=A5,?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7[13146409824],=E5=AE=A2=E6=88=B7id:[?= =?UTF-8?q?45687aa479955f9d06204d415238f7cc],code[8005],msg[=E6=82=A8?= =?UTF-8?q?=E5=A5=BD=EF=BC=8C=E6=82=A8=E7=9A=84=E8=B4=A6=E6=88=B7=E5=B7=B2?= =?UTF-8?q?=E8=A2=AB=E5=86=BB=E7=BB=93=EF=BC=8C=E8=AF=B7=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E3=80=82]=20warn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/SsoServiceImpl.java | 2 +- .../java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index 29283f6b01..1d8cbf8b4f 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -478,7 +478,7 @@ public class SsoServiceImpl implements SsoService { customerStaffFormDTO.setMobile(formDTO.getMobile()); Result customerStaffDTOResult = epmetUserOpenFeignClient.getCustomerStaffInfo(customerStaffFormDTO); if (!customerStaffDTOResult.success() || null == customerStaffDTOResult.getData()) { - logger.error(String.format("获取工作人员信息失败,手机号[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), customerStaffDTOResult.getCode(), customerStaffDTOResult.getMsg())); + logger.warn(String.format("获取工作人员信息失败,手机号[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), customerStaffDTOResult.getCode(), customerStaffDTOResult.getMsg())); throw new RenException(customerStaffDTOResult.getCode()); } CustomerStaffDTO customerStaff = customerStaffDTOResult.getData(); diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 3d2c2ebee0..585835f705 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -12,7 +12,6 @@ import com.epmet.commons.rocketmq.messages.LoginMQMsg; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; -import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; @@ -20,7 +19,6 @@ import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.redis.common.CustomerDingDingRedis; -import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache; import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.TokenDto; @@ -403,7 +401,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol customerStaffFormDTO.setMobile(formDTO.getMobile()); Result customerStaffDTOResult = epmetUserOpenFeignClient.getCustomerStaffInfo(customerStaffFormDTO); if (!customerStaffDTOResult.success() || null == customerStaffDTOResult.getData()) { - logger.error(String.format("获取工作人员信息失败,手机号[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), customerStaffDTOResult.getCode(), customerStaffDTOResult.getMsg())); + logger.warn(String.format("获取工作人员信息失败,手机号[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), customerStaffDTOResult.getCode(), customerStaffDTOResult.getMsg())); throw new RenException(customerStaffDTOResult.getCode()); } CustomerStaffDTO customerStaff = customerStaffDTOResult.getData(); From d720e1254978f4e914a40c161e0314963eb9514d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 14:27:06 +0800 Subject: [PATCH 12/28] =?UTF-8?q?=E8=A7=A3=E7=A6=81=EF=BC=9A/epmetuser/cus?= =?UTF-8?q?tomerstaff/enablestaff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java | 5 ++++- .../java/com/epmet/controller/CustomerStaffController.java | 1 + .../com/epmet/service/impl/CustomerStaffServiceImpl.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java index e2212b7608..52cda8c2a0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EnableStaffFormDTO.java @@ -18,5 +18,8 @@ public class EnableStaffFormDTO implements Serializable { * 被解禁用户Id */ private String staffId; - + /** + * token中获取 + */ + private String customerId; } 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 8bea2e4fbf..d037d1cd95 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 @@ -566,6 +566,7 @@ public class CustomerStaffController { @PostMapping("enablestaff") @RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_ENABLE) public Result enableStaff(@LoginUser TokenDto tokenDto, @RequestBody EnableStaffFormDTO fromDTO){ + fromDTO.setCustomerId(tokenDto.getCustomerId()); if (tokenDto.getUserId().equals(fromDTO.getStaffId())) { throw new RenException("工作人员自己不能解禁自己"); } 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 0bcb0b5eee..1ff4560c99 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 @@ -1055,6 +1055,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Wed, 23 Nov 2022 14:53:29 +0800 Subject: [PATCH 13/28] =?UTF-8?q?=E6=88=90=E5=91=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=87=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcResiUserServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 3e341bf86b..fb249f1184 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -2196,7 +2196,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl icResiUserAttachmentService.save(item)); // 如果是已经存在的居民,并且是租客状态,需要更新原本的状态 if (NumConstant.ONE_STR.equals(formDTO.getType())) { - IcResiUserEntity entity = new IcResiUserEntity(); +// IcResiUserEntity entity = new IcResiUserEntity(); + IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); entity.setId(resiUserId); entity.setIsTenant(NumConstant.ONE_STR); entity.setIsFloating(NumConstant.ONE_STR); From 1d79ab764d9ddaa4693d665ae639113012072dcf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 15:18:43 +0800 Subject: [PATCH 14/28] =?UTF-8?q?=E8=A7=A3=E7=A6=81=E6=94=BE=E5=BC=80?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/CustomerStaffController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d037d1cd95..6d01efdd7b 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 @@ -564,7 +564,7 @@ public class CustomerStaffController { * @author sun */ @PostMapping("enablestaff") - @RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_ENABLE) + // @RequirePermission(requirePermission = RequirePermissionEnum.ORG_STAFF_ENABLE) public Result enableStaff(@LoginUser TokenDto tokenDto, @RequestBody EnableStaffFormDTO fromDTO){ fromDTO.setCustomerId(tokenDto.getCustomerId()); if (tokenDto.getUserId().equals(fromDTO.getStaffId())) { From 9b05acb74b4f38cd974b20099385dd970fe24daa Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 15:20:15 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E8=A7=A3=E7=A6=81=E6=94=BE=E5=BC=80?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/CustomerStaffController.java | 2 -- 1 file changed, 2 deletions(-) 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 6d01efdd7b..45e9b098e7 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 @@ -19,8 +19,6 @@ package com.epmet.controller; import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.annotation.RequirePermission; -import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; From 949f1d34587489a0da05329aa7512f8634ea8cc3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 15:47:00 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E6=9C=AA=E7=A6=81=E7=94=A8enable,?= =?UTF-8?q?=E5=B7=B2=E7=A6=81=E7=94=A8disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/GovWebServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java index e83b6e78e7..c03bf7c629 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java @@ -84,7 +84,8 @@ public class GovWebServiceImpl implements GovWebService, ResultDataResolver { logger.warn("根据手机号查询PC工作端登陆人员信息失败,返回10003账号不存在"); throw new RenException(EpmetErrorCode.ERR10003.getCode()); } - if ("diabled".equals(result.getData().getEnableFlag())) { + //未禁用enable,已禁用disabled + if ("disabled".equals(result.getData().getEnableFlag())) { throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(), String.format("当前账号已被禁用staffId:%s", result.getData().getUserId()), EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); From 692274c6b2313ddf32411191347b284cae71580d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 23 Nov 2022 16:16:03 +0800 Subject: [PATCH 17/28] =?UTF-8?q?8005:=E6=82=A8=E5=A5=BD=EF=BC=8C=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=88=B0=E6=9C=9F=EF=BC=8C=E8=B4=A6=E6=88=B7=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E5=86=BB=E7=BB=93=EF=BC=8C=E8=AF=B7=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 0463d290a2..499d4131b8 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -32,7 +32,8 @@ public enum EpmetErrorCode { CANNOT_CREATE_GROUP(8002, "只有党员和热心居民才能创建小组,请选择您的身份"), GROUP_ALREADY_EXISTED(8003,"组名已存在"), GOV_STAFF_NOT_EXISTS(8004,"手机号未注册,请联系贵单位管理员,确认其录入手机与您所持手机号相同"), - GOV_STAFF_DISABLED(8005,"您好,您的账户已被冻结,请联系管理员。"), + //您好,您的账户已被冻结,请联系管理员。=>您好,服务到期,账户暂时冻结,请联系管理员。 + GOV_STAFF_DISABLED(8005,"您好,服务到期,账户暂时冻结,请联系管理员。"), LOSE_EFFICACY(8006,"此邀请链接已过期"), ERROR_PHONE(8007,"请输入正确的手机号"), PLEASE_LOGIN(8008,"请重新登录"), From e02281d9571e4b7367e9006627af6f6ac7db1bfa Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 23 Nov 2022 17:42:39 +0800 Subject: [PATCH 18/28] =?UTF-8?q?=E8=A1=8C=E7=A8=8B=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/utils/ConvertUtils.java | 16 ++++++++++++++++ .../impl/DataSyncConfigServiceImpl.java | 18 ++++++++++++------ .../resources/mapper/IcTripReportRecordDao.xml | 1 + 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java index 6d2e509797..ba53ab8c66 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java @@ -8,6 +8,7 @@ package com.epmet.commons.tools.utils; +import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; @@ -64,6 +65,21 @@ public class ConvertUtils { return targetList; } + public static List batchMapToEntity(List> maps, Class entity){ + if (CollectionUtils.isEmpty(maps)){ + return new ArrayList<>(); + } + List targetList = new ArrayList<>(maps.size()); + try { + for (Map map : maps) { + targetList.add(mapToEntity(map, entity)); + } + }catch (Exception e){ + logger.error("batchMapToEntity convert error ", e); + } + return targetList; + } + public static T mapToEntity(Map map, Class entity) { if (null == map){ return null; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java index 7c57304fa5..934132b517 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java @@ -1088,11 +1088,13 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl> tripReportList = new ArrayList<>(); List> tripReportList = yantaiNamedParamLantuJdbcTemplate.queryForList( - "select card_id as idCard, address as detailAddress, i_flag, i_time, i_type, i_date,i_id, travel_code_abnormal, health_code_abnormal, twon_name, county_name, city_name, province_name,\n" + - "carry_hesuan_proof, leave_the_risk_area_time, come_area_full, report_street, arrive_time, shift, come_mode, covid_flag, sex, age,\n" + - "area, card_type, invalid_time, travel_code_img, arrive_lu_time, destination_station, carry_vehicle_number_color, carry_vehicle_number,\n" + - "carry_vehicle, registered_residence_address, registered_residence_city, travel_personnel, via_county, via_city, via_province,\n" + - "nonlocal_residence_history, declaration_status, two_code_one_report_status, detection_abnormal from t_ymjz_info where cardno in (:idcards)", args); + "select id as ytId, card_id as idCard, address as detailAddress, i_flag as iFlag, i_time as iTime, i_type as iType, i_date as iDate,i_id as iId, " + + "travel_code_abnormal travelCodeAbnormal, health_code_abnormal healthCodeAbnormal, twon_name twonName, county_name countyName, " + + "city_name cityName, province_name provinceName, carry_hesuan_proof carryHesuanProof, leave_the_risk_area_time leaveTheRiskAreaTime, come_area_full comeAreaFull, " + + "report_street reportStreet, arrive_time arriveTime, shift, come_mode comeMode, covid_flag covidFlag, sex, age,\n" + + "area, card_type cardType, invalid_time invalidTime, travel_code_img travelCodeImg, arrive_lu_time arriveLuTime, destination_station destinationStation, carry_vehicle_number_color carryVehicleNumberColor, carry_vehicle_number carryVehicleNumber,\n" + + "carry_vehicle carryVehicle, registered_residence_address registeredResidenceAddress, registered_residence_city registeredResidenceCity, travel_personnel travelPersonnel, via_county viaCounty, via_city viaCity, via_province viaProvince,\n" + + "nonlocal_residence_history nonlocalResidenceHistory, declaration_status declarationStatus, two_code_one_report_status twoCodeOneReportStatus, detection_abnormal detectionAbnormal from v_baobei where card_id in (:idcards)", args); /*Map objectObjectHashMap = new HashMap<>(); tripReportList.add(objectObjectHashMap);*/ if (CollectionUtils.isNotEmpty(tripReportList)){ @@ -1101,7 +1103,11 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl needUpdate = new ArrayList<>(); // 要新增的 - List entities = ConvertUtils.sourceToTarget(p, IcTripReportRecordEntity.class); + List entities = ConvertUtils.batchMapToEntity(p, IcTripReportRecordEntity.class); + p.forEach(pp -> entities.stream().filter(ee -> ee.getIdCard().equals(pp.get("idCard"))).forEach(ee -> { + ee.setYtId(pp.get("ytId").toString()); + ee.setIId(pp.get("IId").toString()); + })); // List entities = JSON.parseArray(json,IcTripReportRecordEntity.class); // 数据库存在的 List existsTripReport = icTripReportRecordDao.getExistsTripReport(idCards); diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index e4bf6c5465..88537c4250 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -158,6 +158,7 @@ yt_id FROM ic_trip_report_record WHERE DEL_FLAG = '0' + AND yt_id is not null and yt_id != '' AND ID_CARD IN ( #{idCard} ) From 936bab159692a9f83cc189d7d91824a4bb14d430 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 09:25:30 +0800 Subject: [PATCH 19/28] /auth/thirdlogin/worklogin+/getmyorg --- .../service/impl/ThirdLoginServiceImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 585835f705..09ef64f67b 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -10,6 +10,7 @@ import com.epmet.auth.constants.AuthOperationConstants; import com.epmet.common.token.constant.LoginConstant; import com.epmet.commons.rocketmq.messages.LoginMQMsg; import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.enums.EnvEnum; @@ -192,6 +193,19 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol throw new RenException(EpmetErrorCode.PLEASE_LOGIN.getCode()); } StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = latestStaffWechat.getData(); + //2022.11.24校验下用户是否被禁用 + //2.1根据手机号查询到用户信息 + ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); + dto.setCustomerId(staffLatestAgencyResultDTO.getCustomerId()); + dto.setMobile(staffLatestAgencyResultDTO.getMobile()); + Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); + if (!customerStaffResult.success()) { + logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", staffLatestAgencyResultDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); + throw new RenException(customerStaffResult.getCode()); + } + if("disabled".equals(customerStaffResult.getData().get(NumConstant.ZERO).getEnableFlag())){ + throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); + } //3.记录staff_wechat this.savestaffwechat(staffLatestAgencyResultDTO.getStaffId(), userWechatDTO.getWxOpenId(), staffLatestAgencyResultDTO.getCustomerId()); @@ -538,7 +552,9 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } - + if("disabled".equals(customerStaffResult.getData().get(NumConstant.ZERO).getEnableFlag())){ + throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); + } //3、查询用户所有的组织信息 List customerIdList = new ArrayList<>(); for (CustomerStaffDTO customerStaffDTO : customerStaffResult.getData()) { From 48c03d8e0eb0f496d240e4bf180ba5a5e7c632bc Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 09:52:28 +0800 Subject: [PATCH 20/28] /gov/mine/agency/getlatestcustomer --- .../service/impl/CustomerStaffAgencyServiceImpl.java | 8 ++++++++ .../src/main/java/com/epmet/dto/CustomerStaffDTO.java | 1 + 2 files changed, 9 insertions(+) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index 7ddbadf0f9..c37f13d8ef 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -22,6 +22,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; 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.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; @@ -140,6 +142,12 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl staffInfo = epmetUserFeignClient.getCustomerStaffInfoByUserId(customerStaffParam); + if(!staffInfo.success()||null==staffInfo.getData()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"userId:"+userId+"customer_staff is null","获取用户信息异常"); + } + if("disabled".equals(staffInfo.getData().getEnableFlag())){ + throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); + } resultDTO.setStaffHeadPhoto(staffInfo.getData().getHeadPhoto()); resultDTO.setGender(staffInfo.getData().getGender()); //获取客户名称 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 9f697c584e..cd042877ab 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 @@ -126,6 +126,7 @@ public class CustomerStaffDTO implements Serializable { /** * 未禁用enable,已禁用diabled + * disabled */ private String enableFlag; From aedd993f3105b15fc2ee24d19d9313ebf62dd2ae Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 09:56:20 +0800 Subject: [PATCH 21/28] =?UTF-8?q?thirdlogin/worklogin=E5=85=88=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 09ef64f67b..78ec8124d8 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -194,8 +194,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol } StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = latestStaffWechat.getData(); //2022.11.24校验下用户是否被禁用 - //2.1根据手机号查询到用户信息 - ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); + //2.1根据手机号查询到用户信息 前端不跳转,暂时先注释吧 + /* ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); dto.setCustomerId(staffLatestAgencyResultDTO.getCustomerId()); dto.setMobile(staffLatestAgencyResultDTO.getMobile()); Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); @@ -205,7 +205,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol } if("disabled".equals(customerStaffResult.getData().get(NumConstant.ZERO).getEnableFlag())){ throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); - } + }*/ //3.记录staff_wechat this.savestaffwechat(staffLatestAgencyResultDTO.getStaffId(), userWechatDTO.getWxOpenId(), staffLatestAgencyResultDTO.getCustomerId()); From 5f0847e119a93575fe0c38420fd09157934e7b7c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 10:05:35 +0800 Subject: [PATCH 22/28] =?UTF-8?q?/agency/getlatestcustomer=EF=BC=8C10006?= =?UTF-8?q?=EF=BC=8C=E7=A6=81=E7=94=A8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index c37f13d8ef..42028ec907 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -146,7 +146,7 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl Date: Thu, 24 Nov 2022 10:15:36 +0800 Subject: [PATCH 23/28] =?UTF-8?q?/thirdlogin/getmyorgbypassword=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E5=AF=86=E7=A0=81=E7=99=BB=E5=BD=95=EF=BC=8C=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 78ec8124d8..cef85d6713 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -587,12 +587,16 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol dto.setCustomerId(customer.getId()); dto.setMobile(formDTO.getMobile()); Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); - if (!customerStaffResult.success()) { + if (!customerStaffResult.success()||CollectionUtils.isEmpty(customerStaffResult.getData())) { logger.warn(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } //2、密码是否正确 List customerStaffList=customerStaffResult.getData(); + // 禁用的给予提示 + if("disabled".equals(customerStaffList.get(NumConstant.ZERO).getEnableFlag())){ + throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); + } //3、查询用户所有的组织信息 List customerIdList = new ArrayList<>(); //是否设置过密码 From 8964058eecad6fcbc908a9bbc8416720e7207d2e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 10:24:38 +0800 Subject: [PATCH 24/28] =?UTF-8?q?/gov/mine/agency/getlatestcustomer?= =?UTF-8?q?=E8=BF=94=E5=9B=9E8005?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index 42028ec907..c37f13d8ef 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -146,7 +146,7 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl Date: Thu, 24 Nov 2022 10:44:06 +0800 Subject: [PATCH 25/28] =?UTF-8?q?thirdlogin/worklogin=EF=BC=8C=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E8=BF=94=E5=9B=9E8008=EF=BC=8C=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=A5=BD=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=99=BB=E5=BD=95=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/ThirdLoginServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index cef85d6713..07f60c2ecd 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -195,7 +195,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = latestStaffWechat.getData(); //2022.11.24校验下用户是否被禁用 //2.1根据手机号查询到用户信息 前端不跳转,暂时先注释吧 - /* ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); + ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); dto.setCustomerId(staffLatestAgencyResultDTO.getCustomerId()); dto.setMobile(staffLatestAgencyResultDTO.getMobile()); Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); @@ -203,9 +203,10 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", staffLatestAgencyResultDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } + // 8008 前端会提示:登录失效,请重新登录 跳转到登录界面。所以这里写死返回8008. if("disabled".equals(customerStaffResult.getData().get(NumConstant.ZERO).getEnableFlag())){ - throw new EpmetException(EpmetErrorCode.GOV_STAFF_DISABLED.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); - }*/ + throw new EpmetException(EpmetErrorCode.PLEASE_LOGIN.getCode(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg(),EpmetErrorCode.GOV_STAFF_DISABLED.getMsg()); + } //3.记录staff_wechat this.savestaffwechat(staffLatestAgencyResultDTO.getStaffId(), userWechatDTO.getWxOpenId(), staffLatestAgencyResultDTO.getCustomerId()); From 96263c75e8ece9ec858c2e39b1d59b4e35779980 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 24 Nov 2022 16:21:44 +0800 Subject: [PATCH 26/28] =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=AF=94=E5=AF=B9?= =?UTF-8?q?=EF=BC=8C=E9=99=90=E5=88=B6=E6=89=8B=E6=9C=BA=E5=8F=B7=E6=9C=80?= =?UTF-8?q?=E9=95=BF32=E4=BD=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/excel/data/IcNatCompareRecordExcelData.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatCompareRecordExcelData.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatCompareRecordExcelData.java index 0a1e02cbf7..3c0826f90c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatCompareRecordExcelData.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatCompareRecordExcelData.java @@ -3,6 +3,7 @@ package com.epmet.excel.data; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; @@ -22,6 +23,7 @@ public class IcNatCompareRecordExcelData { private String idCard; @NotBlank(message = "联系方式为必填项") + @Length(max = 32, message = "联系方式格式错误") @ExcelProperty("联系方式") private String mobile; From 304a7389ee81531e8a003e92513e6cd98a64f068 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 25 Nov 2022 10:12:28 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=94=99=E4=B9=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/IcTripReportRecordDTO.java | 2 +- .../com/epmet/excel/IcYtTripReportRecordExportExcel.java | 8 +++++--- .../src/main/resources/mapper/IcTripReportRecordDao.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 21c6642b16..0a236903bf 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -542,7 +542,7 @@ public class IcTripReportRecordDTO implements Serializable { */ @ExcelIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date leaveTheRiskAreaTime; + private String leaveTheRiskAreaTime; /** * 是否携带48小时核算证明 是/否【烟台】 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java index 9ed7ee958c..5cd24b489d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java @@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.write.style.HeadStyle; import com.alibaba.excel.enums.poi.FillPatternTypeEnum; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; @@ -54,19 +55,20 @@ public class IcYtTripReportRecordExportExcel implements Serializable { */ @ColumnWidth(30) @ExcelProperty(value = "来自地区") - private String comeAreaFull; + private String sourceAddress; /** * 来自地区详细地址 */ @ColumnWidth(30) @ExcelProperty(value = "来自地区详细地址") - private String sourceDetailAddress; + private String comeAreaFull; /** * 来到本地时间 */ @ColumnWidth(20) @ExcelProperty(value = "来到本地时间") @JsonFormat(pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") private String arriveTime; /** @@ -184,7 +186,7 @@ public class IcYtTripReportRecordExportExcel implements Serializable { @ColumnWidth(20) @ExcelProperty(value = "离开本地时间") @JsonFormat(pattern = "yyyy-MM-dd") - private String leaveDate; + private String leaveTheRiskAreaTime; /** * 备注 */ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index e4bf6c5465..f43978329f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -44,7 +44,7 @@ ELSE IFNULL(cs.REAL_NAME, '无') END ) AS createdByName, - CONCAT(r.via_province,r.via_city,r.via_city) via + CONCAT(r.via_province,r.via_city,r.via_county) via FROM ic_trip_report_record r LEFT JOIN ( select * from ic_epidemic_special_attention GROUP BY id_card ORDER BY created_time DESC From 43d3deea67edc8e765169f524e7bc93078fe611a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 25 Nov 2022 10:39:36 +0800 Subject: [PATCH 28/28] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcTripReportRecordDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml index 49e9ce76a7..8558874837 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml @@ -88,7 +88,7 @@ AND r.isolate_type = #{isolateType} ORDER BY - r.ARRIVE_DATE DESC, r.CREATED_TIME DESC + r.ARRIVE_DATE DESC, r.arrive_time DESC, r.CREATED_TIME DESC