|
@ -149,7 +149,7 @@ public class MJXLTask extends AbstractTask { |
|
|
} |
|
|
} |
|
|
for (SchBasePoint schBasePoint2 : schBasePointList) { |
|
|
for (SchBasePoint schBasePoint2 : schBasePointList) { |
|
|
if(list.contains(schBasePoint2.getPoint_code())) { |
|
|
if(list.contains(schBasePoint2.getPoint_code())) { |
|
|
if (schBasePoint2.getVehicle_type() != null && !materialType.equals(schBasePoint2.getVehicle_type())) { |
|
|
if (ObjectUtil.isNotEmpty(schBasePoint2.getVehicle_type()) && !materialType.equals(schBasePoint2.getVehicle_type())) { |
|
|
flag = false; |
|
|
flag = false; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -183,10 +183,13 @@ public class MJXLTask extends AbstractTask { |
|
|
String vehicle_code = ObjectUtil.isNotEmpty(taskObj.getVehicle_code()) |
|
|
String vehicle_code = ObjectUtil.isNotEmpty(taskObj.getVehicle_code()) |
|
|
? taskObj.getVehicle_code() |
|
|
? taskObj.getVehicle_code() |
|
|
: IdUtil.getSnowflake(1, 1).nextIdStr(); |
|
|
: IdUtil.getSnowflake(1, 1).nextIdStr(); |
|
|
PdmBdWorkorder workorderCode = ObjectUtil.isNotEmpty(extGroupData.getString("workorder_code")) |
|
|
PdmBdWorkorder workorderCode = null; |
|
|
|
|
|
if (extGroupData != null) { |
|
|
|
|
|
workorderCode = ObjectUtil.isNotEmpty(extGroupData.getString("workorder_code")) |
|
|
? workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>() |
|
|
? workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>() |
|
|
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code"))) |
|
|
.eq(PdmBdWorkorder::getWorkorder_code, extGroupData.getString("workorder_code"))) |
|
|
: null; |
|
|
: null; |
|
|
|
|
|
} |
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
|
|
String endPoint = ObjectUtil.isNotEmpty(taskObj.getPoint_code2())?taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2):"0"; // 获取终点
|
|
|
String endPoint = ObjectUtil.isNotEmpty(taskObj.getPoint_code2())?taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2):"0"; // 获取终点
|
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
|
SchBasePoint startPointObj = pointService.getById(startPoint); |
|
@ -280,14 +283,13 @@ public class MJXLTask extends AbstractTask { |
|
|
@Override |
|
|
@Override |
|
|
protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { |
|
|
protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) { |
|
|
//重新计算固化室放货点位
|
|
|
//重新计算固化室放货点位
|
|
|
try { |
|
|
|
|
|
JSONObject extGroupData = JSONObject.parseObject(schBaseTask.getExt_group_data()); |
|
|
JSONObject extGroupData = JSONObject.parseObject(schBaseTask.getExt_group_data()); |
|
|
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>() |
|
|
SchBasePoint startPoint = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>() |
|
|
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); |
|
|
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); |
|
|
SchBasePoint point = findNextPoint(startPoint, extGroupData); |
|
|
SchBasePoint point = findNextPoint(startPoint, extGroupData); |
|
|
schBaseTask.setPoint_code2(point.getPoint_code()+"0"+(point.getVehicle_qty()+1)); |
|
|
schBaseTask.setPoint_code2(point.getPoint_code()+"0"+(point.getVehicle_qty()+1)); |
|
|
} catch (Exception e) { |
|
|
if(point.getIng_task_code()!=null){ |
|
|
log.error("error:{}", e, e.getMessage()); |
|
|
throw new BadRequestException("当前固化室点位有任务,暂不反馈!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|