组织架构图

pull/219/head
Chengliang 2 years ago
parent 9f41a40d6e
commit e6ded7373c

@ -644,7 +644,7 @@ public class ChartServiceImpl extends Service implements ChartService {
jobSql.append("select count(1) as count from hrmresource where status < 4 and subcompanyid1 in (").append(value).append(")"); jobSql.append("select count(1) as count from hrmresource where status < 4 and subcompanyid1 in (").append(value).append(")");
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" + staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
" on a.plan_id = b.id\n" + " on a.plan_id = b.id\n" +
" and a.ec_company = ? and a.ec_department is null\n" + " and a.ec_company = ? and a.ec_department is null and a.delete_type = 0\n" +
" and b.plan_year = ?"); " and b.plan_year = ?");
}else { }else {
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId())); dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
@ -652,7 +652,7 @@ public class ChartServiceImpl extends Service implements ChartService {
jobSql.append("select count(1) as count from hrmresource where status < 4 and departmentid in (").append(value).append(")"); jobSql.append("select count(1) as count from hrmresource where status < 4 and departmentid in (").append(value).append(")");
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" + staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
" on a.plan_id = b.id\n" + " on a.plan_id = b.id\n" +
" and a.ec_department = ? and a.job_id is null\n" + " and a.ec_department = ? and a.job_id is null and a.delete_type = 0\n" +
" and b.plan_year = ?"); " and b.plan_year = ?");
} }
@ -663,6 +663,8 @@ public class ChartServiceImpl extends Service implements ChartService {
rs.executeQuery(staffSql.toString(),stp.getDataId(),OrganizationDateUtil.getFormatYear(new Date())); rs.executeQuery(staffSql.toString(),stp.getDataId(),OrganizationDateUtil.getFormatYear(new Date()));
if (rs.next()) { if (rs.next()) {
stp.setStaffNum(Util.getIntValue(rs.getString("staff_num"))); stp.setStaffNum(Util.getIntValue(rs.getString("staff_num")));
}else {
stp.setStaffNum(0);
} }
return stp; return stp;

@ -31,6 +31,7 @@ import com.engine.organization.util.browser.OrganizationBrowserUtil;
import com.engine.organization.util.db.DBType; import com.engine.organization.util.db.DBType;
import com.engine.organization.util.db.MapperProxyFactory; import com.engine.organization.util.db.MapperProxyFactory;
import com.engine.organization.util.excel.ExcelUtil; import com.engine.organization.util.excel.ExcelUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import weaver.conn.RecordSet; import weaver.conn.RecordSet;
@ -285,12 +286,13 @@ public class StaffServiceImpl extends Service implements StaffService {
controlPolicyItem.setRules("required|string"); controlPolicyItem.setRules("required|string");
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 200, "描述说明", "description"); SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 200, "描述说明", "description");
StaffPlanPO staffPlanPO = new StaffPlanPO();
// 编辑状态下赋值操作 // 编辑状态下赋值操作
String id = Util.null2String(params.get("id")); String id = Util.null2String(params.get("id"));
if (!StringUtil.isEmpty(id)) { if (!StringUtil.isEmpty(id)) {
StaffPO staffPO = getStaffMapper().getStaffByID(Integer.parseInt(id)); StaffPO staffPO = getStaffMapper().getStaffByID(Integer.parseInt(id));
OrganizationAssert.notNull(staffPO, "选择的数据不存在,或数据已删除"); OrganizationAssert.notNull(staffPO, "选择的数据不存在,或数据已删除");
staffPlanPO = getStaffPlanMapper().getStaffPlanByID(staffPO.getPlanId());
BrowserBean planIdItemBean = planIdItem.getBrowserConditionParam(); BrowserBean planIdItemBean = planIdItem.getBrowserConditionParam();
List<Map<String, Object>> planIdMaps = getStaffPlanMapper().listPlansByIds(DeleteParam.builder().ids(staffPO.getPlanId().toString()).build().getIds()); List<Map<String, Object>> planIdMaps = getStaffPlanMapper().listPlansByIds(DeleteParam.builder().ids(staffPO.getPlanId().toString()).build().getIds());
@ -317,9 +319,16 @@ public class StaffServiceImpl extends Service implements StaffService {
descriptionItem.setValue(staffPO.getDescription()); descriptionItem.setValue(staffPO.getDescription());
} }
selectItems.add(planIdItem); selectItems.add(planIdItem);
selectItems.add(ecCompanyItem); if (StringUtil.isEmpty(id) || "1".equals(staffPlanPO.getControlDimension())) {
selectItems.add(ecDepartmentItem); selectItems.add(ecCompanyItem);
selectItems.add(jobIdItem); }
if (StringUtil.isEmpty(id) || "2".equals(staffPlanPO.getControlDimension())) {
selectItems.add(ecDepartmentItem);
}
if (StringUtil.isEmpty(id) || "3".equals(staffPlanPO.getControlDimension())) {
selectItems.add(jobIdItem);
}
selectItems.add(staffNumItem); selectItems.add(staffNumItem);
selectItems.add(controlPolicyItem); selectItems.add(controlPolicyItem);
selectItems.add(descriptionItem); selectItems.add(descriptionItem);

Loading…
Cancel
Save