InventoryController.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. package com.tld.controller;
  2. import com.tld.model.AskGoods;
  3. import com.tld.model.MakeInventory;
  4. import com.tld.service.InventoryService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.*;
  7. import javax.servlet.http.HttpServletRequest;
  8. import javax.servlet.http.HttpServletResponse;
  9. import java.util.Map;
  10. /**
  11. * 盘点库存信息
  12. */
  13. @RestController
  14. @RequestMapping("inventory")
  15. public class InventoryController {
  16. @Autowired
  17. private InventoryService inventoryService;
  18. /**
  19. * 查询盘点主表
  20. * @param makeInventory 参数
  21. * @return 返回结果
  22. */
  23. @GetMapping("getInventoryDataList")
  24. public Map<String, Object> getInventoryDataList( MakeInventory makeInventory){
  25. return inventoryService.getInventoryDataList(makeInventory);
  26. }
  27. /**
  28. * 添加盘点主表
  29. * @param makeInventory 参数
  30. * @return 返回结果
  31. */
  32. @PostMapping("addInventoryPlate")
  33. public Map<String, Object> addInventoryPlate(@RequestBody MakeInventory makeInventory, HttpServletRequest request){
  34. return inventoryService.addInventoryPlate(makeInventory,request);
  35. }
  36. /**
  37. * 录入盘点信息
  38. * @param makeInventory 参数
  39. * @return 返回结果
  40. */
  41. @PostMapping("addInventory")
  42. public Map<String, Object> addInventory(@RequestBody MakeInventory makeInventory){
  43. return inventoryService.addInventory(makeInventory);
  44. }
  45. /**
  46. * 查询录入盘点信息
  47. * @param makeInventory 参数
  48. * @return 返回结果
  49. */
  50. @GetMapping("getInventory")
  51. public Map<String, Object> getInventory(MakeInventory makeInventory){
  52. return inventoryService.getInventory(makeInventory);
  53. }
  54. /**
  55. * 生成盘点信息(盘点子表信息)//
  56. * @param makeInventory 参数
  57. * @return 返回结果
  58. */
  59. @GetMapping("getInventoryPlate")
  60. public Map<String, Object> getInventoryPlate(MakeInventory makeInventory){
  61. return inventoryService.getInventoryPlate(makeInventory);
  62. }
  63. /**
  64. * 查询z盘点信息(盘点子表信息)
  65. * @param makeInventory 参数
  66. * @return 返回结果
  67. */
  68. @GetMapping("getInventoryPlates")
  69. public Map<String, Object> getInventoryPlates(MakeInventory makeInventory){
  70. return inventoryService.getInventoryPlates(makeInventory);
  71. }
  72. /**
  73. * 导出盘点信息
  74. * @param makeInventory 参数
  75. * @return 返回结果
  76. */
  77. @GetMapping("export")
  78. public void export(MakeInventory makeInventory , HttpServletResponse response){
  79. inventoryService.export(makeInventory,response);
  80. }
  81. }