服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-10-30 35176501d2f73523c5771d7bdc87d6d07c164386
重打条码更新
已修改2个文件
26 ■■■■ 文件已修改
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.IBusiness.MES/BIZ/IMES_WO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
@@ -457,9 +457,9 @@
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<ApiAction<LOG_LABEL_PRINT>> GetRePrintInfo(RePrintInput input)
        public async Task<ApiAction> GetRePrintInfo(RePrintInput input)
        {
            var result = new ApiAction<LOG_LABEL_PRINT>();
            var result = new ApiAction();
            try
            {
                //先查出工单条码中是否存在
@@ -470,11 +470,23 @@
                    result.LocaleMsg = new($"条码不存在!");
                    return result;
                }
                result.Data = await Biz.Db.Queryable<LOG_LABEL_PRINT>()
                string printParam = "";
                var labelPrint = await Biz.Db.Queryable<LOG_LABEL_PRINT>()
                    .WhereIF(input.ReqType == 0, q => q.SN.Equals(woSn.SN) || q.SN.Equals(woSn.FLOW_SN)) //白盒标签
                    .WhereIF(input.ReqType == 1, q => q.SN.Equals(woSn.OUTER_SN)) //箱标签
                    .WhereIF(input.ReqType == 1, q => q.SN.Equals(woSn.OUTER_SN) && q.PRINT_LABEL != "InStoreLabel") //箱标签-客户
                    .WhereIF(input.ReqType == 2, q => q.SN.Equals(woSn.OUTER_SN) && q.PRINT_LABEL == "InStoreLabel") //箱标签-入库
                    .FirstAsync();
                //如果查不到就去行为日志查
                if (labelPrint.IsNullOrEmpty() && input.ReqType == 1)
                {
                    printParam = Biz.Db.Queryable<MES_WIP_ACT>().Where(q => (q.SN.Equals(input.Code) || q.FLOW_SN.Equals(input.Code)) && q.ACT_VALUE_4 == "Customer").First()?.ACT_VALUE_3 ?? "";
                }
                else
                {
                    printParam = labelPrint.PRINT_PARAM;
                }
                result.Data = printParam;
                result.LocaleMsg = new($"重打条码[{input.Code}]的标签成功");
            }
            catch (Exception ex)
            {
@@ -502,7 +514,7 @@
                else
                {
                    result.LocaleMsg = new($"出货信息存在!");
                    result.Data = "InStore";
                    result.Data = "InStoreLabel";
                }
            }
            catch (Exception ex)
Tiger.IBusiness.MES/BIZ/IMES_WO.cs
@@ -20,7 +20,7 @@
        public Task<ApiAction> UpdateWoBatchStatus(BizMesWoInput input);
        public Task<ApiAction> AddOrEditLabelVarByWorkOrder(BAS_LABEL_VAR_WO input);
        public Task<ApiAction<QueryAble<BAS_LABEL_VAR_WO>>> GetLabelVarByWorkOrder(BizLabelVarWoInput input);
        public Task<ApiAction<LOG_LABEL_PRINT>> GetRePrintInfo(RePrintInput input);
        public Task<ApiAction> GetRePrintInfo(RePrintInput input);
        public Task<ApiAction> GetShipList(string wo, string orgCode);
    }
}