提交 05fb68be authored 作者: 邓砥奕's avatar 邓砥奕

[自查模块]修改bean注入bug

上级 bd20ddaa
...@@ -54,19 +54,24 @@ public class SelfCheckSchedulerTask { ...@@ -54,19 +54,24 @@ public class SelfCheckSchedulerTask {
private String cron4 = "0 0/1 * * * ? "; private String cron4 = "0 0/1 * * * ? ";
private UnitsDao unitsDao = SpringUtils.getBean("unitsDao"); final UnitsDao unitsDao;
private TaskService taskService = SpringUtils.getBean("taskServiceImpl"); final TaskService taskService;
private SystemVariableService systemVariableService = SpringUtils.getBean("systemVariableServiceImpl"); final SystemVariableService systemVariableService;
private SystemVariableDao systemVariableDao = SpringUtils.getBean("systemVariableDao"); final SystemVariableDao systemVariableDao;
private SelfCheckBillService selfCheckBillService = SpringUtils.getBean("selfCheckBillServiceImpl"); final SelfCheckBillService selfCheckBillService;
private ScheduledFuture scheduledFuture; private ScheduledFuture scheduledFuture;
public SelfCheckSchedulerTask() { public SelfCheckSchedulerTask(UnitsDao unitsDao,TaskService taskService,SystemVariableService systemVariableService,SystemVariableDao systemVariableDao,SelfCheckBillService selfCheckBillService) {
this.unitsDao = unitsDao;
this.taskService = taskService;
this.systemVariableService = systemVariableService;
this.systemVariableDao = systemVariableDao;
this.selfCheckBillService = selfCheckBillService;
String value; String value;
if (systemVariableDao.findAll().size()==0){ if (systemVariableDao.findAll().size()==0){
value = "quarter"; value = "quarter";
......
...@@ -94,6 +94,9 @@ public class SelfCheckController { ...@@ -94,6 +94,9 @@ public class SelfCheckController {
@Autowired @Autowired
private SystemVariableService systemVariableService; private SystemVariableService systemVariableService;
@Autowired
private SelfCheckSchedulerTask selfCheckSchedulerTask;
/** /**
* 月度 * 月度
*/ */
...@@ -109,8 +112,6 @@ public class SelfCheckController { ...@@ -109,8 +112,6 @@ public class SelfCheckController {
private String cron4 = "0 0/1 * * * ? "; private String cron4 = "0 0/1 * * * ? ";
private final SelfCheckSchedulerTask selfCheckSchedulerTask = SpringUtils.getBean("selfCheckSchedulerTask");
@ApiOperation(value = "查询自查周期", notes = "可以通过这个接口查询自查周期") @ApiOperation(value = "查询自查周期", notes = "可以通过这个接口查询自查周期")
@GetMapping(value = "/select/cycle") @GetMapping(value = "/select/cycle")
public ResponseEntity selectCycle(){ public ResponseEntity selectCycle(){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论