|
|
|
@ -14,7 +14,6 @@ import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
|
import com.engine.organization.entity.DeleteParam;
|
|
|
|
|
import com.engine.organization.entity.browser.po.CustomBrowserBean;
|
|
|
|
|
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
|
|
|
|
import com.engine.organization.entity.commom.RecordInfo;
|
|
|
|
|
import com.engine.organization.entity.company.bo.CompBO;
|
|
|
|
|
import com.engine.organization.entity.company.po.CompPO;
|
|
|
|
|
import com.engine.organization.entity.department.bo.DepartmentBO;
|
|
|
|
@ -29,8 +28,6 @@ import com.engine.organization.entity.job.po.JobPO;
|
|
|
|
|
import com.engine.organization.entity.scheme.po.GradePO;
|
|
|
|
|
import com.engine.organization.entity.searchtree.SearchTree;
|
|
|
|
|
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
|
|
|
|
import com.engine.organization.enums.LogModuleNameEnum;
|
|
|
|
|
import com.engine.organization.enums.OperateTypeEnum;
|
|
|
|
|
import com.engine.organization.exception.OrganizationRunTimeException;
|
|
|
|
|
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
|
|
|
|
|
import com.engine.organization.mapper.comp.CompMapper;
|
|
|
|
@ -38,13 +35,11 @@ import com.engine.organization.mapper.department.DepartmentMapper;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtDTMapper;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtMapper;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtendTitleMapper;
|
|
|
|
|
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
|
|
|
|
import com.engine.organization.mapper.job.JobMapper;
|
|
|
|
|
import com.engine.organization.mapper.resource.ResourceMapper;
|
|
|
|
|
import com.engine.organization.mapper.scheme.GradeMapper;
|
|
|
|
|
import com.engine.organization.service.ExtService;
|
|
|
|
|
import com.engine.organization.service.JobService;
|
|
|
|
|
import com.engine.organization.thread.OrganizationSyncEc;
|
|
|
|
|
import com.engine.organization.util.*;
|
|
|
|
|
import com.engine.organization.util.coderule.CodeRuleUtil;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
@ -102,7 +97,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
|
|
|
|
|
private static final String RIGHT_NAME = "Job:All";
|
|
|
|
|
|
|
|
|
|
public static final String JOB_ACTIVITY_ID;
|
|
|
|
|
//public static final String JOB_ACTIVITY_ID;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 岗位主表title指定ID
|
|
|
|
@ -134,10 +129,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static {
|
|
|
|
|
RecordInfo hrmJobActivity = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmObjectByUUID("hrmjobactivities", "3a2efce3-95de-4ec2-afe1-347783817bdb");
|
|
|
|
|
JOB_ACTIVITY_ID = hrmJobActivity.getId();
|
|
|
|
|
}
|
|
|
|
|
//static {
|
|
|
|
|
// RecordInfo hrmJobActivity = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmObjectByUUID("hrmjobactivities", "3a2efce3-95de-4ec2-afe1-347783817bdb");
|
|
|
|
|
// JOB_ACTIVITY_ID = hrmJobActivity.getId();
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> getSearchTree(SearchTreeParams params) {
|
|
|
|
@ -371,8 +366,8 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
}
|
|
|
|
|
params.put("show_order", maxShowOrder + 1);
|
|
|
|
|
}
|
|
|
|
|
params.put("jobactivityid", JOB_ACTIVITY_ID);
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, params).sync();
|
|
|
|
|
//params.put("jobactivityid", JOB_ACTIVITY_ID);
|
|
|
|
|
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, params).sync();
|
|
|
|
|
return getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -408,8 +403,8 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
params.put("ec_department", jclDepartment.getId());
|
|
|
|
|
params.put("ec_company", jclDepartment.getSubCompanyId1());
|
|
|
|
|
}
|
|
|
|
|
params.put("jobactivityid", JOB_ACTIVITY_ID);
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, params, oldJobPO).sync();
|
|
|
|
|
//params.put("jobactivityid", JOB_ACTIVITY_ID);
|
|
|
|
|
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, params, oldJobPO).sync();
|
|
|
|
|
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", searchParam.getId());
|
|
|
|
|
|
|
|
|
|
JobPO jobById = getJobMapper().getJobById(searchParam.getId());
|
|
|
|
@ -477,7 +472,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
// OrganizationAssert.isTrue(hasResource == 0, "该岗位存在人员,不能封存");
|
|
|
|
|
throw new OrganizationRunTimeException("该岗位不能封存");
|
|
|
|
|
}
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobPO).sync();
|
|
|
|
|
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobPO).sync();
|
|
|
|
|
return getJobMapper().updateForbiddenTagById(jobPO.getId(), jobPO.getForbiddenTag());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -488,7 +483,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
List<JobPO> jobsByIds = getJobMapper().getJobsByIds(ids);
|
|
|
|
|
for (JobPO jobsById : jobsByIds) {
|
|
|
|
|
jobsById.setForbiddenTag(1);
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobsById).sync();
|
|
|
|
|
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobsById).sync();
|
|
|
|
|
// 删除拓展表、明细表
|
|
|
|
|
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_jobext", jobsById.getId());
|
|
|
|
|
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_jobext_dt1", jobsById.getId(), null);
|
|
|
|
@ -571,7 +566,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
|
getJobMapper().updateBaseJob(targetJob);
|
|
|
|
|
//TODO new JobTriggerRunnable(jobById.getId(), targetJob.getId()).run();
|
|
|
|
|
// 原岗位删除
|
|
|
|
|
new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobById).sync();
|
|
|
|
|
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobById).sync();
|
|
|
|
|
getJobMapper().deleteByIds(Collections.singletonList(jobById.getId()));
|
|
|
|
|
// 更新组织架构图
|
|
|
|
|
//TODO new JobTriggerRunnable(jobById).run();
|
|
|
|
|