new version Visualizzazione Service

This commit is contained in:
Surya Paolo
2023-04-04 15:26:56 +02:00
parent 6d1ad4132f
commit 8a77dabc22
8 changed files with 198 additions and 63 deletions

View File

@@ -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,
},
},