更新
This commit is contained in:
@@ -122,7 +122,7 @@ IF 输入.flag = "3"
|
||||
left join st_rule_IOdisStruct ruledis on ruledis.struct_uuid = ivt.struct_id
|
||||
LEFT JOIN st_buss_vehiclegroup vehiclegroup ON vehiclegroup.vehicle_code = ivt.vehicle_code
|
||||
WHERE
|
||||
ivt.canuse_qty > 0
|
||||
ivt.canuse_qty >= 0
|
||||
AND point.point_status = '02'
|
||||
AND point.lock_type = '00'
|
||||
AND point.is_used ='1'
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.nl.wms.common.StructFindUtil;
|
||||
import org.nl.wms.database.service.VehicleService;
|
||||
import org.nl.wms.database.service.dto.VehicleDto;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.AreaEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.manage.VehicleTypeEnum;
|
||||
@@ -798,25 +799,12 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
// 任务处理类
|
||||
try {
|
||||
Class<?> clz = Class.forName(processing_class);
|
||||
Object obj = clz.newInstance();
|
||||
// 调用每个任务类的forceFinishInst()强制结束方法
|
||||
Method m = obj.getClass().getDeclaredMethod("updateTaskStatus", JSONObject.class, String.class);
|
||||
m.invoke(obj, row, status);
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
//空指针
|
||||
if (ObjectUtil.isNull(e.getTargetException().getMessage())) {
|
||||
message = e.getTargetException().toString();
|
||||
} else {
|
||||
message = e.getTargetException().getMessage();
|
||||
}
|
||||
log.info("任务状态更新失败:{}", message);
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_id", task_id);
|
||||
json.put("message", message);
|
||||
errArr.add(json);
|
||||
|
||||
AbstractAcsTask bean = (AbstractAcsTask) SpringContextHolder.getBean(clz);
|
||||
bean.updateTaskStatus(row, status);
|
||||
// Object obj = clz.newInstance();
|
||||
// // 调用每个任务类的forceFinishInst()强制结束方法
|
||||
// Method m = obj.getClass().getDeclaredMethod("updateTaskStatus", JSONObject.class, String.class);
|
||||
// m.invoke(obj, row, status);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
message = e.getMessage();
|
||||
@@ -908,21 +896,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
throw new BadRequestException("当前点位有空托任务未完成!");
|
||||
}
|
||||
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code);
|
||||
// JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code);
|
||||
//根据点位获取排产单
|
||||
String material_id = produceInfoByCode.getString("material_id");
|
||||
// String material_id = produceInfoByCode.getString("material_id");
|
||||
String vehicle_code = pointTable.query("point_code = '" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
||||
JSONObject result = new JSONObject();
|
||||
WQLObject CribbingInfo_Table = WQLObject.getWQLObject("MD_ME_CribbingInfo");
|
||||
// WQLObject CribbingInfo_Table = WQLObject.getWQLObject("MD_ME_CribbingInfo");
|
||||
WQLObject group_table = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
//从基础表里去获取
|
||||
result = CribbingInfo_Table.query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||
|
||||
} else {
|
||||
//从组盘表里面去获取
|
||||
result = group_table.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
}
|
||||
//从组盘表里面去获取组盘信息
|
||||
JSONObject result = group_table.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
JSONObject resultJSON = new JSONObject();
|
||||
resultJSON.put("content", result);
|
||||
resultJSON.put("status", HttpStatus.OK.value());
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
LEFT JOIN sch_base_point point ON ivt.struct_id = point.point_id
|
||||
LEFT JOIN st_buss_vehiclegroup vehiclegroup ON vehiclegroup.vehicle_code = ivt.vehicle_code
|
||||
WHERE
|
||||
ivt.canuse_qty > 0
|
||||
ivt.canuse_qty >= 0
|
||||
AND ivt.vehicle_code <> ''
|
||||
AND ivt.is_full = '0'
|
||||
AND point.is_used = 1
|
||||
|
||||
@@ -145,9 +145,9 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
|
||||
if (StrUtil.isEmpty(vehicle_code) || "0000".equals(vehicle_code) || "0".equals(vehicle_code)) {
|
||||
vehicle_code = startPoint.getVehicle_code();
|
||||
}
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException("载具未找到!");
|
||||
}
|
||||
// if (StrUtil.isEmpty(vehicle_code)) {
|
||||
// throw new BadRequestException("载具未找到!");
|
||||
// }
|
||||
//判断起点有没有未完成的指令
|
||||
JSONObject beforTaskObj = taskTable.
|
||||
query("is_delete='0' and start_point_code='" + start_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'")
|
||||
|
||||
Reference in New Issue
Block a user