人员导入、花名册左侧树BUG修复

pull/23/head
dxfeng 3 years ago
parent 7e1e1eae5c
commit b446dbdb53

@ -556,7 +556,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List<Long> ids = (List<Long>) DeleteParam.builder().ids(parentDeptS).build().getIds();
int ceilCount = (int) Math.ceil((double) ids.size() / 1000);
List<DepartmentPO> departmentsByIds = new ArrayList<>();
for (int i = 1; i < ceilCount; i++) {
for (int i = 1; i < ceilCount + 1; i++) {
List<Long> longs = PageUtil.subList(i, 1000, ids);
List<DepartmentPO> departmentsById = getDepartmentMapper().getDeptsByIds(longs);
if (CollectionUtils.isNotEmpty(departmentsById)) {

@ -79,6 +79,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
private static final String RIGHT_NAME = "DataImport:All";
private static final String HRM_COMPANY = "hrmsubcompany";
private static final String HRM_DEPARTMENT = "hrmdepartment";
private static final String HRM_RESOURCE = "hrmresource";
private ExtendInfoMapper getExtendInfoMapper() {
@ -1316,7 +1317,6 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
saveImportDetailLog(historyDetailPO);
continue nextRow;
}
historyDetailPO.setRelatedName(cellValue);
String[] split = cellValue.split(">");
if (split.length > 0) {
if (split.length > 8) {
@ -1365,6 +1365,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
saveImportDetailLog(historyDetailPO);
continue;
}
historyDetailPO.setRelatedName(keyFieldValue);
// 判断当前人员是否存在
Long resourceId = MapperProxyFactory.getProxy(HrmResourceMapper.class).getIdByKeyField(keyField, keyFieldValue);
@ -1389,9 +1390,9 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("show_order", maxShowOrder + 1);
}
Map<String, Object> syncMap = new OrganizationSyncEc(user, LogModuleNameEnum.RESOURCE, OperateTypeEnum.ADD, map, false).sync();
if (isThrowError(syncMap)) {
String ecCompanyID = Util.null2String(syncMap.get("id"));
RecordInfo recordInfo = getSystemDataMapper().getHrmObjectByID(HRM_COMPANY, ecCompanyID);
if (isThrowError(syncMap) && StringUtils.isNotBlank(Util.null2String(syncMap.get("id")))) {
String ecResourceId = Util.null2String(syncMap.get("id"));
RecordInfo recordInfo = getSystemDataMapper().getHrmObjectByID(HRM_RESOURCE, ecResourceId);
map.put("uuid", recordInfo.getUuid());
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_HRMRESOURCE").params(map).build();
map.remove("id");

@ -585,13 +585,7 @@ public class ResourceSyncUtil {
//新增人员实时同步到CoreMail邮件系统
//CoreMailAPI.synUser(id);
if (cmd.equals("SaveAndNew")) {
retmap.put("status", "1");
} else if (cmd.equals("SaveAndNext")) {
retmap.put("status", "2");
} else {
retmap.put("status", "3");
}
retmap.put("status", "1");
retmap.put("id", id);
} catch (Exception e) {
new BaseBean().writeLog("新建人员基本信息错误:" + e);

Loading…
Cancel
Save