fix:投料与转储多次反馈编号重新生成

This commit is contained in:
2026-09-23 13:39:21 +08:00
parent be36b45dda
commit b5b62e84e6
3 changed files with 11 additions and 8 deletions

View File

@@ -121,7 +121,8 @@ public class FeedingRecordServiceImpl extends ServiceImpl<FeedingRecordMapper, F
private ProductionOutboundRequest buildPp055Request(FeedingRecordPushDto param, FeedingRecord feedingRecord) {
String postDate = resolveSapDate(param.getBizDate());
String docno = StrUtil.blankToDefault(param.getOrderCode(), "FEED" + System.currentTimeMillis());
//String docno = StrUtil.blankToDefault(param.getOrderCode(), "FEED" + System.currentTimeMillis());
String docno = "FEED" + System.currentTimeMillis();
String aufnr = StrUtil.blankToDefault(param.getOrderCode(), feedingRecord.getOrder_code());
String werks = StrUtil.blankToDefault(param.getFactory(), SapConstant.WERKS);
String defaultLgort = StrUtil.blankToDefault(param.getDefaultWarehouseCode(), "");

View File

@@ -120,11 +120,11 @@ public class SapProductionOutboundDelivery implements CallbackStrategy {
header.setDestSystem(SapConstant.DEST_SYSTEM);
header.setRequesttime(System.currentTimeMillis());
request.setHeader(header);
String docno = StrUtil.blankToDefault(storInv != null ? storInv.getBill_code() : null,
StrUtil.blankToDefault(param.getIostorinv_id(), param.getIostorinvdtl_id()));
// String docno = StrUtil.blankToDefault(storInv != null ? storInv.getBill_code() : null,
// StrUtil.blankToDefault(param.getIostorinv_id(), param.getIostorinvdtl_id()));
//所有请求号只能唯一不可重复
String docno ="FEED" + System.currentTimeMillis();;
String lgort =storInv.getStor_code();
Map<String, WorkOrderDao> workOrderCache = new HashMap<>();
workOrderCache.put(orderKey(param.getSource_bill_code()), workOrder);

View File

@@ -146,10 +146,12 @@ public class SapReturnCallBack implements CallbackStrategy {
header.setBackup1("");
header.setBackup2("");
request.setHeader(header);
//所有请求号只能唯一不可重复
MaterialTransferBody body = new MaterialTransferBody();
body.setBktxt(StrUtil.blankToDefault(pmReturn.getOrder_code(),
StrUtil.blankToDefault(pmReturn.getId(), param.getIostorinv_id())));
// body.setBktxt(StrUtil.blankToDefault(pmReturn.getOrder_code(),
//所有请求号只能唯一不可重复
body.setBktxt("FEED" + System.currentTimeMillis());
body.setBldat(today);
body.setBudat(today);
body.setItems(Collections.singletonList(toTransferItem(param, pmReturn, pcsn)));