对比新文件 |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.warehouse.mapper.DocumentationBorrowManagementMapper; |
| | | import com.ruoyi.warehouse.mapper.DocumentationReturnManagementMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.pojo.DocumentationReturnManagement; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.service.DocumentationBorrowManagementService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "鏂囨。鍊熼槄绠$悊") |
| | | @RequestMapping("/documentationBorrowManagement") |
| | | public class DocumentationBorrowManagementController extends BaseController { |
| | | @Autowired |
| | | private DocumentationBorrowManagementService documentationBorrowManagementService; |
| | | @Autowired |
| | | private DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | @Autowired |
| | | private DocumentationReturnManagementMapper documentationReturnManagementMapper; |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鍊熼槄鍒嗛〉鏌ヨ") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鍊熼槄鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.listPage(page, documentationBorrowManagement)); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鍊熼槄鏌ヨ") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鍊熼槄鏌ヨ", businessType = BusinessType.OTHER) |
| | | public AjaxResult list() { |
| | | return AjaxResult.success(documentationBorrowManagementService.listAll()); |
| | | } |
| | | @GetMapping("/listPageReturn") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-褰掕繕鍒嗛〉鏌ヨ") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-褰掕繕鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageReturn(Page page, DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationReturnManagementMapper.listPage(page, documentationReturnManagement)); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鍊熼槄") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鍊熼槄", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.add(documentationBorrowManagement)); |
| | | } |
| | | @PutMapping("/revent") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-褰掕繕") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-褰掕繕", businessType = BusinessType.UPDATE) |
| | | public AjaxResult revent(@RequestBody DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.reventdbm(documentationReturnManagement)); |
| | | } |
| | | @PutMapping("/update") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鏇存柊") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鏇存柊", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.updateById(documentationBorrowManagement)); |
| | | } |
| | | @PutMapping("/reventUpdate") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-褰掕繕鏇存柊") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-褰掕繕鏇存柊", businessType = BusinessType.UPDATE) |
| | | public AjaxResult reventupdate(@RequestBody DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationReturnManagementMapper.updateById(documentationReturnManagement)); |
| | | } |
| | | @DeleteMapping ("/delete") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鍊熼槄鍒犻櫎") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鍊熼槄鍒犻櫎", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇蜂紶鍏ヨ鍒犻櫎鐨処D"); |
| | | return AjaxResult.success(documentationBorrowManagementService.deleteByIds(ids)); |
| | | } |
| | | @DeleteMapping ("/reventDelete") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-褰掕繕鍒犻櫎") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-褰掕繕鍒犻櫎", businessType = BusinessType.DELETE) |
| | | public AjaxResult reventdelete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇蜂紶鍏ヨ鍒犻櫎鐨処D"); |
| | | return AjaxResult.success(documentationBorrowManagementService.reventDeleteByIds(ids)); |
| | | } |
| | | @PostMapping("/export") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-鍊熼槄瀵煎嚭") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-鍊熼槄瀵煎嚭", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response,DocumentationBorrowManagement documentationBorrowManagement) { |
| | | documentationBorrowManagementService.export(response,documentationBorrowManagement); |
| | | } |
| | | @PostMapping("/exportrevent") |
| | | @ApiOperation("鏂囨。鍊熼槄绠$悊-褰掕繕瀵煎嚭") |
| | | @Log(title = "鏂囨。鍊熼槄绠$悊-褰掕繕瀵煎嚭", businessType = BusinessType.EXPORT) |
| | | public void exportrevent(HttpServletResponse response, DocumentationReturnManagement documentationReturnManagement) { |
| | | documentationBorrowManagementService.exportrevent(response,documentationReturnManagement); |
| | | } |
| | | } |