|
|
|
@ -179,8 +179,6 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
}
|
|
|
|
|
// 更新主表
|
|
|
|
|
int updateStaff = getStaffMapper().updateStaff(staffPO);
|
|
|
|
|
// 同步组织架构图编制信息
|
|
|
|
|
//new StaffTriggerRunnable(staffPO).run();
|
|
|
|
|
return updateStaff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -189,12 +187,7 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
public int deleteByIds(Collection<Long> ids) {
|
|
|
|
|
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
|
|
|
|
OrganizationAssert.notEmpty(ids, SystemEnv.getHtmlLabelName(547138,user.getLanguage()));
|
|
|
|
|
List<StaffPO> staffsByIds = getStaffMapper().getStaffsByIds(ids);
|
|
|
|
|
int deleteByIds = getStaffMapper().deleteByIds(ids);
|
|
|
|
|
//for (StaffPO staffsById : staffsByIds) {
|
|
|
|
|
// new StaffTriggerRunnable(staffsById).run();
|
|
|
|
|
//}
|
|
|
|
|
return deleteByIds;
|
|
|
|
|
return getStaffMapper().deleteByIds(ids);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -205,32 +198,31 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 分部
|
|
|
|
|
SearchConditionItem compIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "分部", "164", "ecCompany", "");
|
|
|
|
|
SearchConditionItem compIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547332, "164", "ecCompany", "");
|
|
|
|
|
// 部门
|
|
|
|
|
SearchConditionItem deptIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门", "4", "ecDepartment", "");
|
|
|
|
|
SearchConditionItem deptIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547331, "4", "ecDepartment", "");
|
|
|
|
|
// 岗位
|
|
|
|
|
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位", "666", "jobId", "");
|
|
|
|
|
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547333, "666", "jobId", "");
|
|
|
|
|
// 编制数
|
|
|
|
|
SearchConditionItem staffNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, "编制数", "staffNum");
|
|
|
|
|
SearchConditionItem staffNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, 547345, "staffNum");
|
|
|
|
|
// 在编
|
|
|
|
|
SearchConditionItem permanentNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, "在编", "permanentNum");
|
|
|
|
|
SearchConditionItem permanentNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, 547346, "permanentNum");
|
|
|
|
|
// 冻结数
|
|
|
|
|
SearchConditionItem freezeNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, "冻结数", "freezeNum");
|
|
|
|
|
SearchConditionItem freezeNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 2, 547347, "freezeNum");
|
|
|
|
|
// 缺编状态
|
|
|
|
|
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
|
|
|
|
SearchConditionOption lackOption = new SearchConditionOption("1", "缺编");
|
|
|
|
|
SearchConditionOption fullOption = new SearchConditionOption("2", "满员");
|
|
|
|
|
SearchConditionOption overOption = new SearchConditionOption("3", "超编");
|
|
|
|
|
SearchConditionOption lackOption = new SearchConditionOption("1", SystemEnv.getHtmlLabelName(547351,user.getLanguage()));
|
|
|
|
|
SearchConditionOption fullOption = new SearchConditionOption("2", SystemEnv.getHtmlLabelName(547350,user.getLanguage()));
|
|
|
|
|
SearchConditionOption overOption = new SearchConditionOption("3", SystemEnv.getHtmlLabelName(547352,user.getLanguage()));
|
|
|
|
|
selectOptions.add(lackOption);
|
|
|
|
|
selectOptions.add(fullOption);
|
|
|
|
|
selectOptions.add(overOption);
|
|
|
|
|
SearchConditionItem lackStatusItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "缺编状态", "lackStatus");
|
|
|
|
|
SearchConditionItem lackStatusItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, 547348, "lackStatus");
|
|
|
|
|
// 编制描述
|
|
|
|
|
SearchConditionItem staffDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编制描述", "staffDesc");
|
|
|
|
|
SearchConditionItem staffDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547349, "staffDesc");
|
|
|
|
|
// 说明
|
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "说明", "description");
|
|
|
|
|
SearchConditionItem descriptionItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547142, "description");
|
|
|
|
|
|
|
|
|
|
//conditionItems.add(planIdItem);
|
|
|
|
|
conditionItems.add(compIdItem);
|
|
|
|
|
conditionItems.add(deptIdItem);
|
|
|
|
|
conditionItems.add(jobIdItem);
|
|
|
|
@ -253,16 +245,16 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
List<SearchConditionItem> selectItems = new ArrayList<>();
|
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
|
|
|
|
// 方案
|
|
|
|
|
SearchConditionItem planIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "方案", "161", "planId", "staffPlanBrowser");
|
|
|
|
|
SearchConditionItem planIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547344, "161", "planId", "staffPlanBrowser");
|
|
|
|
|
planIdItem.setRules("required|string");
|
|
|
|
|
planIdItem.setIsQuickSearch(false);
|
|
|
|
|
planIdItem.setEntSearch(false);
|
|
|
|
|
// 分部
|
|
|
|
|
SearchConditionItem ecCompanyItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "分部", "164", "ecCompany", "compBrowser");
|
|
|
|
|
SearchConditionItem ecCompanyItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547332, "164", "ecCompany", "compBrowser");
|
|
|
|
|
// 部门
|
|
|
|
|
SearchConditionItem ecDepartmentItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门", "4", "ecDepartment", "deptBrowser");
|
|
|
|
|
SearchConditionItem ecDepartmentItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547331, "4", "ecDepartment", "deptBrowser");
|
|
|
|
|
// 岗位
|
|
|
|
|
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位", "666", "jobId", "");
|
|
|
|
|
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547333, "666", "jobId", "");
|
|
|
|
|
BrowserBean browserBean = jobIdItem.getBrowserConditionParam();
|
|
|
|
|
String s = JSONObject.toJSONString(browserBean);
|
|
|
|
|
CustomBrowserBean customBrowserBean = JSONObject.parseObject(s, CustomBrowserBean.class);
|
|
|
|
@ -271,18 +263,18 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
jobIdItem.setBrowserConditionParam(customBrowserBean);
|
|
|
|
|
|
|
|
|
|
// 编制数
|
|
|
|
|
SearchConditionItem staffNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 3, "编制数", "staffNum");
|
|
|
|
|
SearchConditionItem staffNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 3, 547345, "staffNum");
|
|
|
|
|
staffNumItem.setRules("required");
|
|
|
|
|
staffNumItem.setMin("0");
|
|
|
|
|
// 控制策略
|
|
|
|
|
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
|
|
|
|
SearchConditionOption option1 = new SearchConditionOption("1", "弱控");
|
|
|
|
|
SearchConditionOption option2 = new SearchConditionOption("2", "强控");
|
|
|
|
|
SearchConditionOption option3 = new SearchConditionOption("3", "不控");
|
|
|
|
|
SearchConditionOption option1 = new SearchConditionOption("1", SystemEnv.getHtmlLabelName(547454,user.getLanguage()));
|
|
|
|
|
SearchConditionOption option2 = new SearchConditionOption("2", SystemEnv.getHtmlLabelName(547455,user.getLanguage()));
|
|
|
|
|
SearchConditionOption option3 = new SearchConditionOption("3", SystemEnv.getHtmlLabelName(547456,user.getLanguage()));
|
|
|
|
|
selectOptions.add(option1);
|
|
|
|
|
selectOptions.add(option2);
|
|
|
|
|
selectOptions.add(option3);
|
|
|
|
|
SearchConditionItem controlPolicyItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "控制策略", "controlPolicy");
|
|
|
|
|
SearchConditionItem controlPolicyItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, 547457, "controlPolicy");
|
|
|
|
|
controlPolicyItem.setViewAttr(3);
|
|
|
|
|
controlPolicyItem.setValue("1");
|
|
|
|
|
controlPolicyItem.setRules("required|string");
|
|
|
|
@ -340,11 +332,11 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
item.setViewAttr(1);
|
|
|
|
|
item.setRules(null);
|
|
|
|
|
});
|
|
|
|
|
SearchConditionItem changeNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 3, "调整数量", "changeNum");
|
|
|
|
|
changeNumItem.setHelpfulTip("提示:正数为增加,负数为减少编制数");
|
|
|
|
|
SearchConditionItem changeNumItem = OrganizationFormItemUtil.inputNumberItem(user, 2, 16, 3, 547357, "changeNum");
|
|
|
|
|
changeNumItem.setHelpfulTip(SystemEnv.getHtmlLabelName(547359,user.getLanguage()));
|
|
|
|
|
staffNumItem.setRules("required");
|
|
|
|
|
selectItems.add(changeNumItem);
|
|
|
|
|
SearchConditionItem changeDescriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, false, 2, 50, "变更说明", "changeDescription");
|
|
|
|
|
SearchConditionItem changeDescriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, false, 2, 50, 547358, "changeDescription");
|
|
|
|
|
selectItems.add(changeDescriptionItem);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -363,9 +355,9 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
|
|
|
|
List<SearchConditionItem> selectItems = new ArrayList<>();
|
|
|
|
|
// 方案
|
|
|
|
|
SearchConditionItem planIdItem = OrganizationFormItemUtil.browserItem(user, 4, 3, 2, false, "编制方案", "162", "planId", "staffPlanBrowser");
|
|
|
|
|
SearchConditionItem planIdItem = OrganizationFormItemUtil.browserItem(user, 4, 3, 2, false, 547459, "162", "planId", "staffPlanBrowser");
|
|
|
|
|
planIdItem.setRules("required|string");
|
|
|
|
|
planIdItem.setHelpfulTip("请选择编制方案后查看数据");
|
|
|
|
|
planIdItem.setHelpfulTip(SystemEnv.getHtmlLabelName(547343,user.getLanguage()));
|
|
|
|
|
planIdItem.setLabelcol(2);
|
|
|
|
|
|
|
|
|
|
selectItems.add(planIdItem);
|
|
|
|
@ -456,11 +448,11 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
StaffPlanPO staffPlanByID = getStaffPlanMapper().getStaffPlanByID(staffPO.getPlanId());
|
|
|
|
|
switch (staffPlanByID.getControlDimension()) {
|
|
|
|
|
case "1":// 分部
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getEcCompany(), "编制维度选择分部时,分部必填!");
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getEcCompany(), SystemEnv.getHtmlLabelName(547461,user.getLanguage()));
|
|
|
|
|
staffPO.setCompId(staffPO.getEcCompany());
|
|
|
|
|
break;
|
|
|
|
|
case "2":// 部门
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getEcDepartment(), "编制维度选择部门时,部门必填!");
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getEcDepartment(), SystemEnv.getHtmlLabelName(547460,user.getLanguage()));
|
|
|
|
|
DepartmentPO jclDepartmentId = getDepartmentMapper().getDeptById(staffPO.getEcDepartment());
|
|
|
|
|
if (null != jclDepartmentId) {
|
|
|
|
|
staffPO.setDeptId(jclDepartmentId.getId());
|
|
|
|
@ -469,7 +461,7 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "3": // 岗位
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getJobId(), "编制维度选择岗位时,岗位必填!");
|
|
|
|
|
OrganizationAssert.notNull(staffPO.getJobId(), SystemEnv.getHtmlLabelName(547462,user.getLanguage()));
|
|
|
|
|
JobPO jobById = getJobMapper().getJobById(Long.valueOf(staffPO.getJobId()));
|
|
|
|
|
if (null != jobById) {
|
|
|
|
|
staffPO.setDeptId(jobById.getEcDepartment());
|
|
|
|
|