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
8e2e4cec
Commit
8e2e4cec
authored
May 31, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl' into develop_dl
parents
dcf4873b
df7a0674
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
13 deletions
+136
-13
EquipTypeImgAmountVO.java
...in/equipmanage/common/entity/vo/EquipTypeImgAmountVO.java
+4
-0
EquipStatusEquipPageEnum.java
...in/equipmanage/common/enums/EquipStatusEquipPageEnum.java
+50
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+82
-13
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+0
-0
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 @
8e2e4cec
...
@@ -28,6 +28,8 @@ public class EquipTypeImgAmountVO {
...
@@ -28,6 +28,8 @@ public class EquipTypeImgAmountVO {
private
String
iotCode
;
private
String
iotCode
;
@ApiModelProperty
(
value
=
"单位数量名称"
)
@ApiModelProperty
(
value
=
"单位数量名称"
)
private
String
unitName
;
private
String
unitName
;
@ApiModelProperty
(
value
=
"单位Id"
)
private
String
unitId
;
@ApiModelProperty
(
value
=
"规格型号"
)
@ApiModelProperty
(
value
=
"规格型号"
)
private
String
standard
;
private
String
standard
;
@ApiModelProperty
(
value
=
"图片"
)
@ApiModelProperty
(
value
=
"图片"
)
...
@@ -38,6 +40,8 @@ public class EquipTypeImgAmountVO {
...
@@ -38,6 +40,8 @@ public class EquipTypeImgAmountVO {
private
String
systemName
;
private
String
systemName
;
@ApiModelProperty
(
value
=
"供应商名"
)
@ApiModelProperty
(
value
=
"供应商名"
)
private
String
manufacturerName
;
private
String
manufacturerName
;
@ApiModelProperty
(
value
=
"供应商Id"
)
private
String
manufacturerId
;
@ApiModelProperty
(
value
=
"状态:在位。。。"
)
@ApiModelProperty
(
value
=
"状态:在位。。。"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
value
=
"装备类型"
)
@ApiModelProperty
(
value
=
"装备类型"
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/EquipStatusEquipPageEnum.java
0 → 100644
View file @
8e2e4cec
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
public
enum
EquipStatusEquipPageEnum
{
ZW
(
"1"
,
"在位"
),
ZQ
(
"2"
,
"执勤"
),
WX
(
"3"
,
"维修"
),
TY
(
"6"
,
"退役"
),
BF
(
"7"
,
"报废"
),
CZ
(
"10"
,
"车载"
),
SH
(
"11"
,
"损耗"
),
PZ
(
"12"
,
"配装"
);
private
String
code
;
private
String
describe
;
private
EquipStatusEquipPageEnum
(
String
code
,
String
describe
)
{
this
.
code
=
code
;
this
.
describe
=
describe
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getDescribe
()
{
return
describe
;
}
public
void
setDescribe
(
String
describe
)
{
this
.
describe
=
describe
;
}
public
static
String
getDescribe
(
String
code
)
{
String
describe
=
"未入库"
;
for
(
EquipStatusEquipPageEnum
type
:
EquipStatusEquipPageEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
describe
=
type
.
getDescribe
();
break
;
}
}
return
describe
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
8e2e4cec
...
@@ -181,6 +181,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -181,6 +181,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Lazy
@Lazy
IWlCarMileageService
iWlCarMileageService
;
IWlCarMileageService
iWlCarMileageService
;
@Autowired
private
UnitMapper
unitMapper
;
@Autowired
private
ManufacturerInfoMapper
manufacturerInfoMapper
;
@Autowired
private
StockDetailMapper
stockDetailMapper
;
@Override
@Override
public
List
<
EquipCountBySystemVO
>
getEquipCountBySystemId
(
Long
systemId
)
{
public
List
<
EquipCountBySystemVO
>
getEquipCountBySystemId
(
Long
systemId
)
{
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
...
@@ -1012,30 +1022,89 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1012,30 +1022,89 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
ArrayList
<
String
>
systemIds
=
new
ArrayList
<>();
ArrayList
<
String
>
systemIds
=
new
ArrayList
<>();
ArrayList
<
String
>
unitList
=
new
ArrayList
<>();
ArrayList
<
String
>
manufacturerIds
=
new
ArrayList
<>();
ArrayList
<
Long
>
equipIds
=
new
ArrayList
<>();
list
.
getRecords
().
forEach
(
x
->
{
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getSystemId
()))
{
if
(
StringUtil
.
isNotEmpty
(
x
.
getSystemId
()))
{
List
<
String
>
systemId
=
Arrays
.
asList
(
x
.
getSystemId
().
split
(
","
));
List
<
String
>
systemId
=
Arrays
.
asList
(
x
.
getSystemId
().
split
(
","
));
systemIds
.
addAll
(
systemId
);
systemIds
.
addAll
(
systemId
);
}
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getUnitId
()))
{
unitList
.
add
(
x
.
getUnitId
());
}
if
(
StringUtil
.
isNotEmpty
(
x
.
getManufacturerId
()))
{
manufacturerIds
.
add
(
x
.
getManufacturerId
());
}
equipIds
.
add
(
x
.
getId
());
});
});
// 系统名称处理
Map
<
String
,
String
>
systemNameMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
systemIds
))
{
if
(
CollUtil
.
isNotEmpty
(
systemIds
))
{
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
FireFightingSystemEntity:
:
getId
,
systemIds
);
wrapper
.
in
(
FireFightingSystemEntity:
:
getId
,
systemIds
);
List
<
FireFightingSystemEntity
>
fireSystemList
=
fireFightingSystemMapper
.
selectList
(
wrapper
);
List
<
FireFightingSystemEntity
>
fireSystemList
=
fireFightingSystemMapper
.
selectList
(
wrapper
);
Map
<
String
,
String
>
systemNameMap
=
fireSystemList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
FireFightingSystemEntity:
:
getName
));
systemNameMap
=
fireSystemList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
getId
().
toString
(),
FireFightingSystemEntity:
:
getName
));
list
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
}
if
(
StringUtil
.
isNotEmpty
(
item
.
getSystemId
()))
{
Map
<
String
,
String
>
finalSystemNameMap
=
systemNameMap
;
ArrayList
<
String
>
systemNames
=
new
ArrayList
<>();
List
<
String
>
systemIdList
=
Arrays
.
asList
(
item
.
getSystemId
().
split
(
","
));
Map
<
String
,
String
>
unitNameMap
=
new
HashMap
<>();
systemIdList
.
parallelStream
().
forEach
(
id
->
systemNames
.
add
(
systemNameMap
.
getOrDefault
(
id
,
""
)));
if
(
CollUtil
.
isNotEmpty
(
unitList
))
{
String
join
=
String
.
join
(
","
,
systemNames
);
LambdaQueryWrapper
<
Unit
>
wrapper
=
new
LambdaQueryWrapper
<>();
item
.
setSystemName
(
join
);
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
;
Map
<
Long
,
StockDetail
>
stockMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
equipIds
))
{
LambdaQueryWrapper
<
StockDetail
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
StockDetail:
:
getEquipmentSpecificId
,
equipIds
);
List
<
StockDetail
>
selectList
=
stockDetailMapper
.
selectList
(
wrapper
);
stockMap
=
selectList
.
stream
().
collect
(
Collectors
.
toMap
(
StockDetail:
:
getEquipmentSpecificId
,
t
->
t
));
}
}
Map
<
Long
,
StockDetail
>
finalStockDetailMap
=
stockMap
;
list
.
getRecords
().
parallelStream
().
forEach
(
item
->
{
if
(!
item
.
getEqtype
().
startsWith
(
"4"
)
&&
!
ObjectUtils
.
isEmpty
(
finalStockDetailMap
.
get
(
item
.
getId
()))
&&
!
ObjectUtils
.
isEmpty
(
finalStockDetailMap
.
get
(
item
.
getId
()).
getAmount
()))
{
item
.
setAmount
(
finalStockDetailMap
.
get
(
item
.
getId
()).
getAmount
().
toString
().
split
(
"\\."
)[
0
]);
}
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
(),
""
));
}
if
(!
ObjectUtils
.
isEmpty
(
finalStockDetailMap
)
&&
!
ObjectUtils
.
isEmpty
(
finalStockDetailMap
.
get
(
item
.
getId
())))
{
item
.
setStatus
(
EquipStatusEquipPageEnum
.
getDescribe
(
finalStockDetailMap
.
get
(
item
.
getId
()).
getStatus
()));
item
.
setStockDetailId
(
finalStockDetailMap
.
get
(
item
.
getId
()).
getId
());
}
});
return
list
;
return
list
;
}
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
8e2e4cec
This diff is collapsed.
Click to expand it.
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