Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
52e7300f
Commit
52e7300f
authored
Sep 25, 2019
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat]项目以及合同创建修改的pkg
parent
3d856bf0
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9668 additions
and
0 deletions
+9668
-0
con_contract_pkg.pck
src/main/database/Package/con_contract_pkg.pck
+6165
-0
con_contract_workflow_pkg.pck
src/main/database/Package/con_contract_workflow_pkg.pck
+63
-0
prj_project_check_pkg.pck
src/main/database/Package/prj_project_check_pkg.pck
+55
-0
prj_project_pkg.pck
src/main/database/Package/prj_project_pkg.pck
+3385
-0
No files found.
src/main/database/Package/con_contract_pkg.pck
0 → 100644
View file @
52e7300f
This diff is collapsed.
Click to expand it.
src/main/database/Package/con_contract_workflow_pkg.pck
0 → 100644
View file @
52e7300f
create or replace package con_contract_workflow_pkg is
-- Author : LIJINGJING
-- Created : 2019/9/24 17:26:56
-- Purpose :
procedure contract_submit(p_contract_id NUMBER, p_user_id NUMBER);
end con_contract_workflow_pkg;
/
create or replace package body con_contract_workflow_pkg is
procedure contract_submit(p_contract_id NUMBER, p_user_id NUMBER) is
v_contract_rec con_contract%ROWTYPE;
v_contract_status_error exception;
v_instance_id number;
v_approval_method hls_document_type.approval_method%Type;
BEGIN
SELECT *
INTO v_contract_rec
FROM con_contract cc
WHERE cc.contract_id = p_contract_id;
IF v_contract_rec.contract_status NOT IN ('NEW', 'RETURN') then
RAISE v_contract_status_error;
END IF;
Select approval_method
Into v_approval_method
From hls_document_type
Where document_category = v_contract_rec.document_category
And document_type = v_contract_rec.document_type;
--条件表调用工作流
v_instance_id := v_contract_rec.wfl_instance_id;
If v_approval_method = 'WORK_FLOW' Then
hls_workflow_pkg.workflow_start(p_instance_id => v_instance_id,
p_document_category => 'CONTRACT',
p_document_type =>'CARCON',
p_company_id => v_contract_rec.company_id,
p_user_id => p_user_id,
p_function_code => '',
p_parameter_1 => 'CONTRACT_ID',
p_parameter_1_value => p_contract_id,
p_parameter_2 => 'DOCUMENT_INFO',
p_parameter_2_value => '合同审批' || '-' ||
v_contract_rec.contract_name || '-' ||
v_contract_rec.contract_number,
p_parameter_3 => 'SUBMITTED_BY',
p_parameter_3_value => p_user_id);
UPDATE CON_CONTRACT T
SET T.wfl_contract_status = 'APPROVING',
t.wfl_instance_id=v_instance_id
WHERE T.CONTRACT_ID = P_CONTRACT_ID;
End If;
EXCEPTION
WHEN v_contract_status_error THEN
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '只有新建和审批退回的单据才可以提交审批!!',
p_created_by => p_user_id,
p_package_name => 'con_contract_workflow_pkg',
p_procedure_function_name => 'contract_submit');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
END;
end con_contract_workflow_pkg;
/
src/main/database/Package/prj_project_check_pkg.pck
0 → 100644
View file @
52e7300f
create or replace package prj_project_check_pkg is
-- Author : LIJINGJING
-- Created : 2019/9/19 18:32:46
-- Purpose :
procedure check_prj_record(p_project_id number,
p_payment_deduction in out varchar2,
p_secondary_lease in out varchar2,
p_price_list in out varchar2);
procedure check_prj_lease_item(p_machine_number varchar2,
p_user_id number);
end prj_project_check_pkg;
/
create or replace package body prj_project_check_pkg is
procedure check_prj_record(p_project_id number,
p_payment_deduction in out varchar2,
p_secondary_lease in out varchar2,
p_price_list in out varchar2) is
begin
select p.payment_deduction,
p.secondary_lease,
(select pq.price_list
from prj_quotation pq
where pq.document_id = p.project_id
and pq.document_category = 'PROJECT')
into p_payment_deduction, p_secondary_lease, p_price_list
from prj_project p
where p.project_id = p_project_id;
end;
procedure check_prj_lease_item(p_machine_number varchar2,
p_user_id number) is
v_count number;
e_count_err exception;
begin
select count(*)
into v_count
from prj_project_lease_item t
where t.machine_number = p_machine_number;
if v_count > 0 then
raise e_count_err;
end if;
exception
when e_count_err then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '该机号已存在,请重新确认!',
p_created_by => p_user_id,
p_package_name => 'prj_project_check_pkg',
p_procedure_function_name => 'check_prj_lease_item');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
end prj_project_check_pkg;
/
src/main/database/Package/prj_project_pkg.pck
0 → 100644
View file @
52e7300f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment