new version Visualizzazione Service
This commit is contained in:
@@ -15,7 +15,7 @@ mongoose.plugin(schema => {
|
||||
|
||||
const MyHospSchema = new Schema({
|
||||
_id: {
|
||||
type: Number,
|
||||
type: String,
|
||||
},
|
||||
idapp: {
|
||||
type: String,
|
||||
@@ -172,6 +172,7 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params, user) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'mycities': 1,
|
||||
reported: 1,
|
||||
},
|
||||
@@ -186,13 +187,27 @@ MyHospSchema.statics.executeQueryTable = function(idapp, params, user) {
|
||||
MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
const MyHosp = this;
|
||||
|
||||
let myparsid = {
|
||||
$or: [
|
||||
{
|
||||
'_id': parseInt(idGood)
|
||||
},
|
||||
{
|
||||
'_id': idGood,
|
||||
}]
|
||||
};
|
||||
|
||||
if (tools.isNumber(id)) {
|
||||
myparsid = {'_id': parseInt(id)};
|
||||
} else {
|
||||
myparsid = {'_id': id};
|
||||
}
|
||||
|
||||
const query = [
|
||||
{
|
||||
'$match': {
|
||||
'$and': [
|
||||
{
|
||||
'_id': parseInt(id),
|
||||
},
|
||||
myparsid,
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -263,6 +278,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
},
|
||||
},
|
||||
@@ -316,6 +332,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
},
|
||||
},
|
||||
@@ -369,6 +386,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
},
|
||||
},
|
||||
@@ -422,6 +440,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
},
|
||||
},
|
||||
@@ -457,6 +476,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
preferences: 1,
|
||||
photos: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
note: 1,
|
||||
@@ -475,6 +495,7 @@ MyHospSchema.statics.getMyRecById = function(idapp, id) {
|
||||
"profile.mygroups": 1,
|
||||
"profile.mycircuits": 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user