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
08880846
Commit
08880846
authored
May 30, 2024
by
张森
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl' into develop_dl_bugfix
# Conflicts: # amos-boot-system-equip/src/main/resources/application-dev.properties
parents
837c6efc
76c5d1ae
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
315 additions
and
203 deletions
+315
-203
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+8
-8
FirefightersJacketMapper.java
...ot/module/common/api/mapper/FirefightersJacketMapper.java
+5
-0
FirefightersJacketMapper.xml
...pi/src/main/resources/mapper/FirefightersJacketMapper.xml
+12
-1
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+4
-1
Car.java
.../main/java/com/yeejoin/equipmanage/common/entity/Car.java
+4
-0
EquipTypeEnum.java
...yeejoin/amos/boot/module/jcs/api/enums/EquipTypeEnum.java
+1
-1
IFirefightersJacketService.java
...ot/module/jcs/api/service/IFirefightersJacketService.java
+3
-0
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+3
-0
ScrapController.java
...a/com/yeejoin/equipmanage/controller/ScrapController.java
+12
-11
StockDetailController.java
...yeejoin/equipmanage/controller/StockDetailController.java
+11
-11
IScrapService.java
...n/java/com/yeejoin/equipmanage/service/IScrapService.java
+2
-1
IStockDetailService.java
.../com/yeejoin/equipmanage/service/IStockDetailService.java
+1
-1
EquipmentServiceImpl.java
...eejoin/equipmanage/service/impl/EquipmentServiceImpl.java
+10
-2
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+8
-5
ScrapServiceImpl.java
...om/yeejoin/equipmanage/service/impl/ScrapServiceImpl.java
+10
-4
StockDetailServiceImpl.java
...join/equipmanage/service/impl/StockDetailServiceImpl.java
+15
-8
WlSpareEquipmentServiceImpl.java
...equipmanage/service/impl/WlSpareEquipmentServiceImpl.java
+17
-14
FirefightersJacketController.java
...dule/jcs/biz/controller/FirefightersJacketController.java
+12
-0
FirefightersJacketServiceImpl.java
...e/jcs/biz/service/impl/FirefightersJacketServiceImpl.java
+22
-7
FirestationJacketServiceImpl.java
...le/jcs/biz/service/impl/FirestationJacketServiceImpl.java
+15
-5
Config.java
...in/java/com/yeejoin/amos/knowledgebase/config/Config.java
+0
-19
wl-3.6.0.xml
...ot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
+28
-3
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+108
-100
WlSpareEquipmentMapper.xml
...quip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
+2
-0
topic.json
...mos-boot-utils-message/src/main/resources/json/topic.json
+2
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
08880846
...
...
@@ -35,7 +35,7 @@ public interface EquipFeignClient {
* @return
*/
@RequestMapping
(
value
=
"/stock-detail/airport/person/bind"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
List
<
Object
>>
stockBindEquip
(
@RequestBody
List
<
Long
>
id
s
)
throws
InnerInvokException
;
ResponseModel
<
List
<
Object
>>
stockBindEquip
(
@RequestBody
List
<
Map
<
String
,
Number
>>
stock
s
)
throws
InnerInvokException
;
/**
* 人员装备退装
...
...
@@ -43,7 +43,7 @@ public interface EquipFeignClient {
* @return
*/
@RequestMapping
(
value
=
"/scrap/airport/person"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Object
>
scrapEquip
(
@RequestBody
String
id
)
throws
InnerInvokException
;
ResponseModel
<
Object
>
scrapEquip
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
InnerInvokException
;
/**
* 人员装备回库
...
...
@@ -173,8 +173,8 @@ public interface EquipFeignClient {
**/
@RequestMapping
(
value
=
"/car/getTeamCarList"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getTeamCarList
(
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
"longitude"
)
Double
longitude
,
@RequestParam
(
"latitude"
)
Double
latitude
);
/**
* 车辆信息详情
**/
...
...
@@ -365,7 +365,7 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"/perf-quota/listAll"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
List
<
EquipmentIndexDto
>>
getEquipmentIndexDto
(
@RequestBody
PerfQuotaIotDTO
perfQuotaIotDTO
);
@RequestMapping
(
value
=
"/car/{id}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Map
<
String
,
Object
>>
selectOneById
(
@PathVariable
(
"id"
)
Long
id
);
...
...
@@ -384,17 +384,17 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"/equipment/list/{typeCode}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
Object
>>
getEquipmentList
(
@PathVariable
(
"typeCode"
)
String
typeCode
);
@RequestMapping
(
value
=
"equipment-category/list-tree"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
list
()
;
//获取消防装备权限
@RequestMapping
(
value
=
"/equipment-detail/permissions/export"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
ReginParams
>
getPermissions
()
;
@RequestMapping
(
value
=
"/building/getBuildingList"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getBuildingTreeList
();
@RequestMapping
(
value
=
"/building/companyBuildingTree"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
getCompanyBuildingTree
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FirefightersJacketMapper.java
View file @
08880846
...
...
@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersJacket
;
import
java.util.List
;
import
java.util.Map
;
/**
* 消防人员配装记录 Mapper 接口
*
...
...
@@ -11,4 +14,6 @@ import com.yeejoin.amos.boot.module.common.api.entity.FirefightersJacket;
*/
public
interface
FirefightersJacketMapper
extends
BaseMapper
<
FirefightersJacket
>
{
List
<
Map
<
String
,
Object
>>
getPersonEquipCount
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersJacketMapper.xml
View file @
08880846
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.FirefightersJacketMapper"
>
<select
id=
"getPersonEquipCount"
resultType=
"java.util.Map"
>
SELECT
equipment_type_name AS name,
SUM(amount) AS value,
'个' AS unnit
FROM
jc_firefighters_jacket
WHERE
is_delete = 0
GROUP BY
equipment_type_name
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
08880846
...
...
@@ -1520,7 +1520,7 @@
) g ON u.sequence_nbr = g.instance_id
WHERE
u.biz_org_type = 'person'
AND g.peopleType IN ('1601', '1602', '1603')
AND g.peopleType IN ('1601', '1602', '1603'
, '1604'
)
AND u.is_delete = 0
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND u.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%')
...
...
@@ -1535,6 +1535,8 @@
LEFT JOIN ( SELECT * FROM cb_data_dictionary WHERE type = 'XFGLGW' ) b ON LOCATE( b.CODE, a.fireManagementPost ) != 0
WHERE
a.sequenceNbr IS NOT NULL AND b.`name` IS NOT NULL
GROUP BY
sequenceNbr
) a
GROUP BY
postName
...
...
@@ -1642,6 +1644,7 @@
u.biz_org_type = 'person'
AND g.peopleType IN ('1601', '1602', '1603')
AND u.is_delete = 0
AND cf.biz_org_name is not null
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND u.biz_org_code LIKE CONCAT(#{map.bizOrgCode}, '%')
</if>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/Car.java
View file @
08880846
...
...
@@ -249,4 +249,8 @@ public class Car extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
equipStatusFilter
;
@ApiModelProperty
(
value
=
"使用方式"
)
private
String
useType
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/EquipTypeEnum.java
View file @
08880846
...
...
@@ -13,7 +13,7 @@ public enum EquipTypeEnum {
/**
* 退库,回库
*/
退装
(
"scrap"
,
"退装
"
),
报废
(
"scrap"
,
"报废
"
),
回库
(
"stock"
,
"回库"
);
private
String
key
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IFirefightersJacketService.java
View file @
08880846
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.EquipmentOnCarDto;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* 消防人员配装记录 服务类
...
...
@@ -16,6 +17,8 @@ import java.util.List;
*/
public
interface
IFirefightersJacketService
{
List
<
Map
<
String
,
Object
>>
getPersonEquipCount
();
ResponseModel
<
Page
<
Object
>>
getAirEquipSpecificPage
(
EquipSpecificDto
equipSpecificDto
,
int
current
,
int
size
);
boolean
saveOrUpdateBatch
(
Long
firefightersId
,
List
<
EquipmentOnCarDto
>
equipmentOnCarDtos
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentSpecificController.java
View file @
08880846
...
...
@@ -267,6 +267,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
public
IPage
<
EquipmentOnCarVo
>
onCarVoIPage
(
@RequestBody
EquipmentSpecificDto
equipmentSpecificDto
)
{
ReginParams
ReginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
ReginParams
.
getPersonIdentity
().
getBizOrgCode
();
equipmentSpecificDto
.
setBizOrgCode
(
bizOrgCode
);
return
equipmentSpecificSerivce
.
onCarVoIPage
(
equipmentSpecificDto
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ScrapController.java
View file @
08880846
...
...
@@ -27,9 +27,10 @@ import javax.servlet.http.HttpServletRequest;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
*
*
*
* @author wujiang
* @date 2020-07-07
...
...
@@ -44,7 +45,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 新增
*
*
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
...
...
@@ -56,7 +57,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 根据id删除
*
*
* @param id
* @return
*/
...
...
@@ -69,7 +70,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 修改
*
*
* @return
*/
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -81,7 +82,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 根据id查询
*
*
* @param id
* @return
*/
...
...
@@ -94,7 +95,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 列表分页查询
*
*
* @return
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -143,7 +144,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 新建报废
*
*
* @param list
* @return
*/
...
...
@@ -156,7 +157,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 执行报废
*
*
* @param param
* @return
*/
...
...
@@ -172,7 +173,7 @@ public class ScrapController extends AbstractBaseController {
/**
* 执行报废
*
*
* @param
* @return
*/
...
...
@@ -222,9 +223,9 @@ public class ScrapController extends AbstractBaseController {
@RequestMapping
(
value
=
"/airport/person"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"机场人员装备退装接口"
,
notes
=
"人员装备报废"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
scrapOnPerson
(
@RequestBody
String
id
)
{
public
ResponseModel
scrapOnPerson
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
try
{
iScrapService
.
scrapOnPerson
(
Long
.
valueOf
(
id
));
iScrapService
.
scrapOnPerson
(
map
,
getUserInfo
(
));
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
"人员装备报废失败!"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/StockDetailController.java
View file @
08880846
...
...
@@ -40,7 +40,7 @@ public class StockDetailController {
/**
* 新增库存明细
*
*
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
...
...
@@ -52,7 +52,7 @@ public class StockDetailController {
/**
* 根据id删除
*
*
* @param id
* @return
*/
...
...
@@ -65,7 +65,7 @@ public class StockDetailController {
/**
* 修改库存明细
*
*
* @return
*/
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -77,7 +77,7 @@ public class StockDetailController {
/**
* 根据id查询
*
*
* @param id
* @return
*/
...
...
@@ -90,7 +90,7 @@ public class StockDetailController {
/**
* 列表分页查询
*
*
* @return
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -137,7 +137,7 @@ public class StockDetailController {
/**
* 指定位置指定分类下库存查询 以分类为主(灭火药剂入账列表)
*
*
* @return
*/
@RequestMapping
(
value
=
"/category"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -158,7 +158,7 @@ public class StockDetailController {
/**
* 指定位置指定分类库存查询 以库存为主(灭火药剂装载列表)
*
*
* @return
*/
@RequestMapping
(
value
=
"/stock"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -180,7 +180,7 @@ public class StockDetailController {
/**
* 列表分页查询
*
*
* @return
*/
@RequestMapping
(
value
=
"/place/equipment"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -215,10 +215,10 @@ public class StockDetailController {
@RequestMapping
(
value
=
"/airport/person/bind"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"人员装备列装接口"
,
notes
=
"人员装备列装"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
loadOnPerson
(
@RequestBody
List
<
String
>
id
s
)
{
public
ResponseModel
loadOnPerson
(
@RequestBody
List
<
Map
<
String
,
Number
>>
stock
s
)
{
List
<
StockDetail
>
stockDetails
=
null
;
if
(
0
<
ids
.
size
())
{
stockDetails
=
iStockDetailService
.
loadOnPerson
(
id
s
);
if
(
!
stocks
.
isEmpty
())
{
stockDetails
=
iStockDetailService
.
loadOnPerson
(
stock
s
);
}
return
CommonResponseUtil
.
success
(
stockDetails
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IScrapService.java
View file @
08880846
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.entity.ScrapDetail;
import
com.yeejoin.equipmanage.common.entity.SystemDic
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务类
...
...
@@ -29,7 +30,7 @@ public interface IScrapService extends IService<Scrap> {
void
scrapOnCar
(
Long
id
);
void
scrapOnPerson
(
Long
id
);
void
scrapOnPerson
(
Map
<
String
,
Object
>
map
,
AgencyUserModel
agencyUserModel
);
void
delPerson
(
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IStockDetailService.java
View file @
08880846
...
...
@@ -24,7 +24,7 @@ public interface IStockDetailService extends IService<StockDetail> {
IPage
<
StockDetail
>
pagePlaceEquip
(
Page
<
StockDetail
>
pageBean
,
Long
equipmentDetailId
,
Long
warehouseStructureId
);
List
<
StockDetail
>
loadOnPerson
(
List
<
String
>
id
s
);
List
<
StockDetail
>
loadOnPerson
(
List
<
Map
<
String
,
Number
>>
stock
s
);
StockDetail
unloadPerson
(
Map
<
String
,
Object
>
map
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentServiceImpl.java
View file @
08880846
...
...
@@ -355,7 +355,16 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
.
collect
(
Collectors
.
groupingBy
(
EquipmentIndex:
:
getEquipmentId
));
Map
<
Long
,
Unit
>
unitMap
=
iUnitService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
Unit:
:
getId
,
t
->
t
));
Map
<
Long
,
EquipmentCategory
>
categoryMap
=
equipmentCategoryMapper
.
selectList
(
null
).
stream
().
collect
(
Collectors
.
toMap
(
EquipmentCategory:
:
getId
,
t
->
t
));
for
(
Equipment
equipment
:
list
)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
Equipment
equipment
=
list
.
get
(
i
);
EquipmentCategory
equipmentCategory
=
categoryMap
.
get
(
equipment
.
getCategoryId
());
String
categoryCode
=
equipment
.
getCode
();
// 移除非消耗性设备
if
(
Objects
.
isNull
(
equipmentCategory
)
||
!
Objects
.
equals
(
equipmentCategory
.
getIndustryCode
(),
"2"
)
||
categoryCode
.
charAt
(
0
)
==
'2'
||
categoryCode
.
charAt
(
0
)
==
'9'
)
{
list
.
remove
(
equipment
);
i
--;
continue
;
}
List
<
EquipmentIndex
>
quotaList
=
equipmentIndexMap
.
get
(
equipment
.
getId
().
toString
());
List
<
EquProperty
>
properList
=
new
ArrayList
<
EquProperty
>();
if
(
CollUtil
.
isNotEmpty
(
quotaList
))
{
...
...
@@ -371,7 +380,6 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
properList
.
add
(
equProperty
);
}
}
EquipmentCategory
equipmentCategory
=
categoryMap
.
get
(
equipment
.
getCategoryId
());
if
(
ObjectUtils
.
isNotEmpty
(
equipmentCategory
))
{
equipment
.
setEquipCategoryId
(
equipmentCategory
.
getId
());
equipment
.
setEquipCategoryCode
(
equipmentCategory
.
getCode
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
08880846
...
...
@@ -1156,17 +1156,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
AlarmDataVO
>
list
=
this
.
baseMapper
.
getSystemById
(
id
);
// 部件总数
Integer
equipmentCount
=
equipmentSpecificMapper
.
selectCount
(
Wrappers
.<
EquipmentSpecific
>
lambdaQuery
().
eq
(
EquipmentSpecific:
:
getSystemId
,
id
)
Wrappers
.<
EquipmentSpecific
>
lambdaQuery
()
.
eq
(
EquipmentSpecific:
:
getSystemId
,
id
)
.
eq
(
EquipmentSpecific:
:
getSingle
,
true
)
);
//
今日报警次数
Integer
alarmCount
=
equipmentSpecificAlarmLogMapper
.
selectCoun
t
(
//
未复归设备
List
<
EquipmentSpecificAlarmLog
>
equipSpecIds
=
equipmentSpecificAlarmLogMapper
.
selectLis
t
(
Wrappers
.<
EquipmentSpecificAlarmLog
>
lambdaQuery
()
.
select
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificId
)
.
like
(
EquipmentSpecificAlarmLog:
:
getSystemIds
,
id
)
.
eq
(
EquipmentSpecificAlarmLog:
:
getStatus
,
"1"
)
.
likeRight
(
EquipmentSpecificAlarmLog:
:
getCreateDate
,
LocalDate
.
now
().
toString
())
);
int
count
=
(
int
)
equipSpecIds
.
stream
().
map
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificId
).
distinct
().
count
();
list
.
add
(
new
AlarmDataVO
(
"部件总数"
,
equipmentCount
+
" 个"
,
false
));
list
.
add
(
new
AlarmDataVO
(
"
今日报警次数"
,
alarmCount
+
" 次
"
,
false
));
list
.
add
(
new
AlarmDataVO
(
"
未复归设备"
,
count
+
" 个
"
,
false
));
return
list
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ScrapServiceImpl.java
View file @
08880846
...
...
@@ -72,6 +72,7 @@ public class ScrapServiceImpl extends ServiceImpl<ScrapMapper, Scrap> implements
scrap
.
setBillCode
(
stockBillService
.
generateQrCode
(
"BF"
));
scrap
.
setBillType
(
type
);
scrap
.
setStatus
(
TaskStatusEnum
.
INPROGRESS
.
getCode
());
scrap
.
setUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
scrap
.
setCreatorName
(
agencyUserModel
.
getRealName
());
scrapService
.
save
(
scrap
);
for
(
ScrapDetail
scrapDetail
:
list
)
{
...
...
@@ -312,15 +313,20 @@ public class ScrapServiceImpl extends ServiceImpl<ScrapMapper, Scrap> implements
}
@Override
public
void
scrapOnPerson
(
Long
id
)
{
// QueryWrapper<StockDetail> queryWrapper = new QueryWrapper<>();
// StockDetail stockDetail = stockDetailService.getOne(queryWrapper.eq("equipment_specific_id", id));
@Transactional
public
void
scrapOnPerson
(
Map
<
String
,
Object
>
map
,
AgencyUserModel
agencyUserModel
)
{
Long
id
=
Long
.
valueOf
(
map
.
get
(
"stockDetailId"
).
toString
());
double
amount
=
Double
.
parseDouble
(
map
.
get
(
"amount"
).
toString
());
StockDetail
stockDetail
=
stockDetailService
.
getById
(
id
);
if
(
null
==
stockDetail
)
{
throw
new
RuntimeException
(
"id为"
+
id
+
"的StockDetail实体不存在!"
);
}
stockDetail
.
setStatus
(
String
.
valueOf
(
EquipStatusEnum
.
SCRAP
.
getCode
()));
stockDetailService
.
updateById
(
stockDetail
);
// 添加报废流程
ScrapDetail
scrapDetail
=
new
ScrapDetail
();
scrapDetail
.
setStockDetailId
(
stockDetail
.
getId
());
scrapDetail
.
setAmount
(
amount
);
this
.
create
(
Collections
.
singletonList
(
scrapDetail
),
BillContentEnum
.
ZB
.
getCode
(),
agencyUserModel
);
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockDetailServiceImpl.java
View file @
08880846
...
...
@@ -144,15 +144,20 @@ public class StockDetailServiceImpl extends ServiceImpl<StockDetailMapper, Stock
}
@Override
public
List
<
StockDetail
>
loadOnPerson
(
List
<
String
>
id
s
)
{
public
List
<
StockDetail
>
loadOnPerson
(
List
<
Map
<
String
,
Number
>>
stock
s
)
{
List
<
StockDetail
>
list
=
new
ArrayList
<>();
id
s
.
forEach
(
x
->
{
StockDetail
stockDetail
=
this
.
baseMapper
.
selectById
(
Long
.
valueOf
(
x
));
stock
s
.
forEach
(
x
->
{
StockDetail
stockDetail
=
this
.
baseMapper
.
selectById
(
Long
.
valueOf
(
x
.
get
(
"stockDetailId"
).
toString
()
));
if
(
null
==
stockDetail
)
{
throw
new
RuntimeException
(
"id 为"
+
x
+
"的StockDetail不存在 !"
);
}
stockDetail
.
setStatus
(
String
.
valueOf
(
EquipStatusEnum
.
LOAD
.
getCode
()));
stockDetail
.
setAmount
(
Math
.
abs
(
stockDetail
.
getAmount
()
-
1.0
));
double
stockAmount
=
stockDetail
.
getAmount
()
-
Double
.
parseDouble
(
x
.
get
(
"amount"
).
toString
());
if
(
stockAmount
<
0
)
{
throw
new
RuntimeException
(
"库存不足"
);
}
else
if
(
stockAmount
==
0
)
{
stockDetail
.
setStatus
(
String
.
valueOf
(
EquipStatusEnum
.
LOAD
.
getCode
()));
}
stockDetail
.
setAmount
(
stockAmount
);
this
.
baseMapper
.
updateById
(
stockDetail
);
list
.
add
(
stockDetail
);
});
...
...
@@ -196,12 +201,14 @@ public class StockDetailServiceImpl extends ServiceImpl<StockDetailMapper, Stock
@Override
public
StockDetail
unloadPerson
(
Map
<
String
,
Object
>
map
)
{
// Long structureId = Long.valueOf(String.valueOf(map.get("warehouseStructureId")));
Long
stockDetailId
=
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"stockDetailId"
)));
double
amount
=
Double
.
parseDouble
(
String
.
valueOf
(
map
.
get
(
"amount"
)));
if
(
amount
==
0
)
{
throw
new
RuntimeException
(
"数量不能为空"
);
}
StockDetail
stockDetail
=
this
.
baseMapper
.
selectById
(
stockDetailId
);
stockDetail
.
setStatus
(
String
.
valueOf
(
EquipStatusEnum
.
REPERTORY
.
getCode
()));
//陈浩修改,原本退装枚举值所对应的jcs逻辑是回库,现确定为在位状态
// stockDetail.setWarehouseStructureId(structureId);
stockDetail
.
setAmount
(
stockDetail
.
getAmount
()
+
1.0
);
stockDetail
.
setAmount
(
stockDetail
.
getAmount
()
+
amount
);
this
.
baseMapper
.
updateById
(
stockDetail
);
return
stockDetail
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/WlSpareEquipmentServiceImpl.java
View file @
08880846
...
...
@@ -26,10 +26,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
...
...
@@ -71,8 +68,10 @@ public class WlSpareEquipmentServiceImpl extends ServiceImpl<WlSpareEquipmentMap
public
WlSpareEquipment
saveOrUpdateSpareEquipment
(
WlSpareEquipment
wlSpareEquipment
,
ReginParams
reginParams
)
{
wlSpareEquipment
.
setBizOrgName
(
reginParams
.
getPersonIdentity
().
getCompanyName
());
wlSpareEquipment
.
setBizOrgCode
(
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
());
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
selectById
(
wlSpareEquipment
.
getWarehouseStructureId
());
wlSpareEquipment
.
setWarehouseStructureCode
(
warehouseStructure
.
getCode
());
if
(
Objects
.
nonNull
(
wlSpareEquipment
.
getWarehouseStructureId
()))
{
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
selectById
(
wlSpareEquipment
.
getWarehouseStructureId
());
wlSpareEquipment
.
setWarehouseStructureCode
(
warehouseStructure
.
getCode
());
}
if
(
ObjectUtils
.
isEmpty
(
wlSpareEquipment
.
getId
()))
{
wlSpareEquipmentMapper
.
insert
(
wlSpareEquipment
);
}
else
{
...
...
@@ -147,7 +146,13 @@ public class WlSpareEquipmentServiceImpl extends ServiceImpl<WlSpareEquipmentMap
@Override
public
Page
<
WlSpareEquipment
>
listByPage
(
WlSpareEquipment
dto
,
Page
page
,
int
hierarchy
,
String
codeHead
)
{
return
wlSpareEquipmentMapper
.
listByPage
(
page
,
dto
,
hierarchy
,
codeHead
);
Page
<
WlSpareEquipment
>
wlSpareEquipmentPage
=
wlSpareEquipmentMapper
.
listByPage
(
page
,
dto
,
hierarchy
,
codeHead
);
List
<
WlSpareEquipment
>
records
=
wlSpareEquipmentPage
.
getRecords
();
for
(
WlSpareEquipment
record
:
records
)
{
record
.
setImg
(
getEquipFileList
(
record
.
getId
(),
FileTypeEnum
.
image
.
toString
()));
}
wlSpareEquipmentPage
.
setRecords
(
records
);
return
wlSpareEquipmentPage
;
}
@Override
...
...
@@ -235,14 +240,12 @@ public class WlSpareEquipmentServiceImpl extends ServiceImpl<WlSpareEquipmentMap
@Override
public
void
subtractNum
(
Long
id
,
Float
num
)
{
synchronized
(
id
.
toString
())
{
WlSpareEquipment
wlSpareEquipment
=
this
.
getById
(
id
);
if
(
num
>
wlSpareEquipment
.
getStockNum
())
{
throw
new
BadRequest
(
"使用数量大于备品备件库存数量"
);
}
wlSpareEquipment
.
setStockNum
(
wlSpareEquipment
.
getStockNum
()
-
num
);
this
.
updateById
(
wlSpareEquipment
);
WlSpareEquipment
wlSpareEquipment
=
this
.
getById
(
id
);
if
(
num
>
wlSpareEquipment
.
getStockNum
())
{
throw
new
BadRequest
(
"使用数量大于备品备件库存数量"
);
}
wlSpareEquipment
.
setStockNum
(
wlSpareEquipment
.
getStockNum
()
-
num
);
this
.
updateById
(
wlSpareEquipment
);
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersJacketController.java
View file @
08880846
...
...
@@ -3,9 +3,11 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -174,6 +176,16 @@ public class FirefightersJacketController extends BaseController {
}
/**
* 分页查询设备数量(调用装备接口)
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"人员装备数量"
)
@RequestMapping
(
value
=
"/person-equip-count"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPersonEquipCount
()
{
return
ResponseHelper
.
buildResponse
(
iFirefightersJacketService
.
getPersonEquipCount
());
}
/**
* 分页查询设备列表(调用装备接口)
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FirefightersJacketServiceImpl.java
View file @
08880846
...
...
@@ -36,6 +36,13 @@ public class FirefightersJacketServiceImpl extends BaseService<FirefightersJacke
@Autowired
private
EquipFeignClient
equipFeignClient
;
@Autowired
private
FirefightersJacketMapper
firefightersJacketMapper
;
@Override
public
List
<
Map
<
String
,
Object
>>
getPersonEquipCount
()
{
return
firefightersJacketMapper
.
getPersonEquipCount
();
}
@Override
public
ResponseModel
<
Page
<
Object
>>
getAirEquipSpecificPage
(
EquipSpecificDto
equipSpecificDto
,
int
current
,
int
size
)
{
...
...
@@ -47,9 +54,15 @@ public class FirefightersJacketServiceImpl extends BaseService<FirefightersJacke
@Override
public
boolean
saveOrUpdateBatch
(
Long
firefightersId
,
List
<
EquipmentOnCarDto
>
equipmentOnCarDtos
)
{
List
<
Long
>
ids
=
equipmentOnCarDtos
.
stream
().
map
(
EquipmentOnCarDto:
:
getStockDetailId
).
collect
(
Collectors
.
toList
());
List
<
Object
>
result
=
equipFeignClient
.
stockBindEquip
(
ids
).
getResult
();
if
(
result
.
size
()
>
0
)
{
List
<
Map
<
String
,
Number
>>
stocks
=
new
ArrayList
<>();
for
(
EquipmentOnCarDto
dto
:
equipmentOnCarDtos
)
{
stocks
.
add
(
new
HashMap
<
String
,
Number
>()
{{
this
.
put
(
"stockDetailId"
,
dto
.
getStockDetailId
());
this
.
put
(
"amount"
,
dto
.
getAmount
());
}});
}
List
<
Object
>
result
=
equipFeignClient
.
stockBindEquip
(
stocks
).
getResult
();
if
(!
result
.
isEmpty
())
{
List
<
FirefightersJacket
>
firefightersJackets
=
new
ArrayList
<>();
equipmentOnCarDtos
.
forEach
(
x
->
{
FirefightersJacket
firefightersJacket
=
new
FirefightersJacket
();
...
...
@@ -70,11 +83,13 @@ public class FirefightersJacketServiceImpl extends BaseService<FirefightersJacke
@Override
public
boolean
update
(
String
type
,
FirefightersJacket
firefightersJacket
)
{
ResponseModel
<
Object
>
objectResponseModel
=
null
;
if
(
EquipTypeEnum
.
退装
.
getKey
().
equals
(
type
))
{
objectResponseModel
=
equipFeignClient
.
scrapEquip
(
String
.
valueOf
(
firefightersJacket
.
getStockDetailId
()));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"firefightersId"
,
firefightersJacket
.
getFirefightersId
());
map
.
put
(
"stockDetailId"
,
firefightersJacket
.
getStockDetailId
());
map
.
put
(
"amount"
,
firefightersJacket
.
getAmount
());
if
(
EquipTypeEnum
.
报废
.
getKey
().
equals
(
type
))
{
objectResponseModel
=
equipFeignClient
.
scrapEquip
(
map
);
}
else
if
(
EquipTypeEnum
.
回库
.
getKey
().
equals
(
type
))
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stockDetailId"
,
firefightersJacket
.
getStockDetailId
());
objectResponseModel
=
equipFeignClient
.
stockEquip
(
map
);
}
if
(
ValidationUtil
.
isEmpty
(
objectResponseModel
)){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FirestationJacketServiceImpl.java
View file @
08880846
...
...
@@ -51,7 +51,14 @@ public class FirestationJacketServiceImpl extends BaseService<FirestationJacketD
@Override
public
boolean
saveOrUpdateBatch
(
Long
firefightersId
,
List
<
EquipmentOnCarDto
>
equipmentOnCarDtos
)
{
List
<
Long
>
ids
=
equipmentOnCarDtos
.
stream
().
map
(
EquipmentOnCarDto:
:
getStockDetailId
).
collect
(
Collectors
.
toList
());
List
<
Object
>
result
=
equipFeignClient
.
stockBindEquip
(
ids
).
getResult
();
List
<
Map
<
String
,
Number
>>
stocks
=
new
ArrayList
<>();
for
(
EquipmentOnCarDto
dto
:
equipmentOnCarDtos
)
{
stocks
.
add
(
new
HashMap
<
String
,
Number
>()
{{
this
.
put
(
"id"
,
dto
.
getStockDetailId
());
this
.
put
(
"amount"
,
dto
.
getAmount
());
}});
}
List
<
Object
>
result
=
equipFeignClient
.
stockBindEquip
(
stocks
).
getResult
();
if
(
result
.
size
()
>
0
)
{
List
<
FirestationJacket
>
firefightersJackets
=
new
ArrayList
<>();
equipmentOnCarDtos
.
forEach
(
x
->
{
...
...
@@ -73,11 +80,13 @@ public class FirestationJacketServiceImpl extends BaseService<FirestationJacketD
@Override
public
boolean
update
(
String
type
,
FirestationJacket
firestationJacket
)
{
ResponseModel
<
Object
>
objectResponseModel
=
null
;
if
(
EquipTypeEnum
.
退装
.
getKey
().
equals
(
type
))
{
objectResponseModel
=
equipFeignClient
.
scrapEquip
(
String
.
valueOf
(
firestationJacket
.
getStockDetailId
()));
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"firefightersId"
,
firestationJacket
.
getFirefightersId
());
map
.
put
(
"stockDetailId"
,
firestationJacket
.
getStockDetailId
());
map
.
put
(
"amount"
,
firestationJacket
.
getAmount
());
if
(
EquipTypeEnum
.
报废
.
getKey
().
equals
(
type
))
{
objectResponseModel
=
equipFeignClient
.
scrapEquip
(
map
);
}
else
if
(
EquipTypeEnum
.
回库
.
getKey
().
equals
(
type
))
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stockDetailId"
,
firestationJacket
.
getStockDetailId
());
objectResponseModel
=
equipFeignClient
.
stockEquip
(
map
);
}
if
(
ValidationUtil
.
isEmpty
(
objectResponseModel
)){
...
...
@@ -87,6 +96,7 @@ public class FirestationJacketServiceImpl extends BaseService<FirestationJacketD
return
true
;
}
@Override
public
ResponseModel
<
Object
>
getEquipByStockDetailId
(
Long
stockDetailId
)
{
return
equipFeignClient
.
getAirEquipSpecificDetail
(
stockDetailId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/config/Config.java
deleted
100644 → 0
View file @
837c6efc
//package com.yeejoin.amos.knowledgebase.config;
//
//import com.baomidou.mybatisplus.core.toolkit.Sequence;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author 杨博超
// * @ClassName Config
// * @Deacription TODO
// **/
//@Configuration
//public class Config {
//
// @Bean
// public Sequence sequence() {
// return new Sequence();
// }
//}
amos-boot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
View file @
08880846
...
...
@@ -1139,15 +1139,39 @@
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"168623599"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"wl_car"
/>
</preConditions>
<comment>
新增属性数据
</comment>
<sql>
alter table `wl_car` add column `max_speed` double(10,2) DEFAULT NULL COMMENT '速度阈值';
alter table `wl_car` add column `phone` varchar(50) DEFAULT NULL COMMENT '联系电话';
alter table `wl_car` add column `driver` varchar(250) DEFAULT NULL COMMENT '司机';
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"168623588"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"wl_equipment_category"
/>
</not>
<tableExists
tableName=
"wl_equipment_category"
/>
</preConditions>
<comment>
新增属性数据
</comment>
<sql>
INSERT INTO `wl_equipment_category`(`id`, `parent_id`, `code`, `name`, `is_consumptive`, `description`, `remark`, `create_date`, `industry_code`, `image`) VALUES (860, '123', '21030000', '消防坦克', 0, NULL, '初始导入', '2024-05-23 15:59:42', '2', NULL);
DELETE FROM `wl_equipment_category` WHERE id = 759;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1694056788"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"wl_car"
columnName=
"use_type"
/>
</not>
</preConditions>
<comment>
新增字段 type_code
</comment>
<sql>
alter table `wl_car` add column `use_type` varchar(20) DEFAULT '自购' COMMENT '使用方式';
UPDATE `wl_car` wc SET wc.use_type = '自购';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
08880846
...
...
@@ -2100,109 +2100,117 @@
<select
id=
"getColaCategoryAmountEquList"
resultMap=
"CategoryAmountList"
>
SELECT
wles.id,
wles.qr_code,
CONCAT('01#',wles.qr_code) fullqrCode,
wled.standard,
wle.img,
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,
wlai.`name` manufacturerName,
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,
wles.biz_org_name as bizOrgName,
wles.equip_status as equipStatus
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
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.industryCode!=null"
>
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
<if
test=
"equipTypeAmountPage.teamId!=null"
>
and wles.team_id = #{equipTypeAmountPage.teamId}
</if>
<if
test=
"equipTypeAmountPage.systemId!=null"
>
and wles.system_id = #{equipTypeAmountPage.systemId}
</if>
<if
test=
"equipTypeAmountPage.manufacturerId!=null"
>
and wled.manufacturer_id = #{equipTypeAmountPage.manufacturerId}
</if>
<if
test=
"equipTypeAmountPage.isImport!=null"
>
and wled.is_import = #{equipTypeAmountPage.isImport}
</if>
<if
test=
"equipTypeAmountPage.warehouseStructureId!=null"
>
and wlsd.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
select id from wl_warehouse_structure where parent_id = #{equipTypeAmountPage.warehouseStructureId} or
id = #{equipTypeAmountPage.warehouseStructureId}
)
</if>
<if
test=
"equipTypeAmountPage.status == 1"
>
and wlsd.warehouse_structure_id is null
</if>
<if
test=
"equipTypeAmountPage.isIot!=null"
>
and wle.is_iot=#{equipTypeAmountPage.isIot}
</if>
<if
test=
"equipTypeAmountPage.status == 0"
>
and wlsd.warehouse_structure_id is not null
</if>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if>
<if
test=
"equipTypeAmountPage.nameOrCode!=null and equipTypeAmountPage.nameOrCode!=''"
>
AND (wled.name LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%') or wles.code LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%'))
</if>
<if
test=
"equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''"
>
AND wles.code LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if>
<if
test=
"equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''"
>
AND wles.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
SELECT
wles.id,
wles.qr_code,
CONCAT('01#',wles.qr_code) fullqrCode,
wled.standard,
wle.img,
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,
wlai.`name` manufacturerName,
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,
wles.biz_org_name as bizOrgName,
wles.equip_status as equipStatus,
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
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"
>
and wles.team_id = #{equipTypeAmountPage.teamId}
</if>
<if
test=
"equipTypeAmountPage.systemId!=null"
>
and wles.system_id = #{equipTypeAmountPage.systemId}
</if>
<if
test=
"equipTypeAmountPage.manufacturerId!=null"
>
and wled.manufacturer_id = #{equipTypeAmountPage.manufacturerId}
</if>
<if
test=
"equipTypeAmountPage.isImport!=null"
>
and wled.is_import = #{equipTypeAmountPage.isImport}
</if>
<if
test=
"equipTypeAmountPage.warehouseStructureId!=null"
>
and wlsd.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
select id from wl_warehouse_structure where parent_id = #{equipTypeAmountPage.warehouseStructureId} or
id = #{equipTypeAmountPage.warehouseStructureId}
)
</if>
<if
test=
"equipTypeAmountPage.status == 1"
>
and wlsd.warehouse_structure_id is null
</if>
<if
test=
"equipTypeAmountPage.status == 0"
>
and wlsd.warehouse_structure_id is not null
</if>
<if
test=
"equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"
>
AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if>
<if
test=
"equipTypeAmountPage.nameOrCode!=null and equipTypeAmountPage.nameOrCode!=''"
>
AND (wled.name LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%') or wles.code LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%'))
</if>
<if
test=
"equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''"
>
AND wles.code LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if>
<if
test=
"equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''"
>
AND wles.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
<if
test=
"equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''"
>
AND concat_ws('-',wlws.full_name,wled.area) LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<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 industryCode = #{equipTypeAmountPage.industryCode}
</if>
<if
test=
"equipTypeAmountPage.isIot!=null"
>
AND wleIsIot = #{equipTypeAmountPage.isIot}
</if>
order by createDate DESC
</select>
<if
test=
"equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''"
>
AND concat_ws('-',wlws.full_name,wled.area) LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<if
test=
"equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"
>
AND wles.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if>
order by createDate DESC
</select>
<select
id=
"listByBizOrgCode"
resultType=
"java.util.Map"
>
SELECT
...
...
amos-boot-system-equip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
View file @
08880846
...
...
@@ -53,6 +53,8 @@
</where>
GROUP BY
a.equip_model_id
HAVING
sum( a.stock_num ) != 0
</select>
<select
id=
"exportList"
resultType=
"com.yeejoin.equipmanage.common.entity.WlSpareEquipment"
>
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/json/topic.json
View file @
08880846
...
...
@@ -83,7 +83,7 @@
,
{
"code"
:
"scrapPut"
,
"emqTopic"
:
"equip/scrap/put"
,
"emqTopic"
:
"equip/scrap/put
/zxj
"
,
"akkaTopic"
:
"JKXT2BP-XFYY-Topic"
}
]
\ 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