Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 589d1251
authored
Mar 10, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社会化学徒制数据推送
1 parent
1177d0df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
20 deletions
src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java
src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/service/impl/ShehuihuaServiceImpl.java
src/main/resources/mapper/ActivityDetectionMapper.xml
src/main/resources/mapper/OprAdmDictMapper.xml
src/main/resources/mapper/OprMemDictMapper.xml
src/main/resources/mapper/RenSheJuMapper.xml
src/main/java/com/subsidy/mapper/ActivityDetectionMapper.java
View file @
589d125
...
...
@@ -26,4 +26,10 @@ public interface ActivityDetectionMapper extends BaseMapper<ActivityDetectionDO>
* 获取今天成功次数
*/
int
todayCnt
(
Long
classId
,
Long
memberId
,
Integer
checkType
,
Integer
status
);
/**
* 人脸识别更新时间
*/
void
updateTime
(
ActivityDetectionDO
activityDetectionDO
);
}
src/main/java/com/subsidy/service/impl/ImageCheckRecordServiceImpl.java
View file @
589d125
...
...
@@ -123,6 +123,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
imageCheckRecordDO
.
setBizSeqNo
(
RandomUtil
.
randomOrderNumber
());
imageCheckRecordMapper
.
insert
(
imageCheckRecordDO
);
ActivityDetectionDO
activityDetectionDO
=
new
ActivityDetectionDO
();
activityDetectionDO
.
setClassId
(
classId
);
if
(
null
==
paperId
){
activityDetectionDO
.
setCheckType
(
1
);
}
else
{
activityDetectionDO
.
setCheckType
(
2
);
}
activityDetectionDO
.
setMemberId
(
memberDO
.
getId
());
activityDetectionDO
.
setFaceCheckId
(
imageCheckRecordDO
.
getId
());
activityDetectionMapper
.
insert
(
activityDetectionDO
);
//获取signTicket
IdCardTicketsVO
idCardTicketsVO
=
this
.
signTickets
(
getLatestAccessToken
());
//生成签名
...
...
@@ -196,6 +207,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
imageCheckRecordDO
.
setBizSeqNo
(
RandomUtil
.
randomOrderNumber
());
imageCheckRecordMapper
.
insert
(
imageCheckRecordDO
);
ActivityDetectionDO
activityDetectionDO
=
new
ActivityDetectionDO
();
activityDetectionDO
.
setClassId
(
classId
);
if
(
null
==
paperId
){
activityDetectionDO
.
setCheckType
(
1
);
}
else
{
activityDetectionDO
.
setCheckType
(
2
);
}
activityDetectionDO
.
setMemberId
(
memberDO
.
getId
());
activityDetectionDO
.
setFaceCheckId
(
imageCheckRecordDO
.
getId
());
activityDetectionMapper
.
insert
(
activityDetectionDO
);
//获取signTicket
IdCardTicketsVO
idCardTicketsVO
=
this
.
signTickets
(
getLatestAccessToken
());
...
...
@@ -271,11 +293,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
.
eq
(
ImageCheckRecordDO:
:
getBizSeqNo
,
checkResultDTO
.
getId
()));
if
(!
StringUtils
.
isEmpty
(
resultVO
.
getSimilarity
()))
{
BeanUtils
.
copyProperties
(
resultVO
,
imageCheckRecordDO
);
ActivityDetectionDO
activityDetectionDO
=
new
ActivityDetectionDO
();
activityDetectionDO
.
setClassId
(
imageCheckRecordDO
.
getClassId
());
activityDetectionDO
.
setMemberId
(
imageCheckRecordDO
.
getMemberId
());
activityDetectionDO
.
setCheckType
(
1
);
activityDetectionDO
.
setFaceCheckId
(
imageCheckRecordDO
.
getId
());
// ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
// activityDetectionDO.setClassId(imageCheckRecordDO.getClassId());
// activityDetectionDO.setMemberId(imageCheckRecordDO.getMemberId());
// activityDetectionDO.setCheckType(1);
// activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId());
ActivityDetectionDO
activityDetectionDO
=
activityDetectionMapper
.
selectOne
(
new
QueryWrapper
<
ActivityDetectionDO
>()
.
lambda
()
.
eq
(
ActivityDetectionDO:
:
getFaceCheckId
,
imageCheckRecordDO
.
getId
()));
try
{
imageCheckRecordDO
.
setPhoto
(
OSSUtils
.
uploadOneFile
(
resultVO
.
getPhotoList
().
get
(
resultVO
.
getPhotoList
().
size
()
-
1
)));
if
((
Double
.
valueOf
(
imageCheckRecordDO
.
getSimilarity
())
>
50
))
{
...
...
@@ -299,15 +324,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
}
}
catch
(
Exception
e
)
{
imageCheckRecordDO
.
setResult
(
0
);
imageCheckRecordDO
.
setResult
(
0
);
activityDetectionDO
.
setStatus
(
0
);
e
.
printStackTrace
();
}
if
(
null
!=
imageCheckRecordDO
.
getPaperId
())
{
activityDetectionDO
.
setCheckType
(
2
);
}
activityDetectionMapper
.
insert
(
activityDetectionDO
);
//
if (null != imageCheckRecordDO.getPaperId()) {
//
activityDetectionDO.setCheckType(2);
//
}
activityDetectionMapper
.
updateById
(
activityDetectionDO
);
imageCheckRecordMapper
.
updateById
(
imageCheckRecordDO
);
}
return
imageCheckRecordDO
;
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
589d125
This diff is collapsed.
Click to expand it.
src/main/java/com/subsidy/service/impl/ShehuihuaServiceImpl.java
View file @
589d125
...
...
@@ -38,9 +38,6 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
private
RenSheConfig
renSheConfig
;
@Autowired
private
ClassDictMapper
classDictMapper
;
@Autowired
RenshejuHistoryMapper
renshejuHistoryMapper
;
@Autowired
...
...
@@ -160,6 +157,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
renshejuHistoryDO
.
setInterfaceName
(
ShehuihuaConstant
.
POST_3
);
renshejuHistoryDO
.
setInputParam
(
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
...
...
@@ -593,7 +591,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
renshejuHistoryDO1
.
setOutputParam
(
RenSheJuConstant
.
NO_DATA
);
renshejuHistoryMapper
.
insert
(
renshejuHistoryDO1
);
}
// return null;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
RenshejuHistoryDO
renshejuHistoryDO
=
new
RenshejuHistoryDO
();
...
...
src/main/resources/mapper/ActivityDetectionMapper.xml
View file @
589d125
...
...
@@ -46,4 +46,10 @@
AND t.`status` = #{status}
AND DATE_FORMAT( t.create_date, '%Y-%m-%d' ) = DATE_FORMAT(NOW(),'%Y-%m-%d')
</select>
<update
id=
"updateTime"
parameterType=
"com.subsidy.model.ActivityDetectionDO"
>
update activity_detection t
set t.order_no = #{orderNo} where t.id = #{id}
</update>
</mapper>
src/main/resources/mapper/OprAdmDictMapper.xml
View file @
589d125
...
...
@@ -70,7 +70,7 @@
FROM
opr_adm_dict
WHERE
create_date
<
(NOW() - INTERVAL 1
0
DAY)
create_date
<
(NOW() - INTERVAL 1 DAY)
</select>
</mapper>
src/main/resources/mapper/OprMemDictMapper.xml
View file @
589d125
...
...
@@ -52,7 +52,7 @@
FROM
opr_mem_dict
WHERE
create_date
<
(NOW() - INTERVAL 1
0
DAY)
create_date
<
(NOW() - INTERVAL 1 DAY)
</select>
<select
id=
"getLatestLoginInfo"
parameterType=
"long"
resultType=
"com.subsidy.model.OprMemDictDO"
>
...
...
src/main/resources/mapper/RenSheJuMapper.xml
View file @
589d125
...
...
@@ -188,7 +188,7 @@
<select
id=
"examActivities"
resultType=
"com.subsidy.vo.renshe.ExamActivitiesVO"
>
SELECT
t1.result AS access,
UNIX_TIMESTAMP( t1.
upd
ate_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.
cre
ate_date )* 1000 AS activityTime
FROM
image_check_record t1
WHERE
...
...
@@ -386,7 +386,7 @@
left join class_dict t2 on t.class_id = t2.id
WHERE
t.delete_date IS NULL
AND DATE_FORMAT( DATE_ADD( t.
upd
ate_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t.
cre
ate_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
NOW(),
'%Y-%m-%d'
)
...
...
@@ -444,7 +444,7 @@
t2.user_name AS studentName,
t2.id_card AS identity,
t2.telephone AS phone,
UNIX_TIMESTAMP( t1.
upd
ate_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.
cre
ate_date )* 1000 AS activityTime
FROM
image_check_record t1
LEFT JOIN member t2 ON t1.member_id = t2.id
...
...
@@ -468,7 +468,7 @@
t2.user_name AS studentName,
t2.id_card AS identity,
t2.telephone AS phone,
UNIX_TIMESTAMP( t1.
upd
ate_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.
cre
ate_date )* 1000 AS activityTime
FROM
image_check_record t1
LEFT JOIN member t2 ON t1.member_id = t2.id
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment