Commit 589d1251 by 涂亚平

社会化学徒制数据推送

1 parent 1177d0df
......@@ -26,4 +26,10 @@ public interface ActivityDetectionMapper extends BaseMapper<ActivityDetectionDO>
* 获取今天成功次数
*/
int todayCnt(Long classId, Long memberId, Integer checkType, Integer status);
/**
* 人脸识别更新时间
*/
void updateTime(ActivityDetectionDO activityDetectionDO);
}
......@@ -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;
......
......@@ -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();
......
......@@ -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>
......@@ -70,7 +70,7 @@
FROM
opr_adm_dict
WHERE
create_date &lt; (NOW() - INTERVAL 10 DAY)
create_date &lt; (NOW() - INTERVAL 1 DAY)
</select>
</mapper>
......@@ -52,7 +52,7 @@
FROM
opr_mem_dict
WHERE
create_date &lt; (NOW() - INTERVAL 10 DAY)
create_date &lt; (NOW() - INTERVAL 1 DAY)
</select>
<select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO">
......
......@@ -188,7 +188,7 @@
<select id="examActivities" resultType="com.subsidy.vo.renshe.ExamActivitiesVO">
SELECT
t1.result AS access,
UNIX_TIMESTAMP( t1.update_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.create_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.update_date, INTERVAL 1 DAY ), '%Y-%m-%d' ) = DATE_FORMAT(
AND DATE_FORMAT( DATE_ADD( t.create_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.update_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.create_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.update_date )* 1000 AS activityTime
UNIX_TIMESTAMP( t1.create_date )* 1000 AS activityTime
FROM
image_check_record t1
LEFT JOIN member t2 ON t1.member_id = t2.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!