mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-20 13:11:52 +08:00
Compare commits
68 Commits
be6ac815b9
...
feature-bu
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5a6c76f8cb | ||
![]() |
67dcab5a0f | ||
![]() |
98f295be74 | ||
![]() |
4ee64cce49 | ||
![]() |
38b8336631 | ||
![]() |
dd36988f9e | ||
![]() |
97c7a8abc8 | ||
![]() |
39c410f56e | ||
![]() |
50a30ff83e | ||
![]() |
f2cfb723a9 | ||
![]() |
1d079654b3 | ||
![]() |
8e41517755 | ||
![]() |
51ec3731a1 | ||
![]() |
d3513e0cfb | ||
![]() |
684d20bedb | ||
![]() |
579a647566 | ||
![]() |
fff41eda04 | ||
![]() |
4c72939f29 | ||
![]() |
e0ebf5c67e | ||
![]() |
194383276a | ||
![]() |
791ec26468 | ||
![]() |
6d4885c051 | ||
![]() |
2e9937cad2 | ||
![]() |
e0c60dd15b | ||
![]() |
83e39a0197 | ||
![]() |
365d3de0dd | ||
![]() |
6ca5de888f | ||
![]() |
bff455be96 | ||
![]() |
ad63ca24c0 | ||
![]() |
44c6558602 | ||
![]() |
7446e57a48 | ||
![]() |
982f817f4c | ||
![]() |
d6725f3040 | ||
![]() |
8ebbf12016 | ||
![]() |
504f7f7615 | ||
![]() |
a224d73203 | ||
![]() |
698906fb08 | ||
![]() |
027a5d1e1c | ||
![]() |
0a52eddbc6 | ||
![]() |
787f153bf1 | ||
![]() |
3114d32995 | ||
![]() |
ca58994bd6 | ||
![]() |
73d09ffea0 | ||
![]() |
871ddf4aab | ||
![]() |
47adca8394 | ||
![]() |
171c0cc018 | ||
![]() |
9d82236a89 | ||
![]() |
7ec73544f6 | ||
![]() |
dafc8cb432 | ||
![]() |
05b6707709 | ||
![]() |
b0ff4a7666 | ||
![]() |
7003b2a5eb | ||
![]() |
64c9b06f91 | ||
![]() |
e721f62821 | ||
![]() |
591d5bc495 | ||
![]() |
99a33c9c41 | ||
![]() |
340358e8d1 | ||
![]() |
ee17a3935c | ||
![]() |
8886aa269d | ||
![]() |
f0dc469105 | ||
![]() |
4a4d150fdc | ||
![]() |
967a83948b | ||
![]() |
b06e9b7d56 | ||
![]() |
c46f14c630 | ||
![]() |
57b1000fc5 | ||
![]() |
163ac1e5de | ||
![]() |
c44b48ec3f | ||
![]() |
5c4b2e1271 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -50,4 +50,5 @@ rebel.xml
|
||||
|
||||
application-my.yaml
|
||||
|
||||
application-local.yaml
|
||||
/yudao-ui-app/unpackage/
|
||||
|
55
sql/cms/ContractOuts-sql.sql
Normal file
55
sql/cms/ContractOuts-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联管理', '', 2, 0, 2758,
|
||||
'contract-outs', '', 'cms/contractouts/index', 0, 'ContractOuts'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联查询', 'cms:contract-outs:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联创建', 'cms:contract-outs:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联更新', 'cms:contract-outs:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联删除', 'cms:contract-outs:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同关联导出', 'cms:contract-outs:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-ExtContract-sql.sql
Normal file
55
sql/cms/codegen-ExtContract-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理管理', '', 2, 0, 2758,
|
||||
'ext-contract', '', 'cms/extcontract/index', 0, 'ExtContract'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理查询', 'cms:ext-contract:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理创建', 'cms:ext-contract:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理更新', 'cms:ext-contract:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理删除', 'cms:ext-contract:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理导出', 'cms:ext-contract:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-OutsContract-sql.sql
Normal file
55
sql/cms/codegen-OutsContract-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'外包合同管理', '', 2, 0, 2759,
|
||||
'outs-contract', '', 'cms/outscontract/index', 0, 'OutsContract'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同查询', 'cms:outs-contract:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同创建', 'cms:outs-contract:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同更新', 'cms:outs-contract:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同删除', 'cms:outs-contract:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同导出', 'cms:outs-contract:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-OutsContractHistory-sql.sql
Normal file
55
sql/cms/codegen-OutsContractHistory-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史管理', '', 2, 0, 2758,
|
||||
'outs-contract-history', '', 'cms/outscontracthistory/index', 0, 'OutsContractHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史查询', 'cms:outs-contract-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史创建', 'cms:outs-contract-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史更新', 'cms:outs-contract-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史删除', 'cms:outs-contract-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外包合同历史导出', 'cms:outs-contract-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-cms-contractHistory-sql.sql
Normal file
55
sql/cms/codegen-cms-contractHistory-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'历史合同管理', '', 2, 0, 2758,
|
||||
'contract-history', '', 'cms/contracthistory/index', 0, 'ContractHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同查询', 'cms:contract-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同创建', 'cms:contract-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同更新', 'cms:contract-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同删除', 'cms:contract-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'历史合同导出', 'cms:contract-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-cms-exthistory-sql.sql
Normal file
55
sql/cms/codegen-cms-exthistory-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'外部合同管理', '', 2, 0, 2758,
|
||||
'ext-contract-history', '', 'cms/extcontracthistory/index', 0, 'ExtContractHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同查询', 'cms:ext-contract-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同创建', 'cms:ext-contract-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同更新', 'cms:ext-contract-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同删除', 'cms:ext-contract-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'外部合同导出', 'cms:ext-contract-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/cms/codegen-contract-sql.sql
Normal file
55
sql/cms/codegen-contract-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'合同管理管理', '', 2, 0, 2758,
|
||||
'contract', '', 'cms/contract/index', 0, 'Contract'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'合同管理查询', 'cms:contract:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'合同管理创建', 'cms:contract:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'合同管理更新', 'cms:contract:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'合同管理删除', 'cms:contract:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'合同管理导出', 'cms:contract:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/pms/codegen-Budget-sql.sql
Normal file
55
sql/pms/codegen-Budget-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'预算管理管理', '', 2, 0, 2759,
|
||||
'budget', '', 'pms/budget/index', 0, 'Budget'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理查询', 'pms:budget:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理创建', 'pms:budget:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理更新', 'pms:budget:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理删除', 'pms:budget:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理导出', 'pms:budget:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
57
sql/pms/codegen-BudgetHistory-sql.sql
Normal file
57
sql/pms/codegen-BudgetHistory-sql.sql
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
-- 历史预算管理
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'历史预算管理管理', '', 2, 0, 2759,
|
||||
'budget-history', '', 'pms/budgethistory/index', 0, 'BudgetHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理查询', 'pms:budget-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理创建', 'pms:budget-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理更新', 'pms:budget-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理删除', 'pms:budget-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'预算管理导出', 'pms:budget-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/pms/codegen-ProjectSchedule-sql.sql
Normal file
55
sql/pms/codegen-ProjectSchedule-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理管理', '', 2, 0, 2759,
|
||||
'project-schedule', '', 'pms/projectschedule/index', 0, 'ProjectSchedule'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理查询', 'pms:project-schedule:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理创建', 'pms:project-schedule:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理更新', 'pms:project-schedule:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理删除', 'pms:project-schedule:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目进度管理导出', 'pms:project-schedule:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/pms/codegen-ProjectTracking.sql
Normal file
55
sql/pms/codegen-ProjectTracking.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息管理', '', 2, 0, 2759,
|
||||
'project-tracking', '', 'pms/projecttracking/index', 0, 'ProjectTracking'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息查询', 'pms:project-tracking:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息创建', 'pms:project-tracking:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息更新', 'pms:project-tracking:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息删除', 'pms:project-tracking:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'项目跟踪信息导出', 'pms:project-tracking:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/pms/codegen-Receivables-sql.sql
Normal file
55
sql/pms/codegen-Receivables-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理管理', '', 2, 0, 2759,
|
||||
'receivables', '', 'pms/receivables/index', 0, 'Receivables'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理查询', 'pms:receivables:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理创建', 'pms:receivables:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理更新', 'pms:receivables:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理删除', 'pms:receivables:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理导出', 'pms:receivables:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
55
sql/pms/codegen-ReceivablesHistory-sql.sql
Normal file
55
sql/pms/codegen-ReceivablesHistory-sql.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
-- 菜单 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status, component_name
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录管理', '', 2, 0, 2759,
|
||||
'receivables-history', '', 'pms/receivableshistory/index', 0, 'ReceivablesHistory'
|
||||
);
|
||||
|
||||
-- 按钮父菜单ID
|
||||
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录查询', 'pms:receivables-history:query', 3, 1, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录创建', 'pms:receivables-history:create', 3, 2, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录更新', 'pms:receivables-history:update', 3, 3, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录删除', 'pms:receivables-history:delete', 3, 4, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
||||
INSERT INTO system_menu(
|
||||
name, permission, type, sort, parent_id,
|
||||
path, icon, component, status
|
||||
)
|
||||
VALUES (
|
||||
'应收款管理历史记录导出', 'pms:receivables-history:export', 3, 5, @parentId,
|
||||
'', '', '', 0
|
||||
);
|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.bpm.api.task;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceGetRespDTO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
@@ -20,4 +21,8 @@ public interface BpmProcessInstanceApi {
|
||||
*/
|
||||
String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO);
|
||||
|
||||
/**
|
||||
* 获得流程实例
|
||||
*/
|
||||
BpmProcessInstanceGetRespDTO getProcessInstance(String processInstanceId);
|
||||
}
|
||||
|
@@ -0,0 +1,115 @@
|
||||
package cn.iocoder.yudao.module.bpm.api.task.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程定义
|
||||
*/
|
||||
@Data
|
||||
public class BpmProcessDefinitionRespDTO {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 流程标识
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 流程图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 流程描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 流程分类
|
||||
*/
|
||||
private String category;
|
||||
/**
|
||||
* 流程分类名字
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 表单类型
|
||||
*/
|
||||
private Integer formType;
|
||||
|
||||
/**
|
||||
* 表单编号
|
||||
*/
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 表单名字
|
||||
*/
|
||||
private String formName;
|
||||
/**
|
||||
* 表单的配置
|
||||
*/
|
||||
private String formConf;
|
||||
|
||||
/**
|
||||
* 表单项的数组
|
||||
*/
|
||||
private List<String> formFields;
|
||||
|
||||
/**
|
||||
* 自定义表单的提交路径
|
||||
*/
|
||||
private String formCustomCreatePath;
|
||||
|
||||
/**
|
||||
* 自定义表单的查看路径
|
||||
*/
|
||||
private String formCustomViewPath;
|
||||
|
||||
/**
|
||||
* 中断状态-参见 SuspensionState 枚举
|
||||
*/
|
||||
private Integer suspensionState; // 参见 SuspensionState 枚举
|
||||
|
||||
/**
|
||||
* 部署时间
|
||||
*/
|
||||
private LocalDateTime deploymentTime; // 需要从对应的 Deployment 读取,非必须返回
|
||||
|
||||
/**
|
||||
* BPMN XML
|
||||
*/
|
||||
private String bpmnXml; // 需要从对应的 BpmnModel 读取,非必须返回
|
||||
|
||||
/**
|
||||
* 发起用户需要选择审批人的任务数组
|
||||
*/
|
||||
private List<UserTask> startUserSelectTasks; // 需要从对应的 BpmnModel 读取,非必须返回
|
||||
|
||||
@Data
|
||||
public static class UserTask {
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -19,6 +19,7 @@ public class BpmProcessInstanceCreateReqDTO {
|
||||
*/
|
||||
@NotEmpty(message = "流程定义的标识不能为空")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 变量实例(动态表单)
|
||||
*/
|
||||
|
@@ -0,0 +1,86 @@
|
||||
package cn.iocoder.yudao.module.bpm.api.task.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 流程实例的创建 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Data
|
||||
public class BpmProcessInstanceGetRespDTO {
|
||||
|
||||
/**
|
||||
* 流程名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 发起流程的用户
|
||||
*/
|
||||
private User startUser;
|
||||
|
||||
@Data
|
||||
public static class User {
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程实例状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 当前审批中的任务
|
||||
*/
|
||||
private List<Task> tasks; // 仅在流程实例分页才返回
|
||||
|
||||
@Data
|
||||
public static class Task {
|
||||
/**
|
||||
* 流程任务编号
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 持续时间
|
||||
*/
|
||||
private Long durationInMillis;
|
||||
|
||||
}
|
@@ -0,0 +1,118 @@
|
||||
package cn.iocoder.yudao.module.bpm.api.task.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程实例的获得 Resp DTO
|
||||
*/
|
||||
@Data
|
||||
public class BpmProcessInstanceRespDTO {
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 流程实例名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 流程分类
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 流程分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 流程实例状态
|
||||
*/
|
||||
private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举
|
||||
|
||||
/**
|
||||
* 发起时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 持续时间
|
||||
*/
|
||||
private Long durationInMillis;
|
||||
|
||||
/**
|
||||
* 发起流程的用户
|
||||
*/
|
||||
private User startUser;
|
||||
|
||||
/**
|
||||
* 流程定义编号
|
||||
*/
|
||||
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程定义
|
||||
*/
|
||||
private BpmProcessDefinitionRespDTO processDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* 当前审批中的任务
|
||||
*/
|
||||
private List<Task> tasks; // 仅在流程实例分页才返回
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
@Data
|
||||
public static class User {
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程任务
|
||||
*/
|
||||
@Data
|
||||
public static class Task {
|
||||
|
||||
/**
|
||||
* 流程任务编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,144 @@
|
||||
package cn.iocoder.yudao.module.bpm.api.task.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 指定流程实例的任务
|
||||
*/
|
||||
@Data
|
||||
public class BpmTaskRespDTO {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 任务名字
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
/**
|
||||
* 持续时间
|
||||
*/
|
||||
private Long durationInMillis;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
private Integer status; // 参见 BpmTaskStatusEnum 枚举
|
||||
|
||||
/**
|
||||
* 审批理由
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 负责人的用户信息
|
||||
*/
|
||||
private BpmProcessInstanceRespDTO.User ownerUser;
|
||||
/**
|
||||
* 审核的用户信息
|
||||
*/
|
||||
private BpmProcessInstanceRespDTO.User assigneeUser;
|
||||
|
||||
/**
|
||||
* 任务定义的标识
|
||||
*/
|
||||
private String taskDefinitionKey;
|
||||
|
||||
/**
|
||||
* 所属流程实例编号
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 所属流程实例
|
||||
*/
|
||||
private ProcessInstance processInstance;
|
||||
|
||||
/**
|
||||
* 父任务编号
|
||||
*/
|
||||
private String parentTaskId;
|
||||
|
||||
/**
|
||||
* 子任务列表(由加签生成)
|
||||
*/
|
||||
private List<BpmTaskRespDTO> children;
|
||||
|
||||
/**
|
||||
* 表单编号
|
||||
*/
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 表单名字
|
||||
*/
|
||||
private String formName;
|
||||
|
||||
/**
|
||||
* 表单的配置-JSON 字符串
|
||||
*/
|
||||
private String formConf;
|
||||
|
||||
/**
|
||||
* 表单项的数组
|
||||
*/
|
||||
private List<String> formFields;
|
||||
|
||||
/**
|
||||
* 提交的表单值
|
||||
*/
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
|
||||
/**
|
||||
* 流程实例
|
||||
*/
|
||||
@Data
|
||||
public static class ProcessInstance {
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 流程实例名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 发起人的用户信息
|
||||
*/
|
||||
private BpmProcessInstanceRespDTO.User startUser;
|
||||
|
||||
}
|
||||
}
|
@@ -36,6 +36,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF = new ErrorCode(1_009_004_002, "流程取消失败,该流程不是你发起的");
|
||||
ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_CONFIG = new ErrorCode(1_009_004_003, "审批任务({})的审批人未配置");
|
||||
ErrorCode PROCESS_INSTANCE_START_USER_SELECT_ASSIGNEES_NOT_EXISTS = new ErrorCode(1_009_004_004, "审批任务({})的审批人({})不存在");
|
||||
ErrorCode PROCESS_INSTANCE_NOT_END = new ErrorCode(1_009_004_005, "流程实例创建失败,该流程还未结束");
|
||||
|
||||
// ========== 流程任务 1-009-005-000 ==========
|
||||
ErrorCode TASK_OPERATE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "操作失败,原因:该任务的审批人不是你");
|
||||
|
@@ -1,13 +1,29 @@
|
||||
package cn.iocoder.yudao.module.bpm.api.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceGetRespDTO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.convert.task.BpmProcessInstanceConvert;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionInfoDO;
|
||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils;
|
||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService;
|
||||
import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* Flowable 流程实例 Api 实现类
|
||||
*
|
||||
@@ -21,8 +37,44 @@ public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
|
||||
@Resource
|
||||
private BpmProcessInstanceService processInstanceService;
|
||||
|
||||
@Resource
|
||||
private BpmProcessDefinitionService processDefinitionService;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private DeptApi deptApi;
|
||||
|
||||
@Override
|
||||
public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO) {
|
||||
return processInstanceService.createProcessInstance(userId, reqDTO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BpmProcessInstanceGetRespDTO getProcessInstance(String id) {
|
||||
HistoricProcessInstance processInstance = processInstanceService.getHistoricProcessInstance(id);
|
||||
if (processInstance == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 拼接返回
|
||||
ProcessDefinition processDefinition = processDefinitionService.getProcessDefinition(
|
||||
processInstance.getProcessDefinitionId());
|
||||
BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(
|
||||
processInstance.getProcessDefinitionId());
|
||||
String bpmnXml = BpmnModelUtils.getBpmnXml(
|
||||
processDefinitionService.getProcessDefinitionBpmnModel(processInstance.getProcessDefinitionId()));
|
||||
AdminUserRespDTO startUser = adminUserApi.getUser(NumberUtils.parseLong(processInstance.getStartUserId()));
|
||||
DeptRespDTO dept = null;
|
||||
if (startUser != null) {
|
||||
dept = deptApi.getDept(startUser.getDeptId());
|
||||
}
|
||||
|
||||
BpmProcessInstanceRespVO bpmProcessInstanceRespVO = BpmProcessInstanceConvert.INSTANCE.buildProcessInstance(processInstance,
|
||||
processDefinition, processDefinitionInfo, bpmnXml, startUser, dept);
|
||||
return BeanUtils.toBean(bpmProcessInstanceRespVO, BpmProcessInstanceGetRespDTO.class);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ public class BpmProcessInstanceRespVO {
|
||||
|
||||
@Schema(description = "流程分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "流程分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "请假")
|
||||
private String categoryName;
|
||||
|
||||
|
@@ -0,0 +1,11 @@
|
||||
package cn.iocoder.yudao.module.cms.api.contract;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.cms.api.contract.dto.ContractDTO;
|
||||
|
||||
public interface ContractApi {
|
||||
|
||||
ContractDTO getContractDTO(Long ContractId);
|
||||
|
||||
void validContractExists(Long Id);
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.cms.api.contract.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class ContractDTO {
|
||||
|
||||
/**
|
||||
* 暂定结算数
|
||||
*/
|
||||
private BigDecimal provisionalSettlement;
|
||||
|
||||
/**
|
||||
* 包干审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package cn.iocoder.yudao.module.cms.api.outscontract;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public interface OutsContractApi {
|
||||
|
||||
BigDecimal getOutsContractAmount(Long contractId);
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.cms.api.outscontract.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class OutsContractDTO {
|
||||
|
||||
/**
|
||||
* 外包合同金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 收费标注枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ChargingStandardEnum {
|
||||
//厦建设
|
||||
XIA_BUILDING("0","xia_building"),
|
||||
//包干价
|
||||
LUMP("1","lump"),
|
||||
//其他省份
|
||||
OTHER("2","other");
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ChargingStandardEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 合同状态枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ContractStatusEnum {
|
||||
//应签未签
|
||||
NO_SIGN("0","no_sign"),
|
||||
//已拟定
|
||||
PREPARED("1","prepared"),
|
||||
//已盖章
|
||||
STAMP("2","stamp"),
|
||||
//已签订
|
||||
SIGN("3","sign"),
|
||||
//已终止
|
||||
TERMINATION("4","termination"),;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ContractStatusEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 合同类型枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ContractTypeEnum {
|
||||
//勘察设计
|
||||
SURVEY("0","survey"),
|
||||
//检测
|
||||
DETECTION("1","detection"),
|
||||
//总承包合同
|
||||
GENERAL_CONTRACT("2","general_contract"),
|
||||
//全过程咨询
|
||||
PROCESS_CONSULTATION("3","process_consultation");
|
||||
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ContractTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 计费方式枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CountTypeEnum {
|
||||
//费率合同
|
||||
RATE_CONTRACT("0","rate_contract"),
|
||||
//包干合同
|
||||
RES_CONTRACT("1","res_contract");
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (CountTypeEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
/**
|
||||
* @author hhyykk
|
||||
* @description 字典枚举
|
||||
* @date 2024/7/3
|
||||
*/
|
||||
public interface DictTypeConstants {
|
||||
|
||||
// ***** 字典名称 ******
|
||||
String CONTRACT_TYPE = "contract_type"; // 合同类型
|
||||
String CONTRACT_STATUS = "contract_status"; // 合同类型
|
||||
String COUNT_TYPE = "count_type";
|
||||
String SOURCE = "source";
|
||||
String PROCESS_STATUS = "process_status";
|
||||
String CHARGING_STANDARD = "charging_standard";
|
||||
String OUTS_CONTRACT_MAJOR = "outs_contract_major";
|
||||
}
|
@@ -8,5 +8,48 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
* @date 2024/7/3
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
ErrorCode CUSTOMER_COMPANY_NOT_EXISTS = new ErrorCode(1_020_000_000, "客户公司管理不存在");
|
||||
// ========== 客户公司 1_020_000_000 ==========
|
||||
ErrorCode CUSTOMER_COMPANY_NOT_EXISTS = new ErrorCode(1_020_000_000, "客户公司不存在");
|
||||
// ========== 项目信息 1_021_000_000 ==========
|
||||
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(1_021_000_000, "项目信息不存在");
|
||||
// ========== 请求参数 1_022_000_000 ==========
|
||||
ErrorCode PARAM_NOT_EXISTS = new ErrorCode(1_022_000_000, "请求参数不存在");
|
||||
|
||||
ErrorCode PARAM_ERROR = new ErrorCode(1_022_001_000, "请求参数错误");
|
||||
|
||||
// ========== 外包合同 2_021_000_000 ==========
|
||||
ErrorCode OUTS_CONTRACT_NOT_EXISTS = new ErrorCode(2_021_000_000, "外包合同不存在");
|
||||
|
||||
// ========== 外包合同历史 2_022_000_000 ==========
|
||||
ErrorCode OUTS_CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(2_022_000_000, "外包合同历史不存在");
|
||||
|
||||
// ========== 外包合同关联 2_023_000_000 ==========
|
||||
ErrorCode CONTRACT_OUTS_NOT_EXISTS = new ErrorCode(2_023_000_000, "外包合同关联不存在");
|
||||
|
||||
ErrorCode CONTRACT_OUTS_ALREADY_EXISTS = new ErrorCode(2_023_001_000, "外包合同关联已经存在");
|
||||
|
||||
// ========== 合同信息 2_024_000_000 ==========
|
||||
ErrorCode CONTRACT_NOT_EXISTS = new ErrorCode(2_024_000_000, "合同不存在");
|
||||
|
||||
|
||||
ErrorCode CONTRACT_NAME_NOT_EXISTS = new ErrorCode(2_024_001_000, "合同名称不存在");
|
||||
|
||||
ErrorCode CONTRACT_ALREADY_EXISTS = new ErrorCode(2_024_002_000, "该合同已经创建");
|
||||
|
||||
|
||||
// ========== 历史合同信息 2_025_000_000 ==========
|
||||
ErrorCode CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(2_025_000_000, "历史合同不存在");
|
||||
|
||||
// ========== 外部合同信息 2_026_000_000 ==========
|
||||
ErrorCode EXT_CONTRACT_NOT_EXISTS = new ErrorCode(2_026_000_000, "外部合同不存在");
|
||||
|
||||
ErrorCode EXT_CONTRACT_EXISTS = new ErrorCode(2_026_000_000, "外部合同已经存在");
|
||||
|
||||
// ========== 历史外部合同信息 2_027_000_000 ==========
|
||||
ErrorCode EXT_CONTRACT_HISTORY_NOT_EXISTS = new ErrorCode(2_027_000_000, "历史外部合同不存在");
|
||||
|
||||
// ========== 外部合同关联 2_028_000_000 ==========
|
||||
ErrorCode CONTRACT_EXT_NOT_EXISTS = new ErrorCode(2_028_000_000, "外部合同关联不存在");
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 外包合同专业枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum OutsContractMajorEnum {
|
||||
//地勘
|
||||
GROUND_SERVICE("0","ground_service"),
|
||||
//景观
|
||||
SCENERY("1","scenery"),
|
||||
//建筑
|
||||
ARCHITECTURE("2","architecture"),
|
||||
//测量
|
||||
MEASURE("3","measure"),
|
||||
//效果图
|
||||
EFFECT_PICTURE("4","effect_picture");
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (OutsContractMajorEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 收费标注枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProcessStatusEnum {
|
||||
//未执行
|
||||
NO_EXECUTION("0","no_execution"),
|
||||
//正在执行
|
||||
EXECUTING("1","executing"),
|
||||
//执行完成
|
||||
COMPLETED("2","completed");
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (ProcessStatusEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.cms.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description 资金来源枚举
|
||||
* @date 2024/7/31
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum SourceEnum {
|
||||
//市财政
|
||||
MUNICIPAL_FINANCE("0","municipal_finance"),
|
||||
//区财政
|
||||
DISTRICT_FINANCE("1","district_finance"),
|
||||
//业主自筹
|
||||
OWNER_FINANCE("2","owner_finance");
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private final String code;
|
||||
/**
|
||||
* 类型编码
|
||||
*/
|
||||
private final String no;
|
||||
|
||||
/**
|
||||
* 通过code获取no
|
||||
* @param code 字典编号
|
||||
* @return 类型编码
|
||||
*/
|
||||
public static String getNoByCode(String code) {
|
||||
for (SourceEnum value : values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getNo();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -29,6 +29,13 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-pms-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
|
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.cms.api.contract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.cms.api.contract.dto.ContractDTO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.service.contract.ContractService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractImpl implements ContractApi{
|
||||
|
||||
@Resource
|
||||
private ContractService contractService;
|
||||
|
||||
@Override
|
||||
public ContractDTO getContractDTO(Long ContractId) {
|
||||
ContractDetailDO contractDetail = contractService.getContractDetail(ContractId);
|
||||
return BeanUtils.toBean(contractDetail, ContractDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validContractExists(Long Id) {
|
||||
contractService.validateContractExists(Id);
|
||||
}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.cms.api.outscontract;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontract.OutsContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.outscontract.OutsContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.service.outscontract.OutsContractService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Validated
|
||||
public class OutsContractImpl implements OutsContractApi{
|
||||
|
||||
@Resource
|
||||
private OutsContractMapper outsContractMapper;
|
||||
|
||||
@Override
|
||||
public BigDecimal getOutsContractAmount(Long contractId) {
|
||||
|
||||
List<OutsContractDO> outsContractDOList = outsContractMapper.selectList("contract_id", contractId);
|
||||
BigDecimal res = BigDecimal.ZERO;
|
||||
for (OutsContractDO outsContractDO : outsContractDOList) {
|
||||
res = res.add(outsContractDO.getOutsAmount());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
@@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.file.FileUtils;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.ContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.ContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.ContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.service.contract.ContractService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Tag(name = "管理后台 - 合同管理")
|
||||
@RestController
|
||||
@RequestMapping("/cms/contract")
|
||||
@Validated
|
||||
public class ContractController {
|
||||
|
||||
@Resource
|
||||
private ContractService contractService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:create')")
|
||||
public CommonResult<Long> createContract(@Valid @RequestBody ContractSaveReqVO createReqVO) {
|
||||
return success(contractService.createContract(getLoginUserId(), createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:update')")
|
||||
public CommonResult<Boolean> updateContract(@Valid @RequestBody ContractSaveReqVO updateReqVO) {
|
||||
contractService.updateContract(getLoginUserId(), updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除合同")
|
||||
@Parameter(name = "id", description = "合同id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:delete')")
|
||||
public CommonResult<Boolean> deleteContract(@RequestParam("id") Long id) {
|
||||
contractService.deleteContract(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得合同")
|
||||
@Parameter(name = "id", description = "合同id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:query')")
|
||||
public CommonResult<ContractRespVO> getContract(@RequestParam("id") Long id) {
|
||||
ContractDetailDO contractDetailDO = contractService.getContractDetail(id);
|
||||
ContractRespVO contractRespVO = new ContractRespVO();
|
||||
org.springframework.beans.BeanUtils.copyProperties(contractDetailDO, contractRespVO, "contractFileUrl", "reviewFileUrl");
|
||||
contractRespVO.setReviewFileUrl(FileUtils.covertJSONStringToFile(contractDetailDO.getReviewFileUrl()));
|
||||
contractRespVO.setContractFileUrl(FileUtils.covertJSONStringToFile(contractDetailDO.getContractFileUrl()));
|
||||
|
||||
return success(contractRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:query')")
|
||||
public CommonResult<PageResult<ContractRespVO>> getContractPage(@Valid ContractPageReqVO pageReqVO) {
|
||||
PageResult<ContractRespVO> pageResult = contractService.getContractPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出合同 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContractExcel(@Valid ContractPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContractRespVO> list = contractService.getContractPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "合同.xls", "数据", ContractRespVO.class,
|
||||
BeanUtils.toBean(list, ContractRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ContractPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同状态", example = "1")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式", example = "1")
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "外部合同id", example = "28")
|
||||
@ExcelProperty("合同id")
|
||||
private Long extContractId;
|
||||
|
||||
}
|
@@ -0,0 +1,155 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@EqualsAndHashCode
|
||||
public class ContractRespVO {
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19374")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1381")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "外部合同id", example = "13085")
|
||||
@ExcelProperty("合同id")
|
||||
private Long extContractId;
|
||||
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "预计合同金额", requiredMode = Schema.RequiredMode.REQUIRED,example = "200.0000")
|
||||
@ExcelProperty("预计合同金额")
|
||||
private BigDecimal expectedContractAmount;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "出图公司", requiredMode = Schema.RequiredMode.REQUIRED,example = "***设计院")
|
||||
@ExcelProperty("出图公司")
|
||||
private String drawingCompany;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("合同类型")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同拟定时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同用印时间")
|
||||
private LocalDateTime printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty(value = "合同状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
@ExcelProperty(value = "计费方式", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "暂定结算数")
|
||||
@ExcelProperty("暂定结算数")
|
||||
private BigDecimal provisionalSettlement;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty("资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "19163")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
@ExcelProperty("占主合同比例")
|
||||
private BigDecimal extProportion;
|
||||
|
||||
@Schema(description = "审定金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,150 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contract.vo;
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 合同新增/修改 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode
|
||||
public class ContractSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19374")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1381")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "外部合同id", example = "13085")
|
||||
@ExcelProperty("合同id")
|
||||
private Long extContractId;
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "预计合同金额", requiredMode = Schema.RequiredMode.REQUIRED,example = "200.0000")
|
||||
@ExcelProperty("预计合同金额")
|
||||
private BigDecimal expectedContractAmount;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "出图公司", requiredMode = Schema.RequiredMode.REQUIRED,example = "***设计院")
|
||||
@ExcelProperty("出图公司")
|
||||
private String drawingCompany;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("合同类型")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同拟定时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同用印时间")
|
||||
private LocalDateTime printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty(value = "合同状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
@ExcelProperty(value = "计费方式", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "暂定结算数")
|
||||
@ExcelProperty("暂定结算数")
|
||||
private BigDecimal provisionalSettlement;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty("资金来源")
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "19163")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
@ExcelProperty("占主合同比例")
|
||||
private BigDecimal extProportion;
|
||||
|
||||
@Schema(description = "审定金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,78 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory;
|
||||
import cn.iocoder.yudao.module.cms.service.contractHistory.ContractHistoryService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
|
||||
@Tag(name = "管理后台 - 历史合同管理")
|
||||
@RestController
|
||||
@RequestMapping("/cms/contract-history")
|
||||
@Validated
|
||||
public class ContractHistoryController {
|
||||
|
||||
@Resource
|
||||
private ContractHistoryService contractHistoryService;
|
||||
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新历史合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:update')")
|
||||
public CommonResult<Boolean> updateContractHistory(@Valid @RequestBody ContractHistorySaveReqVO updateReqVO) {
|
||||
contractHistoryService.updateContractHistory(getLoginUserId(),updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得历史合同")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:query')")
|
||||
public CommonResult<ContractHistoryRespVO> getContractHistory(@RequestParam("id") Long id) {
|
||||
ContractHistoryRespVO contractHistory = contractHistoryService.getContractHistory(id);
|
||||
return success(contractHistory);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得历史合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:query')")
|
||||
public CommonResult<PageResult<ContractHistoryRespVO>> getContractHistoryPage(@Valid ContractHistoryPageReqVO pageReqVO) {
|
||||
PageResult<ContractHistoryRespVO> pageResult = contractHistoryService.getContractHistoryPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出历史合同 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-history:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContractHistoryExcel(@Valid ContractHistoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContractHistoryRespVO> list = contractHistoryService.getContractHistoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "历史合同.xls", "数据", ContractHistoryRespVO.class,
|
||||
BeanUtils.toBean(list, ContractHistoryRespVO.class));
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
@Schema(description = "管理后台 - 历史合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ContractHistoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "合同编号")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "合同名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同状态", example = "1")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private String processStatus;
|
||||
|
||||
}
|
@@ -0,0 +1,169 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 历史合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractHistoryRespVO {
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目经理", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目经理")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "分包合同提示时间")
|
||||
@ExcelProperty("分包合同提示时间")
|
||||
private LocalDateTime ReminderTime;
|
||||
|
||||
@Schema(description = "暂定结算数")
|
||||
@ExcelProperty("暂定结算数")
|
||||
private BigDecimal provisionalSettlement;
|
||||
|
||||
@Schema(description = "出图公司", requiredMode = Schema.RequiredMode.REQUIRED,example = "***设计院")
|
||||
@ExcelProperty("出图公司")
|
||||
private String drawingCompany;
|
||||
|
||||
@Schema(description = "预计合同金额", requiredMode = Schema.RequiredMode.REQUIRED,example = "200.0000")
|
||||
@ExcelProperty("预计合同金额")
|
||||
private BigDecimal expectedContractAmount;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
@ExcelProperty("流程实体id")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("合同类型")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "合同拟定时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同拟定时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "合同用印时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同用印时间")
|
||||
private LocalDateTime printingTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("合同状态")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "计费方式", example = "2")
|
||||
@ExcelProperty("计费方式")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同url")
|
||||
private String contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty("资金来源")
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "优惠", example = "18154")
|
||||
@ExcelProperty("优惠")
|
||||
private String discount;
|
||||
|
||||
@Schema(description = "是否联合体")
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "占主合同比例")
|
||||
@ExcelProperty("占主合同比例")
|
||||
private String extProportion;
|
||||
|
||||
@Schema(description = "审定金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private String reviewFileUrl;
|
||||
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费")
|
||||
@ExcelProperty("前期费")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designAmount;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "测量费")
|
||||
@ExcelProperty("测量费")
|
||||
private BigDecimal measurementFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "合同", example = "20704")
|
||||
@ExcelProperty("合同")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@ExcelProperty("流程状态")
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 历史合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractHistorySaveReqVO {
|
||||
|
||||
|
||||
@Schema(description = "流程实体id", example = "12536")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private String processStatus;
|
||||
|
||||
@Schema(description = "合同", example = "20704")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import cn.iocoder.yudao.module.cms.service.contractouts.ContractOutsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Tag(name = "管理后台 - 外包合同关联")
|
||||
@RestController
|
||||
@RequestMapping("/cms/contract-outs")
|
||||
@Validated
|
||||
public class ContractOutsController {
|
||||
|
||||
@Resource
|
||||
private ContractOutsService contractOutsService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建外包合同关联")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:create')")
|
||||
public CommonResult<Long> createContractOuts(@Valid @RequestBody ContractOutsSaveReqVO createReqVO) {
|
||||
return success(contractOutsService.createContractOuts(getLoginUserId(),createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外包合同关联")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:update')")
|
||||
public CommonResult<Boolean> updateContractOuts(@Valid @RequestBody ContractOutsSaveReqVO updateReqVO) {
|
||||
contractOutsService.updateContractOuts(getLoginUserId(),updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外包合同关联")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:delete')")
|
||||
public CommonResult<Boolean> deleteContractOuts(@RequestParam("id") Long id) {
|
||||
contractOutsService.deleteContractOuts(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外包合同关联")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:query')")
|
||||
public CommonResult<ContractOutsRespVO> getContractOuts(@RequestParam("id") Long id) {
|
||||
ContractOutsDO contractOuts = contractOutsService.getContractOuts(id);
|
||||
return success(BeanUtils.toBean(contractOuts, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外包合同关联分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:query')")
|
||||
public CommonResult<PageResult<ContractOutsRespVO>> getContractOutsPage(@Valid ContractOutsPageReqVO pageReqVO) {
|
||||
PageResult<ContractOutsDO> pageResult = contractOutsService.getContractOutsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外包合同关联 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:contract-outs:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContractOutsExcel(@Valid ContractOutsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContractOutsDO> list = contractOutsService.getContractOutsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外包合同关联.xls", "数据", ContractOutsRespVO.class,
|
||||
BeanUtils.toBean(list, ContractOutsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ContractOutsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "合同id", example = "16187")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", example = "9277")
|
||||
private Long outsContractId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContractOutsRespVO {
|
||||
|
||||
@Schema(description = "合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16187")
|
||||
@ExcelProperty("合同id")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9277")
|
||||
@ExcelProperty("外包合同id")
|
||||
private Long outsContractId;
|
||||
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContractOutsSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7688")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16187")
|
||||
@NotNull(message = "合同id不能为空")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "外包合同id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9277")
|
||||
@NotNull(message = "外包合同id不能为空")
|
||||
private Long outsContractId;
|
||||
|
||||
}
|
@@ -1,103 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.module.cms.service.customerCompany.CustomerCompanyService;
|
||||
|
||||
@Tag(name = "管理后台 - 客户公司")
|
||||
@RestController
|
||||
@RequestMapping("/cms/customer-company")
|
||||
@Validated
|
||||
public class CustomerCompanyController {
|
||||
|
||||
@Resource
|
||||
private CustomerCompanyService customerCompanyService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建客户公司")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:create')")
|
||||
public CommonResult<Long> createCustomerCompany(@Valid @RequestBody CustomerCompanySaveReqVO createReqVO) {
|
||||
return success(customerCompanyService.createCustomerCompany(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新客户公司")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:update')")
|
||||
public CommonResult<Boolean> updateCustomerCompany(@Valid @RequestBody CustomerCompanySaveReqVO updateReqVO) {
|
||||
customerCompanyService.updateCustomerCompany(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除客户公司")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:delete')")
|
||||
public CommonResult<Boolean> deleteCustomerCompany(@RequestParam("id") Long id) {
|
||||
customerCompanyService.deleteCustomerCompany(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得客户公司")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:query')")
|
||||
public CommonResult<CustomerCompanyRespVO> getCustomerCompany(@RequestParam("id") Long id) {
|
||||
CustomerCompanyDO customerCompany = customerCompanyService.getCustomerCompany(id);
|
||||
return success(BeanUtils.toBean(customerCompany, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得客户公司分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:query')")
|
||||
public CommonResult<PageResult<CustomerCompanyRespVO>> getCustomerCompanyPage(@Valid CustomerCompanyPageReqVO pageReqVO) {
|
||||
PageResult<CustomerCompanyDO> pageResult = customerCompanyService.getCustomerCompanyPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得客户公司列表")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:query')")
|
||||
public CommonResult<List<CustomerCompanyRespVO>> getCustomerCompanyList(CustomerCompanyPageReqVO reqVO) {
|
||||
List<CustomerCompanyDO> list = customerCompanyService.getCustomerCompanyList(reqVO);
|
||||
return success(BeanUtils.toBean(list, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出客户公司 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:customer-company:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCustomerCompanyExcel(@Valid CustomerCompanyPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CustomerCompanyDO> list = customerCompanyService.getCustomerCompanyPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "客户公司.xls", "数据", CustomerCompanyRespVO.class,
|
||||
BeanUtils.toBean(list, CustomerCompanyRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CustomerCompanyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "联系人", example = "张三")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "公司名称", example = "电力公司")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CustomerCompanyRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14907")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("联系人")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "电力公司")
|
||||
@ExcelProperty("公司名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
@ExcelProperty("电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 客户公司新增/修改 Request VO")
|
||||
@Data
|
||||
public class CustomerCompanySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14907")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "联系人不能为空")
|
||||
private String contacts;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "电力公司")
|
||||
@NotEmpty(message = "公司名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
}
|
@@ -0,0 +1,123 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.file.FileUtils;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractProcessInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.service.extContract.ExtContractService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 外部合同")
|
||||
@RestController
|
||||
@RequestMapping("/cms/ext-contract")
|
||||
@Validated
|
||||
public class ExtContractController {
|
||||
|
||||
@Resource
|
||||
private ExtContractService extContractService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建外部合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:create')")
|
||||
public CommonResult<Long> createExtContract(@Valid @RequestBody ExtContractSaveReqVO createReqVO) {
|
||||
return success(extContractService.createExtContract(getLoginUserId(), createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外部合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:update')")
|
||||
public CommonResult<Boolean> updateExtContract(@Valid @RequestBody ExtContractSaveReqVO updateReqVO) {
|
||||
extContractService.updateExtContract(getLoginUserId(), updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外部合同")
|
||||
@Parameter(name = "id", description = "外部合同编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:delete')")
|
||||
public CommonResult<Boolean> deleteExtContract(@RequestParam("id") Long id) {
|
||||
extContractService.deleteExtContract(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外部合同")
|
||||
@Parameter(name = "id", description = "外部合同编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:query')")
|
||||
public CommonResult<ExtContractRespVO> getExtContract(@RequestParam("id") Long id) {
|
||||
ExtContractDetailDO extContractDetailDO = extContractService.getContractDetail(id);
|
||||
ExtContractRespVO extContractRespVO = new ExtContractRespVO();
|
||||
org.springframework.beans.BeanUtils.copyProperties(extContractDetailDO, extContractRespVO, "contractFileUrl", "reviewFileUrl");
|
||||
extContractRespVO.setReviewFileUrl(FileUtils.covertJSONStringToFile(extContractDetailDO.getReviewFileUrl()));
|
||||
extContractRespVO.setContractFileUrl(FileUtils.covertJSONStringToFile(extContractDetailDO.getContractFileUrl()));
|
||||
|
||||
return success(extContractRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外部合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:query')")
|
||||
public CommonResult<PageResult<ExtContractRespVO>> getExtContractPage(@Valid ExtContractPageReqVO pageReqVO) {
|
||||
PageResult<ExtContractRespVO> pageResult = extContractService.getExtContractPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外部合同 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportExtContractExcel(@Valid ExtContractPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ExtContractRespVO> list = extContractService.getExtContractPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外部合同.xls", "数据", ExtContractRespVO.class,
|
||||
BeanUtils.toBean(list, ExtContractRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/create_process")
|
||||
@Operation(summary = "创建流程")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:create')")
|
||||
public CommonResult<String> createExtContractProcess(@RequestParam("id") Long id) {
|
||||
String processId = extContractService.createProcess(getLoginUserId(), id);
|
||||
return success(processId);
|
||||
}
|
||||
|
||||
@PostMapping("/get_process")
|
||||
@Operation(summary = "查询流程")
|
||||
@PreAuthorize("@ss.hasPermission('cms-ext:ext-contract:create')")
|
||||
public CommonResult<ExtContractProcessInstanceRespVO> getExtContractProcessInstance(@RequestParam("id") Long id) {
|
||||
ExtContractProcessInstanceRespVO process = extContractService.getProcess(id);
|
||||
return success(process);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ExtContractPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "项目id", example = "30598")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同类型", example = "1")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
}
|
@@ -0,0 +1,223 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExtContractProcessInstanceRespVO {
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "964")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16261")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
@ExcelProperty("客户名称")
|
||||
private String constructionSide;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "外部合同商议提示时间")
|
||||
@ExcelProperty("外部合同商议提示时间")
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty(value = "合同类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "预计签订时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预计签订时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费用")
|
||||
@ExcelProperty("前期费用")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "检测费")
|
||||
@ExcelProperty("检测费")
|
||||
private BigDecimal testingFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "计费方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "计费方式", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同附件url")
|
||||
@ExcelProperty("合同附件url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty(value = "资金来源", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "收费标准", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CHARGING_STANDARD)
|
||||
private String chargingStandard;
|
||||
|
||||
@Schema(description = "优惠", example = "123")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String processName;
|
||||
|
||||
@Schema(description = "流程实例的状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer processStatus; // 参见 BpmProcessInstanceStatusEnum 枚举
|
||||
|
||||
@Schema(description = "发起时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "持续时间", example = "1000")
|
||||
private Long durationInMillis;
|
||||
|
||||
/**
|
||||
* 发起流程的用户
|
||||
*/
|
||||
private User startUser;
|
||||
|
||||
/**
|
||||
* 当前审批中的任务
|
||||
*/
|
||||
private List<Task> tasks; // 仅在流程实例分页才返回
|
||||
|
||||
@Schema(description = "用户信息")
|
||||
@Data
|
||||
public static class User {
|
||||
|
||||
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long deptId;
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
@Schema(description = "流程任务")
|
||||
@Data
|
||||
public static class Task {
|
||||
|
||||
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,163 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExtContractRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "964")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16261")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
@ExcelProperty("客户名称")
|
||||
private String constructionSide;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "外部合同商议提示时间")
|
||||
@ExcelProperty("外部合同商议提示时间")
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty(value = "合同类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "预计签订时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预计签订时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费用")
|
||||
@ExcelProperty("前期费用")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "检测费")
|
||||
@ExcelProperty("检测费")
|
||||
private BigDecimal testingFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "计费方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "计费方式", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同附件url")
|
||||
@ExcelProperty("合同附件url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty(value = "资金来源", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "收费标准", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CHARGING_STANDARD)
|
||||
private String chargingStandard;
|
||||
|
||||
@Schema(description = "优惠", example = "123")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
}
|
@@ -0,0 +1,141 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extContract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class ExtContractSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "964")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16261")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty(value = "合同类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "预计签订时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预计签订时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费用")
|
||||
@ExcelProperty("前期费用")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "检测费")
|
||||
@ExcelProperty("检测费")
|
||||
private BigDecimal testingFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "计费方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty(value = "计费方式", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同附件url")
|
||||
@ExcelProperty("合同附件url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty(value = "资金来源", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "收费标准", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CHARGING_STANDARD)
|
||||
private String chargingStandard;
|
||||
|
||||
@Schema(description = "优惠", example = "123")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.file.FileUtils;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDetailDO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.service.extcontracthistory.ExtContractHistoryService;
|
||||
|
||||
@Tag(name = "管理后台 - 外部合同历史")
|
||||
@RestController
|
||||
@RequestMapping("/cms/ext-contract-history")
|
||||
@Validated
|
||||
public class ExtContractHistoryController {
|
||||
|
||||
@Resource
|
||||
private ExtContractHistoryService extContractHistoryService;
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外部合同历史历史")
|
||||
@PreAuthorize("@ss.hasPermission('cms:ext-contract-history:update')")
|
||||
public CommonResult<Boolean> updateExtContractHistory(@Valid @RequestBody ExtContractHistorySaveReqVO updateReqVO) {
|
||||
extContractHistoryService.updateExtContractHistory(getLoginUserId(),updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外部合同历史历史")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('cms:ext-contract-history:query')")
|
||||
public CommonResult<ExtContractHistoryRespVO> getExtContractHistory(@RequestParam("id") Long id) {
|
||||
ExtContractHistoryDetailDO extContractHistoryDetail = extContractHistoryService.getContractDetail(id);
|
||||
ExtContractHistoryRespVO contractHistoryRespVO = new ExtContractHistoryRespVO();
|
||||
org.springframework.beans.BeanUtils.copyProperties(extContractHistoryDetail, contractHistoryRespVO, "contractFileUrl", "reviewFileUrl");
|
||||
contractHistoryRespVO.setReviewFileUrl(FileUtils.covertJSONStringToFile(extContractHistoryDetail.getReviewFileUrl()));
|
||||
contractHistoryRespVO.setContractFileUrl(FileUtils.covertJSONStringToFile(extContractHistoryDetail.getContractFileUrl()));
|
||||
|
||||
return success(contractHistoryRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外部合同历史历史分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:ext-contract-history:query')")
|
||||
public CommonResult<PageResult<ExtContractHistoryRespVO>> getExtContractHistoryPage(@Valid ExtContractHistoryPageReqVO pageReqVO) {
|
||||
PageResult<ExtContractHistoryRespVO> pageResult = extContractHistoryService.getExtContractHistoryPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外部合同历史历史 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:ext-contract-history:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportExtContractHistoryExcel(@Valid ExtContractHistoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ExtContractHistoryRespVO> list = extContractHistoryService.getExtContractHistoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外部合同历史历史.xls", "数据", ExtContractHistoryRespVO.class,
|
||||
BeanUtils.toBean(list, ExtContractHistoryRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ExtContractHistoryPageReqVO extends PageParam {
|
||||
|
||||
|
||||
@Schema(description = "项目id", example = "6935")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "1")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_TYPE)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同状态", example = "1")
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "流程状态")
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private Integer processStatus;
|
||||
|
||||
@Schema(description = "外部合同id", example = "12093")
|
||||
private Long extContractId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,177 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExtContractHistoryRespVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "324")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "409")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
@Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SJ24001")
|
||||
@ExcelProperty("项目编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "客户名称")
|
||||
@ExcelProperty("客户名称")
|
||||
private String constructionSide;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "外部合同商议提示时间")
|
||||
@ExcelProperty("外部合同商议提示时间")
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty("合同类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "预计签订时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预计签订时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费用")
|
||||
@ExcelProperty("前期费用")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "检测费")
|
||||
@ExcelProperty("检测费")
|
||||
private BigDecimal testingFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "计费方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("计费方式")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同附件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同附件url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty(value = "资金来源", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "收费标准", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CHARGING_STANDARD)
|
||||
private String chargingStandard;
|
||||
|
||||
@Schema(description = "优惠", example = "28322")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "流程实体id", example = "24870")
|
||||
@ExcelProperty("流程实体id")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "流程状态", example = "2")
|
||||
@ExcelProperty(value = "流程状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private Integer processStatus;
|
||||
|
||||
@Schema(description = "外部合同id", example = "1808")
|
||||
@ExcelProperty("外部合同id")
|
||||
private Long extContractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,147 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 外部合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class ExtContractHistorySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "324")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "409")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同类型", example = "2")
|
||||
@ExcelProperty("合同类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "合同进展")
|
||||
@ExcelProperty("合同进展")
|
||||
private String progress;
|
||||
|
||||
@Schema(description = "预计签订时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预计签订时间")
|
||||
private LocalDateTime expectedTime;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
@ExcelProperty("归档时间")
|
||||
private LocalDateTime archiveTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String status;
|
||||
|
||||
@Schema(description = "合同总金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("合同总金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "前期费用")
|
||||
@ExcelProperty("前期费用")
|
||||
private BigDecimal preAmount;
|
||||
|
||||
@Schema(description = "设计费")
|
||||
@ExcelProperty("设计费")
|
||||
private BigDecimal designFee;
|
||||
|
||||
@Schema(description = "勘测费")
|
||||
@ExcelProperty("勘测费")
|
||||
private BigDecimal surveyFees;
|
||||
|
||||
@Schema(description = "检测费")
|
||||
@ExcelProperty("检测费")
|
||||
private BigDecimal testingFee;
|
||||
|
||||
@Schema(description = "其他费")
|
||||
@ExcelProperty("其他费")
|
||||
private BigDecimal otherFee;
|
||||
|
||||
@Schema(description = "计费方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("计费方式")
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "合同附件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同附件url")
|
||||
private List<FileDTO> contractFileUrl;
|
||||
|
||||
@Schema(description = "建安费")
|
||||
@ExcelProperty("建安费")
|
||||
private BigDecimal constructionCost;
|
||||
|
||||
@Schema(description = "资金来源")
|
||||
@ExcelProperty(value = "资金来源", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.SOURCE)
|
||||
private String source;
|
||||
|
||||
@Schema(description = "收费标准", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "收费标准", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CHARGING_STANDARD)
|
||||
private String chargingStandard;
|
||||
|
||||
@Schema(description = "优惠", example = "28322")
|
||||
@ExcelProperty("优惠")
|
||||
private BigDecimal discount;
|
||||
|
||||
@Schema(description = "是否联合体", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否联合体")
|
||||
private Boolean consortium;
|
||||
|
||||
@Schema(description = "联合体单位")
|
||||
@ExcelProperty("联合体单位")
|
||||
private String consortiumCompany;
|
||||
|
||||
@Schema(description = "合同商议提示")
|
||||
@ExcelProperty("合同商议提示")
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
@Schema(description = "审定金额")
|
||||
@ExcelProperty("审定金额")
|
||||
private BigDecimal approvedAmount;
|
||||
|
||||
@Schema(description = "审核文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("审核文件url")
|
||||
private List<FileDTO> reviewFileUrl;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
@Schema(description = "流程状态")
|
||||
@ExcelProperty(value = "流程状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.PROCESS_STATUS)
|
||||
private Integer processStatus;
|
||||
|
||||
@Schema(description = "外部合同id", example = "1808")
|
||||
@ExcelProperty("外部合同id")
|
||||
private Long extContractId;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontract;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.service.outscontract.OutsContractService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Tag(name = "管理后台 - 外包合同")
|
||||
@RestController
|
||||
@RequestMapping("/cms/outs-contract")
|
||||
@Validated
|
||||
public class OutsContractController {
|
||||
|
||||
@Resource
|
||||
private OutsContractService outsContractService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建外包合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:create')")
|
||||
public CommonResult<Long> createOutsContract(@Valid @RequestBody OutsContractSaveReqVO createReqVO) {
|
||||
return success(outsContractService.createOutsContract(getLoginUserId(),createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新外包合同")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:update')")
|
||||
public CommonResult<Boolean> updateOutsContract(@Valid @RequestBody OutsContractSaveReqVO updateReqVO) {
|
||||
outsContractService.updateOutsContract(getLoginUserId(),updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除外包合同")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:delete')")
|
||||
public CommonResult<Boolean> deleteOutsContract(@RequestParam("id") Long id) {
|
||||
outsContractService.deleteOutsContract(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得外包合同")
|
||||
@Parameter(name = "id", description = "主合同编号", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:query')")
|
||||
public CommonResult<OutsContractRespVO> getOutsContract(@RequestParam("id") Long id) {
|
||||
OutsContractRespVO outsContractRespVO = outsContractService.getOutsContract(id);
|
||||
return success(outsContractRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得外包合同分页")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:query')")
|
||||
public CommonResult<PageResult<OutsContractRespVO>> getOutsContractPage(@Valid OutsContractPageReqVO pageReqVO) {
|
||||
PageResult<OutsContractRespVO> pageResult = outsContractService.getOutsContractPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出外包合同 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('cms:outs-contract:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportOutsContractExcel(@Valid OutsContractPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OutsContractRespVO> list = outsContractService.getOutsContractPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "外包合同.xls", "数据", OutsContractRespVO.class,
|
||||
BeanUtils.toBean(list, OutsContractRespVO.class));
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OutsContractPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "项目id", example = "27415")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主合同id", example = "19816")
|
||||
private Long contractId;
|
||||
|
||||
@Schema(description = "计费类型", example = "2")
|
||||
@DictFormat(DictTypeConstants.COUNT_TYPE)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "专业")
|
||||
@DictFormat(DictTypeConstants.OUTS_CONTRACT_MAJOR)
|
||||
private String major;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] signingTime;
|
||||
|
||||
@Schema(description = "结算数")
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
private String contractFileUrl;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,91 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class OutsContractRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2034")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27415")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "主合同id", example = "19816")
|
||||
@ExcelProperty("主合同id")
|
||||
private Long contractId;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal outsAmount;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
@ExcelProperty(value = "类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "专业")
|
||||
@ExcelProperty(value = "专业", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.OUTS_CONTRACT_MAJOR)
|
||||
private String major;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同文件url")
|
||||
private String contractFileUrl;
|
||||
|
||||
|
||||
@Schema(description = "外包单位")
|
||||
@ExcelProperty("外包单位")
|
||||
private String outsCompany;
|
||||
|
||||
@Schema(description = "外包合同金额")
|
||||
@ExcelProperty("外包合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "外包合同编号")
|
||||
@ExcelProperty("外包合同编号")
|
||||
private Integer code;
|
||||
|
||||
@Schema(description = "最终外包金额")
|
||||
@ExcelProperty("最终外包金额")
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.cms.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 外包合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class OutsContractSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2034")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27415")
|
||||
@ExcelProperty("项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "主合同id", example = "19816")
|
||||
@ExcelProperty("主合同id")
|
||||
private Long contractId;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "合同名称", example = "张三")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "主控部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产一部")
|
||||
@ExcelProperty("主控部门")
|
||||
private String trackingDep;
|
||||
|
||||
@Schema(description = "项目负责人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("项目负责人")
|
||||
private String projectManager;
|
||||
|
||||
@Schema(description = "签订合同总额")
|
||||
@ExcelProperty("签订合同总额")
|
||||
private BigDecimal outsAmount;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
@ExcelProperty(value = "类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.CONTRACT_STATUS)
|
||||
private String countType;
|
||||
|
||||
@Schema(description = "专业")
|
||||
@ExcelProperty(value = "专业", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.OUTS_CONTRACT_MAJOR)
|
||||
private String major;
|
||||
|
||||
@Schema(description = "签订时间")
|
||||
@ExcelProperty("签订时间")
|
||||
private LocalDateTime signingTime;
|
||||
|
||||
@Schema(description = "合同文件url", example = "https://www.iocoder.cn")
|
||||
@ExcelProperty("合同文件url")
|
||||
private String contractFileUrl;
|
||||
|
||||
|
||||
@Schema(description = "外包单位")
|
||||
@ExcelProperty("外包单位")
|
||||
private String outsCompany;
|
||||
|
||||
@Schema(description = "外包合同金额")
|
||||
@ExcelProperty("外包合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "外包合同编号")
|
||||
@ExcelProperty("外包合同编号")
|
||||
private Integer code;
|
||||
|
||||
@Schema(description = "最终外包金额")
|
||||
@ExcelProperty("最终外包金额")
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
@Schema(description = "最后编辑人")
|
||||
@ExcelProperty("最后编辑人")
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.FileDTO;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 合同管理 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cms_contract")
|
||||
@KeySequence("cms_contract_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 外部合同id
|
||||
*/
|
||||
private Long extContractId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 合同进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 合同拟定时间
|
||||
*/
|
||||
private LocalDateTime expectedTime;
|
||||
/**
|
||||
* 合同用印时间
|
||||
*/
|
||||
private LocalDateTime printingTime;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archiveTime;
|
||||
/**
|
||||
* 合同状态
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 签订合同总额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 计费方式
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 暂定结算数
|
||||
*/
|
||||
private BigDecimal provisionalSettlement;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 合同url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 建安费
|
||||
*/
|
||||
private BigDecimal constructionCost;
|
||||
/**
|
||||
* 资金来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 优惠
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 是否联合体
|
||||
*/
|
||||
private Boolean consortium;
|
||||
/**
|
||||
* 联合体单位
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
/**
|
||||
* 占主合同比例
|
||||
*/
|
||||
private BigDecimal extProportion;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
/**
|
||||
* 审核文件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contract;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author wyw
|
||||
* @description
|
||||
* @date 2024/8/14
|
||||
*/
|
||||
@Data
|
||||
public class ContractDetailDO extends ContractDO {
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 跟踪部门
|
||||
*/
|
||||
private String trackingDep;
|
||||
|
||||
/**
|
||||
* 出图公司
|
||||
*/
|
||||
private String drawingCompany;
|
||||
/**
|
||||
* 预计公司合同总金额
|
||||
*/
|
||||
private BigDecimal expectedContractAmount;
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectManager;
|
||||
|
||||
/**
|
||||
* 合同商议提示
|
||||
*/
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,143 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 历史合同 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cms_contract_history")
|
||||
@KeySequence("cms_contract_history_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractHistoryDO extends BaseDO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
/**
|
||||
* 该合同的id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
/**
|
||||
* 流程实体id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 合同进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 合同拟定时间
|
||||
*/
|
||||
private LocalDateTime expectedTime;
|
||||
/**
|
||||
* 合同用印时间
|
||||
*/
|
||||
private LocalDateTime printingTime;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archiveTime;
|
||||
/**
|
||||
* 合同状态
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 签订合同总额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 计费方式
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 暂定结算数
|
||||
*/
|
||||
private BigDecimal provisionalSettlement;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 合同url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 建安费
|
||||
*/
|
||||
private BigDecimal constructionCost;
|
||||
/**
|
||||
* 资金来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 优惠
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 是否联合体
|
||||
*/
|
||||
private Boolean consortium;
|
||||
/**
|
||||
* 联合体单位
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
/**
|
||||
* 占主合同比例
|
||||
*/
|
||||
private BigDecimal extProportion;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
/**
|
||||
* 审核文件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ContractHistoryDetailDO extends ContractHistoryDO {
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 跟踪部门
|
||||
*/
|
||||
private String trackingDep;
|
||||
|
||||
/**
|
||||
* 出图公司
|
||||
*/
|
||||
private String drawingCompany;
|
||||
/**
|
||||
* 预计公司合同总金额
|
||||
*/
|
||||
private BigDecimal expectedContractAmount;
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectManager;
|
||||
|
||||
/**
|
||||
* 合同商议提示
|
||||
*/
|
||||
private LocalDateTime reminderTime;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.contractouts;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 外包合同关联 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_contract_outs")
|
||||
@KeySequence("cms_contract_outs_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ContractOutsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 外包合同id
|
||||
*/
|
||||
private Long outsContractId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updater;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
@@ -1,9 +1,6 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
|
@@ -0,0 +1,145 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extcontract;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外部合同管理 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cms_ext_contract")
|
||||
@KeySequence("cms_ext_contract_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ExtContractDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 合同类型
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 合同进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 预计签订时间
|
||||
*/
|
||||
private LocalDateTime expectedTime;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archiveTime;
|
||||
/**
|
||||
* 状态
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 合同总金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 前期费用
|
||||
*/
|
||||
private BigDecimal preAmount;
|
||||
/**
|
||||
* 设计费
|
||||
*/
|
||||
private BigDecimal designFee;
|
||||
/**
|
||||
* 勘测费
|
||||
*/
|
||||
private BigDecimal surveyFees;
|
||||
/**
|
||||
* 检测费
|
||||
*/
|
||||
private BigDecimal testingFee;
|
||||
/**
|
||||
* 其他费
|
||||
*/
|
||||
private BigDecimal otherFee;
|
||||
/**
|
||||
* 计费方式
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 合同附件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 建安费
|
||||
*/
|
||||
private BigDecimal constructionCost;
|
||||
/**
|
||||
* 资金来源
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 收费标准
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String chargingStandard;
|
||||
/**
|
||||
* 优惠
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 是否联合体
|
||||
*/
|
||||
private Boolean consortium;
|
||||
/**
|
||||
* 联合体单位
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
/**
|
||||
* 合同商议提示
|
||||
*/
|
||||
private LocalDateTime reminderTime;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
/**
|
||||
* 审核文件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extcontract;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ExtContractDetailDO extends ExtContractDO {
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 建设方
|
||||
*/
|
||||
private String constructionSide;
|
||||
|
||||
/**
|
||||
* 主控部门
|
||||
*/
|
||||
private String trackingDep;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectManager;
|
||||
|
||||
/**
|
||||
* 外部合同商议提示
|
||||
*/
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
}
|
@@ -0,0 +1,156 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory;
|
||||
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外部合同历史 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("cms_ext_contract_history")
|
||||
@KeySequence("cms_ext_contract_history_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ExtContractHistoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 合同类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 合同进展
|
||||
*/
|
||||
private String progress;
|
||||
/**
|
||||
* 预计签订时间
|
||||
*/
|
||||
private LocalDateTime expectedTime;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archiveTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 合同总金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 前期费用
|
||||
*/
|
||||
private BigDecimal preAmount;
|
||||
/**
|
||||
* 设计费
|
||||
*/
|
||||
private BigDecimal designFee;
|
||||
/**
|
||||
* 勘测费
|
||||
*/
|
||||
private BigDecimal surveyFees;
|
||||
/**
|
||||
* 检测费
|
||||
*/
|
||||
private BigDecimal testingFee;
|
||||
/**
|
||||
* 其他费
|
||||
*/
|
||||
private BigDecimal otherFee;
|
||||
/**
|
||||
* 计费方式
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 合同附件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 建安费
|
||||
*/
|
||||
private BigDecimal constructionCost;
|
||||
/**
|
||||
* 资金来源
|
||||
*/
|
||||
private String source;
|
||||
/**
|
||||
* 收费标准
|
||||
*
|
||||
*/
|
||||
private String chargingStandard;
|
||||
/**
|
||||
* 优惠
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 是否联合体
|
||||
*/
|
||||
private Boolean consortium;
|
||||
/**
|
||||
* 联合体单位
|
||||
*/
|
||||
private String consortiumCompany;
|
||||
/**
|
||||
* 合同商议提示
|
||||
*/
|
||||
private LocalDateTime reminderTime;
|
||||
/**
|
||||
* 审定金额
|
||||
*/
|
||||
private BigDecimal approvedAmount;
|
||||
/**
|
||||
* 审核文件url
|
||||
*/
|
||||
private String reviewFileUrl;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
/**
|
||||
* 流程实体id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private Integer processStatus;
|
||||
/**
|
||||
* 外部合同id
|
||||
*/
|
||||
private Long extContractId;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class ExtContractHistoryDetailDO extends ExtContractHistoryDO {
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 建设方
|
||||
*/
|
||||
private String constructionSide;
|
||||
|
||||
/**
|
||||
* 主控部门
|
||||
*/
|
||||
private String trackingDep;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
private String projectManager;
|
||||
|
||||
/**
|
||||
* 外部合同商议提示
|
||||
*/
|
||||
private LocalDateTime exReminderTime;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,78 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.outscontract;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 外包合同 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_outs_contract")
|
||||
@KeySequence("cms_outs_contract_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutsContractDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 主合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
/**
|
||||
* 类型
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 专业
|
||||
* 枚举 {@link cn.iocoder.yudao.module.cms.enums.DictTypeConstants}3
|
||||
*/
|
||||
private String major;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 合同文件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 外包单位
|
||||
*/
|
||||
private String outsCompany;
|
||||
/**
|
||||
* 外包合同金额
|
||||
*/
|
||||
private BigDecimal outsAmount;
|
||||
/**
|
||||
* 外包合同编号
|
||||
*/
|
||||
private Integer outsCode;
|
||||
/**
|
||||
* 最终外包金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
/**
|
||||
* 最后编辑人
|
||||
*/
|
||||
private String finalEditor;
|
||||
|
||||
}
|
@@ -0,0 +1,94 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.dataobject.outscontracthistory;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 外包合同历史 DO
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@TableName("cms_outs_contract_history")
|
||||
@KeySequence("cms_outs_contract_history_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OutsContractHistoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 主合同id
|
||||
*/
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*
|
||||
* 枚举 {@link // TODO contract_billing_type 对应的类}
|
||||
*/
|
||||
private String countType;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 专业
|
||||
*
|
||||
* 枚举 {@link //TODO major 对应的类}
|
||||
*/
|
||||
private String major;
|
||||
/**
|
||||
* 流程实体id
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 签订时间
|
||||
*/
|
||||
private LocalDateTime signingTime;
|
||||
/**
|
||||
* 结算数
|
||||
*/
|
||||
private BigDecimal settlementAmount;
|
||||
/**
|
||||
* 合同文件url
|
||||
*/
|
||||
private String contractFileUrl;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String processStatus;
|
||||
/**
|
||||
* 外包合同id
|
||||
*/
|
||||
private Long outsContractId;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.contract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.*;
|
||||
|
||||
/**
|
||||
* 合同 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractMapper extends BaseMapperX<ContractDO> {
|
||||
|
||||
default PageResult<ContractDO> selectPage(ContractPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractDO>()
|
||||
.eqIfPresent(ContractDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ContractDO::getProjectId,reqVO.getProjectId())
|
||||
.eqIfPresent(ContractDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(ContractDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ContractDO::getCountType, reqVO.getCountType())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.contractHistory;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
|
||||
/**
|
||||
* 历史合同 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractHistoryMapper extends BaseMapperX<ContractHistoryDO> {
|
||||
|
||||
default PageResult<ContractHistoryDO> selectPage(ContractHistoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractHistoryDO>()
|
||||
.eqIfPresent(ContractHistoryDO::getProcessInstanceId, reqVO.getProcessInstanceId())
|
||||
.likeIfPresent(ContractHistoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ContractHistoryDO::getProjectId,reqVO.getProjectId())
|
||||
.eqIfPresent(ContractHistoryDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ContractHistoryDO::getProgress, reqVO.getProgress())
|
||||
.eqIfPresent(ContractHistoryDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ContractHistoryDO::getCountType, reqVO.getCountType())
|
||||
.eqIfPresent(ContractHistoryDO::getProcessStatus, reqVO.getProcessStatus())
|
||||
.eqIfPresent(ContractHistoryDO::getContractId, reqVO.getContractId()));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.contractouts;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Mapper
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContractOutsMapper extends BaseMapperX<ContractOutsDO> {
|
||||
|
||||
default PageResult<ContractOutsDO> selectPage(ContractOutsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContractOutsDO>()
|
||||
.eqIfPresent(ContractOutsDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(ContractOutsDO::getOutsContractId, reqVO.getOutsContractId())
|
||||
.orderByDesc(ContractOutsDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.customerCompany;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
|
||||
/**
|
||||
* 客户公司 Mapper
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Mapper
|
||||
public interface CustomerCompanyMapper extends BaseMapperX<CustomerCompanyDO> {
|
||||
|
||||
default PageResult<CustomerCompanyDO> selectPage(CustomerCompanyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<CustomerCompanyDO>()
|
||||
.likeIfPresent(CustomerCompanyDO::getContacts, reqVO.getContacts())
|
||||
.eqIfPresent(CustomerCompanyDO::getCreateTime, reqVO.getCreateTime())
|
||||
.likeIfPresent(CustomerCompanyDO::getName, reqVO.getName())
|
||||
.eqIfPresent(CustomerCompanyDO::getAddress, reqVO.getAddress())
|
||||
.eqIfPresent(CustomerCompanyDO::getPhone, reqVO.getPhone())
|
||||
.orderByDesc(CustomerCompanyDO::getId));
|
||||
}
|
||||
|
||||
default List<CustomerCompanyDO> selectList(CustomerCompanyPageReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<CustomerCompanyDO>());
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.extContract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 外部合同 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ExtContractMapper extends BaseMapperX<ExtContractDO> {
|
||||
|
||||
default PageResult<ExtContractDO> selectPage(ExtContractPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ExtContractDO>()
|
||||
.eqIfPresent(ExtContractDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(ExtContractDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ExtContractDO::getStatus, reqVO.getStatus())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.extcontracthistory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo.*;
|
||||
|
||||
/**
|
||||
* 外部合同历史 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface ExtContractHistoryMapper extends BaseMapperX<ExtContractHistoryDO> {
|
||||
|
||||
default PageResult<ExtContractHistoryDO> selectPage(ExtContractHistoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ExtContractHistoryDO>()
|
||||
.eqIfPresent(ExtContractHistoryDO::getProjectId, reqVO.getProjectId())
|
||||
.likeIfPresent(ExtContractHistoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ExtContractHistoryDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ExtContractHistoryDO::getStatus, reqVO.getStatus())
|
||||
|
||||
.eqIfPresent(ExtContractHistoryDO::getProcessStatus, reqVO.getProcessStatus())
|
||||
.eqIfPresent(ExtContractHistoryDO::getExtContractId, reqVO.getExtContractId())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.cms.dal.mysql.outscontract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.outscontract.OutsContractDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 外包合同 Mapper
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Mapper
|
||||
public interface OutsContractMapper extends BaseMapperX<OutsContractDO> {
|
||||
|
||||
default PageResult<OutsContractDO> selectPage(OutsContractPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OutsContractDO>()
|
||||
.eqIfPresent(OutsContractDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(OutsContractDO::getContractId, reqVO.getContractId())
|
||||
.eqIfPresent(OutsContractDO::getCountType, reqVO.getCountType())
|
||||
.eqIfPresent(OutsContractDO::getOutsAmount, reqVO.getAmount())
|
||||
.eqIfPresent(OutsContractDO::getOutsCode, reqVO.getCode())
|
||||
.eqIfPresent(OutsContractDO::getMajor, reqVO.getMajor())
|
||||
.betweenIfPresent(OutsContractDO::getSigningTime, reqVO.getSigningTime())
|
||||
.eqIfPresent(OutsContractDO::getContractFileUrl, reqVO.getContractFileUrl())
|
||||
.orderByDesc(OutsContractDO::getId));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contract;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDetailDO;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合同 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ContractService {
|
||||
|
||||
/**
|
||||
* 创建合同
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createContract(Long loginUserId,@Valid ContractSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContract(Long loginUserId,@Valid ContractSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除合同
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 合同分页
|
||||
*/
|
||||
PageResult<ContractRespVO> getContractPage(ContractPageReqVO pageReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 判断合同是否存在
|
||||
* @param id 合同id
|
||||
*/
|
||||
void validateContractExists(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 得到合同detail信息
|
||||
* @param id 合同id
|
||||
* @return
|
||||
*/
|
||||
ContractDetailDO getContractDetail(Long id);
|
||||
|
||||
}
|
@@ -0,0 +1,152 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contract;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.file.FileUtils;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contract.ContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.service.extContract.ExtContractService;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.ProjectScheduleApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.dto.ProjectScheduleDetailDTO;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.ProjectTrackingApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.dto.ProjectTrackingDetailDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contract.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contract.ContractDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.USER_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 合同 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractServiceImpl implements ContractService {
|
||||
|
||||
@Resource
|
||||
private ContractMapper contractMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private ProjectScheduleApi projectScheduleApi;
|
||||
|
||||
@Resource
|
||||
private ProjectTrackingApi projectTrackingApi;
|
||||
|
||||
@Resource
|
||||
private ExtContractService extContractService;
|
||||
|
||||
|
||||
@Override
|
||||
public Long createContract(Long loginUserId, ContractSaveReqVO createReqVO) {
|
||||
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
if (userName == null) {
|
||||
throw exception(USER_NOT_EXISTS);
|
||||
}
|
||||
//校验,项目是否存在
|
||||
Long projectId = createReqVO.getProjectId();
|
||||
projectTrackingApi.validateProjectExists(projectId);
|
||||
String name = createReqVO.getName();
|
||||
String trimName = name.trim();
|
||||
List<ContractDO> projectList = contractMapper.selectList("project_id", projectId);
|
||||
for (ContractDO contractDO : projectList) {
|
||||
if (contractDO.getName().equals(trimName)){
|
||||
throw exception(CONTRACT_ALREADY_EXISTS);
|
||||
}
|
||||
}
|
||||
ContractDO contract = BeanUtils.toBean(createReqVO, ContractDO.class);
|
||||
contract.setReviewFileUrl(FileUtils.covertFileToJSONString(createReqVO.getReviewFileUrl()));
|
||||
contract.setContractFileUrl(FileUtils.covertFileToJSONString(createReqVO.getContractFileUrl()));
|
||||
contract.setCreator(userName);
|
||||
contract.setUpdater(userName);
|
||||
contractMapper.insert(contract);
|
||||
//返回
|
||||
return contract.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContract(Long loginUserId, ContractSaveReqVO updateReqVO) {
|
||||
//校验
|
||||
validateContractExists(updateReqVO.getId());
|
||||
projectTrackingApi.validateProjectExists(updateReqVO.getProjectId());
|
||||
// 更新
|
||||
ContractDO updateObj = BeanUtils.toBean(updateReqVO, ContractDO.class);
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
if (userName == null) {
|
||||
throw exception(USER_NOT_EXISTS);
|
||||
}
|
||||
updateObj.setUpdater(userName);
|
||||
contractMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContract(Long id) {
|
||||
// 校验存在
|
||||
validateContractExists(id);
|
||||
// 删除
|
||||
contractMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ContractRespVO> getContractPage(ContractPageReqVO pageReqVO) {
|
||||
PageResult<ContractDO> contractDOPage = contractMapper.selectPage(pageReqVO);
|
||||
List<ContractDO> list = contractDOPage.getList();
|
||||
List<ContractDetailDO> contractRespVOList = new ArrayList<>();
|
||||
|
||||
for (ContractDO contractDO : list) {
|
||||
Long id = contractDO.getId();
|
||||
ContractDetailDO contractDetail = getContractDetail(id);
|
||||
contractRespVOList.add(contractDetail);
|
||||
}
|
||||
List<ContractRespVO> respVOList = BeanUtils.toBean(contractRespVOList, ContractRespVO.class);
|
||||
PageResult<ContractRespVO> pageResult = new PageResult<>();
|
||||
pageResult.setList(respVOList);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ContractDetailDO getContractDetail(Long id) {
|
||||
ContractDetailDO contractDetailDO = new ContractDetailDO();
|
||||
ContractDO contractDO = contractMapper.selectById(id);
|
||||
//校验
|
||||
if (contractDO == null) {
|
||||
throw exception(CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
Long extContractId = contractDO.getExtContractId();
|
||||
Long projectId = contractDO.getProjectId();
|
||||
projectTrackingApi.validateProjectExists(projectId);
|
||||
ProjectScheduleDetailDTO projectScheduleDetail = projectScheduleApi.getProjectScheduleDetail(projectId);
|
||||
ProjectTrackingDetailDTO projectTracking = projectTrackingApi.getProjectTracking(projectId);
|
||||
contractDetailDO.setReminderTime(extContractService.getContractDetail(extContractId).getReminderTime());
|
||||
BeanUtil.copyProperties(contractDO, contractDetailDO);
|
||||
BeanUtil.copyProperties(projectTracking,contractDetailDO);
|
||||
BeanUtil.copyProperties(projectScheduleDetail,contractDetailDO);
|
||||
|
||||
return contractDetailDO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void validateContractExists(Long id) {
|
||||
if (contractMapper.selectById(id) == null) {
|
||||
throw exception(CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractHistory;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 历史合同 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ContractHistoryService {
|
||||
|
||||
/**
|
||||
* 更新历史合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContractHistory(Long loginUserId,@Valid ContractHistorySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 获得历史合同
|
||||
*
|
||||
* @param contractId 现有合同编号
|
||||
* @return 历史合同
|
||||
*/
|
||||
ContractHistoryRespVO getContractHistory(Long contractId);
|
||||
|
||||
/**
|
||||
* 获得历史合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 历史合同分页
|
||||
*/
|
||||
PageResult<ContractHistoryRespVO> getContractHistoryPage(ContractHistoryPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractHistory;
|
||||
import cn.iocoder.yudao.module.cms.enums.ContractStatusEnum;
|
||||
import cn.iocoder.yudao.module.cms.enums.ContractTypeEnum;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractHistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractHistory.ContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contractHistory.ContractHistoryMapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.USER_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 历史合同 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractHistoryServiceImpl implements ContractHistoryService {
|
||||
|
||||
@Resource
|
||||
private ContractHistoryMapper contractHistoryMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateContractHistory(Long loginUserId,ContractHistorySaveReqVO updateReqVO) {
|
||||
//校验
|
||||
if (loginUserId == null){
|
||||
throw exception(USER_NOT_EXISTS);
|
||||
}
|
||||
// 更新
|
||||
ContractHistoryDO updateObj = BeanUtils.toBean(updateReqVO, ContractHistoryDO.class);
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
updateObj.setUpdater(userName);
|
||||
contractHistoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ContractHistoryRespVO getContractHistory(Long id) {
|
||||
//校验
|
||||
if (id == null) {
|
||||
throw exception(CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
ContractHistoryDO contractHistoryDO = contractHistoryMapper.selectById(id);
|
||||
if (contractHistoryDO == null) {
|
||||
throw exception(CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Long projectId = contractHistoryDO.getProjectId();
|
||||
|
||||
if (projectId == null) {
|
||||
throw exception(PROJECT_NOT_EXISTS);
|
||||
}
|
||||
ContractHistoryRespVO contractHistoryRespVO = BeanUtils.toBean(contractHistoryDO, ContractHistoryRespVO.class);
|
||||
|
||||
// 需要联表查询
|
||||
// 1.项目编号 pms_project 直接 √
|
||||
// 2.主控部门(跟踪部门) pms_project找到的是id 需要联表 √
|
||||
// 3.项目经理 pms_project找到的是id 需要联表 √
|
||||
// 4.出图公司 pms_project 直接 √
|
||||
// 5.预计合同金额 pms_project 直接 √
|
||||
// 6.分包合同商议提示 √
|
||||
// 7.暂定结算数 √
|
||||
|
||||
|
||||
contractHistoryRespVO.setType(ContractTypeEnum.getNoByCode(contractHistoryRespVO.getType()));
|
||||
contractHistoryRespVO.setStatus(ContractStatusEnum.getNoByCode(contractHistoryRespVO.getStatus()));
|
||||
contractHistoryRespVO.setCountType(ContractStatusEnum.getNoByCode(contractHistoryRespVO.getCountType()));
|
||||
contractHistoryRespVO.setSource(ContractStatusEnum.getNoByCode(contractHistoryRespVO.getSource()));
|
||||
|
||||
//分包合同商议提示 TODO 待优化
|
||||
// ExtContractDO extContractDO = extContractMapper.selectOne("project_id", projectId);
|
||||
// LocalDateTime reminderTime = extContractDO.getReminderTime();
|
||||
contractHistoryRespVO.setReminderTime(null);
|
||||
|
||||
//暂定结算数
|
||||
|
||||
|
||||
|
||||
return contractHistoryRespVO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<ContractHistoryRespVO> getContractHistoryPage(ContractHistoryPageReqVO pageReqVO) {
|
||||
//校验
|
||||
if (pageReqVO == null) {
|
||||
throw exception(PARAM_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Long projectId = pageReqVO.getProjectId();
|
||||
|
||||
PageResult<ContractHistoryDO> contractHistoryDOPageResult = contractHistoryMapper.selectPage(pageReqVO);
|
||||
List<ContractHistoryDO> pageResultList = contractHistoryDOPageResult.getList();
|
||||
List<ContractHistoryRespVO> contractHistoryRespVOS = new ArrayList<>();
|
||||
|
||||
|
||||
for (ContractHistoryDO contractHistoryDO : pageResultList) {
|
||||
Long id = contractHistoryDO.getId();
|
||||
ContractHistoryRespVO contractHistory = getContractHistory(id);
|
||||
contractHistoryRespVOS.add(contractHistory);
|
||||
}
|
||||
|
||||
PageResult<ContractHistoryRespVO> pageResult = new PageResult<>();
|
||||
pageResult.setList(contractHistoryRespVOS);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
|
||||
private void validateContractHistoryExists(Long id) {
|
||||
if (contractHistoryMapper.selectById(id) == null) {
|
||||
throw exception(CONTRACT_HISTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractouts;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Service 接口
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
public interface ContractOutsService {
|
||||
|
||||
/**
|
||||
* 创建外包合同关联
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createContractOuts(Long loginUserId ,@Valid ContractOutsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外包合同关联
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContractOuts(Long loginUserId,@Valid ContractOutsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外包合同关联
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteContractOuts(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同关联
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外包合同关联
|
||||
*/
|
||||
ContractOutsDO getContractOuts(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同关联分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外包合同关联分页
|
||||
*/
|
||||
PageResult<ContractOutsDO> getContractOutsPage(ContractOutsPageReqVO pageReqVO);
|
||||
|
||||
}
|
@@ -0,0 +1,116 @@
|
||||
package cn.iocoder.yudao.module.cms.service.contractouts;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.contractouts.vo.ContractOutsSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.contractouts.ContractOutsDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.contractouts.ContractOutsMapper;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.USER_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 外包合同关联 Service 实现类
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContractOutsServiceImpl implements ContractOutsService {
|
||||
|
||||
@Resource
|
||||
private ContractOutsMapper contractOutsMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Override
|
||||
public Long createContractOuts(Long loginUserId, ContractOutsSaveReqVO createReqVO) {
|
||||
ContractOutsDO outsDO = BeanUtils.toBean(createReqVO, ContractOutsDO.class);
|
||||
Long contractId = createReqVO.getContractId();
|
||||
Long outsContractId = createReqVO.getOutsContractId();
|
||||
if (contractId == null) {
|
||||
throw exception(CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
if (outsContractId == null) {
|
||||
throw exception(CONTRACT_OUTS_NOT_EXISTS);
|
||||
}
|
||||
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
//用户不存在
|
||||
if (userName == null || userName.isEmpty()) {
|
||||
throw exception(USER_NOT_EXISTS);
|
||||
}
|
||||
//如果这条记录不存在,则创建者就是登陆者,如果存在,只更新更新者,创建者不再改变
|
||||
QueryWrapper<ContractOutsDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("contract_id", contractId);
|
||||
queryWrapper.eq("outs_contract_id", outsContractId);
|
||||
Long count = contractOutsMapper.selectCount(queryWrapper);
|
||||
if (count >= 1) {
|
||||
throw exception(CONTRACT_OUTS_ALREADY_EXISTS);
|
||||
}
|
||||
ContractOutsDO contractOutsDO = contractOutsMapper.selectOne(queryWrapper);
|
||||
|
||||
if (contractOutsDO == null) {
|
||||
outsDO.setCreator(userName);
|
||||
outsDO.setUpdater(userName);
|
||||
}
|
||||
|
||||
// 返回
|
||||
return (long) contractOutsMapper.insert(outsDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContractOuts(Long loginUserId,ContractOutsSaveReqVO updateReqVO) {
|
||||
|
||||
// 校验存在
|
||||
validateContractOutsExists(updateReqVO.getId());
|
||||
if (loginUserId == null){
|
||||
throw exception(USER_NOT_EXISTS);
|
||||
}
|
||||
// 更新
|
||||
ContractOutsDO updateObj = BeanUtils.toBean(updateReqVO, ContractOutsDO.class);
|
||||
//校验
|
||||
ContractOutsDO contractOutsDO = contractOutsMapper.selectById(updateObj.getId());
|
||||
if (contractOutsDO == null) {
|
||||
throw exception(CONTRACT_OUTS_NOT_EXISTS);
|
||||
}
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
updateObj.setUpdater(userName);
|
||||
|
||||
contractOutsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContractOuts(Long id) {
|
||||
// 校验存在
|
||||
validateContractOutsExists(id);
|
||||
// 删除
|
||||
contractOutsMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateContractOutsExists(Long id) {
|
||||
if (contractOutsMapper.selectById(id) == null) {
|
||||
throw exception(CONTRACT_OUTS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContractOutsDO getContractOuts(Long id) {
|
||||
return contractOutsMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ContractOutsDO> getContractOutsPage(ContractOutsPageReqVO pageReqVO) {
|
||||
return contractOutsMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -1,61 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.customerCompany;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 客户公司 Service 接口
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface CustomerCompanyService {
|
||||
|
||||
/**
|
||||
* 创建客户公司
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createCustomerCompany(@Valid CustomerCompanySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新客户公司
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateCustomerCompany(@Valid CustomerCompanySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除客户公司
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteCustomerCompany(Long id);
|
||||
|
||||
/**
|
||||
* 获得客户公司
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 客户公司
|
||||
*/
|
||||
CustomerCompanyDO getCustomerCompany(Long id);
|
||||
|
||||
/**
|
||||
* 获得客户公司分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 客户公司分页
|
||||
*/
|
||||
PageResult<CustomerCompanyDO> getCustomerCompanyPage(CustomerCompanyPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得客户公司列表
|
||||
* @param reqVO 查询参数
|
||||
* @return 列表信息
|
||||
*/
|
||||
List<CustomerCompanyDO> getCustomerCompanyList(CustomerCompanyPageReqVO reqVO);
|
||||
}
|
@@ -1,79 +0,0 @@
|
||||
package cn.iocoder.yudao.module.cms.service.customerCompany;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.customerCompany.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.customerCompany.CustomerCompanyDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.customerCompany.CustomerCompanyMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 客户公司 Service 实现类
|
||||
*
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class CustomerCompanyServiceImpl implements CustomerCompanyService {
|
||||
|
||||
@Resource
|
||||
private CustomerCompanyMapper customerCompanyMapper;
|
||||
|
||||
@Override
|
||||
public Long createCustomerCompany(CustomerCompanySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
CustomerCompanyDO customerCompany = BeanUtils.toBean(createReqVO, CustomerCompanyDO.class);
|
||||
customerCompanyMapper.insert(customerCompany);
|
||||
// 返回
|
||||
return customerCompany.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCustomerCompany(CustomerCompanySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateCustomerCompanyExists(updateReqVO.getId());
|
||||
// 更新
|
||||
CustomerCompanyDO updateObj = BeanUtils.toBean(updateReqVO, CustomerCompanyDO.class);
|
||||
customerCompanyMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCustomerCompany(Long id) {
|
||||
// 校验存在
|
||||
validateCustomerCompanyExists(id);
|
||||
// 删除
|
||||
customerCompanyMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateCustomerCompanyExists(Long id) {
|
||||
if (customerCompanyMapper.selectById(id) == null) {
|
||||
throw exception(CUSTOMER_COMPANY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomerCompanyDO getCustomerCompany(Long id) {
|
||||
return customerCompanyMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<CustomerCompanyDO> getCustomerCompanyPage(CustomerCompanyPageReqVO pageReqVO) {
|
||||
return customerCompanyMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomerCompanyDO> getCustomerCompanyList(CustomerCompanyPageReqVO reqVO) {
|
||||
return customerCompanyMapper.selectList(reqVO);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,78 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extContract;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractProcessInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDetailDO;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 外部合同 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ExtContractService {
|
||||
|
||||
/**
|
||||
* 创建外部合同
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createExtContract(Long loginUserId,@Valid ExtContractSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外部合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateExtContract(Long loginUserId,@Valid ExtContractSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外部合同
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteExtContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得外部合同
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外部合同
|
||||
*/
|
||||
ExtContractDetailDO getContractDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得外部合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外部合同分页
|
||||
*/
|
||||
PageResult<ExtContractRespVO> getExtContractPage(ExtContractPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param loginUserId 当前登录的用户id
|
||||
* @param id 外部合同id
|
||||
* @return 流程id
|
||||
*/
|
||||
String createProcess(Long loginUserId,Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 判断外部合同是否存在
|
||||
* @param id 外部合同id
|
||||
*/
|
||||
void validateExtContractExists(Long id);
|
||||
|
||||
/**
|
||||
* 查询流程
|
||||
* @param id 外部合同id
|
||||
* @return
|
||||
*/
|
||||
ExtContractProcessInstanceRespVO getProcess(Long id);
|
||||
}
|
@@ -0,0 +1,212 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extContract;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.file.FileUtils;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceGetRespDTO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractProcessInstanceRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extContract.ExtContractMapper;
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extcontracthistory.ExtContractHistoryMapper;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.ProjectScheduleApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.dto.ProjectScheduleDetailDTO;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.ProjectTrackingApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.dto.ProjectTrackingDetailDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.PROCESS_INSTANCE_NOT_END;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 外部合同 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ExtContractServiceImpl implements ExtContractService {
|
||||
|
||||
/**
|
||||
* 外部合同审批流程定义
|
||||
*/
|
||||
public static final String PROCESS_KEY = "ext_contract_init";
|
||||
|
||||
@Resource
|
||||
private ExtContractMapper extContractMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private ProjectTrackingApi projectTrackingApi;
|
||||
|
||||
@Resource
|
||||
private ProjectScheduleApi projectScheduleApi;
|
||||
|
||||
@Resource
|
||||
private BpmProcessInstanceApi processInstanceApi;
|
||||
|
||||
@Resource
|
||||
private ExtContractHistoryMapper extContractHistoryMapper;
|
||||
|
||||
@Resource
|
||||
private BpmProcessInstanceApi bpmProcessInstanceApi;
|
||||
|
||||
@Override
|
||||
public Long createExtContract(Long loginUserId, ExtContractSaveReqVO createReqVO) {
|
||||
//插入外部合同表
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
//校验,项目是否存在
|
||||
String name = createReqVO.getName();
|
||||
String trimName = name.trim();
|
||||
Long projectId = createReqVO.getProjectId();
|
||||
projectTrackingApi.validateProjectExists(projectId);
|
||||
List<ExtContractDO> extContractList = extContractMapper.selectList("project_id", projectId);
|
||||
for (ExtContractDO extContractDO : extContractList) {
|
||||
if (extContractDO.getName().equals(trimName)) {
|
||||
throw exception(EXT_CONTRACT_EXISTS);
|
||||
}
|
||||
}
|
||||
ExtContractDO extContract = BeanUtils.toBean(createReqVO, ExtContractDO.class);
|
||||
extContract.setReviewFileUrl(FileUtils.covertFileToJSONString(createReqVO.getReviewFileUrl()));
|
||||
extContract.setContractFileUrl(FileUtils.covertFileToJSONString(createReqVO.getContractFileUrl()));
|
||||
extContract.setCreator(userName);
|
||||
extContract.setUpdater(userName);
|
||||
//也要插入历史
|
||||
ExtContractHistoryDO extContractHistoryDO = BeanUtils.toBean(extContract, ExtContractHistoryDO.class);
|
||||
extContractMapper.insert(extContract);
|
||||
extContractHistoryDO.setExtContractId(extContract.getId());
|
||||
//版本
|
||||
if (extContractHistoryMapper.selectCount("project_id", createReqVO.getProjectId()) < 1) {
|
||||
extContractHistoryDO.setVersion("1");
|
||||
} else {
|
||||
extContractHistoryDO.setVersion(String.valueOf(extContractHistoryMapper.selectCount("project_id", createReqVO.getProjectId()) + 1));
|
||||
}
|
||||
//状态
|
||||
extContractHistoryDO.setProcessStatus(1);
|
||||
extContractHistoryMapper.insert(extContractHistoryDO);
|
||||
|
||||
// 启动流程
|
||||
if (createReqVO.getId() == null) {
|
||||
String processInstanceId = processInstanceApi.createProcessInstance(loginUserId,
|
||||
new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
|
||||
.setBusinessKey(String.valueOf(extContract.getId())));
|
||||
// 写入工作流编号
|
||||
extContractHistoryMapper.updateById(extContractHistoryDO.setProcessInstanceId(processInstanceId));
|
||||
}
|
||||
|
||||
//返回
|
||||
return extContract.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExtContract(Long loginUserId, ExtContractSaveReqVO updateReqVO) {
|
||||
|
||||
validateExtContractExists(updateReqVO.getId());
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
// 更新
|
||||
ExtContractDO updateObj = BeanUtils.toBean(updateReqVO, ExtContractDO.class);
|
||||
updateObj.setUpdater(userName);
|
||||
extContractMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteExtContract(Long id) {
|
||||
// 校验存在
|
||||
validateExtContractExists(id);
|
||||
// 删除
|
||||
extContractMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtContractDetailDO getContractDetail(Long id) {
|
||||
ExtContractDetailDO extContractDetailDO = new ExtContractDetailDO();
|
||||
ExtContractDO extContractDO = extContractMapper.selectById(id);
|
||||
//校验
|
||||
if (extContractDO == null) {
|
||||
throw exception(EXT_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Long projectId = extContractDO.getProjectId();
|
||||
projectTrackingApi.validateProjectExists(projectId);
|
||||
ProjectScheduleDetailDTO projectScheduleDetail = projectScheduleApi.getProjectScheduleDetail(projectId);
|
||||
ProjectTrackingDetailDTO projectTracking = projectTrackingApi.getProjectTracking(projectId);
|
||||
BeanUtil.copyProperties(extContractDO, extContractDetailDO);
|
||||
BeanUtil.copyProperties(projectTracking, extContractDetailDO);
|
||||
BeanUtil.copyProperties(projectScheduleDetail, extContractDetailDO);
|
||||
|
||||
return extContractDetailDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ExtContractRespVO> getExtContractPage(ExtContractPageReqVO pageReqVO) {
|
||||
PageResult<ExtContractDO> extContractPage = extContractMapper.selectPage(pageReqVO);
|
||||
List<ExtContractDO> list = extContractPage.getList();
|
||||
List<ExtContractDetailDO> extContractDetailDOList = new ArrayList<>();
|
||||
|
||||
for (ExtContractDO extContractDO : list) {
|
||||
Long id = extContractDO.getId();
|
||||
ExtContractDetailDO extContractDetailDO = getContractDetail(id);
|
||||
extContractDetailDOList.add(extContractDetailDO);
|
||||
}
|
||||
List<ExtContractRespVO> respVOS = BeanUtils.toBean(extContractDetailDOList, ExtContractRespVO.class);
|
||||
PageResult<ExtContractRespVO> pageResult = new PageResult<>();
|
||||
pageResult.setList(respVOS);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createProcess(Long loginUserId, Long id) {
|
||||
//拿出该合同的当前流程
|
||||
ExtContractHistoryDO extContractHistoryDO = extContractHistoryMapper.selectOne("ext_contract_id", id);
|
||||
String processInstanceId0 = extContractHistoryDO.getProcessInstanceId();
|
||||
//流程引擎里的最新状态
|
||||
Integer status = bpmProcessInstanceApi.getProcessInstance(processInstanceId0).getStatus();
|
||||
if (status == 1) {
|
||||
throw exception(PROCESS_INSTANCE_NOT_END);
|
||||
}
|
||||
|
||||
//创建新的流程
|
||||
String processInstanceId = processInstanceApi.createProcessInstance(loginUserId,
|
||||
new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY)
|
||||
.setBusinessKey(String.valueOf(id)));
|
||||
// 写入工作流编号
|
||||
extContractHistoryMapper.updateById(extContractHistoryDO.setProcessInstanceId(processInstanceId).setProcessStatus(status));
|
||||
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtContractProcessInstanceRespVO getProcess(Long id) {
|
||||
ExtContractHistoryDO extContractHistoryDO = extContractHistoryMapper.selectOne("ext_contract_id", id);
|
||||
String processInstanceId = extContractHistoryDO.getProcessInstanceId();
|
||||
BpmProcessInstanceGetRespDTO processInstance = processInstanceApi.getProcessInstance(processInstanceId);
|
||||
ExtContractProcessInstanceRespVO extContractProcessInstanceRespVO = new ExtContractProcessInstanceRespVO();
|
||||
BeanUtil.copyProperties(processInstance, extContractProcessInstanceRespVO);
|
||||
extContractHistoryDO.setProcessStatus(processInstance.getStatus());
|
||||
|
||||
return extContractProcessInstanceRespVO;
|
||||
}
|
||||
|
||||
public void validateExtContractExists(Long id) {
|
||||
if (extContractMapper.selectById(id) == null) {
|
||||
throw exception(EXT_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extcontracthistory;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDetailDO;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 外部合同历史历史 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface ExtContractHistoryService {
|
||||
/**
|
||||
* 更新外部合同历史历史
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateExtContractHistory(Long loginUserId,@Valid ExtContractHistorySaveReqVO updateReqVO);
|
||||
/**
|
||||
* 获得外部合同历史历史
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外部合同历史历史
|
||||
*/
|
||||
ExtContractHistoryRespVO getExtContractHistory(Long id);
|
||||
|
||||
/**
|
||||
* 获得外部合同历史历史分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外部合同历史历史分页
|
||||
*/
|
||||
PageResult<ExtContractHistoryRespVO> getExtContractHistoryPage(ExtContractHistoryPageReqVO pageReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 获取外部合同历史基本信息
|
||||
* @param id 外部合同历史id
|
||||
* @return
|
||||
*/
|
||||
ExtContractHistoryDetailDO getContractDetail(Long id);
|
||||
|
||||
}
|
@@ -0,0 +1,130 @@
|
||||
package cn.iocoder.yudao.module.cms.service.extcontracthistory;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extContract.vo.ExtContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontract.ExtContractDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDetailDO;
|
||||
import cn.iocoder.yudao.module.cms.service.extContract.ExtContractService;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.ProjectScheduleApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projectschedule.dto.ProjectScheduleDetailDTO;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.ProjectTrackingApi;
|
||||
import cn.iocoder.yudao.module.pms.api.projecttracking.dto.ProjectTrackingDetailDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.extcontracthistory.vo.*;
|
||||
import cn.iocoder.yudao.module.cms.dal.dataobject.extcontracthistory.ExtContractHistoryDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.cms.dal.mysql.extcontracthistory.ExtContractHistoryMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.cms.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.USER_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 外部合同历史 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ExtContractHistoryServiceImpl implements ExtContractHistoryService {
|
||||
|
||||
@Resource
|
||||
private ExtContractHistoryMapper extContractHistoryMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private ExtContractService extContractService;
|
||||
|
||||
@Resource
|
||||
private ProjectTrackingApi projectTrackingApi;
|
||||
|
||||
@Resource
|
||||
private ProjectScheduleApi projectScheduleApi;
|
||||
|
||||
@Override
|
||||
public void updateExtContractHistory(Long loginUserId,ExtContractHistorySaveReqVO updateReqVO) {
|
||||
//校验
|
||||
validateExtContractHistoryExists(updateReqVO.getId());
|
||||
extContractService.validateExtContractExists(updateReqVO.getExtContractId());
|
||||
projectTrackingApi.validateProjectExists(updateReqVO.getProjectId());
|
||||
String userName = adminUserApi.getUser(loginUserId).getNickname();
|
||||
// 更新
|
||||
ExtContractHistoryDO updateObj = BeanUtils.toBean(updateReqVO, ExtContractHistoryDO.class);
|
||||
updateObj.setUpdater(userName);
|
||||
extContractHistoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtContractHistoryRespVO getExtContractHistory(Long id) {
|
||||
//校验
|
||||
if (id == null) {
|
||||
throw exception(EXT_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
ExtContractHistoryDO extContractHistoryDO = extContractHistoryMapper.selectById(id);
|
||||
if (extContractHistoryDO == null) {
|
||||
throw exception(EXT_CONTRACT_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Long projectId = extContractHistoryDO.getProjectId();
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ExtContractHistoryRespVO> getExtContractHistoryPage(ExtContractHistoryPageReqVO pageReqVO) {
|
||||
PageResult<ExtContractHistoryDO> extContractHistoryPage = extContractHistoryMapper.selectPage(pageReqVO);
|
||||
List<ExtContractHistoryDO> list = extContractHistoryPage.getList();
|
||||
List<ExtContractHistoryDetailDO> extContractDetailDOList = new ArrayList<>();
|
||||
|
||||
for (ExtContractHistoryDO extContractHistoryDO : list) {
|
||||
Long id = extContractHistoryDO.getId();
|
||||
ExtContractHistoryDetailDO contractDetail = getContractDetail(id);
|
||||
extContractDetailDOList.add(contractDetail);
|
||||
}
|
||||
List<ExtContractHistoryRespVO> respVOS = BeanUtils.toBean(extContractDetailDOList, ExtContractHistoryRespVO.class);
|
||||
PageResult<ExtContractHistoryRespVO> pageResult = new PageResult<>();
|
||||
pageResult.setList(respVOS);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtContractHistoryDetailDO getContractDetail(Long id) {
|
||||
ExtContractHistoryDetailDO extContractDetailDO = new ExtContractHistoryDetailDO();
|
||||
ExtContractHistoryDO extContractHistory = extContractHistoryMapper.selectById(id);
|
||||
//校验
|
||||
if (extContractHistory == null) {
|
||||
throw exception(EXT_CONTRACT_HISTORY_NOT_EXISTS);
|
||||
}
|
||||
|
||||
Long projectId = extContractHistory.getProjectId();
|
||||
ProjectScheduleDetailDTO projectScheduleDetail = projectScheduleApi.getProjectScheduleDetail(projectId);
|
||||
ProjectTrackingDetailDTO projectTracking = projectTrackingApi.getProjectTracking(projectId);
|
||||
BeanUtil.copyProperties(extContractHistory, extContractDetailDO);
|
||||
BeanUtil.copyProperties(projectTracking, extContractDetailDO);
|
||||
BeanUtil.copyProperties(projectScheduleDetail, extContractDetailDO);
|
||||
|
||||
return extContractDetailDO;
|
||||
}
|
||||
|
||||
|
||||
private void validateExtContractHistoryExists(Long id) {
|
||||
if (extContractHistoryMapper.selectById(id) == null) {
|
||||
throw exception(EXT_CONTRACT_HISTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.cms.service.outscontract;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractRespVO;
|
||||
import cn.iocoder.yudao.module.cms.controller.admin.outscontract.vo.OutsContractSaveReqVO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 外包合同 Service 接口
|
||||
*
|
||||
* @author zqc
|
||||
*/
|
||||
public interface OutsContractService {
|
||||
|
||||
/**
|
||||
* 创建外包合同
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createOutsContract(Long loginUserId,@Valid OutsContractSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新外包合同
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateOutsContract(Long loginUserId,@Valid OutsContractSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除外包合同
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteOutsContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 外包合同
|
||||
*/
|
||||
OutsContractRespVO getOutsContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得外包合同分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 外包合同分页
|
||||
*/
|
||||
PageResult<OutsContractRespVO> getOutsContractPage(OutsContractPageReqVO pageReqVO);
|
||||
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user