BUG修复
This commit is contained in:
parent
083db39f58
commit
68ae1c03fd
|
|
@ -545,7 +545,9 @@ BEGIN
|
|||
and job_id=_fobjid;
|
||||
|
||||
|
||||
set _fonjob=10;
|
||||
select count(1) into _fonjob from hrmresource where status<=3
|
||||
and departmentid=(select id from hrmdepartment where uuid=(select uuid from JCL_ORG_DEPT where id=new.PARENT_DEPT))
|
||||
and jobtitle in (select id from hrmjobtitles where JOBTITLENAME=new.JOB_NAME);
|
||||
|
||||
|
||||
set _fisvitual=0;
|
||||
|
|
@ -631,7 +633,9 @@ begin
|
|||
and job_id=_fobjid;
|
||||
|
||||
|
||||
set _fonjob=10;
|
||||
select count(1) into _fonjob from hrmresource where status<=3
|
||||
and departmentid=(select id from hrmdepartment where uuid=(select uuid from JCL_ORG_DEPT where id=new.PARENT_DEPT))
|
||||
and jobtitle in (select id from hrmjobtitles where JOBTITLENAME=new.JOB_NAME);
|
||||
|
||||
|
||||
set _fisvitual=0;
|
||||
|
|
@ -1049,4 +1053,12 @@ select a.id+300000000,4,a.id,a.id,a.uuid,0,'行政维度',a.workcode,a.lastname,
|
|||
from hrmresource a
|
||||
left join hrmjobtitles b on a.jobtitle=b.id
|
||||
left join cus_fielddata c on a.id=c.id and c.scope='HrmCustomFieldByInfoType' and c.scopeid=-1
|
||||
where a.status<4;
|
||||
where a.status<4;
|
||||
|
||||
insert into jcl_org_map
|
||||
(id,ftype,fobjid,fecid,Uuid,fclass,fclassname,fnumber,fname,fleader,fleaderimg,
|
||||
fleadername,fleaderjobid,fleaderjob,fleaderlv,fleaderst,fparentid,fobjparentid,
|
||||
fplan,fonjob,fisvitual,fdatebegin,fdateend)
|
||||
select 0,0,0,1,uuid,0,'行政维度','00',companyname,0,'',
|
||||
'',0,'','','',-1,0,
|
||||
0,0,0,cast(now() as date),'2099-12-31' from HrmCompany;
|
||||
|
|
@ -379,6 +379,7 @@ create trigger JCL_ORG_job_ed on JCL_ORG_job after update,insert as
|
|||
declare @fdatebegin date
|
||||
declare @fdateend date
|
||||
declare @delete int
|
||||
declare @parentdept int
|
||||
|
||||
declare @st int
|
||||
|
||||
|
|
@ -395,7 +396,7 @@ create trigger JCL_ORG_job_ed on JCL_ORG_job after update,insert as
|
|||
select @fobjid=id,@id=id+@sj,@fnumber=job_no,@fname=job_name,
|
||||
@fparentid=(case isnull(parent_job,0) when 0 then parent_dept+@st else parent_job+@sj end),
|
||||
@fobjparentid=(case isnull(parent_job,0) when 0 then parent_dept else parent_job end),
|
||||
@delete=isnull(forbidden_tag,0)
|
||||
@delete=isnull(forbidden_tag,0),@parentdept=parent_dept
|
||||
from inserted
|
||||
|
||||
|
||||
|
|
@ -415,7 +416,9 @@ create trigger JCL_ORG_job_ed on JCL_ORG_job after update,insert as
|
|||
and job_id=@fobjid
|
||||
|
||||
|
||||
set @fonjob=10
|
||||
select @fonjob=count(1) from hrmresource where status<=3
|
||||
and departmentid=(select id from hrmdepartment where uuid=(select uuid from JCL_ORG_DEPT where id=@parentdept))
|
||||
and jobtitle in (select id from hrmjobtitles where JOBTITLENAME=@fname);
|
||||
|
||||
|
||||
set @fisvitual=0
|
||||
|
|
@ -770,4 +773,13 @@ from hrmresource a
|
|||
left join hrmjobtitles b on a.jobtitle=b.id
|
||||
left join cus_fielddata c on a.id=c.id and c.scope='HrmCustomFieldByInfoType' and c.scopeid=-1
|
||||
where a.status<4
|
||||
GO
|
||||
|
||||
insert into jcl_org_map
|
||||
(id,ftype,fobjid,fecid,Uuid,fclass,fclassname,fnumber,fname,fleader,fleaderimg,
|
||||
fleadername,fleaderjobid,fleaderjob,fleaderlv,fleaderst,fparentid,fobjparentid,
|
||||
fplan,fonjob,fisvitual,fdatebegin,fdateend)
|
||||
select 0,0,0,1,uuid,0,'行政维度','00',companyname,0,'',
|
||||
'',0,'','','',-1,0,
|
||||
0,0,0,cast(getdate() as date),'2099-12-31' from HrmCompany
|
||||
GO
|
||||
|
|
@ -1,51 +1,51 @@
|
|||
//package com.api.organization.listener;
|
||||
//
|
||||
//
|
||||
//import com.sun.jersey.api.model.AbstractResourceModelContext;
|
||||
//import com.sun.jersey.api.model.AbstractResourceModelListener;
|
||||
//import com.weaver.upgrade.FunctionUpgradeUtil;
|
||||
//import org.apache.commons.lang3.StringUtils;
|
||||
//import weaver.conn.RecordSet;
|
||||
//import weaver.general.BaseBean;
|
||||
//import weaver.system.License;
|
||||
//
|
||||
//import javax.ws.rs.ext.Provider;
|
||||
//
|
||||
//@Provider
|
||||
//public class InitListener implements AbstractResourceModelListener {
|
||||
// @Override
|
||||
// public void onLoaded(AbstractResourceModelContext abstractResourceModelContext) {
|
||||
// int menuid = 100139;
|
||||
// BaseBean bb = new BaseBean();
|
||||
// String cId = new License().getCId();
|
||||
// String defaultCloseNonStandard149 = bb.getPropValue("hrmOrganization", "defaultCloseNonStandard149");
|
||||
// if(StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard149)) {
|
||||
// int cid = Integer.parseInt(cId);
|
||||
// if(!hasMenuInfo(cid, "left", menuid)) {
|
||||
// bb.writeLog("149新薪酬管理 添加默认菜单控制");
|
||||
// insertMenuInfo(cid, "left", menuid);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void insertMenuInfo(int cid,String type,int id){
|
||||
// RecordSet rs = new RecordSet();
|
||||
// BaseBean bb = new BaseBean();
|
||||
// bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
// String sql ="INSERT INTO menucontrollist (type,menuid,isopen) VALUES('"+type+"','"+FunctionUpgradeUtil.getMenuId(cid,id)+"','"+FunctionUpgradeUtil.getMenuStatus(id,-1,cid)+"')";
|
||||
// rs.execute(sql);
|
||||
// }
|
||||
//
|
||||
// private boolean hasMenuInfo(int cid, String type, int id) {
|
||||
// RecordSet rs = new RecordSet();
|
||||
// String sql = "select count(1) as count from menucontrollist where type = ? and menuid = ?";
|
||||
// rs.executeQuery(sql,type, FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
// if(rs.next()) {
|
||||
// int count = rs.getInt("count");
|
||||
// if(count > 0) {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
package com.api.organization.listener;
|
||||
|
||||
|
||||
import com.sun.jersey.api.model.AbstractResourceModelContext;
|
||||
import com.sun.jersey.api.model.AbstractResourceModelListener;
|
||||
import com.weaver.upgrade.FunctionUpgradeUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.system.License;
|
||||
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
||||
@Provider
|
||||
public class InitListener implements AbstractResourceModelListener {
|
||||
@Override
|
||||
public void onLoaded(AbstractResourceModelContext abstractResourceModelContext) {
|
||||
int menuid = 100139;
|
||||
BaseBean bb = new BaseBean();
|
||||
String cId = new License().getCId();
|
||||
String defaultCloseNonStandard151 = bb.getPropValue("hrmOrganization", "defaultCloseNonStandard151");
|
||||
if(StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard151)) {
|
||||
int cid = Integer.parseInt(cId);
|
||||
if(!hasMenuInfo(cid, "left", menuid)) {
|
||||
bb.writeLog("151组织管理 添加默认菜单控制");
|
||||
insertMenuInfo(cid, "left", menuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void insertMenuInfo(int cid,String type,int id){
|
||||
RecordSet rs = new RecordSet();
|
||||
BaseBean bb = new BaseBean();
|
||||
bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
String sql ="INSERT INTO menucontrollist (type,menuid,isopen) VALUES('"+type+"','"+FunctionUpgradeUtil.getMenuId(cid,id)+"','"+FunctionUpgradeUtil.getMenuStatus(id,-1,cid)+"')";
|
||||
rs.execute(sql);
|
||||
}
|
||||
|
||||
private boolean hasMenuInfo(int cid, String type, int id) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql = "select count(1) as count from menucontrollist where type = ? and menuid = ?";
|
||||
rs.executeQuery(sql,type, FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
if(rs.next()) {
|
||||
int count = rs.getInt("count");
|
||||
if(count > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,15 +183,15 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
// 方案
|
||||
SearchConditionItem planIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "方案", "161", "planId", "staffPlanBrowser");
|
||||
planIdItem.setRules("required|string");
|
||||
//planIdItem.setRules("required|string");
|
||||
// 分部
|
||||
SearchConditionItem compIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "分部", "161", "compId", "compBrowser");
|
||||
compIdItem.setRules("required|string");
|
||||
SearchConditionItem compIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "分部", "161", "compId", "compBrowser");
|
||||
//compIdItem.setRules("required|string");
|
||||
// 部门
|
||||
SearchConditionItem deptIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "部门", "161", "deptId", "deptBrowser");
|
||||
deptIdItem.setRules("required|string");
|
||||
SearchConditionItem deptIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门", "161", "deptId", "deptBrowser");
|
||||
//deptIdItem.setRules("required|string");
|
||||
// 岗位
|
||||
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "岗位", "666", "jobId", "");
|
||||
SearchConditionItem jobIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位", "666", "jobId", "");
|
||||
jobIdItem.setRules("required|string");
|
||||
BrowserBean browserBean = jobIdItem.getBrowserConditionParam();
|
||||
String s = JSONObject.toJSONString(browserBean);
|
||||
|
|
|
|||
Loading…
Reference in New Issue