兴安优化定时任务出门证失效
This commit is contained in:
@@ -318,10 +318,10 @@ public class SysFileController
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// initFlowRules();
|
||||
// //上传前进行人脸检测
|
||||
// String imgBase64 = MinioUtil.getBase64String(file);
|
||||
// checkPhoto(imgBase64);
|
||||
initFlowRules();
|
||||
//上传前进行人脸检测
|
||||
String imgBase64 = MinioUtil.getBase64String(file);
|
||||
checkPhoto(imgBase64);
|
||||
|
||||
// 上传并返回访问地址
|
||||
String fileNames = FileUploadUtils.uploadMinio(file, this.bucketName1, fileName);
|
||||
|
||||
@@ -186,5 +186,13 @@ public class RyTask
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定时任务校验出门证时效性
|
||||
*/
|
||||
public void expireVisCarryStuff() {
|
||||
remoteStudentService.expireVisCarryStuff();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.dcsoft.system.visitor.controller;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -245,9 +246,11 @@ public class VisCarryStuffController extends BaseController {
|
||||
}
|
||||
|
||||
//查询二维码信息
|
||||
CheckCodeVo codeVo = visCarryStuffService.selectStuffCheckCode(id);
|
||||
if (ObjectUtil.isNotNull(codeVo)) {
|
||||
stuffVo.setQrCode(codeVo.getCode());
|
||||
if (StringUtils.equals(ExamineEnum.PASSED.getCode(), stuffVo.getExamineState())) {
|
||||
CheckCodeVo codeVo = visCarryStuffService.selectStuffCheckCode(id);
|
||||
if (ObjectUtil.isNotNull(codeVo)) {
|
||||
stuffVo.setQrCode(codeVo.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
//查询审核信息
|
||||
@@ -567,6 +570,9 @@ public class VisCarryStuffController extends BaseController {
|
||||
try {
|
||||
//查询主数据
|
||||
VisExitOutVo visExitOutVo = visCarryStuffService.selectVisExitOutById(id);
|
||||
if (StringUtils.equals("5", visExitOutVo.getExamineState())) {
|
||||
return error("该申请已失效!");
|
||||
}
|
||||
//查询物品信息列表
|
||||
VisStuffInfoVo visStuffInfoVo = new VisStuffInfoVo();
|
||||
visStuffInfoVo.setExitId(id);
|
||||
@@ -828,6 +834,21 @@ public class VisCarryStuffController extends BaseController {
|
||||
return cell;
|
||||
}
|
||||
|
||||
// 创建表格单元格
|
||||
@PostMapping("/expireVisCarryStuff")
|
||||
public void expireVisCarryStuff() {
|
||||
Date dateTime = DateUtil.beginOfDay(new Date());
|
||||
List<Long> list = visCarryStuffService.selectexpireVisCarryStuff(dateTime);
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
VisExitOutVo visExitOutVo = new VisExitOutVo();
|
||||
visExitOutVo.setIds(list);
|
||||
visExitOutVo.setExamineState("5");
|
||||
visCarryStuffService.updateStaffState(visExitOutVo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.dcsoft.system.visitor.mapper;
|
||||
import com.dcsoft.system.visitor.domain.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface VisCarryStuffMapper {
|
||||
@@ -36,4 +37,8 @@ public interface VisCarryStuffMapper {
|
||||
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
||||
|
||||
void deleteVisitorReviewProcess(Long id);
|
||||
|
||||
List<Long> selectexpireVisCarryStuff(Date dateTime);
|
||||
|
||||
void updateStaffState(VisExitOutVo visExitOutVo);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.dcsoft.system.visitor.service;
|
||||
|
||||
import com.dcsoft.system.visitor.domain.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface IVisCarryStuffService {
|
||||
@@ -35,4 +36,8 @@ public interface IVisCarryStuffService {
|
||||
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
||||
|
||||
void cancel(VisExitOutVo vo);
|
||||
|
||||
List<Long> selectexpireVisCarryStuff(Date dateTime);
|
||||
|
||||
void updateStaffState(VisExitOutVo visExitOutVo);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,16 @@ public class VisCarryStuffImpl implements IVisCarryStuffService {
|
||||
visCarryStuffMapper.deleteVisitorReviewProcess(vo.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> selectexpireVisCarryStuff(Date dateTime) {
|
||||
return visCarryStuffMapper.selectexpireVisCarryStuff(dateTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStaffState(VisExitOutVo visExitOutVo) {
|
||||
visCarryStuffMapper.updateStaffState(visExitOutVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisExitOutVo selectVisExitOutById(Long id) {
|
||||
return visCarryStuffMapper.selectVisExitOutById(id);
|
||||
|
||||
@@ -149,6 +149,15 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStaffState">
|
||||
update vis_exit_out
|
||||
set examine_state = #{examineState}
|
||||
where id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteVisitorReviewProcess">
|
||||
delete from vis_visitor_review_process where exit_id = #{id}
|
||||
</delete>
|
||||
@@ -308,6 +317,16 @@
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectexpireVisCarryStuff" resultType="java.lang.Long">
|
||||
select
|
||||
e.id
|
||||
from vis_exit_out e
|
||||
left join vis_exit_out_record r on e.id = exit_id
|
||||
where r.exit_id is null
|
||||
and e.examine_state = '0'
|
||||
and e.update_time >= #{dateTime}
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
Reference in New Issue
Block a user