Browse Source

导入居民查询时bug

feature/teamB_zz_wgh
jianjun 3 years ago
parent
commit
a81fe11a3e
  1. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  2. 10
      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

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

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

@ -462,7 +462,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
//默认新增
columnAndValues.put("SUB_STATUS", IcResiUserSubStatusEnum.IMPORT.getSubStatus());
String idCard = columnAndValues.get("ID_CARD");
Map<String, String> existingResiMap = icResiUserDao.selectResiInfoMap(idCard, null);
Map<String, String> existingResiMap = icResiUserDao.selectResiInfoMap(customerId, idCard, null);
if (existingResiMap == null) {
// 新导入的居民,因为还没有读取子sheet,所以这些居民类别没有办法获取,先默认设置成0,后面读取子sheet的时候再更新
@ -705,7 +705,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) {
throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard));
@ -790,7 +790,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) {
throw new RenException(EpmetErrorCode.RESI_NOT_FOUND.getCode(), String.format("身份证号为【%s】的居民信息未找到,请确认该居民信息存在", idCard));
@ -1654,7 +1654,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
Map<String, String> oldCategories = oldData.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);
@ -1785,7 +1785,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
for (Map.Entry<String, ResiImportChangedData> resi : transferedResis.entrySet()) {
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 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 * from ic_resi_user
<where>
DEL_FLAG='0'
CUSTOMER_ID = #{customerId}
AND DEL_FLAG='0'
<if test="idCard != null and idCard != ''">
AND ID_CARD=#{idCard}
</if>

Loading…
Cancel
Save