| | |
| | | entity_h.Add(prd_h); |
| | | list_dOld.AddRange(list_d); |
| | | //检查有没有调拨单,有就更新状态为完成 |
| | | var transferList = db.Queryable<BIZ_WMS_TRANSFER>().Where(s => s.SOURCECODE == prd_h.BILLCODE).ToList(); |
| | | var transferList = db.Queryable<BIZ_WMS_TRANSFER>().Where(s => s.SOURCE_ORDER == prd_h.BILLCODE).ToList(); |
| | | if (transferList.Any()) |
| | | { |
| | | foreach (var item in transferList) |
| | | { |
| | | item.STATUS = BIZ_WMS_TRANSFER.STATUSs.FINISHED.GetValue(); |
| | | item.SOURCECODE = prd_h.BILLCODE; |
| | | item.STATUS = BIZ_WMS_TRANSFER.STATUSs.Finished.GetValue(); |
| | | item.SOURCE_ORDER = prd_h.BILLCODE; |
| | | transferH.Add(item); |
| | | action.Message += $",领料单[{prd_h.BILLCODE}]对应调拨单[{item.BILLCODE}]完成"; |
| | | action.Message += $",领料单[{prd_h.BILLCODE}]对应调拨单[{item.ORDER_NO}]完成"; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | var action = new ApiAction<PageAble<BIZ_WMS_TRANSFER>>(); |
| | | var query = Biz.Db.Queryable<BIZ_WMS_TRANSFER>().Where(x => |
| | | (x.STATUS == BIZ_WMS_TRANSFER.STATUSs.INIT.GetValue() |
| | | || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.MANUAL.GetValue() |
| | | || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.WORKING.GetValue()) |
| | | (x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Init.GetValue() |
| | | || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Imported.GetValue() |
| | | || x.STATUS == BIZ_WMS_TRANSFER.STATUSs.Storing.GetValue()) |
| | | && x.AUTH_ORG == orgcode) |
| | | .WhereIF(!billcode.IsNullOrEmpty(), x => x.BILLCODE.Contains(billcode)) |
| | | .WhereIF(!billcode.IsNullOrEmpty(), x => x.ORDER_NO.Contains(billcode)) |
| | | .OrderByDescending(x => x.UPDATE_TIME.ToString("yyyy-MM-dd")) |
| | | //.OrderBy(x => x.REMARK == "L40774" ? 0 : 1) |
| | | //.OrderBy(x => x.SOURCECODE == null ? 1 : 0) |
| | | .OrderByDescending(x => x.BILLDATE) |
| | | .OrderBy(x => new { x.CREATE_TIME, x.BILLCODE}) |
| | | .OrderByDescending(x => x.ORDER_DATE) |
| | | .OrderBy(x => new { x.CREATE_TIME, x.ORDER_NO}) |
| | | |
| | | //.OrderBy(x => x.CREATE_TIME) |
| | | .ToPage(pageIndex, pageSize); |