测试出库异常自动分配流程

This commit is contained in:
liuhanqing
2025-06-26 16:32:49 +08:00
parent 8ace69d312
commit 676fee5053
3 changed files with 29 additions and 18 deletions

View File

@@ -263,6 +263,7 @@ public class PdaServiceImp implements PdaService {
if (flag) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_type", "1");
pdaMapper.outMakeSure(map);
String result = map.get("v_result").toString();
if ("10".equals(result)) {
@@ -320,6 +321,7 @@ public class PdaServiceImp implements PdaService {
if (flag) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_type", "1");
pdaMapper.outMakeSure(map);
String result = map.get("v_result").toString();
if ("10".equals(result)) {
@@ -385,19 +387,19 @@ public class PdaServiceImp implements PdaService {
//修改单据实际分配数量
BigDecimal pickQuantity = Convert.toBigDecimal(mydoJobDetail.getPickQuantity());
OutStockoutDetail outStockoutDetail = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(mydoJobDetail.getInOrOutDId());
outStockoutDetail.setAllotQuantity(outStockoutDetail.getAllotQuantity().subtract(pickQuantity));
outStockoutDetail.setAllotQuantity(pickQuantity);
stockOutId = outStockoutDetail.getStockoutId();
outStockoutDetailService.updateOutStockoutDetail(outStockoutDetail);
}
//生成回流任务,返回原库位,标记货位为异常待盘点状态
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_type", "2");
pdaMapper.outMakeSure(map);
String result = map.get("v_result").toString();
if ("10".equals(result)) {
//自动分配
outStockoutService.autoAllot(stockOutId);
return AjaxResult.success("操作成功");
return outStockoutService.autoAllot(stockOutId);
} else {
throw new RuntimeException(map.get("v_resultmsg").toString());
}