| | |
| | | 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.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.dto.StockInRecordImportDto; |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/reAudit") |
| | | @Log(title = "入库管理-反审入库", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "批量反审入库记录") |
| | | public AjaxResult reAudit(@RequestBody StockInRecordDto approveDto) { |
| | | if(CollectionUtils.isEmpty(approveDto.getIds())){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | stockInRecordService.batchReAudit(approveDto.getIds()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/import") |
| | | @Log(title = "入库管理-导入", businessType = BusinessType.IMPORT) |
| | | @Operation(summary = "入库管理-导入") |
| | | public AjaxResult importData(MultipartFile file, String type) { |
| | | return stockInRecordService.importData(file, type); |
| | | } |
| | | |
| | | @PostMapping("/importTemplate") |
| | | @Operation(summary = "入库管理-导入模板") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | ExcelUtil<StockInRecordImportDto> util = new ExcelUtil<StockInRecordImportDto>(StockInRecordImportDto.class); |
| | | util.importTemplateExcel(response, "入库导入模板"); |
| | | } |
| | | |
| | | } |