Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj'

feature/teamB_zz_wgh
jianjun 3 years ago
parent
commit
026f5ad627
  1. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  2. 12
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  3. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

17
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -259,7 +259,7 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
Map<String, String> getCategoryListMap(@Param("columns") List<String> columns, @Param("icUserId") String icUserId); Map<String, String> getCategoryListMap(@Param("columns") List<String> columns, @Param("icUserId") String icUserId);
Map<String, String> selectResiInfoMap(@Param("idCard") String idCard, @Param("resiId") String resiId); Map<String, String> selectResiInfoMap(@Param("customerId") String customerId, @Param("idCard") String idCard, @Param("resiId") String resiId);
List<Map<String, Object>> selectResiUsers(@Param("types") List<String> types, @Param("orgId") String orgId); List<Map<String, Object>> selectResiUsers(@Param("types") List<String> types, @Param("orgId") String orgId);
@ -391,18 +391,19 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
@Param("customerId") String customerId); @Param("customerId") String customerId);
/** /**
* @describe: 通过身份证号查询实体类 * @return com.epmet.entity.IcResiUserEntity
* @author wangtong * @describe: 通过身份证号查询实体类
* @date 2022/6/13 17:32 * @author wangtong
* @params [idCard, customerId] * @date 2022/6/13 17:32
* @return com.epmet.entity.IcResiUserEntity * @params [idCard, customerId]
*/ */
IcResiUserEntity selectResiUserEntityByIdCard(@Param("idCard") String idCard,@Param("customerId") String customerId); IcResiUserEntity selectResiUserEntityByIdCard(@Param("idCard") String idCard, @Param("customerId") String customerId);
List<IcResiUserDTO> getListIcResiUserDTO(@Param("icResiUserIdList") List<String> icResiUserIdList); List<IcResiUserDTO> getListIcResiUserDTO(@Param("icResiUserIdList") List<String> icResiUserIdList);
/** /**
* desc:获取客户内 每个房屋内的居民数 * desc:获取客户内 每个房屋内的居民数
*
* @param customerId * @param customerId
* @return * @return
*/ */

12
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -450,7 +450,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
public void persistIcResiBaseInfo(Map<String, ColumnWrapper> itemIdAndColumnWrapper, List<Map<Integer, String>> dataRows, public void persistIcResiBaseInfo(Map<String, ColumnWrapper> itemIdAndColumnWrapper, List<Map<Integer, String>> dataRows,
String currUserAgencyId, Map<Integer, String> checkBoxOptionColumnIdxAndLabel, String currUserAgencyId, Map<Integer, String> checkBoxOptionColumnIdxAndLabel,
String currUserAgencyPids, String currentUserId, String tableName) { String currUserAgencyPids, String currentUserId, String tableName) {
String loginUserCustomerId = EpmetRequestHolder.getLoginUserCustomerId();
// 遍历每一行,将行内容转化为 // 遍历每一行,将行内容转化为
for (Map<Integer, String> row : dataRows) { for (Map<Integer, String> row : dataRows) {
@ -463,7 +463,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
//默认新增 //默认新增
columnAndValues.put("SUB_STATUS", IcResiUserSubStatusEnum.IMPORT.getSubStatus()); columnAndValues.put("SUB_STATUS", IcResiUserSubStatusEnum.IMPORT.getSubStatus());
String idCard = columnAndValues.get("ID_CARD"); String idCard = columnAndValues.get("ID_CARD");
Map<String, String> existingResiMap = icResiUserDao.selectResiInfoMap(idCard, null); Map<String, String> existingResiMap = icResiUserDao.selectResiInfoMap(loginUserCustomerId, idCard, null);
if (existingResiMap == null) { if (existingResiMap == null) {
// 新导入的居民,因为还没有读取子sheet,所以这些居民类别没有办法获取,先默认设置成0,后面读取子sheet的时候再更新 // 新导入的居民,因为还没有读取子sheet,所以这些居民类别没有办法获取,先默认设置成0,后面读取子sheet的时候再更新
@ -706,7 +706,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
} }
// 检查用户是否存在 // 检查用户是否存在
Map<String, String> existResiInfoMap = icResiUserDao.selectResiInfoMap(idCard, null); Map<String, String> existResiInfoMap = icResiUserDao.selectResiInfoMap(loginUserCustomerId, idCard, null);
if (existResiInfoMap == null || existResiInfoMap.size() == 0) { if (existResiInfoMap == null || existResiInfoMap.size() == 0) {
throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard)); throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard));
@ -791,7 +791,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
"身份证号未填写"); "身份证号未填写");
} }
Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(idCard, null); Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(customerId, idCard, null);
if (resiInfoMap == null || resiInfoMap.size() == 0) { if (resiInfoMap == null || resiInfoMap.size() == 0) {
throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard)); throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard));
@ -1717,7 +1717,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
Map<String, String> oldCategories = oldData.getCategories(); Map<String, String> oldCategories = oldData.getCategories();
Map<String, String> newCategories = newData.getCategories(); Map<String, String> newCategories = newData.getCategories();
Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(null, resiId); Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(customerId, null, resiId);
fillResiSubCategoryInfo4TransferAndCategoryChange(oldData, newData, resiInfoMap); fillResiSubCategoryInfo4TransferAndCategoryChange(oldData, newData, resiInfoMap);
@ -1848,7 +1848,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
for (Map.Entry<String, ResiImportChangedData> resi : transferedResis.entrySet()) { for (Map.Entry<String, ResiImportChangedData> resi : transferedResis.entrySet()) {
String resiId = resi.getKey(); String resiId = resi.getKey();
Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(null, resiId); Map<String, String> resiInfoMap = icResiUserDao.selectResiInfoMap(customerId, null, resiId);
String resiName = resiInfoMap.get("NAME"); String resiName = resiInfoMap.get("NAME");
String pids = resiInfoMap.get("PIDS"); String pids = resiInfoMap.get("PIDS");

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

@ -716,7 +716,8 @@
<select id="selectResiInfoMap" resultType="java.util.Map"> <select id="selectResiInfoMap" resultType="java.util.Map">
select * from ic_resi_user select * from ic_resi_user
<where> <where>
DEL_FLAG='0' CUSTOMER_ID = #{customerId}
AND DEL_FLAG='0'
<if test="idCard != null and idCard != ''"> <if test="idCard != null and idCard != ''">
AND ID_CARD=#{idCard} AND ID_CARD=#{idCard}
</if> </if>

Loading…
Cancel
Save