| | |
| | | public class MesDepotSectionsManager : Repository<MesDepotSections> |
| | | { |
| | | //当前类已经继承了 Repository 增、删、查、改的方法 |
| | | |
| | | |
| | | public string GetSectionName(WarehouseQuery query) |
| | | { |
| | | var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) => |
| | |
| | | |
| | | return sectionName; |
| | | } |
| | | |
| | | public MesDepotSections ScanInDepotSectionsName(WarehouseQuery query) |
| | | { |
| | | |
| | | if (string.IsNullOrEmpty(query.sectionCode)) |
| | | { |
| | | throw new Exception("请扫库位条码!"); |
| | | } |
| | | |
| | | var mesDepotSections = Db.Queryable<MesDepotSections, MesDepots>( |
| | | (a, b) => |
| | | new JoinQueryInfos(JoinType.Inner, a.DepotId == b.DepotId)) |
| | | .Where((a, b) => a.DepotSectionCode == query.sectionCode) |
| | | .Select((a, b) => new MesDepotSections |
| | | { |
| | | DepotSectionName = a.DepotSectionName, |
| | | DepotCode = b.DepotCode, |
| | | DepotName = b.DepotName |
| | | }).First(); |
| | | |
| | | if (mesDepotSections == null) |
| | | { |
| | | throw new Exception("库位编码" + query.sectionCode + " 不存在,请确认!"); |
| | | } |
| | | |
| | | return mesDepotSections; |
| | | } |
| | | |
| | | public MesInvItemStocks ScanEditBarcode(WarehouseQuery entity) |
| | | { |
| | | if (string.IsNullOrEmpty(entity.sectionCode)) |
| | | { |
| | | throw new Exception("请扫库位条码!"); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |