| | |
| | | |
| | | 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.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.dto.*; |
| | | import com.ruoyi.procurementrecord.mapper.CustomStorageMapper; |
| | | import com.ruoyi.procurementrecord.pojo.CustomStorage; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Transactional |
| | | public AjaxResult addCustom(@RequestBody List<CustomStorage> customStorage) { |
| | | return procurementRecordService.addCustom(customStorage); |
| | | } |
| | | |
| | | @PostMapping("/updateCustom") |
| | | @Log(title = "自定义入库-入库管理-修改入库", businessType = BusinessType.UPDATE) |
| | | @Transactional |
| | | public AjaxResult updateCustom(@RequestBody CustomStorage customStorage) { |
| | | return procurementRecordService.updateCustom(customStorage); |
| | | } |
| | | |
| | | @Delete("/delteCustom") |
| | | @Log(title = "自定义入库-入库管理-删除入库", businessType = BusinessType.DELETE) |
| | | @Transactional |
| | | public AjaxResult deleteCustom(@RequestBody List<Long> ids) { |
| | | return procurementRecordService.deleteCustom(ids); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * 库存管理采购导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopy") |
| | | public void exportCopy(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response); |
| | | procurementRecordService.exportCopy(response,1); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * 库存管理生产导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyOne") |
| | | public void exportCopyOne(HttpServletResponse response) { |
| | | procurementRecordService.exportCopy(response,2); |
| | | } |
| | | |
| | | /** |
| | | * 库存管理自定义导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportCopyTwo") |
| | | public void exportCopyTwo(HttpServletResponse response) { |
| | | procurementRecordService.exportCopyTwo(response,3); |
| | | } |
| | | |
| | | /** |
| | | * 入库,出库管理采购导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementRecordService.export(response); |
| | | procurementRecordService.export(response,1); |
| | | } |
| | | |
| | | /** |
| | | * 入库,出库管理生产导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | procurementRecordService.export(response,2); |
| | | } |
| | | |
| | | @Autowired |
| | | private CustomStorageMapper customStorageMapper; |
| | | |
| | | /** |
| | | * 入库,出库管理自定义导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<CustomStorage> customStorages = customStorageMapper.selectList(null); |
| | | ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class); |
| | | util.exportExcel(response, customStorages, "入库台账"); |
| | | } |
| | | |
| | | |