😎新增产品设计库、bom、原材料库存查询接口
This commit is contained in:
parent
88d59fdaf0
commit
afdba22a70
@ -523,4 +523,34 @@ public class Obj112
|
||||
[SugarColumn(ColumnName = "fld005323", ColumnDescription = "", Length = -1)]
|
||||
public string? fld005323 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预留
|
||||
/// </summary>
|
||||
public string? fld006750 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public string? fld006751 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购订单数量
|
||||
/// </summary>
|
||||
public string? fld006752 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购申请数量
|
||||
/// </summary>
|
||||
public string? fld006753 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本
|
||||
/// </summary>
|
||||
public string? fld006754 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存更新日期
|
||||
/// </summary>
|
||||
public DateTime fld006755 { get; set; }
|
||||
|
||||
}
|
||||
|
@ -1378,4 +1378,33 @@ public class Obj137
|
||||
public string? fld005679_Rec { get; set; }
|
||||
public DateTime? fld005680 { get; set; }
|
||||
public string? fld005686 { get; set; }
|
||||
/// <summary>
|
||||
/// 预留
|
||||
/// </summary>
|
||||
public string? fld006530 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public string? fld005623 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购订单数量
|
||||
/// </summary>
|
||||
public string? fld006531 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购申请数量
|
||||
/// </summary>
|
||||
public string? fld006532 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 成本
|
||||
/// </summary>
|
||||
public string? fld005625 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存更新日期
|
||||
/// </summary>
|
||||
public DateTime fld005624 { get; set; }
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.StockInquiry.Dto;
|
||||
public class BomStockInquiryOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string materialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料描述
|
||||
/// </summary>
|
||||
public string materialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sap入参
|
||||
/// </summary>
|
||||
public string Parameter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息类型
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string Matnr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工厂
|
||||
/// </summary>
|
||||
public string Werks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预留需求数量
|
||||
/// </summary>
|
||||
public string Bdmng { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public string Labst { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购申请数量
|
||||
/// </summary>
|
||||
public string ZwqslPr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购订单数量
|
||||
/// </summary>
|
||||
public string ZwqslPo { get; set; }
|
||||
/// <summary>
|
||||
/// 基本计量单位
|
||||
/// </summary>
|
||||
public string Meins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sap出参
|
||||
/// </summary>
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新日期
|
||||
/// </summary>
|
||||
public DateTime DateUpdated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询状态
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class BomStockInquiryUpdateable
|
||||
{
|
||||
public long Objectid { get; set; }
|
||||
public string RecordGuid { get; set; }
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 预留需求数量
|
||||
/// </summary>
|
||||
public string Bdmng { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public string Labst { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购申请数量
|
||||
/// </summary>
|
||||
public string ZwqslPr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购订单数量
|
||||
/// </summary>
|
||||
public string ZwqslPo { get; set; }
|
||||
public DateTime DateUpdated { get; set; }
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.StockInquiry.Dto;
|
||||
public class RawMaterialInput
|
||||
{
|
||||
public string? materialCode { get; set; }
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.StockInquiry.Dto;
|
||||
public class RawMaterialOutput
|
||||
{
|
||||
public long? idRecord { get; set; }
|
||||
public string _System_objNBS { get; set; }
|
||||
public string _System_objDescription { get; set; }
|
||||
}
|
@ -0,0 +1,378 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using Admin.NET.Core.Service;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Vistar.Application.Common;
|
||||
using Vistar.Application.Const;
|
||||
using Vistar.Application.Entity;
|
||||
using Vistar.Application.SapService.Dto;
|
||||
using Vistar.Application.Service.StockInquiry.Dto;
|
||||
using Vistar.Application.Util;
|
||||
|
||||
namespace Vistar.Application.Service.StockInquiry;
|
||||
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Name = "StockInquiry", Order = 100)]
|
||||
public class StockInquiryService : IDynamicApiController, ITransient
|
||||
{
|
||||
public Common.DataValidationService _dataValidationService;
|
||||
public SqlSugarRepository<Obj137> _obj137Rep;
|
||||
public SqlSugarRepository<Obj112> _obj112Rep;
|
||||
public SqlSugarRepository<ConfigurationData> _configurationDataRep;
|
||||
public SolidWorksManageService.SolidWorksManageService _solidWorksManageService;
|
||||
private readonly SysConfigService _sysConfigService;
|
||||
public SapService.SapService _sapService;
|
||||
public StockInquiryService
|
||||
(
|
||||
DataValidationService dataValidationService,
|
||||
SqlSugarRepository<Obj137> obj137Rep,
|
||||
SqlSugarRepository<Obj112> obj112Rep,
|
||||
SqlSugarRepository<ConfigurationData> configurationDataRep,
|
||||
SolidWorksManageService.SolidWorksManageService solidWorksManageService,
|
||||
SysConfigService sysConfigService,
|
||||
SapService.SapService sapService
|
||||
)
|
||||
{
|
||||
_obj137Rep = obj137Rep;
|
||||
_obj112Rep = obj112Rep;
|
||||
_configurationDataRep = configurationDataRep;
|
||||
_solidWorksManageService = solidWorksManageService;
|
||||
_sysConfigService = sysConfigService;
|
||||
_sapService = sapService;
|
||||
_dataValidationService = dataValidationService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品管理库-库存查询
|
||||
/// </summary>
|
||||
/// <param name="materialCode"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetProductInventory", Description = "产品管理库-库存查询", Order = 1000), HttpGet]
|
||||
[DisplayName("产品管理库-库存查询")]
|
||||
[AllowAnonymous]
|
||||
public async Task<SapEcnQueryOutput> GetProductInventory(string materialCode)
|
||||
{
|
||||
var Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
|
||||
var SapEcnQueryData = new SapEcnQueryInput
|
||||
{
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = Requser,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Sign = "I",
|
||||
Option = "EQ",
|
||||
Low = materialCode,
|
||||
High = ""
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapEcnQueryApi(SapEcnQueryData);
|
||||
|
||||
if (apiOutput.Code == "S")
|
||||
{
|
||||
var data = await _obj137Rep.AsQueryable().Where(x => x._System_objNBS == materialCode && x.deleted == false).OrderByDescending(x => x.idRecord).FirstAsync();
|
||||
if (data != null)
|
||||
{
|
||||
apiOutput.DateUpdated = DateTime.Now;
|
||||
await _obj137Rep.AsUpdateable().SetColumns(it => new Obj137
|
||||
{
|
||||
fld006530 = apiOutput.Bdmng,
|
||||
fld005623 = apiOutput.Labst,
|
||||
fld006531 = apiOutput.ZwqslPo,
|
||||
fld006532 = apiOutput.ZwqslPr,
|
||||
fld005624 = apiOutput.DateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
return apiOutput;
|
||||
}
|
||||
var RawMaterialData = await _obj112Rep.AsQueryable().Where(x => x._System_objNBS == materialCode && x.deleted == false).FirstAsync();
|
||||
if (RawMaterialData != null)
|
||||
{
|
||||
apiOutput.DateUpdated = DateTime.Now;
|
||||
await _obj112Rep.AsUpdateable().SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = apiOutput.Bdmng,
|
||||
fld006751 = apiOutput.Labst,
|
||||
fld006752 = apiOutput.ZwqslPo,
|
||||
fld006753 = apiOutput.ZwqslPr,
|
||||
fld006755 = apiOutput.DateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == RawMaterialData.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
return apiOutput;
|
||||
}
|
||||
}
|
||||
|
||||
return apiOutput;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品管理库-Bom库存查询
|
||||
/// </summary>
|
||||
/// <param name="materialCode"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetBomProductInventory", Description = "产品管理库-Bom库存查询", Order = 1000), HttpGet]
|
||||
[DisplayName("产品管理库-库存查询")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<BomStockInquiryOutput>> GetBomProductInventory(string materialCode)
|
||||
{
|
||||
var Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
|
||||
var materialData = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x._System_objNBS == materialCode && x.deleted == false)
|
||||
.OrderByDescending(x => x.idRecord)
|
||||
.FirstAsync();
|
||||
|
||||
var bomList = await _configurationDataRep.AsQueryable()
|
||||
.Where(x => x.ParentGuid == materialData.RecordGuid && x.isDeleted == false
|
||||
&& x.ParentVersion == materialData.VersionIndex
|
||||
&& (x.fld005577 != "不包含" || x.fld005577 == null)
|
||||
&& x.isSuppressed == false && x.inContext == false)
|
||||
.ToListAsync();
|
||||
|
||||
var UpdateableList = new List<BomStockInquiryUpdateable>();
|
||||
|
||||
var tasks = bomList.Select(async item =>
|
||||
{
|
||||
var code = item.PartNumber;
|
||||
var name = item.Description;
|
||||
var objectid = item.ChildObjID;
|
||||
var childGuid = item.ChildGuid;
|
||||
|
||||
var SapEcnQueryData = new SapEcnQueryInput
|
||||
{
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = Requser,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Sign = "I",
|
||||
Option = "EQ",
|
||||
Low = code,
|
||||
High = ""
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapEcnQueryApi(SapEcnQueryData);
|
||||
var dateUpdated = DateTime.Now;
|
||||
if (apiOutput.Code == "S")
|
||||
{
|
||||
var UpdateableData = new BomStockInquiryUpdateable
|
||||
{
|
||||
Objectid = objectid,
|
||||
Code = apiOutput.Code,
|
||||
RecordGuid = childGuid,
|
||||
Bdmng = apiOutput.Bdmng,
|
||||
Labst = apiOutput.Labst,
|
||||
ZwqslPo = apiOutput.ZwqslPo,
|
||||
ZwqslPr = apiOutput.ZwqslPr,
|
||||
DateUpdated = dateUpdated
|
||||
};
|
||||
UpdateableList.Add(UpdateableData);
|
||||
}
|
||||
else
|
||||
{
|
||||
var UpdateableData = new BomStockInquiryUpdateable
|
||||
{
|
||||
Code = "",
|
||||
RecordGuid = "",
|
||||
Bdmng = "",
|
||||
Labst = "",
|
||||
ZwqslPo = "",
|
||||
ZwqslPr = "",
|
||||
DateUpdated = dateUpdated
|
||||
};
|
||||
UpdateableList.Add(UpdateableData);
|
||||
}
|
||||
if (apiOutput.Code == "S")
|
||||
{
|
||||
return new BomStockInquiryOutput
|
||||
{
|
||||
materialCode = code,
|
||||
materialName = name,
|
||||
Labst = apiOutput.Labst,
|
||||
Bdmng = apiOutput.Bdmng,
|
||||
ZwqslPr = apiOutput.ZwqslPr,
|
||||
ZwqslPo = apiOutput.ZwqslPo,
|
||||
DateUpdated = dateUpdated,
|
||||
State = "查询成功"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BomStockInquiryOutput
|
||||
{
|
||||
materialCode = code,
|
||||
materialName = name,
|
||||
State = "SAP未查询库存信息"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var bomStockInquiryOutput = await Task.WhenAll(tasks);
|
||||
|
||||
foreach (var item in UpdateableList)
|
||||
{
|
||||
await _dataValidationService.ModifyInventoryInformation(item.RecordGuid, item.Code, item.Objectid, item.Bdmng, item.Labst, item.ZwqslPo, item.ZwqslPr, item.DateUpdated);
|
||||
}
|
||||
|
||||
return bomStockInquiryOutput.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取原材料
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetRawMaterial", Description = "获取原材料", Order = 1000), HttpPost]
|
||||
[DisplayName("获取原材料")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<RawMaterialOutput>> GetRawMaterial(RawMaterialInput input)
|
||||
{
|
||||
var data = await _obj112Rep.AsQueryable()
|
||||
.Where(x => x.deleted == false)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.materialCode), u => u._System_objNBS.Contains(input.materialCode.Trim()))
|
||||
.Select<RawMaterialOutput>()
|
||||
.ToListAsync();
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 原材料库存查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "RawMaterialStockInquiry", Description = "原材料库存查询", Order = 1000), HttpGet]
|
||||
[DisplayName("原材料库存查询")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<BomStockInquiryOutput>> RawMaterialStockInquiry()
|
||||
{
|
||||
var Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
var data = await _obj112Rep.AsQueryable()
|
||||
.Where(x => x.deleted == false)
|
||||
.Select<RawMaterialOutput>()
|
||||
.ToListAsync();
|
||||
var UpdateableList = new List<BomStockInquiryUpdateable>();
|
||||
|
||||
var tasks = data.Select(async item =>
|
||||
{
|
||||
var code = item._System_objNBS;
|
||||
var name = item._System_objDescription;
|
||||
var objectid = 112;
|
||||
var id = item.idRecord;
|
||||
var SapEcnQueryData = new SapEcnQueryInput
|
||||
{
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = Requser,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Sign = "I",
|
||||
Option = "EQ",
|
||||
Low = code,
|
||||
High = ""
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapEcnQueryApi(SapEcnQueryData);
|
||||
var dateUpdated = DateTime.Now;
|
||||
if (apiOutput.Code == "S")
|
||||
{
|
||||
var UpdateableData = new BomStockInquiryUpdateable
|
||||
{
|
||||
Objectid = objectid,
|
||||
Code = apiOutput.Code,
|
||||
RecordGuid = id.ToString(),
|
||||
Bdmng = apiOutput.Bdmng,
|
||||
Labst = apiOutput.Labst,
|
||||
ZwqslPo = apiOutput.ZwqslPo,
|
||||
ZwqslPr = apiOutput.ZwqslPr,
|
||||
DateUpdated = dateUpdated
|
||||
};
|
||||
UpdateableList.Add(UpdateableData);
|
||||
}
|
||||
else
|
||||
{
|
||||
var UpdateableData = new BomStockInquiryUpdateable
|
||||
{
|
||||
Code = "",
|
||||
RecordGuid = "",
|
||||
Bdmng = "",
|
||||
Labst = "",
|
||||
ZwqslPo = "",
|
||||
ZwqslPr = "",
|
||||
DateUpdated = dateUpdated
|
||||
};
|
||||
UpdateableList.Add(UpdateableData);
|
||||
}
|
||||
if (apiOutput.Code == "S")
|
||||
{
|
||||
return new BomStockInquiryOutput
|
||||
{
|
||||
materialCode = code,
|
||||
materialName = name,
|
||||
Labst = apiOutput.Labst,
|
||||
Bdmng = apiOutput.Bdmng,
|
||||
ZwqslPr = apiOutput.ZwqslPr,
|
||||
ZwqslPo = apiOutput.ZwqslPo,
|
||||
DateUpdated = dateUpdated,
|
||||
State = "查询成功"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BomStockInquiryOutput
|
||||
{
|
||||
materialCode = code,
|
||||
materialName = name,
|
||||
State = "SAP未查询库存信息"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var bomStockInquiryOutput = await Task.WhenAll(tasks);
|
||||
foreach (var item in UpdateableList)
|
||||
{
|
||||
var dateUpdated = DateTime.Now;
|
||||
await _obj112Rep.AsUpdateable().SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = item.Bdmng,
|
||||
fld006751 = item.Labst,
|
||||
fld006752 = item.ZwqslPo,
|
||||
fld006753 = item.ZwqslPr,
|
||||
fld006755 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == Convert.ToInt32(item.RecordGuid))
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
return bomStockInquiryOutput.ToList();
|
||||
}
|
||||
|
||||
}
|
@ -23,3 +23,63 @@ public class SapOutput
|
||||
public string result { get; set; }
|
||||
public string? banfn { get; set; }
|
||||
}
|
||||
|
||||
public class SapEcnQueryOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// sap入参
|
||||
/// </summary>
|
||||
public string Parameter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 消息类型
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string Matnr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工厂
|
||||
/// </summary>
|
||||
public string Werks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预留需求数量
|
||||
/// </summary>
|
||||
public string Bdmng { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存
|
||||
/// </summary>
|
||||
public string Labst { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购申请数量
|
||||
/// </summary>
|
||||
public string ZwqslPr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 未清采购订单数量
|
||||
/// </summary>
|
||||
public string ZwqslPo { get; set; }
|
||||
/// <summary>
|
||||
/// 基本计量单位
|
||||
/// </summary>
|
||||
public string Meins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sap出参
|
||||
/// </summary>
|
||||
public string Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新日期
|
||||
/// </summary>
|
||||
public DateTime DateUpdated { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user