对比新文件 |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementAddDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.purchase.dto.InvoicePurchaseReportDto; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/7 14:32 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "閲囪喘鍏ュ簱") |
| | | @RequestMapping("/stockin") |
| | | public class ProcurementRecordController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | @GetMapping("/productlist") |
| | | @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鏂板鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER) |
| | | public AjaxResult list(ProcurementDto procurementDto) { |
| | | List<ProcurementDto> result =procurementRecordService.listProcurementBySalesLedgerId(procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鏂板鍏ュ簱", businessType = BusinessType.INSERT) |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody ProcurementAddDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.add(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-淇敼鍏ュ簱", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updatePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.updatePro(procurementDto)); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | | @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鍒犻櫎鍏ュ簱", businessType = BusinessType.DELETE) |
| | | @Transactional |
| | | public AjaxResult deletePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordService.deletePro(procurementDto)); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "閲囪喘鍏ュ簱-鍏ュ簱绠$悊-鍏ュ簱鏌ヨ", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDto> result =procurementRecordService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | /** |
| | | * 瀵煎嚭 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementRecordService.export(response); |
| | | } |
| | | |
| | | |
| | | } |