添加定时任务:个体户全部移出标记为不另册管理

This commit is contained in:
zhouxy 2026-04-23 19:42:46 +08:00
parent 1f987fa114
commit ed73ba091c
6 changed files with 55 additions and 1 deletions

View File

@ -327,4 +327,10 @@ public class TSAbnList extends Model<TSAbnList> {
return "nb"; return "nb";
} }
} }
/**
* 个体户是否已全部移出1代表是
*/
@TableField("ISREMOVELIST")
private String isRemoveList;
} }

View File

@ -164,4 +164,7 @@ public interface TSAbnListMapper extends BaseMapper<TSAbnList> {
Boolean saveAbnBatch(List<TSAbnList> list); Boolean saveAbnBatch(List<TSAbnList> list);
int checknb(@Param("entityno")String entityno, @Param("reportYear") String reportYear); int checknb(@Param("entityno")String entityno, @Param("reportYear") String reportYear);
Boolean updateAbnIsRemoveList();
} }

View File

@ -0,0 +1,35 @@
package com.chinaweal.aiccs.schedule;
import com.chinaweal.aiccs.aiccs.abnormal.mapper.TSAbnListMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* 另册管理定时任务
*
* @author zhouxy
* @since 2026/4/23
*/
@Slf4j
@Component
public class AnotherListSchedule {
@Autowired
private TSAbnListMapper tsAbnListMapper;
/**
* 另册管理定时任务
*
* @author zhouxy
*/
@Scheduled(cron = "${scheduling.cron.anotherListPB}")
public void executeAnotherListTask() {
log.info("===========开始执行另册管理定时任务===========");
//查询当天移出的个体户,查询这些个体户是否全都移出异常,如果是,就标记上
Boolean b = tsAbnListMapper.updateAbnIsRemoveList();
log.info("===========结束执行另册管理定时任务===========");
}
}

View File

@ -165,6 +165,7 @@ scheduling:
moveInData: '-' #迁入省局数据定时任务 moveInData: '-' #迁入省局数据定时任务
forceDeregisterNoticeExpired: '0 0 1 * * ?' #拟强制注销公告期满更新定时任务 forceDeregisterNoticeExpired: '0 0 1 * * ?' #拟强制注销公告期满更新定时任务
cancelEntRemove: '0 0 1 * * ?' #注销企业自动移出 cancelEntRemove: '0 0 1 * * ?' #注销企业自动移出
anotherListPB: '0 0 22 * * ?' # 个体户移出名单标记另册管理定时任务
ot: ot:
bakCseDownloadPath: /ot/download/case bakCseDownloadPath: /ot/download/case

View File

@ -165,7 +165,7 @@ scheduling:
moveInData: '0 31 00 * * ?' #迁入省局数据定时任务 moveInData: '0 31 00 * * ?' #迁入省局数据定时任务
forceDeregisterNoticeExpired: '0 0 1 * * ?' #拟强制注销公告期满更新定时任务 forceDeregisterNoticeExpired: '0 0 1 * * ?' #拟强制注销公告期满更新定时任务
cancelEntRemove: '0 0 1 * * ?' #注销企业自动移出 cancelEntRemove: '0 0 1 * * ?' #注销企业自动移出
anotherListPB: '-' # 个体户移出名单标记另册管理定时任务
ot: ot:
bakCseDownloadPath: /ot/download/case bakCseDownloadPath: /ot/download/case
bakPermitDownloadPath: /ot/download/permit bakPermitDownloadPath: /ot/download/permit

View File

@ -894,4 +894,13 @@
<select id="checknb" resultType="int"> <select id="checknb" resultType="int">
select count(*) from aiccs.trentbaseinfo where entityno = #{entityno} and reportYear = #{reportYear} select count(*) from aiccs.trentbaseinfo where entityno = #{entityno} and reportYear = #{reportYear}
</select> </select>
<update id="updateAbnIsRemoveList">
UPDATE AICCS.tsabnlist t SET ISREMOVELIST = '1'
WHERE t.ENTTYPE IN ('9910','9500')
AND EXISTS (SELECT 1 FROM AICCS.tsabnlist ts WHERE t.PRIPID = ts.pripid
AND ts.OPERATESTATUS = '0' AND TRUNC(ts.REMDATE) = TRUNC(SYSDATE) )
AND NOT EXISTS (SELECT 1 FROM AICCS.tsabnlist abn WHERE abn.pripid = t.pripid
AND abn.operatestatus = '1')
</update>
</mapper> </mapper>