|
|
|
@ -1109,6 +1109,53 @@ fastify.post("/api/createwaterlevelSensorintime/:storeId", {
|
|
|
|
|
handler: storeController.createSensor,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/updateSensorById/:_id", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for editing Sensors after time",
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
summary: "This is for editing Sensors after time",
|
|
|
|
|
params: {
|
|
|
|
|
required: ["_id"],
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
_id: {
|
|
|
|
|
type: "string",
|
|
|
|
|
description: "storeId",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
|
|
|
|
|
properties: {
|
|
|
|
|
batchno: { type: "string", description: "Batch number of the sensor" },
|
|
|
|
|
model: { type: "string", description: "Model of the sensor" },
|
|
|
|
|
type: { type: "string", description: "Type of sensor" },
|
|
|
|
|
quantity: { type: "number", description: "Quantity of sensors" },
|
|
|
|
|
indate: { type: "string", description: "Date of sensor entry" },
|
|
|
|
|
hardwareId_company: { type: "string", description: "Company name of hardware ID" },
|
|
|
|
|
hardwareId: { type: "string", nullable: true, description: "Hardware ID (if applicable)" },
|
|
|
|
|
masterId: { type: "string", nullable: true, description: "Master ID reference" },
|
|
|
|
|
qccheck: { type: "string", nullable: true, description: "QC check status" },
|
|
|
|
|
qccheckdate: { type: "string", nullable: true, description: "QC check date" },
|
|
|
|
|
qcby: { type: "string", nullable: true, description: "QC checked by" },
|
|
|
|
|
comment: { type: "string", default: "0", description: "Comment field" },
|
|
|
|
|
outforrepairdate: { type: "string", default: "0", description: "Date sensor sent for repair" },
|
|
|
|
|
sendto: { type: "string", nullable: true, description: "Destination for repair" },
|
|
|
|
|
repairfeedback: { type: "string", default: "0", description: "Repair feedback" },
|
|
|
|
|
dateofinstallation: { type: "string", nullable: true, description: "Installation date" },
|
|
|
|
|
installedby: { type: "string", default: "0", description: "Person who installed the sensor" },
|
|
|
|
|
customerId: { type: "string", default: "0", description: "Customer ID" },
|
|
|
|
|
comments: { type: "string", default: "0", description: "Additional comments" },
|
|
|
|
|
sensor_type: { type: "string", enum: ["slaves", "motorswitch", "master"], description: "Type of sensor" }
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handler: storeController.updateSensorById,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getbatchnumbers/:storeId/:type", {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
@ -1142,7 +1189,7 @@ fastify.get("/api/getiots/:storeId/:type", {
|
|
|
|
|
schema: {
|
|
|
|
|
tags: ["Store-Data"],
|
|
|
|
|
description: "This is to Get iots of particular store",
|
|
|
|
|
summary: "This is to iots of particular store",
|
|
|
|
|
summary: "This is to get iots of particular store",
|
|
|
|
|
params: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|