fix: 呼叫气胀轴校验长度
This commit is contained in:
@@ -1928,6 +1928,10 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
// down_left_size_k,down_right_size_k, down_left_size_v,down_right_size_v
|
||||
log.info("创建虚拟分切计划呼叫气胀轴 - {}", param);
|
||||
String area = param.getString("area");
|
||||
int uLeftLen = 0;
|
||||
int uRightLen = 0;
|
||||
int dLeftLen = 0;
|
||||
int dRightLen = 0;
|
||||
if (!area.startsWith("B")) {
|
||||
throw new BadRequestException("该功能只对二期有用!");
|
||||
}
|
||||
@@ -2009,6 +2013,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
plan.setUp_or_down("1");
|
||||
plan.setLeft_or_right("1");
|
||||
uLeftLen = SlitterTaskUtil.getPaperLengthInt(plan);
|
||||
}
|
||||
if (i==1 && ObjectUtil.isNotEmpty(upRightSizeK)) {
|
||||
// 上右
|
||||
@@ -2031,6 +2036,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
} else {
|
||||
plan.setQzz_generation("5");
|
||||
}
|
||||
uRightLen = SlitterTaskUtil.getPaperLengthInt(plan);
|
||||
}
|
||||
if (i==2 && ObjectUtil.isNotEmpty(downLeftSizeK)) {
|
||||
// 下左
|
||||
@@ -2053,6 +2059,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
} else {
|
||||
plan.setQzz_generation("5");
|
||||
}
|
||||
dLeftLen = SlitterTaskUtil.getPaperLengthInt(plan);
|
||||
}
|
||||
if (i==4 && ObjectUtil.isNotEmpty(downRightSizeK)) {
|
||||
// 下右
|
||||
@@ -2075,6 +2082,7 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
} else {
|
||||
plan.setQzz_generation("5");
|
||||
}
|
||||
dRightLen = SlitterTaskUtil.getPaperLengthInt(plan);
|
||||
}
|
||||
if (i==0 && ObjectUtil.isEmpty(upLeftSizeK)) {
|
||||
plan.setIs_delete("1");
|
||||
@@ -2090,6 +2098,9 @@ public class SlitterServiceImpl implements SlitterService {
|
||||
}
|
||||
plans.add(plan);
|
||||
}
|
||||
if (uLeftLen + uRightLen > 1700 || dLeftLen + dRightLen > 1700) {
|
||||
throw new BadRequestException("同一根轴长度不能超过气胀轴长度,请确认是否选择正确!");
|
||||
}
|
||||
slittingproductionplanService.saveOrUpdateBatch(plans);
|
||||
// 机台打开
|
||||
LambdaUpdateWrapper<StIvtCutpointivt> lamu = new LambdaUpdateWrapper<>();
|
||||
|
||||
@@ -335,6 +335,10 @@ public class SlitterTaskUtil {
|
||||
return split[split.length - 1];
|
||||
}
|
||||
|
||||
public static Integer getPaperLengthInt(PdmBiSlittingproductionplan plan) {
|
||||
return Integer.valueOf(getPaperLength(plan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置重量
|
||||
* @param plans 分切计划
|
||||
|
||||
Reference in New Issue
Block a user