|
|
|
@ -53,10 +53,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
|
|
import org.apache.poi.ss.util.CellRangeAddress;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -943,6 +940,7 @@ public class StoreEmployeeService {
|
|
|
|
|
//初始化导购对象
|
|
|
|
|
com.kiisoo.ic.store.entity.PoiStoreStaffVO poiStoreStaffVO = new com.kiisoo.ic.store.entity.PoiStoreStaffVO();
|
|
|
|
|
//店铺code
|
|
|
|
|
dataRow.getCell(0).setCellType(CellType.STRING);
|
|
|
|
|
String shopCode = dataRow.getCell(0).getStringCellValue();
|
|
|
|
|
if (StringUtils.isBlank(shopCode)) {
|
|
|
|
|
getReason(row, "未填写店铺Code", results);
|
|
|
|
@ -959,6 +957,7 @@ public class StoreEmployeeService {
|
|
|
|
|
poiStoreStaffVO.setStoreId(poiStore.getId());
|
|
|
|
|
|
|
|
|
|
//获取员工名
|
|
|
|
|
dataRow.getCell(1).setCellType(CellType.STRING);
|
|
|
|
|
String name = dataRow.getCell(1).getStringCellValue();
|
|
|
|
|
if (StringUtils.isBlank(name)) {
|
|
|
|
|
getReason(row, "未填写推广人员名称", results);
|
|
|
|
@ -966,7 +965,7 @@ public class StoreEmployeeService {
|
|
|
|
|
}
|
|
|
|
|
poiStoreStaffVO.setName(name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataRow.getCell(2).setCellType(CellType.STRING);
|
|
|
|
|
String mobile = dataRow.getCell(2).getStringCellValue();
|
|
|
|
|
if (StringUtils.isBlank(mobile)) {
|
|
|
|
|
getReason(row, "未填写手机号", results);
|
|
|
|
@ -974,6 +973,7 @@ public class StoreEmployeeService {
|
|
|
|
|
}
|
|
|
|
|
poiStoreStaffVO.setMobil(mobile);
|
|
|
|
|
|
|
|
|
|
dataRow.getCell(3).setCellType(CellType.STRING);
|
|
|
|
|
String staffCode = dataRow.getCell(3).getStringCellValue();
|
|
|
|
|
if (StringUtils.isBlank(staffCode)) {
|
|
|
|
|
getReason(row, "未填写工号", results);
|
|
|
|
@ -981,6 +981,7 @@ public class StoreEmployeeService {
|
|
|
|
|
}
|
|
|
|
|
poiStoreStaffVO.setStaffCode(staffCode);
|
|
|
|
|
|
|
|
|
|
dataRow.getCell(4).setCellType(CellType.STRING);
|
|
|
|
|
String roleCode = dataRow.getCell(4).getStringCellValue();
|
|
|
|
|
if (StringUtils.isBlank(roleCode)) {
|
|
|
|
|
getReason(row, "未填写角色", results);
|
|
|
|
@ -988,6 +989,12 @@ public class StoreEmployeeService {
|
|
|
|
|
}
|
|
|
|
|
poiStoreStaffVO.setRole(roleCode);
|
|
|
|
|
|
|
|
|
|
if ("DZ-DIANZHANG".equals(roleCode)) {
|
|
|
|
|
poiStoreStaffVO.setType(1L);
|
|
|
|
|
}else{
|
|
|
|
|
poiStoreStaffVO.setType(4L);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String returnCode = poiStoreStaffService.addStaff(poiStoreStaffVO);
|
|
|
|
|
switch (returnCode){
|
|
|
|
|
case "0001":
|
|
|
|
|