|
|
@ -6,14 +6,10 @@ import com.ruoyi.programManagement.entity.BPlanEnterprise;
|
|
|
|
import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper;
|
|
|
|
import com.ruoyi.programManagement.mapper.BEnterpriseNewMapper;
|
|
|
|
import com.ruoyi.programManagement.service.BPlanEnterpriseService;
|
|
|
|
import com.ruoyi.programManagement.service.BPlanEnterpriseService;
|
|
|
|
import com.ruoyi.programManagement.service.IBEnterpriseNewService;
|
|
|
|
import com.ruoyi.programManagement.service.IBEnterpriseNewService;
|
|
|
|
import com.ruoyi.programManagement.service.ISzEnforExamineService;
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -21,12 +17,12 @@ import java.util.List;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 定时任务更新企业新表
|
|
|
|
* 定时任务更新企业新表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
//@Configuration
|
|
|
|
@Configuration
|
|
|
|
//@EnableScheduling
|
|
|
|
@EnableScheduling
|
|
|
|
@Api(tags = "定时任务")
|
|
|
|
//@Api(tags = "定时任务")
|
|
|
|
@RestController
|
|
|
|
//@RestController
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
//@Transactional(rollbackFor = Exception.class)
|
|
|
|
@RequestMapping("/pharmaceuticals/quartz")
|
|
|
|
//@RequestMapping("/pharmaceuticals/quartz")
|
|
|
|
public class EnterpristQuartz {
|
|
|
|
public class EnterpristQuartz {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -42,9 +38,9 @@ public class EnterpristQuartz {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 每周一早上五点5点执行一次任务 生成企业新表
|
|
|
|
// 每周一早上五点5点执行一次任务 生成企业新表
|
|
|
|
// @Scheduled(cron = "0 0 17 ? * SUN")
|
|
|
|
@Scheduled(cron = "0 0 17 ? * SUN")
|
|
|
|
@GetMapping("/getList")
|
|
|
|
// @GetMapping("/getList")
|
|
|
|
@ApiOperation(value = "定时任务")
|
|
|
|
// @ApiOperation(value = "定时任务")
|
|
|
|
public AjaxResult updateInformationData() {
|
|
|
|
public AjaxResult updateInformationData() {
|
|
|
|
//三表关联查询数据
|
|
|
|
//三表关联查询数据
|
|
|
|
List<BEnterpriseNew> list = bEnterpriseNewMapper.seletAll();
|
|
|
|
List<BEnterpriseNew> list = bEnterpriseNewMapper.seletAll();
|
|
|
@ -55,12 +51,12 @@ public class EnterpristQuartz {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 定时任务修改更新计划表的检查状态、检查id、检查时效字段
|
|
|
|
// 定时任务修改更新计划表的检查状态、检查id、检查时效字段
|
|
|
|
// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
|
@Scheduled(cron = "0 0 1 * * ?")
|
|
|
|
@GetMapping("/updateExamine")
|
|
|
|
// @GetMapping("/updateExamine")
|
|
|
|
@ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段")
|
|
|
|
// @ApiOperation(value = "定时任务修改更新计划表的检查状态、检查id、检查时效字段")
|
|
|
|
public AjaxResult updateExamine() {
|
|
|
|
public AjaxResult updateExamine() {
|
|
|
|
//查询计划表中的所有数据
|
|
|
|
//查询计划表中的所有数据
|
|
|
|
List<BPlanEnterprise> list =bPlanEnterpriseService.selectUpdateAll();
|
|
|
|
List<BPlanEnterprise> list = bPlanEnterpriseService.selectUpdateAll();
|
|
|
|
bPlanEnterpriseService.updateBatchById(list);
|
|
|
|
bPlanEnterpriseService.updateBatchById(list);
|
|
|
|
return AjaxResult.success();
|
|
|
|
return AjaxResult.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|