修改
This commit is contained in:
@@ -126,8 +126,8 @@ public class BakingServiceImpl implements BakingService {
|
||||
|
||||
// 1.根据冷却区此母卷的点位找到对应的暂存区、找到空位
|
||||
// JSONObject jsonCoolIvt = coolIvtTab.query("container_name ='" + container_name + "' and is_used = '1' and full_point_status = '02' and cool_ivt_status = '01'").uniqueResult(0);
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code1 + "'and container_name = '" + container_name + "' and is_used = '1' and full_point_status = '02' and cool_ivt_status = '01'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("点位不存在或母卷不存在");
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code1 + "' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("请扫描正确的冷却区或对接点位!");
|
||||
|
||||
String product_area = jsonCoolIvt.getString("product_area"); // 生产区域
|
||||
String point_location = jsonCoolIvt.getString("point_location"); // 位置
|
||||
@@ -155,13 +155,13 @@ public class BakingServiceImpl implements BakingService {
|
||||
map.put("point_type", "4");
|
||||
|
||||
JSONArray pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(pointArr)) {
|
||||
/*if (ObjectUtil.isEmpty(pointArr)) {
|
||||
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||
pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
|
||||
}
|
||||
}*/
|
||||
|
||||
// 2.判断暂存位是否有任务:找到无任务的暂存位 、查询烘箱对应的空位
|
||||
String point_code2 = "";
|
||||
@@ -483,18 +483,22 @@ public class BakingServiceImpl implements BakingService {
|
||||
JSONObject json = new JSONObject();
|
||||
|
||||
JSONObject jsonCool = coolIvtTab.query("full_point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonCool.getString("container_name"))) {
|
||||
if (ObjectUtil.isNotEmpty(jsonCool) && ObjectUtil.isNotEmpty(jsonCool.getString("container_name"))) {
|
||||
json.put("container_name", jsonCool.getString("container_name"));
|
||||
} else {
|
||||
JSONObject jsonHot = hotIvtTab.query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonHot.getString("container_name"))) {
|
||||
if (ObjectUtil.isNotEmpty(jsonHot) && ObjectUtil.isNotEmpty(jsonHot.getString("container_name"))) {
|
||||
json.put("container_name", jsonHot.getString("container_name"));
|
||||
} else {
|
||||
JSONObject jsonPoint = pointIvtTab.query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonPoint.getString("material_code"))) {
|
||||
if (ObjectUtil.isNotEmpty(jsonPoint) && ObjectUtil.isNotEmpty(jsonPoint.getString("material_code"))) {
|
||||
json.put("container_name", jsonPoint.getString("material_code"));
|
||||
} else {
|
||||
json.put("container_name", "");
|
||||
if (ObjectUtil.isEmpty(jsonCool) && ObjectUtil.isEmpty(jsonHot) && ObjectUtil.isEmpty(jsonPoint)){
|
||||
throw new BadRequestException("请扫描冷却区、对接位或者烘箱的点位进行操作!");
|
||||
}else {
|
||||
throw new BadRequestException("该点位上不存在母卷!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +64,6 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
String point_code1 = whereJson.getString("point_code"); // 起点
|
||||
String next_point_code = whereJson.getString("next_point_code"); // 终点
|
||||
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
if(ObjectUtil.isEmpty(cool_ivt)){
|
||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
||||
}
|
||||
String on_container_name = cool_ivt.getString("container_name");
|
||||
if (!on_container_name.equals(container_name)) {
|
||||
throw new BadRequestException("点位上母卷不符!");
|
||||
}
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
@@ -81,10 +72,21 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料不存在");
|
||||
|
||||
if (StrUtil.equals(option, "1")) {
|
||||
|
||||
if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空");
|
||||
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("起点不能为空!");
|
||||
if (ObjectUtil.isEmpty(next_point_code)) throw new BadRequestException("终点不能为空");
|
||||
|
||||
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
if(ObjectUtil.isEmpty(cool_ivt)){
|
||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
||||
}
|
||||
String on_container_name = cool_ivt.getString("container_name");
|
||||
if (!on_container_name.equals(container_name)) {
|
||||
throw new BadRequestException("点位上母卷不符!");
|
||||
}
|
||||
|
||||
//插入冷却区出入库单表
|
||||
// 生成冷却区出入表
|
||||
JSONObject jsonCool = new JSONObject();
|
||||
@@ -114,6 +116,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
|
||||
jsonCoolIvt.put("full_point_status", "01");
|
||||
jsonCoolIvt.put("cool_ivt_status", "01");
|
||||
jsonCoolIvt.put("container_name", "");
|
||||
jsonCoolIvt.put("workorder_id", "");
|
||||
jsonCoolIvt.put("ivt_qty", "0");
|
||||
@@ -141,7 +144,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
// 更新烘箱区库存状态
|
||||
JSONObject jsonHotIvt = hosIvtTab.query("point_code = '" + next_point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)){
|
||||
throw new BadRequestException("请扫描正确的烘箱点位!");
|
||||
throw new BadRequestException("终点请扫描正确的烘箱点位!");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(jsonHotIvt.getString("container_name"))) {
|
||||
throw new BadRequestException("目的点上存在母卷!");
|
||||
@@ -175,6 +178,14 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
}
|
||||
|
||||
} else if (StrUtil.equals(option, "2")) {
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||
if(ObjectUtil.isEmpty(cool_ivt)){
|
||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
||||
}
|
||||
String on_container_name = cool_ivt.getString("container_name");
|
||||
if (!on_container_name.equals(container_name)) {
|
||||
throw new BadRequestException("点位上母卷不符!");
|
||||
}
|
||||
|
||||
//插入烘箱出入库记录表
|
||||
JSONObject hotParam = new JSONObject();
|
||||
@@ -229,9 +240,15 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
|
||||
//更新冷却区库存
|
||||
JSONObject jsonIvt = coolIvtTab.query("full_point_code ='" + next_point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)){
|
||||
throw new BadRequestException("终点请扫描正确的冷却区点位!");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(jsonIvt.getString("container_name"))) {
|
||||
throw new BadRequestException("目的点上存在母卷!");
|
||||
}
|
||||
if (StrUtil.equals(jsonIvt.getString("empty_point_status"),"02")) {
|
||||
throw new BadRequestException("目的点上存在空轴!");
|
||||
}
|
||||
jsonIvt.put("full_point_status", "02");
|
||||
jsonIvt.put("cool_ivt_status", "03");
|
||||
jsonIvt.put("instorage_time", DateUtil.now());
|
||||
@@ -276,12 +293,16 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
||||
}
|
||||
|
||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(cool_ivt)){
|
||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
||||
}
|
||||
String on_container_name = cool_ivt.getString("container_name");
|
||||
if (!on_container_name.equals(container_name)) {
|
||||
throw new BadRequestException("点位上子卷不符!");
|
||||
}
|
||||
|
||||
cool_ivt.put("cool_ivt_status", "04");
|
||||
WQLObject.getWQLObject("st_ivt_coolpointivt").update(cool_ivt);
|
||||
|
||||
//调用回传MES的半成品入库接口
|
||||
// 将入冷却信息发送给mes
|
||||
|
||||
@@ -143,6 +143,7 @@ public class InHotTask extends AbstractAcsTask {
|
||||
String ivt_qty = jsonCoolIvt.getString("ivt_qty"); // 库存
|
||||
|
||||
jsonCoolIvt.put("full_point_status", "01");
|
||||
jsonCoolIvt.put("cool_ivt_status", "01");
|
||||
jsonCoolIvt.put("container_name", "");
|
||||
jsonCoolIvt.put("workorder_id", "");
|
||||
jsonCoolIvt.put("ivt_qty", "0");
|
||||
|
||||
@@ -140,7 +140,6 @@
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" label="单据编号" width="120px" />
|
||||
<el-table-column prop="io_type" label="出入类型" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user