计划接口修改

zhangtao
付刚 1 year ago
parent 7c47547fae
commit 2112ea04f0

@ -133,5 +133,10 @@ public interface BPlanEnterpriseMapper extends BaseMapper<BPlanEnterprise> {
*/
List<BPlanEnterprise> selectUpdateAll();
/**
*
*/
void updateEndTime();
}

@ -37,16 +37,20 @@ public class EnterpristQuartz {
private IBEnterpriseNewService bEnterpriseNewService;
// 每周一早上五点5点执行一次任务 生成企业新表
@Scheduled(cron = "0 0 17 ? * SUN")
// 每天早上5点执行一次任务 更新企业新表的最新检查时间字段
@Scheduled(cron = "0 0 5 * * ?")
// @GetMapping("/getList")
// @ApiOperation(value = "定时任务")
public AjaxResult updateInformationData() {
//三表关联查询数据
List<BEnterpriseNew> list = bEnterpriseNewMapper.seletAll();
//清空企业新表中的数据
bEnterpriseNewMapper.deletAll();
bEnterpriseNewService.saveBatch(list);
// bEnterpriseNewMapper.deletAll();
// bEnterpriseNewService.saveBatch(list);
// 改成只更新最新检查时间字段
bPlanEnterpriseService.updateEndTime()
return AjaxResult.success();
}

@ -120,5 +120,11 @@ public interface BPlanEnterpriseService extends IService<BPlanEnterprise> {
* @return
*/
List<BPlanEnterprise> selectUpdateAll();
/**
*
*/
void updateEndTime();
}

@ -124,6 +124,9 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
return bPlanEnterpriseMapper.selectUpdateAll();
}
@Override
public void updateEndTime() {
return bPlanEnterpriseMapper.updateEndTime();
}
}

@ -107,7 +107,7 @@
</foreach>
</if>
</where>
order by isPoint desc
order by law_sort,planned_month+0
</select>
<delete id="deleteByPlanId">
delete
@ -349,6 +349,20 @@
) e ON a.enterprise_id = e.USC_CODE
</select>
<update id="updateIdList">
UPDATE b_enterprise_new a
INNER JOIN (
SELECT
USC_CODE,
MAX_EXAMINE_END_TIME
FROM
( SELECT ROW_NUMBER ( ) over ( PARTITION BY USC_CODE ORDER BY EXAMINE_END_TIME DESC ) rowId, USC_CODE, EXAMINE_END_TIME AS MAX_EXAMINE_END_TIME FROM sz_enfor_examine ) S
WHERE
rowId = 1
) c ON a.enterprise_id = c.USC_CODE
SET a.EXAMINE_END_TIME = c.MAX_EXAMINE_END_TIME
</update>
<update id="updateIdList" parameterType="java.util.List">
UPDATE b_plan_enterprise

Loading…
Cancel
Save