fix:试运行修改
This commit is contained in:
@@ -1094,7 +1094,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//烘箱行架
|
//烘箱行架
|
||||||
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
if (linkDevice.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||||
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) linkDevice.getDeviceDriver();
|
||||||
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 && ovenGantryManipulatorDeviceDriver.getMode() != 3)) {
|
if ((manipulatorAgvStationDeviceDriver.getAction() == 6 )) {
|
||||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code(this.getDeviceCode())
|
.device_code(this.getDeviceCode())
|
||||||
|
|||||||
@@ -256,7 +256,12 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
|
|||||||
|
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (jo.getInteger("status") == 200) {
|
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;
|
requireSucess = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ public class ItemProtocol {
|
|||||||
return this.getOpcFloatValue(item_to_temperature);
|
return this.getOpcFloatValue(item_to_temperature);
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
Boolean isonline;
|
Boolean isonline;
|
||||||
Boolean isError = false;
|
Boolean isError = false;
|
||||||
|
|
||||||
|
|||||||
@@ -953,10 +953,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
|
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
|
||||||
//下发烘箱时间
|
//下发烘箱时间
|
||||||
int time = Integer.parseInt(taskDto.getOven_time());
|
int time = Integer.parseInt(taskDto.getOven_time());
|
||||||
int hours = time / 60; // 整数小时
|
map.put("to_time_house", time);
|
||||||
int minutes = time % 60 ; // 剩余分钟
|
|
||||||
map.put("to_time_house", String.valueOf(hours));
|
|
||||||
map.put("to_time_min", String.valueOf(minutes));
|
|
||||||
hongXiangConveyorDeviceDriver.writing(map);
|
hongXiangConveyorDeviceDriver.writing(map);
|
||||||
}
|
}
|
||||||
int mode = hongXiangConveyorDeviceDriver.getMode();
|
int mode = hongXiangConveyorDeviceDriver.getMode();
|
||||||
@@ -1109,7 +1106,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
map.put("walk_y", this.walk_y);
|
map.put("walk_y", this.walk_y);
|
||||||
map.put("isOnline", this.getIsonline());
|
map.put("isOnline", this.getIsonline());
|
||||||
map.put("requireActionSucess", requireActionSucess);
|
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("isError", this.getIserror());
|
||||||
map.put("message", message);
|
map.put("message", message);
|
||||||
map.put("feedMessage", feedMessage);
|
map.put("feedMessage", feedMessage);
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public class RollUpRollerManipulatorDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
if (error2 == 2) {
|
if (error2 == 2) {
|
||||||
errorDispose(PointErrorTypeEnum.IN.getCode());
|
errorDispose(PointErrorTypeEnum.IN.getCode());
|
||||||
} else {
|
} else {
|
||||||
// errorDispose(PointErrorTypeEnum.OUT.getCode());
|
errorDispose(PointErrorTypeEnum.OUT.getCode());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -830,8 +830,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
jo.put("countdown_min", hongXiangConveyorDeviceDriver.getCountdown_min());
|
jo.put("countdown_min", hongXiangConveyorDeviceDriver.getCountdown_min());
|
||||||
jo.put("countdown_sec", hongXiangConveyorDeviceDriver.getCountdown_sec());
|
jo.put("countdown_sec", hongXiangConveyorDeviceDriver.getCountdown_sec());
|
||||||
//温度需要除以10
|
//温度需要除以10
|
||||||
jo.put("temperature", hongXiangConveyorDeviceDriver.getTo_temperature() / 10);
|
jo.put("temperature", Math.round(hongXiangConveyorDeviceDriver.getTo_temperature() / 10));
|
||||||
jo.put("now_temperature", hongXiangConveyorDeviceDriver.getTemperature() / 10);
|
jo.put("now_temperature", Math.round(hongXiangConveyorDeviceDriver.getTemperature() / 10));
|
||||||
jo.put("door", hongXiangConveyorDeviceDriver.getDoor());
|
jo.put("door", hongXiangConveyorDeviceDriver.getDoor());
|
||||||
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
|
jo.put("finish", hongXiangConveyorDeviceDriver.getFinish());
|
||||||
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
|
jo.put("task", hongXiangConveyorDeviceDriver.getTask());
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.config.lucene.TagNameEnum;
|
import org.nl.config.lucene.TagNameEnum;
|
||||||
import org.nl.wms.pda.mps.service.BakingPdaService;
|
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.dao.PdmBiRawfoilworkorder;
|
||||||
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
|
import org.nl.wms.pdm.bi.service.IpdmBiRawfoilworkorderService;
|
||||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||||
@@ -112,18 +113,30 @@ public class BakingPdaServiceImpl implements BakingPdaService {
|
|||||||
} else {
|
} else {
|
||||||
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getById(hotPoint.getSource_id());
|
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getById(hotPoint.getSource_id());
|
||||||
result.put("container_name", rawOrder.getContainer_name());
|
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);
|
doCheckEmptyOrderInfo(tip, rawOrder);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getByContainerName(orderCode);
|
PdmBiRawfoilworkorder rawOrder = rawfoilworkorderService.getByContainerName(orderCode);
|
||||||
if (rawOrder.getWorkorder_id().equals(hotPoint.getSource_id())) {
|
if (rawOrder.getWorkorder_id().equals(hotPoint.getSource_id())) {
|
||||||
result.put("container_name", rawOrder.getContainer_name());
|
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);
|
doCheckEmptyOrderInfo(tip, rawOrder);
|
||||||
} else {
|
} else {
|
||||||
result.put("container_name", "-");
|
result.put("container_name", "-");
|
||||||
result.put("status", hotPoint.getPoint_status());
|
result.put("status", PointStatusEnum.getStatus(hotPoint.getPoint_status()));
|
||||||
tip.add("系统信息与扫描的转运卡号信息不一致");
|
tip.add("系统信息与扫描的转运卡号信息不一致");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,6 +160,9 @@ public class BakingPdaServiceImpl implements BakingPdaService {
|
|||||||
// 收卷辊编码
|
// 收卷辊编码
|
||||||
String rollCode = param.getString("roll_code");
|
String rollCode = param.getString("roll_code");
|
||||||
String temperature = param.getString("temperature");
|
String temperature = param.getString("temperature");
|
||||||
|
if (!isValidInteger(temperature)) {
|
||||||
|
throw new BadRequestException("温度请输入整数!");
|
||||||
|
}
|
||||||
String rollType = param.getString("roll_type");
|
String rollType = param.getString("roll_type");
|
||||||
String isBaking = param.getString("is_baking");
|
String isBaking = param.getString("is_baking");
|
||||||
String time = param.getString("time");
|
String time = param.getString("time");
|
||||||
@@ -232,6 +248,10 @@ public class BakingPdaServiceImpl implements BakingPdaService {
|
|||||||
result.put("message", "操作成功!");
|
result.put("message", "操作成功!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
public boolean isValidInteger(String input) {
|
||||||
|
String regex = "^[+-]?\\d+$";
|
||||||
|
return input.matches(regex);
|
||||||
|
}
|
||||||
|
|
||||||
public static void doCheckEmptyOrderInfo(List<String> tip, PdmBiRawfoilworkorder rawOrder) {
|
public static void doCheckEmptyOrderInfo(List<String> tip, PdmBiRawfoilworkorder rawOrder) {
|
||||||
if ("1".equals(rawOrder.getIs_baking())) {
|
if ("1".equals(rawOrder.getIs_baking())) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class StIvtHotpointivtServiceImpl extends ServiceImpl<StIvtHotpointivtMap
|
|||||||
.eq(ObjectUtil.isNotEmpty(pointStatus), StIvtHotpointivt::getPoint_status, pointStatus)
|
.eq(ObjectUtil.isNotEmpty(pointStatus), StIvtHotpointivt::getPoint_status, pointStatus)
|
||||||
.eq(ObjectUtil.isNotEmpty(productArea), StIvtHotpointivt::getProduct_area, productArea)
|
.eq(ObjectUtil.isNotEmpty(productArea), StIvtHotpointivt::getProduct_area, productArea)
|
||||||
.eq(ObjectUtil.isNotEmpty(isUsed), StIvtHotpointivt::getIs_used, isUsed)
|
.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);
|
return stIvtHotpointivtMapper.selectPage(resultPage, queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</if>
|
</if>
|
||||||
AND p.is_used = TRUE
|
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')
|
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>
|
||||||
<select id="getHotNotTaskPoint" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
<select id="getHotNotTaskPoint" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
||||||
SELECT p.*
|
SELECT p.*
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
AND 0 = (SELECT COUNT(*) FROM sch_base_task t WHERE t.task_status <![CDATA[<]]> '07'
|
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
|
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))
|
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>
|
||||||
<select id="getWindRollConformRawNotTaskPoints" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
<select id="getWindRollConformRawNotTaskPoints" resultType="org.nl.wms.sch.point.service.dao.SchBasePoint">
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user