雅达-更改多个文件中的数据类型和属性
- 将多个文件中的 `PkgQty` 和 `CompleteQty` 类型从 `int` 改为 `double`。
- 在 `MES_U9C.cs` 中修正了字符串插值的格式,初始化了新的 `List<RcvRptDocCreateParam>` 对象,并注释掉了 `IsSuccessed = false`。
- 在 `In_SemiProd.cs` 中转换了 `input.Data` 为 `SemiTemplateQty` 对象,并修改了查询条件。
- 在 `PrintSemiProdLabel.cs` 中增加了 `WoBatch` 属性,调整了属性赋值,并删除了对 `input.SN` 是否为空的检查。
- 在 `WMSController.PrintSemiProdLabel.cs` 中修改了注释和日志信息。
- 在 `U9CParameter.cs` 中将多个类的 `PkgQty` 和 `CompleteQty` 类型从 `int` 改为 `double`。
- 在 `RePrint_Entitys.cs` 中增加了 `WoBatch` 属性,并新增了 `SemiTemplateQty` 类。
- 在 `BIZ_ERP_PROD_IN_BTH.cs` 中增加了 `CompleteQty` 属性,并设置为忽略数据库映射。
| | |
| | | WorkOrder = item.WORK_ORDER, |
| | | ItemCode = item.ITEM_CODE, |
| | | WhCode = "10105", |
| | | PkgQty = item.SCAN_QTY.ToInt32(), |
| | | CompleteQty = item.SCAN_QTY.ToInt32(), |
| | | PkgQty = item.SCAN_QTY, |
| | | CompleteQty = item.SCAN_QTY, |
| | | OutputType = 0, |
| | | StorageType = 4, |
| | | DocState = 1, |
| | |
| | | // item.Status = "Y"; |
| | | // if (!ErpProdInBth.IsNullOrEmpty()) |
| | | // { |
| | | // ErpProdInBth.ORDER_NO = $"YDRKD24120000{5+i}"; |
| | | // ErpProdInBth.ORDER_NO = $"YDRKD24120000{5 + i}"; |
| | | // ErpProdInBth.IS_HANDLED = "Y"; |
| | | // ErpProdInBth.HANDLED_DATE = DateTime.Now; |
| | | // } |
| | | // List<RcvRptDocCreateParam> param = new() { |
| | | // new() { |
| | | // CompleteList = new(){ |
| | | // new CompleteList |
| | | // { |
| | | // MOKey = new MOKey { DocNo = item.WorkOrder }, |
| | | // Wh = new Wh { Code = item.WhCode }, |
| | | // DescFlexField = new DescFlexField { PrivateDescSeg1 = item.PkgQty.ToString() }, |
| | | // Item = new Item { Code = item.ItemCode }, |
| | | // CompleteQty = item.CompleteQty, |
| | | // OutputType = item.OutputType, |
| | | // StorageType = item.StorageType, |
| | | // DocState = item.DocState, |
| | | // } |
| | | // }, |
| | | // Remark = "接口生成", |
| | | // BusinessDate = DateTime.Now, |
| | | // } |
| | | // }; |
| | | // foreach (var p in input.PrintJsons) |
| | | // { |
| | | // var d = p.Items.Where(q => q.WORK_ORDER == item.WorkOrder).FirstOrDefault(); |
| | |
| | | //{ |
| | | // action.CatchExceptionWithLog(_dbTran.ErrorException, $"数据处理失败"); |
| | | // Logger.Interface.Error(action.Message); |
| | | // IsSuccessed = false; |
| | | // //IsSuccessed = false; |
| | | //} |
| | | |
| | | //保存成功,调用U9C接口 |
| | |
| | | action.LocaleMsg = Biz.L("WMS.InSemiProd.ScanItem.WoEmptyFailure", input.SN); // $"工单[{input.SN}]不存在" |
| | | return action; |
| | | } |
| | | |
| | | |
| | | var semiTemplateQty = (input.Data ?? "").JsonToObject<SemiTemplateQty>() ?? new SemiTemplateQty(); |
| | | |
| | | InStoreInfo Info = new() |
| | | { |
| | | ErpProdInBth = new() |
| | |
| | | ITEM_CODE = wo.ITEM_CODE, |
| | | ITEM_NAME = wo.ItemInfo?.ITEM_DESC, |
| | | SapCode = wo.ItemInfo?.ExtInfo?.SapCode, |
| | | SCAN_QTY = input.Data.ToInt32(), |
| | | SCAN_QTY = semiTemplateQty.PackQty, |
| | | CompleteQty = semiTemplateQty.CompleteQty, |
| | | IS_HANDLED = "N" //Y-已生成,N-未生成,F-失败 |
| | | }, |
| | | InStoreScanInfo = new() |
| | |
| | | SALES_ORDER = wo.SALES_ORDER, |
| | | WORK_ORDER = wo.ORDER_NO, |
| | | BATCH_NO = "", |
| | | SCAN_QTY = input.Data.ToInt32() |
| | | SCAN_QTY = semiTemplateQty.PackQty.ToDouble() |
| | | } |
| | | }; |
| | | |
| | |
| | | ErpProdInBths.Clear(); |
| | | InStoreScanInfos.Clear(); |
| | | RcvRptInput.ErpProdInBths = Biz.Db.Queryable<BIZ_ERP_PROD_IN_BTH>() |
| | | .Where(q => q.BATCH_NO == SqlFunc.Subqueryable<BIZ_ERP_PROD_IN_BTH>().Where(s => s.ORDER_NO == UserCode && s.GHOST_ROW == false).Select(s => s.BATCH_NO)) |
| | | .Where(q => q.BATCH_NO == SqlFunc.Subqueryable<BIZ_ERP_PROD_IN_BTH>().Where(s => s.ORDER_NO == UserCode && s.GHOST_ROW == false).Select(s => s.BATCH_NO) && q.IS_HANDLED == "N") |
| | | .IncludesAllFirstLayer().ToList(); |
| | | foreach (var item in RcvRptInput.ErpProdInBths) |
| | | { |
| | |
| | | WorkOrder = item.WORK_ORDER, |
| | | ItemCode = item.ITEM_CODE, |
| | | WhCode = "10105", |
| | | PkgQty = item.SCAN_QTY.ToInt32(), |
| | | CompleteQty = item.SCAN_QTY.ToInt32(), |
| | | PkgQty = item.SCAN_QTY, |
| | | CompleteQty = item.CompleteQty, |
| | | OutputType = 0, |
| | | StorageType = 4, |
| | | DocState = 1, |
| | |
| | | var temp = new SemiTemplateInput |
| | | { |
| | | RcvRptDocId = item.ID.ToString(), |
| | | ItemCode= item.ItemCode, |
| | | ItemDesc= item.ItemDescription, |
| | | SapItemCode= "", |
| | | PackQty= item.PackQty.ToDecimal(), |
| | | Qty=0, |
| | | DocNo= item.DocNo, |
| | | WorkOrder= item.Mo |
| | | ItemCode = item.ItemCode, |
| | | ItemDesc = item.ItemDescription, |
| | | SapItemCode = "", |
| | | WoBatch = item.LotCode, |
| | | PackQty = item.PackQty.ToDecimal(), |
| | | Qty = item.RcvQtyByWhUOM.ToDecimal(), |
| | | DocNo = item.DocNo, |
| | | WorkOrder = item.Mo |
| | | }; |
| | | temps.Add(temp); |
| | | } |
| | |
| | | var action = new ApiAction<ScanOutput>(new ScanOutput()); |
| | | try |
| | | { |
| | | if (input.SN.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("条码不能为空"); |
| | | action.LocaleMsg = Biz.L("WMS.Default.ScanItem.SnEmptyFailure"); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | var semiTemplate = (input.Data ?? "").JsonToObject<SemiTemplateInput>() ?? new SemiTemplateInput(); |
| | | |
| | | //生成条码 |
| | |
| | | userId = input.AuthOption.UserId, |
| | | token = "", |
| | | IsLogin = true, |
| | | CreateBarCodeItemQty = semiTemplate.PackQty, |
| | | LabelQty = semiTemplate.Qty, |
| | | CreateBarCodeItemQty = semiTemplate.Qty, |
| | | LabelQty = semiTemplate.PackQty, |
| | | }; |
| | | |
| | | |
| | | var snList = await _IMES_U9C.U9CCreateBarCodeByAssignQty(barcodeCreateInput); |
| | | action.Data.Data = snList; |
| | | //action.Data.Data = new List<string> { |
| | | // "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0001", |
| | | // "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0002", |
| | | // "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0003", |
| | | // "YDRKD241200014/10/20051210.0013.00/YDMB241254400/0004" |
| | | |
| | | //}; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | /// <summary> |
| | | /// GetTransaction(ApiAction(Data:UserId)) |
| | | /// 根据ApiAction的id返回一个查询储位补印条码事务 |
| | | /// 根据ApiAction的id返回一个打印半成品条码事务 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | lock (trans.TransLock) { response = action.GetResponse(trans.Close()); } |
| | | } |
| | | response.Message = $"查询储位补印条码事务[ID:{action.ID}]关闭{(response.IsSuccessed ? "成功" : "失败")}"; |
| | | response.Message = $"打印半成品条码事务[ID:{action.ID}]关闭{(response.IsSuccessed ? "成功" : "失败")}"; |
| | | } |
| | | else |
| | | { |
| | | response = action.GetResponse($"Transaction Error: 查询储位补印条码事务[ID:{action.ID}]已经关闭", false); |
| | | response = action.GetResponse($"Transaction Error: 打印半成品条码事务[ID:{action.ID}]已经关闭", false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | response = action.GetResponse($"Transaction Error: 查询储位补印条码事务[ID:{action.ID}]已经关闭", false); |
| | | response = action.GetResponse($"Transaction Error: 打印半成品条码事务[ID:{action.ID}]已经关闭", false); |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | |
| | | } |
| | | else |
| | | { |
| | | response = action.GetResponse($"Transaction Error: 查询储位补印条码事务[ID:{action.ID}]已经关闭,请重新打开查询储位补印条码功能", false); |
| | | response = action.GetResponse($"Transaction Error: 打印半成品条码事务[ID:{action.ID}]已经关闭,请重新打开打印半成品条码功能", false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | response = action.GetResponse($"Transaction Error: 查询储位补印条码事务[ID:{action.ID}]数据丢失,请重新打开查询储位补印条码功能", false); |
| | | response = action.GetResponse($"Transaction Error: 打印半成品条码事务[ID:{action.ID}]数据丢失,请重新打开打印半成品条码功能", false); |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | |
| | | public string WorkOrder { get; set; } |
| | | public string ItemCode { get; set; } |
| | | public string WhCode { get; set; } = "10105"; |
| | | public int PkgQty { get; set; } |
| | | public int CompleteQty { get; set; } |
| | | public double PkgQty { get; set; } |
| | | public double CompleteQty { get; set; } |
| | | public int OutputType { get; set; } = 0; |
| | | public int StorageType { get; set; } = 4; |
| | | public int DocState { get; set; } = 1; |
| | |
| | | public Wh Wh { get; set; } |
| | | public Item Item { get; set; } |
| | | public DescFlexField DescFlexField { get; set; } |
| | | public int CompleteQty { get; set; } |
| | | public double CompleteQty { get; set; } |
| | | public int OutputType { get; set; } = 0; |
| | | public int StorageType { get; set; } = 4; |
| | | public int DocState { get; set; } = 1; |
| | |
| | | public string ItemDesc { get; set; } |
| | | public string DocNo { get; set; } |
| | | public string WorkOrder { get; set; } |
| | | public string WoBatch { get; set; } |
| | | public decimal PackQty { get; set; } |
| | | public decimal Qty { get; set; } |
| | | } |
| | | |
| | | public class SemiTemplateQty |
| | | { |
| | | public double PackQty { get; set; } |
| | | public double CompleteQty { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | [SugarColumn(IsIgnore = true)] |
| | | public int CartonQty { get; set; } |
| | | [SugarColumn(IsIgnore = true)] |
| | | public double CompleteQty { get; set; } |
| | | #endregion |
| | | |
| | | #region 外键属性 |