Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
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
sa_aidea
Aidea
Commits
972331cd
Commit
972331cd
authored
Feb 18, 2021
by
fanjr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pda核销接口修改
parent
db30e94a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
CouponrecordMapper.java
.../java/com/cftech/couponrecord/dao/CouponrecordMapper.java
+6
-0
CouponrecordMapper.xml
...n/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
+7
-2
PdaCouponrecordServiceImpl.java
...couponrecord/service/impl/PdaCouponrecordServiceImpl.java
+6
-4
No files found.
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.java
View file @
972331cd
...
...
@@ -51,4 +51,10 @@ public interface CouponrecordMapper extends GenericDao<Couponrecord> {
* @return
*/
Couponrecord
isWriteOff
(
String
number
);
/**
* 根据设备号获取医院id
* @param facilityNo
* @return
*/
Long
getHospitalIdByfaNo
(
String
facilityNo
);
}
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
View file @
972331cd
...
...
@@ -265,15 +265,20 @@
</update>
<insert
id=
"insertPdaLog"
parameterType=
"java.util.Map"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_
coupon_record
(id,content,create_time)
insert into t_aidea_
PdaLog
(id,content,create_time)
values
(#{id, jdbcType=VARCHAR},#{content, jdbcType=VARCHAR},now())
</insert>
<select
id=
"isWriteOff"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
id,status
FROM t_aidea_coupon_record
where number=#{number}
</select>
<select
id=
"getHospitalIdByfaNo"
resultType=
"java.lang.Long"
>
SELECT
id
FROM t_aidea_hospital t WHERE t.facility_no=#{facilityNo}
</select>
</mapper>
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/impl/PdaCouponrecordServiceImpl.java
View file @
972331cd
...
...
@@ -32,10 +32,12 @@ public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
//是否已核销
Couponrecord
info
=
couponrecordMapper
.
isWriteOff
(
number
);
if
(
info
!=
null
){
if
(
info
.
getStatus
().
equals
(
1
)){
if
(
info
.
getStatus
().
equals
(
"1"
)){
long
hospitalId
=
couponrecordMapper
.
getHospitalIdByfaNo
(
facilityNo
);
info
.
setStatus
(
"2"
);
info
.
setVerifDate
(
new
Date
());
// info.setFacilityNo(facilityNo);
info
.
setFacilityNo
(
facilityNo
);
info
.
setHospitalId
(
hospitalId
);
couponrecordMapper
.
update
(
info
);
rtnJson
.
put
(
"code"
,
200
);
rtnJson
.
put
(
"msg"
,
"验证成功!"
);
...
...
@@ -43,14 +45,14 @@ public class PdaCouponrecordServiceImpl implements PdaCouponrecordService {
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
2
);
}
else
if
(
info
.
getStatus
().
equals
(
0
)){
}
else
if
(
info
.
getStatus
().
equals
(
"0"
)){
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"检测券未激活!"
);
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"id"
,
logId
);
map
.
put
(
"resultJson"
,
rtnJson
.
toString
());
map
.
put
(
"status"
,
1
);
}
else
if
(
info
.
getStatus
().
equals
(
2
)){
}
else
if
(
info
.
getStatus
().
equals
(
"2"
)){
rtnJson
.
put
(
"code"
,
500
);
rtnJson
.
put
(
"msg"
,
"检测券已使用!"
);
map
=
new
HashMap
<
String
,
Object
>();
...
...
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