Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
7a3e9bb4
Commit
7a3e9bb4
authored
Nov 09, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加设备相关信息
parent
7de0de1a
Pipeline
#2673
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
fill-manager/src/main/bin/start.sh
fill-manager/src/main/bin/start.sh
+1
-1
fill-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java
.../com/mortals/xhx/module/device/service/DeviceService.java
+2
-1
fill-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+2
-1
fill-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+22
-0
No files found.
fill-manager/src/main/bin/start.sh
View file @
7a3e9bb4
...
@@ -44,7 +44,7 @@ fi
...
@@ -44,7 +44,7 @@ fi
if
[
-e
"
$BASEDIR
"
]
if
[
-e
"
$BASEDIR
"
]
then
then
JAVA_OPTS
=
"-Xms
512M -Xmx1024
M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:
$GC_PATH
-XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=
$HS_ERR_PATH
-XX:HeapDumpPath=
$HEAP_DUMP_PATH
"
JAVA_OPTS
=
"-Xms
1024M -Xmx2048
M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:
$GC_PATH
-XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=
$HS_ERR_PATH
-XX:HeapDumpPath=
$HEAP_DUMP_PATH
"
fi
fi
CLASSPATH
=
$CLASSPATH_PREFIX
:
CLASSPATH
=
$CLASSPATH_PREFIX
:
...
...
fill-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java
View file @
7a3e9bb4
package
com.mortals.xhx.module.device.service
;
package
com.mortals.xhx.module.device.service
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.device.dao.DeviceDao
;
import
com.mortals.xhx.module.device.dao.DeviceDao
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
...
@@ -11,7 +12,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
...
@@ -11,7 +12,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
* @author zxfei
* @author zxfei
* @date 2023-02-25
* @date 2023-02-25
*/
*/
public
interface
DeviceService
extends
ICRUD
Service
<
DeviceEntity
,
Long
>
{
public
interface
DeviceService
extends
ICRUD
CacheService
<
DeviceEntity
,
Long
>
{
DeviceDao
getDao
();
DeviceDao
getDao
();
...
...
fill-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
7a3e9bb4
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.common.code.DeviceMethodEnum
;
import
com.mortals.xhx.common.code.DeviceMethodEnum
;
import
com.mortals.xhx.common.code.DeviceStatusEnum
;
import
com.mortals.xhx.common.code.DeviceStatusEnum
;
...
@@ -33,7 +34,7 @@ import java.util.Date;
...
@@ -33,7 +34,7 @@ import java.util.Date;
*/
*/
@Service
(
"deviceService"
)
@Service
(
"deviceService"
)
@Slf4j
@Slf4j
public
class
DeviceServiceImpl
extends
AbstractCRUDServiceImpl
<
DeviceDao
,
DeviceEntity
,
Long
>
implements
DeviceService
{
public
class
DeviceServiceImpl
extends
AbstractCRUD
Cache
ServiceImpl
<
DeviceDao
,
DeviceEntity
,
Long
>
implements
DeviceService
{
@Autowired
@Autowired
private
IDeviceFeign
deviceFeign
;
private
IDeviceFeign
deviceFeign
;
@Value
(
"${token.loginName:admin}"
)
@Value
(
"${token.loginName:admin}"
)
...
...
fill-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
7a3e9bb4
package
com.mortals.xhx.module.device.web
;
package
com.mortals.xhx.module.device.web
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
...
@@ -110,6 +111,27 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -110,6 +111,27 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
return
rest
;
return
rest
;
}
}
/**
* 检测设备状态
*/
@PostMapping
(
value
=
"check"
)
@UnAuth
public
String
deviceCheck
(
@RequestBody
DeviceEntity
deviceEntity
)
{
JSONObject
jsonObject
=
new
JSONObject
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
this
.
getModuleDesc
()
+
"设备"
;
try
{
DeviceEntity
entity
=
this
.
service
.
getCache
(
deviceEntity
.
getDeviceCode
());
jsonObject
.
put
(
KEY_RESULT_DATA
,
entity
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
}
catch
(
Exception
e
)
{
log
.
error
(
"检测设备消息"
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
jsonObject
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
}
return
jsonObject
.
toJSONString
();
}
/**
/**
* 设备启用停用
* 设备启用停用
*/
*/
...
...
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