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
ca86ba05
Commit
ca86ba05
authored
Sep 10, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改excle导出时的关系字段逻辑错误的问题
parent
19739748
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+24
-11
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
ca86ba05
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<mapper
<mapper
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper"
>
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper"
>
<select
id=
"getFirefightersJobTitleCount"
resultType=
"com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto"
>
<select
id=
"getFirefightersJobTitleCount"
resultType=
"com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto"
>
select COUNT(a.sequence_nbr) num, a.job_title_code jobTitleCode
select COUNT(a.sequence_nbr) num, a.job_title_code jobTitleCode
from cb_firefighters a
from cb_firefighters a
where a.is_delete = 0
where a.is_delete = 0
...
@@ -12,7 +13,9 @@
...
@@ -12,7 +13,9 @@
<!--消防队员列表按时间倒叙排列add desc 2021-09-08 by kongfm -->
<!--消防队员列表按时间倒叙排列add desc 2021-09-08 by kongfm -->
<select
id=
"getFirefighters"
<select
id=
"getFirefighters"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto"
>
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto"
>
select a.*,b.areas_expertise areasExpertise ,b.areas_expertise_code areasExpertiseCode from cb_firefighters a LEFT JOIN cb_firefighters_post b on
select a.*,b.areas_expertise areasExpertise ,b.areas_expertise_code
areasExpertiseCode from cb_firefighters a LEFT JOIN
cb_firefighters_post b on
a.sequence_nbr=b.firefighters_id where a.is_delete=0
a.sequence_nbr=b.firefighters_id where a.is_delete=0
<if
test=
'par.postQualification!=null'
>
and b.post_qualification_code = #{par.postQualification}
</if>
<if
test=
'par.postQualification!=null'
>
and b.post_qualification_code = #{par.postQualification}
</if>
<if
test=
'par.areasExpertise!=null'
>
and b.areas_expertise_code= #{par.areasExpertise}
</if>
<if
test=
'par.areasExpertise!=null'
>
and b.areas_expertise_code= #{par.areasExpertise}
</if>
...
@@ -20,7 +23,8 @@
...
@@ -20,7 +23,8 @@
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.jobTitle!=null'
>
and a.job_title_code =#{par.jobTitle}
</if>
<if
test=
'par.jobTitle!=null'
>
and a.job_title_code =#{par.jobTitle}
</if>
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code =#{par.areasExpertiseCode}
</if>
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code =#{par.areasExpertiseCode}
</if>
<if
test=
'par.areasExpertiseCode=="0"'
>
and b.areas_expertise_code is not null
</if>
<if
test=
'par.areasExpertiseCode=="0"'
>
and b.areas_expertise_code is not null
</if>
ORDER BY a.rec_date desc limit #{pageNum},#{pageSize}
ORDER BY a.rec_date desc limit #{pageNum},#{pageSize}
</select>
</select>
...
@@ -35,7 +39,8 @@
...
@@ -35,7 +39,8 @@
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.state!=null'
>
and a.state_code= #{par.state}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.fireTeamId!=null'
>
and a.fire_team_id= #{par.fireTeamId}
</if>
<if
test=
'par.jobTitle!=null'
>
and a.job_title_code =#{par.jobTitle}
</if>
<if
test=
'par.jobTitle!=null'
>
and a.job_title_code =#{par.jobTitle}
</if>
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code =#{par.areasExpertiseCode}
</if>
<if
test=
'par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'
>
and b.areas_expertise_code =#{par.areasExpertiseCode}
</if>
<if
test=
'par.areasExpertiseCode=="0"'
>
and b.areas_expertise_code is not null
</if>
<if
test=
'par.areasExpertiseCode=="0"'
>
and b.areas_expertise_code is not null
</if>
ORDER BY a.rec_date desc
ORDER BY a.rec_date desc
...
@@ -69,13 +74,21 @@
...
@@ -69,13 +74,21 @@
</select>
</select>
<!-- BUG3553 BY kongfm 人员关系显示汉字-->
<!-- BUG3553 BY kongfm 人员关系显示汉字 -->
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto"
>
<select
id=
"exportToExcel"
select f.*,
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto"
>
(select cb_fire_team.name from cb_fire_team where cb_fire_team.sequence_nbr=f.fire_team_id) fireTeam,
SELECT
emergency_contact, (select da.name from cb_data_dictionary da where da.code = fc.relationship) as relationship , emergency_contact_phone
f.*,
from cb_firefighters f
( SELECT cb_fire_team.NAME FROM cb_fire_team WHERE
left join cb_firefighters_contacts fc on f.sequence_nbr = fc.firefighters_id
cb_fire_team.sequence_nbr = f.fire_team_id ) fireTeam,
emergency_contact,
da.NAME AS relationship,
emergency_contact_phone
FROM
cb_firefighters f
LEFT JOIN cb_firefighters_contacts fc ON f.sequence_nbr =
fc.firefighters_id
left join cb_data_dictionary da on da.CODE = fc.relationship
where f.is_delete = #{isDelete}
where f.is_delete = #{isDelete}
</select>
</select>
...
...
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