CommonController.java 18 KB

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