盘点自动分配 盘点确认

This commit is contained in:
liuhanqing
2025-09-18 17:15:48 +08:00
parent 0361c5846f
commit f0541955aa
11 changed files with 48 additions and 456 deletions

View File

@@ -433,13 +433,12 @@ public class PdaServiceImp implements PdaService {
@Override
@Transactional(rollbackFor = Exception.class)
//@Transactional(rollbackFor = Exception.class)
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = mydoJobService.selectMydoJobByTrayCode(trayCodeMakeSure.getTrayCode());
if (mydoJob == null) {
return AjaxResult.warn(MessageUtils.message("warn.message"));
}
BasWarehouse basWarehouse = basWarehouseService.selectBasWarehouseByWarehouseId(mydoJob.getWarehouseId());
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMaterials();
if (CollUtil.isNotEmpty(mydoJobDetailList)) {
boolean flag = mydoJobDetailList.stream().anyMatch(x -> StrUtil.isEmpty(x.getStockId()) && "0".equals(x.getInQuantity()));
@@ -457,28 +456,18 @@ public class PdaServiceImp implements PdaService {
checkCommitRecord.setSpare3(mydoJobDetail.getOutQuantity());
checkCommitRecordService.insertCheckCommitRecord(checkCommitRecord);
mydoJobDetail.setSpare3("1");
mydoJobDetailService.updateMydoJobDetail(mydoJobDetail);
if ("2".equals(basWarehouse.getWarehouseType())){
updateTagTaskStatus(mydoJobDetail);
}
}
}
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailListByJobId(mydoJob.getJobId());
if (mydoJobDetails.stream().allMatch(x -> "1".equals(x.getSpare3()))) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
pdaMapper.checkMakeSure(map);
iToWcsService.pushInMydoJob();
String result = map.get("v_result").toString();
if ("10".equals(result)) {
return AjaxResult.success(map.get("v_resultmsg").toString());
} else {
throw new RuntimeException(map.get("v_resultmsg").toString());
}
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
pdaMapper.checkMakeSure(map);
//iToWcsService.pushInMydoJob();
String result = map.get("v_result").toString();
if ("10".equals(result)) {
return AjaxResult.success(map.get("v_resultmsg").toString());
} else {
throw new RuntimeException(map.get("v_resultmsg").toString());
}
return AjaxResult.success();
}
/**