| | |
| | | { |
| | | var order = item.TRANS_CODE; |
| | | item.STATUS = WMS_ITEM.STATUSs.Incoming.GetValue(); |
| | | item.TRANS_CODE = item.SOURCE_CODE; |
| | | item.TRANS_NO = item.SOURCE_ORDER; |
| | | item.TRANS_LINE = item.SOURCE_LINE; |
| | | item.SOURCE_CODE = ""; |
| | | item.SOURCE_ORDER = ""; |
| | | item.SOURCE_LINE = ""; |
| | | item.TRANS_CODE = item.SOURCE_CODE; |
| | | item.TRANS_NO = item.SOURCE_ORDER; |
| | | item.TRANS_LINE = item.SOURCE_LINE; |
| | | historys.Add(new WMS_ITEM_HIS(item, $"条码[{item.SN}]取消清点,操作单据[{order}]")); |
| | | } |
| | | |
| | |
| | | var item = await Biz.Db.Queryable<WMS_ITEM>().Where(q => q.SN == input.SN).FirstAsync(); |
| | | var order = item.TRANS_CODE; |
| | | item.STATUS = WMS_ITEM.STATUSs.Incoming.GetValue(); |
| | | item.TRANS_CODE = item.SOURCE_CODE; |
| | | item.TRANS_NO = item.SOURCE_ORDER; |
| | | item.TRANS_LINE = item.SOURCE_LINE; |
| | | item.SOURCE_CODE = ""; |
| | | item.SOURCE_ORDER = ""; |
| | | item.SOURCE_LINE = ""; |
| | | item.TRANS_CODE = item.SOURCE_CODE; |
| | | item.TRANS_NO = item.SOURCE_ORDER; |
| | | item.TRANS_LINE = item.SOURCE_LINE; |
| | | |
| | | //使用统一的事务DB对象 |
| | | var db = GetCommitDB(); |
| | | var dbTran = db.UseTran(() => |
| | |
| | | var orderNo = input.Data; |
| | | try |
| | | { |
| | | var order = await Biz.Db.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).IncludesAllFirstLayer().FirstAsync(); |
| | | var order = await MainDB.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).IncludesAllFirstLayer().FirstAsync(); |
| | | if (order.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | |
| | | throw new NotImplementedException(); |
| | | |
| | | //更新库存表信息 |
| | | var items = Biz.Db.Queryable<WMS_ITEM>().Where(q => SqlFunc.Subqueryable<BIZ_U9_ASN_SN>().Where(s => s.SN == q.SN && s.ORDER_NO == order.ORDER_NO).Any()).ToList(); |
| | | var items = MainDB.Queryable<WMS_ITEM>().Where(q => SqlFunc.Subqueryable<BIZ_U9_ASN_SN>().Where(s => s.SN == q.SN && s.ORDER_NO == order.ORDER_NO).Any()).ToList(); |
| | | var historys = new List<WMS_ITEM_HIS>(); |
| | | foreach (var item in items) |
| | | { |
| | | item.STATUS = WMS_ITEM.STATUSs.WaitIn.GetValue(); |
| | | item.TRANS_CODE = nameof(BIZ_U9_RECEIPT); |
| | | item.TRANS_NO = receipt.ORDER_NO; |
| | | item.TRANS_LINE = receipt.SnList.First(q => q.SN == item.SN).LINE_NO; |
| | | item.SOURCE_CODE = item.TRANS_CODE; |
| | | item.SOURCE_ORDER = item.TRANS_NO; |
| | | item.SOURCE_LINE = item.TRANS_LINE; |
| | | item.TRANS_CODE = nameof(BIZ_U9_RECEIPT); |
| | | item.TRANS_NO = receipt.ORDER_NO; |
| | | item.TRANS_LINE = receipt.SnList.First(q => q.SN == item.SN).LINE_NO; |
| | | historys.Add(new WMS_ITEM_HIS(item, $"送货单[{order.ORDER_NO}]的条码[{item.SN}]生成收货单[{receipt.ORDER_NO}],待检验完成后可入库")); |
| | | } |
| | | |