¶Ô±ÈÐÂÎļþ |
| | |
| | | using MES.Service.DB; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using SqlSugar; |
| | | |
| | | namespace MES.Service.service.Warehouse; |
| | | |
| | | public class MesDepotSectionsManager : Repository<MesDepotSections> |
| | | { |
| | | //å½å类已ç»ç»§æ¿äº Repository å¢ãå ãæ¥ãæ¹çæ¹æ³ |
| | | |
| | | public string GetSectionName(WarehouseQuery query) |
| | | { |
| | | var sectionName = Db.Queryable<MesDepotSections, MesDepots>((a, b) => |
| | | new JoinQueryInfos(JoinType.Inner, a.DepotId == b.DepotId)) |
| | | .Where((a, b) => a.DepotSectionCode == query.sectionCode) |
| | | .Select((a, b) => a.DepotSectionName).Single(); |
| | | |
| | | if (sectionName == null) |
| | | { |
| | | throw new Exception("åºä½ç¼ç " + query.sectionCode + " ä¸åå¨ï¼è¯·ç¡®è®¤ï¼"); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |