CommonController.java 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. package com.dk.mdm.controller.common;
  2. import com.dk.common.controller.BaseController;
  3. import com.dk.common.model.pojo.PageList;
  4. import com.dk.common.response.ResponseResultVO;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.query.wxapi.basic.WxCommonQuery;
  7. import com.dk.mdm.service.common.CommonService;
  8. import io.swagger.annotations.Api;
  9. import io.swagger.annotations.ApiOperation;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import java.util.Dictionary;
  16. import java.util.List;
  17. import java.util.Map;
  18. /**
  19. * @author : 周兴
  20. * @desc : 控件数据源API
  21. * @date : 2023/1/3 17:21
  22. */
  23. @Api(tags = "控件数据源API")
  24. @RestController
  25. @RequestMapping("/mst/common")
  26. public class CommonController extends BaseController<Map<String, Object>> {
  27. @Override
  28. public BaseService<Map<String, Object>> getService() {
  29. return commonService;
  30. }
  31. @Autowired
  32. private CommonService commonService;
  33. /**
  34. * @desc : 获取数据字典项目
  35. * @author : 王英杰
  36. * @date : 2023/1/6 12:47
  37. */
  38. @ApiOperation(
  39. value = "获取数据字典项目",
  40. notes = "获取数据字典项目"
  41. )
  42. @PostMapping("get_dictionary_item_data")
  43. public ResponseResultVO<List<Map<String, Object>>> getDictionaryItemData(@RequestBody Map<String, Object> param) {
  44. return commonService.getDictionaryItemData(param);
  45. }
  46. /**
  47. * @desc : 刷新基础数据
  48. * @author : 周兴
  49. * @date : 2023/5/11 10:20
  50. */
  51. @ApiOperation(
  52. value = "刷新基础数据",
  53. notes = "刷新基础数据"
  54. )
  55. @PostMapping("refresh_basic_data")
  56. public ResponseResultVO refreshBasicData(@RequestBody Map<String, Object> param) {
  57. return commonService.refreshBasicData(param);
  58. }
  59. /**
  60. * @desc : 获取系统表数据种类
  61. * @author : 周兴
  62. * @date : 2023/1/6 12:47
  63. */
  64. @ApiOperation(
  65. value = "获取系统表数据种类",
  66. notes = "获取系统表数据种类"
  67. )
  68. @PostMapping("get_data_kind")
  69. public ResponseResultVO<List<Map<String, Object>>> getDataKind(@RequestBody Map<String, Object> param) {
  70. return commonService.getDataKind(param);
  71. }
  72. /**
  73. * @desc : 获取组织部门
  74. * @author : 姜宁
  75. * @date : 2023/1/9 13:50
  76. */
  77. @ApiOperation(
  78. value = "获取组织部门",
  79. notes = "获取组织部门"
  80. )
  81. @PostMapping("get_org")
  82. public ResponseResultVO<List<Map<String, Object>>> getOrg(@RequestBody Map<String, Object> param) {
  83. return commonService.getOrg(param);
  84. }
  85. /**
  86. * @desc : 只获取二级部门 按照level_code 排序
  87. * @author : 王英杰
  88. * @date : 2023/1/9 13:49
  89. */
  90. @ApiOperation(
  91. value = "获取组织部门",
  92. notes = "获取组织部门"
  93. )
  94. @PostMapping("get_procur_org")
  95. public ResponseResultVO<List<Map<String, Object>>> getProcureOrg(@RequestBody Map<String, Object> param) {
  96. return commonService.getProcureOrg(param);
  97. }
  98. /**
  99. * @desc : 获取组织部门(分页)
  100. * @author : 姜宁
  101. * @date : 2023/1/29 16:52
  102. */
  103. @ApiOperation(value = "获取员工分页查询", notes = "获取员工分页查询")
  104. @PostMapping({"get_org_by_page"})
  105. public ResponseResultVO<PageList<Map<String, Object>>> getOrgByPage(@RequestBody Map<String, Object> param) {
  106. return commonService.getOrgByPage(param);
  107. }
  108. /**
  109. * @desc : 获取角色
  110. * @author : 姜宁
  111. * @date : 2023/1/29 14:26
  112. */
  113. @ApiOperation(
  114. value = "获取角色",
  115. notes = "获取角色"
  116. )
  117. @PostMapping("get_role")
  118. public ResponseResultVO<List<Map<String, Object>>> getRole(@RequestBody Map<String, Object> param) {
  119. return commonService.getRole(param);
  120. }
  121. /**
  122. * @desc : 获取员工
  123. * @author : 姜宁
  124. * @date : 2023/1/29 16:52
  125. */
  126. @ApiOperation(value = "获取员工", notes = "获取员工")
  127. @PostMapping({"get_staff"})
  128. public ResponseResultVO<List<Map<String, Object>>> getStaff(@RequestBody Map<String, Object> param) {
  129. return commonService.getStaff(param);
  130. }
  131. /**
  132. * @desc : 获取员工(分页)
  133. * @author : 姜宁
  134. * @date : 2023/1/29 16:52
  135. */
  136. @ApiOperation(value = "获取员工分页查询", notes = "获取员工分页查询")
  137. @PostMapping({"get_staff_by_page"})
  138. public ResponseResultVO<PageList<Map<String, Object>>> getStaffByPage(@RequestBody Map<String, Object> param) {
  139. return commonService.getStaffByPage(param);
  140. }
  141. /**
  142. * @desc : 获取系统参数
  143. * @author : 周兴
  144. * @date : 2023/1/10 13:53
  145. */
  146. @ApiOperation(
  147. value = "获取系统参数",
  148. notes = "获取系统参数"
  149. )
  150. @PostMapping("get_setting_value")
  151. public ResponseResultVO getSettingValue(@RequestBody Map<String, Object> param) {
  152. return commonService.getSettingValue(param);
  153. }
  154. /**
  155. * @desc : 查询系统参数种类
  156. * @author : 夏常明
  157. * @date : 2023/1/29 17:06
  158. */
  159. @ApiOperation(
  160. value = "查询系统参数种类",
  161. notes = "查询系统参数种类"
  162. )
  163. @PostMapping("get_setting_kind")
  164. public ResponseResultVO<List<Map<String, Object>>> getSettingKind(@RequestBody Map<String, Object> param) {
  165. return commonService.getSettingKind(param);
  166. }
  167. /**
  168. * @desc : 获取数据字典
  169. * @author : 姜宁
  170. * @date : 2023/2/7 14:48
  171. */
  172. @ApiOperation(
  173. value = "获取数据字典",
  174. notes = "获取数据字典"
  175. )
  176. @PostMapping("get_dictionary_data")
  177. public ResponseResultVO<List<Map<String, Object>>> getDictionaryData(@RequestBody Map<String, Object> param) {
  178. return commonService.getDictionaryData(param);
  179. }
  180. /**
  181. * @desc : 获取用户表格设置
  182. * @author : 周兴
  183. * @date : 2023/4/4 15:11
  184. */
  185. @ApiOperation(
  186. value = "获取用户表格设置",
  187. notes = "获取用户表格设置"
  188. )
  189. @PostMapping("get_user_table_info")
  190. public ResponseResultVO<List<Map<String, Object>>> getUserTableInfo(@RequestBody Map<String, Object> param) {
  191. return commonService.getUserTableInfo(param);
  192. }
  193. /**
  194. * @desc : 获取用户功能
  195. * @author : 周兴
  196. * @date : 2023/4/4 15:11
  197. */
  198. @ApiOperation(
  199. value = "获取用户功能",
  200. notes = "获取用户功能"
  201. )
  202. @PostMapping("get_user_function")
  203. public ResponseResultVO<List<Map<String, Object>>> getUserFunction(@RequestBody Map<String, Object> param) {
  204. return commonService.getUserFunction(param);
  205. }
  206. /**
  207. * @desc : 查导航菜单(自定义报表用)
  208. * @author : 周兴
  209. * @date : 2023/4/4 15:11
  210. */
  211. @ApiOperation(
  212. value = "查导航菜单(自定义报表用)",
  213. notes = "查导航菜单(自定义报表用)"
  214. )
  215. @PostMapping("get_menu_navigation")
  216. public ResponseResultVO<List<Map<String, Object>>> getMenuNavigation(@RequestBody Map<String, Object> param) {
  217. return commonService.getMenuNavigation(param);
  218. }
  219. /**
  220. * @desc : 获取数据类型
  221. * @author : 周兴
  222. * @date : 2023/6/2 11:02
  223. */
  224. @ApiOperation(value = "获取数据类型", notes = "获取数据类型")
  225. @PostMapping({"get_value_kind"})
  226. public ResponseResultVO<List<Map<String, Object>>> getValueKind(@RequestBody Map<String, Object> param) {
  227. return commonService.getValueKind(param);
  228. }
  229. /**
  230. * @desc : 获取应用
  231. * @author : 洪旭东
  232. * @date : 2023-06-30 14:56
  233. */
  234. @ApiOperation(
  235. value = "获取应用",
  236. notes = "获取应用"
  237. )
  238. @PostMapping("get_application")
  239. public ResponseResultVO<List<Map<String, String>>> getApplication() {
  240. return commonService.getApplication();
  241. }
  242. /**
  243. * @desc : 获取单据
  244. * @author : 周兴
  245. * @date : 2023-08-09 14:32
  246. */
  247. @ApiOperation(
  248. value = "获取单据",
  249. notes = "获取单据"
  250. )
  251. @PostMapping("get_doc")
  252. public ResponseResultVO<List<Map<String, Object>>> getDoc(@RequestBody Map<String, Object> param) {
  253. return commonService.getDoc(param);
  254. }
  255. /**
  256. * @desc : 获取商品
  257. * @author : 姜宁
  258. * @date : 2023/1/9 13:50
  259. */
  260. @ApiOperation(
  261. value = "获取商品",
  262. notes = "获取商品"
  263. )
  264. @PostMapping("get_goods")
  265. public ResponseResultVO<List<Map<String, Object>>> getGoods(@RequestBody Map<String, Object> param) {
  266. return commonService.getGoods(param);
  267. }
  268. /**
  269. * @desc : 获取商品(分页)
  270. * @author : 姜宁
  271. * @date : 2023/1/29 16:52
  272. */
  273. @ApiOperation(value = "获取商品分页查询", notes = "获取商品分页查询")
  274. @PostMapping({"get_goods_by_page"})
  275. public ResponseResultVO<PageList<Map<String, Object>>> getGoodsPage(@RequestBody Map<String, Object> param) {
  276. return commonService.getGoodsPage(param);
  277. }
  278. /**
  279. * @desc : 获取商品(销售订单开单用)
  280. * @author : 付斌
  281. * @date : 2024-03-09 9:54
  282. */
  283. @PostMapping("get_goods_for_order")
  284. public ResponseResultVO<List<Map<String, Object>>> getGoodsForOrder(@RequestBody Map<String, Object> param) {
  285. return commonService.getGoodsForOrder(param);
  286. }
  287. /**
  288. * @desc : 获取商品(销售订单开单用)(分页)
  289. * @author : 付斌
  290. * @date : 2024-03-09 9:55
  291. */
  292. @PostMapping({"get_goods_for_order_by_page"})
  293. public ResponseResultVO<PageList<Map<String, Object>>> getGoodsForOrderByPage(@RequestBody Map<String, Object> param) {
  294. return commonService.getGoodsForOrderByPage(param);
  295. }
  296. /**
  297. * @desc : 获取商品(采购订单开单用)
  298. * @author : 常皓宁
  299. * @date : 2024/3/9 10:08
  300. */
  301. @PostMapping("get_goods_for_purchase")
  302. public ResponseResultVO<List<Map<String, Object>>> getGoodsForPurchase(@RequestBody Map<String, Object> param) {
  303. return commonService.getGoodsForPurchase(param);
  304. }
  305. /**
  306. * @desc : 获取商品(采购订单开单用)(分页)
  307. * @author : 常皓宁
  308. * @date : 2024/3/9 10:08
  309. */
  310. @PostMapping({"get_goods_for_purchase_by_page"})
  311. public ResponseResultVO<PageList<Map<String, Object>>> getGoodsForPurchaseByPage(@RequestBody Map<String, Object> param) {
  312. return commonService.getGoodsForPurchaseByPage(param);
  313. }
  314. /**
  315. * @desc : 获取客户
  316. * @author : 付斌
  317. * @date : 2024-03-09 9:55
  318. */
  319. @ApiOperation(
  320. value = "获取客户",
  321. notes = "获取客户"
  322. )
  323. @PostMapping("get_customer")
  324. public ResponseResultVO<List<Map<String, Object>>> getCustomer(@RequestBody Map<String, Object> param) {
  325. return commonService.getCustomer(param);
  326. }
  327. /**
  328. * @desc : 获取客户(分页)
  329. * @author : 付斌
  330. * @date : 2024-03-09 9:55
  331. */
  332. @ApiOperation(value = "获取客户分页查询", notes = "获取客户分页查询")
  333. @PostMapping({"get_customer_by_page"})
  334. public ResponseResultVO<PageList<Map<String, Object>>> GetCustomerByPage(@RequestBody Map<String, Object> param) {
  335. return commonService.GetCustomerByPage(param);
  336. }
  337. /**
  338. * @desc : 获取供应商
  339. * @author : 常皓宁
  340. * @date : 2024/3/1 9:19
  341. */
  342. @ApiOperation(
  343. value = "获取供应商",
  344. notes = "获取供应商"
  345. )
  346. @PostMapping("get_supplier")
  347. public ResponseResultVO<List<Map<String, Object>>> getSupplier(@RequestBody Map<String, Object> param) {
  348. return commonService.getSupplier(param);
  349. }
  350. /**
  351. * @desc : 获取供应商分页
  352. * @author : 常皓宁
  353. * @date : 2024/3/1 9:19
  354. */
  355. @ApiOperation(
  356. value = "获取供应商(分页)",
  357. notes = "获取供应商(分页)"
  358. )
  359. @PostMapping("get_supplier_by_page")
  360. public ResponseResultVO<PageList<Map<String, Object>>> getSupplierByPage(@RequestBody Map<String, Object> param) {
  361. return commonService.getSupplierByPage(param);
  362. }
  363. /**
  364. * @desc : 获取渠道
  365. * @author : 付斌
  366. * @date : 2024-03-02 10:18
  367. */
  368. @ApiOperation(value = "获取渠道", notes = "获取渠道")
  369. @PostMapping({"get_channel"})
  370. public ResponseResultVO<List<Map<String, Object>>> getChannel(@RequestBody Map<String, Object> param) {
  371. return commonService.getChannel(param);
  372. }
  373. /**
  374. * @desc : 商品品牌查询
  375. * @author : 王英杰
  376. * @date : 2024/2/26 10:36
  377. */
  378. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  379. @PostMapping({"goods_brand_list_by"})
  380. public ResponseResultVO<PageList<Map<String, Object>>> goodsBrandListBy(@RequestBody Map<String, Object> param) {
  381. return commonService.goodsBrandListBy(param);
  382. }
  383. /**
  384. * @desc : 商品种类查询
  385. * @author : 王英杰
  386. * @date : 2024/2/26 10:36
  387. */
  388. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  389. @PostMapping({"goods_category_list_by"})
  390. public ResponseResultVO<PageList<Map<String, Object>>> goodsCategoryListBy(@RequestBody Map<String, Object> param) {
  391. return commonService.goodsCategoryListBy(param);
  392. }
  393. /**
  394. * @desc : 商品系列查询
  395. * @author : 王英杰
  396. * @date : 2024/2/26 10:36
  397. */
  398. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  399. @PostMapping({"goods_Series_list_by"})
  400. public ResponseResultVO<PageList<Map<String, Object>>> goodsSeriesListBy(@RequestBody Map<String, Object> param) {
  401. return commonService.goodsSeriesListBy(param);
  402. }
  403. /**
  404. * @desc : 商品种类查询
  405. * @author : 于继渤
  406. * @date : 2024/2/26 10:36
  407. */
  408. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  409. @PostMapping({"get_goods_category_no_page"})
  410. public ResponseResultVO<List<Map<String, Object>>> getGoodsCategoryNoPage(@RequestBody Map<String, Object> param) {
  411. return commonService.getGoodsCategoryNoPage(param);
  412. }
  413. /**
  414. * @desc : 计量单位查询
  415. * @author : 王英杰
  416. * @date : 2024/2/26 10:36
  417. */
  418. @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
  419. @PostMapping({"unit_list_by"})
  420. public ResponseResultVO<PageList<Map<String, Object>>> unitListBy(@RequestBody Map<String, Object> param) {
  421. return commonService.unitListBy(param);
  422. }
  423. /**
  424. * @desc : 获取仓库
  425. * @author : 王英杰
  426. * @date : 2024/2/26 10:36
  427. */
  428. @ApiOperation(
  429. value = "获取仓库档案",
  430. notes = "获取仓库档案"
  431. )
  432. @PostMapping("get_warehouse_by_page")
  433. public ResponseResultVO<PageList<Map<String, Object>>> getWarehouseByPage(@RequestBody Map<String, Object> param) {
  434. return commonService.getWarehouseByPage(param);
  435. }
  436. /**
  437. * @desc : 获取仓库
  438. * @author : 常皓宁
  439. * @date : 2024/3/4 10:49
  440. */
  441. @ApiOperation(
  442. value = "获取仓库",
  443. notes = "获取仓库"
  444. )
  445. @PostMapping("get_warehouse")
  446. public ResponseResultVO<List<Map<String, Object>>> getWarehouse(@RequestBody Map<String, Object> param) {
  447. return commonService.getWarehouse(param);
  448. }
  449. /**
  450. * @desc : 查询库存
  451. * @author : 付斌
  452. * @date : 2024-03-05 10:50
  453. */
  454. @ApiOperation(
  455. value = "获取商品",
  456. notes = "获取商品"
  457. )
  458. @PostMapping("get_inventory")
  459. public ResponseResultVO<List<Map<String, Object>>> getInventory(@RequestBody Map<String, Object> param) {
  460. return commonService.getInventory(param);
  461. }
  462. /**
  463. * @desc : 查询库存(分页)
  464. * @author : 付斌
  465. * @date : 2024-03-05 10:50
  466. */
  467. @ApiOperation(value = "获取商品分页查询", notes = "获取商品分页查询")
  468. @PostMapping({"get_inventory_by_page"})
  469. public ResponseResultVO<PageList<Map<String, Object>>> getInventoryByPage(@RequestBody Map<String, Object> param) {
  470. return commonService.getInventoryByPage(param);
  471. }
  472. /**
  473. * @desc : 获取页面数据源集合 (小程序用)
  474. * @author : 于继渤
  475. * @date : 2024/2/26 10:36
  476. */
  477. @ApiOperation(
  478. value = "获取页面初始加载数据",
  479. notes = "获取页面初始加载数据"
  480. )
  481. @PostMapping("get_init_data")
  482. public ResponseResultVO<?> getInitData(@RequestBody Map<String, Object> param) {
  483. return commonService.getInitData(param);
  484. }
  485. }