add: 收卷锟添加光电校验
This commit is contained in:
@@ -1156,7 +1156,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
//收卷锟行架
|
||||
if (linkDevice.getDeviceDriver() instanceof RollUpRollerManipulatorDeviceDriver) {
|
||||
rollUpRollerManipulatorDeviceDriver = (RollUpRollerManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && rollUpRollerManipulatorDeviceDriver.getMode() != 3 && rollUpRollerManipulatorDeviceDriver.getError() == 0 && rollUpRollerManipulatorDeviceDriver.getTask() == 0 && rollUpRollerManipulatorDeviceDriver.getError2() == 0)) {
|
||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && rollUpRollerManipulatorDeviceDriver.getMode() != 3 && rollUpRollerManipulatorDeviceDriver.getError() == 0 && rollUpRollerManipulatorDeviceDriver.getTask() == 0 && rollUpRollerManipulatorDeviceDriver.getError2() == 0 && manipulatorAgvStationDeviceDriver.getMove() == 1)) {
|
||||
// 查询缓存架点位状态
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("device_code", device_code);
|
||||
|
||||
@@ -217,18 +217,19 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
this.setIserror(true);
|
||||
message = "universal_message3";
|
||||
//满入空出分配新点位
|
||||
if ((error2 == 2 || error2 == 3) && !actionRequireSucess) {
|
||||
if (task == 0 || target == null) {
|
||||
notCreateInstMessage = "管芯规格或库位为空";
|
||||
} else {
|
||||
if (error2 == 2) {
|
||||
errorDispose(PointErrorTypeEnum.IN.getCode());
|
||||
} else {
|
||||
errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//行架有问题
|
||||
// if ((error2 == 2 || error2 == 3) && !actionRequireSucess) {
|
||||
// if (task == 0 || target == null) {
|
||||
// notCreateInstMessage = "管芯规格或库位为空";
|
||||
// } else {
|
||||
// if (error2 == 2) {
|
||||
// errorDispose(PointErrorTypeEnum.IN.getCode());
|
||||
// } else {
|
||||
// errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//无报警
|
||||
}
|
||||
|
||||
@@ -535,6 +536,14 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (manipulatorAgvStationDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!任务号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Map<String, Object> map1 = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
@@ -600,6 +609,14 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
||||
}
|
||||
}
|
||||
|
||||
if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver();
|
||||
if (manipulatorAgvStationDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-收卷锟对接位:" + manipulatorAgvStationDeviceDriver.getMove() + "有货,无法下发指令!" ;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
String taskid = taskDto.getTask_id();
|
||||
String taskcode = taskDto.getTask_code();
|
||||
String route_plan_code = taskDto.getRoute_plan_code();
|
||||
|
||||
@@ -303,17 +303,17 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
errArr.add(json);
|
||||
continue;
|
||||
}
|
||||
if (!StrUtil.isEmpty(vehicle_code)) {
|
||||
TaskDto vehicle_dto = taskserver.findByContainer(vehicle_code);
|
||||
if (vehicle_dto != null) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_code", task_code);
|
||||
json.put("ext_task_id", ext_task_id);
|
||||
json.put("message", "已存在任务编号为" + vehicle_dto.getTask_code() + "托盘号:" + vehicle_code);
|
||||
errArr.add(json);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// if (!StrUtil.isEmpty(vehicle_code)) {
|
||||
// TaskDto vehicle_dto = taskserver.findByContainer(vehicle_code);
|
||||
// if (vehicle_dto != null) {
|
||||
// JSONObject json = new JSONObject();
|
||||
// json.put("task_code", task_code);
|
||||
// json.put("ext_task_id", ext_task_id);
|
||||
// json.put("message", "已存在任务编号为" + vehicle_dto.getTask_code() + "托盘号:" + vehicle_code);
|
||||
// errArr.add(json);
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (StrUtil.isEmpty(start_point_code)) {
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -735,9 +735,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String targetAddress = gxDevice.getExtraValue().get("address").toString();
|
||||
map.put("to_target" + (i + 1), targetAddress);
|
||||
}
|
||||
map.put("to_command", 1);
|
||||
|
||||
pipeCoreRackStationDeviceDriver.writing(map);
|
||||
|
||||
Map map1 = new HashMap();
|
||||
map1.put("to_command", 1);
|
||||
pipeCoreRackStationDeviceDriver.writing(map1);
|
||||
}
|
||||
JSONObject resultJson = new JSONObject();
|
||||
resultJson.put("status", HttpStatus.OK.value());
|
||||
|
||||
@@ -555,12 +555,12 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
public void create(TaskDto dto) throws Exception {
|
||||
dto = foramte(dto);
|
||||
dto.setInteraction_json(ObjectUtil.isNotEmpty(dto.getInteractionJson()) ? dto.getInteractionJson().toJSONString() : "");
|
||||
if (!StrUtil.isEmpty(dto.getVehicle_code())) {
|
||||
TaskDto vehicle_dto = this.findByContainer(dto.getVehicle_code());
|
||||
if (vehicle_dto != null) {
|
||||
throw new BadRequestException(LangProcess.msg("task_checkExist", dto.getVehicle_code()));
|
||||
}
|
||||
}
|
||||
// if (!StrUtil.isEmpty(dto.getVehicle_code())) {
|
||||
// TaskDto vehicle_dto = this.findByContainer(dto.getVehicle_code());
|
||||
// if (vehicle_dto != null) {
|
||||
// throw new BadRequestException(LangProcess.msg("task_checkExist", dto.getVehicle_code()));
|
||||
// }
|
||||
// }
|
||||
String currentUsername = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
String task_uuid = dto.getTask_id();
|
||||
|
||||
@@ -9,9 +9,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.md.wastefoilrecord.service.dto.WastefoilrecordQuery;
|
||||
import org.nl.wms.pda.st.service.OtherPdaService;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.point.service.impl.SchBasePointServiceImpl;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task_manage.TaskStatus;
|
||||
@@ -53,6 +55,8 @@ public class OtherPdaServiceImpl implements OtherPdaService {
|
||||
private SendWasteFoilAGVTask sendWasteFoilAGVTask;
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private SchBasePointServiceImpl schBasePointServiceImpl;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -238,6 +242,12 @@ public class OtherPdaServiceImpl implements OtherPdaService {
|
||||
log.info("手持呼叫AGV送样品检测 - {}", param);
|
||||
// point_code1, point_code2
|
||||
String pointCode1 = param.getString("point_code1");
|
||||
SchBasePoint schBasePoint = schBasePointServiceImpl.getById(pointCode1);
|
||||
|
||||
List<SchBaseTask> schBaseTasks = taskService.cheackFqAndED(schBasePoint.getRegion_code());
|
||||
if (schBaseTasks.size() > 0) {
|
||||
throw new BadRequestException("已经存在其它区域的任务!");
|
||||
}
|
||||
//不判断是否有执行的任务
|
||||
// List<SchBaseTask> schBaseTasks = taskService.checkHaveTask(pointCode1);
|
||||
// if (schBaseTasks.size() > 0) {
|
||||
|
||||
@@ -168,4 +168,6 @@ public interface ISchBaseTaskService extends IService<SchBaseTask> {
|
||||
* @return /
|
||||
*/
|
||||
boolean checkAllWaiteByWasteFoil();
|
||||
|
||||
List<SchBaseTask> cheackFqAndED(String regionCode);
|
||||
}
|
||||
|
||||
@@ -21,4 +21,6 @@ public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
|
||||
List<SchBaseTask> checkHaveRelatedTaskInRequestParam(String param);
|
||||
|
||||
List<SchBaseTask> getWasteFoilTask(String code);
|
||||
|
||||
List<SchBaseTask> cheackFqAndED(String regionCode);
|
||||
}
|
||||
|
||||
@@ -69,4 +69,19 @@
|
||||
AND task_status <![CDATA[ <> ]]> '07'
|
||||
AND request_param LIKE '%${code}%'
|
||||
</select>
|
||||
|
||||
<select id="cheackFqAndED" resultType="org.nl.wms.sch.task.service.dao.SchBaseTask">
|
||||
SELECT *
|
||||
FROM sch_base_task
|
||||
WHERE task_status <![CDATA[ <= ]]> '071'
|
||||
AND task_status <![CDATA[ <> ]]> '07'
|
||||
|
||||
<if test="regionCode != null and regionCode == 'A1_QY_FQ' ">
|
||||
AND point_code1 LIKE '%${QY_ED}%'
|
||||
</if>
|
||||
|
||||
<if test="regionCode != null and regionCode == 'A1_QY_ED' ">
|
||||
AND point_code1 LIKE '%${QY_FQ}%'
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -304,4 +304,9 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
return list.size() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBaseTask> cheackFqAndED(String regionCode) {
|
||||
return schBaseTaskMapper.cheackFqAndED(regionCode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user