服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-11-19 8c998a765b56cba071e4d41f417589f6c0159dce
获取出货信息更新
已修改4个文件
29 ■■■■ 文件已修改
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness.MES/BIZ/IMES_WO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
@@ -605,22 +605,31 @@
        /// </summary>
        /// <param name="wo"></param>
        /// <returns></returns>
        public async Task<ApiAction<ShippingOutput>> GetShipList(string wo, string orgCode)
        public async Task<ApiAction<ShippingOutput>> GetShipList(ShippingInput input)
        {
            var result = new ApiAction<ShippingOutput>();
            try
            {
                DbClient db = Biz.DataSource["YadaU9C"].Client;
                var org = await Biz.Db.Queryable<SYS_ORGANIZATION>().Where(q => q.ORG_CODE == orgCode).FirstAsync();
                var org = await Biz.Db.Queryable<SYS_ORGANIZATION>().Where(q => q.ORG_CODE == input.orgCode).FirstAsync();
                string wo = input.wo;
                if (!input.SN.IsNullOrEmpty() && input.wo.IsNullOrEmpty()) {
                    var woSn = Biz.Db.Queryable<BIZ_MES_WO_SN>().Where(q => q.SN == input.SN || q.FLOW_SN == input.SN).First();
                    if (!woSn.IsNullOrEmpty()) {
                        wo = woSn.WORK_ORDER;
                    }
                }
                var ship = db.Queryable<mes_ShipList>().Where(q => q.MoDoc.Equals(wo) && q.Org == org.ID.ToInt64()).First();
                if (!ship.IsNullOrEmpty())
                {
                    result.Data = ship.BusinessDate.Date == DateTime.Now.Date ? new()
                    {
                        ShipDoc = ship.ShipDoc,
                        ShippingQty = ship.ShipQty,
                        Tag = "Customer"
                    } : new()
                    {
                        ShipDoc = ship.ShipDoc,
                        ShippingQty = ship.ShipQty,
                        Tag = "InStoreLabel"
                    };
@@ -630,6 +639,7 @@
                {
                    result.Data = new()
                    {
                        ShipDoc = "",
                        ShippingQty = 0,
                        Tag = "InStoreLabel"
                    };
Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs
@@ -8,6 +8,7 @@
using Tiger.Model.Entitys.MES.BizMesWoBatch;
using Tiger.Api.iBiz;
using Newtonsoft.Json;
using Tiger.Model.Entitys.MES.Position;
namespace Tiger.Api.Controllers.MES
{
@@ -226,13 +227,12 @@
        /// <returns></returns>
        [HttpPost]
        [Route("api/[controller]/[action]")]
        public async Task<IActionResult> GetShipList([FromBody] ApiAction action)
        public async Task<IActionResult> GetShipList([FromBody] ApiAction<ShippingInput> action)
        {
            ApiAction response = new();
            try
            {
                var options = JsonConvert.DeserializeObject<AuthOption>(action.Options?.ToString());
                response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().GetShipList(action.Data?.ToString(), options.OrgCode));
                response = response.GetResponse(await DI.Resolve<IBIZ_MES_WO>().GetShipList(action.Data));
            }
            catch (System.Exception ex)
            {
Tiger.IBusiness.MES/BIZ/IMES_WO.cs
@@ -21,7 +21,7 @@
        public Task<ApiAction> AddOrEditLabelVarByWorkOrder(BAS_LABEL_VAR_WO input);
        public Task<ApiAction<QueryAble<BAS_LABEL_VAR_WO>>> GetLabelVarByWorkOrder(BizLabelVarWoInput input);
        public Task<ApiAction> GetRePrintInfo(RePrintInput input);
        public Task<ApiAction<ShippingOutput>> GetShipList(string wo, string orgCode);
        public Task<ApiAction<ShippingOutput>> GetShipList(ShippingInput input);
        public Task<ApiAction> SavePrintLabelInAct(string code);
        public Task<ApiAction> UnbindWipSnFromWO(UnbindWipSnInput input);
        public Task<ApiAction<InStoreInfo>> GetErpProdInBth(string code);
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs
@@ -48,6 +48,13 @@
    public class ShippingOutput
    {
        public string Tag { get; set; }
        public string ShipDoc { get; set; }
        public double ShippingQty { get; set; }
    }
    public class ShippingInput
    {
        public string SN { get; set; }
        public string wo { get; set; }
        public string orgCode { get; set; }
    }
}