mahao 1 year ago
parent
commit
045e0a5c9e
  1. 77
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs

77
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs

@ -106,32 +106,61 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag);
}
pubSeDetails.ForEach(pubSeDetail =>
foreach (var pubSeDetail in pubSeDetails)
{
var vmiBalance = new VmiBalance()
if (pubSeDetail.TransType == EnumDelTransType.)
{
PartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustomerPartCode = default,
CodeType = default,
BillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime,
DeliverTime = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
SubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
};
_vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance);
});
var vmiBalance = new VmiBalance()
{
PartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustomerPartCode = default,
CodeType = default,
BillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime,
DeliverTime = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
SubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
};
await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance);
}
else if (pubSeDetail.TransType == EnumDelTransType.退)
{
var vmiLog = new VmiLog()
{
PartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustomerPartCode = default,
CodeType = default,
BillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime,
DeliverTime = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
SubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
};
await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog);
}
}
}
}
}

Loading…
Cancel
Save