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
9ca0695d
Commit
9ca0695d
authored
Jun 28, 2023
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_3.7.0.9' of
http://39.98.45.134:8090/moa/amos-boot-biz…
Merge branch 'develop_dl_3.7.0.9' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_3.7.0.9
parents
a3e74a0d
305ebf46
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
34 deletions
+65
-34
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+2
-0
ApplicationRunnerImpl.java
...ejoin/equipmanage/service/impl/ApplicationRunnerImpl.java
+1
-1
FormInstanceEquipServiceImpl.java
...quipmanage/service/impl/FormInstanceEquipServiceImpl.java
+10
-5
StartLoader.java
.../yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
+11
-6
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+21
-4
AmostEquipApplication.java
...quip/src/main/java/com/yeejoin/AmostEquipApplication.java
+6
-1
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+8
-15
PatrolApplication.java
...rol/src/main/java/com/yeejoin/amos/PatrolApplication.java
+2
-2
application.properties
...t-utils-message/src/main/resources/application.properties
+4
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
9ca0695d
...
@@ -847,7 +847,9 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -847,7 +847,9 @@ public class ConfigureController extends AbstractBaseController {
list
.
forEach
(
e
->
list
.
forEach
(
e
->
iFireFightingSystemService
.
iotDayReport
(
e
.
get
(
"bizOrgCode"
),
finalStartDate
,
finalEndDate
)
iFireFightingSystemService
.
iotDayReport
(
e
.
get
(
"bizOrgCode"
),
finalStartDate
,
finalEndDate
)
);
);
log
.
info
(
"定时生成 物联报表-日执行结束"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"定时生成 物联报表-日执行报错"
);
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ApplicationRunnerImpl.java
View file @
9ca0695d
...
@@ -62,6 +62,6 @@ public class ApplicationRunnerImpl implements ApplicationRunner {
...
@@ -62,6 +62,6 @@ public class ApplicationRunnerImpl implements ApplicationRunner {
iSourceStatistics
.
initAllCategoryStatisticsData
(
SourceTypeEnum
.
IOT
);
iSourceStatistics
.
initAllCategoryStatisticsData
(
SourceTypeEnum
.
IOT
);
maintenanceResourceDataService
.
subscribeTopic
();
maintenanceResourceDataService
.
subscribeTopic
();
emqKeeper
.
getMqttClient
().
subscribe
(
ConfigPageTopicEnum
.
INTEGRATE
.
getTopic
(),
2
,
integratePageDataListener
);
emqKeeper
.
subscript
(
ConfigPageTopicEnum
.
INTEGRATE
.
getTopic
(),
2
,
integratePageDataListener
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceEquipServiceImpl.java
View file @
9ca0695d
...
@@ -214,11 +214,16 @@ public class FormInstanceEquipServiceImpl extends ServiceImpl<FormInstanceEquipM
...
@@ -214,11 +214,16 @@ public class FormInstanceEquipServiceImpl extends ServiceImpl<FormInstanceEquipM
@Override
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
,
BaseException
.
class
})
public
Object
updateForm
(
Long
instanceId
,
String
orgCode
,
Map
<
String
,
Object
>
map
,
String
groupCode
)
{
public
Object
updateForm
(
Long
instanceId
,
String
orgCode
,
Map
<
String
,
Object
>
map
,
String
groupCode
)
{
if
(
com
.
yeejoin
.
equipmanage
.
common
.
utils
.
StringUtil
.
isNotEmpty
(
groupCode
))
{
List
<
FormInstanceEquip
>
list
=
this
.
queryByInstanceId
(
instanceId
);
map
.
keySet
().
forEach
(
x
->
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
formInstanceEquipMapper
.
updateFormFieldValue
(
instanceId
,
x
,
String
.
valueOf
(
map
.
get
(
x
)));
saveForm
(
groupCode
,
orgCode
,
map
,
String
.
valueOf
(
instanceId
));
});
}
else
{
return
CommonResponseUtil
.
success
();
if
(
com
.
yeejoin
.
equipmanage
.
common
.
utils
.
StringUtil
.
isNotEmpty
(
groupCode
))
{
map
.
keySet
().
forEach
(
x
->
{
formInstanceEquipMapper
.
updateFormFieldValue
(
instanceId
,
x
,
String
.
valueOf
(
map
.
get
(
x
)));
});
return
CommonResponseUtil
.
success
();
}
}
}
return
null
;
return
null
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
View file @
9ca0695d
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertNewsDto;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertNewsDto;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -15,6 +16,7 @@ import org.springframework.boot.ApplicationRunner;
...
@@ -15,6 +16,7 @@ import org.springframework.boot.ApplicationRunner;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqxListener
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,22 +45,25 @@ public class StartLoader implements ApplicationRunner {
...
@@ -43,22 +45,25 @@ public class StartLoader implements ApplicationRunner {
public
void
loadSysParams
(){
public
void
loadSysParams
(){
try
{
try
{
emqKeeper
.
getMqttClient
().
subscribe
(
topic
,
(
s
,
mqttMessage
)
->
{
emqKeeper
.
subscript
(
topic
,
1
,
new
EmqxListener
()
{
byte
[]
payload
=
mqttMessage
.
getPayload
();
@Override
public
void
processMessage
(
String
s
,
MqttMessage
mqttMessage
)
throws
Exception
{
byte
[]
payload
=
mqttMessage
.
getPayload
();
String
obj
=
new
String
(
payload
);
String
obj
=
new
String
(
payload
);
if
(!
ValidationUtil
.
isEmpty
(
obj
))
{
if
(!
ValidationUtil
.
isEmpty
(
obj
))
{
JSONObject
json
=
JSON
.
parseObject
(
obj
);
JSONObject
json
=
JSON
.
parseObject
(
obj
);
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
"物联设备发生警情,发生位置:"
+(
json
.
get
(
"address"
)!=
null
?
json
.
get
(
"address"
).
toString
():
""
)+
"物联设备发生警情,发生位置:"
+(
json
.
get
(
"address"
)!=
null
?
json
.
get
(
"address"
).
toString
():
""
)+
",事发单位:"
+(
json
.
get
(
"unitInvolvedName"
)!=
null
?
json
.
get
(
"unitInvolvedName"
).
toString
():
""
)
",事发单位:"
+(
json
.
get
(
"unitInvolvedName"
)!=
null
?
json
.
get
(
"unitInvolvedName"
).
toString
():
""
)
+
",联系人:"
+(
json
.
get
(
"contactUser"
)!=
null
?
json
.
get
(
"contactUser"
).
toString
():
""
)
+
",联系人:"
+(
json
.
get
(
"contactUser"
)!=
null
?
json
.
get
(
"contactUser"
).
toString
():
""
)
+
",联系电话:"
+(
json
.
get
(
"contactPhone"
)!=
null
?
json
.
get
(
"contactPhone"
).
toString
():
""
)+
".请尽快处理!"
,
+
",联系电话:"
+(
json
.
get
(
"contactPhone"
)!=
null
?
json
.
get
(
"contactPhone"
).
toString
():
""
)+
".请尽快处理!"
,
json
.
get
(
"id"
).
toString
(),
json
);
json
.
get
(
"id"
).
toString
(),
json
);
emqKeeper
.
getMqttClient
().
publish
(
topicweb
,
JSON
.
toJSON
(
alertNewsDto
).
toString
().
getBytes
(
"UTF-8"
),
1
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topicweb
,
JSON
.
toJSON
(
alertNewsDto
).
toString
().
getBytes
(
"UTF-8"
),
1
,
false
);
}
}
}
});
});
}
catch
(
Mqtt
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"订阅物联警情异常"
,
e
);
logger
.
info
(
"订阅物联警情异常"
,
e
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
9ca0695d
...
@@ -752,6 +752,23 @@ public class InputItemController extends AbstractBaseController {
...
@@ -752,6 +752,23 @@ public class InputItemController extends AbstractBaseController {
map
.
put
(
"OkScore"
,
param
.
getOkScore
()!=
null
?
param
.
getOkScore
():
0
);
map
.
put
(
"OkScore"
,
param
.
getOkScore
()!=
null
?
param
.
getOkScore
():
0
);
map
.
put
(
"NoScore"
,
param
.
getNoScore
()!=
null
?
param
.
getNoScore
():
0
);
map
.
put
(
"NoScore"
,
param
.
getNoScore
()!=
null
?
param
.
getNoScore
():
0
);
map
.
put
(
"CheckType"
,
param
.
getCheckType
());
map
.
put
(
"CheckType"
,
param
.
getCheckType
());
String
inputClassify
=
""
;
switch
(
param
.
getInputClassify
())
{
case
"WGJC"
:
inputClassify
=
"外观检查"
;
break
;
case
"GNCS"
:
inputClassify
=
"功能测试"
;
break
;
case
"HJJC"
:
inputClassify
=
"环境检查"
;
break
;
case
"QT"
:
inputClassify
=
"其他"
;
break
;
default
:
}
inputItem
.
setInputClassify
(
inputClassify
);
inputItem
.
setDataJson
(
JSONObject
.
toJSONString
(
map
));
inputItem
.
setDataJson
(
JSONObject
.
toJSONString
(
map
));
}
else
if
(
param
.
getItemType
().
equals
(
"选择"
)){
}
else
if
(
param
.
getItemType
().
equals
(
"选择"
)){
...
@@ -771,10 +788,10 @@ public class InputItemController extends AbstractBaseController {
...
@@ -771,10 +788,10 @@ public class InputItemController extends AbstractBaseController {
map
.
put
(
"ValidDown"
,
param
.
getValidDown
()!=
null
?
param
.
getValidDown
():
""
);
map
.
put
(
"ValidDown"
,
param
.
getValidDown
()!=
null
?
param
.
getValidDown
():
""
);
map
.
put
(
"OkUp"
,
param
.
getOkUp
()!=
null
?
param
.
getOkUp
():
""
);
map
.
put
(
"OkUp"
,
param
.
getOkUp
()!=
null
?
param
.
getOkUp
():
""
);
map
.
put
(
"OkDown"
,
param
.
getOkDown
()!=
null
?
param
.
getOkDown
():
""
);
map
.
put
(
"OkDown"
,
param
.
getOkDown
()!=
null
?
param
.
getOkDown
():
""
);
map
.
put
(
"CheckValidUp"
,
param
.
getCheckValidUp
().
equals
(
"
false
"
)?
false
:
true
);
map
.
put
(
"CheckValidUp"
,
param
.
getCheckValidUp
().
equals
(
"
否
"
)?
false
:
true
);
map
.
put
(
"CheckValidDown"
,
param
.
getCheckValidDown
().
equals
(
"
false
"
)?
false
:
true
);
map
.
put
(
"CheckValidDown"
,
param
.
getCheckValidDown
().
equals
(
"
否
"
)?
false
:
true
);
map
.
put
(
"CheckOkUp"
,
param
.
getCheckOkUp
().
equals
(
"
false
"
)?
false
:
true
);
map
.
put
(
"CheckOkUp"
,
param
.
getCheckOkUp
().
equals
(
"
否
"
)?
false
:
true
);
map
.
put
(
"CheckOkDown"
,
param
.
getCheckOkDown
().
equals
(
"
false
"
)?
false
:
true
);
map
.
put
(
"CheckOkDown"
,
param
.
getCheckOkDown
().
equals
(
"
否
"
)?
false
:
true
);
map
.
put
(
"Precision"
,
param
.
getPrecision
()!=
null
?
param
.
getPrecision
():
0
);
map
.
put
(
"Precision"
,
param
.
getPrecision
()!=
null
?
param
.
getPrecision
():
0
);
inputItem
.
setDataJson
(
JSONObject
.
toJSONString
(
map
));
inputItem
.
setDataJson
(
JSONObject
.
toJSONString
(
map
));
}
}
...
...
amos-boot-system-equip/src/main/java/com/yeejoin/AmostEquipApplication.java
View file @
9ca0695d
...
@@ -74,6 +74,11 @@ public class AmostEquipApplication {
...
@@ -74,6 +74,11 @@ public class AmostEquipApplication {
*/
*/
@Bean
@Bean
void
initMqtt
()
throws
MqttException
{
void
initMqtt
()
throws
MqttException
{
emqKeeper
.
getMqttClient
().
subscribe
(
"+/+/property"
,
1
,
carIotListener
);
try
{
emqKeeper
.
subscript
(
"+/+/property"
,
1
,
carIotListener
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"EMQ初始化连接失败!"
);
}
}
}
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
9ca0695d
...
@@ -1410,22 +1410,15 @@
...
@@ -1410,22 +1410,15 @@
WHERE es.id = #{equipmentSpecificId}
WHERE es.id = #{equipmentSpecificId}
</select>
</select>
<delete
id=
"deleteEquipDataBySpecificId"
>
<delete
id=
"deleteEquipDataBySpecificId"
>
DELETE es, ed, esi, ves, esr, esa, esal, eard FROM
DELETE FROM wl_equipment_specific WHERE id = #{specificId};
wl_equipment_specific es
DELETE FROM wl_equipment_detail WHERE id = (SELECT equipment_detail_id FROM wl_equipment_specific WHERE id = #{specificId});
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
DELETE FROM wl_equipment_specific_alarm WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_equipment_specific_index esi ON es.id = esi.equipment_specific_id
DELETE FROM wl_equipment_specific_alarm_log WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_video_equipment_specific ves ON es.id = ves.equipment_specific_id
DELETE FROM wl_equipment_alarm_report_day WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_equipment_specific_relation esr ON ed.id = esr.equipment_specific_id
DELETE FROM wl_equipment_specific_index WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_equipment_specific_alarm esa ON ed.id = esa.equipment_specific_id
DELETE FROM wl_video_equipment_specific WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_equipment_specific_alarm_log esal ON ed.id = esal.equipment_specific_id
DELETE FROM wl_equipment_specific_relation WHERE equipment_specific_id = #{specificId};
LEFT JOIN wl_equipment_alarm_report_day eard ON ed.id = eard.equipment_specific_id
WHERE es.id = #{specificId}
</delete>
</delete>
<delete
id=
"deleteEquipDataByStockDetailId"
>
<delete
id=
"deleteEquipDataByStockDetailId"
>
DELETE
DELETE
...
...
amos-boot-system-patrol/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
9ca0695d
...
@@ -102,8 +102,8 @@ public class PatrolApplication {
...
@@ -102,8 +102,8 @@ public class PatrolApplication {
@Bean
@Bean
void
initMqtt
()
{
void
initMqtt
()
{
try
{
try
{
emqKeeper
.
getMqttClient
().
subscribe
(
patrolTopic
,
1
,
patrolMqttListener
);
emqKeeper
.
subscript
(
patrolTopic
,
1
,
patrolMqttListener
);
}
catch
(
Mqtt
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
logger
.
error
(
"EMQ初始化连接失败!"
);
logger
.
error
(
"EMQ初始化连接失败!"
);
}
}
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/application.properties
View file @
9ca0695d
...
@@ -8,3 +8,6 @@ spring.jackson.serialization.write-dates-as-timestamps=true
...
@@ -8,3 +8,6 @@ spring.jackson.serialization.write-dates-as-timestamps=true
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
logic
=
false
logging.config
=
classpath:logback-${spring.profiles.active}.xml
\ 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