test
parent
e37f2ff17f
commit
ac3b6f4633
|
|
@ -198,7 +198,7 @@ public class OrgPersonnelExcelImporter {
|
||||||
// 行内枚举/数据校验未通过,已记录异常
|
// 行内枚举/数据校验未通过,已记录异常
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<OrgPersonnelCertDO> personnelCertEntities = buildOrgPersonnelCert(row, errors, personnelEntity);
|
List<OrgPersonnelCertDO> personnelCertEntities = buildOrgPersonnelCert(row, errors);
|
||||||
|
|
||||||
Long userId = addUserIfAbsentAndAppendRole(personnelEntity);
|
Long userId = addUserIfAbsentAndAppendRole(personnelEntity);
|
||||||
personnelEntity.setId(userId);
|
personnelEntity.setId(userId);
|
||||||
|
|
@ -227,11 +227,10 @@ public class OrgPersonnelExcelImporter {
|
||||||
*
|
*
|
||||||
* @param row row
|
* @param row row
|
||||||
* @param errors errors
|
* @param errors errors
|
||||||
* @param personnelEntity personnelEntity
|
|
||||||
* @return OrgPersonnelCertEntity
|
* @return OrgPersonnelCertEntity
|
||||||
*/
|
*/
|
||||||
private List<OrgPersonnelCertDO> buildOrgPersonnelCert(OrgPersonnelImportRow row
|
private List<OrgPersonnelCertDO> buildOrgPersonnelCert(OrgPersonnelImportRow row
|
||||||
, List<OrgPersonnelImportErrorCO> errors, OrgPersonnelEntity personnelEntity) {
|
, List<OrgPersonnelImportErrorCO> errors) {
|
||||||
List<OrgPersonnelCertEntity> personnelCertEntities = row.getBasic().getPersonnelCertEntities();
|
List<OrgPersonnelCertEntity> personnelCertEntities = row.getBasic().getPersonnelCertEntities();
|
||||||
if (CollectionUtils.isEmpty(personnelCertEntities)) {
|
if (CollectionUtils.isEmpty(personnelCertEntities)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
|
|
@ -240,6 +239,7 @@ public class OrgPersonnelExcelImporter {
|
||||||
List<OrgPersonnelCertDO> orgPersonnelCertDOList = new ArrayList<>(personnelCertEntities.size());
|
List<OrgPersonnelCertDO> orgPersonnelCertDOList = new ArrayList<>(personnelCertEntities.size());
|
||||||
for (OrgPersonnelCertEntity personnelCertEntity : personnelCertEntities) {
|
for (OrgPersonnelCertEntity personnelCertEntity : personnelCertEntities) {
|
||||||
OrgPersonnelCertDO orgPersonnelCertDO = orgPersonnelCertConvertor.entityToDO(personnelCertEntity);
|
OrgPersonnelCertDO orgPersonnelCertDO = orgPersonnelCertConvertor.entityToDO(personnelCertEntity);
|
||||||
|
InsertFieldDefaults.apply(orgPersonnelCertDO);
|
||||||
orgPersonnelCertDO.setOrgId(personnelCertEntity.getOrgId());
|
orgPersonnelCertDO.setOrgId(personnelCertEntity.getOrgId());
|
||||||
orgPersonnelCertDOList.add(orgPersonnelCertDO);
|
orgPersonnelCertDOList.add(orgPersonnelCertDO);
|
||||||
}
|
}
|
||||||
|
|
@ -369,7 +369,7 @@ public class OrgPersonnelExcelImporter {
|
||||||
* 任一不通过记录异常并返回 null。
|
* 任一不通过记录异常并返回 null。
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
private Boolean matchCapability(@UnknownNullability OrgPersonnelImportRow row
|
private Boolean matchCapability(OrgPersonnelImportRow row
|
||||||
, Map<String, List<OrgPersonnelImportRow.CapabilityRow>> capabilityMap, List<OrgPersonnelImportErrorCO> errors) {
|
, Map<String, List<OrgPersonnelImportRow.CapabilityRow>> capabilityMap, List<OrgPersonnelImportErrorCO> errors) {
|
||||||
|
|
||||||
List<OrgPersonnelImportRow.CapabilityRow> capabilityList = capabilityMap.get(trim(row.getBasic().getIdCardNo()));
|
List<OrgPersonnelImportRow.CapabilityRow> capabilityList = capabilityMap.get(trim(row.getBasic().getIdCardNo()));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue