Browse Source

Merge branch 'develop' into release_temp

master
zhaoqifeng 3 years ago
parent
commit
11d865c9d2
  1. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java
  2. 7
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java
  3. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  5. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java
  6. 12
      epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/ChannelEnum.java

@ -1,6 +1,6 @@
package com.epmet.commons.tools.enums;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import java.util.Objects;
/**
* @author Administrator
@ -22,11 +22,11 @@ public enum ChannelEnum {
public static String getName(String code) {
ChannelEnum[] houseTypeEnums = values();
for (ChannelEnum houseTypeEnum : houseTypeEnums) {
if (houseTypeEnum.getCode() == code) {
if (Objects.equals(houseTypeEnum.getCode(), code)) {
return houseTypeEnum.getName();
}
}
return EpmetErrorCode.SERVER_ERROR.getMsg();
return null;
}
public static String getCode(String name) {

7
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseInfoDTO.java

@ -79,9 +79,16 @@ public class HouseInfoDTO implements Serializable {
private String customerId;
/**
* 小区所在的组织id
*/
private String agencyId;
/**
* eg市北区-阜新路街道-南宁社区
*/
private String agencyPathName;
/**
* 组织的area_code
*/
private String areaCode;
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -465,9 +465,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
HouseInfoDTO houseInfo = icHouseRedis.getHouseInfo(houseId, customerId);
if (null != houseInfo && StringUtils.isNotBlank(houseInfo.getAgencyId())) {
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(houseInfo.getAgencyId());
houseInfo.setAgencyPathName(agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()));
houseInfo.setAgencyPathName(StringUtils.isNotBlank(agencyInfoCache.getAllParentName())?agencyInfoCache.getAllParentName().concat(StrConstant.HYPHEN).concat(agencyInfoCache.getOrganizationName()):agencyInfoCache.getOrganizationName());
houseInfo.setAreaCode(StringUtils.isNotBlank(agencyInfoCache.getAreaCode())?agencyInfoCache.getAreaCode():StrConstant.EPMETY_STR);
} else {
houseInfo.setAgencyPathName(StrConstant.EPMETY_STR);
houseInfo.setAreaCode(StrConstant.EPMETY_STR);
}
return houseInfo;
}

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -368,7 +368,7 @@
IFNULL(ib.LONGITUDE,'') as buildingLongitude,
IFNULL(ib.LATITUDE,'') as buildingLatitude,
ih.CUSTOMER_ID AS customerId,
concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.HOUSE_NAME,'')) AS allName,
concat(IFNULL(n.NEIGHBOR_HOOD_NAME,''),IFNULL(ib.BUILDING_NAME,''),IFNULL(u.UNIT_NAME,''),IFNULL(ih.DOOR_NAME,'')) AS allName,
n.AGENCY_ID as agencyId
FROM ic_house ih
left JOIN ic_neighbor_hood n ON ( ih.NEIGHBOR_HOOD_ID = n.id AND n.DEL_FLAG = '0')

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

@ -151,7 +151,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
}
//3.新增通知表信息
if (formDTO.getChannel().size() > NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) {
sendNotice(formDTO);
sendNotice(formDTO,agencyInfoCache.getOrganizationName());
}
return entity.getId();
}
@ -160,7 +160,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
* 行程上报-发送通知
* @param formDTO
*/
private void sendNotice(IcTripReportFormDTO formDTO) {
private void sendNotice(IcTripReportFormDTO formDTO,String agencyName) {
SendNoticeFormDTO dto = new SendNoticeFormDTO();
List<SendNoticeFormDTO.UserListBean> userList = new ArrayList<>();
//注意这里的userId是指的pc平台的居民
@ -171,7 +171,8 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
//通知来源 0 行程上报,1 疫苗接种,2 核酸检测
dto.setOrigin(NumConstant.ZERO_STR);
dto.setContent(formDTO.getContent());
dto.setOrgName(formDTO.getCurrentStaffId());
dto.setOrgName(agencyName);
dto.setStaffId(formDTO.getCurrentStaffId());
icNoticeService.sendNotice(dto);
}
@ -225,7 +226,7 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR
}
//3.新增通知表信息
if (formDTO.getChannel().size() > NumConstant.ZERO && StringUtils.isNotBlank(formDTO.getContent())) {
sendNotice(formDTO);
sendNotice(formDTO,agencyInfoCache.getOrganizationName());
}
return entity.getId();
}

12
epmet-user/epmet-user-server/src/main/resources/mapper/IcEpidemicSpecialAttentionDao.xml

@ -32,13 +32,13 @@
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` = #{name}
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND a.MOBILE = #{mobile}
AND a.MOBILE LIKE CONCAT('%',#{mobile},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND a.ID_CARD = #{idCard}
AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
<if test=' null != vaccinationCount'>
HAVING vaccinationCount = #{vaccinationCount}
@ -60,13 +60,13 @@
AND a.ORG_ID = #{orgId}
AND ATTENTION_TYPE = #{attentionType}
<if test='null != name and "" != name'>
AND a.`NAME` = #{name}
AND a.`NAME` LIKE CONCAT('%',#{name},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND a.MOBILE = #{mobile}
AND a.MOBILE LIKE CONCAT('%',#{mobile},'%')
</if>
<if test='null != mobile and "" != mobile'>
AND a.ID_CARD = #{idCard}
AND a.ID_CARD LIKE CONCAT('%',#{idCard},'%')
</if>
<if test='null != reason and "" != reason'>
AND a.REASON LIKE CONCAT('%',#{reason},'%')

Loading…
Cancel
Save