package com.jwipc.inquiry.controller.rest;

import com.jwipc.inquiry.dto.PriceInfoAuditParamDTO;
import com.jwipc.inquiry.entity.PriceInfoAuditDetail;
import com.jwipc.inquiry.logic.PriceInfoAuditDetailLogic;
import com.jwipc.inquiry.logic.PriceInfoAuditLogic;
import com.jwipc.inquiry.model.query.PriceInfoAuditQuery;
import com.jwipc.page.PageView;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
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.List;

import static com.jwipc.inquiry.constant.ModuleConst.MODULE_ROOT;

/**
 * <p>
 * 调价管理表 前端控制器
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-03-08
 */
@RestController
@RequestMapping(MODULE_ROOT + "/price/audit/detail/rest")
@RequiredArgsConstructor
public class PriceInfoAuditDetailRestController {
    private final PriceInfoAuditDetailLogic priceInfoAuditDetailLogic;
    /**
     * 列表
     * @param auditId
     */
    @RequestMapping("/getDetailListByAuditId")
    public ResponseEntity<List<PriceInfoAuditDetail>> getDetailListByAuditId(Long auditId) {
        return ResponseEntity.ok(priceInfoAuditDetailLogic.getDetailListByAuditId(auditId));
    }

    /**
     * 根据价格信息记录ids查询列表
     * @param priceIds 价格信息记录ids
     */
    @RequestMapping("/getDetailListByPriceIds")
    public ResponseEntity<List<PriceInfoAuditDetail>> getDetailListByPriceIds(String priceIds) {
        return ResponseEntity.ok(priceInfoAuditDetailLogic.getDetailListByPriceIds(priceIds));
    }


}
