package com.zg.project.Inventory.HdInventory;

import com.zg.framework.web.domain.AjaxResult;
import com.zg.project.Inventory.AutoInventory.service.ISodService;
import com.zg.project.Inventory.domain.dto.SodQueryDTO;
import io.swagger.annotations.ApiModelProperty;
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.util.Map;

@RestController
@RequestMapping("/HdInventory")
public class HdInventoryController {

    @Autowired
    private ISodService sodService;

    @ApiModelProperty("盘点对比")
    @PostMapping("/match")
    public AjaxResult match(@RequestBody SodQueryDTO dto) {

        dto.setScanType(0);

        Map<String, Object> resultMap = sodService.matchWithStatus(dto);

        return AjaxResult.success(resultMap);

    }

}
