|  | @@ -666,14 +666,22 @@ const getSummaryMap = (items) => {
 | 
	
		
			
				|  |  |  // 匹配总表
 | 
	
		
			
				|  |  |  // 按规则匹配信息价的编码、别名编码、计算式(只匹配珠海建筑,要单独标记珠海地区);
 | 
	
		
			
				|  |  |  // 匹配规则:名称+规格型号+单位,与总表一致则自动填入编码、别名编码、计算式(珠海建筑);
 | 
	
		
			
				|  |  | -const matchSummary = async (compilationID, libID) => {
 | 
	
		
			
				|  |  | +const matchSummary = async (compilationID, libID, areaID) => {
 | 
	
		
			
				|  |  |      const updateBulks = [];
 | 
	
		
			
				|  |  | -    const areas = await priceInfoAreaModel.find({ compilationID }, '-_id ID name').lean();
 | 
	
		
			
				|  |  | +    const areaFilter = { compilationID };
 | 
	
		
			
				|  |  | +    if (areaID) {
 | 
	
		
			
				|  |  | +        areaFilter.ID = areaID;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    const areas = await priceInfoAreaModel.find(areaFilter, '-_id ID name').lean();
 | 
	
		
			
				|  |  |      const areaNameMap = {};
 | 
	
		
			
				|  |  |      areas.forEach(area => {
 | 
	
		
			
				|  |  |          areaNameMap[area.ID] = area.name;
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    const priceItems = await priceInfoItemModel.find({ libID }, '-_id ID compilationID name specs unit areaID period').lean();
 | 
	
		
			
				|  |  | +    const filter = { libID };
 | 
	
		
			
				|  |  | +    if (areaID) {
 | 
	
		
			
				|  |  | +        filter.areaID = areaID;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    const priceItems = await priceInfoItemModel.find(filter, '-_id ID compilationID name specs unit areaID period').lean();
 | 
	
		
			
				|  |  |      const summaryItems = await priceInfoSummaryModel.find({}, '-_id ID name specs unit code classCode expString').lean();
 | 
	
		
			
				|  |  |      const summaryMap = getSummaryMap(summaryItems);
 | 
	
		
			
				|  |  |      priceItems.forEach(priceItem => {
 | 
	
	
		
			
				|  | @@ -705,12 +713,16 @@ const matchSummary = async (compilationID, libID) => {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // 获取空数据(没有别名编码)
 | 
	
		
			
				|  |  | -const getPriceEmptyData = async (compilationID, libID) => {
 | 
	
		
			
				|  |  | +const getPriceEmptyData = async (compilationID, libID, areaID) => {
 | 
	
		
			
				|  |  |      const lib = await priceInfoLibModel.findOne({ ID: libID }).lean();
 | 
	
		
			
				|  |  |      if (!lib) {
 | 
	
		
			
				|  |  |          return [];
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    const priceItems = await priceInfoItemModel.find({ compilationID, libID, period: lib.period }).lean();
 | 
	
		
			
				|  |  | +    const filter = { compilationID, libID, period: lib.period };
 | 
	
		
			
				|  |  | +    if (areaID) {
 | 
	
		
			
				|  |  | +        filter.areaID = areaID;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    const priceItems = await priceInfoItemModel.find(filter).lean();
 | 
	
		
			
				|  |  |      return priceItems.filter(item => !item.classCode);
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  
 |