Merge pull request '组织架构图' (#219) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/219
This commit is contained in:
commit
9c4e721033
|
|
@ -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(")");
|
||||
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" +
|
||||
" 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 = ?");
|
||||
}else {
|
||||
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(")");
|
||||
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" +
|
||||
" 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 = ?");
|
||||
}
|
||||
|
||||
|
|
@ -663,6 +663,8 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
rs.executeQuery(staffSql.toString(),stp.getDataId(),OrganizationDateUtil.getFormatYear(new Date()));
|
||||
if (rs.next()) {
|
||||
stp.setStaffNum(Util.getIntValue(rs.getString("staff_num")));
|
||||
}else {
|
||||
stp.setStaffNum(0);
|
||||
}
|
||||
|
||||
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.MapperProxyFactory;
|
||||
import com.engine.organization.util.excel.ExcelUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -285,12 +286,13 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
controlPolicyItem.setRules("required|string");
|
||||
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 200, "描述说明", "description");
|
||||
|
||||
|
||||
StaffPlanPO staffPlanPO = new StaffPlanPO();
|
||||
// 编辑状态下赋值操作
|
||||
String id = Util.null2String(params.get("id"));
|
||||
if (!StringUtil.isEmpty(id)) {
|
||||
StaffPO staffPO = getStaffMapper().getStaffByID(Integer.parseInt(id));
|
||||
OrganizationAssert.notNull(staffPO, "选择的数据不存在,或数据已删除");
|
||||
staffPlanPO = getStaffPlanMapper().getStaffPlanByID(staffPO.getPlanId());
|
||||
|
||||
BrowserBean planIdItemBean = planIdItem.getBrowserConditionParam();
|
||||
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());
|
||||
}
|
||||
selectItems.add(planIdItem);
|
||||
selectItems.add(ecCompanyItem);
|
||||
selectItems.add(ecDepartmentItem);
|
||||
selectItems.add(jobIdItem);
|
||||
if (StringUtil.isEmpty(id) || "1".equals(staffPlanPO.getControlDimension())) {
|
||||
selectItems.add(ecCompanyItem);
|
||||
}
|
||||
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(controlPolicyItem);
|
||||
selectItems.add(descriptionItem);
|
||||
|
|
|
|||
Loading…
Reference in New Issue