|
|
|
|
@@ -419,8 +419,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> updateTask(String whereJson) {
|
|
|
|
|
JSONArray datas = JSONArray.parseArray(whereJson);
|
|
|
|
|
log.info("WMS更新任务点位状态--------------:输入参数" + datas.toString());
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(whereJson);
|
|
|
|
|
log.info("WMS更新任务点位状态--------------:输入参数" + jsonObject.toString());
|
|
|
|
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
|
|
|
|
.device_code("WMS更新任务点位状态")
|
|
|
|
|
.content("WMS更新任务点位状态-----输入参数:" + whereJson)
|
|
|
|
|
@@ -428,24 +428,14 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
logDto.setLog_level(4);
|
|
|
|
|
luceneExecuteLogService.deviceExecuteLog(logDto);
|
|
|
|
|
JSONArray errArr = new JSONArray();
|
|
|
|
|
if (datas.size() > 0) {
|
|
|
|
|
for (int i = 0; i < datas.size(); i++) {
|
|
|
|
|
JSONObject jsonObject = datas.getJSONObject(i);
|
|
|
|
|
String device_code = jsonObject.getString("device_code");
|
|
|
|
|
//1-允许取放;
|
|
|
|
|
String option = jsonObject.getString("option");
|
|
|
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
|
|
|
|
Device device_k = deviceAppService.findDeviceByCode(device_code);
|
|
|
|
|
Device device_m = deviceAppService.findDeviceByCode(device_code);
|
|
|
|
|
if (device_k.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_k.getDeviceDriver();
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
|
|
|
|
|
}
|
|
|
|
|
if (device_m.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_m.getDeviceDriver();
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String device_code = jsonObject.getString("device_code");
|
|
|
|
|
//1-允许取放;
|
|
|
|
|
String option = jsonObject.getString("option");
|
|
|
|
|
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
|
|
|
|
Device device_k = deviceAppService.findDeviceByCode(device_code);
|
|
|
|
|
if (device_k.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
|
|
|
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device_k.getDeviceDriver();
|
|
|
|
|
standardOrdinarySiteDeviceDriver.setOption(Integer.parseInt(option));
|
|
|
|
|
}
|
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
if (ObjectUtil.isEmpty(errArr)) {
|
|
|
|
|
@@ -458,6 +448,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
resultJson.put("errArr", errArr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
|
|
|
|
.device_code("WMS更新任务点位状态")
|
|
|
|
|
.content("WMS更新任务点位状态-----返回参数:" + resultJson)
|
|
|
|
|
@@ -508,7 +499,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
InflatableShaftLibraryDeviceDriver inflatableShaftLibraryDeviceDriver;
|
|
|
|
|
HongXiangStationDeviceDriver hongXiangStationDeviceDriver;
|
|
|
|
|
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
|
|
|
|
|
BeltConveyorDeviceDriver beltConveyorDeviceDriver ;
|
|
|
|
|
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
|
|
|
|
|
WasteFoilWeighingStationDriver wasteFoilWeighingStationDriver;
|
|
|
|
|
FoldDiscSiteDeviceDriver foldDiscSiteDeviceDriver;
|
|
|
|
|
if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
|
|
|
|
|
@@ -520,7 +511,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
lampThreecolorDeviceDriver.writing(code, value);
|
|
|
|
|
}
|
|
|
|
|
if (device.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
|
|
|
|
|
beltConveyorDeviceDriver=(BeltConveyorDeviceDriver) device.getDeviceDriver();
|
|
|
|
|
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) device.getDeviceDriver();
|
|
|
|
|
beltConveyorDeviceDriver.writing(code, value);
|
|
|
|
|
}
|
|
|
|
|
if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
|
|
|
|
|
@@ -587,11 +578,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
wasteFoilWeighingStationDriver.writing("to_command", "6");
|
|
|
|
|
Thread.sleep(1000); //休眠1秒
|
|
|
|
|
while (wasteFoilWeighingStationDriver.getMode() == 6) {
|
|
|
|
|
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
|
|
|
|
|
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
|
|
|
|
|
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
|
|
|
|
|
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
|
|
|
|
|
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
wasteFoilWeighingStationDriver.writing("to_command", "0");
|
|
|
|
|
}
|
|
|
|
|
//称重确认信号
|
|
|
|
|
@@ -599,10 +590,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
wasteFoilWeighingStationDriver.writing("to_command", "7");
|
|
|
|
|
Thread.sleep(1000); //休眠1秒
|
|
|
|
|
while (wasteFoilWeighingStationDriver.getMode() == 7) {
|
|
|
|
|
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
|
|
|
|
|
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
|
|
|
|
|
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
|
|
|
|
|
break;
|
|
|
|
|
jo.put("currentWeight", wasteFoilWeighingStationDriver.getWeight());//当前重量
|
|
|
|
|
jo.put("lastWeight", wasteFoilWeighingStationDriver.getOld_weight());//上一次重量
|
|
|
|
|
jo.put("weightGap", wasteFoilWeighingStationDriver.getGap_weight());//重量差
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
wasteFoilWeighingStationDriver.writing("to_command", "0");
|
|
|
|
|
}
|
|
|
|
|
@@ -649,11 +640,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
PaperTubePickSiteDeviceDriver paperTubePickSiteDeviceDriver;
|
|
|
|
|
if (device.getDeviceDriver() instanceof PaperTubePickSiteDeviceDriver) {
|
|
|
|
|
paperTubePickSiteDeviceDriver = (PaperTubePickSiteDeviceDriver) device.getDeviceDriver();
|
|
|
|
|
if (ObjectUtil.isEmpty(to_material)){
|
|
|
|
|
if (ObjectUtil.isEmpty(to_material)) {
|
|
|
|
|
map.put("to_material", "0");
|
|
|
|
|
map.put("to_spec", "0");
|
|
|
|
|
map.put("to_qty", "0");
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
map.put("to_material", to_material);
|
|
|
|
|
map.put("to_spec", to_spec);
|
|
|
|
|
map.put("to_qty", to_qty);
|
|
|
|
|
@@ -857,8 +848,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|
|
|
|
jo.put("qty", foldDiscSiteDeviceDriver.getQty());
|
|
|
|
|
jo.put("container_type", foldDiscSiteDeviceDriver.getContainer_type());
|
|
|
|
|
jo.put("error", foldDiscSiteDeviceDriver.getError());
|
|
|
|
|
}
|
|
|
|
|
else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
|
|
|
|
|
} else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
|
|
|
|
|
inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver();
|
|
|
|
|
jo.put("device_code", parent_device_code);
|
|
|
|
|
jo.put("move", inflatableShaftLibraryDeviceDriver.getMove());
|
|
|
|
|
|