|
|
@@ -1572,7 +1572,7 @@ public class MesProductRecordController extends BaseController {
|
|
|
|
|
|
}
|
|
|
|
|
|
- // OP350:OP320生产完成满1小时才允许加工
|
|
|
+ // OP350:OP320生产完成后满 OP320.guHuaTime(分钟)才允许加工
|
|
|
if (oprno.equals("OP350")) {
|
|
|
String isOpen350 = Global.getConfig("mes.OP350OneTime.isOpen");
|
|
|
if ("1".equalsIgnoreCase(isOpen350)) {
|
|
|
@@ -1585,9 +1585,13 @@ public class MesProductRecordController extends BaseController {
|
|
|
op320DeviceTimeQuery.getSqlMap().getOrder().setOrderBy("a.end_date desc");
|
|
|
MesDeviceTime op320DeviceTime = mesDeviceTimeService.findInfo(op320DeviceTimeQuery);
|
|
|
if (!ObjectUtils.isEmpty(op320DeviceTime) && op320DeviceTime.getEndDate() != null) {
|
|
|
- long oneHourInMillis = 1L * 60 * 60 * 1000;
|
|
|
+ String guHuaTime = Global.getConfig("OP320.guHuaTime");
|
|
|
+ if (StringUtils.isEmpty(guHuaTime)) {
|
|
|
+ guHuaTime = "150"; // 与 ProductGh 默认一致,单位:分钟
|
|
|
+ }
|
|
|
+ long waitInMillis = Integer.parseInt(guHuaTime.trim()) * 60L * 1000L;
|
|
|
long timeDifference = System.currentTimeMillis() - op320DeviceTime.getEndDate().getTime();
|
|
|
- op320TimeOk = timeDifference >= oneHourInMillis;
|
|
|
+ op320TimeOk = timeDifference >= waitInMillis;
|
|
|
}
|
|
|
if (!op320TimeOk) {
|
|
|
return "RSG1";
|