Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pingshan-ranqi
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
yaqizhang
pingshan-ranqi
Commits
2737c109
Commit
2737c109
authored
Nov 16, 2021
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警数据推送校验设备编号是否存在
parent
cc78ea6b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
2 deletions
+38
-2
TDetectorReportController.java
...ng/web/controller/detector/TDetectorReportController.java
+4
-0
ResultEnum.java
...mon/src/main/java/com/zehong/common/enums/ResultEnum.java
+2
-2
TDetectorInfoMapper.java
...in/java/com/zehong/system/mapper/TDetectorInfoMapper.java
+8
-0
ITDetectorInfoService.java
...java/com/zehong/system/service/ITDetectorInfoService.java
+8
-0
TDetectorInfoServiceImpl.java
.../zehong/system/service/impl/TDetectorInfoServiceImpl.java
+10
-0
TDetectorInfoMapper.xml
.../src/main/resources/mapper/system/TDetectorInfoMapper.xml
+6
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/detector/TDetectorReportController.java
View file @
2737c109
...
...
@@ -349,6 +349,10 @@ public class TDetectorReportController extends BaseController
log
.
error
(
"【新增泽宏设备上报数据】参数不正确,zhDeviceReportDataForm={}"
,
tDetectorReportDataForm
);
throw
new
IOCException
(
ResultEnum
.
PARAM_ERROR
.
getCode
(),
bindingResult
.
getFieldError
().
getDefaultMessage
());
}
TDetectorInfo
detector
=
tDetectorInfoService
.
selectTDetectorInfoByCode
(
tDetectorReportDataForm
.
getDeviceNo
());
if
(
detector
==
null
){
throw
new
IOCException
(
ResultEnum
.
DETECTOR_NOEXIST
);
}
log
.
info
(
"泽宏设备上报数据===="
+
tDetectorReportDataForm
.
toString
());
try
{
...
...
gassafety-common/src/main/java/com/zehong/common/enums/ResultEnum.java
View file @
2737c109
...
...
@@ -55,9 +55,9 @@ public enum ResultEnum {
ENTERPRISE_EXIST
(
6000
,
"企业机构代码已注册!"
),
ENTERPRISE_NOEXIST
(
6001
,
"企业机构代码不存在!"
)
ENTERPRISE_NOEXIST
(
6001
,
"企业机构代码不存在!"
),
DETECTOR_NOEXIST
(
7000
,
"探测器编号不存在!"
)
;
...
...
gassafety-system/src/main/java/com/zehong/system/mapper/TDetectorInfoMapper.java
View file @
2737c109
...
...
@@ -19,6 +19,14 @@ public interface TDetectorInfoMapper
*/
public
TDetectorInfo
selectTDetectorInfoById
(
Long
detectorId
);
/**
* 查询探测器
*
* @param detectorCode 探测器编号
* @return 探测器
*/
public
TDetectorInfo
selectTDetectorInfoByCode
(
String
detectorCode
);
/**
* 查询探测器列表
*
...
...
gassafety-system/src/main/java/com/zehong/system/service/ITDetectorInfoService.java
View file @
2737c109
...
...
@@ -20,6 +20,14 @@ public interface ITDetectorInfoService
*/
public
TDetectorInfo
selectTDetectorInfoById
(
Long
detectorId
);
/**
* 查询探测器
*
* @param detectorCode 探测器编号
* @return 探测器
*/
public
TDetectorInfo
selectTDetectorInfoByCode
(
String
detectorCode
);
/**
* 查询探测器列表
*
...
...
gassafety-system/src/main/java/com/zehong/system/service/impl/TDetectorInfoServiceImpl.java
View file @
2737c109
...
...
@@ -32,6 +32,16 @@ public class TDetectorInfoServiceImpl implements ITDetectorInfoService
return
tDetectorInfoMapper
.
selectTDetectorInfoById
(
detectorId
);
}
/**
* 查询探测器
*
* @param detectorCode 探测器编号
* @return 探测器
*/
public
TDetectorInfo
selectTDetectorInfoByCode
(
String
detectorCode
)
{
return
tDetectorInfoMapper
.
selectTDetectorInfoByCode
(
detectorCode
);
}
/**
* 查询探测器列表
*
...
...
gassafety-system/src/main/resources/mapper/system/TDetectorInfoMapper.xml
View file @
2737c109
...
...
@@ -59,6 +59,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where detector_id = #{detectorId}
</select>
<select
id=
"selectTDetectorInfoByCode"
parameterType=
"String"
resultMap=
"TDetectorInfoResult"
>
<include
refid=
"selectTDetectorInfoVo"
/>
where detector_code = #{detectorCode}
and is_del = '0'
</select>
<insert
id=
"insertTDetectorInfo"
parameterType=
"TDetectorInfo"
useGeneratedKeys=
"true"
keyProperty=
"detectorId"
>
insert into t_detector_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
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