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
fdfc19cf
Commit
fdfc19cf
authored
Aug 24, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改8827 8826 燃气气瓶bug
parent
a94ad53b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
58 deletions
+59
-58
CylinderFillingRecordMapper.xml
...src/main/resources/mapper/CylinderFillingRecordMapper.xml
+56
-56
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderFillingRecordMapper.xml
View file @
fdfc19cf
...
...
@@ -17,28 +17,28 @@
<select
id=
"queryListByQueryDto"
resultType=
"java.util.Map"
>
SELECT
r.sequence_nbr AS sequenceNbr,
r.filling_unit_name AS fillingUnitName,
r.factory_num AS factoryNum,
CASE
i.cylinder_variety
WHEN 1 THEN
'无缝气瓶'
WHEN 2 THEN
'焊接气瓶'
WHEN 3 THEN
'缠绕气瓶'
WHEN 4 THEN
'绝热气瓶'
WHEN 5 THEN
'内装填料气瓶'
ELSE
''
END AS cylinderVariety,
i.qrCode AS qrCode,
i.electronic_label_code AS electronicLabelCode,
r.sequence_code AS sequenceCode,
i.unit_inner_code AS unitInnerCode,
u.unit_name AS propertyUnit,
--
r.filling_unit_name AS fillingUnitName,
--
r.factory_num AS factoryNum,
--
CASE
--
i.cylinder_variety
--
WHEN 1 THEN
--
'无缝气瓶'
--
WHEN 2 THEN
--
'焊接气瓶'
--
WHEN 3 THEN
--
'缠绕气瓶'
--
WHEN 4 THEN
--
'绝热气瓶'
--
WHEN 5 THEN
--
'内装填料气瓶'
--
ELSE
--
''
--
END AS cylinderVariety,
--
i.qrCode AS qrCode,
--
i.electronic_label_code AS electronicLabelCode,
--
r.sequence_code AS sequenceCode,
--
i.unit_inner_code AS unitInnerCode,
--
u.unit_name AS propertyUnit,
r.filling_startTime AS fillingStarttime,
r.filling_endTime AS fillingEndtime,
r.filling_user AS fillingUser,
...
...
@@ -80,30 +80,30 @@
'不合格'
end as checkResult
FROM
tz_cylinder_filling_record
_copy
r
tz_cylinder_filling_record r
left join tz_cylinder_unit u on u.app_id = r.app_id
left join tz_cylinder_info_copy i on r.sequence_code = i.sequence_code
left join tz_cylinder_filling_copy b on b.sequence_code = r.sequence_code AND
left join tz_cylinder_filling b on b.filling_before_id = r.filling_before_id AND
date_format(`b`.`inspection_date`,'%Y-%m-%d') = date_format(`r`.`filling_startTime`,'%Y-%m-%d')
left join tz_cylinder_filling_check
_copy af on af.sequence_code = r.sequence_code
AND
left join tz_cylinder_filling_check
af on af.filling_check_id = r.filling_check_id
AND
date_format(`af`.`inspection_date`,'%Y-%m-%d') = date_format(`r`.`filling_startTime`,'%Y-%m-%d')
left join tz_cylinder_info i on b.sequence_code = i.sequence_code
WHERE
1= 1
<if
test=
"appId != null and appId != ''"
>
AND r.app_id = #{appId}
</if>
<if
test=
"fillingUnitName != null and fillingUnitName != ''"
>
AND r.filling_unit_name like
CONCAT(CONCAT('%',#{fillingUnitName}),'%')
</if
>
<if
test=
"propertyUnit != null and propertyUnit != ''"
>
AND u.unit_name like
CONCAT(CONCAT('%',#{propertyUnit}),'%')
</if
>
<if
test=
"factoryNum != null and factoryNum != ''"
>
AND r.factory_num like
CONCAT(CONCAT('%',#{factoryNum}),'%')
</if
>
<!-- <if test="fillingUnitName != null and fillingUnitName != ''">--
>
<!-- AND r.filling_unit_name like-->
<!-- CONCAT(CONCAT('%',#{fillingUnitName}),'%')-->
<!-- </if>--
>
<!-- <if test="propertyUnit != null and propertyUnit != ''">--
>
<!-- AND u.unit_name like-->
<!-- CONCAT(CONCAT('%',#{propertyUnit}),'%')-->
<!-- </if>--
>
<!-- <if test="factoryNum != null and factoryNum != ''">--
>
<!-- AND r.factory_num like-->
<!-- CONCAT(CONCAT('%',#{factoryNum}),'%')-->
<!-- </if>--
>
<if
test=
"fillingStartTime != null "
>
and #{fillingStartTime}
<![CDATA[ <= ]]>
r.filling_startTime
...
...
@@ -112,24 +112,24 @@
and r.filling_endTime
<![CDATA[ <= ]]>
#{fillingEndTime}
</if>
<if
test=
"cylinderVariety != null and cylinderVariety != ''"
>
AND i.cylinder_variety = #{cylinderVariety}
</if
>
<if
test=
"qrCode != null and qrCode != ''"
>
AND i.qrCode like CONCAT(CONCAT('%',#{qrCode}),'%')
</if
>
<if
test=
"electronicLabelCode != null and electronicLabelCode != ''"
>
AND i.electronic_label_code like
CONCAT(CONCAT('%',#{electronicLabelCode}),'%')
</if
>
<if
test=
"sequenceCode != null and sequenceCode != ''"
>
AND r.sequence_code like
CONCAT(CONCAT('%',#{sequenceCode}),'%')
</if
>
<if
test=
"unitInnerCode != null and unitInnerCode != ''"
>
AND i.unit_inner_code like
CONCAT(CONCAT('%',#{unitInnerCode}),'%')
</if
>
<!-- <if test="cylinderVariety != null and cylinderVariety != ''">--
>
<!-- AND i.cylinder_variety = #{cylinderVariety}-->
<!-- </if>--
>
<!-- <if test="qrCode != null and qrCode != ''">--
>
<!-- AND i.qrCode like CONCAT(CONCAT('%',#{qrCode}),'%')-->
<!-- </if>--
>
<!-- <if test="electronicLabelCode != null and electronicLabelCode != ''">--
>
<!-- AND i.electronic_label_code like-->
<!-- CONCAT(CONCAT('%',#{electronicLabelCode}),'%')-->
<!-- </if>--
>
<!-- <if test="sequenceCode != null and sequenceCode != ''">--
>
<!-- AND r.sequence_code like-->
<!-- CONCAT(CONCAT('%',#{sequenceCode}),'%')-->
<!-- </if>--
>
<!-- <if test="unitInnerCode != null and unitInnerCode != ''">--
>
<!-- AND i.unit_inner_code like-->
<!-- CONCAT(CONCAT('%',#{unitInnerCode}),'%')-->
<!-- </if>--
>
<if
test=
"sortParam != null and sortParam != '' and sortRule != null and sortRule != '' "
>
ORDER BY ${sortParam} ${sortRule}
</if>
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
fdfc19cf
...
...
@@ -4,10 +4,11 @@
<select
id=
"queryNumAndOutOfDateNum"
resultType=
"java.util.Map"
>
SELECT
count( sequence_nbr ) AS cylinderNum,
count( CASE WHEN
t
.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 ELSE 0 END ) AS outOfDateNum
count(
t.
sequence_nbr ) AS cylinderNum,
count( CASE WHEN
i
.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 ELSE 0 END ) AS outOfDateNum
FROM
tz_cylinder_info t
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code=t.sequence_code
WHERE
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
AND t.app_id = (
...
...
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