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
9b88a611
Commit
9b88a611
authored
Nov 28, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.一体化平台飞书车辆问题修改处理。
parent
28df875d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
6 deletions
+170
-6
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+46
-2
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+4
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+2
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+19
-0
AmostEquipApplication.java
...quip/src/main/java/com/yeejoin/AmostEquipApplication.java
+4
-4
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+95
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
9b88a611
...
@@ -9,6 +9,8 @@ import com.google.common.collect.Lists;
...
@@ -9,6 +9,8 @@ import com.google.common.collect.Lists;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.*
;
...
@@ -82,7 +84,8 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -82,7 +84,8 @@ public class FireFightingSystemController extends AbstractBaseController {
FireFightingSystemMapper
fireFightingSystemMapper
;
FireFightingSystemMapper
fireFightingSystemMapper
;
@Autowired
@Autowired
private
AmosRequestContext
amosAuth
;
private
AmosRequestContext
amosAuth
;
@Autowired
private
RedisUtils
redisUtils
;
@Value
(
"${equipment.hierarchy}"
)
@Value
(
"${equipment.hierarchy}"
)
private
String
hierarchy
;
private
String
hierarchy
;
...
@@ -505,8 +508,49 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -505,8 +508,49 @@ public class FireFightingSystemController extends AbstractBaseController {
}
}
@PostMapping
(
value
=
"/getEquipTypeAmountCarJxiop"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取-江西电建"
,
notes
=
"九大类下装备信息列表-江西电建"
)
public
IPage
<
EquipTypeImgAmountVO
>
getEquipTypeAmountCarJxiop
(
@RequestBody
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
[]
result
=
hierarchy
.
split
(
","
);
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
result
.
length
;
i
++)
{
map
.
put
(
i
,
Integer
.
valueOf
(
result
[
i
]));
}
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())){
equipTypeAmountPage
.
setBizOrgCode
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
}
if
(
StringUtil
.
isNotEmpty
(
equipTypeAmountPage
.
getEquipmentClassificationCode
()))
{
QueryWrapper
<
EquipmentCategory
>
equipmentCategoryQueryWrapper
=
new
QueryWrapper
<>();
equipmentCategoryQueryWrapper
.
eq
(
"code"
,
equipTypeAmountPage
.
getEquipmentClassificationCode
());
equipmentCategoryQueryWrapper
.
eq
(
"industry_code"
,
equipTypeAmountPage
.
getIndustryCode
());
EquipmentCategory
equipmentCategory
=
equipmentCategoryService
.
getOne
(
equipmentCategoryQueryWrapper
);
if
(
equipmentCategory
==
null
)
{
throw
new
RuntimeException
(
"装备定义code有误"
);
}
int
inhierarchy
=
1
;
for
(
int
i
=
0
;
i
<
result
.
length
+
1
;
i
++)
{
//进来先判断是否默认就是空,如果为空第一层
if
(
equipmentCategory
.
getParentId
()
==
null
)
{
//判断是否是最下面的子节点
if
(
i
>=
4
)
{
inhierarchy
=
8
;
}
else
{
inhierarchy
=
map
.
get
(
i
);
}
break
;
}
else
{
//查找到循环几次为空
equipmentCategory
=
equipmentCategoryService
.
getById
(
equipmentCategory
.
getParentId
());
}
}
return
fireFightingSystemService
.
getColaCategoryAmountCarList
(
inhierarchy
,
equipTypeAmountPage
.
getEquipmentClassificationCode
().
substring
(
0
,
inhierarchy
),
equipTypeAmountPage
);
}
else
{
return
fireFightingSystemService
.
getColaCategoryAmountCarList
(
0
,
null
,
equipTypeAmountPage
);
}
}
@PostMapping
(
value
=
"/getEquipTypeAmountEqu"
)
@PostMapping
(
value
=
"/getEquipTypeAmountEqu"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取"
,
notes
=
"九大类下装备信息列表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取"
,
notes
=
"九大类下装备信息列表"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
9b88a611
...
@@ -154,6 +154,10 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -154,6 +154,10 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
@Param
(
"codeHead"
)
String
codeHead
,
@Param
(
"codeHead"
)
String
codeHead
,
@Param
(
"equipTypeAmountPage"
)
EquipTypeAmountPageDTO
equipTypeAmountPage
);
@Param
(
"equipTypeAmountPage"
)
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarListJxiop
(
@Param
(
"page"
)
IPage
page
,
@Param
(
"hierarchy"
)
int
hierarchy
,
@Param
(
"codeHead"
)
String
codeHead
,
@Param
(
"equipTypeAmountPage"
)
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
@Param
(
"page"
)
IPage
page
,
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
@Param
(
"page"
)
IPage
page
,
@Param
(
"hierarchy"
)
int
hierarchy
,
@Param
(
"hierarchy"
)
int
hierarchy
,
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
9b88a611
...
@@ -145,6 +145,8 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -145,6 +145,8 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountListIot
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountListIot
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarListJxiop
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
9b88a611
...
@@ -968,6 +968,25 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -968,6 +968,25 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarListJxiop
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
type
=
equipTypeAmountPage
.
getType
();
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
}
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountCarList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
}
x
.
setType
(
null
);
});
return
list
;
}
@Override
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
type
=
equipTypeAmountPage
.
getType
();
String
type
=
equipTypeAmountPage
.
getType
();
...
...
amos-boot-system-equip/src/main/java/com/yeejoin/AmostEquipApplication.java
View file @
9b88a611
...
@@ -103,8 +103,8 @@ public class AmostEquipApplication {
...
@@ -103,8 +103,8 @@ public class AmostEquipApplication {
}
}
// 江西电建服务重启后对于未计时且未结束的里程的进行处理
// 江西电建服务重启后对于未计时且未结束的里程的进行处理
//
@Bean
@Bean
//
void initCarMelige() {
void
initCarMelige
()
{
//
threadCarMileageTreatment.start();
threadCarMileageTreatment
.
start
();
//
}
}
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
9b88a611
...
@@ -1968,7 +1968,102 @@
...
@@ -1968,7 +1968,102 @@
</select>
</select>
<select
id=
"getColaCategoryAmountCarListJxiop"
resultMap=
"CategoryAmountList"
>
select * from ( SELECT
wlc.id,
wlc.qr_code,
CONCAT('03#',wlc.qr_code) fullqrCode,
wlc.standard,
wle.img,
wlc.`NAME` equipmentName,
wec.name as systemType,
NULL AS full_name,
wlun.NAME unitName,
NULL AS systemName,
1 AS amount,
'' as stockDetailId,
'car' as type,
wlai.`name` manufacturerName,
wlc.car_num as code,
wlc.iot_code as iotCode,
wlc.car_num as carNum,
CASE
wlc.car_state
WHEN '1' THEN
'在位'
WHEN '2' THEN
'执勤'
WHEN '3' THEN
'维修'
WHEN '6' THEN
'退役'
WHEN '7' THEN
'报废' ELSE '未入库'
END AS STATUS,
wlc.create_date as createDate,
'2' as eqtype,
wlc.biz_org_code as bizOrgCode,
wlc.biz_org_name as bizOrgName,
wlc.longitude,
wlc.equip_status as equipStatus,
wlc.latitude
FROM
wl_car wlc
LEFT JOIN wl_equipment wle ON wle.id = wlc.equipment_id
LEFT JOIN wl_unit wlun ON wle.unit_id = wlun.id
LEFT JOIN wl_manufacturer_info wlai ON wlc.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 (wec.CODE, #{hierarchy}) = #{codeHead}
</if>
<if
test=
"equipTypeAmountPage.industryCode!=null"
>
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
<if
test=
"equipTypeAmountPage.teamId!=null"
>
and wlc.team_id = #{equipTypeAmountPage.teamId}
</if>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
And wlc.`NAME` LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if>
<if
test=
"equipTypeAmountPage.manufacturerId!=null"
>
and wlc.manufacturer_id = #{equipTypeAmountPage.manufacturerId}
</if>
<if
test=
"equipTypeAmountPage.isImport!=null"
>
and wlc.is_import = #{equipTypeAmountPage.isImport}
</if>
<if
test=
"equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''"
>
AND wlc.car_num LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if>
<if
test=
"equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''"
>
AND wlc.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
<if
test=
"equipTypeAmountPage.carNum!=null and equipTypeAmountPage.carNum!=''"
>
And wlc.car_num LIKE CONCAT('%',#{equipTypeAmountPage.carNum},'%')
</if>
<if
test=
"equipTypeAmountPage.equipStatus!=null and equipTypeAmountPage.equipStatus!=''"
>
And wlc.equip_status = #{equipTypeAmountPage.equipStatus}
</if>
<if
test=
"equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"
>
And wlc.equip_status = #{equipTypeAmountPage.bizOrgCode}
</if>
<if
test=
"equipTypeAmountPage.keyword!=null and equipTypeAmountPage.keyword!=''"
>
And (wlc.`NAME` LIKE CONCAT('%',#{equipTypeAmountPage.keyword},'%')
OR wlc.car_num LIKE CONCAT('%',#{equipTypeAmountPage.keyword},'%')
OR wlc.biz_org_name LIKE CONCAT('%',#{equipTypeAmountPage.keyword},'%')
OR wlc.ownership LIKE CONCAT('%',#{equipTypeAmountPage.keyword},'%')
)
</if>
)s2
<if
test=
"equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''"
>
where s2.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<if
test=
"equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"
>
where s2.bizOrgCode LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</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