CommonService.java 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355
  1. package com.dk.mdm.service.common;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.dk.common.infrastructure.constant.Constant;
  5. import com.dk.common.mapper.BaseMapper;
  6. import com.dk.common.model.pojo.PageList;
  7. import com.dk.common.model.vo.core.UserVO;
  8. import com.dk.common.response.ResponseCodeEnum;
  9. import com.dk.common.response.ResponseResultUtil;
  10. import com.dk.common.response.ResponseResultVO;
  11. import com.dk.common.service.BaseService;
  12. import com.dk.mdm.mapper.common.CommonMapper;
  13. import com.dk.mdm.infrastructure.util.AuthUtils;
  14. import lombok.extern.slf4j.Slf4j;
  15. import org.postgresql.util.PGobject;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.stereotype.Service;
  18. import org.springframework.util.CollectionUtils;
  19. import java.util.*;
  20. import java.util.stream.Collectors;
  21. /**
  22. * @author : 周兴
  23. * @desc : 控件数据源API
  24. * @date : 2023/1/3 17:21
  25. */
  26. @Service
  27. @Slf4j
  28. public class CommonService extends BaseService<Map<String, Object>> {
  29. @Override
  30. public BaseMapper<Map<String, Object>> getRepository() {
  31. return commonMapper;
  32. }
  33. @Autowired
  34. private CommonMapper commonMapper;
  35. @Autowired
  36. private AuthUtils authUtils;
  37. /**
  38. * @desc : 获取编码/单号
  39. * @author : 周兴
  40. * @date : 2024/3/1 11:41
  41. */
  42. public Map<String, Object> getUniqueNoteCode(String docName,Boolean codeFlag) {
  43. Map<String, Object> param = new HashMap<>();
  44. param.put("docName",docName);
  45. // TODO 公司Id
  46. param.put("cpId",1);
  47. Map<String, Object> map = null;
  48. // 获取系统基础数据
  49. if(codeFlag){
  50. map = commonMapper.getUniqueCode(param);
  51. }else{
  52. map = commonMapper.getUniqueNote(param);
  53. }
  54. return map;
  55. }
  56. /**
  57. * @desc : 获取数据字典项目
  58. * @author : 王英杰
  59. * @date : 2023/1/6 11:41
  60. */
  61. public ResponseResultVO<List<Map<String, Object>>> getDictionaryItemData(Map<String, Object> param) {
  62. // 获取系统基础数据
  63. List<Map<String, Object>> list = commonMapper.getDictionaryItemData(param);
  64. return ResponseResultUtil.success(list);
  65. }
  66. /**
  67. * @desc : 刷新基础数据
  68. * @author : 周兴
  69. * @date : 2023/5/11 10:19
  70. */
  71. public ResponseResultVO refreshBasicData(Map<String, Object> param) {
  72. UserVO user = authUtils.getUser();
  73. if (param.get("appCode") != null) {
  74. user.setAppCode(param.get("appCode").toString());
  75. }
  76. Map userMap = new HashMap();
  77. userMap.put("userId", user.getUserId());
  78. userMap.put("appCode", user.getAppCode());
  79. return ResponseResultUtil.success(new HashMap<String, Object>(3) {{
  80. put("menu", commonMapper.getMenuByUser(user.getAppCode(), user.getUserId()));
  81. put("function", (user.getRoleIds() != null && user.getRoleIds().indexOf(-1) >= 0)
  82. ? commonMapper.getUserFunctionAdmin(userMap) : commonMapper.getUserFunction(userMap));
  83. put("userTableSetting", commonMapper.getUserTableInfo(userMap));
  84. }});
  85. }
  86. /**
  87. * @desc : 获取序号最大值
  88. * @author : 周兴
  89. * @date : 2023/1/6 11:41t_user_right
  90. */
  91. public ResponseResultVO<Integer> getMaxDisplayNo(Map<String, Object> param) {
  92. // 获取系统基础数据
  93. Integer maxDisplayNo = commonMapper.getMaxDisplayNo(param);
  94. maxDisplayNo = maxDisplayNo == null ? 1 : (maxDisplayNo + 1);
  95. return ResponseResultUtil.success(maxDisplayNo);
  96. }
  97. /**
  98. * @desc : 获取系统表数据种类
  99. * @author : 周兴
  100. * @date : 2023/1/6 11:41
  101. */
  102. public ResponseResultVO<List<Map<String, Object>>> getDataKind(Map<String, Object> param) {
  103. // 获取系统基础数据
  104. List<Map<String, Object>> list = commonMapper.getDataKind(param);
  105. return ResponseResultUtil.success(list);
  106. }
  107. /**
  108. * @desc : 获取型号分类
  109. * @author : 周兴
  110. * @date : 2023/1/6 11:41
  111. */
  112. public ResponseResultVO<List<Map<String, Object>>> getModelCategory(Map<String, Object> param) {
  113. // 获取系统基础数据
  114. List<Map<String, Object>> list = commonMapper.getModelCategory(param);
  115. return ResponseResultUtil.success(list);
  116. }
  117. /**
  118. * @desc : 获取型号分类分类
  119. * @author : 洪旭东
  120. * @date : 2023-03-28 16:11
  121. */
  122. public ResponseResultVO<PageList<Map<String, Object>>> getModelCategoryByPage(Map<String, Object> param) {
  123. this.getLimit(param);
  124. return super.mergeListWithCount(param, commonMapper.getModelCategory(param),
  125. commonMapper.countModelCategory(param));
  126. }
  127. /**
  128. * @desc : 获取工种
  129. * @author : 姜宁
  130. * @date : 2023/1/9 13:22
  131. */
  132. public ResponseResultVO<List<Map<String, Object>>> getJob(Map<String, Object> param) {
  133. // 获取系统基础数据
  134. List<Map<String, Object>> list = commonMapper.getJob(param);
  135. return ResponseResultUtil.success(list);
  136. }
  137. /**
  138. * @desc : 获取职务
  139. * @author : 姜宁
  140. * @date : 2023/1/9 13:43
  141. */
  142. public ResponseResultVO<List<Map<String, Object>>> getPost(Map<String, Object> param) {
  143. // 获取系统基础数据
  144. List<Map<String, Object>> list = commonMapper.getPost(param);
  145. return ResponseResultUtil.success(list);
  146. }
  147. /**
  148. * @desc : 获取组织部门
  149. * @author : 姜宁
  150. * @date : 2023/1/9 13:50
  151. */
  152. public ResponseResultVO<List<Map<String, Object>>> getOrg(Map<String, Object> param) {
  153. // 获取系统基础数据
  154. List<Map<String, Object>> list = commonMapper.getOrg(param);
  155. return ResponseResultUtil.success(list);
  156. }
  157. /**
  158. * @desc : 获取部门
  159. * @author : 姜宁
  160. * @date : 2023/1/29 17:01
  161. */
  162. public ResponseResultVO<PageList<Map<String, Object>>> getOrgByPage(Map<String, Object> param) {
  163. // 校验分页参数
  164. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  165. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  166. }
  167. // 分页参数赋值
  168. param = this.getLimit(param);
  169. return super.mergeListWithCount(param, commonMapper.getOrg(param),
  170. commonMapper.getOrgCountByPage(param));
  171. }
  172. /**
  173. * @desc : 获取商品品牌
  174. * @author : 夏常明
  175. * @date : 2023/1/10 14:24
  176. */
  177. public ResponseResultVO<List<Map<String, Object>>> getBrand(Map<String, Object> param) {
  178. // 获取系统基础数据
  179. List<Map<String, Object>> list = commonMapper.getBrand(param);
  180. return ResponseResultUtil.success(list);
  181. }
  182. /**
  183. * @desc : 获取缺陷分类
  184. * @author : 夏常明
  185. * @date : 2023/1/12 9:09
  186. */
  187. public ResponseResultVO<List<Map<String, Object>>> getDefectType(Map<String, Object> param) {
  188. // 获取系统基础数据
  189. List<Map<String, Object>> list = commonMapper.getDefectType(param);
  190. return ResponseResultUtil.success(list);
  191. }
  192. /**
  193. * @desc : 获取角色
  194. * @author : 姜宁
  195. * @date : 2023/1/29 14:28
  196. */
  197. public ResponseResultVO<List<Map<String, Object>>> getRole(Map<String, Object> param) {
  198. // 获取系统基础数据
  199. List<Map<String, Object>> list = commonMapper.getRole(param);
  200. return ResponseResultUtil.success(list);
  201. }
  202. /**
  203. * @desc : 获取员工信息
  204. * @author : 周兴
  205. * @date : 2023/2/2 13:11
  206. */
  207. public ResponseResultVO<List<Map<String, Object>>> getStaff(Map<String, Object> param) {
  208. // 获取员工
  209. List<Map<String, Object>> list = commonMapper.getStaffByPage(param);
  210. return ResponseResultUtil.success(list);
  211. }
  212. /**
  213. * @desc : 获取员工
  214. * @author : 姜宁
  215. * @date : 2023/1/29 17:01
  216. */
  217. public ResponseResultVO<PageList<Map<String, Object>>> getStaffByPage(Map<String, Object> param) {
  218. // 校验分页参数
  219. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  220. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  221. }
  222. // 分页参数赋值
  223. param = this.getLimit(param);
  224. return super.mergeListWithCount(param, commonMapper.getStaffByPage(param),
  225. commonMapper.getStaffCountByPage(param));
  226. }
  227. /**
  228. * @desc : 查询系统参数
  229. * @author : 周兴
  230. * @date : 2023/1/29 17:04
  231. */
  232. public ResponseResultVO getSettingValue(Map<String, Object> param) {
  233. if (param.get("code").getClass().getName() == "java.util.ArrayList") {
  234. param.put("codes", param.get("code"));
  235. // 如果是数组,那么调用多个的查询
  236. Map<String, Map<String, String>> settingMap = commonMapper.getSettingValues(param);
  237. // 定义返回值
  238. JSONObject object = JSONObject.parseObject(((PGobject) settingMap.get("f_get_setting_values")).getValue());
  239. return ResponseResultUtil.success(object);
  240. } else {
  241. // 单个
  242. String setting = commonMapper.getSettingValue(param);
  243. // 定义返回值
  244. return ResponseResultUtil.success(setting);
  245. }
  246. }
  247. /**
  248. * @desc : 获取工厂区域
  249. * @author : 常皓宁
  250. * @date : 2023/1/30 11:33
  251. */
  252. public ResponseResultVO<List<Map<String, Object>>> getFactorySpace(Map<String, Object> param) {
  253. // 获取工厂区域
  254. List<Map<String, Object>> list = commonMapper.getFactorySpace(param);
  255. return ResponseResultUtil.success(list);
  256. }
  257. /**
  258. * @desc : 查询系统参数分类
  259. * @author : 夏常明
  260. * @date : 2023/1/30 16:05
  261. */
  262. public ResponseResultVO<List<Map<String, Object>>> getSettingKind(Map<String, Object> param) {
  263. // 获取系统基础数据
  264. List<Map<String, Object>> list = commonMapper.getSettingKind(param);
  265. return ResponseResultUtil.success(list);
  266. }
  267. /**
  268. * @desc : 设置分页参数
  269. * @author : 姜宁
  270. * @date : 2023/2/1 14:00
  271. */
  272. private Map<String, Object> getLimit(Map<String, Object> param) {
  273. if (param.get("limit") != null) {
  274. param.put("currentPage", 1);
  275. param.put("pageSize", param.get("limit"));
  276. }
  277. param.put("start", ((int) param.get("currentPage") - 1) * (int) param.get("pageSize"));
  278. param.put("end", param.get("pageSize"));
  279. return param;
  280. }
  281. /**
  282. * @desc : 获取组织部门
  283. * @author : 姜宁
  284. * @date : 2023/2/1 14:09
  285. */
  286. public ResponseResultVO<PageList<Map<String, Object>>> getOrganizationByPage(Map<String, Object> param) {
  287. // 校验分页参数
  288. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  289. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  290. }
  291. // 分页参数赋值
  292. param = this.getLimit(param);
  293. return super.mergeListWithCount(param, commonMapper.getOrganizationByPage(param),
  294. commonMapper.getOrganizationCountByPage(param));
  295. }
  296. /**
  297. * @desc : 获取窑炉
  298. * @author : 常皓宁
  299. * @date : 2023/2/1 16:21
  300. */
  301. public ResponseResultVO<List<Map<String, Object>>> getKiln(Map<String, Object> param) {
  302. // 获取窑炉
  303. List<Map<String, Object>> list = commonMapper.getKiln(param);
  304. return ResponseResultUtil.success(list);
  305. }
  306. /**
  307. * @desc : 获取窑炉分页
  308. * @author : 洪旭东
  309. * @date : 2023-03-07 09:34
  310. */
  311. public ResponseResultVO<PageList<Map<String, Object>>> getKilnByPage(Map<String, Object> param) {
  312. // 校验分页参数
  313. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  314. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  315. }
  316. // 分页参数赋值
  317. this.getLimit(param);
  318. return super.mergeListWithCount(param, commonMapper.getKiln(param),
  319. commonMapper.countKiln(param));
  320. }
  321. /**
  322. * @desc : 查询模具型号
  323. * @author : 洪旭东
  324. * @date : 2023-02-03 10:35
  325. */
  326. public ResponseResultVO<List<Map<String, Object>>> getModelMould(Map<String, Object> param) {
  327. // 查询模具型号
  328. List<Map<String, Object>> list = commonMapper.getModelMould(param);
  329. return ResponseResultUtil.success(list);
  330. }
  331. /**
  332. * @desc : 获取窑车位置
  333. * @author : 常皓宁
  334. * @date : 2023/2/2 13:08
  335. */
  336. public ResponseResultVO<List<Map<String, Object>>> getKilnCarPlace(Map<String, Object> param) {
  337. // 获取窑车位置
  338. List<Map<String, Object>> list = commonMapper.getKilnCarPlace(param);
  339. return ResponseResultUtil.success(list);
  340. }
  341. /**
  342. * @desc : 获取用户
  343. * @author : 洪旭东
  344. * @date : 2023-02-03 11:45
  345. */
  346. public ResponseResultVO<PageList<Map<String, Object>>> getUserByPage(Map<String, Object> param) {
  347. this.getLimit(param);
  348. return super.mergeListWithCount(param, commonMapper.getUser(param),
  349. commonMapper.countUser(param));
  350. }
  351. /**
  352. * @desc : 获取产品视图
  353. * @author : 夏常明
  354. * @date : 2023/2/3 9:44
  355. */
  356. public ResponseResultVO<List<Map<String, Object>>> getProductView(Map<String, Object> param) {
  357. // 获取产品视图
  358. List<Map<String, Object>> list = commonMapper.getProductView(param);
  359. return ResponseResultUtil.success(list);
  360. }
  361. /**
  362. * @desc : 获取产品商标
  363. * @author : 夏常明
  364. * @date : 2023/2/3 10:23
  365. */
  366. public ResponseResultVO<List<Map<String, Object>>> getProductLogo(Map<String, Object> param) {
  367. // 获取产品商标
  368. List<Map<String, Object>> list = commonMapper.getProductLogo(param);
  369. return ResponseResultUtil.success(list);
  370. }
  371. /**
  372. * @desc : 获取产品釉色
  373. * @author : 夏常明
  374. * @date : 2023/2/3 13:14
  375. */
  376. public ResponseResultVO<List<Map<String, Object>>> getProductColour(Map<String, Object> param) {
  377. // 获取产品商标
  378. List<Map<String, Object>> list = commonMapper.getProductColour(param);
  379. return ResponseResultUtil.success(list);
  380. }
  381. /**
  382. * @desc : 查询产品ERP物料
  383. * @author : 洪旭东
  384. * @date : 2023-05-12 13:48
  385. */
  386. public ResponseResultVO<List<Map<String, Object>>> getProductErpSku(Map<String, Object> param) {
  387. List<Map<String, Object>> list = commonMapper.getProductErpSku(param);
  388. return ResponseResultUtil.success(list);
  389. }
  390. /**
  391. * @desc : 获取模具档案
  392. * @author : 洪旭东
  393. * @date : 2023-02-07 13:05
  394. */
  395. public ResponseResultVO<PageList<Map<String, Object>>> getMouldByPage(Map<String, Object> param) {
  396. this.getLimit(param);
  397. return super.mergeListWithCount(param, commonMapper.getMould(param),
  398. commonMapper.countMould(param));
  399. }
  400. /**
  401. * @desc : 获取数据字典
  402. * @author : 姜宁
  403. * @date : 2023/2/7 14:47
  404. */
  405. public ResponseResultVO<List<Map<String, Object>>> getDictionaryData(Map<String, Object> param) {
  406. // 获取数据字典
  407. List<Map<String, Object>> list = commonMapper.getDictionaryData(param);
  408. return ResponseResultUtil.success(list);
  409. }
  410. /**
  411. * @desc : 获取最大窑车序号
  412. * @author : 常皓宁
  413. * @date : 2023/2/7 14:36
  414. */
  415. public ResponseResultVO<Integer> getMaxCarNo(Map<String, Object> param) {
  416. // 获取系统基础数据
  417. Integer maxCarNo = commonMapper.getMaxCarNo(param);
  418. maxCarNo = maxCarNo == null ? 1 : (maxCarNo + 1);
  419. return ResponseResultUtil.success(maxCarNo);
  420. }
  421. /**
  422. * @desc : 获取产品位置
  423. * @date : 2023/2/8 14:22
  424. * @author : 寇珊珊
  425. */
  426. public ResponseResultVO<List<Map<String, Object>>> getProductPlace(Map<String, Object> param) {
  427. List<Map<String, Object>> list = commonMapper.getProductPlace(param);
  428. return ResponseResultUtil.success(list);
  429. }
  430. /**
  431. * @desc : 获取模具型号
  432. * @author : 姜宁
  433. * @date : 2023/2/8 15:43
  434. */
  435. public ResponseResultVO<PageList<Map<String, Object>>> getModelMouldByPage(Map<String, Object> param) {
  436. // 校验分页参数
  437. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  438. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  439. }
  440. // 分页参数赋值
  441. param = this.getLimit(param);
  442. return super.mergeListWithCount(param, commonMapper.getModelMouldByPage(param),
  443. commonMapper.getModelMouldCountByPage(param));
  444. }
  445. /**
  446. * @desc : 获取产品型号数量
  447. * @author : 洪旭东
  448. * @date : 2023-02-08 11:21
  449. */
  450. public ResponseResultVO<PageList<Map<String, Object>>> getModelProduct(Map<String, Object> param) {
  451. this.getLimit(param);
  452. return super.mergeListWithCount(param, commonMapper.getModelProduct(param),
  453. commonMapper.countModelProduct(param));
  454. }
  455. /**
  456. * @desc : 获取获取载具型号
  457. * @author : 常皓宁
  458. * @date : 2023/2/7 14:36
  459. */
  460. public ResponseResultVO<List<Map<String, Object>>> getModelCarrier(Map<String, Object> param) {
  461. // 获取获取载具型号
  462. List<Map<String, Object>> list = commonMapper.getModelCarrier(param);
  463. return ResponseResultUtil.success(list);
  464. }
  465. /**
  466. * @desc : 获取获取设备型号
  467. * @author : 常皓宁
  468. * @date : 2023/2/7 14:36
  469. */
  470. public ResponseResultVO<List<Map<String, Object>>> getModelEquipment(Map<String, Object> param) {
  471. // 获取获取载具型号
  472. List<Map<String, Object>> list = commonMapper.getModelEquipment(param);
  473. return ResponseResultUtil.success(list);
  474. }
  475. /**
  476. * @desc : 根据模具型号id 查询模具产出型号和可变更产品型号
  477. * @author : 夏常明
  478. * @date : 2023/2/9 10:09
  479. */
  480. public ResponseResultVO<List<Map<String, Object>>> getMouldOutputById(Map<String, Object> param) {
  481. //模具产出型号
  482. List<Map<String, Object>> MouldOutputList = commonMapper.getMouldOutputById(param);
  483. // 返回的staffList需要重新赋值
  484. if (!CollectionUtils.isEmpty(MouldOutputList)) {
  485. for (Map<String, Object> stringObjectMap : MouldOutputList) {
  486. if (stringObjectMap.get("modelProductList") != null) {
  487. String labelString = ((PGobject) stringObjectMap.get("modelProductList")).getValue();
  488. JSONArray object = JSONArray.parseArray(labelString);
  489. stringObjectMap.replace("modelProductList", object);
  490. }
  491. }
  492. }
  493. return ResponseResultUtil.success(MouldOutputList);
  494. }
  495. /**
  496. * @desc : 根据模具型号id 查询模具产出型号和可变更产品型号
  497. * @author : 夏常明
  498. * @date : 2023/2/9 10:09
  499. */
  500. public ResponseResultVO<List<Map<String, Object>>> getModelPdt(Map<String, Object> param) {
  501. //模具产出型号
  502. List<Map<String, Object>> ModelPdtList = commonMapper.getModelPdt(param);
  503. return ResponseResultUtil.success(ModelPdtList);
  504. }
  505. /**
  506. * @desc : 查询产品缺陷扣罚数据
  507. * @author : 夏常明
  508. * @date : 2023/2/10 11:46
  509. */
  510. public ResponseResultVO<List<Map<String, Object>>> getDefectFines(Map<String, Object> param) {
  511. // 查询产品缺陷扣罚数据
  512. List<Map<String, Object>> list = commonMapper.getDefectFines(param);
  513. return ResponseResultUtil.success(list);
  514. }
  515. /**
  516. * @desc : 查询打印模板分类
  517. * @author : 常皓宁
  518. * @date : 2023/2/14 14:35
  519. */
  520. public ResponseResultVO<List<Map<String, Object>>> getLabelPrintType(Map<String, Object> param) {
  521. // 查询产品缺陷扣罚数据
  522. List<Map<String, Object>> list = commonMapper.getLabelPrintType(param);
  523. return ResponseResultUtil.success(list);
  524. }
  525. /**
  526. * @desc : 获取成型线分组
  527. * @author : 洪旭东
  528. * @date : 2023-02-15 13:34
  529. */
  530. public ResponseResultVO<PageList<Map<String, Object>>> getMoldlineGroupByPage(Map<String, Object> param) {
  531. this.getLimit(param);
  532. return super.mergeListWithCount(param, commonMapper.getMoldlineGroup(param),
  533. commonMapper.countMoldlineGroup(param));
  534. }
  535. /**
  536. * @desc : 查询工位
  537. * @author : 夏常明
  538. * @date : 2023/2/15 14:44
  539. */
  540. public ResponseResultVO<List<Map<String, Object>>> getWorkStation(Map<String, Object> param) {
  541. // 查询工位
  542. List<Map<String, Object>> list = commonMapper.getWorkStation(param);
  543. return ResponseResultUtil.success(list);
  544. }
  545. /**
  546. * @desc : 查询工位 分页
  547. * @author : 洪旭东
  548. * @date : 2023-03-01 14:45
  549. */
  550. public ResponseResultVO<PageList<Map<String, Object>>> getWorkStationByPage(Map<String, Object> param) {
  551. this.getLimit(param);
  552. return super.mergeListWithCount(param, commonMapper.getWorkStation(param),
  553. commonMapper.countWorkStation(param));
  554. }
  555. /**
  556. * @desc : 获取工艺节点
  557. * @author : 常皓宁
  558. * @date : 2023/2/15 16:12
  559. */
  560. public ResponseResultVO<PageList<Map<String, Object>>> getProcessNodeByPage(Map<String, Object> param) {
  561. // 校验分页参数
  562. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  563. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  564. }
  565. // 分页参数赋值
  566. param = this.getLimit(param);
  567. return super.mergeListWithCount(param, commonMapper.getProcessNodeByPage(param),
  568. commonMapper.getProcessNodeCountByPage(param));
  569. }
  570. /**
  571. * @desc : 获取工号
  572. * @author : 常皓宁
  573. * @date : 2023/2/17 15:41
  574. */
  575. public ResponseResultVO<List<Map<String, Object>>> getWorkStationUser(Map<String, Object> param) {
  576. // 查询工位
  577. List<Map<String, Object>> list = commonMapper.getWorkStationUser(param);
  578. return ResponseResultUtil.success(list);
  579. }
  580. /**
  581. * @desc : 获取工号(分页)
  582. * @author : 周兴
  583. * @date : 2023/2/20 10:39
  584. */
  585. public ResponseResultVO<PageList<Map<String, Object>>> getWorkStationUserPage(Map<String, Object> param) {
  586. // 校验分页参数
  587. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  588. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  589. }
  590. // 分页参数赋值
  591. param = this.getLimit(param);
  592. return super.mergeListWithCount(param, commonMapper.getWorkStationUser(param),
  593. commonMapper.getWorkStationUserCount(param));
  594. }
  595. /**
  596. * @desc : 根据成型线Id获取成型记录信息
  597. * @author : 周兴
  598. * @date : 2023/2/18 19:47
  599. */
  600. public ResponseResultVO<List<Map<String, Object>>> getMoldingItemByMoldlineId(Map<String, Object> param) {
  601. // 查询成型记录信息
  602. List<Map<String, Object>> list = commonMapper.getMoldingItemByMoldlineId(param);
  603. return ResponseResultUtil.success(list);
  604. }
  605. /**
  606. * @desc : 产品信息(条码变更)
  607. * @author : 夏常明
  608. * @date : 2023/2/20 10:39
  609. */
  610. public ResponseResultVO<PageList<Map<String, Object>>> getProductForChange(Map<String, Object> param) {
  611. // 校验分页参数
  612. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  613. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  614. }
  615. // 分页参数赋值
  616. param = this.getLimit(param);
  617. return super.mergeListWithCount(param, commonMapper.getProductForChange(param),
  618. commonMapper.getProductForChangeCount(param));
  619. }
  620. /**
  621. * @desc : 查询损坯原因/产品缺陷/未成型原因
  622. * @author : 周兴
  623. * @date : 2023/2/18 19:47
  624. */
  625. public ResponseResultVO<List<Map<String, Object>>> getProductDefect(Map<String, Object> param) {
  626. // 查询损坯原因/产品缺陷/未成型原因
  627. List<Map<String, Object>> list = commonMapper.getProductDefect(param);
  628. return ResponseResultUtil.success(list);
  629. }
  630. /**
  631. * @desc : 产品信息(条码变更)
  632. * @author : 夏常明
  633. * @date : 2023/2/20 10:39
  634. */
  635. public ResponseResultVO<PageList<Map<String, Object>>> getColourForSet(Map<String, Object> param) {
  636. // 校验分页参数
  637. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  638. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  639. }
  640. // 分页参数赋值
  641. param = this.getLimit(param);
  642. return super.mergeListWithCount(param, commonMapper.getColourForSet(param),
  643. commonMapper.getColourForSetCount(param));
  644. }
  645. /**
  646. * @desc : 产品信息(商标釉色)
  647. * @author : 夏常明
  648. * @date : 2023/2/20 10:39
  649. */
  650. public ResponseResultVO<PageList<Map<String, Object>>> getLogoForSet(Map<String, Object> param) {
  651. // 校验分页参数
  652. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  653. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  654. }
  655. // 分页参数赋值
  656. param = this.getLimit(param);
  657. return super.mergeListWithCount(param, commonMapper.getLogoForSet(param),
  658. commonMapper.getColourForSetCount(param));
  659. }
  660. /**
  661. * @desc : 查询成型产品型号
  662. * @author : 洪旭东
  663. * @date : 2023-04-19 13:00
  664. */
  665. public ResponseResultVO<PageList<Map<String, Object>>> getProductModel(Map<String, Object> param) {
  666. // 校验分页参数
  667. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  668. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  669. }
  670. // 分页参数赋值
  671. this.getLimit(param);
  672. return super.mergeListWithCount(param, commonMapper.getProductModel(param),
  673. commonMapper.getColourForSetCount(param));
  674. }
  675. /**
  676. * @desc : 根据工号编码值等查询工号
  677. * @date : 2023/2/21 16:46
  678. * @author : 寇珊珊
  679. */
  680. public ResponseResultVO<List<Map<String, Object>>> getUserByCode(Map<String, Object> param) {
  681. List<Map<String, Object>> list = commonMapper.getUserByCode(param);
  682. return ResponseResultUtil.success(list);
  683. }
  684. /**
  685. * @desc : 根据工号编码值等查询工号分页
  686. * @date : 2023/2/21 16:46
  687. * @author : 寇珊珊
  688. */
  689. public ResponseResultVO<PageList<Map<String, Object>>> getUserByCodePage(Map<String, Object> param) {
  690. // 校验分页参数
  691. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  692. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  693. }
  694. // 分页参数赋值
  695. param = this.getLimit(param);
  696. param.put("userType", Constant.IntegerConstant.USER_TYPE_WORK_TEAM.getValue());
  697. return super.mergeListWithCount(param, commonMapper.getUserByCode(param),
  698. commonMapper.getUserByCodeCount(param));
  699. }
  700. /**
  701. * @desc : 获取工艺节点
  702. * @author : 常皓宁
  703. * @date : 2023/2/15 16:12
  704. */
  705. public ResponseResultVO<List<Map<String, Object>>> getProcessNode(Map<String, Object> param) {
  706. // 查询工艺节点数据
  707. List<Map<String, Object>> list = commonMapper.getProcessNode(param);
  708. return ResponseResultUtil.success(list);
  709. }
  710. /**
  711. * @desc : 产品信息(条码变更)
  712. * @author : 夏常明
  713. * @date : 2023/2/20 10:39
  714. */
  715. public ResponseResultVO<PageList<Map<String, Object>>> getMoldLinePage(Map<String, Object> param) {
  716. // 校验分页参数
  717. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  718. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  719. }
  720. // 分页参数赋值
  721. param = this.getLimit(param);
  722. return super.mergeListWithCount(param, commonMapper.getMoldLinePage(param),
  723. commonMapper.getMoldLinePageCount(param));
  724. }
  725. /**
  726. * @desc : 工位工号(工位打卡选择工位)
  727. * @author : 夏常明
  728. * @date : 2023/2/27 14:52
  729. */
  730. public ResponseResultVO<List<Map<String, Object>>> getWsStation(Map<String, Object> param) {
  731. // 查询工艺节点数据
  732. List<Map<String, Object>> list = commonMapper.getWsStation(param);
  733. return ResponseResultUtil.success(list);
  734. }
  735. /**
  736. * @desc : 根据用户Id获取班组信息
  737. * @author : 周兴
  738. * @date : 2023/2/27 14:52
  739. */
  740. public ResponseResultVO<List<Map<String, Object>>> getWorkTeamByUserId(Map<String, Object> param) {
  741. List<Map<String, Object>> list = commonMapper.getWorkTeamByUserId(param);
  742. return ResponseResultUtil.success(list);
  743. }
  744. /**
  745. * @desc : 查询产品分级 分页
  746. * @author : 洪旭东
  747. * @date : 2023-03-03 09:17
  748. */
  749. public ResponseResultVO<PageList<Map<String, Object>>> getProductGradeByPage(Map<String, Object> param) {
  750. this.getLimit(param);
  751. return super.mergeListWithCount(param, commonMapper.getProductGrade(param),
  752. commonMapper.countProductGrade(param));
  753. }
  754. /**
  755. * @desc : 查询产品分级
  756. * @author : 洪旭东
  757. * @date : 2023-03-03 09:17
  758. */
  759. public ResponseResultVO<List<Map<String, Object>>> getProductGrade(Map<String, Object> param) {
  760. return ResponseResultUtil.success(commonMapper.getProductGrade(param));
  761. }
  762. /**
  763. * @desc : 查询工艺流程(分页)
  764. * @author : 夏常明
  765. * @date : 2023/3/3 14:05
  766. */
  767. public ResponseResultVO<PageList<Map<String, Object>>> getProcessFlow(Map<String, Object> param) {
  768. // 校验分页参数
  769. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  770. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  771. }
  772. // 分页参数赋值
  773. param = this.getLimit(param);
  774. return super.mergeListWithCount(param, commonMapper.getProcessFlow(param),
  775. commonMapper.getProcessFlowCount(param));
  776. }
  777. /**
  778. * @desc : 查询产品分类(分页)
  779. * @author : 夏常明
  780. * @date : 2023/3/3 14:05
  781. */
  782. public ResponseResultVO<PageList<Map<String, Object>>> getModelCategoryPage(Map<String, Object> param) {
  783. // 校验分页参数
  784. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  785. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  786. }
  787. // 分页参数赋值
  788. param = this.getLimit(param);
  789. return super.mergeListWithCount(param, commonMapper.getModelCategoryPage(param),
  790. commonMapper.getModelCategoryCount(param));
  791. }
  792. /**
  793. * @desc : 查询打印机
  794. * @author : 夏常明
  795. * @date : 2023/3/7 10:41
  796. */
  797. public ResponseResultVO<List<Map<String, Object>>> getLabelPrinter(Map<String, Object> param) {
  798. return ResponseResultUtil.success(commonMapper.getLabelPrinter(param));
  799. }
  800. /**
  801. * @desc : 查询打印模板
  802. * @author : 夏常明
  803. * @date : 2023/3/7 10:41
  804. */
  805. public ResponseResultVO<List<Map<String, Object>>> getLabelPrintLayout(Map<String, Object> param) {
  806. return ResponseResultUtil.success(commonMapper.getLabelPrintLayout(param));
  807. }
  808. /**
  809. * @desc : 获取用户
  810. * @author : 姜宁
  811. * @date : 2023/3/14 9:51
  812. */
  813. public ResponseResultVO<List<Map<String, Object>>> getUser(Map<String, Object> param) {
  814. return ResponseResultUtil.success(commonMapper.getUser(param));
  815. }
  816. /**
  817. * @desc : 查询工种 分页
  818. * @author : 洪旭东
  819. * @date : 2023-03-20 11:23
  820. */
  821. public ResponseResultVO<PageList<Map<String, Object>>> getJobByPage(Map<String, Object> param) {
  822. this.getLimit(param);
  823. return super.mergeListWithCount(param, commonMapper.getJob(param),
  824. commonMapper.countJob(param));
  825. }
  826. /**
  827. * @desc : 查询班组员工
  828. * @author : 洪旭东
  829. * @date : 2023-03-20 13:13
  830. */
  831. public ResponseResultVO<PageList<Map<String, Object>>> getTeamStaff(Map<String, Object> param) {
  832. return super.mergeListWithCount(param, commonMapper.getTeamStaff(param),
  833. commonMapper.countTeamStaff(param));
  834. }
  835. /**
  836. * @desc : 获取结转账务日期
  837. * @author : 姜宁
  838. * @date : 2023/3/21 9:24
  839. */
  840. public ResponseResultVO<String> getCarryoverAccountDate(Map<String, Object> param) {
  841. // 获取系统参数默认结转账务日
  842. Map<String, Object> sysParam = new HashMap<>();
  843. sysParam.put("code", Constant.StringConstant.SYS_PDM_001.getName());
  844. sysParam.put("ftyId", param.get("ftyId"));
  845. String accountDay = commonMapper.getSettingValue(sysParam);
  846. // 获取账务日开始和结束
  847. Map<String, Object> accountParam = new HashMap<>();
  848. accountParam.put("accountDay", accountDay.equals("") ? null : Integer.parseInt(accountDay));
  849. accountParam.put("month", param.get("month"));
  850. String accountDate = commonMapper.selectAccountDate(accountParam);
  851. // 获取开始日和结束日
  852. List stringDate = Arrays.asList(accountDate.split(String.valueOf(',')));
  853. if (CollectionUtils.isEmpty(stringDate) || stringDate.size() < 4) {
  854. return ResponseResultUtil.error(ResponseCodeEnum.SELECT_ACCOUNDATE_FAIL);
  855. }
  856. return ResponseResultUtil.success(accountDate);
  857. }
  858. /**
  859. * @desc : 获取工位(工位打卡选择工位)
  860. * @author : 姜宁
  861. * @date : 2023/3/30 10:38
  862. */
  863. public ResponseResultVO<List<Map<String, Object>>> getWsStationByUser(Map<String, Object> param) {
  864. List<Map<String, Object>> list = new ArrayList<>();
  865. //获取工位工号
  866. List<Map<String, Object>> list1 = commonMapper.getWsStation(param);
  867. //获取工位(工位打卡选择工位,工号未绑定工位时,获取工序工号绑定的工位)
  868. List<Map<String, Object>> list2 = commonMapper.getWsStationByNode(param);
  869. //获取工位(工位打卡选择工位,工位未绑定工序和用户)
  870. List<Map<String, Object>> list3 = commonMapper.getWsStationNoUser(param);
  871. list.addAll(list1);
  872. list.addAll(list2);
  873. list.addAll(list3);
  874. list = list.stream().distinct().collect(Collectors.toList());
  875. return ResponseResultUtil.success(list);
  876. }
  877. /**
  878. * @desc : 获取湿温度计分页
  879. * @date : 2023/4/3 10:39
  880. * @author : 寇珊珊
  881. */
  882. public ResponseResultVO<PageList<Map<String, Object>>> thmeterRecordByPage(Map<String, Object> param) {
  883. // 分页参数赋值
  884. param = this.getLimit(param);
  885. return super.mergeListWithCount(param, commonMapper.thmeterRecordByPage(param),
  886. commonMapper.getThmeterRecordByCount(param));
  887. }
  888. /**
  889. * @desc : 获取湿温度计
  890. * @date : 2023/4/3 14:29
  891. * @author : 寇珊珊
  892. */
  893. public ResponseResultVO<List<Map<String, Object>>> getThmeterRecord(Map<String, Object> param) {
  894. return ResponseResultUtil.success(commonMapper.getThmeterRecord(param));
  895. }
  896. /**
  897. * @desc : 获取用户隐藏列信息
  898. * @author : 周兴
  899. * @date : 2023/4/4 15:05
  900. */
  901. public ResponseResultVO<List<Map<String, Object>>> getUserTableInfo(Map<String, Object> param) {
  902. return ResponseResultUtil.success(commonMapper.getUserTableInfo(param));
  903. }
  904. /**
  905. * @desc : 获取用户功能
  906. * @author : 周兴
  907. * @date : 2023/4/4 15:05
  908. */
  909. public ResponseResultVO<List<Map<String, Object>>> getUserFunction(Map<String, Object> param) {
  910. return ResponseResultUtil.success(commonMapper.getUserFunction(param));
  911. }
  912. /**
  913. * @desc : 查导航菜单(自定义报表用)
  914. * @author : 周兴
  915. * @date : 2023/4/4 15:05
  916. */
  917. public ResponseResultVO<List<Map<String, Object>>> getMenuNavigation(Map<String, Object> param) {
  918. return ResponseResultUtil.success(commonMapper.getMenuNavigation(param));
  919. }
  920. /**
  921. * @desc : 查询标签打印项目
  922. * @author : 洪旭东
  923. * @date : 2023-04-12 13:24
  924. */
  925. public ResponseResultVO<List<Map<String, Object>>> getLabelPrintItem(Map<String, Object> param) {
  926. return ResponseResultUtil.success(commonMapper.getLabelPrintItem(param));
  927. }
  928. /**
  929. * @desc : 获取员工用于报工记录查询
  930. * @date : 2023/4/17 15:07
  931. * @author : 寇珊珊
  932. */
  933. public ResponseResultVO<PageList<Map<String, Object>>> getStaffWithWork(Map<String, Object> param) {
  934. // 校验分页参数
  935. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  936. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  937. }
  938. // 分页参数赋值
  939. param = this.getLimit(param);
  940. return super.mergeListWithCount(param, commonMapper.getStaffWithWorkByPage(param),
  941. commonMapper.getStaffWithWorkByCount(param));
  942. }
  943. /**
  944. * @desc : 查询标签分类的类型
  945. * @author : 洪旭东
  946. * @date : 2023-05-08 17:03
  947. */
  948. public ResponseResultVO<List<Map<String, Object>>> getLabelPrintTypeKind() {
  949. return ResponseResultUtil.success(commonMapper.getLabelPrintTypeKind(new HashMap<>()));
  950. }
  951. /**
  952. * @desc : 查询产品型号标签
  953. * @author : 洪旭东
  954. * @date : 2023-05-11 15:00
  955. */
  956. public ResponseResultVO<List<Map<String, Object>>> getModelProductLabelType() {
  957. return ResponseResultUtil.success(commonMapper.getModelProductLabelType(new HashMap<>()));
  958. }
  959. /**
  960. * @desc : 获取窑炉类型
  961. * @author : 洪旭东
  962. * @date : 2023-05-19 10:38
  963. */
  964. public ResponseResultVO<List<Map<String, Object>>> getKilnType(Map<String, Object> param) {
  965. return ResponseResultUtil.success(commonMapper.getKilnType(param));
  966. }
  967. /**
  968. * @desc : 获取成型线类型
  969. * @author : 洪旭东
  970. * @date : 2023-05-19 10:38
  971. */
  972. public ResponseResultVO<List<Map<String, Object>>> getMoldlineType(Map<String, Object> param) {
  973. return ResponseResultUtil.success(commonMapper.getMoldlineType(param));
  974. }
  975. /**
  976. * @desc : 获取物料编码
  977. * @date : 2023/5/24 14:05
  978. * @author : 寇珊珊
  979. */
  980. public ResponseResultVO<PageList<Map<String, Object>>> getModelMaterialByPage(Map<String, Object> param) {
  981. // 校验分页参数
  982. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  983. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  984. }
  985. // 分页参数赋值
  986. param = this.getLimit(param);
  987. return super.mergeListWithCount(param, commonMapper.getModelMaterialByPage(param),
  988. commonMapper.getModelMaterialCountByPage(param));
  989. }
  990. /**
  991. * @desc : 获取物料编码
  992. * @date : 2023/6/30 9:51
  993. * @author : 寇珊珊
  994. */
  995. public ResponseResultVO<List<Map<String, Object>>> getModelMaterial(Map<String, Object> param) {
  996. return ResponseResultUtil.success(commonMapper.getModelMaterial(param));
  997. }
  998. /**
  999. * @desc : 产品信息数量
  1000. * @date : 2023/5/26 13:48
  1001. * @author : 寇珊珊
  1002. */
  1003. public ResponseResultVO<List<Map<String, Object>>> getProductForChangeNoPage(Map<String, Object> param) {
  1004. return ResponseResultUtil.success(commonMapper.getProductForChangeNoPage(param));
  1005. }
  1006. /**
  1007. * @desc : 获取数据类型
  1008. * @author : 周兴
  1009. * @date : 2023/6/2 11:01
  1010. */
  1011. public ResponseResultVO<List<Map<String, Object>>> getValueKind(Map<String, Object> param) {
  1012. return ResponseResultUtil.success(commonMapper.getValueKind(param));
  1013. }
  1014. /**
  1015. * @desc : 获取计量单位
  1016. * @author : 常皓宁
  1017. * @date : 2023/6/15 8:46
  1018. */
  1019. public ResponseResultVO<List<Map<String, Object>>> getModelUnits(Map<String, Object> param) {
  1020. return ResponseResultUtil.success(commonMapper.getModelUnits(param));
  1021. }
  1022. /**
  1023. * @desc : 获取产品型号、物料型号
  1024. * @author : 常皓宁
  1025. * @date : 2023/6/15 13:37
  1026. */
  1027. public ResponseResultVO<List<Map<String, Object>>> getModelBase(Map<String, Object> param) {
  1028. return ResponseResultUtil.success(commonMapper.getModelBase(param));
  1029. }
  1030. /**
  1031. * @desc : 获取产品型号、物料型号分页
  1032. * @author : 常皓宁
  1033. * @date : 2023/6/15 13:37
  1034. */
  1035. public ResponseResultVO<PageList<Map<String, Object>>> getModelBaseByPage(Map<String, Object> param) {
  1036. this.getLimit(param);
  1037. return super.mergeListWithCount(param, commonMapper.getModelBase(param),
  1038. commonMapper.countModelBase(param));
  1039. }
  1040. /**
  1041. * @desc : 获取报工项目
  1042. * @author : 付斌
  1043. * @date : 2023/6/19 9:12
  1044. */
  1045. public ResponseResultVO<List<Map<String, Object>>> getWorkProject(Map<String, Object> param) {
  1046. // 查询工艺节点数据
  1047. List<Map<String, Object>> list = commonMapper.getWorkProject(param);
  1048. return ResponseResultUtil.success(list);
  1049. }
  1050. /**
  1051. * @desc : 获取报工项目
  1052. * @author : 付斌
  1053. * @date : 2023/6/19 9:12
  1054. */
  1055. public ResponseResultVO<PageList<Map<String, Object>>> getWorkProjectByPage(Map<String, Object> param) {
  1056. // 校验分页参数
  1057. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  1058. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  1059. }
  1060. // 分页参数赋值
  1061. param = this.getLimit(param);
  1062. return super.mergeListWithCount(param, commonMapper.getWorkProjectByPage(param),
  1063. commonMapper.getWorkProjectCountByPage(param));
  1064. }
  1065. /**
  1066. * @desc : 查询产品缺陷
  1067. * @author : 常皓宁
  1068. * @date : 2023/6/25 10:05
  1069. */
  1070. public ResponseResultVO<PageList<Map<String, Object>>> getProductDefectsByPage(Map<String, Object> param) {
  1071. this.getLimit(param);
  1072. return super.mergeListWithCount(param, commonMapper.getProductDefects(param),
  1073. commonMapper.countProductDefects(param));
  1074. }
  1075. /**
  1076. * @desc : 查询产品缺陷
  1077. * @author : 常皓宁
  1078. * @date : 2023/6/25 10:05
  1079. */
  1080. public ResponseResultVO<List<Map<String, Object>>> getProductDefects(Map<String, Object> param) {
  1081. return ResponseResultUtil.success(commonMapper.getProductDefects(param));
  1082. }
  1083. /**
  1084. * @desc : 获取应用
  1085. * @author : 洪旭东
  1086. * @date : 2023-06-30 14:56
  1087. */
  1088. public ResponseResultVO<List<Map<String, String>>> getApplication() {
  1089. return ResponseResultUtil.success(commonMapper.getApplication());
  1090. }
  1091. /**
  1092. * @desc : 获取产品
  1093. * @date : 2023/7/14 14:44
  1094. * @author : 寇珊珊
  1095. */
  1096. public ResponseResultVO<Map<String, String>> getProduct(Map<String, Object> param) {
  1097. return ResponseResultUtil.success(commonMapper.getProduct(param));
  1098. }
  1099. /**
  1100. * @desc : 获取工位打印机
  1101. * @date : 2023/7/14 14:44
  1102. * @author : 寇珊珊
  1103. */
  1104. public ResponseResultVO<List<Map<String, String>>> getWsPrinter(Map<String, Object> param) {
  1105. return ResponseResultUtil.success(commonMapper.getWsPrinter(param));
  1106. }
  1107. /**
  1108. * @desc : 获取仓库
  1109. * @author : 洪旭东
  1110. * @date : 2023-08-09 14:31
  1111. */
  1112. public ResponseResultVO<PageList<Map<String, Object>>> getWarehouseByPage(Map<String, Object> param) {
  1113. this.getLimit(param);
  1114. return super.mergeListWithCount(param, commonMapper.getWarehouseByPage(param),
  1115. commonMapper.countWarehouseByPage(param));
  1116. }
  1117. /**
  1118. * @desc : 获取仓位
  1119. * @author : 洪旭东
  1120. * @date : 2023-08-09 14:31
  1121. */
  1122. public ResponseResultVO<PageList<Map<String, Object>>> getWarehousePlaceByPage(Map<String, Object> param) {
  1123. this.getLimit(param);
  1124. return super.mergeListWithCount(param, commonMapper.getWarehousePlaceByPage(param),
  1125. commonMapper.countWarehousePlaceByPage(param));
  1126. }
  1127. /**
  1128. * @desc : 获取单据
  1129. * @author : 周兴
  1130. * @date : 2023/9/14 11:06
  1131. */
  1132. public ResponseResultVO<List<Map<String, Object>>> getDoc(Map<String, Object> param) {
  1133. return ResponseResultUtil.success(commonMapper.getDoc(param));
  1134. }
  1135. /**
  1136. * @desc : 获取下拉选
  1137. * @author : 洪旭东
  1138. * @date : 2023-09-25 09:03
  1139. */
  1140. public ResponseResultVO<List<Map<String, Object>>> getSelectType(Map<String, Object> param) {
  1141. return ResponseResultUtil.success(commonMapper.getSelectType(param));
  1142. }
  1143. /**
  1144. * @desc : 获取放大镜
  1145. * @author : 洪旭东
  1146. * @date : 2023-09-25 09:03
  1147. */
  1148. public ResponseResultVO<List<Map<String, Object>>> getSelectMagnifier(Map<String, Object> param) {
  1149. return ResponseResultUtil.success(commonMapper.getSelectMagnifier(param));
  1150. }
  1151. /**
  1152. * @desc : 获取理化检验单
  1153. * @author : 洪旭东
  1154. * @date : 2023-12-01 16:39
  1155. */
  1156. public ResponseResultVO<PageList<Map<String, Object>>> getPhysicalCollectByPage(Map<String, Object> param) {
  1157. this.getLimit(param);
  1158. return super.mergeListWithCount(param, commonMapper.getPhysicalCollectByPage(param),
  1159. commonMapper.countPhysicalCollectByPage(param));
  1160. }
  1161. /**
  1162. * @desc : 获取生产工单
  1163. * @author : 洪旭东
  1164. * @date : 2023-12-25 10:59
  1165. */
  1166. public ResponseResultVO<PageList<Map<String, Object>>> getSheetProduceByPage(Map<String, Object> param) {
  1167. this.getLimit(param);
  1168. return super.mergeListWithCount(param, commonMapper.getSheetProduceByPage(param),
  1169. commonMapper.countSheetProduceByPage(param));
  1170. }
  1171. /**
  1172. * @desc : 获取载具型号分页查询
  1173. * @author : 姜宁
  1174. * @date : 2024/1/3 10:53
  1175. */
  1176. public ResponseResultVO<PageList<Map<String, Object>>> getModelCarrierByPage(Map<String, Object> param) {
  1177. this.getLimit(param);
  1178. return super.mergeListWithCount(param, commonMapper.getModelCarrierByPage(param),
  1179. commonMapper.countModelCarrierByPage(param));
  1180. }
  1181. /**
  1182. * @desc : 获取商品
  1183. * @author : 姜宁
  1184. * @date : 2023/1/9 13:50
  1185. */
  1186. public ResponseResultVO<List<Map<String, Object>>> getGoods(Map<String, Object> param) {
  1187. // 获取系统基础数据
  1188. List<Map<String, Object>> list = commonMapper.getGoods(param);
  1189. return ResponseResultUtil.success(list);
  1190. }
  1191. /**
  1192. * @desc : 获取商品数量
  1193. * @author : 姜宁
  1194. * @date : 2023/1/29 17:01
  1195. */
  1196. public ResponseResultVO<PageList<Map<String, Object>>> getGoodsPage(Map<String, Object> param) {
  1197. // 校验分页参数
  1198. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  1199. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  1200. }
  1201. // 分页参数赋值
  1202. param = this.getLimit(param);
  1203. return super.mergeListWithCount(param, commonMapper.getGoods(param),
  1204. commonMapper.getGoodsCountByPage(param));
  1205. }
  1206. /**
  1207. * @desc : 获取商品
  1208. * @author : 姜宁
  1209. * @date : 2023/1/9 13:50
  1210. */
  1211. public ResponseResultVO<List<Map<String, Object>>> getCustomer(Map<String, Object> param) {
  1212. // 获取系统基础数据
  1213. List<Map<String, Object>> list = commonMapper.getCustomer(param);
  1214. return ResponseResultUtil.success(list);
  1215. }
  1216. /**
  1217. * @desc : 获取商品数量
  1218. * @author : 姜宁
  1219. * @date : 2023/1/29 17:01
  1220. */
  1221. public ResponseResultVO<PageList<Map<String, Object>>> GetCustomerByPage(Map<String, Object> param) {
  1222. // 校验分页参数
  1223. if (param.get("pageSize") == null || param.get("currentPage") == null) {
  1224. return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL, "请检查分页参数!");
  1225. }
  1226. // 分页参数赋值
  1227. param = this.getLimit(param);
  1228. return super.mergeListWithCount(param, commonMapper.getCustomer(param),
  1229. commonMapper.getCustomerCountByPage(param));
  1230. }
  1231. }