opt: 贴标增加字段

This commit is contained in:
yanps
2024-05-08 15:13:22 +08:00
parent 40ae72314a
commit 9c3d8f3322

View File

@@ -291,6 +291,11 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
if (move > 0 && !requireSucess) {
applyLaStrangulationAndLabeling(mode);
}
case 17:
//申请调试贴标
if(move > 0 && !requireSucess){
applyLaStrangulationAndLabeling(mode);
}
break;
}
}
@@ -413,6 +418,8 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
String bindingTemplate = jo.get("bindingTemplate").toString();
String printDevice = jo.get("printDevice").toString();
String bundleTimes = jo.get("bundleTimes").toString();
String case1 = jo.get("case").toString();
String direction = jo.get("direction").toString();
List list = new ArrayList();
if (mode == 10 || mode == 16) {
@@ -521,6 +528,41 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
map12.put("value", labelingTemplate);
list.add(map12);
}
if(mode == 17){
Map map = new HashMap();
map.put("code", "to_length");
map.put("value", length);
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_weight");
map2.put("value", weight);
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_height");
map3.put("value", height);
list.add(map3);
Map map5 = new HashMap();
map5.put("code", "to_command");
map5.put("value", mode);
list.add(map5);
Map map11 = new HashMap();
map11.put("code", "to_binding_times");
map11.put("value", bundleTimes);
list.add(map11);
if(StrUtil.isNotEmpty(case1) && !" ".equals(case1)){
Map map12 = new HashMap();
map12.put("code", "to_binding_times");
map12.put("value", bundleTimes);
list.add(map12);
}
if(StrUtil.isNotEmpty(direction) && !" ".equals(direction)){
Map map13 = new HashMap();
map13.put("code", "to_direction");
map13.put("value", direction);
list.add(map13);
}
}
try {
this.writing(list);
} catch (Exception e) {