|
|
|
@ -11,7 +11,6 @@ import com.engine.organization.enums.LogModuleNameEnum;
|
|
|
|
|
import com.engine.organization.enums.OperateTypeEnum;
|
|
|
|
|
import com.engine.organization.mapper.comp.CompMapper;
|
|
|
|
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtMapper;
|
|
|
|
|
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
|
|
|
|
import com.engine.organization.mapper.job.JobMapper;
|
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
|
@ -42,20 +41,10 @@ public class OrganizationSyncEc {
|
|
|
|
|
Map<String, Object> resultMap;
|
|
|
|
|
private boolean throwException = true;
|
|
|
|
|
|
|
|
|
|
private static final String HRM_COMPANY = "hrmsubcompany";
|
|
|
|
|
private static final String HRM_DEPARTMENT = "hrmdepartment";
|
|
|
|
|
|
|
|
|
|
private static final String JCL_COMPANY = "jcl_org_comp";
|
|
|
|
|
private static final String JCL_DEPARTMENT = "jcl_org_dept";
|
|
|
|
|
|
|
|
|
|
private SystemDataMapper getSystemDataMapper() {
|
|
|
|
|
return MapperProxyFactory.getProxy(SystemDataMapper.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private ExtMapper getExtMapper() {
|
|
|
|
|
return MapperProxyFactory.getProxy(ExtMapper.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public OrganizationSyncEc(User user, LogModuleNameEnum moduleName, OperateTypeEnum operateType, Map<String, Object> params) {
|
|
|
|
|
this.moduleName = moduleName;
|
|
|
|
|
this.operateType = operateType;
|
|
|
|
@ -93,7 +82,9 @@ public class OrganizationSyncEc {
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
OrganizationAssert.isTrue(throwException && ("1".equals(Util.null2String(resultMap.get("status"))) || "1".equals(Util.null2String(resultMap.get("sign")))), Util.null2String(resultMap.get("message")));
|
|
|
|
|
if (throwException) {
|
|
|
|
|
OrganizationAssert.isTrue("1".equals(Util.null2String(resultMap.get("status"))) || "1".equals(Util.null2String(resultMap.get("sign"))), Util.null2String(resultMap.get("message")));
|
|
|
|
|
}
|
|
|
|
|
return resultMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -224,7 +215,6 @@ public class OrganizationSyncEc {
|
|
|
|
|
List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIds(oldJobPO.getParentDept(), oldHrmJobTitle.getId());
|
|
|
|
|
getSystemDataMapper().updateResourceJobTitleByIds(Util.null2String(hrmJobTitle.getId()), hrmResourceIds);
|
|
|
|
|
// 封存原名称岗位
|
|
|
|
|
map.clear();
|
|
|
|
|
map.put("ids", oldHrmJobTitle.getId());
|
|
|
|
|
map.put("canceled", "canceled");
|
|
|
|
|
this.resultMap = ServiceUtil.getService(HrmJobServiceImpl.class, user).doCanceled(map, user);
|
|
|
|
|