package com.hxhq.job.task;

import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.job.service.DataSyncTaskService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

import static jdk.nashorn.internal.runtime.regexp.joni.Config.log;

/**
 * @author zhangjing
 * @date 2026/01/30 15:54
 * @description   数据对接定时
 */

@Component("DataSyncTask")
public class DataSyncTask {
    @Resource
    DataSyncTaskService dataSyncTaskService;
    /**
     *
     * 试剂同步
     * @return void
     **/
    public void syncReagentStock() {
        try {
            AjaxResult result = dataSyncTaskService.syncReagentStock();
        } catch (Exception e) {
            log.printf("调用 syncReagentStock 失败", e);
        }
    }
    /**
     *
     * 仪器同步
     * @return void
     **/
    public void syncInstrument() {
        try {
            AjaxResult result = dataSyncTaskService.syncInstrument();
        } catch (Exception e) {
            log.printf("调用 syncInstrument 失败", e);
        }
    }
    /**
     *
     * 供试品同步
     * @return void
     **/
    public void syncContainer() {
        try {
            AjaxResult result = dataSyncTaskService.syncContainer();
        } catch (Exception e) {
            log.printf("调用 syncContainer 失败", e);
        }
    }
}
