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
3075cccb
Commit
3075cccb
authored
May 31, 2024
by
张森
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl' into develop_dl_bugfix
parents
a8cdcfa2
16b57e64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
38 deletions
+70
-38
EquipTypeImgAmountVO.java
...in/equipmanage/common/entity/vo/EquipTypeImgAmountVO.java
+4
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+57
-11
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+9
-27
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/EquipTypeImgAmountVO.java
View file @
3075cccb
...
...
@@ -28,6 +28,8 @@ public class EquipTypeImgAmountVO {
private
String
iotCode
;
@ApiModelProperty
(
value
=
"单位数量名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"单位Id"
)
private
String
unitId
;
@ApiModelProperty
(
value
=
"规格型号"
)
private
String
standard
;
@ApiModelProperty
(
value
=
"图片"
)
...
...
@@ -38,6 +40,8 @@ public class EquipTypeImgAmountVO {
private
String
systemName
;
@ApiModelProperty
(
value
=
"供应商名"
)
private
String
manufacturerName
;
@ApiModelProperty
(
value
=
"供应商Id"
)
private
String
manufacturerId
;
@ApiModelProperty
(
value
=
"状态:在位。。。"
)
private
String
status
;
@ApiModelProperty
(
value
=
"装备类型"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
3075cccb
...
...
@@ -187,6 +187,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Lazy
IWlCarMileageService
iWlCarMileageService
;
@Autowired
private
UnitMapper
unitMapper
;
@Autowired
private
ManufacturerInfoMapper
manufacturerInfoMapper
;
@Override
public
List
<
EquipCountBySystemVO
>
getEquipCountBySystemId
(
Long
systemId
)
{
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
...
...
@@ -1020,6 +1027,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
ArrayList
<
String
>
systemIds
=
new
ArrayList
<>();
ArrayList
<
String
>
unitList
=
new
ArrayList
<>();
ArrayList
<
String
>
manufacturerIds
=
new
ArrayList
<>();
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
...
...
@@ -1028,22 +1039,57 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
String
>
systemId
=
Arrays
.
asList
(
x
.
getSystemId
().
split
(
","
));
systemIds
.
addAll
(
systemId
);
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getUnitId
()))
{
unitList
.
add
(
x
.
getUnitId
());
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getManufacturerId
()))
{
manufacturerIds
.
add
(
x
.
getManufacturerId
());
}
});
// 系统名称处理
Map
<
String
,
String
>
systemNameMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
systemIds
))
{
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
FireFightingSystemEntity:
:
getId
,
systemIds
);
List
<
FireFightingSystemEntity
>
fireSystemList
=
fireFightingSystemMapper
.
selectList
(
wrapper
);
Map
<
String
,
String
>
systemNameMap
=
fireSystemList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
FireFightingSystemEntity:
:
getName
));
list
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
if
(
StringUtil
.
isNotEmpty
(
item
.
getSystemId
()))
{
ArrayList
<
String
>
systemNames
=
new
ArrayList
<>();
List
<
String
>
systemIdList
=
Arrays
.
asList
(
item
.
getSystemId
().
split
(
","
));
systemIdList
.
parallelStream
().
forEach
(
id
->
systemNames
.
add
(
systemNameMap
.
getOrDefault
(
id
,
""
)));
String
join
=
String
.
join
(
","
,
systemNames
);
item
.
setSystemName
(
join
);
}
});
}
systemNameMap
=
fireSystemList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
FireFightingSystemEntity:
:
getName
));
}
Map
<
String
,
String
>
finalSystemNameMap
=
systemNameMap
;
Map
<
String
,
String
>
unitNameMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
unitList
))
{
LambdaQueryWrapper
<
Unit
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
Unit:
:
getId
,
unitList
);
List
<
Unit
>
units
=
unitMapper
.
selectList
(
wrapper
);
unitNameMap
=
units
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
Unit:
:
getName
));
}
Map
<
String
,
String
>
finalUnitNameMap
=
unitNameMap
;
Map
<
String
,
String
>
manufacturerIdMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
manufacturerIds
))
{
LambdaQueryWrapper
<
ManufacturerInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
ManufacturerInfo:
:
getId
,
manufacturerIds
);
List
<
ManufacturerInfo
>
manufacturerInfoList
=
manufacturerInfoMapper
.
selectList
(
wrapper
);
manufacturerIdMap
=
manufacturerInfoList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
ManufacturerInfo:
:
getName
));
}
Map
<
String
,
String
>
finalManufacturerIdMap
=
manufacturerIdMap
;
list
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
if
(
StringUtil
.
isNotEmpty
(
item
.
getSystemId
())
&&
!
ObjectUtils
.
isEmpty
(
finalSystemNameMap
))
{
ArrayList
<
String
>
systemNames
=
new
ArrayList
<>();
List
<
String
>
systemIdList
=
Arrays
.
asList
(
item
.
getSystemId
().
split
(
","
));
systemIdList
.
parallelStream
().
forEach
(
id
->
systemNames
.
add
(
finalSystemNameMap
.
getOrDefault
(
id
,
""
)));
String
join
=
String
.
join
(
","
,
systemNames
);
item
.
setSystemName
(
join
);
}
if
(
StringUtil
.
isNotEmpty
(
item
.
getUnitId
())
&&
!
ObjectUtils
.
isEmpty
(
finalUnitNameMap
))
{
item
.
setUnitName
(
finalUnitNameMap
.
getOrDefault
(
item
.
getUnitId
(),
""
));
}
if
(
StringUtil
.
isNotEmpty
(
item
.
getManufacturerId
())
&&
!
ObjectUtils
.
isEmpty
(
finalManufacturerIdMap
))
{
item
.
setManufacturerName
(
finalManufacturerIdMap
.
getOrDefault
(
item
.
getManufacturerId
(),
""
));
}
});
return
list
;
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
3075cccb
...
...
@@ -2109,28 +2109,16 @@
CONCAT('01#',wles.qr_code) fullqrCode,
wled.standard,
wle.img,
wle.unit_id as unitId,
wles.name equipmentName,
wec.name as systemType,
concat_ws('-',wlws.full_name,wled.area) as full_name,
wlws.name as belongBuildName,
wlun.NAME unitName,
wles.system_id as systemId,
wlsd.amount,
wlsd.id as stockDetailId,
'equipment' as type,
wl
ai.`name` manufacturerName
,
wl
ed.manufacturer_id as manufacturerId
,
wles.code,
wles.iot_code as iotCode,
case wlsd.`status`
when '1' then '在位'
when '2' then '执勤'
when '3' then '维修'
when '6' then '退役'
when '7' then '报废'
when '10' then '车载'
when '11' then '损耗'
when '12' then '配装'
else '未入库' END as status,
wles.create_date as createDate,
wled.code as eqtype,
wles.biz_org_code as bizOrgCode,
...
...
@@ -2139,18 +2127,14 @@
wec.industry_code as industryCode,
wle.is_iot as wleIsIot
FROM
(select id,name,qr_code,code ,iot_code ,biz_org_code,team_id ,biz_org_name,create_date ,equipment_detail_id ,system_id,equip_status from wl_equipment_specific) wles
LEFT JOIN (select id,amount,status,equipment_specific_id,warehouse_structure_id from wl_stock_detail ) wlsd on wlsd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure wlws on wlsd.warehouse_structure_id = wlws.id
(select id,name,qr_code,code ,iot_code ,biz_org_code,team_id ,biz_org_name,create_date ,equipment_detail_id ,system_id,equip_status, warehouse_structure_id from wl_equipment_specific) wles
LEFT JOIN wl_warehouse_structure wlws on wles.warehouse_structure_id = wlws.id
LEFT JOIN (select id,standard ,name ,area ,code, equipment_id ,manufacturer_id,is_import from wl_equipment_detail) wled on wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment wle ON wle.id = wled.equipment_id
LEFT JOIN wl_unit wlun ON wle.unit_id = wlun.id
LEFT JOIN wl_manufacturer_info wlai on wled.manufacturer_id=wlai.id
LEFT JOIN wl_equipment_category wec ON wle.category_id = wec.id
WHERE 1=1
<if
test=
"codeHead!=null and codeHead!='' and codeHead!=' '"
>
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
<!-- and wec.`code` like concat(#{codeHead}, '%')-->
</if>
<if
test=
"equipTypeAmountPage.teamId!=null"
>
...
...
@@ -2166,7 +2150,7 @@
and wled.is_import = #{equipTypeAmountPage.isImport}
</if>
<if
test=
"equipTypeAmountPage.warehouseStructureId!=null"
>
and wl
sd
.warehouse_structure_id in (
and wl
es
.warehouse_structure_id in (
select id from wl_warehouse_structure where parent_id in(
select id from wl_warehouse_structure where parent_id = #{equipTypeAmountPage.warehouseStructureId})
union
...
...
@@ -2175,11 +2159,11 @@
)
</if>
<if
test=
"equipTypeAmountPage.status == 1"
>
and wl
sd
.warehouse_structure_id is null
and wl
es
.warehouse_structure_id is null
</if>
<if
test=
"equipTypeAmountPage.status == 0"
>
and wl
sd
.warehouse_structure_id is not null
and wl
es
.warehouse_structure_id is not null
</if>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
...
...
@@ -2200,13 +2184,11 @@
<if
test=
"equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"
>
AND wles.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if>
group by wles.id
having 1 = 1
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
AND
industryC
ode = #{equipTypeAmountPage.industryCode}
AND
wec.industry_c
ode = #{equipTypeAmountPage.industryCode}
</if>
<if
test=
"equipTypeAmountPage.isIot!=null"
>
AND wle
IsI
ot = #{equipTypeAmountPage.isIot}
AND wle
.is_i
ot = #{equipTypeAmountPage.isIot}
</if>
order by createDate DESC
</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