| | |
| | | { |
| | | var _Sns = MainDB.Queryable<BIZ_U9_ASN_SN>().Where(q => q.ORDER_NO == SqlFunc.Subqueryable<BIZ_U9_ASN_DTL>().Where(s => SqlFunc.StartsWith(s.UPDATE_USER, $"GenerateASN_{UserCode}")).Select(s => s.ORDER_NO)).ToList(); |
| | | CurSn.AddRange(_Sns); |
| | | OrderList = MainDB.Queryable<BIZ_U9_ASN_SN>().Where(q => q.RECEIVER == $"{UserCode}_NoSource" && SqlFunc.Subqueryable<BIZ_U9_ASN>().Where(s => s.ORDER_NO == q.ORDER_NO && s.STATUS == BIZ_U9_ASN.STATUSs.Counting.GetValue()).Any()).Select(q => q.ORDER_NO).ToList(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取当前所有单据信息 |
| | |
| | | public async Task<ApiAction<List<BIZ_U9_ASN>>> GetOrderList() |
| | | { |
| | | var action = new ApiAction<List<BIZ_U9_ASN>>(); |
| | | OrderList = MainDB.Queryable<BIZ_U9_ASN_SN>().Where(q => q.RECEIVER == $"{UserCode}_NoSource" && SqlFunc.Subqueryable<BIZ_U9_ASN>().Where(s => s.ORDER_NO == q.ORDER_NO && s.STATUS == BIZ_U9_ASN.STATUSs.Counting.GetValue()).Any()).Select(q => q.ORDER_NO).ToList(); |
| | | action.Data = await Biz.Db.Queryable<BIZ_U9_ASN>().Where(q => OrderList.Contains(q.ORDER_NO)).Includes(q => q.Details, d => d._ItemInfos).IncludesAllFirstLayer().ToListAsync(); |
| | | if (!action.Data.IsNullOrEmpty()) |
| | | { |