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
29cf2614
Commit
29cf2614
authored
Apr 26, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改iotcode 验证
parent
126173f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
1 deletion
+49
-1
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+29
-0
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+4
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+12
-1
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+4
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
29cf2614
...
@@ -168,6 +168,21 @@ public class CarController extends AbstractBaseController {
...
@@ -168,6 +168,21 @@ public class CarController extends AbstractBaseController {
// saveFile(carInstance); 图片视频后期统一处理
// saveFile(carInstance); 图片视频后期统一处理
//验证车辆code唯一性
if
(
car
.
getIotCode
()!=
null
){
Car
ar
=
carMapper
.
getCarsByIotCode
(
car
.
getIotCode
());
if
(
ar
!=
null
){
throw
new
BadRequest
(
"物联编码重复"
);
}
if
(
car
.
getIotCode
().
startsWith
(
"20210003"
)||
car
.
getIotCode
().
startsWith
(
"20210004"
)||
car
.
getIotCode
().
startsWith
(
"20210005"
)){
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
EquipmentSpecificSerivceImpl
.
registerMqttTopic
(
car
.
getIotCode
(),
equipmentIotMqttReceiveConfig
);
EquipmentSpecificSerivceImpl
.
registerMqttTopic
(
car
.
getIotCode
(),
equipmentIotMqttReceiveConfig
);
car
.
setQrCode
(
QRCodeUtil
.
generateQRCode
());
car
.
setQrCode
(
QRCodeUtil
.
generateQRCode
());
List
<
CarProperty
>
carPropertyList
=
car
.
getCarPropertyList
();
List
<
CarProperty
>
carPropertyList
=
car
.
getCarPropertyList
();
...
@@ -298,6 +313,20 @@ public class CarController extends AbstractBaseController {
...
@@ -298,6 +313,20 @@ public class CarController extends AbstractBaseController {
// carInstance = iCarService.saveCar(getUserInfo(), carInstance, carInfo, carpList);
// carInstance = iCarService.saveCar(getUserInfo(), carInstance, carInfo, carpList);
// saveFile(carInstance);视频图片文件后期统一处理
// saveFile(carInstance);视频图片文件后期统一处理
if
(
car
.
getIotCode
()!=
null
){
Car
ar
=
carMapper
.
getCarsByIotCode
(
car
.
getIotCode
());
if
(
ar
!=
null
){
throw
new
BadRequest
(
"物联编码重复"
);
}
if
(
car
.
getIotCode
().
startsWith
(
"20210003"
)||
car
.
getIotCode
().
startsWith
(
"20210004"
)||
car
.
getIotCode
().
startsWith
(
"20210005"
)){
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
//用来解绑车辆
//用来解绑车辆
jcsFeign
.
getUserCar
(
car
.
getId
(),
car
.
getTeamId
());
jcsFeign
.
getUserCar
(
car
.
getId
(),
car
.
getTeamId
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
29cf2614
...
@@ -256,6 +256,10 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -256,6 +256,10 @@ public class EquipmentDetailController extends AbstractBaseController {
if
(
iotCode
>
0
)
{
if
(
iotCode
>
0
)
{
throw
new
BadRequest
(
"设备物联编码重复"
);
throw
new
BadRequest
(
"设备物联编码重复"
);
}
}
if
(
sysCode
.
startsWith
(
"20210003"
)||
sysCode
.
startsWith
(
"20210004"
)||
sysCode
.
startsWith
(
"20210005"
)){
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
}
//1.更新装备实例Detail数据
//1.更新装备实例Detail数据
EquipmentDetail
equipmentDetail
=
equipmentDate
.
getEquipmentDetail
();
EquipmentDetail
equipmentDetail
=
equipmentDate
.
getEquipmentDetail
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
29cf2614
...
@@ -222,13 +222,24 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -222,13 +222,24 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
handlerMqttIncrementMessage
(
String
topic
,
String
message
)
{
public
void
handlerMqttIncrementMessage
(
String
topic
,
String
message
)
{
TopicEntityVo
topicEntity
=
new
TopicEntityVo
();
TopicEntityVo
topicEntity
=
new
TopicEntityVo
();
topicEntity
.
setTopic
(
topic
);
topicEntity
.
setTopic
(
topic
);
topicEntity
.
setMessage
(
message
);
topicEntity
.
setMessage
(
message
);
int
endIndex
=
topic
.
lastIndexOf
(
"/"
);
int
endIndex
=
topic
.
lastIndexOf
(
"/"
);
String
iotCode
=
topic
.
substring
(
0
,
endIndex
).
replace
(
"/"
,
""
);
String
iotCode
=
topic
.
substring
(
0
,
endIndex
).
replace
(
"/"
,
""
);
topicEntity
.
setIotCode
(
iotCode
);
topicEntity
.
setIotCode
(
iotCode
);
List
<
EquipmentSpecificVo
>
eqIotCodeList
=
iEquipmentSpecificSerivce
.
getEquipAndCarIotcodeByIotcode
(
iotCode
);
List
<
EquipmentSpecificVo
>
eqIotCodeList
=
null
;
if
(
iotCode
!=
null
&&!
iotCode
.
startsWith
(
"20210003"
)&&!
iotCode
.
startsWith
(
"20210004"
)&&!
iotCode
.
startsWith
(
"20210005"
)){
eqIotCodeList
=
iEquipmentSpecificSerivce
.
getEquipAndCarIotcodeByIotcode
(
iotCode
);
}
else
{
log
.
info
(
"不是装备物联code!"
,
iotCode
);
return
;
}
if
(
eqIotCodeList
.
isEmpty
())
{
if
(
eqIotCodeList
.
isEmpty
())
{
log
.
info
(
"该数据{}不存在!"
,
iotCode
);
log
.
info
(
"该数据{}不存在!"
,
iotCode
);
return
;
return
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
29cf2614
...
@@ -549,6 +549,10 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -549,6 +549,10 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
if
(
iot_code
!=
0
)
{
if
(
iot_code
!=
0
)
{
throw
new
RuntimeException
(
String
.
format
(
"物联编码[%S]填写重复,请重新输入!"
,
iot
));
throw
new
RuntimeException
(
String
.
format
(
"物联编码[%S]填写重复,请重新输入!"
,
iot
));
}
}
if
(
iot
.
startsWith
(
"20210003"
)||
iot
.
startsWith
(
"20210004"
)||
iot
.
startsWith
(
"20210005"
)){
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
}
AtomicReference
<
String
>
fightSysIds
=
new
AtomicReference
<>(
""
);
AtomicReference
<
String
>
fightSysIds
=
new
AtomicReference
<>(
""
);
String
fightingSysCodes
=
equipmentDetailDownloadVOS
.
getFightingSysCodes
();
String
fightingSysCodes
=
equipmentDetailDownloadVOS
.
getFightingSysCodes
();
...
...
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