|
@ -24,7 +24,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.constant.ImportTaskConstants; |
|
|
import com.epmet.constants.ImportTaskConstants; |
|
|
import com.epmet.dao.IcResiUserDao; |
|
|
import com.epmet.dao.IcResiUserDao; |
|
|
import com.epmet.dao.IcUserChangeDetailedDao; |
|
|
import com.epmet.dao.IcUserChangeDetailedDao; |
|
|
import com.epmet.dao.IcUserChangeRecordDao; |
|
|
import com.epmet.dao.IcUserChangeRecordDao; |
|
@ -38,10 +38,7 @@ import com.epmet.entity.IcUserChangeRecordEntity; |
|
|
import com.epmet.entity.IcUserTransferRecordEntity; |
|
|
import com.epmet.entity.IcUserTransferRecordEntity; |
|
|
import com.epmet.enums.IcResiUserTableEnum; |
|
|
import com.epmet.enums.IcResiUserTableEnum; |
|
|
import com.epmet.excel.handler.IcResiImportDynamicExcelListener; |
|
|
import com.epmet.excel.handler.IcResiImportDynamicExcelListener; |
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
import com.epmet.feign.*; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
|
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.*; |
|
|
import com.google.common.cache.Cache; |
|
|
import com.google.common.cache.Cache; |
|
|
import com.google.common.cache.CacheBuilder; |
|
|
import com.google.common.cache.CacheBuilder; |
|
@ -127,8 +124,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
private RedisUtils redisUtils; |
|
|
private RedisUtils redisUtils; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ImportTaskService importTaskService; |
|
|
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 字表中不需要的列 |
|
|
* 字表中不需要的列 |
|
@ -291,11 +287,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
|
|
|
|
|
// 更新上传记录
|
|
|
// 更新上传记录
|
|
|
if (hasErrorRows) { |
|
|
if (hasErrorRows) { |
|
|
importTaskService.finish(importTaskId, ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL, loginUserId, |
|
|
finishImportTask(importTaskId, loginUserId, ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL,null, null); |
|
|
null, null); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
importTaskService.finish(importTaskId, ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS, loginUserId, |
|
|
finishImportTask(importTaskId, loginUserId, ImportTaskConstants.PROCESS_STATUS_FINISHED_SUCCESS,null, null); |
|
|
null, null); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
@ -1755,45 +1749,45 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
return recordEntity; |
|
|
return recordEntity; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 创建导入任务 |
|
|
|
|
|
* @param operatorId |
|
|
|
|
|
* @param bizType |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public String createImportTaskRecord(String operatorId, String bizType) { |
|
|
|
|
|
ImportTaskCommonFormDTO importTaskForm = new ImportTaskCommonFormDTO(); |
|
|
|
|
|
importTaskForm.setOperatorId(operatorId); |
|
|
|
|
|
importTaskForm.setBizType(bizType); |
|
|
|
|
|
ImportTaskCommonResultDTO resultDTO = getResultDataOrThrowsException(commonServiceOpenFeignClient.createImportTask(importTaskForm), |
|
|
|
|
|
ServiceConstant.EPMET_COMMON_SERVICE, |
|
|
|
|
|
EpmetErrorCode.SERVER_ERROR.getCode(), |
|
|
|
|
|
"【居民信息导入】创建导入任务记录失败", |
|
|
|
|
|
"【居民信息导入】创建导入任务记录失败"); |
|
|
|
|
|
|
|
|
|
|
|
return resultDTO.getTaskId(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 完成导入任务 |
|
|
|
|
|
* @param importTaskId 任务ID |
|
|
|
|
|
* @param operatorId 操作者ID |
|
|
|
|
|
* @param processStatus 处理状态,见 ImportTaskConstants.PROCESS_STATUS_* |
|
|
|
|
|
* @param resultDesc 结果描述,非必填 |
|
|
|
|
|
* @param resultDescPath 结果描述文件,excel等文件,有错误的话需要传入,成功则不需要 |
|
|
|
|
|
*/ |
|
|
|
|
|
public void finishImportTask(String importTaskId, String operatorId, String processStatus, String resultDesc, String resultDescPath) { |
|
|
|
|
|
ImportTaskCommonFormDTO importFinishTaskForm = new ImportTaskCommonFormDTO(); |
|
|
|
|
|
importFinishTaskForm.setTaskId(importTaskId); |
|
|
|
|
|
importFinishTaskForm.setProcessStatus(processStatus); |
|
|
|
|
|
importFinishTaskForm.setOperatorId(operatorId); |
|
|
|
|
|
importFinishTaskForm.setResultDesc(resultDesc); |
|
|
|
|
|
importFinishTaskForm.setResultDescFilePath(resultDescPath); |
|
|
|
|
|
|
|
|
//private IcUserTransferRecordEntity fillTransferRecord(String resiId, String resiName, String operatorId, String operatorName, String oldCustomerId,
|
|
|
Result result = commonServiceOpenFeignClient.finishImportTask(importFinishTaskForm); |
|
|
// String oldAgencyId, String oldAgencyName, String oldGridId, String oldGridName, String neighborhoodId,
|
|
|
if (result == null || !result.success()) { |
|
|
// String neighborhoodName, String oldBuildingId, String oldBuildingName, ) {
|
|
|
log.error("【居民信息导入】结束导入任务失败:taskId:{}, processStatus:{}, operatorId:{}, resultDesc:{}, resultDescPath:{}", |
|
|
|
|
|
importTaskId, processStatus, operatorId, resultDesc, resultDescPath); |
|
|
//IcUserTransferRecordEntity recordEntity = new IcUserTransferRecordEntity();
|
|
|
} |
|
|
//recordEntity.setIcUserId();
|
|
|
} |
|
|
//recordEntity.setOperatorId();
|
|
|
|
|
|
//recordEntity.setIcUserName();
|
|
|
|
|
|
//recordEntity.setOperatorName();
|
|
|
|
|
|
//recordEntity.setOldCustomerId();
|
|
|
|
|
|
//recordEntity.setOldAgencyId();
|
|
|
|
|
|
//recordEntity.setOldAgencyName();
|
|
|
|
|
|
//recordEntity.setOldGridId();
|
|
|
|
|
|
//recordEntity.setOldGridName();
|
|
|
|
|
|
//recordEntity.setOldNeighborHoodId();
|
|
|
|
|
|
//recordEntity.setOldNeighborHoodName();
|
|
|
|
|
|
//recordEntity.setOldBuildingId();
|
|
|
|
|
|
//recordEntity.setOldBuildingName();
|
|
|
|
|
|
//recordEntity.setOldBuildingUnitId();
|
|
|
|
|
|
//recordEntity.setOldBuildingUnitName();
|
|
|
|
|
|
//recordEntity.setOldHouseId();
|
|
|
|
|
|
//recordEntity.setOldHouseName();
|
|
|
|
|
|
//recordEntity.setTransferTime();
|
|
|
|
|
|
//recordEntity.setRemark();
|
|
|
|
|
|
//recordEntity.setNewCustomerId();
|
|
|
|
|
|
//recordEntity.setNewAgencyId();
|
|
|
|
|
|
//recordEntity.setNewAgencyName();
|
|
|
|
|
|
//recordEntity.setNewGridId();
|
|
|
|
|
|
//recordEntity.setNewGridName();
|
|
|
|
|
|
//recordEntity.setNewNeighborHoodId();
|
|
|
|
|
|
//recordEntity.setNewNeighborHoodName();
|
|
|
|
|
|
//recordEntity.setNewBuildingId();
|
|
|
|
|
|
//recordEntity.setNewBuildingName();
|
|
|
|
|
|
//recordEntity.setNewBuildingUnitId();
|
|
|
|
|
|
//recordEntity.setNewBuildingUnitName();
|
|
|
|
|
|
//recordEntity.setNewHouseId();
|
|
|
|
|
|
//recordEntity.setNewHouseName();
|
|
|
|
|
|
//}
|
|
|
|
|
|
} |
|
|
} |
|
|