fix:永丰售后修复BUG,
1,物料库存获取不到ERP:重新调整触发查询逻辑 2,工序变更导致物料无法出库:配置旧工序 3,测试出库订单ERP推送,任务下发
This commit is contained in:
1 parent
b2a9a38f38
commit
c76e7bb681
69 files changed
+5510
-157
No files matched your search
@@ -88,7 +88,8 @@ namespace HHWMS.Web
|
||||
var success = await CallAddOtherOut(
|
||||
inventory.MaterialCode,
|
||||
inventory.Qty ?? 0,
|
||||
inventory.CreateBy);
|
||||
inventory.CreateBy,
|
||||
inventory.ZoneId);
|
||||
inventory.UploadErpFlag = success ? 1 : 0;
|
||||
return success;
|
||||
}
|
||||
@@ -106,8 +107,9 @@ namespace HHWMS.Web
|
||||
WorkerCode = inventory.CreateBy, // 工人编码(创建人)
|
||||
Maker = unitWork.FindSingle<FrameworkUser>(x =>
|
||||
x.ITCode == inventory.CreateBy).Name, // 制单人(校验员)
|
||||
Type = inventory.ZoneId == 1027 ? 1: 2,
|
||||
WhCode = inventory.ZoneId == 1027 ? "xb": "cp",
|
||||
// 上报库区取值统一走 AgvErpWhTypeEnum 枚举(5.4.1),后期改枚举即可
|
||||
Type = AgvErpWhTypeEnumExtensions.FromZoneId(inventory.ZoneId).GetErpType(),
|
||||
WhCode = AgvErpWhTypeEnumExtensions.FromZoneId(inventory.ZoneId).GetWhCode(),
|
||||
},
|
||||
Details = new List<FinishInDetail>()
|
||||
};
|
||||
@@ -172,7 +174,8 @@ namespace HHWMS.Web
|
||||
var success = await CallAddOtherOut(
|
||||
transaction.MaterialCode,
|
||||
transaction.Qty ?? 0,
|
||||
transaction.CreateBy);
|
||||
transaction.CreateBy,
|
||||
zoneCode: transaction.ZoneCode);
|
||||
transaction.UploadErpFlag = success ? 1 : 0;
|
||||
return success;
|
||||
}
|
||||
@@ -189,18 +192,28 @@ namespace HHWMS.Web
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<bool> CallAddOtherOut(string materialCode, decimal qty, string createBy)
|
||||
/// <summary>
|
||||
/// 补传 ERP 其他出库(AddOtherOut)。
|
||||
/// zoneId:库存场景按库区ID解析(ProcessErpFinishIn 出库分支);
|
||||
/// zoneCode:流水场景按库区编码解析(ProcessErpOtherOut / AddOtherOutJob 补传)。
|
||||
/// </summary>
|
||||
private async Task<bool> CallAddOtherOut(string materialCode, decimal qty, string createBy,
|
||||
int? zoneId = null, string zoneCode = null)
|
||||
{
|
||||
var maker = unitWork.FindSingle<FrameworkUser>(x => x.ITCode == createBy)?.Name
|
||||
?? createBy
|
||||
?? "WMS";
|
||||
// 上报库区取值统一走 AgvErpWhTypeEnum 枚举(5.4.1),后期改枚举即可
|
||||
var whType = zoneId.HasValue
|
||||
? AgvErpWhTypeEnumExtensions.FromZoneId(zoneId.Value)
|
||||
: AgvErpWhTypeEnumExtensions.FromZoneCode(zoneCode);
|
||||
var request = new AddOtherOutRequest
|
||||
{
|
||||
Main = new AddOtherOutMain
|
||||
{
|
||||
ErpCode = "003",
|
||||
OutCode = unitWork.GetSerialNumber("CK"),
|
||||
WhCode = "xb",
|
||||
WhCode = whType.GetWhCode(),
|
||||
Maker = maker
|
||||
},
|
||||
Details = new List<AddOtherOutDetail>
|
||||
|
||||
Reference in new issue
Block a user