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
f2fde89f
Commit
f2fde89f
authored
Feb 06, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改装备统计数
parent
3207035b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
2 deletions
+116
-2
EquipmentCategoryMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentCategoryMapper.java
+2
-0
IEquipmentCategoryService.java
...eejoin/equipmanage/service/IEquipmentCategoryService.java
+3
-1
EquipmentCategoryServiceImpl.java
...quipmanage/service/impl/EquipmentCategoryServiceImpl.java
+9
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+51
-1
EquipmentCategoryMapper.xml
...uip/src/main/resources/mapper/EquipmentCategoryMapper.xml
+51
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentCategoryMapper.java
View file @
f2fde89f
...
@@ -53,6 +53,8 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
...
@@ -53,6 +53,8 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
int
checkUsed
(
String
id
);
int
checkUsed
(
String
id
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListNew
(
@Param
(
"head"
)
Integer
code
,
@Param
(
"type"
)
String
type
);
List
<
Map
<
String
,
Object
>>
getequipmentListEQNew
();
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentCategoryService.java
View file @
f2fde89f
...
@@ -9,6 +9,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentCategoryTypeTreeVO;
...
@@ -9,6 +9,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentCategoryTypeTreeVO;
import
com.yeejoin.equipmanage.common.vo.IndustryVo
;
import
com.yeejoin.equipmanage.common.vo.IndustryVo
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 装备分类 服务类
* 装备分类 服务类
...
@@ -46,7 +47,8 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
...
@@ -46,7 +47,8 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
int
checkUsed
(
List
<
String
>
ids
);
int
checkUsed
(
List
<
String
>
ids
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
);
List
<
EquipmentCategory
>
getEquipmentCategoryListNew
(
Integer
head
,
String
type
);
List
<
Map
<
String
,
Object
>>
getequipmentListEQNew
();
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
;
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
;
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
)
;
List
<
EquipmentCategory
>
getEquipmentCategoryListByFacilities
(
Integer
head
)
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentCategoryServiceImpl.java
View file @
f2fde89f
...
@@ -390,6 +390,15 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
...
@@ -390,6 +390,15 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
public
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
)
{
public
List
<
EquipmentCategory
>
getEquipmentCategoryList
(
Integer
head
)
{
return
this
.
baseMapper
.
getEquipmentCategoryList
(
head
);
return
this
.
baseMapper
.
getEquipmentCategoryList
(
head
);
}
}
@Override
public
List
<
EquipmentCategory
>
getEquipmentCategoryListNew
(
Integer
head
,
String
type
)
{
return
this
.
baseMapper
.
getEquipmentCategoryListNew
(
head
,
type
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
getequipmentListEQNew
()
{
return
this
.
baseMapper
.
getequipmentListEQNew
();
}
public
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
{
public
List
<
EquipmentCategory
>
getEquipmentCategoryListNotFacilities
(
Integer
head
)
{
return
this
.
baseMapper
.
getEquipmentCategoryListNotFacilities
(
head
);
return
this
.
baseMapper
.
getEquipmentCategoryListNotFacilities
(
head
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
f2fde89f
...
@@ -1151,10 +1151,60 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1151,10 +1151,60 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// return JSONArray.parseArray(
// return JSONArray.parseArray(
// JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
// JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
// } else {
// } else {
return
refreshEquipmentTypeAndCount
(
bizOrgCode
);
return
refreshEquipmentTypeAndCount
New
(
bizOrgCode
);
// }
// }
}
}
public
Object
refreshEquipmentTypeAndCountNew
(
String
bizOrgCode
)
{
List
<
EquipmentCategory
>
responseList
=
this
.
iEquipmentCategoryService
.
getEquipmentCategoryListNew
(
Integer
.
valueOf
(
equipmentCategoryLeftTypeCode
),
"eq"
);
if
(
responseList
==
null
||
responseList
.
size
()
<
1
)
{
return
null
;
}
List
<
EquipmentCategory
>
list
=
typeListTreeNew
(
responseList
,
bizOrgCode
);
return
list
;
}
public
List
<
EquipmentCategory
>
typeListTreeNew
(
List
<
EquipmentCategory
>
equipmentCategorys
,
String
bizOrgCode
)
{
List
<
EquipmentCategory
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
// 查询所有装备
List
<
Map
<
String
,
Object
>>
listMP
=
this
.
iEquipmentCategoryService
.
getequipmentListEQNew
();
equipmentCategorys
.
forEach
(
action
->
{
List
<
Map
<
String
,
Object
>>
listM
=
listMP
.
stream
().
filter
(
x
->
x
.
get
(
"code"
).
toString
().
contains
(
action
.
getCode
())&&
x
.
get
(
"bizOrgCode"
).
toString
().
contains
(
bizOrgCode
)).
collect
(
Collectors
.
toList
());
int
num
=
listM
!=
null
?
listM
.
size
():
0
;
action
.
setCount
(
Double
.
parseDouble
(
num
+
""
));
if
(
action
.
getParentId
()
==
null
)
{
list
.
add
(
action
);
}
else
{
if
(
tmpMap
.
get
(
action
.
getParentId
().
toString
())
==
null
)
{
ArrayList
<
EquipmentCategory
>
tmplist
=
new
ArrayList
<
EquipmentCategory
>();
tmplist
.
add
(
action
);
tmpMap
.
put
(
action
.
getParentId
().
toString
(),
tmplist
);
}
else
{
if
(!
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
contains
(
action
))
{
tmpMap
.
get
(
action
.
getParentId
().
toString
()).
add
(
action
);
}
}
}
});
getChildren
(
list
,
tmpMap
);
return
list
;
}
@Override
@Override
public
Object
refreshEquipmentTypeAndCount
(
String
bizOrgCode
)
{
public
Object
refreshEquipmentTypeAndCount
(
String
bizOrgCode
)
{
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
f2fde89f
...
@@ -304,6 +304,57 @@
...
@@ -304,6 +304,57 @@
left join wl_industry i on ec.industry_code = i.code
left join wl_industry i on ec.industry_code = i.code
</select>
</select>
<select
id=
"getEquipmentCategoryListNew"
resultMap=
"Category"
>
SELECT ec.id,
ec.parent_id,
ec.CODE,
ec.NAME,
ec.is_consumptive,
ec.description,
ec.industry_code,
ec.remark,
ec.create_date,
i.`name` as industryName,
-- industry_code = 2代表消防设备
IF(LEFT(ec.CODE, 1) = #{head} and ec.industry_code = 2, 'car', 'equipment')
AS type
FROM wl_equipment_category ec
left join wl_industry i on ec.industry_code = i.code
WHERE 1=1
<if
test=
"type != null"
>
and left(ec.code,1) != '2'
and left(ec.code,4) !='9306'
and ec.industry_code = 2
</if>
</select>
<select
id=
"getequipmentListEQNew"
resultType=
"Map"
>
SELECT
`s`.`biz_org_code` AS `bizOrgCode`,
`c`.`code` AS `categoryCode`,
`getParentListEQ` ( `c`.`id` ) AS `code`
FROM
( ( `wl_equipment_specific` `s` JOIN `wl_equipment` `e` ) JOIN `wl_equipment_category` `c` )
WHERE
(
( `s`.`equipment_code` = `e`.`code` )
AND ( `e`.`category_id` = `c`.`id` )
AND ( `s`.`biz_org_code` != '' )
)
</select>
<select
id=
"getEquipmentCategoryListNotFacilities"
resultMap=
"Category"
>
<select
id=
"getEquipmentCategoryListNotFacilities"
resultMap=
"Category"
>
SELECT ec.id,
SELECT ec.id,
ec.parent_id,
ec.parent_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