| | |
| | | /// <summary> |
| | | /// MES岗位事务 |
| | | /// </summary> |
| | | public class Position : MESTransactionBase, IPosition, ICloneable |
| | | public class Position : MESTransactionBase, IPosition |
| | | { |
| | | public IPosition Init(string id, string apiHost, string userCode, string postCode) |
| | | { |
| | |
| | | return result; |
| | | } |
| | | |
| | | public object Clone() |
| | | { |
| | | var newObject = this.MemberwiseClone() as Position; |
| | | newObject.Steps = Steps.Clone(); |
| | | newObject.CurWipSNs = CurWipSNs.Clone(); |
| | | |
| | | return newObject; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存工步的数据库提交操作到数据库 |
| | | /// </summary> |
| | |
| | | throw dbTran.ErrorException; |
| | | } |
| | | } |
| | | |
| | | |
| | | //if (NeedTemporaryStoreDBCommitAction) |
| | | //{ |
| | | |
| | | |
| | | // NodeCommitList.Add(this.Clone() as Position); |
| | | //} |
| | | //else |
| | | //{ |
| | | // //保存成功则清空提交操作列表 |
| | | // foreach (var item in NodeCommitList) |
| | | // { |
| | | // item?.DoSaveToDB(); |
| | | // item?.Dispose(); |
| | | // } |
| | | // DoSaveToDB(); |
| | | // NodeCommitList.Clear(); |
| | | //} |
| | | } |
| | | |
| | | protected void DoSaveToDB() |
| | |
| | | switch (pv.VAR_METHOD) |
| | | { |
| | | case "GetCartonGenerate": |
| | | return Biz.CodeRule[lv.BARCODE_RULE].Generate($"{WorkBatch.Batch.BATCH_NO}-{WorkBatch.Batch.PLAN_QTY}-").Data.ToString(); |
| | | return Biz.CodeRule[lv.BARCODE_RULE ?? ""]?.Generate($"{WorkBatch.Batch.BATCH_NO}-{WorkBatch.Batch.PLAN_QTY}-").Data.ToString() ?? ""; |
| | | default: |
| | | return ""; |
| | | } |