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
764d3bd1
Commit
764d3bd1
authored
Oct 10, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: BUG#24036 消防器材,备品备件名称应该修改成“备品物资”,备品物资下应统计备品备件的总数和库存器材的总数
parent
d0013ad6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
16 deletions
+33
-16
WlSpareEquipmentMapper.xml
...quip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
+33
-16
No files found.
amos-boot-system-equip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
View file @
764d3bd1
...
...
@@ -15,8 +15,14 @@
<if
test=
"dto.name != null and dto.name != ''"
>
AND `name` LIKE CONCAT('%', #{dto.name}, '%')
</if>
<if
test=
"dto.code != null and dto.code != ''"
>
AND `equip_model_code` LIKE concat('%', #{dto.code}, '%')
<!-- <if test="dto.code != null and dto.code != ''">-->
<!-- AND `equip_model_code` LIKE concat('%', #{dto.code}, '%')-->
<!-- </if>-->
<if
test=
"dto.code == 'BPBJ'"
>
AND LEFT(equip_model_code, 1) = '4'
</if>
<if
test=
"dto.code == 'KCQC'"
>
AND LEFT(equip_model_code, 1) != '4'
</if>
<if
test=
"codeHead != null and codeHead != ''"
>
AND LEFT (equip_model_code, #{hierarchy}) = #{codeHead}
...
...
@@ -35,26 +41,37 @@
</select>
<select
id=
"countSpareEquip"
resultType=
"java.util.Map"
>
select
a.equip_model_name AS `name`,
sum( a.stock_num ) AS `value`,
a.unit AS unit,
IFNULL( ifnull( b.img, b.shbz_img ), '' ) AS icon,
a.equip_model_id AS equipmentModelId,
a.equip_model_code AS equipmentModelCode
SELECT
'备品备件' AS name,
'BPBJ' AS code,
count( 1 ) AS value
FROM
wl_spare_equipment a
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
<where>
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
WHERE
a.is_delete = 0
AND a.stock_num != 0
AND LEFT(a.equip_model_code, 1) = '4'
<if
test=
"bizOrgCode != '' and bizOrgCode != null"
>
AND a.`biz_org_code` LIKE concat(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'库存器材' AS name,
'KCQC' AS code,
count(1) AS value
FROM
wl_spare_equipment a
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
WHERE
a.is_delete = 0
AND a.stock_num != 0
AND LEFT(a.equip_model_code, 1) != '4'
<if
test=
"bizOrgCode != '' and bizOrgCode != null"
>
AND a.`biz_org_code` LIKE concat(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
a.equip_model_id
HAVING
sum( a.stock_num ) != 0
</select>
<select
id=
"exportList"
resultType=
"com.yeejoin.equipmanage.common.entity.WlSpareEquipment"
>
...
...
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