| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.pojo.AccountFile; |
| | | import com.ruoyi.account.service.AccountFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import com.ruoyi.warehouse.service.DocumentationFileService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import jakarta.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/documentation/documentationFile") |
| | | public class DocumentationFileController { |
| | | public class DocumentationFileController extends BaseController { |
| | | |
| | | |
| | | @Resource |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.save(documentationFile)); |
| | | public R<?> add(@RequestBody DocumentationFile documentationFile) { |
| | | return R.ok(documentationFileService.save(documentationFile)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delDocumentationFile(@RequestBody List<Integer> ids) { |
| | | public R<?> delDocumentationFile(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | return R.fail("请选择至少一条数据"); |
| | | } |
| | | //删除检验附件 |
| | | return AjaxResult.success(documentationFileService.removeBatchByIds(ids)); |
| | | return R.ok(documentationFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *分页查询 |
| | | * @param page |
| | | *查询 |
| | | * @param |
| | | * @param documentationFile |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult documentationFileListPage(Page page, DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.documentationFileListPage(page, documentationFile)); |
| | | public R<?> documentationFileListPage(DocumentationFile documentationFile) { |
| | | return R.ok(documentationFileService.documentationFileListPage( documentationFile)); |
| | | } |
| | | |
| | | |