| | |
| | | //当前类已经继承了 Repository 增、删、查、改的方法 |
| | | //这里面写的代码不会给覆盖,如果要重新生成请删除 MesInvItemOutsManager.cs |
| | | |
| | | public List<MesInvItemOuts> GetProductionPickPage(WarehouseQuery query) |
| | | public (List<MesInvItemOuts> Items, int TotalCount) GetProductionPickPage(WarehouseQuery query) |
| | | { |
| | | return Db.Queryable<MesInvItemOuts, MesDepots>((a, o) => |
| | | int totalCount = 0; // 初始化 totalCount |
| | | // 确保这里使用 'out' 来获取总行数 |
| | | var result = Db.Queryable<MesInvItemOuts, MesDepots>((a, o) => |
| | | new JoinQueryInfos( |
| | | JoinType.Left, |
| | | o.DepotCode == a.DepotCode && a.Company == o.Company && |
| | | a.Factory == o.Factory |
| | | a.Factory == a.Factory |
| | | )) |
| | | .Where((a, o) => a.BillTypeId == 200 && |
| | | a.TransactionNo == 201 && |
| | |
| | | ItemOutNo = a.ItemOutNo, |
| | | DepotName = o.DepotName // 需要动态添加的字段 |
| | | }) |
| | | .ToPageList(query.PageIndex, query.Limit); |
| | | .ToPageList(query.PageIndex, query.Limit, ref totalCount); // 确保这里使用 'out' |
| | | |
| | | return (result, totalCount); |
| | | } |
| | | |
| | | public MaterialReceipt GetProductionPick(WarehouseQuery query) |
| | |
| | | if (query.id != null) |
| | | { |
| | | var mesInvItemOutsList = GetProductionPickPage(query); |
| | | if (mesInvItemOutsList.Count <= 0) return form; |
| | | if (mesInvItemOutsList.TotalCount <= 0) return form; |
| | | |
| | | form.ItemOuts = mesInvItemOutsList[0]; |
| | | form.ItemOuts = mesInvItemOutsList.Items[0]; |
| | | form.ItemsList = getProductionItemsList(query); |
| | | form.InvItemoutCDetails = GetProductionDetails(query); |
| | | } |
| | |
| | | throw new Exception("获取数据失败"); |
| | | } |
| | | |
| | | private MessageCenter ProductionMesToErpParam(WarehouseQuery query) |
| | | public MessageCenter ProductionMesToErpParam(WarehouseQuery query) |
| | | { |
| | | var erpParameters = ""; |
| | | var title = ""; |