psh 11 months ago
parent
commit
35edc07e4f
  1. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java
  2. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java
  3. 12
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java
  4. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java

@ -76,6 +76,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
int move = 0;
int task = 0;
int action = 0;
int last_action=0;
int last_mode = 0;
int last_error = 0;
int last_move = 0;
@ -242,6 +243,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
last_task = task;
last_material_type = material_type;
last_barcode=barcode;
last_action=action;
}

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/BPSLTask.java

@ -170,9 +170,9 @@ public class BPSLTask extends AbstractTask {
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue()));
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
}
if (ObjectUtil.isNotEmpty(one)) {
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
// }
one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
one.setPoint_name(endPointObj.getPoint_name());
@ -182,6 +182,7 @@ public class BPSLTask extends AbstractTask {
one.setUpdate_name(GeneralDefinition.ACS_NAME);
one.setUpdate_time(DateUtil.now());
vehiclematerialgroupService.updateById(one);
}
// 起点清空
if (vehicleCodeList.size()==1) {
startPointObj.setVehicle_code("");

12
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/MJXLTask.java

@ -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("当前固化室点位有任务,暂不反馈!");
}
}
}

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/ghs/GHSFMTask.java

@ -240,9 +240,9 @@ public class GHSFMTask extends AbstractTask {
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
GroupBindMaterialStatusEnum.BOUND.getValue()));
if (ObjectUtil.isEmpty(one)) {
throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
}
if (ObjectUtil.isNotEmpty(one)) {
// throw new BadRequestException(vehicleCode + " => " + startPointObj.getVehicle_type() + "的组盘信息未找到");
// }
one.setTask_code(taskObj.getTask_code());
one.setPoint_code(endPointObj.getPoint_code()); // 当前位置
one.setPoint_name(endPointObj.getPoint_name());
@ -253,6 +253,7 @@ public class GHSFMTask extends AbstractTask {
vehiclematerialgroupService.updateById(one);
group_id.append(one.getGroup_id()).append(',');
}
}
// 起点清空
if (ObjectUtil.isNotEmpty(startPointObj)) {
PointUtils.clearPoint(startPointObj);

Loading…
Cancel
Save