Commit 589d1251 by 涂亚平

社会化学徒制数据推送

1 parent 1177d0df
...@@ -26,4 +26,10 @@ public interface ActivityDetectionMapper extends BaseMapper<ActivityDetectionDO> ...@@ -26,4 +26,10 @@ public interface ActivityDetectionMapper extends BaseMapper<ActivityDetectionDO>
* 获取今天成功次数 * 获取今天成功次数
*/ */
int todayCnt(Long classId, Long memberId, Integer checkType, Integer status); int todayCnt(Long classId, Long memberId, Integer checkType, Integer status);
/**
* 人脸识别更新时间
*/
void updateTime(ActivityDetectionDO activityDetectionDO);
} }
...@@ -123,6 +123,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -123,6 +123,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber()); imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber());
imageCheckRecordMapper.insert(imageCheckRecordDO); 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 //获取signTicket
IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken()); IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken());
//生成签名 //生成签名
...@@ -196,6 +207,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -196,6 +207,17 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber()); imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber());
imageCheckRecordMapper.insert(imageCheckRecordDO); 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 //获取signTicket
IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken()); IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken());
...@@ -271,11 +293,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -271,11 +293,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
.eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId())); .eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId()));
if (!StringUtils.isEmpty(resultVO.getSimilarity())) { if (!StringUtils.isEmpty(resultVO.getSimilarity())) {
BeanUtils.copyProperties(resultVO, imageCheckRecordDO); BeanUtils.copyProperties(resultVO, imageCheckRecordDO);
ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO(); // ActivityDetectionDO activityDetectionDO = new ActivityDetectionDO();
activityDetectionDO.setClassId(imageCheckRecordDO.getClassId()); // activityDetectionDO.setClassId(imageCheckRecordDO.getClassId());
activityDetectionDO.setMemberId(imageCheckRecordDO.getMemberId()); // activityDetectionDO.setMemberId(imageCheckRecordDO.getMemberId());
activityDetectionDO.setCheckType(1); // activityDetectionDO.setCheckType(1);
activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId()); // activityDetectionDO.setFaceCheckId(imageCheckRecordDO.getId());
ActivityDetectionDO activityDetectionDO = activityDetectionMapper.selectOne(new QueryWrapper<ActivityDetectionDO>()
.lambda()
.eq(ActivityDetectionDO::getFaceCheckId,imageCheckRecordDO.getId()));
try { try {
imageCheckRecordDO.setPhoto(OSSUtils.uploadOneFile(resultVO.getPhotoList().get(resultVO.getPhotoList().size() - 1))); imageCheckRecordDO.setPhoto(OSSUtils.uploadOneFile(resultVO.getPhotoList().get(resultVO.getPhotoList().size() - 1)));
if ((Double.valueOf(imageCheckRecordDO.getSimilarity()) > 50)) { if ((Double.valueOf(imageCheckRecordDO.getSimilarity()) > 50)) {
...@@ -299,15 +324,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap ...@@ -299,15 +324,14 @@ public class ImageCheckRecordServiceImpl extends ServiceImpl<ImageCheckRecordMap
} }
} catch (Exception e) { } catch (Exception e) {
imageCheckRecordDO.setResult(0); imageCheckRecordDO.setResult(0);
imageCheckRecordDO.setResult(0);
activityDetectionDO.setStatus(0); activityDetectionDO.setStatus(0);
e.printStackTrace(); e.printStackTrace();
} }
if (null != imageCheckRecordDO.getPaperId()) { // if (null != imageCheckRecordDO.getPaperId()) {
activityDetectionDO.setCheckType(2); // activityDetectionDO.setCheckType(2);
} // }
activityDetectionMapper.insert(activityDetectionDO); activityDetectionMapper.updateById(activityDetectionDO);
imageCheckRecordMapper.updateById(imageCheckRecordDO); imageCheckRecordMapper.updateById(imageCheckRecordDO);
} }
return imageCheckRecordDO; return imageCheckRecordDO;
......
...@@ -38,9 +38,6 @@ public class ShehuihuaServiceImpl implements ShehuihuaService { ...@@ -38,9 +38,6 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
private RenSheConfig renSheConfig; private RenSheConfig renSheConfig;
@Autowired @Autowired
private ClassDictMapper classDictMapper;
@Autowired
RenshejuHistoryMapper renshejuHistoryMapper; RenshejuHistoryMapper renshejuHistoryMapper;
@Autowired @Autowired
...@@ -160,6 +157,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService { ...@@ -160,6 +157,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
renshejuHistoryDO.setInterfaceName(ShehuihuaConstant.POST_3); renshejuHistoryDO.setInterfaceName(ShehuihuaConstant.POST_3);
renshejuHistoryDO.setInputParam(JSONObject.fromObject(classBaseInfoDTO).toString()); renshejuHistoryDO.setInputParam(JSONObject.fromObject(classBaseInfoDTO).toString());
...@@ -593,7 +591,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService { ...@@ -593,7 +591,7 @@ public class ShehuihuaServiceImpl implements ShehuihuaService {
renshejuHistoryDO1.setOutputParam(RenSheJuConstant.NO_DATA); renshejuHistoryDO1.setOutputParam(RenSheJuConstant.NO_DATA);
renshejuHistoryMapper.insert(renshejuHistoryDO1); renshejuHistoryMapper.insert(renshejuHistoryDO1);
} }
// return null;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO(); RenshejuHistoryDO renshejuHistoryDO = new RenshejuHistoryDO();
......
...@@ -46,4 +46,10 @@ ...@@ -46,4 +46,10 @@
AND t.`status` = #{status} AND t.`status` = #{status}
AND DATE_FORMAT( t.create_date, '%Y-%m-%d' ) = DATE_FORMAT(NOW(),'%Y-%m-%d') AND DATE_FORMAT( t.create_date, '%Y-%m-%d' ) = DATE_FORMAT(NOW(),'%Y-%m-%d')
</select> </select>
<update id="updateTime" parameterType="com.subsidy.model.ActivityDetectionDO">
update activity_detection t
set t.order_no = #{orderNo} where t.id = #{id}
</update>
</mapper> </mapper>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
FROM FROM
opr_adm_dict opr_adm_dict
WHERE WHERE
create_date &lt; (NOW() - INTERVAL 10 DAY) create_date &lt; (NOW() - INTERVAL 1 DAY)
</select> </select>
</mapper> </mapper>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
FROM FROM
opr_mem_dict opr_mem_dict
WHERE WHERE
create_date &lt; (NOW() - INTERVAL 10 DAY) create_date &lt; (NOW() - INTERVAL 1 DAY)
</select> </select>
<select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO"> <select id="getLatestLoginInfo" parameterType="long" resultType="com.subsidy.model.OprMemDictDO">
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
<select id="examActivities" resultType="com.subsidy.vo.renshe.ExamActivitiesVO"> <select id="examActivities" resultType="com.subsidy.vo.renshe.ExamActivitiesVO">
SELECT SELECT
t1.result AS access, t1.result AS access,
UNIX_TIMESTAMP( t1.update_date )* 1000 AS activityTime UNIX_TIMESTAMP( t1.create_date )* 1000 AS activityTime
FROM FROM
image_check_record t1 image_check_record t1
WHERE WHERE
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
left join class_dict t2 on t.class_id = t2.id left join class_dict t2 on t.class_id = t2.id
WHERE WHERE
t.delete_date IS NULL 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(), NOW(),
'%Y-%m-%d' '%Y-%m-%d'
) )
...@@ -444,7 +444,7 @@ ...@@ -444,7 +444,7 @@
t2.user_name AS studentName, t2.user_name AS studentName,
t2.id_card AS identity, t2.id_card AS identity,
t2.telephone AS phone, t2.telephone AS phone,
UNIX_TIMESTAMP( t1.update_date )* 1000 AS activityTime UNIX_TIMESTAMP( t1.create_date )* 1000 AS activityTime
FROM FROM
image_check_record t1 image_check_record t1
LEFT JOIN member t2 ON t1.member_id = t2.id LEFT JOIN member t2 ON t1.member_id = t2.id
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
t2.user_name AS studentName, t2.user_name AS studentName,
t2.id_card AS identity, t2.id_card AS identity,
t2.telephone AS phone, t2.telephone AS phone,
UNIX_TIMESTAMP( t1.update_date )* 1000 AS activityTime UNIX_TIMESTAMP( t1.create_date )* 1000 AS activityTime
FROM FROM
image_check_record t1 image_check_record t1
LEFT JOIN member t2 ON t1.member_id = t2.id 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!