Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
254902d8
Commit
254902d8
authored
Oct 21, 2022
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
化工巡检
parent
31c4522b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
TNfcSettingMapper.java
...main/java/com/zehong/system/mapper/TNfcSettingMapper.java
+7
-0
TNfcSettingServiceImpl.java
...om/zehong/system/service/impl/TNfcSettingServiceImpl.java
+7
-1
TNfcSettingMapper.xml
...em/src/main/resources/mapper/system/TNfcSettingMapper.xml
+5
-0
No files found.
danger-manage-system/src/main/java/com/zehong/system/mapper/TNfcSettingMapper.java
View file @
254902d8
...
...
@@ -73,4 +73,11 @@ public interface TNfcSettingMapper
* @return
*/
List
<
TNfcRecord
>
punchClockList
(
TNfcSetting
tNfcSetting
);
/**
* 查询nfc编号是否已经注册
* @param nfcNum
* @return
*/
int
getNfcNum
(
String
nfcNum
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TNfcSettingServiceImpl.java
View file @
254902d8
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TNfcRecord
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -80,8 +81,13 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
@Transactional
public
int
updateTNfcSetting
(
TNfcSetting
tNfcSetting
)
{
if
(
tNfcSetting
.
getNfcNum
()==
null
||
tNfcSetting
.
getNfcNum
().
equals
(
""
)){
int
a
=
tNfcSettingMapper
.
updateTNfcSetting
(
tNfcSetting
);
return
a
;
}
TNfcSetting
ts
=
tNfcSettingMapper
.
getInfoByNfcNum
(
tNfcSetting
.
getNfcNum
());
if
(
ts
.
getNfcId
()!=
tNfcSetting
.
getNfcId
()){
int
nfcNum
=
tNfcSettingMapper
.
getNfcNum
(
tNfcSetting
.
getNfcNum
());
if
(
nfcNum
!=
0
){
ts
.
setNfcNum
(
""
);
tNfcSettingMapper
.
updateTNfcSetting
(
ts
);
}
...
...
danger-manage-system/src/main/resources/mapper/system/TNfcSettingMapper.xml
View file @
254902d8
...
...
@@ -110,4 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
group by a.create_time desc
</select>
<!--查询nfc编号是否已经注册-->
<select
id=
"getNfcNum"
resultType=
"java.lang.Integer"
>
select count(nfc_id) from t_nfc_setting where nfc_num=#{nfcNum}
</select>
</mapper>
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