fix:试运行修改
This commit is contained in:
@@ -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.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())) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user