Merge pull request !193 from dxfeng/feature/dxf
pull/194/MERGE
dxfeng 3 years ago committed by Gitee
commit 7ad378bedd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -33,6 +33,17 @@ INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, d
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '名称', 'post_name', '2', '', 1, uuid(), '0');
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '说明', 'description', '2', '', 2, uuid(), '');
select @current_date:= date_format( now(),'%Y-%m-%d');
select @current_time:= date_format( now(),'%T');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('PostInfoBrowser', '1', '1', '', 'select * from jcl_org_post_info where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '职务信息浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0', uuid(), '', '', '', '', '1', 0, 1);
select @datashowset_id:= max(id) from datashowset;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('PostInfoBrowser', '0', 0, @current_date, @current_time, NULL, NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 1, 1, uuid(), NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 0, 2, uuid(), NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '职务分类', 'post_id', '', 0, 3, uuid(), NULL);
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '编号', 'post_info_no', '2', '', 1, uuid(), '');
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '名称', 'post_info_name', '2', '', 2, uuid(), '');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('compBrowser', '1', '1', '', 'select * from jcl_org_comp where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '2', 'id', 'parent_company', 'comp_name', '', '', '', '', 2, '公司分部浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0', uuid(), '', '', '', '', '2', 0, 1);
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('compBrowser', '0', 0, @current_date, @current_time, NULL, NULL);

@ -28,13 +28,22 @@ INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, d
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(datashowset_id, '名称', 'post_name', '2', '', 1, SYS_GUID(), '0');
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(datashowset_id, '说明', 'description', '2', '', 2, SYS_GUID(), '');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('PostInfoBrowser', '1', '1', '', 'select * from jcl_org_post_info where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '职务信息浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
SELECT max(id) INTO datashowset_id FROM DATASHOWSET;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('PostInfoBrowser', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(datashowset_id, '编号', 'post_info_no', '', 0, 1, SYS_GUID(), NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(datashowset_id, '名称', 'post_info_name', '', 1, 2, SYS_GUID(), NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(datashowset_id, '职务分类', 'post_id', 'select post_name from jcl_org_post where id = {?currentvalue}', 0, 3, SYS_GUID(), NULL);
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(datashowset_id, '编号', 'post_info_no', '2', '', 1, SYS_GUID(), '');
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(datashowset_id, '名称', 'post_info_name', '2', '', 2, SYS_GUID(), '');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('compBrowser', '1', '1', '', 'select * from jcl_org_comp where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '2', 'id', 'parent_company', 'comp_name', '', '', '', '', 2, '公司分部浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '2', 0, 1);
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('compBrowser', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('deptBrowser', '1', '1', '', 'select * from jcl_org_dept where delete_type = 0 and forbidden_tag = 0 ', '', '', '', '', '2', 'id', 'parent_dept', 'dept_name', '', '', '', '', 2, '部门浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '2', 0, 1);
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('deptBrowser', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('sequenceBrowser', '1', '1', '', 'select *,scheme_id as scheme_value from jcl_org_sequence where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '岗位序列', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('sequenceBrowser', '1', '1', '', 'select id,sequence_no,sequence_name, scheme_id,scheme_id as scheme_value from jcl_org_sequence where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '岗位序列', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
SELECT max(id) INTO datashowset_id FROM DATASHOWSET;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('sequenceBrowser', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(datashowset_id, '编号', 'sequence_no', '', 0, 1, SYS_GUID(), NULL);

@ -10,17 +10,31 @@ vleader int;
vdatebegin date;
vplan int;
vonjob int;
vcnt int;
begin
if :new.companyname!=:old.companyname then
select count(1) into vcnt from jcl_info where id=1;
if vcnt=1 then
select to_number(fvalue) into vleader from jcl_info where id=1;
end if;
select count(1) into vcnt from hrmresource where id=vleader;
if vcnt=1 then
select messagerurl,lastname,jobtitle into vleaderimg,vleadername,vleaderjobid
from hrmresource where id=vleader;
end if;
select count(1) into vcnt from hrmjobtitles where id=vleaderjobid;
if vcnt=1 then
select jobtitlemark into vleaderjob from hrmjobtitles where id=vleaderjobid;
end if;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=vleader;
if vcnt=1 then
select nvl(field100008,''),nvl(field100007,'') into vleaderst,vleaderlv from cus_fielddata
where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=vleader;
end if;
vdatebegin:=sysdate;
@ -60,6 +74,7 @@ vdatebegin date;
vobjparentid int;
vplan int;
vonjob int;
vcnt int;
begin
if :new.comp_name!=:old.comp_name or :new.comp_principal!=:old.comp_principal or :new.parent_company!=:old.parent_company
or :new.forbidden_tag!=:old.forbidden_tag or :new.DELETE_TYPE!=:old.DELETE_TYPE then
@ -68,13 +83,28 @@ begin
vparentid:=nvl(:new.parent_company,0);
vobjparentid:=nvl(:new.parent_company,0);
select count(1) into vcnt from HrmSubCompany where uuid=:new.uuid;
if vcnt=1 then
select id into vecid from HrmSubCompany where uuid=:new.uuid;
end if;
select count(1) into vcnt from hrmresource where id=:new.comp_principal;
if vcnt=1 then
select messagerurl,lastname,jobtitle into vleaderimg,vleadername,vleaderjobid from hrmresource where id=:new.comp_principal;
end if;
select count(1) into vcnt from hrmjobtitles where id=vleaderjobid;
if vcnt=1 then
select jobtitlemark into vleaderjob from hrmjobtitles where id=vleaderjobid;
end if;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.comp_principal;
if vcnt=1 then
select nvl(field100008,''),nvl(field100007,'') into vleaderst,vleaderlv from cus_fielddata
where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.comp_principal;
select sum(nvl(staff_num,0)) into vplan from JCL_ORG_STAFF
where plan_id in (select id from JCL_ORG_STAFFPLAN where time_start<=vdatebegin and time_end>=vdatebegin) and comp_id=:new.id;
end if;
select sum(nvl(staff_num,0)) into vplan from JCL_ORG_STAFF;
select count(1) into vonjob from hrmresource where status<=3 and subcompanyid1=vecid;
delete from jcl_org_map where ftype=1 and fobjid=:new.id and fdatebegin=vdatebegin;
@ -108,6 +138,7 @@ st int;
vleaderlv VARCHAR2(255);
vplan int;
vonjob int;
vcnt int;
begin
if :new.dept_name!=:old.dept_name or :new.dept_principal!=:old.dept_principal or :new.parent_comp!=:old.parent_comp
or :new.parent_dept!=:old.parent_dept or :new.forbidden_tag!=:old.forbidden_tag or :new.DELETE_TYPE!=:old.DELETE_TYPE then
@ -126,15 +157,28 @@ else
vobjparentid:=:new.parent_dept+st;
end if;
select count(1) into vcnt from HrmDepartment where uuid=:new.uuid;
if vcnt=1 then
select id into vecid from HrmDepartment where uuid=:new.uuid;
end if;
select count(1) into vcnt from hrmresource where id=:new.dept_principal;
if vcnt=1 then
select messagerurl,lastname,jobtitle into vleaderimg,vleadername,veaderjobid
from hrmresource where id=:new.dept_principal;
end if;
select count(1) into vcnt from hrmjobtitles where id=:new.dept_principal;
if vcnt=1 then
select jobtitlemark into vleaderjob from hrmjobtitles where id=:new.dept_principal;
end if;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.dept_principal;
if vcnt=1 then
select nvl(field100008,''),nvl(field100007,'') into vleaderst,vleaderlv from cus_fielddata
where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.dept_principal;
end if;
select sum(nvl(staff_num,0)) into vplan from JCL_ORG_STAFF
where plan_id in (select id from JCL_ORG_STAFFPLAN where time_start<=vdatebegin and time_end>=vdatebegin) and dept_id=:new.id;
@ -215,6 +259,7 @@ st int;
vleaderlv VARCHAR2(255);
vstr VARCHAR2(255);
vwz int;
vcnt int;
begin
if :new.lastname!=:old.lastname or :new.status!=:old.status then
st:=100000000;
@ -227,17 +272,29 @@ begin
else
vdelete:=1;
end if;
select count(1) into vcnt from hrmjobtitles where id=:new.jobtitle;
if vcnt=1 then
select jobtitlemark into vleaderjob from hrmjobtitles where id=:new.jobtitle;
end if;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.id;
if vcnt=1 then
select nvl(field100008,''),nvl(field100007,'') into vleaderst,vleaderlv from cus_fielddata
where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.id;
end if;
delete from jcl_org_map where ftype=4 and fobjid=:new.id and fdatebegin=vdatebegin;
update jcl_org_map set fdateend=vdatebegin-1 where ftype=4 and fobjid=:new.id and fdateend>vdatebegin;
select nvl(field100002,'') into vstr from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.id;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=-1 and id=:new.id;
if vcnt=1 then
select nvl(field100002,'') into vstr from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=-1 and id=:new.id;
end if;
vwz:=Instr(vstr,'_');
vobjparentid:=to_number(substr(vstr,vwz+1,length(vstr)-vwz));
vparentid:=vobjparentid+sj;
@ -274,6 +331,7 @@ st int;
vleaderlv VARCHAR2(255);
vstr VARCHAR2(255);
vwz int;
vcnt int;
begin
if :new.field100002!=:old.field100002 then
st:=100000000;
@ -281,19 +339,28 @@ begin
sk:=300000000;
vdatebegin:=to_date(sysdate);
select count(1) into vcnt from hrmresource where id=:new.id;
if vcnt=1 then
select workcode,lastname,case when status<=3 then 0 else 1 end,messagerurl,lastname,jobtitle,uuid
into vnumber,vname,vdelete,vleaderimg,vleadername,vleaderjobid,vuuid from hrmresource where id=:new.id;
end if;
select count(1) into vcnt from hrmjobtitles where id=vleaderjobid;
if vcnt=1 then
select jobtitlemark into vleaderjob from hrmjobtitles where id=vleaderjobid;
end if;
select count(1) into vcnt from cus_fielddata where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.id;
if vcnt=1 then
select nvl(field100008,''),nvl(field100007,'') into vleaderst,vleaderlv from cus_fielddata
where scope='HrmCustomFieldByInfoType' and scopeid=3 and id=:new.id;
end if;
vstr:=nvl(:new.field100002,'');
vwz:=Instr(vstr,'_');
vobjparentid:=to_number(substr(vstr,vwz+1,length(vstr)-vwz));
vparentid:=vobjparentid+sj;
delete from jcl_org_map where ftype=4 and fobjid=:new.id and fdatebegin=vdatebegin;
update jcl_org_map set fdateend=vdatebegin-1 where ftype=4 and fobjid=:new.id and fdateend>vdatebegin;
if vdelete=0 then

@ -342,6 +342,8 @@ CREATE TABLE JCL_ORG_JOB (
WORK_AUTHORITY NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
SHOW_ORDER NUMBER NULL,
GRADE_ID NVARCHAR2(100) NULL,
LEVEL_ID NVARCHAR2(100) NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
@ -395,6 +397,10 @@ CREATE TABLE JCL_ORG_JOBEXT_DT1 (
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
POST_ID NVARCHAR2(100) NULL,
POST_INFO_ID NVARCHAR2(100) NULL,
POST_IDSPAN NVARCHAR2(1000) NULL,
POST_INFO_IDSPAN NVARCHAR2(1000) NULL,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (ID)
)
/
@ -515,6 +521,7 @@ CREATE TABLE JCL_ORG_STAFFPLAN (
TIME_START DATE NULL,
TIME_END DATE NULL,
COMPANY_ID NVARCHAR2(100) NULL,
CONTROL_DIMENSION NVARCHAR2(5) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,

@ -49,6 +49,22 @@ INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFI
GO
declare @datashowset_id int
declare @current_date varchar(100)
declare @current_time varchar(100)
select @current_date = CONVERT(varchar(100), GETDATE(), 23)
select @current_time = CONVERT(varchar(100), GETDATE(), 24)
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('PostInfoBrowser', '1', '1', '', 'select * from jcl_org_post_info where delete_type = 0 and forbidden_tag = 0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '职务信息浏览按钮', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0', newid(), '', '', '', '', '1', 0, 1)
set @datashowset_id = (select max(id) from datashowset)
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('PostInfoBrowser', '0', 0, @current_date, @current_time, NULL, NULL)
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '编号', 'post_info_no', '', 1, 1, newid(), NULL)
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '名称', 'post_info_name', '', 0, 2, newid(), NULL)
INSERT INTO datashowparam (MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES(@datashowset_id, '职务分类', 'post_id', '', 0, 3, newid(), NULL)
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '编号', 'post_info_no', '2', '', 1, newid(), '')
INSERT INTO datasearchparam (MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES(@datashowset_id, '名称', 'post_info_name', '2', '', 2, newid(), '')
GO
declare @datashowset_id int
declare @current_date varchar(100)
declare @current_time varchar(100)

@ -317,8 +317,8 @@
<select id="listCompsByIds" resultType="java.util.Map">
select
id,
comp_name as name
id as "id",
comp_name as "name"
from jcl_org_comp t
WHERE delete_type = 0
AND id IN

@ -93,8 +93,8 @@
<select id="listDeptsByIds" resultType="java.util.Map">
select
id,
dept_name as name
id as "id",
dept_name as "name"
from jcl_org_dept t
WHERE delete_type = 0
AND id IN

@ -29,12 +29,20 @@ public interface ExtMapper {
int countExtById(ExtendInfoParams params);
/**
*
*
*
* @param params
* @return
*/
int insertExt(ExtendInfoParams params);
int insertTable(ExtendInfoParams params);
/**
*
*
* @param params
* @return
*/
int insertExtTable(ExtendInfoParams params);
/**
*
@ -42,5 +50,5 @@ public interface ExtMapper {
* @param params
* @return
*/
int updateExt(ExtendInfoParams params);
int updateTable(ExtendInfoParams params);
}

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.organization.mapper.extend.ExtMapper">
<insert id="insertExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
<insert id="insertTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
insert into ${tableName} (
@ -17,7 +17,8 @@
)
</insert>
<insert id="insertExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams" databaseId="oracle">
<insert id="insertTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams"
databaseId="oracle">
<selectKey keyProperty="id" resultType="long" order="AFTER">
select ${sequenceName}.currval from dual
</selectKey>
@ -33,8 +34,20 @@
</foreach>
)
</insert>
<insert id="insertExtTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
insert into ${tableName} (
<foreach collection="params" item="value" index="key" separator=",">
${key}
</foreach>
)
values (
<foreach collection="params" item="value" index="key" separator=",">
#{value}
</foreach>
)
</insert>
<update id="updateExt" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
<update id="updateTable" parameterType="com.engine.organization.entity.extend.param.ExtendInfoParams">
update ${tableName} set
<foreach collection="params" item="value" index="key" separator=",">
${key} = #{value}

@ -396,8 +396,8 @@
</select>
<select id="listJobsByIds" resultType="java.util.Map">
select
id,
job_name as name
id as "id",
job_name as "name"
from jcl_org_job t
WHERE delete_type = 0
AND id IN

@ -51,8 +51,8 @@
<select id="listPostInfosByIds" resultType="java.util.Map">
select
id,
post_info_name as name
id as "id",
post_info_name as "name"
from jcl_org_post_info t
WHERE delete_type = 0
AND id IN

@ -38,8 +38,8 @@
<!-- 浏览按钮赋值、展示用 -->
<select id="listPostsByIds" resultType="java.util.Map">
select
id,
post_name as name
id as "id",
post_name as "name"
from jcl_org_post t
WHERE delete_type = 0
AND id IN

@ -68,8 +68,8 @@
</select>
<select id="listGradessByIds" resultType="java.util.Map">
select
id,
grade_name as name
id as "id",
grade_name as "name"
from jcl_org_grade t
WHERE delete_type = 0
AND id IN

@ -57,8 +57,8 @@
<select id="listLevelsByIds" resultType="java.util.Map">
select
id,
level_name as name
id as "id",
level_name as "name"
from jcl_org_level t
WHERE delete_type = 0
AND id IN

@ -47,8 +47,8 @@
</select>
<select id="listSchemesByIds" resultType="java.util.Map">
select
id,
scheme_name as name
id as "id",
scheme_name as "name"
from jcl_org_scheme t
WHERE delete_type = 0
AND id IN

@ -51,8 +51,8 @@
<select id="listSequencesByIds" resultType="java.util.Map">
select
id,
sequence_name as name
id as "id",
sequence_name as "name"
from jcl_org_sequence t
WHERE delete_type = 0
AND id IN

@ -52,8 +52,8 @@
</select>
<select id="listPlansByIds" resultType="java.util.Map">
select
id,
plan_name as name
id as "id",
plan_name as "name"
from jcl_org_staffplan t
WHERE delete_type = 0
AND id IN

@ -178,7 +178,7 @@ public class CompServiceImpl extends Service implements CompService {
}
String oldCompNo = getCompMapper().listById(searchParam.getId()).getCompNo();
String compNo = searchParam.getCompNo();
if (!oldCompNo.equals(compNo)) {
if (!compNo.equals(oldCompNo)) {
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
}

@ -230,7 +230,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
String oldDeptNo = getDepartmentMapper().getDeptById(searchParam.getId()).getDeptNo();
String deptNo = searchParam.getDeptNo();
if (!oldDeptNo.equals(deptNo)) {
if (!deptNo.equals(oldDeptNo)) {
deptNo = repeatDetermine(deptNo);
params.put("dept_no", deptNo);
}

@ -232,14 +232,14 @@ public class ExtServiceImpl extends Service implements ExtService {
int count = getExtMapper().countExtById(infoParams);
if (count > 0) {
map.put("update_time", new Date());
getExtMapper().updateExt(infoParams);
getExtMapper().updateTable(infoParams);
} else {
map.put("creator", user.getUID());
map.put("delete_type", 0);
map.put("create_time", new Date());
map.put("update_time", new Date());
map.put("id", id);
getExtMapper().insertExt(infoParams);
getExtMapper().insertExtTable(infoParams);
}
} else {
if (!tableName.equals("JCL_ORG_HRMRESOURCE")) {
@ -249,7 +249,7 @@ public class ExtServiceImpl extends Service implements ExtService {
map.put("delete_type", 0);
map.put("create_time", new Date());
map.put("update_time", new Date());
getExtMapper().insertExt(infoParams);
getExtMapper().insertTable(infoParams);
}
return infoParams.getId();
}

@ -641,7 +641,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0);
}
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_COMP").params(map).build();
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.ADD, map).run();
historyDetailPO.setOperateDetail("添加成功");
@ -657,7 +657,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
if (checkRepeatNo(compNo, COMPANY_TYPE, companyId)) {
map.put("update_time", new Date());
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(companyId).tableName("JCL_ORG_COMP").params(map).build());
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(companyId).tableName("JCL_ORG_COMP").params(map).build());
map.put("id", companyId);
new OrganizationRunable(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, map).run();
historyDetailPO.setOperateDetail("更新成功");
@ -828,7 +828,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0);
}
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_DEPT").params(map).build();
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.ADD, map).run();
historyDetailPO.setOperateDetail("添加成功");
@ -844,7 +844,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
if (checkRepeatNo(deptNo, DEPARTMENT_TYPE, departmentId)) {
map.put("update_time", new Date());
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(departmentId).tableName("JCL_ORG_DEPT").params(map).build());
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(departmentId).tableName("JCL_ORG_DEPT").params(map).build());
map.put("id", departmentId);
new OrganizationRunable(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, map).run();
historyDetailPO.setOperateDetail("更新成功");
@ -1043,7 +1043,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
map.put("forbidden_tag", 0);
}
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName("JCL_ORG_JOB").params(map).build();
MapperProxyFactory.getProxy(ExtMapper.class).insertExt(infoParams);
MapperProxyFactory.getProxy(ExtMapper.class).insertTable(infoParams);
map.put("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
map.put("id", infoParams.getId());
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, map).run();
@ -1060,7 +1060,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
}
if (checkRepeatNo(jobNo, JOB_TYPE, jobId)) {
map.put("update_time", new Date());
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(jobId).tableName("JCL_ORG_JOB").params(map).build());
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(jobId).tableName("JCL_ORG_JOB").params(map).build());
map.put("jobactivityid", JobServiceImpl.JOB_ACTIVITY_ID);
map.put("id", jobId);
new OrganizationRunable(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, map).run();

@ -347,7 +347,7 @@ public class JobServiceImpl extends Service implements JobService {
JobPO oldJobPO = getJobMapper().getJobById(searchParam.getId());
String oldJobNo = oldJobPO.getJobNo();
String jobNo = searchParam.getJobNo();
if (!oldJobNo.equals(jobNo)) {
if (!jobNo.equals(oldJobNo)) {
jobNo = repeatDetermine(jobNo);
params.put("job_no", jobNo);
}

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.engine.core.impl.Service;
import com.engine.organization.service.OrgChartService;
import com.engine.organization.util.db.DBType;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.hrm.User;
@ -64,14 +65,17 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
String fclass = (String) request2Map.get("fclass"); // 维度
String fisvitual = (String) request2Map.get("fisvitual"); // 是否显示虚拟组织
if (StringUtils.isBlank(fisvitual)) {
fisvitual = "0";
}
String whereSql = " where 1 = 1 ";
if (DBType.isOracle()) {
whereSql += " and ((fdatebegin <= to_date('" + date + "','yyyy-MM-DD') and fdateend >= to_date('" + date + "','yyyy-MM-DD')) or (fdatebegin <= to_date('" + date + "','yyyy-MM-DD') and fdateend is null )) ";
} else {
whereSql += " and ((fdatebegin <= '" + date + "' and fdateend >= '" + date + "') or (fdatebegin <= '" + date + "' and fdateend is null )) ";
}
whereSql += " and fclass = " + fclass + " ";
if ("0".equals(fisvitual)) {
@ -172,7 +176,11 @@ public class OrgChartServiceImpl extends Service implements OrgChartService {
}
String whereSql = " where 1 = 1 ";
if (DBType.isOracle()) {
whereSql += " and ((t.fdatebegin <= to_date('" + date + "','yyyy-MM-DD') and t.fdateend >= to_date('" + date + "','yyyy-MM-DD')) or (t.fdatebegin <= to_date('" + date + "','yyyy-MM-DD') and t.fdateend is null )) ";
} else {
whereSql += " and ((t.fdatebegin <= '" + date + "' and t.fdateend >= '" + date + "') or (t.fdatebegin <= '" + date + "' and t.fdateend is null )) ";
}
whereSql += " and t.fclass = " + fclass + " ";
if ("0".equals(fisvitual)) {

@ -436,7 +436,7 @@ public class OrganizationRunable implements Runnable {
departmentMap.put("uuid", uuid);
long jclTableId = Long.parseLong(Util.null2String(params.get("id")));
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName(jclTableName).params(departmentMap).id(jclTableId).build();
getExtMapper().updateExt(infoParams);
getExtMapper().updateTable(infoParams);
}
}

@ -97,7 +97,7 @@ public class CusFieldDataTrigger {
hrmResourceMap.put("departmentid", ecBmId);
// 公司
hrmResourceMap.put("subcompanyid1", ecGsId);
MapperProxyFactory.getProxy(ExtMapper.class).updateExt(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
updateFlag = true;
}

Loading…
Cancel
Save