Browse Source

调试:居民导入

master
wangxianzhang 4 years ago
parent
commit
f128557851
  1. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

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

@ -243,6 +243,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
initImportThreadLocal(customerId);
// 上传主表信息
log.info("======开始导入基础信息=======");
importIcResiBaseInfoFromExcel(formItemList,excelPathName, IcResiUserTableEnum.IC_RESI_USER.getSheetNo(), IcResiUserTableEnum.IC_RESI_USER.getHeadRowNo(),
currUserAgencyId, agencyInfo.getPids(), loginUserId, IcResiUserTableEnum.IC_RESI_USER.getTableName(), customerId);
@ -254,6 +255,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
}
try {
log.info("======开始导入附加表:{}=======", sheet.getTableComment());
importIcResiExtraInfoFromExcel(formItemList, excelPathName, sheet, currUserAgencyId, loginUserId, customerId);
} catch (Exception e) {
String errorMsg = ExceptionUtils.getErrorStackTrace(e);
@ -560,6 +562,13 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
LinkedHashMap<String, String> columnAndValues = new LinkedHashMap<>();
String loginUserId = loginUserUtil.getLoginUserId();
String loginUserApp = loginUserUtil.getLoginUserApp();
String loginUserClient = loginUserUtil.getLoginUserClient();
String loginUserCustomerId = loginUserUtil.getLoginUserCustomerId();
log.info("persistIcResiBaseInfo:: userId:{}, app:{}, client:{}, customerId:{}", loginUserId, loginUserApp, loginUserClient, loginUserCustomerId);
// 遍历每一行,将行内容转化为
for (Map<Integer, String> row : dataRows) {
@ -586,7 +595,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
String icResiId = existResiInfoMap.get("ID");
columnAndValues.put("IC_RESI_USER", icResiId);
columnAndValues.put("CUSTOMER_ID", loginUserUtil.getLoginUserCustomerId());
columnAndValues.put("CUSTOMER_ID", loginUserCustomerId);
columnAndValues.put("UPDATED_BY", currentUserId);
// 移除excel中存在,但是数据库表中不存在的无效列,方式sql语法错误

Loading…
Cancel
Save