|
@@ -24,6 +24,7 @@ import com.ruoyi.common.core.redis.RedisCache;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
|
|
import com.ruoyi.hard.modbus.tcp.AutoDoorClient;
|
|
|
+import com.ruoyi.hard.modbus.tcp.WarningLightClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -62,8 +63,10 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
|
private IInvLotAttService iInvLotAttService;
|
|
|
@Autowired
|
|
|
private IAmsTaskService iAmsTaskService;
|
|
|
- @Autowired
|
|
|
+ @Autowired(required = false)
|
|
|
private AutoDoorClient autoDoorClient;
|
|
|
+ @Autowired(required = false)
|
|
|
+ private WarningLightClient warningLightClient;
|
|
|
|
|
|
//任务状态翻译
|
|
|
private String codeConvert(int code) {
|
|
@@ -354,6 +357,11 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
|
if (!StringUtils.isEmpty(wcsTask.getExt8())) {
|
|
|
redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
|
|
|
}
|
|
|
+ // 打开警报灯 10048是模具接驳位西边的点
|
|
|
+ if (wcsTask.getLocationTo().equals("10048")
|
|
|
+ && warningLightClient != null) {
|
|
|
+ warningLightClient.openWarningLight();
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
@@ -363,11 +371,6 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
|
log.info("不能重复取货," + taskNo);
|
|
|
return;
|
|
|
}
|
|
|
- // 如果是接驳位(模具-东)的点位取货完成 反馈关闭靠墙第二层自动门
|
|
|
- if (wcsTask.getLocationFrom().equals(Constant.LOC_MJ_EAST.toString())) {
|
|
|
- Thread.sleep(3000);
|
|
|
- autoDoorClient.sendClose(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
- }
|
|
|
// 解锁起始库位
|
|
|
baseLocationInfoService.unLockLocationStockStatus(Long.parseLong(wcsTask.getLocationFrom())
|
|
|
, Constant.WAREHOUSE_ID, updateBy);
|
|
@@ -378,6 +381,12 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
|
if (!StringUtils.isEmpty(wcsTask.getExt8())) {
|
|
|
redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()), wcsTask.getLocationFrom());
|
|
|
}
|
|
|
+ // 如果是接驳位(模具-东)的点位取货完成 反馈关闭靠墙第二层自动门
|
|
|
+ if (wcsTask.getLocationFrom().equals(Constant.LOC_MJ_EAST.toString())
|
|
|
+ && autoDoorClient != null) {
|
|
|
+ Thread.sleep(3000);
|
|
|
+ autoDoorClient.sendClose(AutoDoorClient.AUTO_DOOR_NO.C);
|
|
|
+ }
|
|
|
break;
|
|
|
case 5:
|
|
|
break;
|
|
@@ -399,6 +408,12 @@ public class WcsTaskServiceImpl implements IWcsTaskService {
|
|
|
if (!StringUtils.isEmpty(wcsTask.getExt8())) {
|
|
|
redisCache.unlockCacheObject(Long.parseLong(wcsTask.getExt8()));
|
|
|
}
|
|
|
+ // 打开警报灯 10048是模具接驳位西边的点
|
|
|
+ if (wcsTask.getLocationTo().equals("10048")
|
|
|
+ && warningLightClient != null) {
|
|
|
+ warningLightClient.openWarningLight();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
case 7://取消
|