[修改] 权限申请对接 + 保密结束时间定时任务
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.adc.da.report.Timer;
|
||||
|
||||
import com.adc.da.report.dao.mysql.ReportDao;
|
||||
import com.adc.da.report.eo.ReportEntity;
|
||||
import com.adc.da.util.utils.CollectionUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 定时任务,扫描全部报告的 保密到期日期。
|
||||
* 当日日期 = 保密到期日期,则报告涉密等级自动改为 “公开(内部公开)”
|
||||
* @Author: bpx
|
||||
* @Date:2022/4/8;
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@Slf4j
|
||||
public class secrecyDDLTimer {
|
||||
|
||||
@Autowired
|
||||
ReportDao reportDao;
|
||||
|
||||
@Scheduled(cron="0 0/10 * * * ?")
|
||||
public void timingOpen() {
|
||||
log.info("**********************保密到期定时任务开始**********************");
|
||||
List<ReportEntity> entity = reportDao.selectDDL();
|
||||
if (CollectionUtils.isNotEmpty(entity)){
|
||||
entity.forEach(e -> {
|
||||
e.setConfidentialLevel("公开(内部公开)");
|
||||
});
|
||||
}
|
||||
log.info("**********************保密到期定时任务结束**********************");
|
||||
}
|
||||
}
|
||||
@@ -65,4 +65,11 @@ public interface ReportDao extends BaseMapper<ReportEntity> {
|
||||
void saveReportAct(@Param("Vo") TtReportManageAct ttReportManageAct);
|
||||
|
||||
ReportDetailVo reportDetail(@Param("reportId") String reportId);
|
||||
|
||||
/**
|
||||
* 查询保密到期的报告
|
||||
* @return
|
||||
*/
|
||||
List<ReportEntity> selectDDL();
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ public class IpowerApplyActServiceImpl extends ServiceImpl<PowerApplyActDao, Pow
|
||||
*/
|
||||
public void saveOrUpdateSingle(PowerApplyAct powerApplyAct) {
|
||||
if (StringUtils.isEmpty(powerApplyAct.getId())) {
|
||||
// powerApplyAct.setId(UUID.randomUUID().toString().replaceAll("-",""));
|
||||
baseMapper.insert(powerApplyAct);
|
||||
} else {
|
||||
baseMapper.updateById(powerApplyAct);
|
||||
|
||||
@@ -140,5 +140,12 @@ public class PowerApplyActPageVO extends BasePageVO {
|
||||
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 报告上传人
|
||||
*/
|
||||
private String createUserId;
|
||||
|
||||
private String createUserName;
|
||||
|
||||
private List<PowerApplyAct> powerApplyList;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,8 @@ public class ReportVo {
|
||||
*/
|
||||
private String createUserId;
|
||||
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
@@ -114,13 +114,21 @@
|
||||
where a.data_id = #{dataId}
|
||||
</select>
|
||||
<select id="selectActListBydataId" resultType="com.adc.da.report.eo.PowerApplyAct">
|
||||
select a.*
|
||||
select a.*,
|
||||
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
|
||||
rep.createUserId , u.usname as createUserName
|
||||
from <include refid="TableName"/> a
|
||||
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
|
||||
left join ts_user u on u.usid = rep.createUserId
|
||||
where a.data_id = #{dataId} and a.del_flag = 0
|
||||
</select>
|
||||
<select id="selectListByPrcId" resultType="com.adc.da.report.vo.PowerApplyActPageVO">
|
||||
select a.*
|
||||
select a.*,
|
||||
rep.name,rep.keycontent,rep.maincontent,rep.DEPARTMENT,rep.year,rep.fileid,rep.confidentialLevel,rep.privacyLevel,
|
||||
rep.createUserId , u.usname as createUserName
|
||||
from <include refid="TableName"/> a
|
||||
left join TT_REPORT_MANAGE rep on a.report_id = rep.id
|
||||
left join ts_user u on u.usid = rep.createUserId
|
||||
where a.prc_id = #{prcId} and a.del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -49,12 +49,15 @@
|
||||
eo.fileid,
|
||||
eo.confidentialLevel,
|
||||
eo.privacyLevel,
|
||||
eo.createUserId,
|
||||
u.usname as createUserName,
|
||||
pa.report_id,
|
||||
pa.user_id
|
||||
FROM
|
||||
TT_REPORT_MANAGE eo
|
||||
LEFT JOIN tr_report_user ru ON eo.id = ru.reportId
|
||||
LEFT JOIN power_apply pa ON pa.report_id = eo.id
|
||||
LEFT JOIN ts_user u on u.USID = eo.createUserId
|
||||
WHERE
|
||||
eo.DEL_FLAG = 0
|
||||
<if test="pageVO.usid !='' and pageVO.usid != null">
|
||||
@@ -261,4 +264,7 @@
|
||||
WHERE rm.id = #{reportId}
|
||||
AND rm.del_flag = 0
|
||||
</select>
|
||||
<select id="selectDDL" resultType="com.adc.da.report.eo.ReportEntity">
|
||||
SELECT * FROM tt_report_manage WHERE secrecy_last <= NOW()
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user