|
|
|
@ -554,6 +554,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
int lastRow = sheetAt.getLastRowNum();
|
|
|
|
|
List<ExtendInfoPO> extendInfoPOS = new ArrayList<>();
|
|
|
|
|
OrganizationAssert.isTrue(lastRow > 0, "导入数据为空");
|
|
|
|
|
short lastCellNum = sheetAt.getRow(0).getLastCellNum();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历每一行数据
|
|
|
|
@ -568,11 +569,8 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
String companyName = "";
|
|
|
|
|
|
|
|
|
|
historyDetailPO.setRowNums(String.valueOf(i + 1));
|
|
|
|
|
for (int cellIndex = 0; cellIndex < row.getLastCellNum(); cellIndex++) {
|
|
|
|
|
for (int cellIndex = 0; cellIndex < lastCellNum; cellIndex++) {
|
|
|
|
|
XSSFCell cell = row.getCell((short) cellIndex);
|
|
|
|
|
if (cell == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
String cellValue = getCellValue(cell).trim();
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
// 首行 初始化字段信息
|
|
|
|
@ -607,7 +605,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
if ("comp_name".equals(infoPO.getFieldName())) {
|
|
|
|
|
historyDetailPO.setRelatedName(cellValue);
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("分部层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -711,6 +709,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
int lastRow = sheetAt.getLastRowNum();
|
|
|
|
|
List<ExtendInfoPO> extendInfoPOS = new ArrayList<>();
|
|
|
|
|
OrganizationAssert.isTrue(lastRow > 0, "导入数据为空");
|
|
|
|
|
short lastCellNum = sheetAt.getRow(0).getLastCellNum();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 遍历每一行数据
|
|
|
|
@ -726,11 +725,8 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
String departmentName = "";
|
|
|
|
|
|
|
|
|
|
historyDetailPO.setRowNums(String.valueOf(i + 1));
|
|
|
|
|
for (int cellIndex = 0; cellIndex < row.getLastCellNum(); cellIndex++) {
|
|
|
|
|
for (int cellIndex = 0; cellIndex < lastCellNum; cellIndex++) {
|
|
|
|
|
XSSFCell cell = row.getCell((short) cellIndex);
|
|
|
|
|
if (cell == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
String cellValue = getCellValue(cell).trim();
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
// 首行 初始化字段信息
|
|
|
|
@ -765,7 +761,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
// 上级分部
|
|
|
|
|
if ("parent_comp".equals(infoPO.getFieldName())) {
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("分部层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -793,7 +789,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
}
|
|
|
|
|
historyDetailPO.setRelatedName(cellValue);
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("部门层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -898,7 +894,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
int lastRow = sheetAt.getLastRowNum();
|
|
|
|
|
List<ExtendInfoPO> extendInfoPOS = new ArrayList<>();
|
|
|
|
|
OrganizationAssert.isTrue(lastRow > 0, "导入数据为空");
|
|
|
|
|
|
|
|
|
|
short lastCellNum = sheetAt.getRow(0).getLastCellNum();
|
|
|
|
|
|
|
|
|
|
// 遍历每一行数据
|
|
|
|
|
nextRow:
|
|
|
|
@ -914,11 +910,8 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
String jobName = "";
|
|
|
|
|
|
|
|
|
|
historyDetailPO.setRowNums(String.valueOf(i + 1));
|
|
|
|
|
for (int cellIndex = 0; cellIndex < row.getLastCellNum(); cellIndex++) {
|
|
|
|
|
for (int cellIndex = 0; cellIndex < lastCellNum; cellIndex++) {
|
|
|
|
|
XSSFCell cell = row.getCell((short) cellIndex);
|
|
|
|
|
if (cell == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
String cellValue = getCellValue(cell).trim();
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
// 首行 初始化字段信息
|
|
|
|
@ -953,7 +946,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
// 上级分部
|
|
|
|
|
if ("ec_company".equals(infoPO.getFieldName())) {
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("分部层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -975,7 +968,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
|
|
|
|
|
if ("ec_department".equals(infoPO.getFieldName())) {
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("部门层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -1003,7 +996,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|
|
|
|
}
|
|
|
|
|
historyDetailPO.setRelatedName(cellValue);
|
|
|
|
|
String[] split = cellValue.split(">");
|
|
|
|
|
if (split.length > 1) {
|
|
|
|
|
if (split.length > 0) {
|
|
|
|
|
if (split.length > 8) {
|
|
|
|
|
historyDetailPO.setOperateDetail("岗位层级不能大于10");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
|