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
9c7f6a51
Commit
9c7f6a51
authored
Feb 16, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配数据库
parent
76a3c6e3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
119 additions
and
57 deletions
+119
-57
CylinderInfoMapper.java
...os/boot/module/tzs/flc/api/mapper/CylinderInfoMapper.java
+2
-0
CylinderFillingRecordMapper.xml
...src/main/resources/mapper/CylinderFillingRecordMapper.xml
+2
-2
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+100
-47
TzCylinderMapper.xml
...le-tzs-api/src/main/resources/mapper/TzCylinderMapper.xml
+3
-5
InspectionServiceImpl.java
...ot/module/tzs/biz/service/impl/InspectionServiceImpl.java
+1
-1
CylinderInfoController.java
...module/tzs/flc/biz/controller/CylinderInfoController.java
+6
-2
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+5
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/mapper/CylinderInfoMapper.java
View file @
9c7f6a51
...
...
@@ -81,4 +81,6 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
List
<
CylinderInfoDto
>
listWithRegionCode
(
Integer
regionCode
);
Page
<
CylinderInfoDto
>
cyinderInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
);
Page
<
CylinderInfoDto
>
cyinderOutInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderFillingRecordMapper.xml
View file @
9c7f6a51
...
...
@@ -83,9 +83,9 @@
tz_cylinder_filling_record r
left join tz_cylinder_unit u on u.app_id = r.app_id
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')
date_format(
b.inspection_date,'%Y-%m-%d') = date_format(r.filling_startTime
,'%Y-%m-%d')
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')
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
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
9c7f6a51
...
...
@@ -9,9 +9,9 @@
count( CASE WHEN i.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 END ) AS outOfDateNum
FROM
tz_cylinder_unit U
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code = t.sequence_code
and t.app_id = u.app_id
LEFT JOIN (SELECT * FROM
`tz_base_unit_licence`
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
and t.app_id = u.app_id
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code = t.sequence_code
LEFT JOIN (SELECT * FROM
tz_base_unit_licence
GROUP BY unit_code
ORDER BY expiry_date DESC) AS l ON l.unit_code = u.credit_code
WHERE
...
...
@@ -65,7 +65,7 @@
<select
id=
"countOverDateNumber"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
`tz_cylinder_info`
ci
FROM
tz_cylinder_info
ci
where
ci.early_warning_level = #{earlyWarningLevel}
</select>
...
...
@@ -95,47 +95,47 @@
ci.*,
cu.region_code
FROM
`tz_cylinder_info`
ci
tz_cylinder_info
ci
LEFT JOIN tz_cylinder_unit cu ON cu.app_id = ci.app_id
WHERE
cu.region_code LIKE
CONCAT("%", #{regionCode}, "%"
)
cu.region_code LIKE
concat('%', #{regionCode}, '%'
)
</select>
<select
id=
"cyinderInfoList"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderInfoDto"
>
SELECT
`ci`.`sequence_nbr` AS `sequence_nbr`
,
`ci`.`unit_name` AS `unit_name`
,
`ci`.`factory_num` AS `factory_num`
,
`ci`.`cylinder_status` AS `cylinder_status`
,
`ci`.`cylinder_variety` AS `cylinder_variety`
,
`ci`.`volume` AS `volume`
,
`ci`.`manufacturing_date` AS `manufacturing_date`
,
`ci`.`manufacturing_unit` AS `manufacturing_unit`
,
`ci`.`unit_inner_code` AS `unit_inner_code`
,
`ci`.`sequence_code` AS `sequence_code`
,
`ci`.`early_warning_level` AS `early_warning_level`
,
`ci`.`early_warning_level_cal_date` AS `early_warning_level_cal_date`
,
`ci`.`end_custom_code` AS `end_custom_code`
,
`ci`.`rec_date` AS `rec_date`
,
`ci`.`rec_user_id` AS `rec_user_id`
,
`ci`.`sync_date` AS `sync_date`
,
`ci`.`sync_state` AS `sync_state`
,
`ci`.`app_id` AS `app_id`
,
`ci`.`integrity` AS `integrity`
,
`ci`.`longitude` AS `longitude`
,
`ci`.`latitude` AS `latitude`
,
`ci`.`credit_code` AS `credit_code`
,
`ci`.`filling_media` AS `filling_media`
,
`ci`.`product_name` AS `product_name`
,
`ci`.`product_qualified` AS `product_qualified`
,
`ci`.`proof_quality` AS `proof_quality`
,
`ci`.`supervision_inspec` AS `supervision_inspec`
,
`ci`.`type_experiments` AS `type_experiments`
,
`ci`.`valve_manufactur_unit` AS `valve_manufactur_unit`
,
`ci`.`nominal_work_pressure` AS `nominal_work_pressure`
,
d1.
`name`
AS filling_media_name,
d2.
`name`
AS cylinder_variety_name,
d3.
`name`
AS cylinder_status_str,
ci.sequence_nbr AS sequence_nbr
,
ci.unit_name AS unit_name
,
ci.factory_num AS factory_num
,
ci.cylinder_status AS cylinder_status
,
ci.cylinder_variety AS cylinder_variety
,
ci.volume AS volume
,
ci.manufacturing_date AS manufacturing_date
,
ci.manufacturing_unit AS manufacturing_unit
,
ci.unit_inner_code AS unit_inner_code
,
ci.sequence_code AS sequence_code
,
ci.early_warning_level AS early_warning_level
,
ci.early_warning_level_cal_date AS early_warning_level_cal_date
,
ci.end_custom_code AS end_custom_code
,
ci.rec_date AS rec_date
,
ci.rec_user_id AS rec_user_id
,
ci.sync_date AS sync_date
,
ci.sync_state AS sync_state
,
ci.app_id AS app_id
,
ci.integrity AS integrity
,
ci.longitude AS longitude
,
ci.latitude AS latitude
,
ci.credit_code AS credit_code
,
ci.filling_media AS filling_media
,
ci.product_name AS product_name
,
ci.product_qualified AS product_qualified
,
ci.proof_quality AS proof_quality
,
ci.supervision_inspec AS supervision_inspec
,
ci.type_experiments AS type_experiments
,
ci.valve_manufactur_unit AS valve_manufactur_unit
,
ci.nominal_work_pressure AS nominal_work_pressure
,
d1.
name
AS filling_media_name,
d2.
name
AS cylinder_variety_name,
d3.
name
AS cylinder_status_str,
ct.qrCode,
ct.electronic_label_code
FROM
...
...
@@ -155,36 +155,89 @@
and ci.app_id = #{cylinderInfoDto.appId}
</if>
<if
test=
"cylinderInfoDto.unitName != null and cylinderInfoDto.unitName != '' "
>
and ci.unit_name like concat(
"%",#{cylinderInfoDto.unitName},"%"
)
and ci.unit_name like concat(
'%',#{cylinderInfoDto.unitName},'%'
)
</if>
<if
test=
"cylinderInfoDto.factoryNum != null and cylinderInfoDto.factoryNum != '' "
>
and ci.factory_num like concat(
"%",#{cylinderInfoDto.factoryNum},"%"
)
and ci.factory_num like concat(
'%',#{cylinderInfoDto.factoryNum},'%'
)
</if>
<if
test=
"cylinderInfoDto.cylinderVariety != null and cylinderInfoDto.cylinderVariety != '' "
>
and ci.cylinder_variety = #{cylinderInfoDto.cylinderVariety}
</if>
<if
test=
"cylinderInfoDto.sequenceCode != null and cylinderInfoDto.sequenceCode != '' "
>
and ci.sequence_code like concat(
"%",#{cylinderInfoDto.sequenceCode},"%"
)
and ci.sequence_code like concat(
'%',#{cylinderInfoDto.sequenceCode},'%'
)
</if>
<if
test=
"cylinderInfoDto.unitInnerCode != null and cylinderInfoDto.unitInnerCode != '' "
>
and ci.unit_inner_code like concat(
"%",#{cylinderInfoDto.unitInnerCode},"%"
)
and ci.unit_inner_code like concat(
'%',#{cylinderInfoDto.unitInnerCode},'%'
)
</if>
<if
test=
"cylinderInfoDto.cylinderStatus != null and cylinderInfoDto.cylinderStatus != '' "
>
and ci.cylinder_status = #{cylinderInfoDto.cylinderStatus}
</if>
<if
test=
"cylinderInfoDto.manufacturingUnit != null and cylinderInfoDto.manufacturingUnit != '' "
>
and ci.manufacturing_unit like concat(
"%",#{cylinderInfoDto.manufacturingUnit},"%"
)
and ci.manufacturing_unit like concat(
'%',#{cylinderInfoDto.manufacturingUnit},'%'
)
</if>
<if
test=
"cylinderInfoDto.creditCode != null and cylinderInfoDto.creditCode != '' "
>
and ci.credit_code like concat(
"%",#{cylinderInfoDto.creditCode},"%"
)
and ci.credit_code like concat(
'%',#{cylinderInfoDto.creditCode},'%'
)
</if>
<if
test=
"cylinderInfoDto.qrCode != null and cylinderInfoDto.qrCode != '' "
>
and ct.qrCode like concat(
"%",#{cylinderInfoDto.qrCode},"%"
)
and ct.qrCode like concat(
'%',#{cylinderInfoDto.qrCode},'%'
)
</if>
<if
test=
"cylinderInfoDto.electronicLabelCode != null and cylinderInfoDto.electronicLabelCode != '' "
>
and ct.electronic_label_code like concat(
"%",#{cylinderInfoDto.electronicLabelCode},"%"
)
and ct.electronic_label_code like concat(
'%',#{cylinderInfoDto.electronicLabelCode},'%'
)
</if>
ORDER BY ci.sync_date DESC
</where>
</select>
<select
id=
"cyinderOutInfoList"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.CylinderInfoDto"
>
SELECT
ci.sequence_nbr AS sequence_nbr,
ci.unit_name AS unit_name,
ci.factory_num AS factory_num,
ci.cylinder_status AS cylinder_status,
ci.cylinder_variety AS cylinder_variety,
ci.volume AS volume,
ci.manufacturing_date AS manufacturing_date,
ci.manufacturing_unit AS manufacturing_unit,
ci.unit_inner_code AS unit_inner_code,
ci.sequence_code AS sequence_code,
ci.early_warning_level AS early_warning_level,
ci.early_warning_level_cal_date AS early_warning_level_cal_date,
ci.end_custom_code AS end_custom_code,
ci.rec_date AS rec_date,
ci.rec_user_id AS rec_user_id,
ci.sync_date AS sync_date,
ci.sync_state AS sync_state,
ci.app_id AS app_id,
ci.integrity AS integrity,
ci.longitude AS longitude,
ci.latitude AS latitude,
ci.credit_code AS credit_code,
ci.filling_media AS filling_media,
ci.product_name AS product_name,
ci.product_qualified AS product_qualified,
ci.proof_quality AS proof_quality,
ci.supervision_inspec AS supervision_inspec,
ci.type_experiments AS type_experiments,
ci.valve_manufactur_unit AS valve_manufactur_unit,
ci.nominal_work_pressure AS nominal_work_pressure,
d1.name AS filling_media_name,
d2.name AS cylinder_variety_name,
d3.name AS cylinder_status_str,
ct.qrCode,
ct.electronic_label_code
FROM
tz_cylinder_inspection AS isp
LEFT JOIN tz_cylinder_info AS ci ON ci.sequence_code = isp.sequence_code
LEFT JOIN cb_data_dictionary AS d1 ON d1.type = 'CZJZMC' AND d1.code = ci.filling_media
LEFT JOIN cb_data_dictionary AS d2 ON d2.sequence_nbr = ci.cylinder_variety
LEFT JOIN cb_data_dictionary AS d3 ON d3.sequence_nbr = ci.cylinder_status
LEFT JOIN tz_cylinder_tags AS ct ON ct.sequence_code = ci.sequence_code
WHERE isp.next_inspection_date
<![CDATA[ < ]]>
now()
<if
test=
"appids != null and appids.size > 0 "
>
and ci.app_id in
<foreach
collection=
"appids"
index=
"index"
item=
"item"
close=
")"
open=
"("
separator=
","
>
#{item}
</foreach>
</if>
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/TzCylinderMapper.xml
View file @
9c7f6a51
...
...
@@ -186,9 +186,7 @@
<select
id=
"getTzCylinderCheckItem"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderCheckDto"
>
SELECT
item,
`explain`,
`result`
*
FROM
tz_cylinder_check_item
WHERE item!=''
...
...
@@ -208,8 +206,8 @@
<select
id=
"getTzCylinderAfterCheckItem"
resultType=
"com.yeejoin.amos.boot.module.tzs.flc.api.dto.TzCylinderCheckDto"
>
SELECT
after_item AS item,
after_explain AS
`explain`
,
after_result AS
`result`
after_explain AS
"explain"
,
after_result AS
"result"
FROM
tz_cylinder_check_item
WHERE after_item!=''
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/InspectionServiceImpl.java
View file @
9c7f6a51
...
...
@@ -182,7 +182,7 @@ public class InspectionServiceImpl implements InspectionService {
@Override
public
JSONObject
getSafetySupervisionCodeMap
(
String
bizTable
,
String
mapKey
,
String
mapValue
)
{
JSONObject
jsonObject
=
new
JSONObject
();
String
sql
=
String
.
format
(
"SELECT
`%s`, `%s`
FROM %s"
,
mapKey
,
mapValue
,
bizTable
);
String
sql
=
String
.
format
(
"SELECT
%s, %s
FROM %s"
,
mapKey
,
mapValue
,
bizTable
);
List
<
Map
<
String
,
Object
>>
list
=
bizJdbcTemplate
.
queryForList
(
sql
);
list
.
forEach
(
x
->
{
jsonObject
.
put
(
x
.
get
(
mapKey
).
toString
(),
x
.
get
(
mapValue
));
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderInfoController.java
View file @
9c7f6a51
...
...
@@ -516,7 +516,7 @@ public class CylinderInfoController extends BaseController {
}
}
}
if
(
ValidationUtil
.
isEmpty
(
cylinderInfoDto
.
getRegionCode
())
&&
ValidationUtil
.
isEmpty
(
cylinderInfoDto
.
getCreditCode
())){
if
(
ValidationUtil
.
isEmpty
(
cylinderInfoDto
.
getRegionCode
())
&&
ValidationUtil
.
isEmpty
(
cylinderInfoDto
.
getCreditCode
())
&&
cylinderInfoDto
.
getIsWarn
()==
0
){
return
ResponseHelper
.
buildResponse
(
new
Page
<
CylinderInfoDto
>(
Long
.
valueOf
(
pageNum
),
Long
.
valueOf
(
pageSize
)));
}
QueryWrapper
<
CylinderInfo
>
cylinderInfoQueryWrapper
=
new
QueryWrapper
<>();
...
...
@@ -541,7 +541,11 @@ public class CylinderInfoController extends BaseController {
}
else
{
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
pageBean
=
cylinderInfoServiceImpl
.
cyinderInfoList
(
pageBean
,
cylinderInfoDto
,
sort
,
appids
);
if
(
cylinderInfoDto
.
getIsWarn
()!=
0
){
pageBean
=
cylinderInfoServiceImpl
.
cyinderOutInfoList
(
pageBean
,
cylinderInfoDto
,
sort
,
appids
);
}
else
{
pageBean
=
cylinderInfoServiceImpl
.
cyinderInfoList
(
pageBean
,
cylinderInfoDto
,
sort
,
appids
);
}
return
ResponseHelper
.
buildResponse
(
pageBean
);
// IPage<CylinderInfo> page;
// if (cylinderInfoDto.getIsWarn() == 0) {
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
9c7f6a51
...
...
@@ -847,4 +847,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
public
Page
<
CylinderInfoDto
>
cyinderInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
){
return
cylinderInfoMapper
.
cyinderInfoList
(
page
,
cylinderInfoDto
,
sort
,
appids
);
}
public
Page
<
CylinderInfoDto
>
cyinderOutInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
){
return
cylinderInfoMapper
.
cyinderOutInfoList
(
page
,
cylinderInfoDto
,
sort
,
appids
);
}
}
\ No newline at end of file
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