fix:试运行修改

This commit is contained in:
ls
2024-12-18 16:56:22 +08:00
parent 4388fb151e
commit 7fc7d273fd
10 changed files with 75 additions and 16 deletions

View File

@@ -1094,7 +1094,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
//烘箱行架
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && ovenGantryManipulatorDeviceDriver.getMode() != 3)) {
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 )) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(this.getDeviceCode())

View File

@@ -256,7 +256,12 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
JSONObject jo = JSON.parseObject(str);
if (jo.getInteger("status") == 200) {
List list = new ArrayList();
Map<String, Object> map1 = new HashMap<>();
map1.put("code", "to_command");
map1.put("value", 7);
list.add(map1);
this.writing(list);
requireSucess = true;
return;
}

View File

@@ -111,6 +111,7 @@ public class ItemProtocol {
return this.getOpcFloatValue(item_to_temperature);
} ;
Boolean isonline;
Boolean isError = false;

View File

@@ -953,10 +953,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
//下发烘箱时间
int time = Integer.parseInt(taskDto.getOven_time());
int hours = time / 60; // 整数小时
int minutes = time % 60 ; // 剩余分钟
map.put("to_time_house", String.valueOf(hours));
map.put("to_time_min", String.valueOf(minutes));
map.put("to_time_house", time);
hongXiangConveyorDeviceDriver.writing(map);
}
int mode = hongXiangConveyorDeviceDriver.getMode();
@@ -1109,7 +1106,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
map.put("walk_y", this.walk_y);
map.put("isOnline", this.getIsonline());
map.put("requireActionSucess", requireActionSucess);
map.put("error", ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(this.getError())));
// map.put("error", ErrorUtil.getDictDetail("hxhj_error_type", String.valueOf(this.getError())));
map.put("isError", this.getIserror());
map.put("message", message);
map.put("feedMessage", feedMessage);

View File

@@ -224,7 +224,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
if (error2 == 2) {
errorDispose(PointErrorTypeEnum.IN.getCode());
} else {
// errorDispose(PointErrorTypeEnum.OUT.getCode());
errorDispose(PointErrorTypeEnum.OUT.getCode());
}
}

View File

@@ -830,8 +830,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("countdown_min", hongXiangConveyorDeviceDriver.getCountdown_min());
jo.put("countdown_sec", hongXiangConveyorDeviceDriver.getCountdown_sec());
//温度需要除以10
jo.put("temperature", hongXiangConveyorDeviceDriver.getTo_temperature() / 10);
jo.put("now_temperature", hongXiangConveyorDeviceDriver.getTemperature() / 10);
jo.put("temperature", Math.round(hongXiangConveyorDeviceDriver.getTo_temperature() / 10));
jo.put("now_temperature", Math.round(hongXiangConveyorDeviceDriver.getTemperature() / 10));
jo.put("door", hongXiangConveyorDeviceDriver.getDoor());
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
jo.put("task", hongXiangConveyorDeviceDriver.getTask());

View File

@@ -0,0 +1,36 @@
package org.nl.wms.pda.mps.service.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum PointStatusEnum {
/**
* 空位
*/
EMPTY_POINT("1", "空位"),
/**
* 待烘烤
*/
HOT_POINT("5", "待烘烤"),
/**
* 待质检
*/
CHECK_POINT("3", "待质检");
String code;
String status;
public static String getStatus(String code) {
for (PointStatusEnum value : values()) {
if (value.code.equals(code)) {
return value.status;
}
}
return null;
}
}

View File

@@ -11,6 +11,7 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.lucene.TagNameEnum;
import org.nl.wms.pda.mps.service.BakingPdaService;
import org.nl.wms.pda.mps.service.enums.PointStatusEnum;
import org.nl.wms.pdm.bi.dao.PdmBiRawfoilworkorder;
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
import org.nl.wms.sch.point.service.ISchBasePointService;
@@ -112,18 +113,30 @@ public class BakingPdaServiceImpl implements BakingPdaService {
} else {
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getById(hotPoint.getSource_id());
result.put("container_name", rawOrder.getContainer_name());
result.put("status", hotPoint.getPoint_status());
result.put("status", PointStatusEnum.getStatus(hotPoint.getPoint_status()));
if (PointStatusEnum.CHECK_POINT.getCode().equals(hotPoint.getPoint_status())){
tip.add("该点位待质检,请下质检任务");
}
if (PointStatusEnum.HOT_POINT.getCode().equals(hotPoint.getPoint_status())){
tip.add("该点位待烘烤,请下入烘箱任务");
}
doCheckEmptyOrderInfo(tip, rawOrder);
}
} else {
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getByContainerName(orderCode);
if (rawOrder.getWorkorder_id().equals(hotPoint.getSource_id())) {
result.put("container_name", rawOrder.getContainer_name());
result.put("status", hotPoint.getPoint_status());
result.put("status", PointStatusEnum.getStatus(hotPoint.getPoint_status()));
if (PointStatusEnum.CHECK_POINT.getCode().equals(hotPoint.getPoint_status())){
tip.add("该点位待质检,请下质检任务");
}
if (PointStatusEnum.HOT_POINT.getCode().equals(hotPoint.getPoint_status())){
tip.add("该点位待烘烤,请下入烘箱任务");
}
doCheckEmptyOrderInfo(tip, rawOrder);
} else {
result.put("container_name", "-");
result.put("status", hotPoint.getPoint_status());
result.put("status", PointStatusEnum.getStatus(hotPoint.getPoint_status()));
tip.add("系统信息与扫描的转运卡号信息不一致");
}
}
@@ -147,6 +160,9 @@ public class BakingPdaServiceImpl implements BakingPdaService {
// 收卷辊编码
String rollCode = param.getString("roll_code");
String temperature = param.getString("temperature");
if (!isValidInteger(temperature)) {
throw new BadRequestException("温度请输入整数!");
}
String rollType = param.getString("roll_type");
String isBaking = param.getString("is_baking");
String time = param.getString("time");
@@ -232,6 +248,10 @@ public class BakingPdaServiceImpl implements BakingPdaService {
result.put("message", "操作成功!");
return result;
}
public boolean isValidInteger(String input) {
String regex = "^[+-]?\\d+$";
return input.matches(regex);
}
public static void doCheckEmptyOrderInfo(List<String> tip, PdmBiRawfoilworkorder rawOrder) {
if ("1".equals(rawOrder.getIs_baking())) {

View File

@@ -63,7 +63,7 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
.eq(ObjectUtil.isNotEmpty(pointStatus), StIvtHotpointivt::getPoint_status, pointStatus)
.eq(ObjectUtil.isNotEmpty(productArea), StIvtHotpointivt::getProduct_area, productArea)
.eq(ObjectUtil.isNotEmpty(isUsed), StIvtHotpointivt::getIs_used, isUsed)
.eq(ObjectUtil.isNotEmpty(pointLocation), StIvtHotpointivt::getPoint_location, pointLocation);
.eq(ObjectUtil.isNotEmpty(pointLocation), StIvtHotpointivt::getPoint_location, pointLocation).orderByDesc(StIvtHotpointivt::getInstorage_time);
return stIvtHotpointivtMapper.selectPage(resultPage, queryWrapper);
}

View File

@@ -24,7 +24,7 @@
</if>
AND p.is_used = TRUE
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.point_code1 = p.point_code AND t.task_status <![CDATA[<]]> '07')
ORDER BY p.sort desc , p.update_time asc
ORDER BY p.update_time asc
</select>
<select id="getHotNotTaskPoint" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
SELECT p.*
@@ -64,7 +64,7 @@
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[<]]> '07'
AND (t.point_code1 = p.point_code OR t.point_code2 = p.point_code OR t.point_code3 = p.point_code
OR t.point_code4 = p.point_code))
ORDER BY p.sort , p.in_order_seq, p.update_time
ORDER BY p.update_time
</select>
<select id="getWindRollConformRawNotTaskPoints" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
SELECT