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.

708 lines
24 KiB

8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. package com.gaotao.modules.automatedWarehouse.controller;
  2. import com.gaotao.common.utils.R;
  3. import com.gaotao.modules.api.entity.IfsInventoryPart;
  4. import com.gaotao.modules.api.service.IfsApiService;
  5. import com.gaotao.modules.automatedWarehouse.entity.*;
  6. import com.gaotao.modules.automatedWarehouse.service.WcsIntegrationService;
  7. import com.gaotao.modules.automatedWarehouse.service.PalletChangeStationService;
  8. import com.gaotao.modules.automatedWarehouse.service.PalletCancelService;
  9. import com.gaotao.modules.base.entity.PalletType;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.util.StringUtils;
  12. import org.springframework.web.bind.annotation.*;
  13. import java.util.HashMap;
  14. import java.util.List;
  15. import java.util.Map;
  16. @RestController
  17. @RequestMapping("/wcsIntegration")
  18. public class WcsIntegrationController {
  19. @Autowired
  20. private WcsIntegrationService wcsIntegrationService;
  21. @Autowired
  22. private IfsApiService ifsApiService;
  23. @Autowired
  24. private PalletChangeStationService palletChangeStationService;
  25. @Autowired
  26. private PalletCancelService palletCancelService;
  27. @PostMapping(value="/getShopOrderFromIFSWithOrderNo")
  28. @ResponseBody
  29. public R getIfsInventoryPart(@RequestBody IfsInventoryPart data) throws Exception{
  30. //TODO 调用rifs接口获取列表数据
  31. List<IfsInventoryPart> rows = ifsApiService.getIfsInventoryPart(data);
  32. return R.ok().put("rows", rows);
  33. }
  34. @PostMapping(value="/palletListForPartNo")
  35. @ResponseBody
  36. public R palletListForPartNo(@RequestBody PartPalletData data) throws Exception{
  37. List<WmsLabelAndPalletData> rows = wcsIntegrationService.palletListForPartNo(data);
  38. return R.ok().put("rows", rows);
  39. }
  40. /**
  41. *
  42. * @description call栈板出来
  43. * @author 常熟吴彦祖
  44. * @date 2025/9/19 16:55
  45. * @return R
  46. */
  47. @PostMapping(value="/callPalletFromWcs")
  48. @ResponseBody
  49. public R callPalletFromWcs(@RequestBody List<WmsLabelAndPalletData> data) {
  50. wcsIntegrationService.callPalletFromWcs(data);
  51. return R.ok();
  52. }
  53. /**
  54. * 新方法直接Call栈板不使用定时任务方式 - rqrq
  55. * @Description 实时调用WCS接口返回失败的栈板信息 - rqrq
  56. * @Title callPalletFromWcsNew
  57. * @param data 栈板明细列表
  58. * @return R
  59. * @author rqrq
  60. * @date 2025/10/04
  61. */
  62. @PostMapping(value="/callPalletFromWcsNew")
  63. @ResponseBody
  64. public R callPalletFromWcsNew(@RequestBody List<WmsLabelAndPalletData> data) throws Exception {
  65. Map<String, Object> result = wcsIntegrationService.callPalletFromWcsNew(data);
  66. return R.ok()
  67. .put("totalCount", result.get("totalCount"))
  68. .put("successCount", result.get("successCount"))
  69. .put("failedCount", result.get("failedCount"))
  70. .put("failedPalletIds", result.get("failedPalletIds"))
  71. .put("failedReasons", result.get("failedReasons"));
  72. }
  73. // ==================== 打托相关接口 - AI制作 ====================
  74. /**
  75. * 检查栈板是否存在并获取位置信息 - AI制作
  76. */
  77. @PostMapping(value="/checkPalletExists")
  78. @ResponseBody
  79. public R checkPalletExists(@RequestBody Map<String, Object> params) {
  80. Map<String, Object> result = wcsIntegrationService.checkPalletExists(params);
  81. return R.ok()
  82. .put("positions", result.get("positions"))
  83. .put("palletType", result.get("palletType"))
  84. .put("locationCode", result.get("locationCode"))
  85. .put("palletId", result.get("palletId"));
  86. }
  87. /**
  88. * @Description 简单查询栈板信息无任何校验- rqrq
  89. * @Title getPalletInfoSimple
  90. * @param params 查询参数site, palletId
  91. * @return R
  92. * @author rqrq
  93. * @date 2025/10/09
  94. */
  95. @PostMapping(value="/getPalletInfoSimple")
  96. public R getPalletInfoSimple(@RequestBody Map<String, Object> params) throws Exception {
  97. Map<String, Object> result = wcsIntegrationService.getPalletInfoSimple(params);
  98. return R.ok()
  99. .put("palletId", result.get("palletId"))
  100. .put("positions", result.get("positions"))
  101. .put("palletType", result.get("palletType"))
  102. .put("locationCode", result.get("locationCode"));
  103. }
  104. /**
  105. * 获取栈板明细 - AI制作
  106. */
  107. @PostMapping(value="/getPalletDetails")
  108. @ResponseBody
  109. public R getPalletDetails(@RequestBody Map<String, Object> params) {
  110. try {
  111. List<Map<String, Object>> details = wcsIntegrationService.getPalletDetails(params);
  112. return R.ok().put("details", details);
  113. } catch (Exception e) {
  114. return R.error(e.getMessage());
  115. }
  116. }
  117. /**
  118. * 根据位置获取层数 - AI制作
  119. */
  120. @PostMapping(value="/getLayersByPosition")
  121. @ResponseBody
  122. public R getLayersByPosition(@RequestBody Map<String, Object> params) {
  123. try {
  124. List<Integer> layers = wcsIntegrationService.getLayersByPosition(params);
  125. return R.ok().put("layers", layers);
  126. } catch (Exception e) {
  127. return R.error(e.getMessage());
  128. }
  129. }
  130. /**
  131. * 保存栈板明细扫进 - AI制作
  132. */
  133. @PostMapping(value="/savePalletDetail")
  134. @ResponseBody
  135. public R savePalletDetail(@RequestBody Map<String, Object> params) {
  136. try {
  137. wcsIntegrationService.savePalletDetail(params);
  138. return R.ok();
  139. } catch (Exception e) {
  140. return R.error(e.getMessage());
  141. }
  142. }
  143. /**
  144. * 删除栈板明细扫出 - AI制作
  145. */
  146. @PostMapping(value="/deletePalletDetail")
  147. @ResponseBody
  148. public R deletePalletDetail(@RequestBody Map<String, Object> params) {
  149. try {
  150. wcsIntegrationService.deletePalletDetail(params);
  151. return R.ok();
  152. } catch (Exception e) {
  153. return R.error(e.getMessage());
  154. }
  155. }
  156. /**
  157. * @Description 恢复标签到原栈板分拣撤回- rqrq
  158. * @Title restorePalletDetail
  159. * @param data 恢复标签请求参数实体
  160. * @return R
  161. * @author rqrq
  162. * @date 2025/10/09
  163. */
  164. @PostMapping(value="/restorePalletDetail")
  165. @ResponseBody
  166. public R restorePalletDetail(@RequestBody RestorePalletDetailData data) throws Exception {
  167. wcsIntegrationService.restorePalletDetail(data);
  168. return R.ok();
  169. }
  170. /**
  171. * @Description 查询标签当前所在栈板的信息 - rqrq
  172. * @Title getLabelInfo
  173. * @param data 查询标签信息请求参数实体
  174. * @return R
  175. * @author rqrq
  176. * @date 2025/10/09
  177. */
  178. @PostMapping(value="/getLabelInfo")
  179. @ResponseBody
  180. public R getLabelInfo(@RequestBody GetLabelInfoData data) throws Exception {
  181. LabelInfoResult row = wcsIntegrationService.getLabelInfo(data);
  182. return R.ok().put("row", row);
  183. }
  184. /**
  185. * 获取编辑位置时的层数选项排除指定标签 - AI制作
  186. */
  187. @PostMapping(value="/getLayersForEdit")
  188. @ResponseBody
  189. public R getLayersForEdit(@RequestBody Map<String, Object> params) {
  190. try {
  191. List<Integer> layers = wcsIntegrationService.getLayersForEdit(params);
  192. return R.ok().put("layers", layers);
  193. } catch (Exception e) {
  194. return R.error(e.getMessage());
  195. }
  196. }
  197. /**
  198. * 更新栈板明细位置 - AI制作
  199. */
  200. @PostMapping(value="/updatePalletDetailPosition")
  201. @ResponseBody
  202. public R updatePalletDetailPosition(@RequestBody Map<String, Object> params) {
  203. try {
  204. wcsIntegrationService.updatePalletDetailPosition(params);
  205. return R.ok();
  206. } catch (Exception e) {
  207. return R.error(e.getMessage());
  208. }
  209. }
  210. /**
  211. * 获取指定层数下各个位置的可用状态 - rqrq
  212. * @param params {site, palletId, layer}
  213. * @return 各位置可用状态
  214. */
  215. @PostMapping(value="/getAvailablePositionsForLayer")
  216. @ResponseBody
  217. public R getAvailablePositionsForLayer(@RequestBody Map<String, Object> params) throws Exception {
  218. Map<String, Object> result = wcsIntegrationService.getAvailablePositionsForLayer(params);
  219. return R.ok().put("data", result);
  220. }
  221. // ==================== 运输任务相关接口 - AI制作 ====================
  222. /**
  223. * 获取AGV站点列表 - AI制作
  224. */
  225. @PostMapping(value="/getAgvStations")
  226. @ResponseBody
  227. public R getAgvStations(@RequestBody Map<String, Object> params) {
  228. try {
  229. List<Map<String, Object>> stations = wcsIntegrationService.getAgvStations(params);
  230. return R.ok().put("stations", stations);
  231. } catch (Exception e) {
  232. return R.error(e.getMessage());
  233. }
  234. }
  235. /**
  236. * 获取可用的AGV站点列表已在后台过滤状态和类型- AI制作
  237. * 参数statusDb - 站点状态0-空闲1-有货不传则返回所有正式站点
  238. */
  239. @PostMapping(value="/getAvailableAgvStations")
  240. @ResponseBody
  241. public R getAvailableAgvStations(@RequestBody Map<String, Object> params) {
  242. try {
  243. List<AgvStation> stations = wcsIntegrationService.getAvailableAgvStations(params);
  244. return R.ok().put("stations", stations);
  245. } catch (Exception e) {
  246. return R.error(e.getMessage());
  247. }
  248. }
  249. /**
  250. * 根据起点站点获取可达目标站点 - AI制作
  251. */
  252. @PostMapping(value="/getTargetStations")
  253. @ResponseBody
  254. public R getTargetStations(@RequestBody Map<String, Object> params) {
  255. try {
  256. List<Map<String, Object>> targets = wcsIntegrationService.getTargetStations(params);
  257. return R.ok().put("targets", targets);
  258. } catch (Exception e) {
  259. return R.error(e.getMessage());
  260. }
  261. }
  262. /**
  263. * 创建栈板运输任务 - AI制作
  264. */
  265. @PostMapping(value="/createPalletTransportTask")
  266. @ResponseBody
  267. public R createPalletTransportTask(@RequestBody Map<String, Object> params) {
  268. try {
  269. wcsIntegrationService.createPalletTransportTask(params);
  270. return R.ok();
  271. } catch (Exception e) {
  272. return R.error(e.getMessage());
  273. }
  274. }
  275. /**
  276. * Call栈板到指定站点 - AI制作
  277. */
  278. @PostMapping(value="/callPalletToStation")
  279. @ResponseBody
  280. public R callPalletToStation(@RequestBody CallPalletRequestDto request) {
  281. wcsIntegrationService.callPalletToStation(request);
  282. return R.ok();
  283. }
  284. /**
  285. * @Description 组盘完成后调用运输任务自动判断空托盘/有货托盘- rqrq
  286. * @Title callPalletToStationWithUpdateZuPan
  287. * @param request {site, startStation, targetArea, palletId}
  288. * @return R
  289. * @author rqrq
  290. * @date 2025-10-31
  291. */
  292. @PostMapping(value="/callPalletToStationWithUpdateZuPan")
  293. @ResponseBody
  294. public R callPalletToStationWithUpdateZuPan(@RequestBody CallPalletRequestDto request) {
  295. System.out.println("开始处理组盘入库请求 - rqrq");
  296. // 参数校验 - rqrq
  297. if (!StringUtils.hasText(request.getSite()) || !StringUtils.hasText(request.getPalletId())) {
  298. return R.error("工厂编码和栈板编码不能为空");
  299. }
  300. // 判断栈板是否有明细数据 - rqrq
  301. boolean hasPalletDetail = wcsIntegrationService.checkPalletHasDetail(request.getSite(), request.getPalletId());
  302. if (hasPalletDetail) {
  303. // 有明细数据,调用组盘入库流程 - rqrq
  304. System.out.println("栈板有明细数据,执行组盘入库流程 - rqrq");
  305. wcsIntegrationService.callPalletToStationWithUpdateZuPan(request);
  306. } else {
  307. // 空托盘,调用空托盘入库流程 - rqrq
  308. System.out.println("栈板无明细数据,执行空托盘入库流程 - rqrq");
  309. Map<String, Object> params = new HashMap<>();
  310. params.put("site", request.getSite());
  311. params.put("palletId", request.getPalletId());
  312. params.put("transportFlag", "Y"); // 默认入库并运输 - rqrq
  313. params.put("count", 1);
  314. wcsIntegrationService.notifyEmptyPalletInbound(params);
  315. }
  316. return R.ok();
  317. }
  318. /**
  319. * 获取栈板详细信息包含palletType和autoSort - AI制作
  320. */
  321. @PostMapping(value="/getPalletInfo")
  322. @ResponseBody
  323. public R getPalletInfo(@RequestBody Map<String, Object> params) {
  324. try {
  325. com.gaotao.modules.warehouse.entity.PalletData palletInfo = wcsIntegrationService.getPalletInfo(params);
  326. return R.ok().put("row", palletInfo);
  327. } catch (Exception e) {
  328. return R.error(e.getMessage());
  329. }
  330. }
  331. /**
  332. * 更新栈板类型和自动分拣标志 - AI制作
  333. */
  334. @PostMapping(value="/updatePalletTypeAndAutoSort")
  335. @ResponseBody
  336. public R updatePalletTypeAndAutoSort(@RequestBody Map<String, Object> params) {
  337. try {
  338. wcsIntegrationService.updatePalletTypeAndAutoSort(params);
  339. return R.ok();
  340. } catch (Exception e) {
  341. return R.error(e.getMessage());
  342. }
  343. }
  344. /**
  345. * 完成组托不创建运输任务只推送组托数据到WCS - AI制作
  346. */
  347. @PostMapping(value="/completePalletAssembly")
  348. @ResponseBody
  349. public R completePalletAssembly(@RequestBody Map<String, Object> params) throws Exception {
  350. wcsIntegrationService.completePalletAssembly(params);
  351. return R.ok();
  352. }
  353. /**
  354. * 手工分拣组托
  355. */
  356. @PostMapping(value="/completePalletAssemblyForFenJian")
  357. @ResponseBody
  358. public R completePalletAssemblyForFenJian(@RequestBody Map<String, Object> params) throws Exception {
  359. wcsIntegrationService.completePalletAssemblyForFenJian(params);
  360. return R.ok();
  361. }
  362. // ==================== 栈板换站相关接口 - rqrq ====================
  363. /**
  364. * @Description 检查栈板是否可以换站判断calling_flag和获取当前站点信息- rqrq
  365. * @Title checkPalletForChangeStation
  366. * @param params {site, palletId}
  367. * @return R
  368. * @author rqrq
  369. * @date 2025/10/16
  370. */
  371. @PostMapping(value="/checkPalletForChangeStation")
  372. @ResponseBody
  373. public R checkPalletForChangeStation(@RequestBody Map<String, Object> params) {
  374. CheckPalletResult row = wcsIntegrationService.checkPalletForChangeStation(params);
  375. return R.ok().put("row", row);
  376. }
  377. /**
  378. * @Description 获取可选择的区域列表choose_able为Y- rqrq
  379. * @Title getAreaOptionsForChange
  380. * @param params 查询参数
  381. * @return R
  382. * @author rqrq
  383. * @date 2025/10/16
  384. */
  385. @PostMapping(value="/getAreaOptionsForChange")
  386. @ResponseBody
  387. public R getAreaOptionsForChange(@RequestBody Map<String, Object> params) {
  388. List<com.gaotao.modules.automatedWarehouse.entity.Area> rows = wcsIntegrationService.getAreaOptionsForChange(params);
  389. return R.ok().put("rows", rows);
  390. }
  391. /**
  392. * @Description 根据区域获取可用站点列表 - rqrq
  393. * @Title getStationsByArea
  394. * @param params {areaId}
  395. * @return R
  396. * @author rqrq
  397. * @date 2025/10/16
  398. */
  399. @PostMapping(value="/getStationsByArea")
  400. @ResponseBody
  401. public R getStationsByArea(@RequestBody Map<String, Object> params) {
  402. List<AgvStation> rows = wcsIntegrationService.getStationsByArea(params);
  403. return R.ok().put("rows", rows);
  404. }
  405. /**
  406. * @Description 提交栈板换站任务 - rqrq
  407. * @Title submitChangeStationTask
  408. * @param request 换站任务请求参数
  409. * @return R
  410. * @author rqrq
  411. * @date 2025/10/16
  412. */
  413. @PostMapping(value="/submitChangeStationTask")
  414. @ResponseBody
  415. public R submitChangeStationTask(@RequestBody CallPalletRequestDto request) {
  416. palletChangeStationService.handleChangeStationTask(request);
  417. return R.ok();
  418. }
  419. /**
  420. * @Description Call料到指定位置Call料+预约取盘到指定区域/站点- rqrq
  421. * @Title callOutToStation
  422. * @param request Call料到指定位置请求参数
  423. * @return R
  424. * @author rqrq
  425. * @date 2025/10/17
  426. */
  427. @PostMapping(value="/callOutToStation")
  428. @ResponseBody
  429. public R callOutToStation(@RequestBody CallOutToStationRequestDto request) {
  430. wcsIntegrationService.callOutToStation(request);
  431. return R.ok();
  432. }
  433. // ==================== 手工移动托盘相关方法 - rqrq ====================
  434. /**
  435. * @Description 检查托盘是否可以手工移动 - rqrq
  436. * @Title checkPalletForManualMove
  437. * @param params {site, palletId}
  438. * @return R
  439. * @author rqrq
  440. * @date 2025/10/16
  441. */
  442. @PostMapping(value="/checkPalletForManualMove")
  443. @ResponseBody
  444. public R checkPalletForManualMove(@RequestBody Map<String, Object> params) {
  445. CheckPalletResult row = wcsIntegrationService.checkPalletForManualMove(params);
  446. return R.ok().put("row", row);
  447. }
  448. /**
  449. * @Description 移出站点 - rqrq
  450. * @Title removeFromStation
  451. * @param params {site, palletId, stationCode}
  452. * @return R
  453. * @author rqrq
  454. * @date 2025/10/16
  455. */
  456. @PostMapping(value="/removeFromStation")
  457. @ResponseBody
  458. public R removeFromStation(@RequestBody Map<String, Object> params) {
  459. wcsIntegrationService.removeFromStation(params);
  460. return R.ok();
  461. }
  462. /**
  463. * @Description 获取可绑定的区域列表 - rqrq
  464. * @Title getAreaOptionsForBind
  465. * @param params {site}
  466. * @return R
  467. * @author rqrq
  468. * @date 2025/10/16
  469. */
  470. @PostMapping(value="/getAreaOptionsForBind")
  471. @ResponseBody
  472. public R getAreaOptionsForBind(@RequestBody Map<String, Object> params) {
  473. List<Area> rows = wcsIntegrationService.getAreaOptionsForChange(params);
  474. return R.ok().put("rows", rows);
  475. }
  476. /**
  477. * @Description 根据区域获取可绑定的站点列表 - rqrq
  478. * @Title getStationsForBind
  479. * @param params {site, areaId}
  480. * @return R
  481. * @author rqrq
  482. * @date 2025/10/16
  483. */
  484. @PostMapping(value="/getStationsForBind")
  485. @ResponseBody
  486. public R getStationsForBind(@RequestBody Map<String, Object> params) {
  487. List<AgvStation> rows = wcsIntegrationService.getStationsByArea(params);
  488. return R.ok().put("rows", rows);
  489. }
  490. /**
  491. * @Description 绑定托盘到站点 - rqrq
  492. * @Title bindPalletToStation
  493. * @param params {site, palletId, stationCode}
  494. * @return R
  495. * @author rqrq
  496. * @date 2025/10/16
  497. */
  498. @PostMapping(value="/bindPalletToStation")
  499. @ResponseBody
  500. public R bindPalletToStation(@RequestBody Map<String, Object> params) {
  501. wcsIntegrationService.bindPalletToStation(params);
  502. return R.ok();
  503. }
  504. // ==================== 空托盘组盘相关方法 - rqrq ====================
  505. /**
  506. * @Description 检查托盘是否为空托盘 - rqrq
  507. * @Title checkEmptyPallet
  508. * @param params {site, palletId}
  509. * @return R
  510. * @author rqrq
  511. * @date 2025/10/16
  512. */
  513. @PostMapping(value="/checkEmptyPallet")
  514. @ResponseBody
  515. public R checkEmptyPallet(@RequestBody Map<String, Object> params) {
  516. CheckPalletResult row = wcsIntegrationService.checkEmptyPallet(params);
  517. return R.ok().put("row", row);
  518. }
  519. /**
  520. * @Description 获取托盘类型列表根据pallet_family过滤- rqrq
  521. * @Title getPalletTypes
  522. * @param params {site, palletFamily}
  523. * @return R
  524. * @author rqrq
  525. * @date 2025/10/16
  526. */
  527. @PostMapping(value="/getPalletTypes")
  528. @ResponseBody
  529. public R getPalletTypes(@RequestBody Map<String, Object> params) {
  530. List<PalletType> rows = wcsIntegrationService.getPalletTypes(params);
  531. return R.ok().put("rows", rows);
  532. }
  533. /**
  534. * @Description 空托盘通知入库 - rqrq
  535. * @Title notifyEmptyPalletInbound
  536. * @param params {site, palletId, transportFlag}
  537. * @return R
  538. * @author rqrq
  539. * @date 2025/10/16
  540. */
  541. @PostMapping(value="/notifyEmptyPalletInbound")
  542. @ResponseBody
  543. public R notifyEmptyPalletInbound(@RequestBody Map<String, Object> params) {
  544. wcsIntegrationService.notifyEmptyPalletInbound(params);
  545. return R.ok();
  546. }
  547. /**
  548. * @Description 调用空托盘到指定站点选择区域站点栈板类型- rqrq
  549. * @Title callEmptyPalletToStation
  550. * @param params {site, stationCode, palletType}
  551. * @return R
  552. * @author rqrq
  553. * @date 2025/10/19
  554. */
  555. @PostMapping(value="/callEmptyPalletToStation")
  556. @ResponseBody
  557. public R callEmptyPalletToStation(@RequestBody Map<String, Object> params) throws Exception {
  558. wcsIntegrationService.callEmptyPalletToStation(params);
  559. return R.ok();
  560. }
  561. // ==================== 取消WCS组盘相关方法 - rqrq ====================
  562. /**
  563. * @Description 检查栈板WCS组盘状态 - rqrq
  564. * @Title checkPalletWcsStatus
  565. * @param data 请求参数实体包含site, palletId
  566. * @return R
  567. * @author rqrq
  568. * @date 2025/10/16
  569. */
  570. @PostMapping(value="/checkPalletWcsStatus")
  571. @ResponseBody
  572. public R checkPalletWcsStatus(@RequestBody CancelWcsPalletData data) throws Exception {
  573. CheckPalletResult row = wcsIntegrationService.checkPalletWcsStatus(data);
  574. return R.ok().put("row", row);
  575. }
  576. /**
  577. * @Description 取消组盘包含AGV任务检查- rqrq
  578. * @Title cancelWcsPallet
  579. * @param data 请求参数实体包含site, palletId
  580. * @return R
  581. * @author rqrq
  582. * @date 2025/10/16
  583. */
  584. @PostMapping(value="/cancelWcsPallet")
  585. @ResponseBody
  586. public R cancelWcsPallet(@RequestBody CancelWcsPalletData data) throws Exception {
  587. palletCancelService.cancelWcsPallet(data);
  588. return R.ok();
  589. }
  590. /**
  591. * @Description 移出全部物料 - rqrq
  592. * @Title removeAllPalletDetails
  593. * @param data 请求参数实体包含site, palletId
  594. * @return R
  595. * @author rqrq
  596. * @date 2025/10/16
  597. */
  598. @PostMapping(value="/removeAllPalletDetails")
  599. @ResponseBody
  600. public R removeAllPalletDetails(@RequestBody CancelWcsPalletData data) throws Exception {
  601. wcsIntegrationService.removeAllPalletDetails(data);
  602. return R.ok();
  603. }
  604. /**
  605. * @Description 结束分拣下达预约送货任务到Z104区域并更新pallet_detail的wcs_flag为1- rqrq
  606. * @Title finishSorting
  607. * @param params {site, palletId}
  608. * @return R
  609. * @author rqrq
  610. * @date 2025/10/19
  611. */
  612. @PostMapping(value="/finishSorting")
  613. @ResponseBody
  614. public R finishSorting(@RequestBody Map<String, Object> params) throws Exception {
  615. wcsIntegrationService.finishSorting(params);
  616. return R.ok();
  617. }
  618. @PostMapping(value="/finishSortingNoAgv")
  619. @ResponseBody
  620. public R finishSortingNoAgv(@RequestBody Map<String, Object> params) throws Exception {
  621. wcsIntegrationService.finishSortingNoAgv(params);
  622. return R.ok();
  623. }
  624. // ==================== 分拣明细查询相关方法 - rqrq ====================
  625. /**
  626. * @Description 根据栈板站点获取分拣明细RFID列表 - rqrq
  627. * @Title getSortingList
  628. * @param params {site, palletId}
  629. * @return R (返回devCode和rfidList)
  630. * @author rqrq
  631. * @date 2025/11/01
  632. */
  633. @PostMapping(value="/getSortingList")
  634. @ResponseBody
  635. public R getSortingList(@RequestBody Map<String, Object> params) throws Exception {
  636. Map<String, Object> result = wcsIntegrationService.getSortingList(params);
  637. return R.ok()
  638. .put("devCode", result.get("devCode"))
  639. .put("rfidList", result.get("rfidList"));
  640. }
  641. }