| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-分页列表查询") |
| | | @ApiOperation(value = "备件库存信息-分页列表查询", notes = "备件库存信息-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamSparePartInventory eamSparePartInventory, |
| | |
| | | * @param eamSparePartInventory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-添加") |
| | | @ApiOperation(value = "备件库存信息-添加", notes = "备件库存信息-添加") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamSparePartInventory eamSparePartInventory) { |
| | | eamSparePartInventoryService.save(eamSparePartInventory); |
| | | List<EamSparePartInventory> eamSparePartInventories = eamSparePartInventory.getEamSparePartInventories(); |
| | | for (EamSparePartInventory sparePartInventory : eamSparePartInventories) { |
| | | eamSparePartInventoryService.save(sparePartInventory); |
| | | } |
| | | return Result.OK("添加成功!"); |
| | | } |
| | | |
| | |
| | | * @param eamSparePartInventory |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-编辑") |
| | | @ApiOperation(value = "备件库存信息-编辑", notes = "备件库存信息-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamSparePartInventory eamSparePartInventory) { |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-通过id删除") |
| | | @ApiOperation(value = "备件库存信息-通过id删除", notes = "备件库存信息-通过id删除") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-批量删除") |
| | | @ApiOperation(value = "备件库存信息-批量删除", notes = "备件库存信息-批量删除") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "备件库存信息-通过id查询") |
| | | @ApiOperation(value = "备件库存信息-通过id查询", notes = "备件库存信息-通过id查询") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |