惠州统计年鉴
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

108 lines
2.7 KiB

  1. /**
  2. * 版权所有 ©2021 莱欧有限公司
  3. * 工程名:yearBooks
  4. * 文件名:InoutController.java
  5. * 创建日期:2021年10月21日 上午9:12:03
  6. * 作者:mt.W
  7. */
  8. package com.lion.controller;
  9. import java.util.Map;
  10. import javax.servlet.http.HttpServletRequest;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RequestParam;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import org.springframework.web.multipart.MultipartFile;
  16. import com.lion.entity.Inout;
  17. import com.lion.entity.LoginUserInfo;
  18. import com.lion.service.InoutService;
  19. import com.lion.util.TokenUtil;
  20. /**
  21. * 类描述
  22. * @author mt.W
  23. * @since 2021年10月21日
  24. */
  25. @RestController
  26. @RequestMapping("inout")
  27. public class InoutController {
  28. @Autowired
  29. private InoutService service;
  30. /**
  31. *
  32. * 方法描述 查询居民收入与支出记录
  33. * @author mt.W
  34. * @since 2021年10月21日
  35. * @param req
  36. * @param rows
  37. * @param page
  38. * @param year
  39. * @return
  40. */
  41. @RequestMapping("getInoutRecordList.service")
  42. public Map<String,Object> getInoutRecordList(HttpServletRequest req,String rows,String page,String year){
  43. return service.getInoutRecordList(rows, page, TokenUtil.getUserInfo(req).getOrgid(), year);
  44. }
  45. /**
  46. *
  47. * 方法描述 保存居民收入与支出信息
  48. * @author mt.W
  49. * @since 2021年10月21日
  50. * @param req
  51. * @param t
  52. * @return
  53. */
  54. @RequestMapping("saveInoutRecord.service")
  55. public Map<String,Object> saveInoutRecord(HttpServletRequest req,Inout t){
  56. return service.saveInoutRecord(t, TokenUtil.getUserInfo(req).getOrgid(), TokenUtil.getUserInfo(req).getUserId());
  57. }
  58. /**
  59. *
  60. * 方法描述 删除居民收入与支出信息
  61. * @author mt.W
  62. * @since 2021年10月21日
  63. * @param id
  64. * @return
  65. */
  66. @RequestMapping("deleteInoutRecord.service")
  67. public Map<String,Object> deleteInoutRecord(String id){
  68. return service.deleteInoutRecord(id);
  69. }
  70. /**
  71. *
  72. * 方法描述 导出居民收入与支出信息
  73. * @author mt.W
  74. * @since 2021年10月22日
  75. * @param req
  76. * @param year
  77. * @param orgid
  78. * @param flag
  79. * @return
  80. */
  81. @RequestMapping("exprotInoutRecord.service")
  82. public Map<String,Object> exprotInoutRecord(HttpServletRequest req,String year){
  83. return service.exprotInoutRecord(req, year, TokenUtil.getUserInfo(req).getOrgid());
  84. }
  85. /**
  86. *
  87. * 方法描述 导入文件
  88. * @author mt.W
  89. * @since 2021年10月22日
  90. * @param req
  91. * @param file
  92. * @return
  93. */
  94. @RequestMapping("importData.service")
  95. public Map<String,Object> importData(HttpServletRequest req,@RequestParam("fileElement") MultipartFile file){
  96. LoginUserInfo user = TokenUtil.getUserInfo(req);
  97. return service.importData(file, user);
  98. }
  99. }