fix: 管芯扣除
This commit is contained in:
@@ -136,6 +136,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
if (ObjectUtil.isEmpty(autoSendEmpty)) {
|
if (ObjectUtil.isEmpty(autoSendEmpty)) {
|
||||||
throw new BadRequestException("未配置是否直接送气胀轴");
|
throw new BadRequestException("未配置是否直接送气胀轴");
|
||||||
}
|
}
|
||||||
|
log.info("获取的穿拔轴点位数据:{}", point);
|
||||||
// 判断尺寸是否相同
|
// 判断尺寸是否相同
|
||||||
if (!size.equals(point.getQzz_size())) {
|
if (!size.equals(point.getQzz_size())) {
|
||||||
log.error("设备:{}对应的气胀轴尺寸不批对,需要气胀轴尺寸:{},实际尺寸:{}", deviceCode, point.getQzz_size(), size);
|
log.error("设备:{}对应的气胀轴尺寸不批对,需要气胀轴尺寸:{},实际尺寸:{}", deviceCode, point.getQzz_size(), size);
|
||||||
@@ -860,6 +861,9 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
public JSONObject acsToReduceTube(JSONObject param) {
|
public JSONObject acsToReduceTube(JSONObject param) {
|
||||||
log.info("扣除纸管数据的输入参数为:{}", param);
|
log.info("扣除纸管数据的输入参数为:{}", param);
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("status", HttpStatus.HTTP_OK);
|
||||||
|
res.put("message", "请求成功!");
|
||||||
// param: device_code row_num
|
// param: device_code row_num
|
||||||
if (ObjectUtil.isEmpty(param.getString("row_num"))) {
|
if (ObjectUtil.isEmpty(param.getString("row_num"))) {
|
||||||
log.error("设备:{},排数不能为空", param.getString("device_code"));
|
log.error("设备:{},排数不能为空", param.getString("device_code"));
|
||||||
@@ -881,6 +885,10 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
MdPbPapervehicle mdPbPapervehicle = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>()
|
MdPbPapervehicle mdPbPapervehicle = papervehicleService.getOne(new LambdaQueryWrapper<MdPbPapervehicle>()
|
||||||
.eq(MdPbPapervehicle::getVehicle_code, vehicleCode)
|
.eq(MdPbPapervehicle::getVehicle_code, vehicleCode)
|
||||||
.eq(MdPbPapervehicle::getRow_num, param.getString("row_num")));
|
.eq(MdPbPapervehicle::getRow_num, param.getString("row_num")));
|
||||||
|
if (ObjectUtil.isEmpty(mdPbPapervehicle)) {
|
||||||
|
log.warn("托盘:" + vehicleCode + "第" + param.getString("row_num") + "行没数据!");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
int qty = mdPbPapervehicle.getQty().intValue();
|
int qty = mdPbPapervehicle.getQty().intValue();
|
||||||
if (qty <= 0) {
|
if (qty <= 0) {
|
||||||
throw new BadRequestException("当前物料数量为0!");
|
throw new BadRequestException("当前物料数量为0!");
|
||||||
@@ -897,9 +905,6 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
.eq("qty", "0");
|
.eq("qty", "0");
|
||||||
boolean remove = papervehicleService.remove(deleteWrapper);
|
boolean remove = papervehicleService.remove(deleteWrapper);
|
||||||
// todo: 如果等于0,则创建AGV任务,将托盘拉回去
|
// todo: 如果等于0,则创建AGV任务,将托盘拉回去
|
||||||
JSONObject res = new JSONObject();
|
|
||||||
res.put("status", HttpStatus.HTTP_OK);
|
|
||||||
res.put("message", "请求成功!");
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user