<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package com.bcxin.backend.controller;


import com.bcxin.backend.dtos.request.ManualBgRequest;
import com.bcxin.backend.service.BgScreeningService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@Slf4j
@RestController
@RequestMapping("/bg/screening")
public class BgScreeningController {

    @Autowired
    private BgScreeningService bgScreeningService;

    /**
     * description锛氭墜鍔ㄨ儗绛�
     * author锛歭inchunpeng
     * date锛�2023/7/19
     */
    @PostMapping("/manual")
    public void manual(@RequestBody ManualBgRequest request) throws IOException {
        if (request.getManualType() == 1) {
            bgScreeningService.runManual(request.getIdnumList());
        } else if (request.getManualType() == 2) {
            bgScreeningService.runNewRecruit();
        } else if (request.getManualType() == 3) {
            bgScreeningService.runIntervals();
        }
    }

}
</pre></body></html>