This commit is contained in:
2023-03-07 18:17:27 +08:00
parent cbe5964889
commit 10f723ac15
9 changed files with 126 additions and 53 deletions

View File

@@ -303,7 +303,13 @@ public class MesToLmsServiceImpl implements MesToLmsService {
} else { } else {
point_code = jsonCoolIvt.getString("full_point_code"); point_code = jsonCoolIvt.getString("full_point_code");
} }
if (ObjectUtil.isEmpty(point_code)) throw new BadRequestException("母卷不存在或已烘烤完成"); if (ObjectUtil.isEmpty(point_code)) throw new BadRequestException("母卷现在不存在暂存位或对接点位上,不能进行入烘箱操作!");
//更新生箔工单的是否下发烘烤为是
HashMap<String,String> map = new HashMap<>();
map.put("is_baking","1");
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+ContainerName+"'");
log.info("母卷:"+ContainerName+"被决策入烘箱请求烘烤标识改为1");
// 调用接口输入参数 // 调用接口输入参数
jsonParam.put("option", "1"); jsonParam.put("option", "1");
@@ -319,6 +325,12 @@ public class MesToLmsServiceImpl implements MesToLmsService {
/* /*
* 入冷却区 * 入冷却区
*/ */
//更新生箔工单的是否下发烘烤为是
HashMap<String,String> map = new HashMap<>();
map.put("is_instor","1");
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+ContainerName+"'");
log.info("母卷:"+ContainerName+"被决策入半成品库请求入半成品库标识改为1");
JSONObject jsonPoint = pointTab.query("material_code = '" + containerName + "' and is_delete = '0' and is_used = '1'").uniqueResult(0); JSONObject jsonPoint = pointTab.query("material_code = '" + containerName + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("母卷不存在"); if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("母卷不存在");
@@ -1257,7 +1269,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
throw new BadRequestException("子卷号不能为空!"); throw new BadRequestException("子卷号不能为空!");
} }
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + ContainerName + "'").uniqueResult(0); JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '" + ContainerName + "' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan_jo)) { if (ObjectUtil.isEmpty(plan_jo)) {
throw new BadRequestException("系统中不存在子卷号为:" + ContainerName + "的分切计划!"); throw new BadRequestException("系统中不存在子卷号为:" + ContainerName + "的分切计划!");
} }

View File

@@ -71,6 +71,24 @@ public class BakingServiceImpl implements BakingService {
String hours = whereJson.getString("hours"); // 时间 String hours = whereJson.getString("hours"); // 时间
String point_code1 = whereJson.getString("point_code"); // 点位 String point_code1 = whereJson.getString("point_code"); // 点位
//校验该设备是否启用且母卷MES是否请求烘烤
//查询该母卷号、设备号对应的生箔工单
JSONObject raw_jo = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").query("container_name ='" + container_name + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(raw_jo)) {
throw new BadRequestException("未查询到对应的生箔工单!");
}
String resource_name = raw_jo.getString("resource_name");
JSONObject sb_jo = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code ='" + resource_name + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(sb_jo)) {
throw new BadRequestException("未查询到母卷号:" + container_name + "对应的生箔机台编号!");
}
if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_baking").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入烘箱不允许进行入烘箱操作");
}
if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空"); if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空");
if (ObjectUtil.isEmpty(temperature)) throw new BadRequestException("温度不能为空"); if (ObjectUtil.isEmpty(temperature)) throw new BadRequestException("温度不能为空");
if (ObjectUtil.isEmpty(hours)) throw new BadRequestException("时间不能为空"); if (ObjectUtil.isEmpty(hours)) throw new BadRequestException("时间不能为空");
@@ -354,6 +372,23 @@ public class BakingServiceImpl implements BakingService {
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空"); if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空");
if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空"); if (ObjectUtil.isEmpty(container_name)) throw new BadRequestException("母卷号不能为空");
//校验该设备是否启用且母卷MES是否请求烘烤
//查询该母卷号、设备号对应的生箔工单
JSONObject raw_jo = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").query("container_name ='" + container_name + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(raw_jo)) {
throw new BadRequestException("未查询到对应的生箔工单!");
}
String resource_name = raw_jo.getString("resource_name");
JSONObject sb_jo = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code ='" + resource_name + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(sb_jo)) {
throw new BadRequestException("未查询到母卷号:" + container_name + "对应的生箔机台编号!");
}
if (StrUtil.equals("1", sb_jo.getString("is_used")) && !raw_jo.getString("is_instor").equals("1")) {
throw new BadRequestException("该母卷在MES上未进行决策入半成品库不允许进行入冷却操作");
}
// 1.获取此暂存位的生产区域和上下位置 // 1.获取此暂存位的生产区域和上下位置
JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0); JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("冷却区内此点位不存在!"); if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("冷却区内此点位不存在!");

View File

@@ -57,6 +57,10 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
point_jo.put("empty_point_status", "01"); point_jo.put("empty_point_status", "01");
} }
if (option.equals("1")) { if (option.equals("1")) {
//绑定的时候判断点位上是否存在母卷存在母卷不允许进行绑定
if (point_jo.getString("full_point_status").equals("02")) {
throw new BadRequestException("该点位上存在母卷,不能进行绑定空轴!");
}
point_jo.put("empty_vehicle_code", vehicle_code); point_jo.put("empty_vehicle_code", vehicle_code);
point_jo.put("empty_point_status", "02"); point_jo.put("empty_point_status", "02");
} }

View File

@@ -209,6 +209,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
jsonIvt2.put("container_name", jsonRaw.getString("container_name")); jsonIvt2.put("container_name", jsonRaw.getString("container_name"));
jsonIvt2.put("workorder_id", jsonRaw.getString("workorder_id")); jsonIvt2.put("workorder_id", jsonRaw.getString("workorder_id"));
jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty")); jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty"));
jsonIvt2.put("cool_ivt_status", "01");
ivtTab.update(jsonIvt2); ivtTab.update(jsonIvt2);
// 插入入库单 // 插入入库单

View File

@@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Service @Service
@@ -153,6 +154,13 @@ public class InCoolIvtTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) { if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
new LmsToMesServiceImpl().momRollSemiFGInboundComplete(param); new LmsToMesServiceImpl().momRollSemiFGInboundComplete(param);
} }
//将该母卷的入烘箱标识改为0
HashMap<String, String> map = new HashMap<>();
map.put("is_instor", "0");
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + jsonTask.getString("material_code") + "'");
log.info("母卷:" + jsonTask.getString("material_code") + "对应的入冷却任务完成请求入半成品库标识改为0");
} }
} }
@@ -221,7 +229,6 @@ public class InCoolIvtTask extends AbstractAcsTask {
} }
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0); JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);

View File

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
@Service @Service
@@ -205,6 +206,12 @@ public class InHotTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) { if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
new LmsToMesServiceImpl().momRollBakeInBound(param); new LmsToMesServiceImpl().momRollBakeInBound(param);
} }
//将该母卷的入烘箱标识改为0
HashMap<String,String> map = new HashMap<>();
map.put("is_baking","0");
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+jsonHotMst.getString("container_name")+"'");
log.info("母卷:"+jsonHotMst.getString("container_name")+"对应的入烘箱任务完成请求烘烤标识改为0");
} }
} }

View File

@@ -232,6 +232,8 @@
<el-table-column prop="productin_qty" label="重量" :min-width="flexWidth('productin_qty',crud.data,'重量')" :formatter="crud.formatNum3" /> <el-table-column prop="productin_qty" label="重量" :min-width="flexWidth('productin_qty',crud.data,'重量')" :formatter="crud.formatNum3" />
<el-table-column prop="agvno" label="车号" :min-width="flexWidth('agvno',crud.data,'车号')" /> <el-table-column prop="agvno" label="车号" :min-width="flexWidth('agvno',crud.data,'车号')" />
<el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')" /> <el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')" />
<el-table-column prop="is_baking" label="请求烘烤" :min-width="flexWidth('is_baking',crud.data,'请求烘烤')" :formatter="formatBakeIsOrNot"/>
<el-table-column prop="is_instor" label="请求入半成品库" :min-width="flexWidth('is_instor',crud.data,'请求入半成品库')" :formatter="formatStorIsOrNot"/>
<el-table-column prop="update_time" label="更新时间" :min-width="flexWidth('update_time',crud.data,'更新时间')" /> <el-table-column prop="update_time" label="更新时间" :min-width="flexWidth('update_time',crud.data,'更新时间')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -288,7 +290,7 @@ const defaultForm = {
} }
export default { export default {
name: 'Rawfoilworkorder', name: 'Rawfoilworkorder',
dicts: ['product_area', 'product_status'], dicts: ['product_area', 'product_status', 'IS_OR_NOT'],
components: { pagination, crudOperation, rrOperation, udOperation, Dialog }, components: { pagination, crudOperation, rrOperation, udOperation, Dialog },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
@@ -351,6 +353,12 @@ export default {
formatStatusName(row) { formatStatusName(row) {
return this.dict.label.product_status[row.status] return this.dict.label.product_status[row.status]
}, },
formatBakeIsOrNot(row) {
return this.dict.label.IS_OR_NOT[row.is_baking]
},
formatStorIsOrNot(row) {
return this.dict.label.IS_OR_NOT[row.is_instor]
},
compelEnd() { compelEnd() {
const _selectData = this.$refs.table.selection const _selectData = this.$refs.table.selection
const data = _selectData[0] const data = _selectData[0]

View File

@@ -457,7 +457,6 @@
<el-table-column prop="is_parent_ok" label="母卷上料完成" width="100px" :formatter="formatParentName"/> <el-table-column prop="is_parent_ok" label="母卷上料完成" width="100px" :formatter="formatParentName"/>
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/> <el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/>
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/> <el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
<el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/> <el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/>
<el-table-column prop="qzzno" label="气涨轴编码" width="100px"/> <el-table-column prop="qzzno" label="气涨轴编码" width="100px"/>
<el-table-column prop="start_time" label="开始时间" width="150px"/> <el-table-column prop="start_time" label="开始时间" width="150px"/>