|
@@ -2617,10 +2617,13 @@ async function getBasicInfo(compilationID, fileKind = null) {
|
|
|
const billValuation = compilation.bill_valuation.find(function (data) {
|
|
const billValuation = compilation.bill_valuation.find(function (data) {
|
|
|
return data.enable;
|
|
return data.enable;
|
|
|
});
|
|
});
|
|
|
- if (!billValuation) {
|
|
|
|
|
|
|
+ const rationValuation = compilation.ration_valuation.find(function (data) {
|
|
|
|
|
+ return data.enable;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (!billValuation && !rationValuation) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
- const engineerings = await engineeringModel.find({valuationID: billValuation.id}).lean();
|
|
|
|
|
|
|
+ const engineerings = await engineeringModel.find({valuationID: {$in: [billValuation.id, rationValuation.id] }, 'info_lib.0': {$exists: true}}).lean();
|
|
|
const engineering = engineerings.find(function (data) {
|
|
const engineering = engineerings.find(function (data) {
|
|
|
return data.info_lib && data.info_lib.length > 0;
|
|
return data.info_lib && data.info_lib.length > 0;
|
|
|
});
|
|
});
|