package com.hxhq.controller;

import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.dto.ReagentStockPushDTO;
import com.hxhq.service.ReagentStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 试剂
 * 
 * @author hxhq
 */
@RestController
@RequestMapping("/reagentStock")
public class ReagentStockController extends BaseController
{
    @Autowired
    private ReagentStockService reagentStockService;


    /**
     *
     * 试剂数据推送至中间库
     * @param dto
     * @create 2026/1/29
     **/
    @PostMapping("/dataPush")
    public AjaxResult dataPush(ReagentStockPushDTO dto) {
        reagentStockService.dataPush(dto);
      return  AjaxResult.success("推送数据成功");
    }
    /**
     *
     * 试剂数据同步
     * @create 2026/1/29
     **/
    @GetMapping("/dataSync")
    public AjaxResult dataSync() {
        reagentStockService.dataSync();
        return  AjaxResult.success("同步成功");
    }
}
