| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | 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.procurementrecord.dto.ProcurementRecordOutAdd; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementUpdateDto; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordOutService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | private ProcurementRecordOutService procurementRecordOutService; |
| | | |
| | | @PostMapping("/stockout") |
| | | @Log(title = "采购入库-出库管理-出库", businessType = BusinessType.INSERT) |
| | | @Log(title = "采购出库-出库管理-出库", businessType = BusinessType.INSERT) |
| | | public AjaxResult stockout(@RequestBody ProcurementRecordOutAdd procurementRecordOutAdd) { |
| | | return AjaxResult.success(procurementRecordOutService.stockout(procurementRecordOutAdd)); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "采购入库-出库管理-出库查询", businessType = BusinessType.OTHER) |
| | | @Log(title = "采购出库-出库台账-出库查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPage(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByProduct") |
| | | @Log(title = "生产出库-出库台账-出库查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageByProduct(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPageByProduct(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageByCustom") |
| | | @Log(title = "自定义出库-出库台账-出库查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageByCustom(Page page, ProcurementRecordOutPageDto procurementDto) { |
| | | IPage<ProcurementRecordOutPageDto> result = procurementRecordOutService.listPageByCustom(page, procurementDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | | @Log(title = "采购入库-出库管理-删除出库", businessType = BusinessType.DELETE) |
| | | @Log(title = "采购出库-出库台账-删除出库", businessType = BusinessType.DELETE) |
| | | public AjaxResult deletePro(@RequestBody ProcurementUpdateDto procurementDto) { |
| | | return AjaxResult.success(procurementRecordOutService.deletePro(procurementDto)); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * 采购出库导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | |
| | | procurementRecordOutService.export(response); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | public ProcurementRecordOutMapper procurementRecordOutMapper; |
| | | /** |
| | | * 生产出库导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ProcurementRecordOutPageDto> list = procurementRecordOutMapper.listOne(); |
| | | ExcelUtil<ProcurementRecordOutPageDto> util = new ExcelUtil<>(ProcurementRecordOutPageDto.class); |
| | | util.exportExcel(response, list, "生产出库台账"); |
| | | } |
| | | |
| | | /** |
| | | * 自定义出库导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<ProcurementRecordOutPageDto> list = procurementRecordOutMapper.listTwo(); |
| | | ExcelUtil<ProcurementRecordOutPageDto> util = new ExcelUtil<>(ProcurementRecordOutPageDto.class); |
| | | util.exportExcel(response, list, "生产出库台账"); |
| | | } |
| | | |
| | | } |