This commit is contained in:
2022-12-17 11:54:47 +08:00
parent 01419ecf8d
commit 59dc7f04f2
14 changed files with 133 additions and 23 deletions

View File

@@ -492,6 +492,10 @@ public class MesToLmsServiceImpl implements MesToLmsService {
//查询该分切机对应的点位
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + plan_jo.getString("resource_name") + "'").uniqueResult(0);
if (StrUtil.isNotEmpty(cut_jo.getString("container_name")) || cut_jo.getString("full_point_status").equals("02")) {
throw new BadRequestException("该分切机对应的上料位存在母卷,不能下发搬运任务!");
}
//创建搬运任务
if (plan_jo.getString("order_type").equals("1")) {
//生成一个半成品出库任务

View File

@@ -45,4 +45,18 @@ public class InController {
return new ResponseEntity<>(inService.devicePointQuery(whereJson), HttpStatus.OK);
}
@PostMapping("/conveyPointQuery")
@Log("缓存点位查询")
@ApiOperation("缓存点位查询")
public ResponseEntity<Object> conveyPointQuery(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(inService.conveyPointQuery(whereJson), HttpStatus.OK);
}
@PostMapping("/conveyConfirm")
@Log("出站配送")
@ApiOperation("出站配送")
public ResponseEntity<Object> conveyConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(inService.conveyConfirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -25,4 +25,18 @@ public interface InService {
*/
JSONObject devicePointQuery(JSONObject whereJson);
/**
* 缓存点位查询
* @param whereJson /
* @return JSONObject
*/
JSONObject conveyPointQuery(JSONObject whereJson);
/**
* 确认
* @param whereJson /
* @return JSONObject
*/
JSONObject conveyConfirm(JSONObject whereJson);
}

View File

@@ -50,7 +50,7 @@ public class FeedingServiceImpl implements FeedingService {
if (StrUtil.isNotEmpty(source_container_name)) {
map.put("source_container_name", source_container_name);
}
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx, "container_name");
JSONObject jo = new JSONObject();
jo.put("data", rows.getJSONArray("content"));
jo.put("size", rows.getString("totalElements"));
@@ -76,6 +76,10 @@ public class FeedingServiceImpl implements FeedingService {
//查询该分切机对应的点位
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '" + plan_jo.getString("resource_name") + "'").uniqueResult(0);
if (StrUtil.isNotEmpty(cut_jo.getString("container_name")) || cut_jo.getString("full_point_status").equals("02")) {
throw new BadRequestException("该分切机对应的上料位存在母卷,不能下发搬运任务!");
}
//创建搬运任务
if (plan_jo.getString("order_type").equals("1")) {
//生成一个半成品出库任务

View File

@@ -11,6 +11,7 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.pda.mps.service.InService;
import org.nl.wms.pda.mps.service.OutService;
import org.nl.wms.sch.tasks.CutConveyorTask;
import org.nl.wms.sch.tasks.CutTrussTask;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -87,4 +88,41 @@ public class InServiceImpl implements InService {
result.put("message", "操作成功!");
return result;
}
@Override
public JSONObject conveyPointQuery(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");
HashMap<String, String> map = new HashMap<>();
map.put("flag", "10");
if (StrUtil.isNotEmpty(product_area)) {
map.put("product_area", product_area);
}
JSONArray deliver_rows = WQL.getWO("PDA_02").addParam("product_area", product_area).addParam("flag", "10").process().getResultJSONArray(0);
JSONObject jo = new JSONObject();
jo.put("data", deliver_rows);
jo.put("message", "查询成功!");
return jo;
}
@Override
public JSONObject conveyConfirm(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("起点不能为空!");
}
//如果查询到给ACS下发一个输送线任务
JSONObject form = new JSONObject();
form.put("point_code1", point_code);
JSONObject convey_jo = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_code = '"+point_code+"'").uniqueResult(0);
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '"+convey_jo.getString("product_area")+"' AND point_type = '7'").uniqueResult(0);
form.put("point_code2", ss_jo.getString("point_code"));
form.put("task_type", "010401");
CutConveyorTask cutConveyorTask = new CutConveyorTask();
cutConveyorTask.createTask(form);
JSONObject jo = new JSONObject();
jo.put("message", "操作成功!");
return jo;
}
}

View File

@@ -132,7 +132,7 @@ public class OutServiceImpl implements OutService {
JSONObject slitting = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("resource_name = '" + ext_code + "' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND status = '03'").uniqueResult(0);
if (ObjectUtil.isEmpty(slitting)) {
throw new BadRequestException("该分切机没有对应完成配送完成的气涨轴!");
throw new BadRequestException("该分切机没有下一分切组配送完成的气涨轴!");
}
String qzzno = slitting.getString("qzzno");
@@ -144,10 +144,10 @@ public class OutServiceImpl implements OutService {
}
JSONObject jo = new JSONObject();
jo.put("point_code1", point_code);
jo.put("point_code2", delivery_point.getString("point_code"));
jo.put("point_code3",delivery_point.getString("point_code"));
jo.put("point_code4", point_code);
jo.put("point_code1",delivery_point.getString("point_code"));
jo.put("point_code2", point_code);
jo.put("point_code3", point_code);
jo.put("point_code4", delivery_point.getString("point_code"));
jo.put("vehicle_code", delivery_point.getString("qzzno"));
jo.put("vehicle_code2", cut_qzzno);
jo.put("product_area", cut_ivt.getString("product_area"));

View File

@@ -27,6 +27,7 @@ public class ShippingServiceImpl implements ShippingService {
public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");
String qzzno = whereJson.getString("qzzno");
String device_code = whereJson.getString("device_code");
HashMap map = new HashMap();
map.put("flag", "6");
@@ -36,6 +37,9 @@ public class ShippingServiceImpl implements ShippingService {
if (StrUtil.isNotEmpty(qzzno)) {
map.put("qzzno", qzzno);
}
if (StrUtil.isNotEmpty(device_code)) {
map.put("device_code", device_code);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
JSONObject jo = new JSONObject();
jo.put("data",rows);
@@ -178,12 +182,31 @@ public class ShippingServiceImpl implements ShippingService {
@Override
public JSONObject returnVehicle(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
String vehicle_code =whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(point_code)){
throw new BadRequestException("起点不能为空!");
}
if (StrUtil.isEmpty(vehicle_code)){
throw new BadRequestException("载具码不能为空!");
}
//判断起点是否存在
JSONObject start_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '"+point_code+"' AND is_delete = '0' AND is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(start_jo)){
throw new BadRequestException("未查询到对应点位!");
}
if (!start_jo.getString("point_type").equals("6")){
throw new BadRequestException("请选择输送线入库口作为起点!");
}
//查询该载具码对应的区域位置
JSONObject vehicle_area = WQLObject.getWQLObject("md_pb_vehiclearea").query("vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_area)){
throw new BadRequestException("未查询到该载具对应的区域位置!");
}
//根据起点判断区域查询对应的输送线空点位
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag","4").addParam("product_area","A1").process().uniqueResult(0);
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag","4").addParam("product_area",vehicle_area.getString("product_area")).addParam("point_location",vehicle_area.getString("point_location")).process().uniqueResult(0);
//下发输送线任务
JSONObject form = new JSONObject();
form.put("point_code1",point_code);
@@ -201,7 +224,13 @@ public class ShippingServiceImpl implements ShippingService {
String qzzno = whereJson.getString("qzzno");
String vehicle_code = whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(qzzno)){
throw new BadRequestException("气涨轴不能为空!");
}
JSONObject plan = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("qzzno = '"+qzzno+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan)){
throw new BadRequestException("未查询到该气涨轴对应的分切计划!");
}
String resource_name = plan.getString("resource_name");
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("ext_code = '"+resource_name+"'").uniqueResult(0);
String product_area = cut_jo.getString("product_area");

View File

@@ -211,6 +211,9 @@
OPTION 输入.product_area <> ""
ivt.product_area = 输入.product_area
ENDOPTION
OPTION 输入.device_code <> ""
ivt.point_code = 输入.device_code
ENDOPTION
OPTION 输入.qzzno <> ""
plan.qzzno = 输入.qzzno
ENDOPTION
@@ -297,12 +300,13 @@
IF 输入.flag = "10"
QUERY
SELECT
*
del.point_code AS value,
del.point_code AS text
FROM
st_ivt_deliverypointivt del
WHERE
1=1
OPTINON 输入.product_area <> "
OPTION 输入.product_area <> ""
del.product_area = 输入.product_area
ENDOPTION
ENDSELECT

View File

@@ -69,7 +69,7 @@ public class CutConveyorTask extends AbstractAcsTask {
if (StrUtil.equals(status, "0")) {
// 更新删除字段
jsonTask.put("is_delete","1");
jsonTask.put("is_delete", "1");
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
}
@@ -112,10 +112,10 @@ public class CutConveyorTask extends AbstractAcsTask {
}
// 更新分切输送库存状态
if (StrUtil.isNotEmpty(jsonTask.getString("vehicle_code"))){
if (StrUtil.isNotEmpty(jsonTask.getString("vehicle_code"))) {
jsonIvt.put("point_status", "03");
jsonIvt.put("qzzno", jsonTask.getString("vehicle_code"));
}else {
} else {
jsonIvt.put("point_status", "02");
}
ivtTab.update(jsonIvt);
@@ -136,7 +136,7 @@ public class CutConveyorTask extends AbstractAcsTask {
jo.put("ContainerName", ContainerName);
//判断该接口是否需要回传
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollSemiFGInboundComplete'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")){
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
lmsToMesService.airSwellWithPaperTubeAssArrival(row);
}
}
@@ -164,10 +164,12 @@ public class CutConveyorTask extends AbstractAcsTask {
String point_code1 = form.getString("point_code1");
String point_code2 = form.getString("point_code2");
if (isSingleTask(point_code1)) {
JSONObject point1_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code1 + "'").uniqueResult(0);
JSONObject point2_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code2 + "'").uniqueResult(0);
if (isSingleTask(point_code1) && !point1_jo.getString("point_type").equals("6") && !point1_jo.getString("point_type").equals("7")) {
throw new BadRequestException("点位:" + point_code1 + "存在未完成的任务!");
}
if (isSingleTask(point_code2)) {
if (isSingleTask(point_code2) && !point2_jo.getString("point_type").equals("6") && !point2_jo.getString("point_type").equals("7")) {
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务!");
}
JSONObject json = new JSONObject();
@@ -183,10 +185,10 @@ public class CutConveyorTask extends AbstractAcsTask {
json.put("create_name", currentUsername);
json.put("create_time", DateUtil.now());
//根据类型获取对应的任务优先级
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)){
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)) {
json.put("priority", "1");
}else {
} else {
json.put("priority", priority_jo.getString("value"));
}
json.put("acs_task_type", "5");

View File

@@ -148,6 +148,7 @@ public class CutTrussTask extends AbstractAcsTask {
form.put("point_code1",jsonTask.getString("point_code1"));
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '"+delivery_point.getString("product_area")+"' AND point_type = '7'").uniqueResult(0);
form.put("point_code2",ss_jo.getString("point_code"));
form.put("vehiclie_code",jsonTask.getString("vehicle_code2"));
form.put("task_type","010401");
cutConveyorTask.createTask(form);
}
@@ -176,7 +177,8 @@ public class CutTrussTask extends AbstractAcsTask {
//生成一个输送线出库任务
JSONObject form = new JSONObject();
form.put("point_code1",jsonTask.getString("point_code2"));
form.put("point_code2","SS01");
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '"+delivery_point.getString("product_area")+"' AND point_type = '7'").uniqueResult(0);
form.put("point_code2",ss_jo.getString("point_code"));
form.put("task_type","010401");
cutConveyorTask.createTask(form);
}

View File

@@ -64,7 +64,7 @@
SELECT DISTINCT
mst.*,
dtl.source_bill_type,
dtl.vbeln,
IFNULL(dtl.vbeln,''),
user.nick_name AS upload_name
FROM
st_ivt_iostorinv mst

View File

@@ -234,7 +234,7 @@ export async function blobValidate(data) {
* 注prop,title有一个必传
*/
export function flexWidth(prop, tableData, title, num = 0) {
if (tableData.length === 0) { // 表格没数据不做处理
if (!tableData || tableData.length === 0) { // 表格没数据不做处理
return
}
let flexWidth = 0// 初始化表格列宽

View File

@@ -332,7 +332,7 @@
<el-table-column prop="restruct_container_name" label="改制来源子卷号" width="120px" />
<el-table-column prop="package_box_sn" label="改制来源子卷木箱号" width="150px" />
<el-table-column prop="resource_name" label="机台编码" min-width="110" show-overflow-tooltip />
<el-table-column prop="ext_code" label="点位" min-width="110" show-overflow-tooltip />
<el-table-column prop="point_code" label="点位" min-width="110" show-overflow-tooltip />
<el-table-column prop="product_name" label="产品编码" min-width="130" show-overflow-tooltip />
<el-table-column prop="product_area" label="生产区域" />
<el-table-column prop="split_group" label="分切组" />

View File

@@ -150,7 +150,6 @@ export default {
open() {
debugger
this.crud.query.mater_type = this.opendtlParam
// this.crud.toQuery()
},
submit() {
this.rows = this.$refs.multipleTable.selection