package com.huimv.receive.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.huimv.receive.common.utils.Result;
import com.huimv.receive.common.utils.ResultCode;
import com.huimv.receive.entity.BaseWashoutPoint;
import com.huimv.receive.entity.dto.GetWashoutPointDto;
import com.huimv.receive.entity.vo.WashOutVo;
import com.huimv.receive.service.IBaseWashoutPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.awt.*;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-03-06
 */
@RestController
@RequestMapping("/base-washout-point")
@CrossOrigin
public class BaseWashoutPointController {
    @Autowired
    private IBaseWashoutPointService washoutPointService;

    @RequestMapping("/add")
    public Result add(HttpServletRequest httpServletRequest,
                      @RequestBody WashOutVo washOutVo) {
        return washoutPointService.add(httpServletRequest, washOutVo);
    }

    @RequestMapping("/list")
    public Result add(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return washoutPointService.list(httpServletRequest, paramsMap);
    }

    @RequestMapping("/delete")
    public Result delete(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return washoutPointService.delete(httpServletRequest, paramsMap);
    }

    @RequestMapping("/listDest")
    public Result listDest(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
       return washoutPointService.listDest(paramsMap);
    }

    @RequestMapping("/listWash")
    public Result listWash(HttpServletRequest httpServletRequest, @RequestBody Map<String, String> paramsMap) {
        return washoutPointService.listWash(paramsMap);
    }
}
