This commit is contained in:
USER-20220102CG\noblelift
2022-08-04 18:10:11 +08:00
parent e64259eb9f
commit 9ca1d98ba5
4 changed files with 45 additions and 12 deletions

View File

@@ -196,29 +196,47 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
case 3:
break;
case 4:
//获取托盘信息
//人工排产确认
// if (!requireSucess && !order_No.equals("0")) {
// JSONObject json = new JSONObject();
// json.put("producetask_code",order_No);
// json.put("device_code",this.device_code);
// json.put("material_code",material);
// json.put("weight",weight);
// json.put("type","1");
// enterProduction(json);
// }
break;
case 5:
//获取托盘信息(需提供抓取工位或放置工位)
if (!requireSucess) {
getVehicle();
}
break;
case 5:
//码垛完成
if (!requireSucess) {
palletizing();
}
break;
case 6:
//码垛强制完成
//码垛完成
if (!requireSucess) {
mandatoryPalletizing();
}
break;
case 7:
//码垛强制完成
if (!requireSucess) {
applyEmpty();
}
break;
case 8:
//申请空盘
if (!requireSucess) {
applyEmpty();
}
break;
case 9:
//工单完成
if (!requireSucess) {
applyEmpty();
}
break;
}
switch (flag) {

View File

@@ -314,9 +314,9 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
this.writing(1);
this.setRequireSucess(true);
}
}
this.setRequireSucess(true);
return true;
}
}
@@ -366,7 +366,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
JSONObject json = new JSONObject();
json.put("device_code",this.device_code);
json.put("type","1");
json.put("material",material);
json.put("material_code",material);
json.put("vehicle_code",barcode);
json.put("is_full","1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
@@ -375,8 +375,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
this.writing(1);
}
this.setRequireSucess(true);
}
this.setRequireSucess(true);
return true;
}
}

View File

@@ -293,6 +293,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver;
LnshPressDeviceDriver lnshPressDeviceDriver;
LnshPackagePalletManipulatorDeviceDriver lnshPackagePalletManipulatorDeviceDriver;
LnshPalletizingManipulatorDeviceDriver lnshPalletizingManipulatorDeviceDriver;
if (device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver) {
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver();
if (StrUtil.isEmpty(qty)) {
@@ -319,6 +320,19 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
lnshPressDeviceDriver.writing("to_material_code",material_code);
is_flag = true;
}
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorDeviceDriver) {
lnshPalletizingManipulatorDeviceDriver = (LnshPalletizingManipulatorDeviceDriver) device.getDeviceDriver();
if (StrUtil.isEmpty(qty)) {
throw new WDKException("数量不能为空");
}
if (StrUtil.isEmpty(material_code)) {
throw new WDKException("物料编号不能为空!");
}
lnshPalletizingManipulatorDeviceDriver.writing("to_order_No",producetask_code);
lnshPalletizingManipulatorDeviceDriver.writing("to_material_qty",qty);
lnshPalletizingManipulatorDeviceDriver.writing("to_material_code",material_code);
is_flag = true;
}
if (device.getDeviceDriver() instanceof LnshPackagePalletManipulatorDeviceDriver) {
lnshPackagePalletManipulatorDeviceDriver = (LnshPackagePalletManipulatorDeviceDriver) device.getDeviceDriver();
if (StrUtil.isEmpty(qty)) {

View File

@@ -158,6 +158,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
FileUtil.downloadExcel(list, response);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void finish(String ids) {
ProduceshiftorderDto dto = this.findById(ids);
@@ -177,7 +178,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
json.put("device_code",dto.getDevice_code());
json.put("material_code",dto.getMaterial_code());
json.put("qty",dto.getQty());
json.put("type","3");
json.put("type","2");
acsToWmsService.enterOrder(json);
}
}