Browse Source

Merge branch 'develop' of http://git.elinkit.com.cn:7070/r/epmet-cloud into 主线测试

dev
jianjun 4 years ago
parent
commit
14c415ce50
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 1
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeDictFormDTO.java
  3. 2
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java
  4. 22
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java
  5. 43
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ShowApiServiceImpl.java
  6. 8
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java
  7. 4
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml
  8. 4
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/WorkDayInitTask.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java
  10. 7
      epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml
  11. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java
  12. 11
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java
  13. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java
  14. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java
  15. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java
  16. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java
  17. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java
  18. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java
  19. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java
  20. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java
  21. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java
  22. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  23. 47
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  24. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java
  25. 2
      epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.39__edit_special_attention_length.sql
  26. 1
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml
  27. 2
      epmet-user/epmet-user-server/src/main/resources/mapper/IcTripReportRecordDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -253,6 +253,7 @@ public enum EpmetErrorCode {
NEIGHBORHOOD_DEL_FAILED(8922,""),
IC_NAT_IDCARD_NATTIME(8923,"已存在相同记录"),
IC_NAT(8924,"平台已存在记录,请去修改原有记录"),
RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"),
//通用错误码 start

1
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/AreaCodeDictFormDTO.java

@ -13,6 +13,7 @@ public class AreaCodeDictFormDTO implements Serializable {
private static final long serialVersionUID = 5780301376757138238L;
//平阴传参:rootAreaCode=370124, rootAreaLevel=district
/**
* 根结点code 不传则返回全部
*/

2
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/AreaCodeChildDao.java

@ -34,7 +34,7 @@ import java.util.List;
@Mapper
public interface AreaCodeChildDao extends BaseDao<AreaCodeChildEntity> {
List<AreaCodeChildDTO> selectAllChild();
List<AreaCodeChildDTO> selectAllChild(String areaCode);
AreaCodeChildDTO selectByCode(@Param("code") String code);

22
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/AreaCodeServiceImpl.java

@ -137,7 +137,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
if (StringUtils.isNotBlank(s)){
tree = JSON.parseArray(s,AreaCodeDictResultDTO.class);
}else {
List<AreaCodeDictResultDTO> areaCodeDictResultDTOS = disposeTree();
List<AreaCodeDictResultDTO> areaCodeDictResultDTOS = disposeTree(formDTO);
areaCodeRedis.set(AreaCodeConstant.SCREEN_TREE,areaCodeDictResultDTOS);
tree = areaCodeDictResultDTOS;
}
@ -154,11 +154,11 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
* @author zxc
* @date 2021/1/8 上午8:57
*/
public List<AreaCodeDictResultDTO> disposeTree(){
public List<AreaCodeDictResultDTO> disposeTree(AreaCodeDictFormDTO formDTO){
// 查询所有省市区
List<AreaCodeDTO> areaCodeDTOS = baseDao.selectAllArea();
// 查询所有街道、社区
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild();
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild(formDTO.getRootAreaCode());
List<AreaCodeDictResultDTO> result = new ArrayList<>();
List<AreaCodeDictResultDTO> fourResult = new ArrayList<>();
List<AreaCodeDictResultDTO> cityResult = new ArrayList<>();
@ -388,21 +388,21 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
* @author zxc
* @date 2021/1/11 上午9:48
*/
public List<AreaCodeDictResultDTO> afterTwoTree(){
public List<AreaCodeDictResultDTO> afterTwoTree(AreaCodeDictFormDTO form){
// 查询所有街道、社区
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild();
List<AreaCodeChildDTO> areaCodeChildDTOS = childDao.selectAllChild(form.getRootAreaCode());
List<AreaCodeDictResultDTO> fourResult = new ArrayList<>();
List<AreaCodeDictResultDTO> fiveResult = new ArrayList<>();
// 街道-社区
Map<Integer, List<AreaCodeChildDTO>> groupByLevel = areaCodeChildDTOS.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getLevel));
//社区
List<AreaCodeChildDTO> levelFive = groupByLevel.get(NumConstant.FIVE);
Map<String, List<AreaCodeChildDTO>> groupByPCode = levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
List<AreaCodeChildDTO> levelFive = org.apache.commons.collections4.CollectionUtils.isNotEmpty(groupByLevel.get(NumConstant.FIVE)) ? groupByLevel.get(NumConstant.FIVE) : new ArrayList<>();
Map<String, List<AreaCodeChildDTO>> groupByPCode = CollectionUtils.isEmpty(levelFive) ? new HashMap<>() : levelFive.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
//街道
List<AreaCodeChildDTO> levelFour = groupByLevel.get(NumConstant.FOUR);
List<AreaCodeChildDTO> levelFour = org.apache.commons.collections4.CollectionUtils.isNotEmpty(groupByLevel.get(NumConstant.FOUR)) ?groupByLevel.get(NumConstant.FOUR):new ArrayList<>();
// 6级
List<AreaCodeChildDTO> levelSix = groupByLevel.get(NumConstant.SIX);
Map<String, List<AreaCodeChildDTO>> groupBySixPCode = levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
Map<String, List<AreaCodeChildDTO>> groupBySixPCode = CollectionUtils.isEmpty(levelSix) ? new HashMap<>() : levelSix.stream().collect(Collectors.groupingBy(AreaCodeChildDTO::getPCode));
levelFive.forEach(f -> {
AreaCodeDictResultDTO dto = new AreaCodeDictResultDTO();
@ -450,7 +450,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
*/
public List<AreaCodeDictResultDTO> disposeAfterTwoLevel(AreaCodeDictFormDTO form){
List<AreaCodeDictResultDTO> result = new ArrayList<>();
List<AreaCodeDictResultDTO> areaCodeDictResultDTOS = afterTwoTree();
List<AreaCodeDictResultDTO> areaCodeDictResultDTOS = afterTwoTree(form);
if (CollectionUtils.isEmpty(areaCodeDictResultDTOS)){
return new ArrayList<>();
}
@ -532,7 +532,7 @@ public class AreaCodeServiceImpl extends BaseServiceImpl<AreaCodeDao, AreaCodeEn
*/
public List<AreaCodeDictResultDTO> disposeBeforeThreeLevelFinal(AreaCodeDictFormDTO form,List<AreaCodeDictResultDTO> tree){
List<AreaCodeDictResultDTO> threeDto = disposeBeforeThreeLevel(form, tree);
List<AreaCodeDictResultDTO> twoDto = afterTwoTree();
List<AreaCodeDictResultDTO> twoDto = afterTwoTree(form);
if (CollectionUtils.isEmpty(threeDto)){
return new ArrayList<>();
}

43
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ShowApiServiceImpl.java

@ -128,34 +128,37 @@ public class ShowApiServiceImpl implements ShowApiService {
DayDetailResultDTO dayDetailResultDTO = null;
try {
dayDetailResultDTO = ShowApiUtil.queryHolidayV2020(currentDate);
if (dayDetailResultDTO == null){
logger.warn("initWorkDay howApiUtil.queryHolidayV2020 return null");
return;
}
} catch (Exception e) {
logger.error("queryHolidayV2020 exception", e);
return;
}
List<CalenderEntity> list = calenderDao.selectByDay(currentDate);
if(null!=list&&list.size()>0){
if (0 == dayDetailResultDTO.getRet_code()) {
for (CalenderEntity calenderEntity : list) {
calenderEntity.setRetCode(dayDetailResultDTO.getRet_code());
calenderEntity.setWeekday(dayDetailResultDTO.getWeekDay());
calenderEntity.setBegin(dayDetailResultDTO.getBegin());
calenderEntity.setEnd(dayDetailResultDTO.getEnd());
calenderEntity.setHoliday(dayDetailResultDTO.getHoliday());
calenderEntity.setHolidayRemark(dayDetailResultDTO.getHoliday_remark());
calenderEntity.setEn(dayDetailResultDTO.getEn());
calenderEntity.setCn(dayDetailResultDTO.getCn());
calenderEntity.setType(dayDetailResultDTO.getType());
//1为工作日,2为周末,3为节假日
if ("1".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("工作日");
} else if ("2".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("周末");
} else if ("3".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("节假日");
}
calenderDao.updateById(calenderEntity);
for (CalenderEntity calenderEntity : list) {
calenderEntity.setRetCode(dayDetailResultDTO.getRet_code());
calenderEntity.setWeekday(dayDetailResultDTO.getWeekDay());
calenderEntity.setBegin(dayDetailResultDTO.getBegin());
calenderEntity.setEnd(dayDetailResultDTO.getEnd());
calenderEntity.setHoliday(dayDetailResultDTO.getHoliday());
calenderEntity.setHolidayRemark(dayDetailResultDTO.getHoliday_remark());
calenderEntity.setEn(dayDetailResultDTO.getEn());
calenderEntity.setCn(dayDetailResultDTO.getCn());
calenderEntity.setType(dayDetailResultDTO.getType());
//1为工作日,2为周末,3为节假日
if ("1".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("工作日");
} else if ("2".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("周末");
} else if ("3".equals(dayDetailResultDTO.getType())) {
calenderEntity.setTypeName("节假日");
}
calenderDao.updateById(calenderEntity);
}
}else {
calenderDao.insert(getCalenderEntity(dayDetailResultDTO));
}

8
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/ShowApiUtil.java

@ -1,10 +1,13 @@
package com.epmet.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.ShowApiConstant;
import com.epmet.result.DayDetailResultDTO;
import com.epmet.result.HolidayResultDTO;
import com.epmet.result.ShowApiResult;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -51,7 +54,10 @@ public class ShowApiUtil {
JSONObject jsonobject = JSONObject.parseObject(resultStr);
ShowApiResult showApiResult= JSONObject.toJavaObject(jsonobject, ShowApiResult.class);
logger.info(showApiResult.toString());
if (showApiResult.getShowapi_res_code() != NumConstant.ZERO || StringUtils.isBlank(showApiResult.getShowapi_res_body())) {
logger.error("获取工作日失败,result:{}", JSON.toJSONString(showApiResult));
return null;
}
JSONObject holidayJsonObject = JSONObject.parseObject(showApiResult.getShowapi_res_body());
DayDetailResultDTO dayDetailResultDTO= JSONObject.toJavaObject(holidayJsonObject, DayDetailResultDTO.class);
logger.info(String.format("(3)QUERY_HOLIDAY_V2020返参:%s",dayDetailResultDTO.toString()));

4
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/AreaCodeChildDao.xml

@ -5,7 +5,9 @@
<select id="selectAllChild" resultType="com.epmet.dto.AreaCodeChildDTO">
select * from area_code_child m where m.DEL_FLAG = '0'
select * from area_code_child m
where m.DEL_FLAG = '0'
and m.code like concat(#{areaCode},'%')
</select>
<select id="selectByCode" resultType="com.epmet.dto.AreaCodeChildDTO">

4
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/WorkDayInitTask.java

@ -1,5 +1,6 @@
package com.epmet.task;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.WorkDayInitService;
@ -27,7 +28,8 @@ public class WorkDayInitTask implements ITask {
public void run(String params) {
log.info("WorkDayInitTask定时任务正在执行,参数为:{}", params);
if (StringUtils.isBlank(params)){
params = DateUtils.format(new Date(),DateUtils.DATE_PATTERN_YYYYMMDD);
//没有参数默认 初始化明天的
params = DateUtils.format(DateUtils.addDateDays(new Date(), NumConstant.ONE),DateUtils.DATE_PATTERN_YYYYMMDD);
}
Result result = workDayInitService.workDayInit(params);
if (result.success()) {

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/HouseErrorInfoModel.java

@ -23,7 +23,7 @@ public class HouseErrorInfoModel {
private String buildingName;
@Excel(name = "单元号", width = 20)
private Integer buildingUnit;
private String buildingUnit;
@Excel(name = "门牌号", width = 20)
private String doorName;

7
epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml

@ -79,6 +79,13 @@ spring:
namespace: @nacos.config.namespace@
group: @nacos.config.group@
file-extension: yaml
servlet:
# 上传文件限制
multipart:
max-file-size: 100MB
max-request-size: 100MB
management:
endpoints:
web:

8
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java

@ -16,7 +16,6 @@ import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.opendata.dto.form.UpsertPatrolRecordForm;
import com.epmet.opendata.service.BaseGridDailyworkService;
import com.epmet.opendata.service.UserPatrolRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
@ -90,10 +89,13 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr
Boolean aBoolean = false;
switch (tags) {
case SystemMessageType.USER_PATROL_START:
aBoolean = SpringContextUtils.getBean(UserPatrolRecordService.class).insertPatrolRecord(patrolRecordForm);
//巡查的未对接暂时不用同步了
//aBoolean = SpringContextUtils.getBean(UserPatrolRecordService.class).insertPatrolRecord(patrolRecordForm);
aBoolean = true;
break;
case SystemMessageType.USER_PATROL_STOP:
aBoolean = SpringContextUtils.getBean(UserPatrolRecordService.class).updatePatrolRecord(patrolRecordForm);
//aBoolean = SpringContextUtils.getBean(UserPatrolRecordService.class).updatePatrolRecord(patrolRecordForm);
aBoolean = true;
break;
case SystemMessageType.PATROL_ROUTINE_WORK_ADD:
aBoolean = SpringContextUtils.getBean(BaseGridDailyworkService.class).insertBaseGridWorkRecord(patrolRecordForm);

11
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcEpidemicSpecialAttentionDTO.java

@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@ -23,8 +24,8 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
private static final long serialVersionUID = 1L;
public interface IcEpidemicSpecialAttentionUpdate{}
public interface IcEpidemicSpecialAttentionAdd{}
public interface IcEpidemicSpecialAttentionUpdate extends CustomerClientShowGroup {}
public interface IcEpidemicSpecialAttentionAdd extends CustomerClientShowGroup {}
/**
* ID
@ -83,13 +84,13 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
/**
* 原因
*/
@Length(max = 500,message = "原因限制500字以内")
@Length(max = 500,message = "原因限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String reason;
/**
* 备注
*/
@Length(max = 500,message = "备注限制500字以内")
@Length(max = 500,message = "备注限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String remark;
/**
@ -130,7 +131,7 @@ public class IcEpidemicSpecialAttentionDTO implements Serializable {
/**
* 通知内容
*/
@Length(max = 500,message = "通知内容限制500字以内")
@Length(max = 500,message = "通知内容限制500字以内",groups = {IcEpidemicSpecialAttentionAdd.class,IcEpidemicSpecialAttentionUpdate.class})
private String content;
}

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddIcNatFormDTO.java

@ -100,6 +100,7 @@ public class AddIcNatFormDTO implements Serializable {
//token中信息
private String customerId;
private String staffId;
private String client;
}

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EpidemicPreventionFormDTO.java

@ -28,6 +28,7 @@ public class EpidemicPreventionFormDTO extends PageFormDTO implements Serializab
* 网格ID
*/
private String gridId;
private String staffId;
/**
* 小区ID
*/

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java

@ -2,7 +2,6 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -18,13 +17,13 @@ public class IcResiCollectMemFormDTO implements Serializable {
/**
* 居住成员1姓名
*/
@NotBlank(message = "姓名不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
// @NotBlank(message = "姓名不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private String name;
/**
* 居住成员1身份证号
*/
@NotBlank(message = "身份证号不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
// @NotBlank(message = "身份证号不能为空", groups = {ResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class})
private String idNum;
/**

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java

@ -60,6 +60,7 @@ public class IcEpidemicPreventionController{
@PostMapping("page")
public Result<PageData<EpidemicPreventionResultDTO>> search(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
PageData<EpidemicPreventionResultDTO> result = icResiUserService.epidemicPreventionList(formDTO);
return new Result<PageData<EpidemicPreventionResultDTO>>().ok(result);
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java

@ -89,6 +89,7 @@ public class IcNatController implements ResultDataResolver {
ValidatorUtils.validateEntity(formDTO, AddIcNatFormDTO.Nat.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setClient(tokenDto.getClient());
icNucleinService.add(formDTO);
return new Result();
}

3
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccineRelationEntity.java

@ -1,5 +1,7 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
@ -24,6 +26,7 @@ public class IcVaccineRelationEntity extends BaseEpmetEntity {
/**
* 客户Id
*/
@TableField(fill = FieldFill.INSERT)
private String customerId;
/**

3
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java

@ -334,7 +334,8 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi
for (String s : existList) {
for (int i = NumConstant.ZERO; i < list.size(); i++) {
if (s.equals(list.get(i).getIdCard()) && !list.get(i).getAddStatus()){
errorInfo.add(getErrorInfo(list.get(i),"数据已存在",list.get(i).getNum()));
// 按照产品指示,去除提示错误信息,并不做操作
// errorInfo.add(getErrorInfo(list.get(i),"数据已存在",list.get(i).getNum()));
list.get(i).setAddStatus(true);
continue;
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcNatServiceImpl.java

@ -101,6 +101,9 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
if (null != icNatDTO && icNatDTO.getNatResult().equals(formDTO.getNatResult())) {
throw new RenException(EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getCode(), EpmetErrorCode.IC_NAT_IDCARD_NATTIME.getMsg());
} else if (null != icNatDTO && !icNatDTO.getNatResult().equals(formDTO.getNatResult())) {
if ("wxmp".equals(formDTO.getClient())) {
throw new RenException(EpmetErrorCode.RESI_IC_NAT.getCode(), EpmetErrorCode.RESI_IC_NAT.getMsg());
}
throw new RenException(EpmetErrorCode.IC_NAT.getCode(), EpmetErrorCode.IC_NAT.getMsg());
}
//1.获取所填居民所属组织缓存信息
@ -488,6 +491,9 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
String natResult = e.getNatResult();
String natAddress = e.getNatAddress();
// 居民信息
IcResiUserEntity resi = getResi(customerId, idCard, null);
//1.先看客户下有没有这个人
IcNatEntity resiNat = getResiNat(customerId, idCard, natTime);
if (resiNat != null && !"import".equals(resiNat.getUserType())) {
@ -547,7 +553,6 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
resiNat.setUpdatedBy(currentUserId);
resiNat.setUpdatedTime(new Date());
IcResiUserEntity resi = getResi(customerId, idCard, null);
resiNat.setIsResiUser(resi != null ? "1" : "0");
resiNat.setUserId(resi != null ? resi.getId() : "");
@ -555,15 +560,14 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
}
// 还要创建关系。只有本辖区及下级居民,才建立关系
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) {
createNatRelation(resiNat.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids());
if (resi != null) {
createNatRelation(resiNat.getId(), resi.getAgencyId(), resi.getPids());
}
return;
}
// 执行新增操作
IcResiUserEntity resi = getResi(customerId, idCard, null);
e.setIsResiUser(resi != null ? "1" : "0");
e.setUserId(resi != null ? resi.getId() : "");
e.setUserType("import");
@ -571,8 +575,8 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp
baseDao.insert(e);
// 还要创建关系。只有本辖区及下级居民,才建立关系
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) {
createNatRelation(e.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids());
if (resi != null) {
createNatRelation(e.getId(), resi.getAgencyId(), resi.getPids());
}
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java

@ -144,6 +144,7 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl<IcResiCollectDao,
//与之前历史成员没有匹配到
if (StringUtils.isNotBlank(entity.getName()) || StringUtils.isNotBlank(entity.getIdNum())) {
//姓名或份身份证号不为空时插入
entity.setId(null);
entity.setIcResiCollectId(originIcResiCollectId);
icResiMemberDao.insert(entity);
}

11
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -43,6 +43,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.constant.IcPlatformConstant;
import com.epmet.constant.IcResiUserConstant;
import com.epmet.constant.UserConstant;
@ -121,8 +122,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
private RedisTemplate redisTemplate;
@Resource
private IcNatService icNatService;
@Resource
private IcVaccineService icVaccineService;
//@Resource
//private IcVaccineService icVaccineService;
@Resource
private IcTripReportRecordService icTripReportRecordService;
@ -1250,6 +1251,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
*/
@Override
public PageData<EpidemicPreventionResultDTO> epidemicPreventionList(EpidemicPreventionFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null != staffInfo) {
formDTO.setAgencyId(staffInfo.getAgencyId());
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<EpidemicPreventionResultDTO> list = baseDao.getEpidemicPreventionList(formDTO);
PageInfo<EpidemicPreventionResultDTO> pageInfo = new PageInfo<>(list);
@ -1348,7 +1353,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
List<NatListDTO> natList = icNatService.getNatList(formDTO.getCustomerId(), icResiUser.getIdCard());
result.setNatList(natList);
//疫苗接种
List<VaccineListDTO> vaccineList = icVaccineService.getVaccineList(formDTO.getCustomerId(), icResiUser.getIdCard());
List<VaccineListDTO> vaccineList = SpringContextUtils.getBean(IcVaccineService.class).getVaccineList(formDTO.getCustomerId(), icResiUser.getIdCard());
result.setVaccineList(vaccineList);
//行程信息
List<TripListDTO> tripList = icTripReportRecordService.tripList(formDTO.getCustomerId(), icResiUser.getIdCard());

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

@ -351,33 +351,36 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
String errorDesFileUrl = null;
List<IcTripReportExcelData.ErrorRow> errorRows = listener.getErrorRows();
// 生成并上传错误文件
try {
// 文件生成
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import", "error_des");
String fileName = UUID.randomUUID().toString().concat(".xlsx");
errorDescFile = errorDescDir.resolve(fileName);
FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile());
FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName);
OutputStream os = fileItem.getOutputStream();
EasyExcel.write(os, IcTripReportExcelData.ErrorRow.class).sheet("导入失败列表").doWrite(errorRows);
// 文件上传oss
Result<UploadImgResultDTO> errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem));
if (errorDesFileUploadResult.success()) {
errorDesFileUrl = errorDesFileUploadResult.getData().getUrl();
}
} finally {
if (Files.exists(errorDescFile)) {
Files.delete(errorDescFile);
boolean failed = errorRows.size() > 0;
if (failed) {
// 生成并上传错误文件
try {
// 文件生成
Path errorDescDir = FileUtils.getAndCreateDirUnderEpmetFilesDir("ic_trip_preport", "import", "error_des");
String fileName = UUID.randomUUID().toString().concat(".xlsx");
errorDescFile = errorDescDir.resolve(fileName);
FileItemFactory factory = new DiskFileItemFactory(16, errorDescDir.toFile());
FileItem fileItem = factory.createItem("file", ContentType.APPLICATION_OCTET_STREAM.toString(), true, fileName);
OutputStream os = fileItem.getOutputStream();
EasyExcel.write(os, IcTripReportExcelData.ErrorRow.class).sheet("导入失败列表").doWrite(errorRows);
// 文件上传oss
Result<UploadImgResultDTO> errorDesFileUploadResult = ossFeignClient.uploadImportTaskDescFile(new CommonsMultipartFile(fileItem));
if (errorDesFileUploadResult.success()) {
errorDesFileUrl = errorDesFileUploadResult.getData().getUrl();
}
} finally {
if (Files.exists(errorDescFile)) {
Files.delete(errorDescFile);
}
}
}
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO();
importFinishTaskForm.setTaskId(importTaskId);
importFinishTaskForm.setProcessStatus(errorRows.size() <= 0 ? ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS : ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL);
importFinishTaskForm.setProcessStatus(failed ? ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL : ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS);
importFinishTaskForm.setOperatorId(userId);
importFinishTaskForm.setResultDesc("");
importFinishTaskForm.setResultDescFilePath(errorDesFileUrl);

17
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccineServiceImpl.java

@ -297,6 +297,9 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
Date inoculateTime = e.getInoculateTime();
String inoculateAddress = e.getInoculateAddress();
// 居民信息
IcResiUserEntity resi = getResi(customerId, idCard, null);
//1.先看客户下有没有这个人
IcVaccineEntity resiVaccine = getResiVaccine(customerId, idCard, inoculateTime);
if (resiVaccine != null && !"import".equals(resiVaccine.getUserType())) {
@ -352,30 +355,28 @@ public class IcVaccineServiceImpl extends BaseServiceImpl<IcVaccineDao, IcVaccin
resiVaccine.setUpdatedBy(currentUserId);
resiVaccine.setUpdatedTime(new Date());
IcResiUserEntity resi = getResi(customerId, idCard, null);
resiVaccine.setIsResiUser(resi != null ? "1" : "0");
baseDao.updateById(resiVaccine);
}
// 还要创建关系。只有本辖区及下级居民,才建立关系
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) {
createVaccineRelation(resiVaccine.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids());
// 建立关系
if (resi != null) {
createVaccineRelation(resiVaccine.getId(), resi.getAgencyId(), resi.getPids());
}
return;
}
// 执行新增操作
IcResiUserEntity resi = getResi(customerId, idCard, null);
e.setIsResiUser(resi != null ? "1" : "0");
e.setUserType("import");
baseDao.insert(e);
// 还要创建关系。只有本辖区及下级居民,才建立关系
if (getResi(customerId, idCard, String.join(":", Arrays.asList(agencyPids, agencyId))) != null) {
createVaccineRelation(e.getId(), listener.getCurrentAgencyId(), listener.getCurrentAgencyPids());
// 只要是居民,就创建上关系
if (resi != null) {
createVaccineRelation(e.getId(), resi.getAgencyId(), resi.getPids());
}
}

2
epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.39__edit_special_attention_length.sql

@ -0,0 +1,2 @@
alter table ic_epidemic_special_attention modify column remark VARCHAR(500);
alter table ic_epidemic_special_attention modify column reason VARCHAR(500);

1
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -680,6 +680,7 @@
GROUP BY ID_CARD ) c ON a.ID_CARD = c.ID_CARD
WHERE
a.DEL_FLAG = '0'
AND a.`STATUS` = '0'
<if test="customerId != null and customerId != ''">
AND a.CUSTOMER_ID = #{customerId}
</if>

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

@ -57,7 +57,7 @@
AND ARRIVE_DATE <![CDATA[ <= ]]> #{endDate}
</if>
ORDER BY
r.CREATED_TIME DESC
r.ARRIVE_DATE DESC
</select>
<update id="batchDel" parameterType="map">

Loading…
Cancel
Save