一般作业人员岗位添加
This commit is contained in:
parent
bf27ab07f8
commit
862d54eaab
|
|
@ -22,6 +22,11 @@ public class Constants {
|
||||||
*/
|
*/
|
||||||
public static final String TEAM_TECHNICAL = "0900103";
|
public static final String TEAM_TECHNICAL = "0900103";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一般作业人员
|
||||||
|
*/
|
||||||
|
public static final String REGULAR_WORKER = "0900104";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特种作业人员
|
* 特种作业人员
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.bonus.base.config.Constants.TEAM_LEADER;
|
import static com.bonus.base.config.Constants.*;
|
||||||
import static com.bonus.base.config.Constants.TEAM_SAFETY;
|
|
||||||
import static com.bonus.base.config.Constants.TEAM_TECHNICAL;
|
|
||||||
import static com.bonus.base.config.Constants.SPECIALIZED_WORKER;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员管理(TbPeople)表控制层
|
* 人员管理(TbPeople)表控制层
|
||||||
|
|
@ -121,6 +118,8 @@ public class TbPeopleController extends BaseController {
|
||||||
people.setPostCode("班组技术员");
|
people.setPostCode("班组技术员");
|
||||||
} else if (SPECIALIZED_WORKER.equals(people.getPostCode())){
|
} else if (SPECIALIZED_WORKER.equals(people.getPostCode())){
|
||||||
people.setPostCode("特种作业人员");
|
people.setPostCode("特种作业人员");
|
||||||
|
} else if (REGULAR_WORKER.equals(people.getPostCode())) {
|
||||||
|
people.setPostCode("一般作业人员");
|
||||||
} else {
|
} else {
|
||||||
people.setPostCode("未知岗位");
|
people.setPostCode("未知岗位");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,7 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
||||||
*/
|
*/
|
||||||
private void checkPostCode(String cellValue, int rowIndex, int colIndex) {
|
private void checkPostCode(String cellValue, int rowIndex, int colIndex) {
|
||||||
if (!Constants.TEAM_LEADER.equals(cellValue) && !Constants.TEAM_SAFETY.equals(cellValue) && !Constants.TEAM_TECHNICAL.equals(cellValue)
|
if (!Constants.TEAM_LEADER.equals(cellValue) && !Constants.TEAM_SAFETY.equals(cellValue) && !Constants.TEAM_TECHNICAL.equals(cellValue)
|
||||||
&& !Constants.SPECIALIZED_WORKER.equals(cellValue)) {
|
&& !Constants.REGULAR_WORKER.equals(cellValue) && !Constants.SPECIALIZED_WORKER.equals(cellValue)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
String.format("第 %d 行,第 %d 列岗位编码格式不正确,请检查后重新导入", rowIndex + 1, colIndex + 1));
|
String.format("第 %d 行,第 %d 列岗位编码格式不正确,请检查后重新导入", rowIndex + 1, colIndex + 1));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue