Browse Source

Merge remote-tracking branch 'origin_elink/master'

dev
yinzuomei 3 years ago
parent
commit
0f6be99b6f
  1. 16
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ConvertUtils.java
  2. 234
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java
  3. 19
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/YTTripReportListDTO.java
  4. 339
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcYtTripReportFormDTO.java
  5. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java
  6. 93
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java
  7. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java
  8. 181
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java
  9. 196
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java
  10. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/data/IcNatCompareRecordExcelData.java
  11. 60
      epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java
  12. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcTripReportRecordService.java
  13. 156
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java
  14. 146
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  15. 63
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.92__alter_ic_trip_report.sql
  16. 231
      epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

16
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 <T> List<T> batchMapToEntity(List<Map<String, Object>> maps, Class<T> entity){
if (CollectionUtils.isEmpty(maps)){
return new ArrayList<>();
}
List targetList = new ArrayList<>(maps.size());
try {
for (Map<String, Object> map : maps) {
targetList.add(mapToEntity(map, entity));
}
}catch (Exception e){
logger.error("batchMapToEntity convert error ", e);
}
return targetList;
}
public static <T> T mapToEntity(Map<String, Object> map, Class<T> entity) {
if (null == map){
return null;

234
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java

@ -375,4 +375,238 @@ 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 viaCode;
/**
* 编码全路径烟台
*/
@ExcelIgnore
private String viaPathCode;
/**
* 途经地区全拼
*/
@ExcelIgnore
private String via;
/**
* 同行人员烟台
*/
@ExcelIgnore
private String travelPersonnel;
/**
* 户籍地烟台
*/
@ExcelIgnore
private String registeredResidenceCity;
/**
* 户籍地详细烟台
*/
@ExcelIgnore
private String registeredResidenceAddress;
/**
* 编码烟台
*/
private String registeredResidenceCode;
/**
* 编码全路径烟台
*/
private String registeredResidencePathCode;
/**
* 是否带车 / 烟台
*/
@ExcelIgnore
private String carryVehicle;
/**
* 带车车牌号烟台
*/
@ExcelIgnore
private String carryVehicleNumber;
/**
* 车牌颜色烟台
*/
@ExcelIgnore
private String carryVehicleNumberColor;
/**
* 目的地交通场站烟台
*/
@ExcelIgnore
private String destinationStation;
/**
* 入鲁时间烟台
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String arriveLuTime;
/**
* 行程码烟台
*/
@ExcelIgnore
private String travelCodeImg;
/**
* 无效时间烟台
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String invalidTime;
/**
* 证件类型烟台
*/
@ExcelIgnore
private String cardType;
/**
* 区域烟台
*/
@ExcelIgnore
private String area;
/**
* 年龄烟台
*/
@ExcelIgnore
private int age;
/**
* 性别烟台
*/
@ExcelIgnore
private String sex;
/**
* 是否有新冠肺炎病史 / 烟台
*/
@ExcelIgnore
private String covidFlag;
/**
* 来烟方式烟台
*/
@ExcelIgnore
private String comeMode;
/**
* 班次烟台
*/
@ExcelIgnore
private String shift;
/**
* 抵烟时间烟台
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String arriveTime;
/**
* 上报街道烟台
*/
@ExcelIgnore
private String reportStreet;
/**
* 来源地区全烟台
*/
@ExcelIgnore
private String comeAreaFull;
/**
* 离开风险区域的时间烟台
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
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
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String iTime;
/**
* 烟台
*/
@ExcelIgnore
private String iFlag;
/**
* 烟台数据主键烟台
*/
private String ytId;
}

19
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/YTTripReportListDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/11/11 15:05
*/
@Data
public class YTTripReportListDTO implements Serializable {
private static final long serialVersionUID = -5583350209850076659L;
private String cardno;
}

339
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:山东省青岛市黄岛区玫瑰山路社区
*/
@NotBlank(message = "现居地不能为空", groups = {YtAdd.class})
private String presentAddress;
/**
* 详细地址
*/
@NotBlank(message = "现居地详细地址不能为空", groups = {YtAdd.class})
private String detailAddress;
/**
* 来源地区编码
*/
private String sourceAddressCode;
/**
* 来源地编码路径 "sourceAddressPathCode": "37,3702,370203,370203026,370203026002"
*/
private String sourceAddressPathCode;
/**
* 来源地区地址
*/
@NotBlank(message = "来自地区不能为空", groups = {YtAdd.class})
private String sourceAddress;
/**
* 到达日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date arriveDate;
/**
* 备注信息
*/
@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<String> channel = new ArrayList<>();
/**
* pc录入时用
* 通知内容
*/
private String content = "";
/**
* 核酸检测报告异常 /烟台
*/
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 viaCode;
/**
* 编码全路径烟台
*/
private String viaPathCode;
/**
* 同行人员烟台
*/
private String travelPersonnel;
/**
* 户籍地烟台
*/
private String registeredResidenceCity;
/**
* 户籍地详细烟台
*/
private String registeredResidenceAddress;
/**
* 编码烟台
*/
private String registeredResidenceCode;
/**
* 编码全路径烟台
*/
private String registeredResidencePathCode;
/**
* 是否带车 / 烟台
*/
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;
/**
* 来烟方式烟台
*/
@NotBlank(message = "返回方式不能为空", groups = {YtAdd.class})
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;
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/EpidemicConstant.java

@ -18,9 +18,11 @@ public interface EpidemicConstant {
* ic_sync_job 任务类型
* 核酸检测
* 疫苗接种
* 行程上报
*/
String JOB_TYPE_NAT = "nat";
String JOB_TYPE_VACCINE = "vaccine";
String JOB_TYPE_TRIP_REPORT = "trip_report";
// 居民信息对比
String JOB_TYPE_COMPARISON_RESI = "comparison_resi";

93
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<List<EmphasisTripPieDetailResultDTO>>().ok(icTripReportRecordService.emphasisTripPieDetail(formDTO));
}
/**
* pc: 行程上报-列表--烟台
*/
@PostMapping("yt-page")
@MaskResponse(fieldNames = {"mobile", "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
public Result<PageData<IcTripReportRecordDTO>> ytPage(@LoginUser TokenDto tokenDto, @RequestBody PageTripReportFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(PageFormDTO.AddUserInternalGroup.class);
PageData<IcTripReportRecordDTO> page = icTripReportRecordService.ytPage(formDTO);
return new Result<PageData<IcTripReportRecordDTO>>().ok(page);
}
/**
* 查看详情--烟台
*/
@MaskResponse(fieldNames = {"showMobile", "showIdCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("yt-detail")
public Result<IcTripReportRecordDTO> 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<IcTripReportRecordDTO>().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<IcTripReportRecordDTO> data = null;
List<IcYtTripReportRecordExportExcel> 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();
}
}
}
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcTripReportRecordDao.java

@ -63,4 +63,20 @@ public interface IcTripReportRecordDao extends BaseDao<IcTripReportRecordEntity>
*/
List<EmphasisTripPieDetailResultDTO> emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO);
/**
* @Description 根据身份证查询存在的行程上报记录ID
* @param idCards
* @Author zxc
* @Date 2022/11/22 16:16
*/
List<String> getExistsTripReport(@Param("idCards")List<String> idCards);
/**
* @Description 批量更新行程上报
* @param list
* @Author zxc
* @Date 2022/11/22 16:54
*/
void updateTripReportList(@Param("list")List<IcTripReportRecordEntity> list);
}

181
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcTripReportRecordEntity.java

@ -180,4 +180,185 @@ 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 viaCode;
/**
* 编码全路径烟台
*/
private String viaPathCode;
/**
* 同行人员烟台
*/
private String travelPersonnel;
/**
* 户籍地烟台
*/
private String registeredResidenceCity;
/**
* 户籍地详细烟台
*/
private String registeredResidenceAddress;
/**
* 编码烟台
*/
private String registeredResidenceCode;
/**
* 编码全路径烟台
*/
private String registeredResidencePathCode;
/**
* 是否带车 / 烟台
*/
private String carryVehicle;
/**
* 带车车牌号烟台
*/
private String carryVehicleNumber;
/**
* 车牌颜色烟台
*/
private String carryVehicleNumberColor;
/**
* 目的地交通场站烟台
*/
private String destinationStation;
/**
* 入鲁时间烟台
*/
private Date arriveLuTime;
/**
* 行程码烟台
*/
private String travelCodeImg;
/**
* 无效时间烟台
*/
private Date invalidTime;
/**
* 证件类型烟台
*/
private String cardType;
/**
* 区域烟台
*/
private String area;
/**
* 年龄烟台
*/
private int age;
/**
* 性别烟台
*/
private String sex;
/**
* 是否有新冠肺炎病史 / 烟台
*/
private String covidFlag;
/**
* 来烟方式烟台
*/
private String comeMode;
/**
* 班次烟台
*/
private String shift;
/**
* 抵烟时间烟台
*/
private Date arriveTime;
/**
* 上报街道烟台
*/
private String reportStreet;
/**
* 来源地区 烟台
*/
private String comeAreaFull;
/**
* 离开风险区域的时间烟台
*/
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;
/**
* 烟台
*/
private Date iTime;
/**
* 烟台
*/
private String iFlag;
/**
* 烟台数据主键烟台
*/
private String ytId;
}

196
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcYtTripReportRecordExportExcel.java

@ -0,0 +1,196 @@
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 org.springframework.format.annotation.DateTimeFormat;
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 sourceAddress;
/**
* 来自地区详细地址
*/
@ColumnWidth(30)
@ExcelProperty(value = "来自地区详细地址")
private String comeAreaFull;
/**
* 来到本地时间
*/
@ColumnWidth(20)
@ExcelProperty(value = "来到本地时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(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 leaveTheRiskAreaTime;
/**
* 备注
*/
@ColumnWidth(30)
@ExcelProperty(value = "备注")
private String remark;
}

2
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;

60
epmet-user/epmet-user-server/src/main/java/com/epmet/processor/YanTaiTripReportSyncProcessor.java

@ -0,0 +1,60 @@
package com.epmet.processor;
import com.epmet.constant.EpidemicConstant;
import com.epmet.entity.IcSyncJobEntity;
import com.epmet.service.DataSyncConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import static com.epmet.constant.EpidemicConstant.JOB_TYPE_TRIP_REPORT;
import static com.epmet.constant.EpidemicConstant.JOB_TYPE_VACCINE;
/**
* @Description 烟台行程上报数据同步处理器
* @Author zxc
* @Date 2022/11/22 14:08
*/
@Component
@Slf4j
public class YanTaiTripReportSyncProcessor extends AbstractDataSyncJobProcessor {
@Autowired
private DataSyncConfigService dataSyncConfigService;
/**
* @Description 定时扫描和执行同步任务行程上报
* @Author zxc
* @Date 2022/11/11 10:32
*/
@Scheduled(cron = "0/10 * * * * ? ")
public void scanJobs() {
scanAndExecWaitingJobs();
}
@Override
protected void execJobTask(IcSyncJobEntity jobEntity) {
dataSyncConfigService.execSyncByJobProcessor(jobEntity);
}
@Override
protected String getDistributeLockKey() {
return "data:sync:" + JOB_TYPE_TRIP_REPORT;
}
@Override
protected String getJobType() {
return EpidemicConstant.JOB_TYPE_TRIP_REPORT;
}
@Override
protected long getDistributeLockLeaseTime() {
return 60;
}
@Override
protected long getDistributeLockWaitTime() {
return 60;
}
}

10
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<IcTripReportRecor
* @Date 2022/11/1 16:09
*/
List<EmphasisTripPieDetailResultDTO> emphasisTripPieDetail(EmphasisTripPieDetailFormDTO formDTO);
PageData<IcTripReportRecordDTO> ytPage(PageTripReportFormDTO formDTO);
IcTripReportRecordDTO ytDetail(PageTripReportFormDTO pageTripReportFormDTO);
String ytSave(IcYtTripReportFormDTO formDTO);
String ytUpdate(IcYtTripReportFormDTO formDTO);
}

156
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncConfigServiceImpl.java

@ -28,10 +28,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.YtHsResUtils;
import com.epmet.constant.EpidemicConstant;
import com.epmet.dao.DataSyncConfigDao;
import com.epmet.dao.IcNatDao;
import com.epmet.dao.IcSyncJobDao;
import com.epmet.dao.IcVaccineDao;
import com.epmet.dao.*;
import com.epmet.dto.DataSyncConfigDTO;
import com.epmet.dto.DataSyncRecordDeathDTO;
import com.epmet.dto.DataSyncRecordDisabilityDTO;
@ -105,6 +102,10 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
private IcVaccineRelationService icVaccineRelationService;
@Autowired
private IcVaccineDao icVaccineDao;
@Autowired
private IcTripReportRecordService icTripReportRecordService;
@Autowired
private IcTripReportRecordDao icTripReportRecordDao;
@Resource(name = "yantaiNamedParamLantuJdbcTemplate")
private NamedParameterJdbcTemplate yantaiNamedParamLantuJdbcTemplate;
@ -1050,6 +1051,10 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
case JOB_TYPE_VACCINE:
yanTaiVaccineByDbViewPartition(resiBatch, customerId, isSync);
break;
// 行程上报
case JOB_TYPE_TRIP_REPORT:
yanTaiTripReportByDbViewPartition(resiBatch, customerId, isSync);
break;
default:
break;
}
@ -1060,6 +1065,98 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
}
}
/**
* @Description 行程上报信息拉取处理
* @param resiInfos
* @param customerId
* @param isSync
* @Author zxc
* @Date 2022/11/22 14:27
*/
public void yanTaiTripReportByDbViewPartition(List<NatUserInfoResultDTO> resiInfos, String customerId, String isSync){
// 将居民信息转化为<idCard,resiInfo>的map
Map<String, NatUserInfoResultDTO> idCardAndResiInfoMap = resiInfos.stream().collect(Collectors.toMap(resi -> resi.getIdCard(), Function.identity()));
List<String> idCards = new ArrayList<>(idCardAndResiInfoMap.keySet());
Map<String, Object> 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<Map<String,Object>> tripReportList = new ArrayList<>();
List<Map<String,Object>> tripReportList = yantaiNamedParamLantuJdbcTemplate.queryForList(
"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<String, Object> objectObjectHashMap = new HashMap<>();
tripReportList.add(objectObjectHashMap);*/
if (CollectionUtils.isNotEmpty(tripReportList)){
List<List<Map<String, Object>>> partition = ListUtils.partition(tripReportList, NumConstant.ONE_HUNDRED);
partition.forEach(p -> {
// 要更新的
List<IcTripReportRecordEntity> needUpdate = new ArrayList<>();
// 要新增的
List<IcTripReportRecordEntity> 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<IcTripReportRecordEntity> entities = JSON.parseArray(json,IcTripReportRecordEntity.class);
// 数据库存在的
List<String> existsTripReport = icTripReportRecordDao.getExistsTripReport(idCards);
if (CollectionUtils.isNotEmpty(existsTripReport)){
// 要更新的
existsTripReport.forEach(etr -> entities.stream().filter(e -> e.getYtId().equals(etr)).forEach(e -> {
needUpdate.add(e);
}));
// 要新增的
existsTripReport.forEach(etr -> {
Iterator<IcTripReportRecordEntity> iterator = entities.iterator();
while (iterator.hasNext()){
IcTripReportRecordEntity next = iterator.next();
if (next.getYtId().equals(etr)){
iterator.remove();
}
}
});
if (CollectionUtils.isNotEmpty(entities)){
entities.forEach(e -> resiInfos.stream().filter(r ->r.getIdCard().equals(e.getIdCard())).forEach(r -> {
e.setGridId(r.getGridId());
e.setCustomerId(r.getCustomerId());
e.setAgencyId(r.getAgencyId());
e.setPids(r.getPids());
e.setName(r.getName());
e.setMobile(r.getMobile());
e.setUserId(r.getUserId());
e.setUserType("ytPull");
}));
icTripReportRecordService.insertBatch(entities);
}
if (CollectionUtils.isNotEmpty(needUpdate)){
// 因为更新字段较多,所以分批操作
List<List<IcTripReportRecordEntity>> needs = ListUtils.partition(needUpdate, NumConstant.TWENTY);
needs.forEach(n -> {
updateTripReportList(n);
});
}
}
});
}else {
log.warn("未拉取到行程上报信息!");
}
}
@Transactional(rollbackFor = Exception.class)
public void updateTripReportList(List<IcTripReportRecordEntity> need){
icTripReportRecordDao.updateTripReportList(need);
}
/**
* @Description 疫苗接种信息处理
* @param resiInfos
@ -1075,38 +1172,6 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
// 1.获取核酸采样信息
Map<String, Object> args = new HashMap<>();
args.put("idcards", idCards);
// todo 疫苗接种视图
String json = "[\n" +
" {\n" +
" \"id\": \"751956862490071040\",\n" +
" \"cardno\": \"370785195001012558\",\n" +
" \"name\": \"李国玺\",\n" +
" \"data\":\n" +
" {\n" +
" \"vaccineList\":\n" +
" [\n" +
" {\n" +
" \"vaccineCount\": \"1\",\n" +
" \"inoculateDate\": \"2021-04-24 16:02:46\",\n" +
" \"lastStationName\": \"烟台市只楚医院临时接种点\"\n" +
" },\n" +
" {\n" +
" \"vaccineCount\": \"2\",\n" +
" \"inoculateDate\": \"2021-06-10 16:20:30\",\n" +
" \"lastStationName\": \"烟台市芝罘岛医院临时接种点\"\n" +
" },\n" +
" {\n" +
" \"vaccineCount\": \"3\",\n" +
" \"inoculateDate\": \"2021-12-10 15:12:24\",\n" +
" \"lastStationName\": \"烟台市芝罘岛医院临时接种点\"\n" +
" }\n" +
" ],\n" +
" \"flag\": 1\n" +
" },\n" +
" \"vaccineCount\": 3\n" +
" }\n" +
"]";
// List<Map> vaccineList = JSON.parseArray(json,Map.class);
List<Map<String,Object>> vaccineList = yantaiNamedParamLantuJdbcTemplate.queryForList(
"select data, name, cardno, vaccineCount from t_ymjz_info where cardno in (:idcards)", args);
List<YTVaccineListDTO> ytVaccineListFromApi = new ArrayList<>();
@ -1128,15 +1193,6 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
});
ytVaccineListFromApi.addAll(vaccineList1);
}
//Map<String, Object> data = (Map<String, Object>) v.get("data");
//if (data.containsKey("vaccineList")){
// List<YTVaccineListDTO> vaccineList1 = JSON.parseArray(data.get("vaccineList").toString(), YTVaccineListDTO.class);
// vaccineList1.forEach(v1 -> {
// v1.setCardno(v.get("cardno").toString());
// });
// ytVaccineListDTOS.addAll(vaccineList1);
//}
}
});
List<IcVaccineEntity> entities = new ArrayList<>();
@ -1156,16 +1212,6 @@ public class DataSyncConfigServiceImpl extends BaseServiceImpl<DataSyncConfigDao
iterator.remove();
}
}
//for (int i = 0; i < ytVaccineListFromApi.size(); i++) {
// String inoculateDateFromApi = ytVaccineListFromApi.get(i).getInoculateDate();
// Matcher matcher = VACCINE_DATE_OF_API_PATTERN.matcher(inoculateDateFromApi);
// if (ytVaccineListFromApi.get(i).getCardno().equals(e.getCardno())
// && matcher.matches()
// && matcher.group(1).equals(e.getInoculateDate())){
// ytVaccineListFromApi.remove(i);
// }
//}
}
}
if (CollectionUtils.isNotEmpty(ytVaccineListFromApi)){

146
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java

@ -835,5 +835,151 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
return result;
}
@Override
public PageData<IcTripReportRecordDTO> ytPage(PageTripReportFormDTO formDTO) {
//1.获取工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getUserId());
formDTO.setAgencyId(staffInfo.getAgencyId());
//2.按条件查询业务数据
PageInfo<IcTripReportRecordDTO> data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage())
.doSelectPageInfo(() -> baseDao.pageList(formDTO));
List<IcTripReportRecordDTO> list = data.getList();
if (CollectionUtils.isEmpty(list)) {
return new PageData(list, data.getTotal());
}
//3.查询最近一次通知时间、核算检测关注名单
if (CollectionUtils.isNotEmpty(list)) {
Map<String, Date> latestNotice = new HashMap<>();
List<String> gzIdCardList = new ArrayList<>();
List<String> idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList());
//如果不分页可能会有很多个身份证号
List<List<String>> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED);
partionList.forEach(l -> {
Map<String, Date> map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l);
List<String> 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<IcTripReportRecordDTO> list = baseDao.pageList(formDTO);
if (CollectionUtils.isEmpty(list)) {
return null;
}
//3.查询最近一次通知时间、核算检测关注名单
Map<String, Date> latestNotice = new HashMap<>();
List<String> gzIdCardList = new ArrayList<>();
List<String> idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList());
//如果不分页可能会有很多个身份证号
List<List<String>> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED);
partionList.forEach(l -> {
Map<String, Date> map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l);
List<String> 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();
}
}

63
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.92__alter_ic_trip_report.sql

@ -0,0 +1,63 @@
-- 去掉必填项
ALTER TABLE `ic_trip_report_record`
MODIFY COLUMN `PRESENT_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '现居地名称eg:山东省-青岛市-黄岛区-玫瑰山路社区' AFTER `PRESENT_ADDRESS_PATH_CODE`,
MODIFY COLUMN `DETAIL_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详细地址(烟台的对应address字段)' AFTER `PRESENT_ADDRESS`,
MODIFY COLUMN `SOURCE_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源地区地址' AFTER `SOURCE_ADDRESS_PATH_CODE`,
MODIFY COLUMN `ARRIVE_DATE` date NULL COMMENT '到达日期' AFTER `SOURCE_ADDRESS`;
ALTER TABLE `ic_trip_report_record`
MODIFY COLUMN `DETAIL_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '详细地址(烟台的对应address字段)' AFTER `PRESENT_ADDRESS`;
-- 新增字段、索引
ALTER TABLE `ic_trip_report_record`
ADD COLUMN `detection_abnormal` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核酸检测报告异常 是/否【烟台】' AFTER `trip_data_type`,
ADD COLUMN `two_code_one_report_status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '两码一报告状态 (正常 异常)【烟台】' AFTER `detection_abnormal`,
ADD COLUMN `declaration_status` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '申报状态( 0未审核 1审核通过 2无效数据)【烟台】' AFTER `two_code_one_report_status`,
ADD COLUMN `nonlocal_residence_history` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否有外地旅居史 是/否【烟台】' AFTER `declaration_status`,
ADD COLUMN `via_province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '途经省【烟台】' AFTER `nonlocal_residence_history`,
ADD COLUMN `via_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '途经市【烟台】' AFTER `via_province`,
ADD COLUMN `via_county` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '途经县区【烟台】' AFTER `via_city`,
ADD COLUMN `via_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码' AFTER `via_county`,
ADD COLUMN `via_path_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码全路径' AFTER `via_code`,
ADD COLUMN `travel_personnel` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '同行人员【烟台】' AFTER `via_path_code`,
ADD COLUMN `registered_residence_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '户籍地【烟台】' AFTER `travel_personnel`,
ADD COLUMN `registered_residence_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '户籍地详细【烟台】' AFTER `registered_residence_city`,
ADD COLUMN `registered_residence_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码' AFTER `registered_residence_address`,
ADD COLUMN `registered_residence_path_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编码全路径' AFTER `registered_residence_code`,
ADD COLUMN `carry_vehicle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否带车 是/否 【烟台】' AFTER `registered_residence_path_code`,
ADD COLUMN `carry_vehicle_number` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '带车车牌号【烟台】' AFTER `carry_vehicle`,
ADD COLUMN `carry_vehicle_number_color` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '车牌颜色【烟台】' AFTER `carry_vehicle_number`,
ADD COLUMN `destination_station` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目的地交通场站【烟台】' AFTER `carry_vehicle_number_color`,
ADD COLUMN `arrive_lu_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '入鲁时间【烟台】' AFTER `destination_station`,
ADD COLUMN `travel_code_img` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行程码【烟台】' AFTER `arrive_lu_time`,
ADD COLUMN `invalid_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '无效时间【烟台】' AFTER `travel_code_img`,
ADD COLUMN `card_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '证件类型【烟台】' AFTER `invalid_time`,
ADD COLUMN `area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域【烟台】' AFTER `card_type`,
ADD COLUMN `age` int(22) NULL DEFAULT NULL COMMENT '年龄【烟台】' AFTER `area`,
ADD COLUMN `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别【烟台】' AFTER `age`,
ADD COLUMN `covid_flag` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否有新冠肺炎病史 是/否 【烟台】' AFTER `sex`,
ADD COLUMN `come_mode` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来烟方式【烟台】' AFTER `covid_flag`,
ADD COLUMN `shift` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '班次【烟台】' AFTER `come_mode`,
ADD COLUMN `arrive_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '抵烟时间【烟台】' AFTER `shift`,
ADD COLUMN `report_street` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上报街道【烟台】' AFTER `arrive_time`,
ADD COLUMN `come_area_full` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源地区全【烟台】' AFTER `report_street`,
ADD COLUMN `leave_the_risk_area_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '离开风险区域的时间【烟台】' AFTER `come_area_full`,
ADD COLUMN `carry_hesuan_proof` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否携带48小时核算证明 是/否【烟台】' AFTER `leave_the_risk_area_time`,
ADD COLUMN `province_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省【烟台】' AFTER `carry_hesuan_proof`,
ADD COLUMN `city_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市【烟台】' AFTER `province_name`,
ADD COLUMN `county_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '县【烟台】' AFTER `city_name`,
ADD COLUMN `twon_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址【烟台】' AFTER `county_name`,
ADD COLUMN `health_code_abnormal` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '健康码异常 是/否【烟台】' AFTER `twon_name`,
ADD COLUMN `travel_code_abnormal` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行程码异常 是/否【烟台】' AFTER `health_code_abnormal`,
ADD COLUMN `i_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '【烟台】' AFTER `travel_code_abnormal`,
ADD COLUMN `i_date` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '【烟台】' AFTER `i_id`,
ADD COLUMN `i_type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '【烟台】' AFTER `i_date`,
ADD COLUMN `i_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '【烟台】' AFTER `i_type`,
ADD COLUMN `i_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '【烟台】' AFTER `i_time`,
ADD COLUMN `yt_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '烟台数据主键【烟台】对应烟台的id' AFTER `i_flag`,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`ID`, `yt_id`),
ADD INDEX `yt_id` (`yt_id`) USING BTREE COMMENT '烟台数据Id普通索引';

231
epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

@ -33,17 +33,18 @@
<!-- pc: 行程上报-列表 -->
<select id="pageList" parameterType="com.epmet.dto.form.PageTripReportFormDTO" resultType="com.epmet.dto.IcTripReportRecordDTO">
SELECT
r.*,
a.ID AS epidemicId,
r.CREATED_TIME AS reportTime,
r.ID_CARD as realIdCard,
r.MOBILE as realMobile,
(
CASE
WHEN r.USER_TYPE = 'resi' THEN IFNULL(ubi.REAL_NAME, '无')
ELSE IFNULL(cs.REAL_NAME, '无')
END
) AS createdByName
r.*,
a.ID AS epidemicId,
r.CREATED_TIME AS reportTime,
r.ID_CARD as realIdCard,
r.MOBILE as realMobile,
(
CASE
WHEN r.USER_TYPE = 'resi' THEN IFNULL(ubi.REAL_NAME, '无')
ELSE IFNULL(cs.REAL_NAME, '无')
END
) AS createdByName,
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
@ -87,7 +88,7 @@
AND r.isolate_type = #{isolateType}
</if>
ORDER BY
r.ARRIVE_DATE DESC, r.CREATED_TIME DESC
r.ARRIVE_DATE DESC, r.arrive_time DESC, r.CREATED_TIME DESC
</select>
<!-- 【重点行程名单】列表 -->
@ -151,6 +152,18 @@
order by total desc
</select>
<!-- 根据身份证查询存在的行程上报记录ID -->
<select id="getExistsTripReport" resultType="java.lang.String">
SELECT
yt_id
FROM ic_trip_report_record
WHERE DEL_FLAG = '0'
AND yt_id is not null and yt_id != ''
AND ID_CARD IN (
<foreach collection="idCards" item="idCard" separator=",">#{idCard}</foreach>
)
</select>
<update id="batchDel" parameterType="map">
update ic_trip_report_record set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=NOW()
WHERE AGENCY_ID=#{agencyId}
@ -160,4 +173,198 @@
</foreach>
)
</update>
<!-- 批量更新行程上报 -->
<update id="updateTripReportList">
UPDATE ic_trip_report_record
<trim prefix="set" suffixOverrides=",">
<trim prefix="detail_address = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.detailAddress}
</foreach>
</trim>
<trim prefix="travel_code_abnormal = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.travelCodeAbnormal}
</foreach>
</trim>
<trim prefix="health_code_abnormal = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.healthCodeAbnormal}
</foreach>
</trim>
<trim prefix="twon_name = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.twonName}
</foreach>
</trim>
<trim prefix="county_name = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.countyName}
</foreach>
</trim>
<trim prefix="city_name = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.cityName}
</foreach>
</trim>
<trim prefix="province_name = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.provinceName}
</foreach>
</trim>
<trim prefix="carry_hesuan_proof = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.carryHesuanProof}
</foreach>
</trim>
<trim prefix="leave_the_risk_area_time = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.leaveTheRiskAreaTime}
</foreach>
</trim>
<trim prefix="come_area_full = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.comeAreaFull}
</foreach>
</trim>
<trim prefix="report_street = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.reportStreet}
</foreach>
</trim>
<trim prefix="arrive_time = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.arriveTime}
</foreach>
</trim>
<trim prefix="shift = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.shift}
</foreach>
</trim>
<trim prefix="come_mode = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.comeMode}
</foreach>
</trim>
<trim prefix="covid_flag = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.covidFlag}
</foreach>
</trim>
<trim prefix="sex = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.sex}
</foreach>
</trim>
<trim prefix="age = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.age}
</foreach>
</trim>
<trim prefix="area = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.area}
</foreach>
</trim>
<trim prefix="card_type = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.cardType}
</foreach>
</trim>
<trim prefix="invalid_time = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.invalidTime}
</foreach>
</trim>
<trim prefix="travel_code_img = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.travelCodeImg}
</foreach>
</trim>
<trim prefix="arrive_lu_time = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.arriveLuTime}
</foreach>
</trim>
<trim prefix="destination_station = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.destinationStation}
</foreach>
</trim>
<trim prefix="carry_vehicle_number_color = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.carryVehicleNumberColor}
</foreach>
</trim>
<trim prefix="carry_vehicle_number = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.carryVehicleNumber}
</foreach>
</trim>
<trim prefix="carry_vehicle = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.carryVehicle}
</foreach>
</trim>
<trim prefix="registered_residence_address = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.registeredResidenceAddress}
</foreach>
</trim>
<trim prefix="registered_residence_city = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.registeredResidenceCity}
</foreach>
</trim>
<trim prefix="travel_personnel = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.travelPersonnel}
</foreach>
</trim>
<trim prefix="via_county = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.viaCounty}
</foreach>
</trim>
<trim prefix="via_city = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.viaCity}
</foreach>
</trim>
<trim prefix="via_province = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.viaProvince}
</foreach>
</trim>
<trim prefix="nonlocal_residence_history = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.nonlocalResidenceHistory}
</foreach>
</trim>
<trim prefix="declaration_status = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.declarationStatus}
</foreach>
</trim>
<trim prefix="two_code_one_report_status = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.twoCodeOneReportStatus}
</foreach>
</trim>
<trim prefix="detection_abnormal = (case" suffix="end),">
<foreach collection="list" item="l">
when yt_id = #{l.ytId} then #{l.detectionAbnormal}
</foreach>
</trim>
UPDATED_TIME = NOW()
</trim>
WHERE DEL_FLAG = '0'
AND yt_id IN (
<foreach collection="list" item="l" separator=",">
#{l.ytId}
</foreach>
)
</update>
</mapper>
Loading…
Cancel
Save