Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
5d271498
Commit
5d271498
authored
Jun 07, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改一码通总览数据相关问题
parent
f3186a51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
144 additions
and
17 deletions
+144
-17
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+144
-17
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
5d271498
...
...
@@ -179,23 +179,150 @@
<select
id=
"getCategoryData"
resultType=
"java.util.Map"
>
SELECT
elevator,
lifting,
vehicle,
boiler,
vessel,
pipeline,
rides,
ropeway
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( elevator :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( elevator :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( elevator :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) elevator,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( vehicle :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( vehicle :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( vehicle :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) vehicle,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( ropeway :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( ropeway :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( ropeway :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) ropeway,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( rides :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( rides :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( rides :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) rides,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( boiler :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( boiler :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( boiler :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) boiler,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( vessel :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( vessel :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( vessel :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) vessel,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( pipeline :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( pipeline :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( pipeline :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) pipeline,
(SELECT
to_json ( b ) :: json
FROM
(SELECT
SUM ( int4 ( ( lifting :: json -> 'waitClaim' ) ) ) waitClaim,
SUM ( int4 ( ( lifting :: json -> 'alreadyClaim' ) ) ) alreadyClaim,
SUM ( int4 ( ( lifting :: json -> 'refuseClaim' ) ) ) refuseClaim
FROM
biz_jg_equipment_category_data bjecd
WHERE
<if
test=
"level == 'company'"
>
bjecd."unit_code" LIKE CONCAT('%',#{companyCode},'%')
</if>
<if
test=
"level != 'company'"
>
bjecd."org_branch_code" LIKE CONCAT('%',#{orgCode},'%')
</if>
) b
) lifting
</select>
<select
id=
"getUnitCodeByRecord"
resultType=
"java.lang.String"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment