@hitsoft/uretim-yonetimi 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/hit-proxy/models.mjs +39 -34
- package/fesm2015/hitsoft-uretim-yonetimi.mjs +38 -33
- package/fesm2015/hitsoft-uretim-yonetimi.mjs.map +1 -1
- package/fesm2020/hitsoft-uretim-yonetimi.mjs +38 -33
- package/fesm2020/hitsoft-uretim-yonetimi.mjs.map +1 -1
- package/lib/hit-proxy/models.d.ts +1 -1
- package/package.json +1 -1
|
@@ -121,42 +121,47 @@ class HitHelper {
|
|
|
121
121
|
.map((err, index) => `${index + 1}. ${err}`)
|
|
122
122
|
.join('\n');
|
|
123
123
|
}
|
|
124
|
-
static parseQR(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
const
|
|
124
|
+
static parseQR(barkod) {
|
|
125
|
+
debugger;
|
|
126
|
+
const elTerminalKoduStartIndex = barkod.lastIndexOf("KM");
|
|
127
|
+
const elTerminalKodu = barkod.substring(elTerminalKoduStartIndex);
|
|
128
|
+
const sabit21Index = elTerminalKoduStartIndex - 2;
|
|
129
|
+
const tartimMiktar = barkod.substring(sabit21Index - 6, sabit21Index);
|
|
130
|
+
const sabit3103Index = sabit21Index - 6 - 4;
|
|
131
|
+
const sonKullanmaTarihi = barkod.substring(sabit3103Index - 6, sabit3103Index);
|
|
132
|
+
const sabit17Index = sabit3103Index - 6 - 2;
|
|
133
|
+
const kimyasalKoduStartIndex = 3;
|
|
134
|
+
const kimyasalKodu = barkod.substring(kimyasalKoduStartIndex, kimyasalKoduStartIndex + 14);
|
|
135
|
+
const sabit10Index = kimyasalKoduStartIndex + 14;
|
|
136
|
+
const lotNo = barkod.substring(sabit10Index + 2, sabit17Index);
|
|
137
|
+
const chemicalCodeMatch = kimyasalKodu;
|
|
138
|
+
const lotNumberMatch = lotNo;
|
|
139
|
+
const expDateMatch = sonKullanmaTarihi;
|
|
140
|
+
const weightMatch = tartimMiktar;
|
|
141
|
+
const terminalCodeMatch = elTerminalKodu;
|
|
137
142
|
if (!chemicalCodeMatch || !lotNumberMatch || !expDateMatch || !weightMatch || !terminalCodeMatch) {
|
|
138
143
|
return null;
|
|
139
144
|
}
|
|
140
|
-
var onMu = false;
|
|
141
|
-
while
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
var onYediMi = false;
|
|
151
|
-
while
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
145
|
+
// var onMu = false;
|
|
146
|
+
// while(!onMu){
|
|
147
|
+
// if(lotNumberMatch[1].substring(0, 2) == "10"){
|
|
148
|
+
// chemicalCodeMatch[1] += "10";
|
|
149
|
+
// lotNumberMatch[1] = lotNumberMatch[1].substring(2);
|
|
150
|
+
// }
|
|
151
|
+
// else{
|
|
152
|
+
// onMu = true;
|
|
153
|
+
// }
|
|
154
|
+
// }
|
|
155
|
+
// var onYediMi = false;
|
|
156
|
+
// while(!onYediMi){
|
|
157
|
+
// if(expDateMatch[1].substring(0, 2) == "17"){
|
|
158
|
+
// lotNumberMatch[1] += "17";
|
|
159
|
+
// expDateMatch[1] = expDateMatch[1].substring(2);
|
|
160
|
+
// }
|
|
161
|
+
// else{
|
|
162
|
+
// onYediMi = true;
|
|
163
|
+
// }
|
|
164
|
+
// }
|
|
160
165
|
if (!chemicalCodeMatch || !lotNumberMatch || !expDateMatch || !weightMatch || !terminalCodeMatch) {
|
|
161
166
|
return null;
|
|
162
167
|
}
|