refactored material track code for front end
This commit is contained in:
parent
c36cf5fedc
commit
d7d8fc0289
File diff suppressed because it is too large
Load Diff
@ -1,761 +0,0 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "1010",
|
||||
"<2>": "8",
|
||||
"<3>": ""
|
||||
},
|
||||
"record2": {
|
||||
"<1>": {
|
||||
"<1,1>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<1,2>": "",
|
||||
"<1,3>": "WINDOW",
|
||||
"<1,4>": "",
|
||||
"<1,5>": "395",
|
||||
"<1,6>": "241",
|
||||
"<1,7>": "-578",
|
||||
"<1,8>": "-318",
|
||||
"<1,9>": "Material Track Report",
|
||||
"<1,10>": {
|
||||
"<1,10,1>": "0x84C80000",
|
||||
"<1,10,2>": "0x0"
|
||||
},
|
||||
"<1,11>": {
|
||||
"<1,11,1>": "0x0",
|
||||
"<1,11,2>": "0x80000000"
|
||||
},
|
||||
"<1,12>": "0",
|
||||
"<1,13>": "-2",
|
||||
"<1,14>": "0",
|
||||
"<1,15>": "",
|
||||
"<1,16>": "",
|
||||
"<1,17>": "",
|
||||
"<1,18>": {
|
||||
"<1,18,1>": {
|
||||
"<1,18,1,1>": "R",
|
||||
"<1,18,1,2>": "EXECUTE",
|
||||
"<1,18,1,3>": "SYSPROG*STPROCEXE**OBJ_CALL_EVENT",
|
||||
"<1,18,1,4>": {
|
||||
"<1,18,1,4,1>": "@SELF",
|
||||
"<1,18,1,4,2>": "@EVENT",
|
||||
"<1,18,1,4,3>": "@PARAM1",
|
||||
"<1,18,1,4,4>": "@PARAM2",
|
||||
"<1,18,1,4,5>": "@PARAM3",
|
||||
"<1,18,1,4,6>": "@PARAM4",
|
||||
"<1,18,1,4,7>": "@PARAM5",
|
||||
"<1,18,1,4,8>": "@PARAM6"
|
||||
},
|
||||
"<1,18,1,5>": "",
|
||||
"<1,18,1,6>": ""
|
||||
},
|
||||
"<1,18,2>": ""
|
||||
},
|
||||
"<1,19>": {
|
||||
"<1,19,1>": "CREATE",
|
||||
"<1,19,2>": ""
|
||||
},
|
||||
"<1,20>": "",
|
||||
"<1,21>": "",
|
||||
"<1,22>": "",
|
||||
"<1,23>": "",
|
||||
"<1,24>": {
|
||||
"<1,24,1>": "0",
|
||||
"<1,24,2>": "0",
|
||||
"<1,24,3>": "0",
|
||||
"<1,24,4>": "0",
|
||||
"<1,24,5>": "0",
|
||||
"<1,24,6>": "0"
|
||||
},
|
||||
"<1,25>": "0",
|
||||
"<1,26>": "0",
|
||||
"<1,27>": "",
|
||||
"<1,28>": "",
|
||||
"<1,29>": "",
|
||||
"<1,30>": "",
|
||||
"<1,31>": "",
|
||||
"<1,32>": {
|
||||
"<1,32,1>": "0x7FFFE",
|
||||
"<1,32,2>": "0xF001E808"
|
||||
},
|
||||
"<1,33>": "",
|
||||
"<1,34>": "LSL2*IMAGE*ICO*INFINEON",
|
||||
"<1,35>": "",
|
||||
"<1,36>": "",
|
||||
"<1,37>": {
|
||||
"<1,37,1>": "0x10001",
|
||||
"<1,37,2>": "0x10001"
|
||||
},
|
||||
"<1,38>": {
|
||||
"<1,38,1>": "1",
|
||||
"<1,38,2>": "1"
|
||||
},
|
||||
"<1,39>": "",
|
||||
"<1,40>": "0",
|
||||
"<1,41>": "",
|
||||
"<1,42>": "",
|
||||
"<1,43>": "",
|
||||
"<1,44>": "",
|
||||
"<1,45>": "",
|
||||
"<1,46>": "",
|
||||
"<1,47>": "",
|
||||
"<1,48>": "",
|
||||
"<1,49>": "",
|
||||
"<1,50>": "",
|
||||
"<1,51>": "",
|
||||
"<1,52>": ""
|
||||
}
|
||||
},
|
||||
"record3": {
|
||||
"<1>": {
|
||||
"<1,1>": "OLE_EDT_COL_FILTER",
|
||||
"<1,2>": "",
|
||||
"<1,3>": "OLECONTROL.SRP.Edittable.1",
|
||||
"<1,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<1,5>": "13",
|
||||
"<1,6>": "30",
|
||||
"<1,7>": "200",
|
||||
"<1,8>": "276",
|
||||
"<1,9>": "SRP.Edittable.1",
|
||||
"<1,10>": {
|
||||
"<1,10,1>": "0x56000000",
|
||||
"<1,10,2>": "0x0"
|
||||
},
|
||||
"<1,11>": {
|
||||
"<1,11,1>": "0x4",
|
||||
"<1,11,2>": "0x80000000"
|
||||
},
|
||||
"<1,12>": "1",
|
||||
"<1,13>": "-2",
|
||||
"<1,14>": "0",
|
||||
"<1,15>": {
|
||||
"<1,15,1>": {
|
||||
"<1,15,1,1>": "Segoe UI",
|
||||
"<1,15,1,2>": "-12",
|
||||
"<1,15,1,3>": "400",
|
||||
"<1,15,1,4>": "0",
|
||||
"<1,15,1,5>": "0",
|
||||
"<1,15,1,6>": "0",
|
||||
"<1,15,1,7>": "0",
|
||||
"<1,15,1,8>": "34",
|
||||
"<1,15,1,9>": "0",
|
||||
"<1,15,1,10>": "3",
|
||||
"<1,15,1,11>": "2",
|
||||
"<1,15,1,12>": "1",
|
||||
"<1,15,1,13>": "0",
|
||||
"<1,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<1,16>": "",
|
||||
"<1,17>": "",
|
||||
"<1,18>": {
|
||||
"<1,18,1>": {
|
||||
"<1,18,1,1>": "R",
|
||||
"<1,18,1,2>": "EXECUTE",
|
||||
"<1,18,1,3>": "SYSPROG*STPROCEXE**OBJ_CALL_EVENT",
|
||||
"<1,18,1,4>": {
|
||||
"<1,18,1,4,1>": "@SELF",
|
||||
"<1,18,1,4,2>": "@EVENT",
|
||||
"<1,18,1,4,3>": "@PARAM1",
|
||||
"<1,18,1,4,4>": "@PARAM2",
|
||||
"<1,18,1,4,5>": "@PARAM3",
|
||||
"<1,18,1,4,6>": "@PARAM4",
|
||||
"<1,18,1,4,7>": "@PARAM5",
|
||||
"<1,18,1,4,8>": "@PARAM6"
|
||||
},
|
||||
"<1,18,1,5>": "",
|
||||
"<1,18,1,6>": ""
|
||||
},
|
||||
"<1,18,2>": ""
|
||||
},
|
||||
"<1,19>": {
|
||||
"<1,19,1>": "OLE",
|
||||
"<1,19,2>": ""
|
||||
},
|
||||
"<1,20>": "",
|
||||
"<1,21>": "",
|
||||
"<1,22>": "",
|
||||
"<1,23>": "",
|
||||
"<1,24>": "",
|
||||
"<1,25>": "0",
|
||||
"<1,26>": "0",
|
||||
"<1,27>": "",
|
||||
"<1,28>": "<<None>>",
|
||||
"<1,29>": "<<None>>",
|
||||
"<1,30>": "<<None>>",
|
||||
"<1,31>": "0",
|
||||
"<1,32>": {
|
||||
"<1,32,1>": "0x7fffe",
|
||||
"<1,32,2>": "0xf0016400"
|
||||
},
|
||||
"<1,33>": "",
|
||||
"<1,34>": "",
|
||||
"<1,35>": "",
|
||||
"<1,36>": "0000000000000000",
|
||||
"<1,37>": ""
|
||||
},
|
||||
"<2>": {
|
||||
"<2,1>": "OLE_EDT_LOC_FILTER",
|
||||
"<2,2>": "",
|
||||
"<2,3>": "OLECONTROL.SRP.Edittable.1",
|
||||
"<2,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<2,5>": "231",
|
||||
"<2,6>": "31",
|
||||
"<2,7>": "335",
|
||||
"<2,8>": "180",
|
||||
"<2,9>": "SRP.Edittable.1",
|
||||
"<2,10>": {
|
||||
"<2,10,1>": "0x56000000",
|
||||
"<2,10,2>": "0x0"
|
||||
},
|
||||
"<2,11>": {
|
||||
"<2,11,1>": "0x0",
|
||||
"<2,11,2>": "0x80000000"
|
||||
},
|
||||
"<2,12>": "2",
|
||||
"<2,13>": "-2",
|
||||
"<2,14>": "0",
|
||||
"<2,15>": {
|
||||
"<2,15,1>": {
|
||||
"<2,15,1,1>": "Segoe UI",
|
||||
"<2,15,1,2>": "-12",
|
||||
"<2,15,1,3>": "400",
|
||||
"<2,15,1,4>": "0",
|
||||
"<2,15,1,5>": "0",
|
||||
"<2,15,1,6>": "0",
|
||||
"<2,15,1,7>": "0",
|
||||
"<2,15,1,8>": "34",
|
||||
"<2,15,1,9>": "0",
|
||||
"<2,15,1,10>": "3",
|
||||
"<2,15,1,11>": "2",
|
||||
"<2,15,1,12>": "1",
|
||||
"<2,15,1,13>": "0",
|
||||
"<2,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<2,16>": "",
|
||||
"<2,17>": "",
|
||||
"<2,18>": {
|
||||
"<2,18,1>": {
|
||||
"<2,18,1,1>": "R",
|
||||
"<2,18,1,2>": "EXECUTE",
|
||||
"<2,18,1,3>": "SYSPROG*STPROCEXE**OBJ_CALL_EVENT",
|
||||
"<2,18,1,4>": {
|
||||
"<2,18,1,4,1>": "@SELF",
|
||||
"<2,18,1,4,2>": "@EVENT",
|
||||
"<2,18,1,4,3>": "@PARAM1",
|
||||
"<2,18,1,4,4>": "@PARAM2",
|
||||
"<2,18,1,4,5>": "@PARAM3",
|
||||
"<2,18,1,4,6>": "@PARAM4",
|
||||
"<2,18,1,4,7>": "@PARAM5",
|
||||
"<2,18,1,4,8>": "@PARAM6"
|
||||
},
|
||||
"<2,18,1,5>": "",
|
||||
"<2,18,1,6>": ""
|
||||
},
|
||||
"<2,18,2>": ""
|
||||
},
|
||||
"<2,19>": {
|
||||
"<2,19,1>": "OLE",
|
||||
"<2,19,2>": ""
|
||||
},
|
||||
"<2,20>": "",
|
||||
"<2,21>": "",
|
||||
"<2,22>": "",
|
||||
"<2,23>": "",
|
||||
"<2,24>": "",
|
||||
"<2,25>": "0",
|
||||
"<2,26>": "0",
|
||||
"<2,27>": "",
|
||||
"<2,28>": "<<None>>",
|
||||
"<2,29>": "<<None>>",
|
||||
"<2,30>": "<<None>>",
|
||||
"<2,31>": "0",
|
||||
"<2,32>": {
|
||||
"<2,32,1>": "0x7fffe",
|
||||
"<2,32,2>": "0xf0016c00"
|
||||
},
|
||||
"<2,33>": "",
|
||||
"<2,34>": "",
|
||||
"<2,35>": "",
|
||||
"<2,36>": "0000000000000000",
|
||||
"<2,37>": ""
|
||||
},
|
||||
"<3>": {
|
||||
"<3,1>": "PUB_GEN_REPORT",
|
||||
"<3,2>": "",
|
||||
"<3,3>": "PUSHBUTTON",
|
||||
"<3,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<3,5>": "464",
|
||||
"<3,6>": "279",
|
||||
"<3,7>": "106",
|
||||
"<3,8>": "27",
|
||||
"<3,9>": "&Generate Report\r\n",
|
||||
"<3,10>": {
|
||||
"<3,10,1>": "0x56002000",
|
||||
"<3,10,2>": "0x0"
|
||||
},
|
||||
"<3,11>": {
|
||||
"<3,11,1>": "0x100",
|
||||
"<3,11,2>": "0x80000000"
|
||||
},
|
||||
"<3,12>": "3",
|
||||
"<3,13>": "-2",
|
||||
"<3,14>": "0",
|
||||
"<3,15>": {
|
||||
"<3,15,1>": {
|
||||
"<3,15,1,1>": "Segoe UI",
|
||||
"<3,15,1,2>": "-12",
|
||||
"<3,15,1,3>": "400",
|
||||
"<3,15,1,4>": "0",
|
||||
"<3,15,1,5>": "0",
|
||||
"<3,15,1,6>": "0",
|
||||
"<3,15,1,7>": "0",
|
||||
"<3,15,1,8>": "34",
|
||||
"<3,15,1,9>": "0",
|
||||
"<3,15,1,10>": "3",
|
||||
"<3,15,1,11>": "2",
|
||||
"<3,15,1,12>": "1",
|
||||
"<3,15,1,13>": "0",
|
||||
"<3,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<3,16>": "",
|
||||
"<3,17>": "",
|
||||
"<3,18>": {
|
||||
"<3,18,1>": {
|
||||
"<3,18,1,1>": "R",
|
||||
"<3,18,1,2>": "EXECUTE",
|
||||
"<3,18,1,3>": "SYSPROG*STPROCEXE**OBJ_CALL_EVENT",
|
||||
"<3,18,1,4>": {
|
||||
"<3,18,1,4,1>": "@SELF",
|
||||
"<3,18,1,4,2>": "@EVENT",
|
||||
"<3,18,1,4,3>": "@PARAM1",
|
||||
"<3,18,1,4,4>": "@PARAM2",
|
||||
"<3,18,1,4,5>": "@PARAM3",
|
||||
"<3,18,1,4,6>": "@PARAM4",
|
||||
"<3,18,1,4,7>": "@PARAM5",
|
||||
"<3,18,1,4,8>": "@PARAM6"
|
||||
},
|
||||
"<3,18,1,5>": "",
|
||||
"<3,18,1,6>": ""
|
||||
},
|
||||
"<3,18,2>": ""
|
||||
},
|
||||
"<3,19>": {
|
||||
"<3,19,1>": "CLICK",
|
||||
"<3,19,2>": ""
|
||||
},
|
||||
"<3,20>": "",
|
||||
"<3,21>": "",
|
||||
"<3,22>": "",
|
||||
"<3,23>": "",
|
||||
"<3,24>": "",
|
||||
"<3,25>": "0",
|
||||
"<3,26>": "0",
|
||||
"<3,27>": "",
|
||||
"<3,28>": "<<None>>",
|
||||
"<3,29>": "<<None>>",
|
||||
"<3,30>": "<<None>>",
|
||||
"<3,31>": "0",
|
||||
"<3,32>": {
|
||||
"<3,32,1>": "0x7fffe",
|
||||
"<3,32,2>": "0xf0016008"
|
||||
},
|
||||
"<3,33>": "",
|
||||
"<3,34>": "",
|
||||
"<3,35>": "",
|
||||
"<3,36>": "",
|
||||
"<3,37>": "",
|
||||
"<3,38>": "",
|
||||
"<3,39>": "",
|
||||
"<3,40>": "1",
|
||||
"<3,41>": "",
|
||||
"<3,42>": "",
|
||||
"<3,43>": "",
|
||||
"<3,44>": "",
|
||||
"<3,45>": "",
|
||||
"<3,46>": "",
|
||||
"<3,47>": "",
|
||||
"<3,48>": "",
|
||||
"<3,49>": "",
|
||||
"<3,50>": "",
|
||||
"<3,51>": ""
|
||||
},
|
||||
"<4>": {
|
||||
"<4,1>": "PUB_SAVE_SETTINGS",
|
||||
"<4,2>": "",
|
||||
"<4,3>": "PUSHBUTTON",
|
||||
"<4,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<4,5>": "350",
|
||||
"<4,6>": "279",
|
||||
"<4,7>": "106",
|
||||
"<4,8>": "27",
|
||||
"<4,9>": "&Save Settings",
|
||||
"<4,10>": {
|
||||
"<4,10,1>": "0x56002000",
|
||||
"<4,10,2>": "0x0"
|
||||
},
|
||||
"<4,11>": {
|
||||
"<4,11,1>": "0x100",
|
||||
"<4,11,2>": "0x80000000"
|
||||
},
|
||||
"<4,12>": "4",
|
||||
"<4,13>": "-2",
|
||||
"<4,14>": "0",
|
||||
"<4,15>": {
|
||||
"<4,15,1>": {
|
||||
"<4,15,1,1>": "Segoe UI",
|
||||
"<4,15,1,2>": "-12",
|
||||
"<4,15,1,3>": "400",
|
||||
"<4,15,1,4>": "0",
|
||||
"<4,15,1,5>": "0",
|
||||
"<4,15,1,6>": "0",
|
||||
"<4,15,1,7>": "0",
|
||||
"<4,15,1,8>": "34",
|
||||
"<4,15,1,9>": "0",
|
||||
"<4,15,1,10>": "3",
|
||||
"<4,15,1,11>": "2",
|
||||
"<4,15,1,12>": "1",
|
||||
"<4,15,1,13>": "0",
|
||||
"<4,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<4,16>": "",
|
||||
"<4,17>": "",
|
||||
"<4,18>": {
|
||||
"<4,18,1>": {
|
||||
"<4,18,1,1>": "R",
|
||||
"<4,18,1,2>": "EXECUTE",
|
||||
"<4,18,1,3>": "SYSPROG*STPROCEXE**OBJ_CALL_EVENT",
|
||||
"<4,18,1,4>": {
|
||||
"<4,18,1,4,1>": "@SELF",
|
||||
"<4,18,1,4,2>": "@EVENT",
|
||||
"<4,18,1,4,3>": "@PARAM1",
|
||||
"<4,18,1,4,4>": "@PARAM2",
|
||||
"<4,18,1,4,5>": "@PARAM3",
|
||||
"<4,18,1,4,6>": "@PARAM4",
|
||||
"<4,18,1,4,7>": "@PARAM5",
|
||||
"<4,18,1,4,8>": "@PARAM6"
|
||||
},
|
||||
"<4,18,1,5>": "",
|
||||
"<4,18,1,6>": ""
|
||||
},
|
||||
"<4,18,2>": ""
|
||||
},
|
||||
"<4,19>": {
|
||||
"<4,19,1>": "CLICK",
|
||||
"<4,19,2>": ""
|
||||
},
|
||||
"<4,20>": "",
|
||||
"<4,21>": "",
|
||||
"<4,22>": "",
|
||||
"<4,23>": "",
|
||||
"<4,24>": "",
|
||||
"<4,25>": "0",
|
||||
"<4,26>": "0",
|
||||
"<4,27>": "",
|
||||
"<4,28>": "<<None>>",
|
||||
"<4,29>": "<<None>>",
|
||||
"<4,30>": "<<None>>",
|
||||
"<4,31>": "0",
|
||||
"<4,32>": {
|
||||
"<4,32,1>": "0x7fffe",
|
||||
"<4,32,2>": "0xf0016008"
|
||||
},
|
||||
"<4,33>": "",
|
||||
"<4,34>": "",
|
||||
"<4,35>": "",
|
||||
"<4,36>": "",
|
||||
"<4,37>": "",
|
||||
"<4,38>": "",
|
||||
"<4,39>": "",
|
||||
"<4,40>": "1",
|
||||
"<4,41>": "",
|
||||
"<4,42>": "",
|
||||
"<4,43>": "",
|
||||
"<4,44>": "",
|
||||
"<4,45>": "",
|
||||
"<4,46>": "",
|
||||
"<4,47>": "",
|
||||
"<4,48>": "",
|
||||
"<4,49>": "",
|
||||
"<4,50>": "",
|
||||
"<4,51>": ""
|
||||
},
|
||||
"<5>": {
|
||||
"<5,1>": "OLE_SUBCLASS",
|
||||
"<5,2>": "",
|
||||
"<5,3>": "OLECONTROL.SRP.Subclass.1",
|
||||
"<5,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<5,5>": "38",
|
||||
"<5,6>": "0",
|
||||
"<5,7>": "116",
|
||||
"<5,8>": "28",
|
||||
"<5,9>": "SRP.Subclass.1",
|
||||
"<5,10>": {
|
||||
"<5,10,1>": "0x46000000",
|
||||
"<5,10,2>": "0x0"
|
||||
},
|
||||
"<5,11>": {
|
||||
"<5,11,1>": "0x0",
|
||||
"<5,11,2>": "0x80000000"
|
||||
},
|
||||
"<5,12>": "5",
|
||||
"<5,13>": "-2",
|
||||
"<5,14>": "0",
|
||||
"<5,15>": {
|
||||
"<5,15,1>": {
|
||||
"<5,15,1,1>": "Segoe UI",
|
||||
"<5,15,1,2>": "-12",
|
||||
"<5,15,1,3>": "400",
|
||||
"<5,15,1,4>": "0",
|
||||
"<5,15,1,5>": "0",
|
||||
"<5,15,1,6>": "0",
|
||||
"<5,15,1,7>": "0",
|
||||
"<5,15,1,8>": "34",
|
||||
"<5,15,1,9>": "0",
|
||||
"<5,15,1,10>": "3",
|
||||
"<5,15,1,11>": "2",
|
||||
"<5,15,1,12>": "1",
|
||||
"<5,15,1,13>": "0",
|
||||
"<5,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<5,16>": "",
|
||||
"<5,17>": "",
|
||||
"<5,18>": "",
|
||||
"<5,19>": "",
|
||||
"<5,20>": "",
|
||||
"<5,21>": "",
|
||||
"<5,22>": "",
|
||||
"<5,23>": "",
|
||||
"<5,24>": "",
|
||||
"<5,25>": "0",
|
||||
"<5,26>": "0",
|
||||
"<5,27>": "",
|
||||
"<5,28>": "<<None>>",
|
||||
"<5,29>": "<<None>>",
|
||||
"<5,30>": "<<None>>",
|
||||
"<5,31>": "0",
|
||||
"<5,32>": {
|
||||
"<5,32,1>": "0x7fffe",
|
||||
"<5,32,2>": "0xf0016800"
|
||||
},
|
||||
"<5,33>": "",
|
||||
"<5,34>": "",
|
||||
"<5,35>": "",
|
||||
"<5,36>": "",
|
||||
"<5,37>": ""
|
||||
},
|
||||
"<6>": {
|
||||
"<6,1>": "OLE_POPUP",
|
||||
"<6,2>": "",
|
||||
"<6,3>": "OLECONTROL.SRP.Popup.1",
|
||||
"<6,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<6,5>": "158",
|
||||
"<6,6>": "0",
|
||||
"<6,7>": "116",
|
||||
"<6,8>": "28",
|
||||
"<6,9>": "SRP.Popup.1",
|
||||
"<6,10>": {
|
||||
"<6,10,1>": "0x46000000",
|
||||
"<6,10,2>": "0x0"
|
||||
},
|
||||
"<6,11>": {
|
||||
"<6,11,1>": "0x0",
|
||||
"<6,11,2>": "0x80000000"
|
||||
},
|
||||
"<6,12>": "6",
|
||||
"<6,13>": "-2",
|
||||
"<6,14>": "0",
|
||||
"<6,15>": {
|
||||
"<6,15,1>": {
|
||||
"<6,15,1,1>": "Segoe UI",
|
||||
"<6,15,1,2>": "-12",
|
||||
"<6,15,1,3>": "400",
|
||||
"<6,15,1,4>": "0",
|
||||
"<6,15,1,5>": "0",
|
||||
"<6,15,1,6>": "0",
|
||||
"<6,15,1,7>": "0",
|
||||
"<6,15,1,8>": "34",
|
||||
"<6,15,1,9>": "0",
|
||||
"<6,15,1,10>": "3",
|
||||
"<6,15,1,11>": "2",
|
||||
"<6,15,1,12>": "1",
|
||||
"<6,15,1,13>": "0",
|
||||
"<6,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<6,16>": "",
|
||||
"<6,17>": "",
|
||||
"<6,18>": "",
|
||||
"<6,19>": "",
|
||||
"<6,20>": "",
|
||||
"<6,21>": "",
|
||||
"<6,22>": "",
|
||||
"<6,23>": "",
|
||||
"<6,24>": "",
|
||||
"<6,25>": "0",
|
||||
"<6,26>": "0",
|
||||
"<6,27>": "",
|
||||
"<6,28>": "<<None>>",
|
||||
"<6,29>": "<<None>>",
|
||||
"<6,30>": "<<None>>",
|
||||
"<6,31>": "0",
|
||||
"<6,32>": {
|
||||
"<6,32,1>": "0x7fffe",
|
||||
"<6,32,2>": "0xf0016800"
|
||||
},
|
||||
"<6,33>": "",
|
||||
"<6,34>": "",
|
||||
"<6,35>": "",
|
||||
"<6,36>": "",
|
||||
"<6,37>": ""
|
||||
},
|
||||
"<7>": {
|
||||
"<7,1>": "OLE_REPORT_LINE",
|
||||
"<7,2>": "",
|
||||
"<7,3>": "OLECONTROL.SRP.Picture.1",
|
||||
"<7,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<7,5>": "12",
|
||||
"<7,6>": "9",
|
||||
"<7,7>": "202",
|
||||
"<7,8>": "13",
|
||||
"<7,9>": "SRP.Picture.1",
|
||||
"<7,10>": {
|
||||
"<7,10,1>": "0x56000000",
|
||||
"<7,10,2>": "0x0"
|
||||
},
|
||||
"<7,11>": {
|
||||
"<7,11,1>": "0x0",
|
||||
"<7,11,2>": "0x80000000"
|
||||
},
|
||||
"<7,12>": "7",
|
||||
"<7,13>": "-2",
|
||||
"<7,14>": "0",
|
||||
"<7,15>": {
|
||||
"<7,15,1>": {
|
||||
"<7,15,1,1>": "Segoe UI",
|
||||
"<7,15,1,2>": "-12",
|
||||
"<7,15,1,3>": "400",
|
||||
"<7,15,1,4>": "0",
|
||||
"<7,15,1,5>": "0",
|
||||
"<7,15,1,6>": "0",
|
||||
"<7,15,1,7>": "0",
|
||||
"<7,15,1,8>": "34",
|
||||
"<7,15,1,9>": "0",
|
||||
"<7,15,1,10>": "3",
|
||||
"<7,15,1,11>": "2",
|
||||
"<7,15,1,12>": "1",
|
||||
"<7,15,1,13>": "0",
|
||||
"<7,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<7,16>": "",
|
||||
"<7,17>": "",
|
||||
"<7,18>": "",
|
||||
"<7,19>": "",
|
||||
"<7,20>": "",
|
||||
"<7,21>": "",
|
||||
"<7,22>": "",
|
||||
"<7,23>": "",
|
||||
"<7,24>": "",
|
||||
"<7,25>": "0",
|
||||
"<7,26>": "0",
|
||||
"<7,27>": "",
|
||||
"<7,28>": "<<None>>",
|
||||
"<7,29>": "<<None>>",
|
||||
"<7,30>": "<<None>>",
|
||||
"<7,31>": "0",
|
||||
"<7,32>": {
|
||||
"<7,32,1>": "0x7fffe",
|
||||
"<7,32,2>": "0xf0016c00"
|
||||
},
|
||||
"<7,33>": "",
|
||||
"<7,34>": "",
|
||||
"<7,35>": "",
|
||||
"<7,36>": "05000000000000000000000032000000FFFEFF044E006F006E006500FFFEFF0341006C006C00FFFEFF044E006F006E006500FFFEFF0744006900760069006400650072000100000001000000FFFEFF0D430065006E00740065007200FEF0430065006E00740065007200FFFEFF00FFFEFF0443006C0069007000FFFEFF044100750074006F00FFFEFF0E5200650070006F0072007400200043006F006C0075006D006E007300FFFEFF044E006F006E006500FFFEFF225300650067006F006500200055004900FCF02D0031003100FCF0340030003000FCF03000FCF03000FCF03000FCF03100FCF03000FCF03000FCF03000FCF03000FCF03000000000000000F03FFFFEFF0B430065006E00740065007200FEF04C00650066007400C7FFFFFF00000000000000000000000001000000",
|
||||
"<7,37>": ""
|
||||
},
|
||||
"<8>": {
|
||||
"<8,1>": "OLE_PIC_LOC_FILTER",
|
||||
"<8,2>": "",
|
||||
"<8,3>": "OLECONTROL.SRP.Picture.1",
|
||||
"<8,4>": "NDW_MATERIAL_TRACK_REPORT",
|
||||
"<8,5>": "228",
|
||||
"<8,6>": "9",
|
||||
"<8,7>": "338",
|
||||
"<8,8>": "13",
|
||||
"<8,9>": "SRP.Picture.1",
|
||||
"<8,10>": {
|
||||
"<8,10,1>": "0x56000000",
|
||||
"<8,10,2>": "0x0"
|
||||
},
|
||||
"<8,11>": {
|
||||
"<8,11,1>": "0x0",
|
||||
"<8,11,2>": "0x80000000"
|
||||
},
|
||||
"<8,12>": "8",
|
||||
"<8,13>": "-2",
|
||||
"<8,14>": "0",
|
||||
"<8,15>": {
|
||||
"<8,15,1>": {
|
||||
"<8,15,1,1>": "Segoe UI",
|
||||
"<8,15,1,2>": "-12",
|
||||
"<8,15,1,3>": "400",
|
||||
"<8,15,1,4>": "0",
|
||||
"<8,15,1,5>": "0",
|
||||
"<8,15,1,6>": "0",
|
||||
"<8,15,1,7>": "0",
|
||||
"<8,15,1,8>": "34",
|
||||
"<8,15,1,9>": "0",
|
||||
"<8,15,1,10>": "3",
|
||||
"<8,15,1,11>": "2",
|
||||
"<8,15,1,12>": "1",
|
||||
"<8,15,1,13>": "0",
|
||||
"<8,15,1,14>": "0"
|
||||
}
|
||||
},
|
||||
"<8,16>": "",
|
||||
"<8,17>": "",
|
||||
"<8,18>": "",
|
||||
"<8,19>": "",
|
||||
"<8,20>": "",
|
||||
"<8,21>": "",
|
||||
"<8,22>": "",
|
||||
"<8,23>": "",
|
||||
"<8,24>": "",
|
||||
"<8,25>": "0",
|
||||
"<8,26>": "0",
|
||||
"<8,27>": "",
|
||||
"<8,28>": "<<None>>",
|
||||
"<8,29>": "<<None>>",
|
||||
"<8,30>": "<<None>>",
|
||||
"<8,31>": "0",
|
||||
"<8,32>": {
|
||||
"<8,32,1>": "0x7fffe",
|
||||
"<8,32,2>": "0xf0016c00"
|
||||
},
|
||||
"<8,33>": "",
|
||||
"<8,34>": "",
|
||||
"<8,35>": "",
|
||||
"<8,36>": "05000000000000000000000032000000FFFEFF044E006F006E006500FFFEFF0341006C006C00FFFEFF044E006F006E006500FFFEFF0744006900760069006400650072000100000001000000FFFEFF0D430065006E00740065007200FEF0430065006E00740065007200FFFEFF00FFFEFF0443006C0069007000FFFEFF044100750074006F00FFFEFF0F4C006F0063006100740069006F006E002000460069006C00740065007200FFFEFF044E006F006E006500FFFEFF225300650067006F006500200055004900FCF02D0031003100FCF0340030003000FCF03000FCF03000FCF03000FCF03100FCF03000FCF03000FCF03000FCF03000FCF03000000000000000F03FFFFEFF0B430065006E00740065007200FEF04C006500660074007EFFFFFF00000000000000000000000001000000",
|
||||
"<8,37>": ""
|
||||
},
|
||||
"<9>": ""
|
||||
},
|
||||
"record4": {
|
||||
"<1>": "",
|
||||
"<2>": {
|
||||
"<2,1>": "",
|
||||
"<2,2>": "",
|
||||
"<2,3>": "",
|
||||
"<2,4>": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -78,6 +78,8 @@ API config.ID.PUT
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end else
|
||||
If OIWizardID NE '' then CurrUser = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
@ -109,7 +111,23 @@ CreateHALItem:
|
||||
|
||||
Begin Case
|
||||
Case ConfigID _EQC 'OEE'
|
||||
JSONResponse = Config_Services('GetOEE', FullEndpointURL)
|
||||
JSONResponse = Config_Services('GetOEE', FullEndpointURL)
|
||||
Case ConfigID _EQC 'MaterialTrack'
|
||||
OIWizardID = ''
|
||||
CurrUser = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end else
|
||||
If OIWizardID NE '' then CurrUser = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
|
||||
end
|
||||
Next Cookie
|
||||
JSONResponse = Config_Services('GetMaterialTrackSettings', CurrUser)
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Unsupported configID')
|
||||
End Case
|
||||
@ -166,6 +184,17 @@ UpdateHALItem:
|
||||
end else
|
||||
Error_Services('Add', 'User is not authorized to update OEE setpoints.')
|
||||
end
|
||||
Case ConfigID _EQC 'MaterialTrack'
|
||||
// The resource will have been put into the POST string.
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If Body NE '' then
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
MtSettingsJson = HTTP_Services('DecodePercentString', Body)
|
||||
Config_Services('UpdateMaterialTrackSettings', MtSettingsJson, CurrUser)
|
||||
end else
|
||||
Error_Services('Add', 'No body was sent with the request.')
|
||||
end
|
||||
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Unsupported configID')
|
||||
End Case
|
||||
@ -184,3 +213,4 @@ UpdateHALItem:
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
@ -130,3 +130,29 @@ Service UpdateOEE(OEEjson)
|
||||
end service
|
||||
|
||||
|
||||
Service GetMaterialTrackSettings(UserId)
|
||||
|
||||
Response = ''
|
||||
If (UserId NE '') then
|
||||
RepUserId = UserId
|
||||
Convert @Lower.Case to @Upper.Case in RepUserId
|
||||
Response = Database_Services('ReadDataRow', 'REPORT_CONFIG', 'MATERIAL_TRACK_WEB*':RepUserId)
|
||||
end else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Null UserId passed into service.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UpdateMaterialTrackSettings(MtSettingsJson, UserId)
|
||||
|
||||
If ( (MtSettingsJson NE '') and (UserId NE '') ) then
|
||||
RepUserId = UserId
|
||||
Convert @Lower.Case to @Upper.Case in RepUserId
|
||||
Database_Services('WriteDataRow', 'REPORT_CONFIG', 'MATERIAL_TRACK_WEB*':RepUserId, MtSettingsJson)
|
||||
end else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Null MtSettingsJson or UserId passed into service.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
@ -49,8 +49,7 @@ Compile function NDW_MATERIAL_TRACK_PRO_REPORT_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#window NDW_MATERIAL_TRACK_PRO_REPORT
|
||||
|
||||
Declare function Form_Services, Database_Services, RTI_Task_Submit, RTI_Task_Status, MemberOf
|
||||
Declare subroutine SRP_Show_Window, Send_Message, Set_Property, Report_Services_Dev, Database_Services, Material_Track
|
||||
Declare subroutine Report_Services_Dev2, Report_Services_Dev5
|
||||
Declare subroutine SRP_Show_Window, Send_Message, Set_Property, Database_Services, Material_Track, Report_Services
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert LOGICAL
|
||||
@ -129,25 +128,8 @@ Event PUB_GEN_REPORT.CLICK()
|
||||
If LocationEnabled then RptLocations<0, -1> = Location
|
||||
Next Location
|
||||
|
||||
* Report_Services_Dev5('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
|
||||
|
||||
Begin Case
|
||||
Case OldReport
|
||||
Report_Services_Dev('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
Case Otherwise$
|
||||
Report_Services_Dev5('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
End Case
|
||||
Report_Services('PrintMaterialTrackReport', RptColumns, RptLocations, NoMatFlag, OldReport)
|
||||
|
||||
* Begin Case
|
||||
* Case DevReport
|
||||
* Report_Services_Dev5('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
* Case @User4 EQ 'JUSTIN_H' or @User4 EQ 'DANIEL_ST'
|
||||
* Report_Services_Dev2('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
* Case Otherwise$
|
||||
* Report_Services_Dev('GetMaterialTrackReport', RptColumns, RptLocations, NoMatFlag)
|
||||
* End Case
|
||||
|
||||
end event
|
||||
|
||||
|
||||
@ -438,4 +420,3 @@ EnableReportColumns:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -1,422 +0,0 @@
|
||||
Compile function NDW_MATERIAL_TRACK_REPORT_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : NDW_MATERIAL_TRACK_EVENTS
|
||||
|
||||
Description : Commuter module for the NDW_MATERIAL_TRACK_EVENTS form.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
10/29/20 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_MATERIAL_TRACK_REPORT
|
||||
|
||||
Declare function Form_Services, Database_Services, RTI_Task_Submit, RTI_Task_Status
|
||||
Declare subroutine SRP_Show_Window, Send_Message, Set_Property, Report_Services, Database_Services, Material_Track
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert REPORT_CONFIG_EQUATES
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', False$)
|
||||
end else
|
||||
UserSettings = ''
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', True$)
|
||||
end
|
||||
GoSub Setup_OLE_Controls
|
||||
GoSub EnableGenerateReportButton
|
||||
FormSize = ''
|
||||
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event PUB_GEN_REPORT.CLICK()
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
|
||||
RptColumns = ''
|
||||
RptLocations = ''
|
||||
|
||||
Columns = ColFltrArray<1>
|
||||
Flags = ColFltrArray<2>
|
||||
For each Column in Columns using @VM setting vPos
|
||||
ColumnEnabled = Flags<0, vPos>
|
||||
If ColumnEnabled then RptColumns<0, -1> = Column
|
||||
Next Column
|
||||
|
||||
Locations = LocFltrArray<1>
|
||||
Flags = LocFltrArray<3>
|
||||
For each Location in Locations using @VM setting vPos
|
||||
LocationEnabled = Flags<0, vPos>
|
||||
If LocationEnabled then RptLocations<0, -1> = Location
|
||||
Next Location
|
||||
|
||||
* If @User4 EQ 'DANIEL_ST' then
|
||||
* debug
|
||||
* Material_Track(RptColumns, RptLocations)
|
||||
* TaskID = RTI_TASK_SUBMIT('', 'MATERIAL_TRACK', RptColumns, RptLocations)
|
||||
* If TaskID NE 0 then
|
||||
* Done = False$
|
||||
* TaskResponse = ''
|
||||
* Loop
|
||||
* Status = RTI_Task_Status(TaskID, TaskResponse)
|
||||
* If (Status EQ 'COMPLETED') OR (Status EQ 'ERROR') then Done = True$
|
||||
* Until Done
|
||||
* Repeat
|
||||
* end else
|
||||
* // Track if task id wasn't created at all.
|
||||
* end
|
||||
* StatusError = Get_Status(errCode)
|
||||
* If (Index(errCode, 'SHELLEXECUTE', 1)) NE 0 then StatusError = 0
|
||||
* end else
|
||||
Report_Services('GetMaterialTrackReport', RptColumns, RptLocations)
|
||||
* end
|
||||
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_SAVE_SETTINGS.CLICK()
|
||||
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
end else
|
||||
UserSettings = ''
|
||||
end
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
|
||||
RptColumns = ''
|
||||
RptLocations = ''
|
||||
|
||||
Columns = ColFltrArray<1>
|
||||
Flags = ColFltrArray<2>
|
||||
For each Column in Columns using @VM setting vPos
|
||||
ColumnEnabled = Flags<0, vPos>
|
||||
If ColumnEnabled then RptColumns<0, -1> = Column
|
||||
Next Column
|
||||
UserSettings<REPORT_CONFIG.REPORT_COLUMNS$> = Flags
|
||||
|
||||
Locations = LocFltrArray<1>
|
||||
Flags = LocFltrArray<3>
|
||||
For each Location in Locations using @VM setting vPos
|
||||
LocationEnabled = Flags<0, vPos>
|
||||
If LocationEnabled then RptLocations<0, -1> = Location
|
||||
Next Location
|
||||
UserSettings<REPORT_CONFIG.LOCATION_FILTER$> = Flags
|
||||
|
||||
Database_Services('WriteDataRow', 'REPORT_CONFIG', RptConfigKey, UserSettings, True$, False$, True$)
|
||||
Set_Property(CtrlEntID, 'ENABLED', False$)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_EDT_COL_FILTER.OnCheckChanged(Cell, OldValue, NewValue)
|
||||
|
||||
GoSub EnableSaveButton
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event OLE_EDT_LOC_FILTER.OnCheckChanged(Cell, OldValue, NewValue)
|
||||
|
||||
GoSub EnableReportColumns
|
||||
GoSub EnableSaveButton
|
||||
GoSub EnableGenerateReportButton
|
||||
|
||||
end event
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
// Report Columns
|
||||
RptCols = ''
|
||||
RptCols<1, 1> = 'React No'
|
||||
RptCols<1, 2> = 'React Type'
|
||||
RptCols<1, 3> = 'WO No'
|
||||
RptCols<1, 4> = 'SAP Prod No'
|
||||
RptCols<1, 5> = 'Sub Part No'
|
||||
RptCols<1, 6> = 'Epi Part No'
|
||||
RptCols<1, 7> = 'WO Qty'
|
||||
RptCols<1, 8> = 'RX Qty'
|
||||
RptCols<1, 9> = 'UnRel Qty'
|
||||
RptCols<1, 10> = 'Kit Location'
|
||||
RptCols<1, 11> = 'Kit Qty'
|
||||
RptCols<1, 12> = '+/-'
|
||||
RptCols<1, 13> = 'Kit RO'
|
||||
RptCols<1, 14> = 'PTI RO'
|
||||
RptCols<1, 15> = 'Load'
|
||||
RptCols<1, 16> = 'Comments'
|
||||
|
||||
RptColsEnabled = ''
|
||||
If UserSettings NE '' then
|
||||
RptColsEnabled = UserSettings<REPORT_CONFIG.REPORT_COLUMNS$>
|
||||
end else
|
||||
For each Col in RptCols using @VM setting vPos
|
||||
RptColsEnabled<0, -1> = True$
|
||||
Next Col
|
||||
end
|
||||
|
||||
RptColsArray = RptCols:@FM:RptColsEnabled
|
||||
|
||||
// Location Filters
|
||||
LocFilters = ''
|
||||
LocFilters<1, 1> = 'SR*KTR]'
|
||||
LocFilters<1, 2> = '1K*PTI'
|
||||
LocFilters<1, 3> = 'CR*BE'
|
||||
LocFilters<1, 4> = 'CR*BO'
|
||||
LocFilters<1, 5> = 'CR*TUN'
|
||||
LocFilters<1, 6> = 'CR*EPR'
|
||||
LocFilters<1, 7> = 'CR*FE'
|
||||
LocFilters<1, 8> = 'CR*FEH'
|
||||
LocFilters<1, 9> = 'CR*FO'
|
||||
LocFilters<1, 10> = 'CR*FOH'
|
||||
|
||||
LocDescriptions = ''
|
||||
LocsEnabled = ''
|
||||
If UserSettings NE '' then
|
||||
LocsEnabled = UserSettings<REPORT_CONFIG.LOCATION_FILTER$>
|
||||
For each Loc in LocFilters using @VM setting vPos
|
||||
If vPos GT 1 then
|
||||
LocDescriptions<0, -1> = Xlate('LOCATION', Loc, 'DESC', 'X')
|
||||
end else
|
||||
LocDescriptions<0, -1> = 'All Kit Racks'
|
||||
end
|
||||
Next Loc
|
||||
end else
|
||||
For each Loc in LocFilters using @VM setting vPos
|
||||
LocsEnabled<0, -1> = True$
|
||||
If vPos GT 1 then
|
||||
LocDescriptions<0, -1> = Xlate('LOCATION', Loc, 'DESC', 'X')
|
||||
end else
|
||||
LocDescriptions<0, -1> = 'All Kit Racks'
|
||||
end
|
||||
Next Loc
|
||||
end
|
||||
|
||||
LocFltrArray = LocFilters:@FM:LocDescriptions:@FM:LocsEnabled
|
||||
|
||||
ColFltrCtrl = @Window:'.OLE_EDT_COL_FILTER'
|
||||
LocFltrCtrl = @Window:'.OLE_EDT_LOC_FILTER'
|
||||
|
||||
// Qualify OLE events that we want to intercept
|
||||
Qualifier = ''
|
||||
Qualifier<1> = 1
|
||||
Qualifier<4> = 0 ; * process synchronously (i.e. immediately)
|
||||
Send_Message(ColFltrCtrl, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
||||
Send_Message(LocFltrCtrl, 'QUALIFY_EVENT', 'OLE.OnCheckChanged', Qualifier)
|
||||
|
||||
NumColFltrCols = 2
|
||||
NumColFltrRows = DCount(RptCols, @VM)
|
||||
NumLocFltrCols = 3
|
||||
NumLocFltrRows = DCount(LocFilters, @VM)
|
||||
|
||||
HeaderFontArray = 'Segoe UI':@SVM:8:@SVM:700
|
||||
ColFltrDimArray = NumColFltrCols : @FM : NumColFltrRows
|
||||
LocFltrDimArray = NumLocFltrCols : @FM : NumLocFltrRows
|
||||
DataColArray = ''
|
||||
DataColArray<4> = True$ ; // Autosize column
|
||||
|
||||
HeaderTitles = 'Column':@VM:'Enabled'
|
||||
Set_Property(ColFltrCtrl, "OLE.TitleList", HeaderTitles)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellFont[All; All]", 'Segoe UI':@SVM:8)
|
||||
Set_Property(ColFltrCtrl, "OLE.Dimension", ColFltrDimArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderFont[All; 1]", HeaderFontArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderColumn[1]", '':@FM:False$:@FM)
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderAlignment[All; 1]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(ColFltrCtrl, "OLE.HeaderColors[All; 1]", @FM:"{200, 200, 200}")
|
||||
Set_Property(ColFltrCtrl, "OLE.CellType[2; All]", "Check Box")
|
||||
Set_Property(ColFltrCtrl, "OLE.CellAlignment[2; All]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(ColFltrCtrl, "OLE.DataColumn[1]", DataColArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.ARRAY", RptColsArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 1-3]", False)
|
||||
CellColorArray = 'None':@FM:"{240, 240, 240}"
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 1-3]", CellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 1-3]", 'FUL')
|
||||
|
||||
|
||||
HeaderTitles = 'Location':@VM:'Description':@VM:'Enabled'
|
||||
Set_Property(LocFltrCtrl, "OLE.TitleList", HeaderTitles)
|
||||
Set_Property(LocFltrCtrl, "OLE.CellFont[All; All]", 'Segoe UI':@SVM:8)
|
||||
Set_Property(LocFltrCtrl, "OLE.Dimension", LocFltrDimArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.LIST", '')
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderFont[All; 1]", HeaderFontArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderColumn[1]", '':@FM:False$:@FM)
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderAlignment[All; 1]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(LocFltrCtrl, "OLE.HeaderColors[All; 1]", @FM:"{200, 200, 200}")
|
||||
Set_Property(LocFltrCtrl, "OLE.CellType[3; All]", "Check Box")
|
||||
Set_Property(LocFltrCtrl, "OLE.DataColumn[2]", DataColArray)
|
||||
Set_Property(LocFltrCtrl, "OLE.CellAlignment[3; All]", "Top":@FM:"Center":@FM:"Center")
|
||||
Set_Property(LocFltrCtrl, "OLE.ARRAY", LocFltrArray)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableSaveButton:
|
||||
|
||||
// Enable save settings button if necessary
|
||||
RptConfigKey = 'MATERIAL_TRACK*':@User4
|
||||
If RowExists('REPORT_CONFIG', RptConfigKey) then
|
||||
UserSettings = Database_Services('ReadDataRow', 'REPORT_CONFIG', RptConfigKey)
|
||||
end else
|
||||
UserSettings = ''
|
||||
end
|
||||
|
||||
// Gather settings from form
|
||||
ColFltrArray = Get_Property(@Window:'.OLE_EDT_COL_FILTER', 'OLE.ARRAY')
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
|
||||
NewColFlags = ColFltrArray<2>
|
||||
CurrColFlags = UserSettings<REPORT_CONFIG.REPORT_COLUMNS$>
|
||||
|
||||
NewLocFlags = LocFltrArray<3>
|
||||
CurrLocFlags = UserSettings<REPORT_CONFIG.LOCATION_FILTER$>
|
||||
|
||||
ChangeDetected = ( (NewColFlags NE CurrColFlags) or (NewLocFlags NE CurrLocFlags) )
|
||||
Set_Property(@Window:'.PUB_SAVE_SETTINGS', 'ENABLED', ChangeDetected)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableGenerateReportButton:
|
||||
|
||||
// Gather settings from form
|
||||
LocFltrArray = Get_Property(@Window:'.OLE_EDT_LOC_FILTER', 'OLE.ARRAY')
|
||||
LocFlags = LocFltrArray<3>
|
||||
ButtonEnabled = (Sum(LocFlags) GT 0)
|
||||
Set_Property(@Window:'.PUB_GEN_REPORT', 'ENABLED', ButtonEnabled)
|
||||
|
||||
return
|
||||
|
||||
|
||||
EnableReportColumns:
|
||||
|
||||
ColFltrCtrl = @Window:'.OLE_EDT_COL_FILTER'
|
||||
LocFltrCtrl = @Window:'.OLE_EDT_LOC_FILTER'
|
||||
|
||||
// Gather settings from form
|
||||
LocFltrArray = Get_Property(LocFltrCtrl, 'OLE.ARRAY')
|
||||
|
||||
LocFlags = LocFltrArray<3>
|
||||
KitRackFlag = LocFlags<0, 1>
|
||||
PTIRackFlag = LocFlags<0, 2>
|
||||
LoadedFlags = Field(LocFlags, @VM , 3, 8)
|
||||
LoadedColEnabled = (Sum(LoadedFlags) GT 0)
|
||||
EnabledCellColorArray = 'None':@FM:'None'
|
||||
DisabledCellColorArray = 'None':@FM:"{240, 240, 240}"
|
||||
If KitRackFlag EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 10-12]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 10-12]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 10-12]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 10-12]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 10-12]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 10-12]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 10-12]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 10-12]", False$)
|
||||
end
|
||||
If PTIRackFlag EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 13]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 13]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 13]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 13]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 13]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 13]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 13]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 13]", False$)
|
||||
end
|
||||
If LoadedColEnabled EQ True$ then
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 14]", True$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 14]", EnabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 14]", 'SEL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 14]", True$)
|
||||
end else
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheck[2; 14]", False$)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellColors[All; 14]", DisabledCellColorArray)
|
||||
Set_Property(ColFltrCtrl, "OLE.CellProtection[All; 14]", 'FUL')
|
||||
Set_Property(ColFltrCtrl, "OLE.CellCheckEnabled[2; 14]", False$)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
@ -189,7 +189,13 @@ UpdateHALItem:
|
||||
|
||||
Begin Case
|
||||
Case ReportID = 'materialtrack'
|
||||
Error_Services('Add', 'Unsupported report')
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If (Body NE '') then
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
RepJSON = HTTP_Services('DecodePercentString', Body)
|
||||
Report_Services('UpdateMaterialTrackData', RepJSON)
|
||||
end
|
||||
|
||||
Case ReportID = 'dailyperformance'
|
||||
ReportDate = Http_Services('GetQueryField', 'reportDate')
|
||||
// The resource will have been put into the POST string.
|
||||
@ -225,3 +231,4 @@ API reports.GET
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,552 +0,0 @@
|
||||
Compile function Report_Services_Dev(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Report_Services
|
||||
|
||||
Description : Handler program for all Report services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/28/21 djs Copied original source code from Report_Services. Modified GetMaterialTrackReport
|
||||
to use the SCHED_DET_NG table (i.e. Scheduler 2.0) instead of the SCHED_DET table.
|
||||
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert OIPRINT_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
$Insert MSG_EQUATES
|
||||
$Insert SCHEDULE_EQU
|
||||
$Insert LOCATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select
|
||||
Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
Declare function Error_Services, Location_Services, SRP_Array, Signature_Services
|
||||
Declare function Epi_Part_Services, SRP_Math, Datetime, MemberOf
|
||||
|
||||
Equ TAB$ TO \09\
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag)
|
||||
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
If Index(RptColumns, 'Comments', 1) then
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1300'
|
||||
AllColFmt<1, 14> = '+^1300'
|
||||
AllColFmt<1, 15> = '+^700'
|
||||
AllColFmt<1, 16> = '+^1300'
|
||||
end else
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1800'
|
||||
AllColFmt<1, 14> = '+^1800'
|
||||
AllColFmt<1, 15> = '+^1100'
|
||||
AllColFmt<1, 16> = ''
|
||||
end
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO @DICT then
|
||||
Today = Datetime()
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
Set_Status(0)
|
||||
|
||||
* Start of printing process
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
PrintPath = ''
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
ColHead = ''
|
||||
ColFmt = ''
|
||||
|
||||
For each Column in RptColumns using @VM setting rcPos
|
||||
Locate Column in AllRptColumns using @VM setting dataPos then
|
||||
ColHead<0, -1> = Column
|
||||
ColFmt<0, -1> = AllColFmt<0, dataPos>
|
||||
end
|
||||
Next Column
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
GoTo ReadRecord
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ReadRecord:
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', {WO_NO}, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', {WO_NO}, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', {WO_NO}, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', {WO_NO}, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', {WO_NO}, 'PROD_ORD_NO', 'X')
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Location_Services('GetLocationCassInfo', S.WONo, 'SR*KTR]')
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Location_Services('GetLocationCassInfo', S.WONo, '1K*PTI')
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
LoadedData = Location_Services('GetLocationCassInfo', S.WONo, LocQueryList)
|
||||
Swap CRLF$ with @VM in LoadedData
|
||||
CassList = LoadedData<3>
|
||||
Swap @VM with ',' in CassList
|
||||
For each CassNo in CassList using ','
|
||||
If ( (S.WONo NE '') and (CassNo NE '') ) then
|
||||
WOMatKey = S.WONo:'*':CassNo
|
||||
UnloadSigComp = Signature_Services('CheckSignature', WOMatKey, 'UNLOAD')
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
CurrStatus = Xlate('WO_MAT', WOMatKey, 'CURR_STATUS', 'X')
|
||||
If Not(UnloadSigComp or OnHold or (CurrStatus EQ 'REJ') ) then
|
||||
LoadedCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
Next CassNo
|
||||
end
|
||||
end
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
|
||||
BREAKS:
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
IF ReactNo.Break THEN stat = Set_Printer('TEXT')
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
IF LastRecord THEN
|
||||
colData = ''
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
DETAIL:
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
Convert ',' to @VM in KitCassList
|
||||
Convert ',' to @VM in PTICassList
|
||||
Convert ',' to @VM in LoadedCassList
|
||||
|
||||
NumKitCass = DCount(KitCassList, @VM)
|
||||
If NumKitCass GT 4 then
|
||||
For CassIndex = 4 to NumKitCass Step 4
|
||||
CassNo = KitCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
KitCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumPTICass = DCount(PTICassList, @VM)
|
||||
If NumPTICass GT 4 then
|
||||
For CassIndex = 4 to NumPTICass Step 4
|
||||
CassNo = PTICassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
PTICassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumLoadedCass = DCount(LoadedCassList, @VM)
|
||||
If NumLoadedCass GT 2 then
|
||||
For CassIndex = 2 to NumLoadedCass Step 2
|
||||
CassNo = LoadedCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
LoadedCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KittCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
AllReportData = ''
|
||||
AllReportData<1> = S.ReactNo
|
||||
AllReportData<2> = S.React_Type
|
||||
AllReportData<3> = S.WONo
|
||||
AllReportData<4> = S.ProdOrdNo
|
||||
AllReportData<5> = S.SubPartNo
|
||||
AllReportData<6> = S.EpiPartNo
|
||||
AllReportData<7> = S.WO_Qty
|
||||
AllReportData<8> = S.WO_RX_Qty
|
||||
AllReportData<9> = S.WO_UnRel_Qty
|
||||
AllReportData<10> = S.KitLocation
|
||||
AllReportData<11> = S.KitQty
|
||||
AllReportData<12> = CassNeeded
|
||||
AllReportData<13> = KitCassList
|
||||
AllReportData<14> = PTICassList
|
||||
AllReportData<15> = LoadedCassList
|
||||
AllReportData<16> = ''
|
||||
|
||||
If ( (KitCassList NE '') or (PTICassList NE '') or (LoadedCassList NE '') or (NoMatFlag EQ True$) ) then
|
||||
RowNumber += 1
|
||||
For each RptColumn in RptColumns using @VM setting rcPos
|
||||
Locate RptColumn in AllRptColumns using @VM setting dataPos then
|
||||
COLDATA<RowNumber,rcPos> = AllReportData<dataPos>
|
||||
end
|
||||
Next RptColumn
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
END
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
Bail:
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
OIPrintErr:
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
PrintTable:
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
TableHeight = TableSize<2>
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
END
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1,589 +0,0 @@
|
||||
Compile function Report_Services_Dev2(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Report_Services
|
||||
|
||||
Description : Handler program for all Report services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/28/21 djs Copied original source code from Report_Services. Modified GetMaterialTrackReport
|
||||
to use the SCHED_DET_NG table (i.e. Scheduler 2.0) instead of the SCHED_DET table.
|
||||
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert OIPRINT_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
$Insert MSG_EQUATES
|
||||
$Insert SCHEDULE_EQU
|
||||
$Insert LOCATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select
|
||||
Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
Declare function Error_Services, Location_Services, SRP_Array, Signature_Services
|
||||
Declare function Epi_Part_Services, SRP_Math, Datetime
|
||||
|
||||
Equ TAB$ TO \09\
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag)
|
||||
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
If Index(RptColumns, 'Comments', 1) then
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1300'
|
||||
AllColFmt<1, 14> = '+^1300'
|
||||
AllColFmt<1, 15> = '+^700'
|
||||
AllColFmt<1, 16> = '+^1300'
|
||||
end else
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1800'
|
||||
AllColFmt<1, 14> = '+^1800'
|
||||
AllColFmt<1, 15> = '+^1100'
|
||||
AllColFmt<1, 16> = ''
|
||||
end
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO @DICT then
|
||||
Today = Datetime() - 30
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
Set_Status(0)
|
||||
|
||||
* Start of printing process
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
PrintPath = ''
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
ColHead = ''
|
||||
ColFmt = ''
|
||||
|
||||
For each Column in RptColumns using @VM setting rcPos
|
||||
Locate Column in AllRptColumns using @VM setting dataPos then
|
||||
ColHead<0, -1> = Column
|
||||
ColFmt<0, -1> = AllColFmt<0, dataPos>
|
||||
end
|
||||
Next Column
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
GoTo ReadRecord
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ReadRecord:
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', {WO_NO}, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', {WO_NO}, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', {WO_NO}, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', {WO_NO}, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', {WO_NO}, 'PROD_ORD_NO', 'X')
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Location_Services('GetLocationCassInfo', S.WONo, 'SR*KTR]')
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
KitCassList = KitData<3>
|
||||
NewKitData = ''
|
||||
|
||||
Swap ',' with @VM in KitData
|
||||
|
||||
// Filter out cassettes on hold
|
||||
NewKitData<1> = KitData<1>
|
||||
Swap @VM with ',' in KitCassList
|
||||
For each Cass in KitCassList using ',' setting cPos
|
||||
Key = S.WONo:'*':Cass
|
||||
OnHold = Xlate('WO_MAT', Key, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
NewKitData<3, -1> = KitData<3, cPos>
|
||||
end
|
||||
Next Cass
|
||||
|
||||
NewKitData<2> = DCount(NewKitData<3>, @VM) ; // Update cassette count
|
||||
KitData = NewKitData
|
||||
|
||||
Swap @VM with ',' in KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Location_Services('GetLocationCassInfo', S.WONo, '1K*PTI')
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
PTICassList = PTIData<3>
|
||||
NewPTIData = ''
|
||||
|
||||
Swap ',' with @VM in PTIData
|
||||
// Filter out cassettes on hold
|
||||
NewPTIData<1> = PTIData<1>
|
||||
Swap @VM with ',' in PTICassList
|
||||
For each Cass in PTICassList using ',' setting cPos
|
||||
Key = S.WONo:'*':Cass
|
||||
OnHold = Xlate('WO_MAT', Key, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
NewPTIData<3, -1> = PTIData<3, cPos>
|
||||
end
|
||||
Next Cass
|
||||
NewPTIData<2> = DCount(NewPTIData<3>, @VM) ; // Update cassette count
|
||||
PTIData = NewPTIData
|
||||
|
||||
Swap @VM with ',' in PTIData
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
LoadedData = Location_Services('GetLocationCassInfo', S.WONo, LocQueryList)
|
||||
Swap CRLF$ with @VM in LoadedData
|
||||
CassList = LoadedData<3>
|
||||
Swap @VM with ',' in CassList
|
||||
For each CassNo in CassList using ','
|
||||
If ( (S.WONo NE '') and (CassNo NE '') ) then
|
||||
WOMatKey = S.WONo:'*':CassNo
|
||||
UnloadSigComp = Signature_Services('CheckSignature', WOMatKey, 'UNLOAD')
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
If Not(UnloadSigComp or OnHold) then
|
||||
LoadedCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
Next CassNo
|
||||
end
|
||||
end
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
|
||||
BREAKS:
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
IF ReactNo.Break THEN stat = Set_Printer('TEXT')
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
IF LastRecord THEN
|
||||
colData = ''
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
DETAIL:
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
Convert ',' to @VM in KitCassList
|
||||
Convert ',' to @VM in PTICassList
|
||||
Convert ',' to @VM in LoadedCassList
|
||||
|
||||
NumKitCass = DCount(KitCassList, @VM)
|
||||
If NumKitCass GT 4 then
|
||||
For CassIndex = 4 to NumKitCass Step 4
|
||||
CassNo = KitCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
KitCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumPTICass = DCount(PTICassList, @VM)
|
||||
If NumPTICass GT 4 then
|
||||
For CassIndex = 4 to NumPTICass Step 4
|
||||
CassNo = PTICassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
PTICassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumLoadedCass = DCount(LoadedCassList, @VM)
|
||||
If NumLoadedCass GT 2 then
|
||||
For CassIndex = 2 to NumLoadedCass Step 2
|
||||
CassNo = LoadedCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
LoadedCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KittCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
AllReportData = ''
|
||||
AllReportData<1> = S.ReactNo
|
||||
AllReportData<2> = S.React_Type
|
||||
AllReportData<3> = S.WONo
|
||||
AllReportData<4> = S.ProdOrdNo
|
||||
AllReportData<5> = S.SubPartNo
|
||||
AllReportData<6> = S.EpiPartNo
|
||||
AllReportData<7> = S.WO_Qty
|
||||
AllReportData<8> = S.WO_RX_Qty
|
||||
AllReportData<9> = S.WO_UnRel_Qty
|
||||
AllReportData<10> = S.KitLocation
|
||||
AllReportData<11> = S.KitQty
|
||||
AllReportData<12> = CassNeeded
|
||||
AllReportData<13> = KitCassList
|
||||
AllReportData<14> = PTICassList
|
||||
AllReportData<15> = LoadedCassList
|
||||
AllReportData<16> = ''
|
||||
|
||||
If ( (KitCassList NE '') or (PTICassList NE '') or (LoadedCassList NE '') or (NoMatFlag EQ True$) ) then
|
||||
RowNumber += 1
|
||||
For each RptColumn in RptColumns using @VM setting rcPos
|
||||
Locate RptColumn in AllRptColumns using @VM setting dataPos then
|
||||
COLDATA<RowNumber,rcPos> = AllReportData<dataPos>
|
||||
end
|
||||
Next RptColumn
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
END
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
Bail:
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
OIPrintErr:
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
PrintTable:
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
TableHeight = TableSize<2>
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
END
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1,468 +0,0 @@
|
||||
Compile function Report_Services_Dev3(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Report_Services
|
||||
|
||||
Description : Handler program for all Report services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/28/21 djs Copied original source code from Report_Services. Modified GetMaterialTrackReport
|
||||
to use the SCHED_DET_NG table (i.e. Scheduler 2.0) instead of the SCHED_DET table.
|
||||
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert OIPRINT_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
$Insert MSG_EQUATES
|
||||
$Insert SCHEDULE_EQU
|
||||
$Insert LOCATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select, SRP_Stopwatch, Database_Services
|
||||
Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
Declare function Error_Services, Location_Services, SRP_Array, Signature_Services
|
||||
Declare function Epi_Part_Services, SRP_Math, Datetime, Database_Services
|
||||
|
||||
Equ TAB$ TO \09\
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service CalculateMaterialTrackData(RptColumns, LocationFilter, NoMatFlag)
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
|
||||
NoMatFlag = True$
|
||||
|
||||
LocationFilter = ''
|
||||
LocationFilter<1, 1> = 'SR*KTR]'
|
||||
LocationFilter<1, 2> = '1K*PTI'
|
||||
LocationFilter<1, 3> = 'CR*BE'
|
||||
LocationFilter<1, 4> = 'CR*BO'
|
||||
LocationFilter<1, 5> = 'CR*TUN'
|
||||
LocationFilter<1, 6> = 'CR*EPR'
|
||||
LocationFilter<1, 7> = 'CR*FE'
|
||||
LocationFilter<1, 8> = 'CR*FEH'
|
||||
LocationFilter<1, 9> = 'CR*FO'
|
||||
LocationFilter<1, 10> = 'CR*FOH'
|
||||
|
||||
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
RptColumns = AllRptColumns
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO @DICT then
|
||||
Today = Datetime()
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
RowIndex = 0
|
||||
AllReportData = ''
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
GoTo ReadRecord
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ReadRecord:
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', {WO_NO}, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', {WO_NO}, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', {WO_NO}, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', {WO_NO}, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', {WO_NO}, 'PROD_ORD_NO', 'X')
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Location_Services('GetLocationCassInfo', S.WONo, 'SR*KTR]')
|
||||
SWAP CRLF$ WITH @VM IN KitData
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
KitCassList = KitData<3>
|
||||
NewKitData = ''
|
||||
|
||||
Swap ',' with @VM in KitData
|
||||
|
||||
// Filter out cassettes on hold
|
||||
NewKitData<1> = KitData<1>
|
||||
Swap @VM with ',' in KitCassList
|
||||
For each Cass in KitCassList using ',' setting cPos
|
||||
Key = S.WONo:'*':Cass
|
||||
OnHold = Xlate('WO_MAT', Key, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
NewKitData<3, -1> = KitData<3, cPos>
|
||||
end
|
||||
Next Cass
|
||||
|
||||
LocInfo = ''
|
||||
LocInfo<1> = NewKitData<1>
|
||||
LocInfo<2> = DCount(NewKitData<3>, @VM)
|
||||
LocInfo<3> = NewKitData<3>
|
||||
Database_Services('WriteDataRow', 'WO_LOC', S.WONo:'*':'SR*KTR]', LocInfo)
|
||||
|
||||
NewKitData<2> = DCount(NewKitData<3>, @VM) ; // Update cassette count
|
||||
KitData = NewKitData
|
||||
|
||||
Swap @VM with ',' in KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
* S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
S.KitQty = 0
|
||||
For each CassNo in KitCassList using ','
|
||||
S.KitQty += Xlate('WO_MAT', S.WONo:'*':CassNo, 'WAFER_QTY', 'X')
|
||||
Next CassNo
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Location_Services('GetLocationCassInfo', S.WONo, '1K*PTI')
|
||||
SWAP CRLF$ WITH @VM IN PTIData
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
PTICassList = PTIData<3>
|
||||
NewPTIData = ''
|
||||
|
||||
Swap ',' with @VM in PTIData
|
||||
// Filter out cassettes on hold
|
||||
NewPTIData<1> = PTIData<1>
|
||||
Swap @VM with ',' in PTICassList
|
||||
For each Cass in PTICassList using ',' setting cPos
|
||||
Key = S.WONo:'*':Cass
|
||||
OnHold = Xlate('WO_MAT', Key, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
NewPTIData<3, -1> = PTIData<3, cPos>
|
||||
end
|
||||
Next Cass
|
||||
|
||||
LocInfo = ''
|
||||
LocInfo<1> = '1K*PTI'
|
||||
LocInfo<2> = DCount(NewPTIData<3>, @VM)
|
||||
LocInfo<3> = NewPTIData<3>
|
||||
Database_Services('WriteDataRow', 'WO_LOC', S.WONo:'*':'1K*PTI', LocInfo)
|
||||
|
||||
NewPTIData<2> = DCount(NewPTIData<3>, @VM) ; // Update cassette count
|
||||
PTIData = NewPTIData
|
||||
|
||||
Swap @VM with ',' in PTIData
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
For each CRLoc in LocQueryList using @VM
|
||||
CRLocCassList = ''
|
||||
LoadedData = Location_Services('GetLocationCassInfo', S.WONo, CRLoc)
|
||||
Swap CRLF$ with @VM in LoadedData
|
||||
CassList = LoadedData<3>
|
||||
Swap @VM with ',' in CassList
|
||||
For each CassNo in CassList using ','
|
||||
If ( (S.WONo NE '') and (CassNo NE '') ) then
|
||||
WOMatKey = S.WONo:'*':CassNo
|
||||
UnloadSigComp = Signature_Services('CheckSignature', WOMatKey, 'UNLOAD')
|
||||
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
|
||||
CurrStatus = Xlate('WO_MAT', WOMatKey, 'CURR_STATUS', 'X')
|
||||
If Not(UnloadSigComp or OnHold or (CurrStatus EQ 'REJ') ) then
|
||||
CRLocCassList<0, -1> = CassNo
|
||||
Locate CassNo in LoadedCassList using @VM setting vPos else
|
||||
LoadedCassList<0, -1> = CassNo
|
||||
end
|
||||
end
|
||||
end
|
||||
Next CassNo
|
||||
LocInfo = ''
|
||||
LocInfo<3> = CRLocCassList
|
||||
Database_Services('WriteDataRow', 'WO_LOC', S.WONo:'*':CRLoc, LocInfo)
|
||||
Next CRLoc
|
||||
end
|
||||
end
|
||||
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
|
||||
BREAKS:
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
IF LastRecord THEN
|
||||
colData = ''
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
DETAIL:
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
RowIndex += 1
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
|
||||
AllReportData<RowIndex, 1> = S.ReactNo
|
||||
AllReportData<RowIndex, 2> = S.React_Type
|
||||
AllReportData<RowIndex, 3> = S.WONo
|
||||
AllReportData<RowIndex, 4> = S.ProdOrdNo
|
||||
AllReportData<RowIndex, 5> = S.SubPartNo
|
||||
AllReportData<RowIndex, 6> = S.EpiPartNo
|
||||
AllReportData<RowIndex, 7> = S.WO_Qty
|
||||
AllReportData<RowIndex, 8> = S.WO_RX_Qty
|
||||
AllReportData<RowIndex, 9> = S.WO_UnRel_Qty
|
||||
AllReportData<RowIndex, 10> = S.KitLocation
|
||||
AllReportData<RowIndex, 11> = S.KitQty
|
||||
AllReportData<RowIndex, 12> = CassNeeded
|
||||
AllReportData<RowIndex, 13> = KitCassList
|
||||
AllReportData<RowIndex, 14> = PTICassList
|
||||
AllReportData<RowIndex, 15> = LoadedCassList
|
||||
AllReportData<RowIndex, 16> = ''
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
Bail:
|
||||
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
Database_Services('WriteDataRow', 'SYSLISTS', 'MAT_REPORT', AllReportData)
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1,402 +0,0 @@
|
||||
Compile function Report_Services_Dev4(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Report_Services
|
||||
|
||||
Description : Handler program for all Report services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/28/21 djs Copied original source code from Report_Services. Modified GetMaterialTrackReport
|
||||
to use the SCHED_DET_NG table (i.e. Scheduler 2.0) instead of the SCHED_DET table.
|
||||
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert OIPRINT_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
$Insert MSG_EQUATES
|
||||
$Insert SCHEDULE_EQU
|
||||
$Insert LOCATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, SRP_Stopwatch, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select, SRP_Stopwatch, Database_Services
|
||||
Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
Declare function Error_Services, Location_Services, SRP_Array, Signature_Services
|
||||
Declare function Epi_Part_Services, SRP_Math, Datetime, Database_Services
|
||||
|
||||
Equ TAB$ TO \09\
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag)
|
||||
|
||||
SRP_Stopwatch('Reset')
|
||||
SRP_Stopwatch('Start', 'Select')
|
||||
NoMatFlag = False$
|
||||
|
||||
LocationFilter = ''
|
||||
LocationFilter<1, 1> = 'SR*KTR]'
|
||||
LocationFilter<1, 2> = '1K*PTI'
|
||||
LocationFilter<1, 3> = 'CR*BE'
|
||||
LocationFilter<1, 4> = 'CR*BO'
|
||||
LocationFilter<1, 5> = 'CR*TUN'
|
||||
LocationFilter<1, 6> = 'CR*EPR'
|
||||
LocationFilter<1, 7> = 'CR*FE'
|
||||
LocationFilter<1, 8> = 'CR*FEH'
|
||||
LocationFilter<1, 9> = 'CR*FO'
|
||||
LocationFilter<1, 10> = 'CR*FOH'
|
||||
|
||||
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
RptColumns = AllRptColumns
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO @DICT then
|
||||
Today = Datetime() - 45
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
RowIndex = 0
|
||||
AllReportData = ''
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
GoTo ReadRecord
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ReadRecord:
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
SRP_Stopwatch('Start', 'Read Record 1.1')
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', {WO_NO}, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', {WO_NO}, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', {WO_NO}, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', {WO_NO}, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', {WO_NO}, 'PROD_ORD_NO', 'X')
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.1')
|
||||
SRP_Stopwatch('Start', 'Read Record 1.2.1')
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'SR*KTR]')
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.2.1')
|
||||
SRP_Stopwatch('Start', 'Read Record 1.2.2')
|
||||
|
||||
Swap @VM with ',' in KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitQty = OCONV(SUM(KitData<2>) * 25,'MD0,Z')
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
S.KitCassCnt = KitData<2>
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.2.2')
|
||||
SRP_Stopwatch('Start', 'Read Record 1.2.3')
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'1K*PTI')
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.2.3')
|
||||
SRP_Stopwatch('Start', 'Read Record 1.3.1')
|
||||
|
||||
Swap @VM with ',' in PTIData
|
||||
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.3.1')
|
||||
SRP_Stopwatch('Start', 'Read Record 1.3.2')
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
For each CRLoc in LocQueryList using @VM
|
||||
CRLocInfo = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':CRLoc)
|
||||
CRLocCassList = CRLocInfo<3>
|
||||
LoadedCassList = SRP_Array('Join', LoadedCassList, CRLocCassList, 'OR', @VM)
|
||||
Next CRLoc
|
||||
end
|
||||
end
|
||||
|
||||
LoadedCassList = SRP_Array('Clean', LoadedCassList, 'TrimAndMakeUnique', @VM)
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
SRP_Stopwatch('Stop', 'Read Record 1.3.2')
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
|
||||
BREAKS:
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
IF LastRecord THEN
|
||||
colData = ''
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
DETAIL:
|
||||
SRP_Stopwatch('Start', 'Detail')
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KittCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
RowIndex += 1
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
|
||||
AllReportData<RowIndex, 1> = S.ReactNo
|
||||
AllReportData<RowIndex, 2> = S.React_Type
|
||||
AllReportData<RowIndex, 3> = S.WONo
|
||||
AllReportData<RowIndex, 4> = S.ProdOrdNo
|
||||
AllReportData<RowIndex, 5> = S.SubPartNo
|
||||
AllReportData<RowIndex, 6> = S.EpiPartNo
|
||||
AllReportData<RowIndex, 7> = S.WO_Qty
|
||||
AllReportData<RowIndex, 8> = S.WO_RX_Qty
|
||||
AllReportData<RowIndex, 9> = S.WO_UnRel_Qty
|
||||
AllReportData<RowIndex, 10> = S.KitLocation
|
||||
AllReportData<RowIndex, 11> = S.KitQty
|
||||
AllReportData<RowIndex, 12> = CassNeeded
|
||||
AllReportData<RowIndex, 13> = KitCassList
|
||||
AllReportData<RowIndex, 14> = PTICassList
|
||||
AllReportData<RowIndex, 15> = LoadedCassList
|
||||
AllReportData<RowIndex, 16> = ''
|
||||
SRP_Stopwatch('Stop', 'Detail')
|
||||
GOTO ReadRecord
|
||||
|
||||
Bail:
|
||||
|
||||
SRP_Stopwatch('ShowAll')
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1,547 +0,0 @@
|
||||
Compile function Report_Services_Dev5(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Report_Services
|
||||
|
||||
Description : Handler program for all Report services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/28/21 djs Copied original source code from Report_Services. Modified GetMaterialTrackReport
|
||||
to use the SCHED_DET_NG table (i.e. Scheduler 2.0) instead of the SCHED_DET table.
|
||||
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert OIPRINT_EQUATES
|
||||
$Insert SCHED_DET_NG_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
$Insert MSG_EQUATES
|
||||
$Insert SCHEDULE_EQU
|
||||
$Insert LOCATION_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
|
||||
Declare subroutine Utility, ErrMsg, Set_Status, Set_Printer, RList, Btree.Extract, Error_Services, V119
|
||||
Declare subroutine Push.Select, Pop.Select
|
||||
Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, obj_Install, Dialog_Box, obj_Location
|
||||
Declare function Error_Services, Location_Services, SRP_Array, Signature_Services
|
||||
Declare function Epi_Part_Services, SRP_Math, Datetime, Database_Services
|
||||
|
||||
Equ TAB$ TO \09\
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag)
|
||||
|
||||
// All Possible Report Columns
|
||||
AllRptColumns = ''
|
||||
AllRptColumns<1, 1> = 'React No'
|
||||
AllRptColumns<1, 2> = 'React Type'
|
||||
AllRptColumns<1, 3> = 'WO No'
|
||||
AllRptColumns<1, 4> = 'SAP Prod No'
|
||||
AllRptColumns<1, 5> = 'Sub Part No'
|
||||
AllRptColumns<1, 6> = 'Epi Part No'
|
||||
AllRptColumns<1, 7> = 'WO Qty'
|
||||
AllRptColumns<1, 8> = 'RX Qty'
|
||||
AllRptColumns<1, 9> = 'UnRel Qty'
|
||||
AllRptColumns<1, 10> = 'Kit Location'
|
||||
AllRptColumns<1, 11> = 'Kit Qty'
|
||||
AllRptColumns<1, 12> = '+/-'
|
||||
AllRptColumns<1, 13> = 'Kit RO'
|
||||
AllRptColumns<1, 14> = 'PTI RO'
|
||||
AllRptColumns<1, 15> = 'Load'
|
||||
AllRptColumns<1, 16> = 'Comments'
|
||||
|
||||
If Index(RptColumns, 'Comments', 1) then
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1300'
|
||||
AllColFmt<1, 14> = '+^1300'
|
||||
AllColFmt<1, 15> = '+^700'
|
||||
AllColFmt<1, 16> = '+^1300'
|
||||
end else
|
||||
AllColFmt = ''
|
||||
AllColFmt<1, 1> = '+^720'
|
||||
AllColFmt<1, 2> = '+<720'
|
||||
AllColFmt<1, 3> = '+^1000'
|
||||
AllColFmt<1, 4> = '+^1100'
|
||||
AllColFmt<1, 5> = '+^1300'
|
||||
AllColFmt<1, 6> = '+^1200'
|
||||
AllColFmt<1, 7> = '+>720'
|
||||
AllColFmt<1, 8> = '+>720'
|
||||
AllColFmt<1, 9> = '+>720'
|
||||
AllColFmt<1, 10> = '+^1260'
|
||||
AllColFmt<1, 11> = '+^720'
|
||||
AllColFmt<1, 12> = '+^500'
|
||||
AllColFmt<1, 13> = '+^1800'
|
||||
AllColFmt<1, 14> = '+^1800'
|
||||
AllColFmt<1, 15> = '+^1100'
|
||||
AllColFmt<1, 16> = ''
|
||||
end
|
||||
|
||||
ErrorTitle = 'Error in service ':Service
|
||||
ErrCode = ''
|
||||
ErrorMsg = ''
|
||||
|
||||
OPEN 'SCHED_DET_NG' TO SchedDetTable then
|
||||
OPEN 'DICT.SCHED_DET_NG' TO @DICT then
|
||||
Today = Datetime()
|
||||
|
||||
ReactList = ''
|
||||
WOList = ''
|
||||
SchedDetKeys = ''
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
Done = 0
|
||||
@ID = ''
|
||||
LOOP
|
||||
PrevSchedDetKey = @ID
|
||||
READNEXT @ID ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ SchedDetRec FROM SchedDetTable,@ID THEN
|
||||
ReactNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
|
||||
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
|
||||
If ReactNo NE '' then
|
||||
LOCATE ReactNo IN ReactList BY 'AR' USING @FM SETTING Pos ELSE
|
||||
ReactList = INSERT(ReactList,Pos,0,0,ReactNo)
|
||||
END
|
||||
END
|
||||
If WONo NE '' then
|
||||
LOCATE WONo IN WOList<Pos> USING @VM SETTING WPos ELSE
|
||||
WOList = INSERT(WOList,Pos,-1,0,WONo)
|
||||
SchedDetKeys = INSERT(SchedDetKeys,-1,0,0,@ID)
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
REPEAT
|
||||
|
||||
CALL Make.List(0,SchedDetKeys,SchedDetTable,@DICT)
|
||||
|
||||
Header = "'D'":@VM:obj_Install('Get_Prop','CompTitle'):' Material Tracking by Reactor':@VM:"Page 'P'"
|
||||
MinDemand = 0
|
||||
Set_Status(0)
|
||||
|
||||
* Start of printing process
|
||||
FileName = 'Print Material Demand'
|
||||
Title = 'Printing Material Demand'
|
||||
|
||||
TopMargin = 1.0
|
||||
BottomMargin = 0.75
|
||||
LeftMargin = 0.25
|
||||
RightMargin = 0.25
|
||||
|
||||
Margins = LeftMargin:@FM:TopMargin:@FM:RightMargin:@FM:BottomMargin
|
||||
|
||||
PageSetup = '1' ;* LandScape
|
||||
PrintSetup = '2' ;* Preview Normal
|
||||
PrintSetup<1,2> = '0' ;* All buttons
|
||||
PrintSetup<1,5> = '1' ;* Page Range
|
||||
PrintSetup<1,6> = 7 ;* full mouse and keyboard support
|
||||
|
||||
PrintPath = ''
|
||||
stat = Set_Printer('INIT',FileName,Title,Margins,PageSetup,PrintSetup,PrintPath)
|
||||
|
||||
IF stat < 0 THEN
|
||||
ErrorMsg = 'Stat = ' : Stat : ', PrintPath = ' : PrintPath
|
||||
GOTO OIPrintErr
|
||||
end
|
||||
DateRange = 'Effective ':OCONV(Date(),'D4')
|
||||
|
||||
Header<-1> = "'T'"
|
||||
Header<-1> = '' ;* Blank line following heading
|
||||
|
||||
font = 'Arial'
|
||||
font<2> = '10'
|
||||
font<4> = '0' ;* Bold
|
||||
|
||||
stat = Set_Printer('FONTHEADFOOT',font) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
stat = Set_Printer('HEADER',Header) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
Footer = " 'D' 'T'":@VM:@VM:"Page: 'P'"
|
||||
stat = Set_Printer('FOOTER',Footer) ; IF stat < 0 THEN GOTO OIPrintErr
|
||||
|
||||
@RECCOUNT = 0
|
||||
FirstPass = 1
|
||||
LastRecord = 0
|
||||
FirstLine = 1
|
||||
fontSpacing = 100
|
||||
|
||||
* Make Column Heading
|
||||
ColHead = ''
|
||||
ColFmt = ''
|
||||
|
||||
For each Column in RptColumns using @VM setting rcPos
|
||||
Locate Column in AllRptColumns using @VM setting dataPos then
|
||||
ColHead<0, -1> = Column
|
||||
ColFmt<0, -1> = AllColFmt<0, dataPos>
|
||||
end
|
||||
Next Column
|
||||
|
||||
* Zero Accumulators For Each Break
|
||||
|
||||
Prev.ReactNo = ''
|
||||
Last.ReactNo.Break = 1
|
||||
|
||||
GoTo ReadRecord
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Unable to open "SCHED_DET_NG" table.'
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ReadRecord:
|
||||
|
||||
* Zero Break Flags To False
|
||||
|
||||
ReactNo.Break=0
|
||||
|
||||
READNEXT @ID, Which.Value ELSE
|
||||
LastRecord = 1
|
||||
ReactNo.Break = 1
|
||||
ReactNo = Prev.ReactNo
|
||||
END
|
||||
|
||||
S.ATID = @ID
|
||||
|
||||
IF FirstPass AND LastRecord THEN
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
IF LastRecord THEN GOTO BREAKS
|
||||
|
||||
READO @RECORD FROM SchedDetTable,@ID ELSE
|
||||
GOTO ReadRecord
|
||||
END
|
||||
|
||||
@RECCOUNT += 1
|
||||
|
||||
* Calculate Value(s) For Column(s)
|
||||
|
||||
S.ATID = {@ID}
|
||||
I.ATID = S.ATID
|
||||
S.ReactNo = {REACT_NO}
|
||||
I.ReactNo = S.ReactNo
|
||||
S.WoNo = {WO_NO}
|
||||
I.WoNo = S.WoNo
|
||||
S.SubPartNo = XLATE('WO_LOG', S.WoNo, 'ORD_SUB_PART_NO', 'X')
|
||||
I.SubPartNo = S.SubPartNo
|
||||
S.EpiPartNo = XLATE('WO_LOG', S.WoNo, WO_LOG_EPI_PART_NO$, 'X')
|
||||
I.EpiPartNo = S.EpiPartNo
|
||||
S.WO_Qty = Xlate('WO_LOG', {WO_NO}, WO_LOG_WO_QTY$, 'X')
|
||||
I.WO_Qty = S.WO_Qty
|
||||
S.WO_RX_Qty = Xlate('WO_LOG', {WO_NO}, 'RX_QTY', 'X')
|
||||
I.WO_RX_Qty = S.WO_RX_Qty
|
||||
S.WO_UnRel_QTY = Xlate('WO_LOG', {WO_NO}, 'UNREL_QTY', 'X')
|
||||
I.WO_UnRel_QTY = S.WO_UnRel_QTY
|
||||
S.REACT_TYPE = Xlate('WO_LOG', {WO_NO}, 'REACT_TYPE', 'X')
|
||||
S.ProdOrdNo = Xlate('WO_LOG', {WO_NO}, 'PROD_ORD_NO', 'X')
|
||||
|
||||
Locate 'SR*KTR]' in LocationFilter using @VM setting vPos then
|
||||
KitData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'SR*KTR]')
|
||||
end else
|
||||
KitData = ''
|
||||
end
|
||||
|
||||
Swap @VM with ',' in KitData
|
||||
|
||||
S.KitLocation = KitData<1>
|
||||
I.KitLocation = S.KitLocation
|
||||
|
||||
S.KitCassCnt = COUNT(KitData<3>,',') + (KitData<3> NE '')
|
||||
I.KitCassCnt = S.KitCassCnt
|
||||
|
||||
KitCassList = KitData<3>
|
||||
S.KitQty = 0
|
||||
For each CassNo in KitCassList using ','
|
||||
S.KitQty += Xlate('WO_MAT', S.WONo:'*':CassNo, 'WAFER_QTY', 'X')
|
||||
Next CassNo
|
||||
I.KitQty = S.KitQty
|
||||
|
||||
Locate '1K*PTI' in LocationFilter using @VM setting vPos then
|
||||
PTIData = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':'1K*PTI')
|
||||
end else
|
||||
PTIData = ''
|
||||
end
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
Swap @VM with ',' in PTIData
|
||||
PTICassList = PTIData<3>
|
||||
|
||||
CRLocs = ''
|
||||
CRLocs<0, -1> = 'CR*BE'
|
||||
CRLocs<0, -1> = 'CR*BO'
|
||||
CRLocs<0, -1> = 'CR*TUN'
|
||||
CRLocs<0, -1> = 'CR*EPR'
|
||||
CRLocs<0, -1> = 'CR*FE'
|
||||
CRLocs<0, -1> = 'CR*FEH'
|
||||
CRLocs<0, -1> = 'CR*FO'
|
||||
CRLocs<0, -1> = 'CR*FOH'
|
||||
|
||||
LoadedData = ''
|
||||
LocQueryList = ''
|
||||
For each Loc in CRLocs using @VM setting crPos
|
||||
Locate Loc in LocationFilter using @VM setting vPos then
|
||||
LocQueryList<0, -1> = Loc
|
||||
end
|
||||
Next Loc
|
||||
LoadedCassList = ''
|
||||
ReactType = Xlate('WO_LOG', S.WONo, 'REACT_TYPE', 'X')
|
||||
If ReactType NE 'EPP' then
|
||||
If LocQueryList NE '' then
|
||||
For each CRLoc in LocQueryList using @VM
|
||||
CRLocInfo = Database_Services('ReadDataRow', 'WO_LOC', S.WONo:'*':CRLoc)
|
||||
CRLocCassList = CRLocInfo<3>
|
||||
LoadedCassList = SRP_Array('Join', LoadedCassList, CRLocCassList, 'OR', @VM)
|
||||
Next CRLoc
|
||||
end
|
||||
end
|
||||
|
||||
LoadedCassList = SRP_Array('Clean', LoadedCassList, 'TrimAndMakeUnique', @VM)
|
||||
* TEST FOR CONTROL BREAK(S)
|
||||
|
||||
IF (S.ReactNo NE Prev.ReactNo) OR ReactNo.Break THEN
|
||||
ReactNo = Prev.ReactNo
|
||||
Prev.ReactNo = S.ReactNo
|
||||
ReactNo.Break += 1
|
||||
END
|
||||
|
||||
IF FirstPass THEN
|
||||
FirstPass=0
|
||||
GOTO DETAIL
|
||||
END
|
||||
|
||||
|
||||
BREAKS:
|
||||
|
||||
* Print Break Total(s) And Accumulate Total(s)
|
||||
IF ReactNo.Break THEN stat = Set_Printer('TEXT')
|
||||
|
||||
* Perform Last Record Output If Done
|
||||
IF LastRecord THEN
|
||||
colData = ''
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
DETAIL:
|
||||
|
||||
* Do Conversion If Any
|
||||
|
||||
IF S.REACTNO NE "" THEN S.REACTNO = OCONV(S.REACTNO,"MD0,")
|
||||
IF S.WONO NE "" THEN S.WONO = OCONV(S.WONO,"MD0")
|
||||
IF S.WO_QTY NE "" THEN S.WO_QTY = OCONV(S.WO_QTY,"MD0,")
|
||||
IF S.WO_RX_QTY NE "" THEN S.WO_RX_QTY = OCONV(S.WO_RX_QTY,"MD0,")
|
||||
IF S.WO_UNREL_QTY NE "" THEN S.WO_UNREL_QTY = OCONV(S.WO_UNREL_QTY,"MD0,")
|
||||
|
||||
* PRINT DETAIL LINE
|
||||
|
||||
COLDATA = ''
|
||||
RowNumber = 0
|
||||
|
||||
/* ascending sort */
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
KitCassList = SRP_Array('SortSimpleList', KitCassList, 'AscendingNumbers', ',')
|
||||
PTICassList = SRP_Array('SortSimpleList', PTICassList, 'AscendingNumbers', ',')
|
||||
LoadedCassList = SRP_Array('SortSimpleList', LoadedCassList, 'AscendingNumbers', ',')
|
||||
|
||||
Convert ',' to @VM in KitCassList
|
||||
Convert ',' to @VM in PTICassList
|
||||
Convert ',' to @VM in LoadedCassList
|
||||
|
||||
NumKitCass = DCount(KitCassList, @VM)
|
||||
If NumKitCass GT 4 then
|
||||
For CassIndex = 4 to NumKitCass Step 4
|
||||
CassNo = KitCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
KitCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumPTICass = DCount(PTICassList, @VM)
|
||||
If NumPTICass GT 4 then
|
||||
For CassIndex = 4 to NumPTICass Step 4
|
||||
CassNo = PTICassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
PTICassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
NumLoadedCass = DCount(LoadedCassList, @VM)
|
||||
If NumLoadedCass GT 2 then
|
||||
For CassIndex = 2 to NumLoadedCass Step 2
|
||||
CassNo = LoadedCassList<0, CassIndex>
|
||||
CassNo := CRLF$
|
||||
LoadedCassList<0, CassIndex> = CassNo
|
||||
Next CassIndex
|
||||
end
|
||||
Convert @VM to ',' in KitCassList
|
||||
Convert @VM to ',' in PTICassList
|
||||
Convert @VM to ',' in LoadedCassList
|
||||
|
||||
CassNeeded = ''
|
||||
EpiPartNo = Xlate('WO_LOG', S.WONo, 'EPI_PART_NO', 'X')
|
||||
If EpiPartNo NE '' then
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
||||
Swap '.1' with '' in S.ProdOrdNo
|
||||
AllReportData = ''
|
||||
AllReportData<1> = S.ReactNo
|
||||
AllReportData<2> = S.React_Type
|
||||
AllReportData<3> = S.WONo
|
||||
AllReportData<4> = S.ProdOrdNo
|
||||
AllReportData<5> = S.SubPartNo
|
||||
AllReportData<6> = S.EpiPartNo
|
||||
AllReportData<7> = S.WO_Qty
|
||||
AllReportData<8> = S.WO_RX_Qty
|
||||
AllReportData<9> = S.WO_UnRel_Qty
|
||||
AllReportData<10> = S.KitLocation
|
||||
AllReportData<11> = S.KitQty
|
||||
AllReportData<12> = CassNeeded
|
||||
AllReportData<13> = KitCassList
|
||||
AllReportData<14> = PTICassList
|
||||
AllReportData<15> = LoadedCassList
|
||||
AllReportData<16> = ''
|
||||
|
||||
If ( (KitCassList NE '') or (PTICassList NE '') or (LoadedCassList NE '') or (NoMatFlag EQ True$) ) then
|
||||
RowNumber += 1
|
||||
For each RptColumn in RptColumns using @VM setting rcPos
|
||||
Locate RptColumn in AllRptColumns using @VM setting dataPos then
|
||||
COLDATA<RowNumber,rcPos> = AllReportData<dataPos>
|
||||
end
|
||||
Next RptColumn
|
||||
If COLDATA NE '' then GoSub PrintTable
|
||||
END
|
||||
|
||||
GOTO ReadRecord
|
||||
|
||||
Bail:
|
||||
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
OIPrintErr:
|
||||
|
||||
ErrMsg(ErrorTitle:@SVM:ErrorMsg)
|
||||
ErrMsg(ErrorTitle:@SVM:'Set_Printer returned errorcode ':stat)
|
||||
stat = Set_Printer('TERM',1)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
PrintTable:
|
||||
|
||||
PageHeight = Get_Printer('PAGESIZE')<2>
|
||||
PrintableHeight = PageHeight - TopMargin - BottomMargin
|
||||
PrinterHeight = Get_Printer('POS')<2>
|
||||
stat = Set_Printer('CALCTABLE',ColFmt:@FM:ColData)
|
||||
TableSize = Get_Printer('CALCTABLE')
|
||||
TableHeight = TableSize<2>
|
||||
fontSpacing = 120
|
||||
|
||||
IF ( TableHeight + PrinterHeight >= PrintableHeight ) OR FirstLine THEN
|
||||
IF NOT(FirstLine) THEN
|
||||
stat = Set_Printer('PAGEBREAK')
|
||||
END
|
||||
FirstLine = 0
|
||||
font<2> = 10
|
||||
font<4> = 1 ;* Bold
|
||||
stat = Set_Printer('FONT',font,'100')
|
||||
stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL)
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7)
|
||||
END ELSE
|
||||
font<2> = 10
|
||||
font<4> = 0
|
||||
stat = Set_Printer('FONT',font,fontSpacing)
|
||||
stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',1,TB_ALL)
|
||||
END
|
||||
|
||||
RETURN
|
||||
|
||||
|
28
LSL2/STPROCINS/MATERIAL_REPORT_EQUATES.txt
Normal file
28
LSL2/STPROCINS/MATERIAL_REPORT_EQUATES.txt
Normal file
@ -0,0 +1,28 @@
|
||||
compile insert MATERIAL_REPORT_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 23/01/2025
|
||||
Description : Insert for Table MATERIAL_REPORT
|
||||
----------------------------------------*/
|
||||
#ifndef __MATERIAL_REPORT_EQUATES__
|
||||
#define __MATERIAL_REPORT_EQUATES__
|
||||
|
||||
equ MATERIAL_REPORT.REACT_NO$ to 1
|
||||
equ MATERIAL_REPORT.REACT_TYPE$ to 2
|
||||
equ MATERIAL_REPORT.WO_NO$ to 3
|
||||
equ MATERIAL_REPORT.PROD_ORD_NO$ to 4
|
||||
equ MATERIAL_REPORT.SUB_PART_NO$ to 5
|
||||
equ MATERIAL_REPORT.EPI_PART_NO$ to 6
|
||||
equ MATERIAL_REPORT.WO_QTY$ to 7
|
||||
equ MATERIAL_REPORT.WO_RX_QTY$ to 8
|
||||
equ MATERIAL_REPORT.WO_UNREL_QTY$ to 9
|
||||
equ MATERIAL_REPORT.KIT_LOCATION$ to 10
|
||||
equ MATERIAL_REPORT.KIT_QTY$ to 11
|
||||
equ MATERIAL_REPORT.CASS_DELTA$ to 12
|
||||
equ MATERIAL_REPORT.KIT_RO$ to 13
|
||||
equ MATERIAL_REPORT.KIT_DEMAND$ to 14
|
||||
equ MATERIAL_REPORT.PTI_RO$ to 15
|
||||
equ MATERIAL_REPORT.LOAD_RO$ to 16
|
||||
equ MATERIAL_REPORT.COMMENTS$ to 17
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user