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