node-red-trexmes-commands 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/trexcommands.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-trexmes-commands",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "A node-red node to execute commands for Trex Mes Systems",
5
5
  "main": "trexcommands.js",
6
6
  "dependencies": {
package/trexcommands.js CHANGED
@@ -214,7 +214,9 @@ module.exports = function (RED) {
214
214
  FROM PLINETOP WITH (NOLOCK)
215
215
  LEFT OUTER JOIN PLINEDET WITH (NOLOCK) ON PLINETOP.COMPANYID = PLINEDET.COMPANYID AND PLINEDET.PLINEID = PLINETOP.PLINEID
216
216
  WHERE PLINEDET.COMPANYID = ${record.companyId} AND PLINEDET.PWORKSTATIONID = ${record.wsId}
217
- ORDER BY PLINETOP.PLINENO `;
217
+ ORDER BY PLINETOP.PLINENO
218
+ SET @SqlPWorkStation = ISNULL(@SqlPWorkStation,${record.wsId})
219
+ `;
218
220
 
219
221
  query = query + ` SELECT ${SqlIsYuklemeSirasi} A.PWORKSTATIONID, PW.PWORKSTATIONNO, A.SORTID, A.PID, A.DESCRIPTION, A.WORKSTARTDATE, A.PSTOPCAUSEID, A.SETUPDURATION, A.EMPDURATION,
220
222
  A.SPEED, A.PJOBORDERID, PJB.PROORDERSNO, PJB.TRANSCODE, A.PEQUIPMENTID, PE.PEQUIPMENTNO, A.DURATION, A.FPLANSTARTDATE, A.REQWORKEMPCOUNT, A.ITEMNO, A.PLANSHIFT, A.PLANWEEK, A.PLANDAY, A.PRIORITY,
@@ -258,7 +260,7 @@ module.exports = function (RED) {
258
260
  }
259
261
 
260
262
  query += " ORDER BY A.STARTDATE, ISNULL(A.SORTID,A.PID)";
261
-
263
+
262
264
  return query;
263
265
  }
264
266