Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
Project
Project
Details
Activity
Releases
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
王夏晖
zhny
Commits
e557d981
Commit
e557d981
authored
Sep 17, 2018
by
liuyuanjun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
ssh://103.249.252.28:10022/wangxiahui/zhny
into develop
parents
16742453
53eb12c6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
6 deletions
+10
-6
BuildTpController.java
...cisoft/business/buildtp/controller/BuildTpController.java
+1
-1
BusDeviceController.java
...usiness/device/assets/controller/BusDeviceController.java
+1
-0
BusDeviceRepository.java
...isoft/business/device/assets/dao/BusDeviceRepository.java
+1
-1
BusDevice.java
.../org/rcisoft/business/device/assets/entity/BusDevice.java
+2
-0
BusDeviceServiceImpl.java
...ness/device/assets/service/impl/BusDeviceServiceImpl.java
+1
-0
DeviceParamRepository.java
...rg/rcisoft/business/system/dao/DeviceParamRepository.java
+2
-2
SystemServiceImpl.java
...isoft/business/system/service/impl/SystemServiceImpl.java
+2
-2
No files found.
src/main/java/org/rcisoft/business/buildtp/controller/BuildTpController.java
View file @
e557d981
...
@@ -34,7 +34,7 @@ import java.util.List;
...
@@ -34,7 +34,7 @@ import java.util.List;
* */
* */
@RequestMapping
(
"buildtp"
)
@RequestMapping
(
"buildtp"
)
public
class
BuildTpController
extends
PaginationController
<
BuildTp
>
{
public
class
BuildTpController
extends
PaginationController
<
BuildTp
>
{
@Autowired
@Autowired
private
BuildTpService
buildTpServiceImpl
;
private
BuildTpService
buildTpServiceImpl
;
...
...
src/main/java/org/rcisoft/business/device/assets/controller/BusDeviceController.java
View file @
e557d981
...
@@ -44,6 +44,7 @@ import java.util.List;
...
@@ -44,6 +44,7 @@ import java.util.List;
@RequestMapping
(
"busdevice"
)
@RequestMapping
(
"busdevice"
)
public
class
BusDeviceController
extends
PaginationController
<
BusDevice
>
{
public
class
BusDeviceController
extends
PaginationController
<
BusDevice
>
{
@Autowired
@Autowired
private
BusDeviceService
busDeviceServiceImpl
;
private
BusDeviceService
busDeviceServiceImpl
;
...
...
src/main/java/org/rcisoft/business/device/assets/dao/BusDeviceRepository.java
View file @
e557d981
...
@@ -27,7 +27,7 @@ public interface BusDeviceRepository extends BaseMapper<BusDevice> {
...
@@ -27,7 +27,7 @@ public interface BusDeviceRepository extends BaseMapper<BusDevice> {
"<if test='devTpId != null'> and a.dev_tp_id = #{devTpId}</if>"
+
"<if test='devTpId != null'> and a.dev_tp_id = #{devTpId}</if>"
+
"<if test='devNum != null'> and a.dev_num = #{devNum}</if>"
+
"<if test='devNum != null'> and a.dev_num = #{devNum}</if>"
+
"<if test='qrcodeUrl != null'> and a.qrcode_url is not null</if>"
"<if test='qrcodeUrl != null'> and a.qrcode_url is not null</if>"
+
"</script>"
)
+
"
order by a.create_time asc
</script>"
)
List
<
Map
<
String
,
Object
>>
queryBusDevices
(
BusDevice
busDevice
);
List
<
Map
<
String
,
Object
>>
queryBusDevices
(
BusDevice
busDevice
);
/*
/*
...
...
src/main/java/org/rcisoft/business/device/assets/entity/BusDevice.java
View file @
e557d981
...
@@ -54,5 +54,7 @@ public class BusDevice implements Serializable{
...
@@ -54,5 +54,7 @@ public class BusDevice implements Serializable{
*/
*/
private
String
qrcodeUrl
;
private
String
qrcodeUrl
;
private
Date
createTime
;
}
}
src/main/java/org/rcisoft/business/device/assets/service/impl/BusDeviceServiceImpl.java
View file @
e557d981
...
@@ -80,6 +80,7 @@ public class BusDeviceServiceImpl implements BusDeviceService {
...
@@ -80,6 +80,7 @@ public class BusDeviceServiceImpl implements BusDeviceService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
@Override
public
PersistModel
save
(
BusDevice
busDevice
){
public
PersistModel
save
(
BusDevice
busDevice
){
busDevice
.
setCreateTime
(
new
Date
());
int
line
=
1
;
int
line
=
1
;
String
message
=
""
;
String
message
=
""
;
//增加操作
//增加操作
...
...
src/main/java/org/rcisoft/business/system/dao/DeviceParamRepository.java
View file @
e557d981
...
@@ -24,9 +24,9 @@ public interface DeviceParamRepository {
...
@@ -24,9 +24,9 @@ public interface DeviceParamRepository {
*/
*/
@Select
(
"<script>select d.PARAM,p.PARAM_NM,p.P_SOURCE,p.P_MIN,p.P_MAX,p.SYMBOL,p.FLAG,p.PARAM_UNIT,d.PARAM_CODE "
+
@Select
(
"<script>select d.PARAM,p.PARAM_NM,p.P_SOURCE,p.P_MIN,p.P_MAX,p.SYMBOL,p.FLAG,p.PARAM_UNIT,d.PARAM_CODE "
+
"from bus_device_param d,bus_devicetp_param p "
+
"from bus_device_param d,bus_devicetp_param p "
+
"where d.PARAM_CODE=p.PARAM_CODE and d.DEV_NUM=#{devNum} order by p.PARAM_NM</script>"
)
"where d.PARAM_CODE=p.PARAM_CODE and d.DEV_NUM=#{devNum}
and p.PRO_ID=#{proId}
order by p.PARAM_NM</script>"
)
@ResultMap
(
"BaseResultMap"
)
@ResultMap
(
"BaseResultMap"
)
List
<
DeviceParam
>
selectDeviceParamList
(
@Param
(
"devNum"
)
String
devNum
);
List
<
DeviceParam
>
selectDeviceParamList
(
@Param
(
"devNum"
)
String
devNum
,
@Param
(
"proId"
)
String
proId
);
@Select
(
"<script>select OTHER_PARAM from bus_param_refer where PRO_ID=#{proId} and OWN_PARAM='sensor'</script>"
)
@Select
(
"<script>select OTHER_PARAM from bus_param_refer where PRO_ID=#{proId} and OWN_PARAM='sensor'</script>"
)
@ResultType
(
String
.
class
)
@ResultType
(
String
.
class
)
...
...
src/main/java/org/rcisoft/business/system/service/impl/SystemServiceImpl.java
View file @
e557d981
...
@@ -148,7 +148,6 @@ public class SystemServiceImpl implements SystemService {
...
@@ -148,7 +148,6 @@ public class SystemServiceImpl implements SystemService {
@Override
@Override
public
Map
<
String
,
Object
>
selectDeviceParamList
(
String
devNum
)
{
public
Map
<
String
,
Object
>
selectDeviceParamList
(
String
devNum
)
{
List
<
DeviceParam
>
list
=
deviceParamRepository
.
selectDeviceParamList
(
devNum
);
// 表具的键
// 表具的键
String
devCode
=
""
;
String
devCode
=
""
;
// 电量的键
// 电量的键
...
@@ -162,6 +161,7 @@ public class SystemServiceImpl implements SystemService {
...
@@ -162,6 +161,7 @@ public class SystemServiceImpl implements SystemService {
devParam
=
deviceMap
.
get
(
"devParam"
);
devParam
=
deviceMap
.
get
(
"devParam"
);
proId
=
deviceMap
.
get
(
"proId"
);
proId
=
deviceMap
.
get
(
"proId"
);
}
}
List
<
DeviceParam
>
list
=
deviceParamRepository
.
selectDeviceParamList
(
devNum
,
proId
);
// 如果不为空,需要将devCode截取一下
// 如果不为空,需要将devCode截取一下
if
(
StringUtils
.
isNotEmpty
(
devCode
)
&&
StringUtils
.
isNotEmpty
(
devParam
)
&&
StringUtils
.
isNotEmpty
(
proId
))
if
(
StringUtils
.
isNotEmpty
(
devCode
)
&&
StringUtils
.
isNotEmpty
(
devParam
)
&&
StringUtils
.
isNotEmpty
(
proId
))
devCode
=
devCode
.
split
(
proId
+
"_"
)[
1
];
devCode
=
devCode
.
split
(
proId
+
"_"
)[
1
];
...
@@ -253,7 +253,7 @@ public class SystemServiceImpl implements SystemService {
...
@@ -253,7 +253,7 @@ public class SystemServiceImpl implements SystemService {
// 判断两个比较电量大小
// 判断两个比较电量大小
if
(
newElec
!=
null
&&
oldElec
!=
null
)
{
if
(
newElec
!=
null
&&
oldElec
!=
null
)
{
// 如果两数相减小于0.003,认为是关闭,大于等于认为是开启
// 如果两数相减小于0.003,认为是关闭,大于等于认为是开启
if
(
newElec
.
subtract
(
oldElec
).
compareTo
(
new
BigDecimal
(
0.00
3
))
<
0
)
if
(
newElec
.
subtract
(
oldElec
).
compareTo
(
new
BigDecimal
(
0.00
1
))
<
0
)
paramStatus
.
setStatus
(
0
);
paramStatus
.
setStatus
(
0
);
else
else
paramStatus
.
setStatus
(
1
);
paramStatus
.
setStatus
(
1
);
...
...
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