|
@ -9,7 +9,9 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.ValidateException; |
|
|
import com.epmet.commons.tools.exception.ValidateException; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
@ -244,7 +246,7 @@ public abstract class AbstractLingShanSpecialCrowdExcelImportListener<T extends |
|
|
* @date: 2023/4/18 3:42 PM |
|
|
* @date: 2023/4/18 3:42 PM |
|
|
*/ |
|
|
*/ |
|
|
protected void saveBatch() { |
|
|
protected void saveBatch() { |
|
|
String orgIdPath = PidUtils.convertPid2OrgIdPath(currentStaffInfo.getAgencyId(), currentStaffInfo.getAgencyPIds()); |
|
|
// String orgIdPath = PidUtils.convertPid2OrgIdPath(currentStaffInfo.getAgencyId(), currentStaffInfo.getAgencyPIds());
|
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
String customerId = EpmetRequestHolder.getLoginUserCustomerId(); |
|
|
Date now = new Date(); |
|
|
Date now = new Date(); |
|
|
Iterator<T> it = getOriginDatas().iterator(); |
|
|
Iterator<T> it = getOriginDatas().iterator(); |
|
@ -256,9 +258,15 @@ public abstract class AbstractLingShanSpecialCrowdExcelImportListener<T extends |
|
|
errorDatas.add(row); |
|
|
errorDatas.add(row); |
|
|
it.remove(); |
|
|
it.remove(); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(row.getResiGridId()); |
|
|
|
|
|
|
|
|
|
|
|
if (gridInfo == null) { |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), null, "【灵山街道-特殊人群】导入:未找到网格: " + row.getResiGridId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
specialTypes.add(new PersonSpecialTypeBean(row.getResiId(), row.getIdCard(), specialCrowdType.getType())); |
|
|
specialTypes.add(new PersonSpecialTypeBean(row.getResiId(), row.getIdCard(), specialCrowdType.getType())); |
|
|
|
|
|
|
|
|
orgIdPath = PidUtils.convertPid2OrgIdPath(row.getResiGridId(), orgIdPath); |
|
|
String orgIdPath = PidUtils.convertPid2OrgIdPath(row.getResiGridId(), gridInfo.getPids()); |
|
|
|
|
|
|
|
|
E e = ConvertUtils.sourceToTarget(row, entityClass); |
|
|
E e = ConvertUtils.sourceToTarget(row, entityClass); |
|
|
e.setCustomerId(customerId); |
|
|
e.setCustomerId(customerId); |
|
|