|
@@ -92,6 +92,9 @@ public class PdaController {
|
|
@Autowired
|
|
@Autowired
|
|
private IInvLotLocIdService invLotLocIdService;
|
|
private IInvLotLocIdService invLotLocIdService;
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /*************************************************入库-START****************************************************/
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 物料拉动通用
|
|
* 物料拉动通用
|
|
*
|
|
*
|
|
@@ -221,36 +224,39 @@ public class PdaController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 查询批次属性后台配置
|
|
|
|
|
|
+ * 入库单关闭检测
|
|
*
|
|
*
|
|
|
|
+ * @param param
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @GetMapping("/config/lotattConfig")
|
|
|
|
- public AjaxResult lotattConfigList() {
|
|
|
|
- List<LotattConfigVO> lotattConfigVOList = lotattConfigService.queryLotattConfigListActive();
|
|
|
|
- return AjaxResult.success(lotattConfigVOList);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 字典表
|
|
|
|
- *
|
|
|
|
- * @param dictType
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/base/dict")
|
|
|
|
- public AjaxResult dict(@RequestParam String dictType) {
|
|
|
|
- SysDictData query = new SysDictData();
|
|
|
|
- query.setStatus("0");
|
|
|
|
- query.setDictType(dictType);
|
|
|
|
- List<SysDictData> dictDataList = sysDictDataService.selectDictDataList(query);
|
|
|
|
- List<DictVO> result = new ArrayList<>();
|
|
|
|
- for (SysDictData dictData : dictDataList) {
|
|
|
|
- DictVO vo = new DictVO();
|
|
|
|
- vo.setLabel(dictData.getDictLabel());
|
|
|
|
- vo.setValue(dictData.getDictValue());
|
|
|
|
- result.add(vo);
|
|
|
|
|
|
+ @PostMapping("/docAsn/closeStock")
|
|
|
|
+ public AjaxResult closeStock(@RequestBody Map<String, Object> param) {
|
|
|
|
+ if (param.get("asnNo") == null) {
|
|
|
|
+ return AjaxResult.error("请输入入库单号");
|
|
|
|
+ }
|
|
|
|
+ String asnNo = param.get("asnNo").toString();
|
|
|
|
+ WmsDocAsnHeader header = wmsDocAsnHeaderService.selectWmsDocAsnHeaderByAsnNo(asnNo);
|
|
|
|
+ if (header == null) {
|
|
|
|
+ return AjaxResult.error("入库单不存在");
|
|
|
|
+ }
|
|
|
|
+ WmsDocAsnDetails query = new WmsDocAsnDetails();
|
|
|
|
+ query.setAsnNo(asnNo);
|
|
|
|
+ List<WmsDocAsnDetails> detailsList = wmsDocAsnDetailsService.selectWmsDocAsnDetailsList(query);
|
|
|
|
+ if (detailsList != null && detailsList.size() > 0) {
|
|
|
|
+ for (WmsDocAsnDetails details : detailsList) {
|
|
|
|
+ if (details.getExpectedQty().compareTo(details.getReceivedQty()) != 0) {
|
|
|
|
+ return AjaxResult.error("不满足入库条件");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (header.getEdiSendFlag() == null || header.getEdiSendFlag().equals("N")) {
|
|
|
|
+ //TODO 反馈ERP
|
|
|
|
+ return AjaxResult.error("入库单反馈成功");
|
|
|
|
+ } else {
|
|
|
|
+ return AjaxResult.success("入库单已经回传");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return AjaxResult.error("查询不到入库单明细");
|
|
}
|
|
}
|
|
- return AjaxResult.success(result);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -288,32 +294,53 @@ public class PdaController {
|
|
List<SearchStockVO> searchStockVOList = wmsDocAsnHeaderService.searchStock(palletNo, sku);
|
|
List<SearchStockVO> searchStockVOList = wmsDocAsnHeaderService.searchStock(palletNo, sku);
|
|
return AjaxResult.success("", searchStockVOList);
|
|
return AjaxResult.success("", searchStockVOList);
|
|
}
|
|
}
|
|
|
|
+ /*************************************************入库-END****************************************************/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /*************************************************出库-START****************************************************/
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 查询流程配置
|
|
|
|
|
|
+ * 物料拉动(出库)
|
|
*
|
|
*
|
|
|
|
+ * @param checkOutForm
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @GetMapping("/lineCall/flowList")
|
|
|
|
- public AjaxResult flowList() {
|
|
|
|
- PageUtils.startPage();
|
|
|
|
- List<FlowConfigHeader> list = flowConfigHeaderService.selectFlowConfigHeaderList(null);
|
|
|
|
- return AjaxResult.success(list);
|
|
|
|
|
|
+ @PostMapping("/docOrder/checkOut")
|
|
|
|
+ public AjaxResult checkOut(@RequestBody CheckOutForm checkOutForm) {
|
|
|
|
+ return wmsDocOrderHeaderService.doCheckout(checkOutForm);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 获取流程明细
|
|
|
|
|
|
+ * 分拣出库(呼叫拣货)
|
|
*
|
|
*
|
|
- * @param id
|
|
|
|
|
|
+ * @param pickForm
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @GetMapping("/lineCall/choseFlow/{id}")
|
|
|
|
- public AjaxResult choseFlow(@PathVariable("id") Long id) {
|
|
|
|
- LineCallVO lineCallVO = lineCallService.selectLineCall(id, 1L);
|
|
|
|
- if (lineCallVO == null) {
|
|
|
|
- return AjaxResult.error("查询不到对应的流程");
|
|
|
|
- }
|
|
|
|
- return AjaxResult.success(lineCallVO);
|
|
|
|
|
|
+ @PostMapping("/docOrder/toPick")
|
|
|
|
+ public AjaxResult toPick(@RequestBody PickForm pickForm) {
|
|
|
|
+ return wmsDocOrderHeaderService.toPick(pickForm);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 拣货组盘(理货备货)
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/docOrder/arrangeStock")
|
|
|
|
+ public AjaxResult arrangeStock(@RequestBody ArrangeStockForm arrangeStockForm) {
|
|
|
|
+ return wmsDocOrderHeaderService.arrangeStock(arrangeStockForm);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 出库列表
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/docOrder/checkOutList")
|
|
|
|
+ public AjaxResult checkOutList(@RequestParam String orderNos) {
|
|
|
|
+ List<String> orderList = JSONArray.parseArray(orderNos, String.class);
|
|
|
|
+ List<CheckOutVO> checkOutVOList = wmsDocOrderHeaderService.checkOutList(orderList);
|
|
|
|
+ return AjaxResult.success(checkOutVOList);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -340,27 +367,7 @@ public class PdaController {
|
|
return AjaxResult.success(pickingListVOS);
|
|
return AjaxResult.success(pickingListVOS);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 呼叫拣货
|
|
|
|
- *
|
|
|
|
- * @param pickForm
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @PostMapping("/docOrder/toPick")
|
|
|
|
- public AjaxResult toPick(@RequestBody PickForm pickForm) {
|
|
|
|
- return wmsDocOrderHeaderService.toPick(pickForm);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 拣货组盘(理货)
|
|
|
|
- *
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @PostMapping("/docOrder/arrangeStock")
|
|
|
|
- public AjaxResult arrangeStock(@RequestBody ArrangeStockForm arrangeStockForm) {
|
|
|
|
- return wmsDocOrderHeaderService.arrangeStock(arrangeStockForm);
|
|
|
|
- }
|
|
|
|
|
|
+ /*************************************************出库-END****************************************************/
|
|
|
|
|
|
/**
|
|
/**
|
|
* 初始化托盘
|
|
* 初始化托盘
|
|
@@ -372,29 +379,6 @@ public class PdaController {
|
|
return wmsBoxInfoService.addBoxInfo(addBoxForm);
|
|
return wmsBoxInfoService.addBoxInfo(addBoxForm);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 出库列表
|
|
|
|
- *
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/docOrder/checkOutList")
|
|
|
|
- public AjaxResult checkOutList(@RequestParam String orderNos) {
|
|
|
|
- List<String> orderList = JSONArray.parseArray(orderNos, String.class);
|
|
|
|
- List<CheckOutVO> checkOutVOList = wmsDocOrderHeaderService.checkOutList(orderList);
|
|
|
|
- return AjaxResult.success(checkOutVOList);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 物料拉动(出库)
|
|
|
|
- *
|
|
|
|
- * @param checkOutForm
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @PostMapping("/docOrder/checkOut")
|
|
|
|
- public AjaxResult checkOut(@RequestBody CheckOutForm checkOutForm) {
|
|
|
|
- return wmsDocOrderHeaderService.doCheckout(checkOutForm);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 修改托盘状态
|
|
* 修改托盘状态
|
|
*
|
|
*
|
|
@@ -416,36 +400,6 @@ public class PdaController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping("/docAsn/closeStock")
|
|
|
|
- public AjaxResult closeStock(@RequestBody Map<String, Object> param) {
|
|
|
|
- if (param.get("asnNo") == null) {
|
|
|
|
- return AjaxResult.error("请输入入库单号");
|
|
|
|
- }
|
|
|
|
- String asnNo = param.get("asnNo").toString();
|
|
|
|
- WmsDocAsnHeader header = wmsDocAsnHeaderService.selectWmsDocAsnHeaderByAsnNo(asnNo);
|
|
|
|
- if (header == null) {
|
|
|
|
- return AjaxResult.error("入库单不存在");
|
|
|
|
- }
|
|
|
|
- WmsDocAsnDetails query = new WmsDocAsnDetails();
|
|
|
|
- query.setAsnNo(asnNo);
|
|
|
|
- List<WmsDocAsnDetails> detailsList = wmsDocAsnDetailsService.selectWmsDocAsnDetailsList(query);
|
|
|
|
- if (detailsList != null && detailsList.size() > 0) {
|
|
|
|
- for (WmsDocAsnDetails details : detailsList) {
|
|
|
|
- if (details.getExpectedQty().compareTo(details.getReceivedQty()) != 0) {
|
|
|
|
- return AjaxResult.error("不满足入库条件");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (header.getEdiSendFlag() == null || header.getEdiSendFlag().equals("N")) {
|
|
|
|
- //TODO 反馈ERP
|
|
|
|
- return AjaxResult.error("入库单反馈成功");
|
|
|
|
- } else {
|
|
|
|
- return AjaxResult.success("入库单已经回传");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- return AjaxResult.error("查询不到入库单明细");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 按照托盘进行库存调整
|
|
* 按照托盘进行库存调整
|
|
*/
|
|
*/
|
|
@@ -461,4 +415,65 @@ public class PdaController {
|
|
}
|
|
}
|
|
return invLotLocIdService.invTransferPick(lotattDTO, new BigDecimal(invTransferPickForm.getQty()), invTransferPickForm.getPalletNoTo());
|
|
return invLotLocIdService.invTransferPick(lotattDTO, new BigDecimal(invTransferPickForm.getQty()), invTransferPickForm.getPalletNoTo());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询批次属性后台配置
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/config/lotattConfig")
|
|
|
|
+ public AjaxResult lotattConfigList() {
|
|
|
|
+ List<LotattConfigVO> lotattConfigVOList = lotattConfigService.queryLotattConfigListActive();
|
|
|
|
+ return AjaxResult.success(lotattConfigVOList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 字典表
|
|
|
|
+ *
|
|
|
|
+ * @param dictType
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/base/dict")
|
|
|
|
+ public AjaxResult dict(@RequestParam String dictType) {
|
|
|
|
+ SysDictData query = new SysDictData();
|
|
|
|
+ query.setStatus("0");
|
|
|
|
+ query.setDictType(dictType);
|
|
|
|
+ List<SysDictData> dictDataList = sysDictDataService.selectDictDataList(query);
|
|
|
|
+ List<DictVO> result = new ArrayList<>();
|
|
|
|
+ for (SysDictData dictData : dictDataList) {
|
|
|
|
+ DictVO vo = new DictVO();
|
|
|
|
+ vo.setLabel(dictData.getDictLabel());
|
|
|
|
+ vo.setValue(dictData.getDictValue());
|
|
|
|
+ result.add(vo);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(result);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询流程配置
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/lineCall/flowList")
|
|
|
|
+ public AjaxResult flowList() {
|
|
|
|
+ PageUtils.startPage();
|
|
|
|
+ List<FlowConfigHeader> list = flowConfigHeaderService.selectFlowConfigHeaderList(null);
|
|
|
|
+ return AjaxResult.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 获取流程明细
|
|
|
|
+ *
|
|
|
|
+ * @param id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/lineCall/choseFlow/{id}")
|
|
|
|
+ public AjaxResult choseFlow(@PathVariable("id") Long id) {
|
|
|
|
+ LineCallVO lineCallVO = lineCallService.selectLineCall(id, 1L);
|
|
|
|
+ if (lineCallVO == null) {
|
|
|
|
+ return AjaxResult.error("查询不到对应的流程");
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(lineCallVO);
|
|
|
|
+ }
|
|
}
|
|
}
|