Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -110,7 +110,26 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
str1 += "/priority:" + hexToString(prioritylow & 0xFF);
|
||||
System.out.println(str);
|
||||
System.out.println(str1);
|
||||
byte[] b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||
byte[] b = null;
|
||||
if(type == 1){
|
||||
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||
(byte) 0X00, (byte) 0X08,
|
||||
(byte) 0X00, (byte) 0X14,
|
||||
(byte) 0X00, (byte) 0X01,
|
||||
(byte) 0X00, (byte) 0X71,
|
||||
(byte) 0X00, (byte) 0X10,
|
||||
(byte) 0X01, (byte) 0X80,
|
||||
(byte) 0X00, (byte) 0X01,
|
||||
(byte) ikeyhigh, (byte) ikeylow,
|
||||
(byte) ikeyhigh, (byte) ikeylow,
|
||||
(byte) typehigh, (byte) typelow,
|
||||
(byte) qhdhigh, (byte) qhdlow,
|
||||
(byte) 0X00, (byte) 0X00,
|
||||
(byte) fhdhigh, (byte) fhdlow,
|
||||
|
||||
};
|
||||
}else if(type == 2){
|
||||
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||
(byte) 0X00, (byte) 0X08,
|
||||
(byte) 0X00, (byte) 0X14,
|
||||
(byte) 0X00, (byte) 0X01,
|
||||
@@ -125,6 +144,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
(byte) fhdhigh, (byte) fhdlow,
|
||||
(byte) 0X00, (byte) 0X00,
|
||||
};
|
||||
}
|
||||
log.info("下发AGV作业指令--{}", str1);
|
||||
log.info("下发AGV作业指令--{}", str);
|
||||
OneNDCSocketConnectionAutoRun.write(b);
|
||||
|
||||
@@ -309,7 +309,6 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,13 +194,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if ("1".equals(plc_to_agv)) {
|
||||
plcToAgvDeviceDriver.writing("AGVSetOutReqUpper", "1");
|
||||
if (plcToAgvDeviceDriver.getAGVSetOutUpperAllowed() == 1) {
|
||||
data = feedBackStatus(data, index, 1, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 1, inst, task, 2, false);
|
||||
plcToAgvDeviceDriver.writing("AGVInOP", "1");
|
||||
}
|
||||
} else if ("2".equals(plc_to_agv)) {
|
||||
plcToAgvDeviceDriver.writing("AGVSetOutReqLower", "1");
|
||||
if (plcToAgvDeviceDriver.getAGVSetOutLowerAllowed() == 1) {
|
||||
data = feedBackStatus(data, index, 1, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 1, inst, task, 2, false);
|
||||
plcToAgvDeviceDriver.writing("AGVInOP", "1");
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
try {
|
||||
data = feedBackStatus(data, index, 1, inst, task,1,false);
|
||||
data = feedBackStatus(data, index, 1, inst, task, 1, false);
|
||||
} catch (Exception e) {
|
||||
log.info("到达取货点反馈AGV状态失败:{}", e.getMessage());
|
||||
}
|
||||
@@ -257,10 +257,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} catch (Exception e) {
|
||||
log.info("下发AGVInOP信号:{}失败", "0");
|
||||
}
|
||||
data = feedBackStatus(data, index, 2, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 2, inst, task, 2, false);
|
||||
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
try {
|
||||
data = feedBackStatus(data, index, 2, inst, task,1,false);
|
||||
data = feedBackStatus(data, index, 2, inst, task, 1, false);
|
||||
} catch (Exception e) {
|
||||
log.info("取货完成反馈AGV状态失败:{}", e.getMessage());
|
||||
}
|
||||
@@ -281,19 +281,6 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agv地址参数有误,phase:" + phase);
|
||||
return;
|
||||
}
|
||||
/*if (agvaddr != 0) {
|
||||
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
|
||||
if (StrUtil.contains(old_device_code, "-")) {
|
||||
String[] point = old_device_code.split("-");
|
||||
emptyNum = point[1];
|
||||
device_code = point[0];
|
||||
} else if (StrUtil.contains(old_device_code, ".")) {
|
||||
String[] point = old_device_code.split("\\.");
|
||||
device_code = point[0];
|
||||
} else {
|
||||
device_code = old_device_code;
|
||||
}
|
||||
}*/
|
||||
if (agvaddr != 0) {
|
||||
old_device_code = deviceService.queryDeviceCodeByAddress(agvaddr);
|
||||
device_code = old_device_code;
|
||||
@@ -316,13 +303,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if ("1".equals(plc_to_agv)) {
|
||||
plcToAgvDeviceDriver.writing("AGVSetInReqUpper", "1");
|
||||
if (plcToAgvDeviceDriver.getAGVSetInUpperAllowed() == 1) {
|
||||
data = feedBackStatus(data, index, 3, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 3, inst, task, 2, false);
|
||||
plcToAgvDeviceDriver.writing("AGVInOP", "1");
|
||||
}
|
||||
} else if ("2".equals(plc_to_agv)) {
|
||||
plcToAgvDeviceDriver.writing("AGVSetInReqLower", "1");
|
||||
if (plcToAgvDeviceDriver.getAGVSetInLowerAllowed() == 1) {
|
||||
data = feedBackStatus(data, index, 3, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 3, inst, task, 2, false);
|
||||
plcToAgvDeviceDriver.writing("AGVInOP", "1");
|
||||
}
|
||||
}
|
||||
@@ -334,7 +321,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
}
|
||||
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
try {
|
||||
data = feedBackStatus(data, index, 2, inst, task,1,false);
|
||||
StandardOrdinarySiteDeviceDriver standar = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
Map<String, Object> extraValue = standar.getDevice().getExtraValue();
|
||||
if (ObjectUtil.isNotEmpty(extraValue.get("ignore_release_check")) && "true".equals(extraValue.get("ignore_release_check"))) {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
|
||||
} else {
|
||||
data = feedBackStatus(data, index, 2, inst, task, 1, false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("到达放货点反馈AGV状态失败:{}", e.getMessage());
|
||||
}
|
||||
@@ -393,16 +386,16 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} catch (Exception e) {
|
||||
log.info("下发AGVInOP信号:{}失败", "0");
|
||||
}
|
||||
data = feedBackStatus(data, index, 4, inst, task,2,false);
|
||||
data = feedBackStatus(data, index, 4, inst, task, 2, false);
|
||||
} else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
try {
|
||||
StandardOrdinarySiteDeviceDriver standar = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
Map<String, Object> extraValue = standar.getDevice().getExtraValue();
|
||||
boolean is_empty = false;
|
||||
if(ObjectUtil.isNotEmpty(extraValue.get("is_empty"))){
|
||||
is_empty = (boolean)extraValue.get("is_empty");
|
||||
if (ObjectUtil.isNotEmpty(extraValue.get("is_empty"))) {
|
||||
is_empty = extraValue.get("is_empty").equals("true") ? true : false;
|
||||
}
|
||||
data = feedBackStatus(data, index, 4, inst, task,1,is_empty);
|
||||
data = feedBackStatus(data, index, 4, inst, task, 1, is_empty);
|
||||
} catch (Exception e) {
|
||||
log.info("放货完成反馈AGV状态失败:{},", e.getMessage());
|
||||
}
|
||||
@@ -436,12 +429,12 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
} else if (phase == 0x73) {
|
||||
//agv电量
|
||||
electric_qty = ikey;
|
||||
int electric = Integer.parseInt(paramService.findByCode(AcsConfig.ELECTRIC).getValue());
|
||||
/*int electric = Integer.parseInt(paramService.findByCode(AcsConfig.ELECTRIC).getValue());
|
||||
if (electric_qty > 0 && electric_qty < electric) {
|
||||
log.info("当前车辆{}电量为{}低于{},开始判断是否需要充电!", this.device_code, electric_qty, electric);
|
||||
NDCAgvService.charge(String.valueOf(this.agvaddr));
|
||||
isCharge = true;
|
||||
}
|
||||
}*/
|
||||
} else if (phase == 0x74) {
|
||||
//三色灯状态
|
||||
status = ikey;
|
||||
@@ -456,8 +449,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
String hasWms = paramService.findByCode("hasWms").getValue();
|
||||
if ("3".equals(task.getTask_type()) && StrUtil.isNotEmpty(hasWms) && "1".equals(hasWms)) {
|
||||
String resp = acsToWmsService.requestTaskAgain(task.getNext_point_code(), task.getExt_task_id(), inst.getVehicle_code());
|
||||
if(StrUtil.isEmpty(resp)){
|
||||
log.info("申请分配二次点位失败,响应参数:{}",resp);
|
||||
if (StrUtil.isEmpty(resp)) {
|
||||
log.info("申请分配二次点位失败,响应参数:{}", resp);
|
||||
}
|
||||
JSONObject respjson = JSONObject.parseObject(resp);
|
||||
String point_code = respjson.getString("point_code");
|
||||
@@ -473,14 +466,14 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
return data;
|
||||
}
|
||||
|
||||
private byte[] feedBackStatus(byte[] data, int index, int agvStatus, Instruction inst, TaskDto task,int connector_and_sorting,boolean is_empty) {
|
||||
private byte[] feedBackStatus(byte[] data, int index, int agvStatus, Instruction inst, TaskDto task, int connector_and_sorting, boolean is_empty) {
|
||||
String hasWms = paramService.findByCode("hasWms").getValue();
|
||||
if (StrUtil.isNotEmpty(hasWms) && "1".equals(hasWms)) {
|
||||
log.info("存在LMS系统,需要反馈,指令号:{}",inst.getInstruction_code());
|
||||
log.info("存在LMS系统,需要反馈,指令号:{}", inst.getInstruction_code());
|
||||
JSONArray ja = new JSONArray();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("is_connector", connector_and_sorting == 1? 1:2);
|
||||
jo.put("task_type",task.getTask_type());
|
||||
jo.put("is_connector", connector_and_sorting == 1 ? 1 : 2);
|
||||
jo.put("task_type", task.getTask_type());
|
||||
jo.put("vehicle_code", inst.getVehicle_code());
|
||||
jo.put("status", agvStatus);
|
||||
jo.put("device_code", this.device_code);
|
||||
@@ -492,7 +485,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
|
||||
} else {
|
||||
if(connector_and_sorting == 1){
|
||||
if (connector_and_sorting == 1) {
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
@@ -502,7 +495,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
log.info("指令号:{},phase:{},acs反馈wms失败:{}", inst.getInstruction_code(), phase, httpResponse);
|
||||
}
|
||||
} else {
|
||||
log.info("不存在LMS系统,不需要反馈直接进去取货,指令号:{}",inst.getInstruction_code());
|
||||
log.info("不存在LMS系统,不需要反馈直接进去取货,指令号:{}", inst.getInstruction_code());
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
|
||||
}
|
||||
return data;
|
||||
|
||||
Binary file not shown.
@@ -34,6 +34,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version> <!-- 版本号可根据需要调整 -->
|
||||
</dependency>
|
||||
|
||||
<!-- https://onew.me/logback/2018/09/17/logback_win.html-->
|
||||
<dependency>
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//@Component
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Order(100)
|
||||
public class JobRunner implements ApplicationRunner {
|
||||
|
||||
@@ -7,6 +7,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -488,7 +489,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
schBaseVehiclematerialgroup.setMaterial_id(connectorDto.getProductID());
|
||||
schBaseVehiclematerialgroup.setMaterial_qty(connectorDto.getCurrentqty());
|
||||
schBaseVehiclematerialgroup.setRegion_code(connectorDto.getNextOperation());
|
||||
schBaseVehiclematerialgroup.setExtend(connectorDto.toString());
|
||||
schBaseVehiclematerialgroup.setExtend(JSON.toJSONString(connectorDto));
|
||||
schBaseVehiclematerialgroup.setOrder_code(connectorDto.getProductionOrder());
|
||||
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
|
||||
taskService.update(Wrappers.lambdaUpdate(SchBaseTask.class).eq(SchBaseTask::getTask_code, schBaseTask.getTask_code())
|
||||
|
||||
@@ -12,4 +12,11 @@ public interface WmsToConnectorService {
|
||||
* @param json
|
||||
*/
|
||||
AcsResponse feedAgvTaskStatus(JSONObject json);
|
||||
|
||||
/**
|
||||
* 反馈放货完成
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
AcsResponse feedAgvFinishTask(JSONObject json);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.ext.connector.service.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -17,44 +19,54 @@ public class ConnectorDto {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@SerializedName("jobname")
|
||||
private String Jobname;
|
||||
|
||||
/**
|
||||
* 下料小车托盘号
|
||||
*/
|
||||
@SerializedName("palletID")
|
||||
private String PalletID;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
@SerializedName("productID")
|
||||
private String ProductID;
|
||||
/**
|
||||
* 装载数量
|
||||
*/
|
||||
@SerializedName("currentqty")
|
||||
private Integer Currentqty;
|
||||
/**
|
||||
* X尺寸
|
||||
*/
|
||||
@SerializedName("sizeX")
|
||||
private String SizeX;
|
||||
/**
|
||||
* Y尺寸
|
||||
*/
|
||||
@SerializedName("sizeY")
|
||||
private String SizeY;
|
||||
/**
|
||||
* 角度
|
||||
*/
|
||||
@SerializedName("angle")
|
||||
private String Angle;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
@SerializedName("thickness")
|
||||
private String Thickness;
|
||||
/**
|
||||
* X坐标
|
||||
*/
|
||||
@SerializedName("positionX")
|
||||
private String PositionX;
|
||||
/**
|
||||
* Y坐标
|
||||
*/
|
||||
@SerializedName("positionY")
|
||||
private String PositionY;
|
||||
/**
|
||||
* 载具号
|
||||
@@ -63,17 +75,21 @@ public class ConnectorDto {
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@SerializedName("productionOrder")
|
||||
private String ProductionOrder;
|
||||
/**
|
||||
* JOBFinishFlag
|
||||
*/
|
||||
@SerializedName("finished")
|
||||
private String Finished;
|
||||
/**
|
||||
* 下一道工序
|
||||
*/
|
||||
@SerializedName("nextOperation")
|
||||
private String NextOperation;
|
||||
/**
|
||||
* 截至时间
|
||||
*/
|
||||
@SerializedName("dueDate")
|
||||
private String DueDate;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.ext.connector.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.ext.acs.service.dto.to.wms.AcsResponse;
|
||||
@@ -18,8 +19,20 @@ public class WmsToConnectorServiceImpl implements WmsToConnectorService {
|
||||
|
||||
@Override
|
||||
public AcsResponse feedAgvTaskStatus(JSONObject json) {
|
||||
String api = "api/iot/agvtask";
|
||||
AcsResponse acsResponse = ConnectorUtil.notifyConnector2(api, json);
|
||||
String api = "/iot/agvarrive";
|
||||
JSONArray objects = new JSONArray();
|
||||
objects.add(json);
|
||||
AcsResponse acsResponse = ConnectorUtil.notifyConnector2(api, objects);
|
||||
return acsResponse;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AcsResponse feedAgvFinishTask(JSONObject json) {
|
||||
String api = "/iot/agvfinish";
|
||||
JSONArray objects = new JSONArray();
|
||||
objects.add(json);
|
||||
AcsResponse acsResponse = ConnectorUtil.notifyConnector2(api, objects);
|
||||
return acsResponse;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.nl.wms.ext.handheld.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.ext.handheld.service.HandheldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author LENOVO
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "手持")
|
||||
@RequestMapping("/api/")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class HandheldController {
|
||||
|
||||
@Autowired
|
||||
private HandheldService handheldService;
|
||||
|
||||
@PostMapping("/task")
|
||||
@Log("手持创建去地面点位任务")
|
||||
@ApiOperation("手持创建去地面点位任务")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> applyGroundTask(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(handheldService.applyTask(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/emptyVehicle")
|
||||
@Log("呼叫地面空载具点位")
|
||||
@ApiOperation("呼叫地面空载具点位")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> applyEmptyVehicle(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(handheldService.applyEmptyVehicle(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.ext.handheld.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @author LENOVO
|
||||
*/
|
||||
public interface HandheldService {
|
||||
|
||||
|
||||
/**
|
||||
* 手持申请去地面点位任务
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Object applyTask(JSONObject param);
|
||||
|
||||
|
||||
/**
|
||||
* 手持呼叫空载具地面点位
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Object applyEmptyVehicle(JSONObject param);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package org.nl.wms.ext.handheld.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import nl.basjes.shaded.org.springframework.util.Assert;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.ext.handheld.service.HandheldService;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.task.TaskFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author LENOVO
|
||||
*/
|
||||
@Service
|
||||
public class HandheldServiceImpl implements HandheldService {
|
||||
|
||||
@Autowired
|
||||
private ISchBasePointService iSchBasePointService;
|
||||
|
||||
@Autowired
|
||||
private TaskFactory taskFactory;
|
||||
|
||||
|
||||
@Override
|
||||
public Object applyTask(JSONObject param) {
|
||||
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_list")
|
||||
, param.getString("vehicle_type")}, "参数不能为空!");
|
||||
String vehicle_list = param.getString("vehicle_list");
|
||||
String region_code = param.getString("region_code");
|
||||
|
||||
String device_code = param.getString("device_code");
|
||||
String vehicle_type = param.getString("vehicle_type");
|
||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||
boolean equals = StrUtil.equals(schBasePoint.getPoint_type(), vehicle_type);
|
||||
if (ObjectUtil.isEmpty(schBasePoint) || !equals) throw new BadRequestException("设备点位不存在!");
|
||||
AbstractTask connectorTask = taskFactory.getTask("HHTask");
|
||||
// 准备参数:设备编码
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("config_code", "HHTask");
|
||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||
jo.put("vehicle_qty", BeanUtil.toBean(vehicle_list, List.class).size());
|
||||
jo.put("vehicles", BeanUtil.toBean(vehicle_list, List.class));
|
||||
jo.put("vehicle_type", vehicle_type);
|
||||
jo.put("ext_data", param);
|
||||
connectorTask.apply(jo);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object applyEmptyVehicle(JSONObject param) {
|
||||
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_type")}, "参数不能为空!");
|
||||
String device_code = param.getString("device_code");
|
||||
String vehicle_type = param.getString("vehicle_type");
|
||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||
boolean equals = StrUtil.equals(schBasePoint.getPoint_type(), vehicle_type);
|
||||
if (ObjectUtil.isEmpty(schBasePoint) || !equals) throw new BadRequestException("设备点位不存在!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.ext.connector.service.dto.ConnectorDto;
|
||||
import org.nl.wms.ext.sorting.service.SortingService;
|
||||
import org.nl.wms.sch.point.service.dto.PointMaterialInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -34,11 +35,12 @@ public class SortingController {
|
||||
Map map = sortingService.createAgvTask(jsonObject);
|
||||
return new ResponseEntity(map, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/jobs")
|
||||
@Log("查询物料列表")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> getMaterialList(String Jobname){
|
||||
List<PointMaterialInfo> structList = sortingService.getStructList(Jobname);
|
||||
public ResponseEntity<Object> getMaterialList(@RequestParam String Jobname){
|
||||
List<ConnectorDto> structList = sortingService.getStructList(Jobname);
|
||||
return new ResponseEntity(structList, HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.ext.sorting.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.ext.connector.service.dto.ConnectorDto;
|
||||
import org.nl.wms.sch.point.service.dto.PointMaterialInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -18,5 +19,5 @@ public interface SortingService {
|
||||
*/
|
||||
Map createAgvTask(JSONObject jsonObject);
|
||||
|
||||
List<PointMaterialInfo> getStructList(String jobName);
|
||||
List<ConnectorDto> getStructList(String jobName);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package org.nl.wms.ext.sorting.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.gson.Gson;
|
||||
import org.nl.common.enums.region.RegionEnum;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.config.MapOf;
|
||||
import org.nl.wms.ext.connector.service.dto.ConnectorDto;
|
||||
import org.nl.wms.ext.sorting.enums.SortingEnum;
|
||||
import org.nl.wms.ext.sorting.service.SortingService;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.point.service.dto.PointMaterialInfo;
|
||||
@@ -20,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -39,6 +46,8 @@ public class SortingServiceImpl implements SortingService {
|
||||
private SortingSNTTask sortingSNTTask;
|
||||
@Autowired
|
||||
private ISchBasePointService iSchBasePointService;
|
||||
@Autowired
|
||||
private ISchBaseVehiclematerialgroupService iSchBaseVehiclematerialgroupService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -90,8 +99,16 @@ public class SortingServiceImpl implements SortingService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PointMaterialInfo> getStructList(String jobName) {
|
||||
List<PointMaterialInfo> structList = iSchBasePointService.getStructList(RegionEnum.ZDFJ.getRegion_code(), "1");
|
||||
return structList;
|
||||
public List<ConnectorDto> getStructList(String jobName) {
|
||||
List<SchBaseVehiclematerialgroup> list = iSchBaseVehiclematerialgroupService.list(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||
.eq(SchBaseVehiclematerialgroup::getJob_name, jobName));
|
||||
List<ConnectorDto> connectors = new ArrayList<>();
|
||||
for (SchBaseVehiclematerialgroup schBaseVehiclematerialgroup : list) {
|
||||
Gson gson = new Gson();
|
||||
ConnectorDto connectorDto = gson.fromJson(schBaseVehiclematerialgroup.getExtend(), ConnectorDto.class);
|
||||
connectors.add(connectorDto);
|
||||
}
|
||||
// List<PointMaterialInfo> structList = iSchBasePointService.getStructList(RegionEnum.ZDFJ.getRegion_code(), "1");
|
||||
return connectors;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.nl.wms.sch.group.service.dto.SchBaseVehiclematerialgroupQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -64,4 +65,6 @@ public interface ISchBaseVehiclematerialgroupService extends IService<SchBaseVeh
|
||||
* @param data
|
||||
*/
|
||||
void updateByVehicleCode(String vehicle_code, String data);
|
||||
|
||||
List selectByJobName(String jobName);
|
||||
}
|
||||
|
||||
@@ -136,4 +136,9 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
|
||||
.set(SchBaseVehiclematerialgroup::getExtend, data));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List selectByJobName(String jobName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
* @param start_device_code
|
||||
* @return
|
||||
*/
|
||||
SchBasePoint selectByPointCode(String start_device_code);
|
||||
SchBasePoint selectByPointCode(String device_code);
|
||||
|
||||
/**
|
||||
* 查询二次分配的虚拟站点
|
||||
@@ -118,4 +118,10 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
*/
|
||||
SchBasePoint selectByNextWaitPoint(String device_code,String vehicleCode);
|
||||
|
||||
/**
|
||||
* 根据托盘类型查询
|
||||
* @param vehicle_type
|
||||
* @return
|
||||
*/
|
||||
SchBasePoint selectByVehicleQty(String config_code, String vehicle_type);
|
||||
}
|
||||
|
||||
@@ -335,6 +335,18 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchBasePoint selectByVehicleQty(String config_code, String vehicle_type) {
|
||||
Assert.noNullElements(new Object[]{config_code, vehicle_type}, "载具类型不能为空!");
|
||||
|
||||
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getIs_lock, false)
|
||||
.isNotNull(SchBasePoint::getVehicle_code)
|
||||
.eq(SchBasePoint::getRegion_code, config_code)
|
||||
.eq(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
|
||||
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PointMaterialInfo> getStructList(String region_code, String vehicle_type) {
|
||||
List<PointMaterialInfo> structList = pointMapper.getStructList(region_code, vehicle_type);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ConnectorUtil {
|
||||
return AcsResponse.requestRefuse("未连接ACS!");
|
||||
}
|
||||
String url = connectorUrl + api;
|
||||
log.info("下发acs任务的参数为:{}", JSON.toJSONString(object));
|
||||
log.info("反馈connector到达取货点的参数为:{},接口路径:{}", JSON.toJSONString(object),url);
|
||||
AcsResponse resultForAcs;
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
@@ -94,6 +94,7 @@ public class ConnectorUtil {
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
resultForAcs = JSONObject.toJavaObject(result, AcsResponse.class);
|
||||
log.info("反馈connector到达取货点的响应参数为:{}", result);
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
//网络不通
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package org.nl.wms.sch.task_manage.task.tasks.cnt;
|
||||
package org.nl.wms.sch.task_manage.task.tasks.connector;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.enums.GoodsEnum;
|
||||
@@ -11,13 +10,11 @@ import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||
@@ -29,9 +26,7 @@ import org.nl.wms.util.TaskUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Component(value = "CNTTask")
|
||||
@@ -1,8 +1,7 @@
|
||||
package org.nl.wms.sch.task_manage.task.tasks.cnt;
|
||||
package org.nl.wms.sch.task_manage.task.tasks.connector;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.enums.GoodsEnum;
|
||||
@@ -11,13 +10,11 @@ import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||
@@ -130,7 +127,7 @@ public class FTGTask extends AbstractTask {
|
||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
||||
.set(SchBasePoint::getIs_lock, false));
|
||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code, null));
|
||||
}
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
@@ -0,0 +1,104 @@
|
||||
package org.nl.wms.sch.task_manage.task.tasks.handheld;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.enums.GoodsEnum;
|
||||
import org.nl.common.enums.region.RegionEnum;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskType;
|
||||
import org.nl.wms.util.PointUtils;
|
||||
import org.nl.wms.util.TaskUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author LENOVO
|
||||
*/
|
||||
@Component("HHTask")
|
||||
public class HHTask extends AbstractTask {
|
||||
|
||||
|
||||
private static final String TASK_CONFIG_CODE = "HHTask";
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private ISchBaseTaskconfigService taskConfigService;
|
||||
@Autowired
|
||||
private ISysNoticeService noticeService;
|
||||
@Autowired
|
||||
private ISchBasePointService schBasePointService;
|
||||
@Autowired
|
||||
private ISchBaseVehiclematerialgroupService schBaseVehiclematerialgroupService;
|
||||
|
||||
@Override
|
||||
protected void create() throws BadRequestException {
|
||||
// 获取任务
|
||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||
// 配置信息
|
||||
for (SchBaseTask task : tasks) {
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
// 查询终点
|
||||
SchBasePoint schBasePoint = schBasePointService.selectByVehicleQty(RegionEnum.TRUBEND_SHELVES_3_1_1.getRegion_code(),task.getVehicle_type());
|
||||
if (TaskType.CARRY_TASK.getValue().equals(task.getTask_type())) {
|
||||
schBasePoint = schBasePointService.selectByRegionCode(RegionEnum.TRUBEND_SHELVES_3_1_1.getRegion_code(), task.getVehicle_code());
|
||||
} else if (TaskType.REASSIGN_TASK.getValue().equals(task.getTask_type())) {
|
||||
schBasePoint = schBasePointService.selectByReassign(RegionEnum.TRUBEND_SHELVES_3_1_1.getRegion_code(), task.getVehicle_code());
|
||||
}
|
||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||
task.setRemark("未找到所需点位!");
|
||||
taskService.updateById(task);
|
||||
// 消息通知
|
||||
noticeService.createNotice("未找到所需点位!", TASK_CONFIG_CODE + task.getTask_code(),
|
||||
NoticeTypeEnum.WARN.getCode());
|
||||
continue;
|
||||
}
|
||||
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code2(schBasePoint.getPoint_code());
|
||||
task.setVehicle_type(schBasePoint.getCan_vehicle_type());
|
||||
task.setRemark("");
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
taskService.updateById(task);
|
||||
|
||||
schBasePoint.setIng_task_code(task.getTask_code());
|
||||
schBasePoint.setPoint_status(GoodsEnum.IN_STOCK.getValue());
|
||||
PointUtils.setUpdateByAcs(schBasePoint);
|
||||
pointService.updateById(schBasePoint);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateStatus(String task_code, TaskStatus status) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceFinish(String task_code) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_code) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void feedbackTaskState(JSONObject param, SchBaseTask schBaseTask, BaseResponse result) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public class SortingCMTTask extends AbstractTask {
|
||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
||||
.set(SchBasePoint::getIs_lock, false));
|
||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
||||
}
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
|
||||
@@ -118,7 +118,7 @@ public class SortingCNTTask extends AbstractTask {
|
||||
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
|
||||
PointUtils.updateByIngTaskCode(schBasePoint2);
|
||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class).eq(SchBasePoint::getPoint_code, point_code2)
|
||||
.set(SchBasePoint::getIs_lock, false));
|
||||
.set(SchBasePoint::getIs_lock, false).set(SchBasePoint::getVehicle_code,null));
|
||||
}
|
||||
// 任务完成
|
||||
taskObj.setTask_status(TaskStatus.FINISHED.getCode());
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<contextName>nlAdmin</contextName>
|
||||
<property name="log.charset" value="utf-8"/>
|
||||
<property name="log.pattern"
|
||||
value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %gray(%msg%n)"/>
|
||||
value="%cyan(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %cyan(%msg%n)"/>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
|
||||
|
||||
@@ -16,6 +17,7 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
@@ -108,32 +110,46 @@
|
||||
</logger>
|
||||
</springProfile>
|
||||
<springProfile name="prod">
|
||||
<root level="info">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="asyncLuceneAppender"/>
|
||||
<root level="debug">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</root>
|
||||
<logger name="jdbc" level="ERROR" additivity="true">
|
||||
<logger name="org.springframework" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.springframework" level="ERROR" additivity="true">
|
||||
<logger name="org.hibernate.SQL" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.hibernate" level="ERROR" additivity="true">
|
||||
<logger name="org.apache" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.quartz" level="ERROR" additivity="true">
|
||||
<logger name="org.hibernate" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="com.google" level="ERROR" additivity="true">
|
||||
<logger name="io.netty" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.redisson" level="ERROR" additivity="true">
|
||||
<logger name="jdbc" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.nl.modules.wql" level="ERROR" additivity="true">
|
||||
<logger name="io.lettuce" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.springframework.data" level="ERROR" additivity="true">
|
||||
<logger name="com.fasterxml" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="org.quartz" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="com.google" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="springfox" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="log4jdbc" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
<logger name="nl.basjes" level="ERROR" additivity="false">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</logger>
|
||||
</springProfile>
|
||||
|
||||
Binary file not shown.
BIN
lms/nladmin-ui/src/assets/images/screen_5.png
Normal file
BIN
lms/nladmin-ui/src/assets/images/screen_5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -4,64 +4,82 @@
|
||||
<el-col :span="5" class="height-100 ver-justify">
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT1' in pointState)}" @click="showPop(3, 'OUT1')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT1' in pointState)}" @click="showPop(4, 'OUT1')">Scaner</div>
|
||||
</el-col>
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT1</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT1' in pointState)}">
|
||||
<p class="p1">OUT1</p>
|
||||
<p v-show="'OUT1' in pointState" class="p2">{{ pointState.OUT1 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT3' in pointState)}" @click="showPop(3, 'OUT3')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT3' in pointState)}" @click="showPop(4, 'OUT3')">Scaner</div>
|
||||
</el-col>
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2" @click="showPop(3)"><p>OUT3</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT3' in pointState)}">
|
||||
<p class="p1">OUT3</p>
|
||||
<p v-show="'OUT3' in pointState" class="p2">{{ pointState.OUT3 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify mg2">
|
||||
<div class="m-content ver-center" @click="showPop(1)">
|
||||
<p>{{ pkObj.label }}</p>
|
||||
<p>{{ JSON.stringify(pkObj) !== '{}' ? pkObj.label : 'MACHINE' }}</p>
|
||||
</div>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap-2">
|
||||
<el-col :span="7" class="height-100">
|
||||
<div class="s-btn-2" @click="showPop(2)"><p>N1</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('N1' in pointState)}" @click="showPop(2, 'N1')">
|
||||
<p class="p1">N1</p>
|
||||
<p v-show="'N1' in pointState" class="p2">{{ pointState.N1 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="height-100 ver-center">
|
||||
<div class="s-btn-1"><p>√</p></div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('N1' in pointState)}"><p>√</p></div>
|
||||
</el-col>
|
||||
<el-col :span="7" class="height-100">
|
||||
<div class="s-btn-2"><p>N2</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('N2' in pointState)}" @click="showPop(2, 'N2')">
|
||||
<p class="p1">N2</p>
|
||||
<p v-show="'N2' in pointState" class="p2">{{ pointState.N2 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="height-100 ver-center">
|
||||
<div class="s-btn-1"><p>√</p></div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('N2' in pointState)}"><p>√</p></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5" class="height-100 ver-justify">
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT2</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT2' in pointState)}">
|
||||
<p class="p1">OUT2</p>
|
||||
<p v-show="'OUT2' in pointState" class="p2">{{ pointState.OUT2 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT2' in pointState)}" @click="showPop(3, 'OUT2')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT2' in pointState)}" @click="showPop(4, 'OUT2')">Scaner</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT4</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT4' in pointState)}">
|
||||
<p class="p1">OUT4</p>
|
||||
<p v-show="'OUT4' in pointState" class="p2">{{ pointState.OUT4 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT4' in pointState)}" @click="showPop(3, 'OUT4')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT4' in pointState)}" @click="showPop(4, 'OUT4')">Scaner</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="pop-wraper" :class="{'popshow': show, 'pophide': !show, 'pop-wraper-1': type === 3}">
|
||||
<div class="pop-wraper" :class="{'popshow': show, 'pophide': !show, 'pop-wraper-1': type === 3 || type === 4}">
|
||||
<div v-show="type === 1" class="pop-h1">选择设备</div>
|
||||
<div v-show="type === 1" class="pop-grid">
|
||||
<el-table
|
||||
@@ -84,7 +102,7 @@
|
||||
</div>
|
||||
<el-row v-show="type === 1" class="pop-btns">
|
||||
<el-col :span="3" :offset="6" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure">确定</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure1">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="6" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, vechineList = []">取消</div>
|
||||
@@ -102,32 +120,32 @@
|
||||
@current-change="handleCurrentChange2"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单编码"
|
||||
prop="order_code"
|
||||
label="订单号"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="work_code"
|
||||
label="工序编码"
|
||||
prop="region_code"
|
||||
label="工序"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_code"
|
||||
label="物料编码"
|
||||
prop="material_id"
|
||||
label="物料号"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_type"
|
||||
label="物料类型"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="qty"
|
||||
label="额定数量"
|
||||
prop="material_qty"
|
||||
label="物料数量"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="plan_date"
|
||||
label="交货日期"
|
||||
label="交期时间"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="custom"
|
||||
label="客户编码"
|
||||
/>
|
||||
</el-table>
|
||||
</el-col>
|
||||
@@ -140,21 +158,21 @@
|
||||
style="width: 100%"
|
||||
@current-change="handleCurrentChange3"
|
||||
>
|
||||
<el-table-column
|
||||
prop="载具编码"
|
||||
label="载具编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="qty"
|
||||
label="物料数量"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_code"
|
||||
label="所在货位"
|
||||
label="点位编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="region_code"
|
||||
label="工序编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_type"
|
||||
label="点位类型"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_status_name"
|
||||
label="点位状态"
|
||||
/>
|
||||
</el-table>
|
||||
</el-col>
|
||||
@@ -173,41 +191,59 @@
|
||||
</el-row>
|
||||
<div v-show="type === 3" class="pop-grid">
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">订单编号</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">点位</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.device_code" type="text" class="p-value" disabled></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">额定数量</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">托盘类型</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.vehicle_type" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">工序</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">合格品</el-col>
|
||||
<el-col :span="18"><input type="number" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<!-- <el-checkbox v-model="checked">备选项</el-checkbox> -->
|
||||
<el-col :span="5" class="p-label">是否报功</el-col>
|
||||
<el-col :span="18"><el-checkbox v-model="checked" /></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">托盘编码</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">地面点位</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">设备工序</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.regin_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row v-show="type === 3" class="pop-btns">
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false">确定</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure3">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false">取消</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, emptyObj = {}">取消</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show="type === 4" class="pop-grid">
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">订单编号</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.order_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">合格数量</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.material_qty" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">设备工序</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.region_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<!-- <el-checkbox v-model="checked">备选项</el-checkbox> -->
|
||||
<el-col :span="5" class="p-label">是否报功</el-col>
|
||||
<el-col :span="18"><el-checkbox v-model="sendObj.has_report" /></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">载具编码</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.vehicle_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">地面点位</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.device_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row v-show="type === 4" class="pop-btns">
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure4">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, sendObj = {}">取消</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -216,7 +252,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { machine, n1list, n1list2 } from '@/views/wms/produceScreen/produceScreen'
|
||||
import crudProduceScreen from './produceScreen'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -224,57 +260,101 @@ export default {
|
||||
show: false,
|
||||
machineData: [],
|
||||
n1List: [],
|
||||
buttonName: '',
|
||||
vechineList: [],
|
||||
currentRow1: null,
|
||||
currentRow2: null,
|
||||
currentRow3: null,
|
||||
pkObj: { label: 'MACHINE' },
|
||||
checked: false
|
||||
pkObj: {},
|
||||
checked: false,
|
||||
pointState: {},
|
||||
emptyObj: {},
|
||||
sendObj: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPop(type) {
|
||||
showPop(type, name) {
|
||||
this.type = type
|
||||
this.buttonName = name
|
||||
if (type === 1) {
|
||||
this._machine()
|
||||
} else if (type === 2) {
|
||||
this._n1list()
|
||||
} else if (type === 3) {
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
async _machine() {
|
||||
const res = await machine()
|
||||
crudProduceScreen.regionList().then(res => {
|
||||
this.machineData = [...res]
|
||||
this.show = true
|
||||
},
|
||||
async _n1list() {
|
||||
const res = await n1list()
|
||||
this.n1List = [...res]
|
||||
})
|
||||
} else if (type === 2 && name in this.pointState) {
|
||||
crudProduceScreen.regionOrder(this.pointState[name]).then(res => {
|
||||
this.n1List = [...res.content]
|
||||
this.vechineList = []
|
||||
this.show = true
|
||||
},
|
||||
async _n1list2() {
|
||||
const res = await n1list2()
|
||||
this.vechineList = [...res]
|
||||
})
|
||||
} else if (type === 3 && name in this.pointState) {
|
||||
this.show = true
|
||||
this.emptyObj.device_code = this.pointState[name]
|
||||
this.emptyObj.vehicle_type = ''
|
||||
this.emptyObj.regin_code = ''
|
||||
} else if (type === 4 && name in this.pointState) {
|
||||
this.show = true
|
||||
this.sendObj.device_code = this.pointState[name]
|
||||
this.emptyObj.vehicle_code = ''
|
||||
this.emptyObj.order_code = ''
|
||||
this.emptyObj.material_qty = ''
|
||||
this.emptyObj.region_code = ''
|
||||
this.emptyObj.has_report = false
|
||||
}
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.currentRow1 = val
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.currentRow2 = val
|
||||
this._n1list2()
|
||||
crudProduceScreen.getMaterListByOrder(this.pointState[this.buttonName], val.order_code).then(res => {
|
||||
res.content.map(el => {
|
||||
this.$set(el, 'point_status_name', ['无货', '空托盘', '有料'][Number(el.point_status)])
|
||||
})
|
||||
this.vechineList = [...res.content]
|
||||
})
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.currentRow3 = val
|
||||
},
|
||||
toSure1() {
|
||||
if (this.currentRow1 === null) {
|
||||
this.$message.error('请选择设备!')
|
||||
return
|
||||
}
|
||||
this.pkObj = this.currentRow1
|
||||
this.show = false
|
||||
crudProduceScreen.regionPoints(this.pkObj.value).then(res => {
|
||||
this.pointState = res
|
||||
})
|
||||
},
|
||||
toSure() {
|
||||
if (this.currentRow1 === null) {
|
||||
this.$message.error('请选择设备!')
|
||||
return
|
||||
}
|
||||
this.pkObj = this.currentRow1
|
||||
this.show = false
|
||||
},
|
||||
toCall() {
|
||||
this.$message('操作成功')
|
||||
crudProduceScreen.callMater(this.currentRow3).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
},
|
||||
toSure3() {
|
||||
crudProduceScreen.callEmp(this.emptyObj).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
this.emptyObj = {}
|
||||
},
|
||||
toSure4() {
|
||||
crudProduceScreen.sendMater(this.sendObj).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
this.sendObj = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,13 +400,16 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 45%;
|
||||
font-size: 14px;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
padding: 0 15px;
|
||||
background: center / 100% 100% url('~@/assets/images/screen_1.png') no-repeat;
|
||||
}
|
||||
.s-btn-1_dis {
|
||||
background-image: url('~@/assets/images/screen_5.png');
|
||||
}
|
||||
.s-btn-2 {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
@@ -343,7 +426,7 @@ export default {
|
||||
background-image: linear-gradient(to bottom, #66b1ff, #a0cfff);
|
||||
border-radius: 16px;
|
||||
}
|
||||
p {
|
||||
.p1 {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -356,6 +439,23 @@ export default {
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
.p2 {
|
||||
position: absolute;
|
||||
bottom: 22%;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.s-btn-2_dis {
|
||||
background-color: #a2b1c1;
|
||||
border: 1px solid #393f44;
|
||||
&::before {
|
||||
background-image: linear-gradient(to bottom, #666e77, #a8b5c3);
|
||||
}
|
||||
}
|
||||
.s-btn-3 {
|
||||
height: 100%;
|
||||
@@ -513,6 +613,7 @@ export default {
|
||||
text-align: left;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
background: rgba(45,88,184,0.25);
|
||||
border: 1px solid #21D0F2;
|
||||
}
|
||||
|
||||
@@ -1,186 +1,110 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
// 设备工序列表
|
||||
export function regionList() {
|
||||
return request({
|
||||
url: 'api/produceTask/add',
|
||||
url: 'api/fab/regionList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// export function regionList() {
|
||||
// const res = [
|
||||
// { value: '111-02', label: 'TP5000冲床加工' },
|
||||
// { value: '111 03', label: '警平' },
|
||||
// { value: '111-04', label: '激光切闻' },
|
||||
// { value: '111-05', label: '复合机' },
|
||||
// { value: '111-06', label: 'Amada 801冲床' },
|
||||
// { value: '111-07', label: 'TruBend 7038' },
|
||||
// { value: '111-08', label: 'TruBend 5170' },
|
||||
// { value: '111 09', label: 'TruBend Cell 7000' },
|
||||
// { value: '111-10', label: 'LAG Robot Bending Cell' },
|
||||
// { value: '111-12', label: '气保焊' },
|
||||
// { value: '111-13', label: '姆柱焊、点焊' },
|
||||
// { value: '111-14', label: '林肯焊接机器人' },
|
||||
// { value: '111-15', label: '铜冲机' },
|
||||
// { value: '111-16', label: '铜弯机' },
|
||||
// { value: '111-22', label: '钳床' },
|
||||
// { value: '111-23', label: '压铆机' },
|
||||
// { value: '111-24', label: '斯图加特焊接机器人' }
|
||||
// ]
|
||||
// return new Promise((resolve, reject) => {
|
||||
// resolve(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
// 根据工序获取设备点位信息
|
||||
export function regionPoints(code) {
|
||||
return request({
|
||||
url: 'api/fab/regionPoints?regionCode=' + code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// export function regionPoints(code) {
|
||||
// let res = {'OUT3': '1234', 'OUT2': '2234', 'N1': '123', 'N2': '223'}
|
||||
// return new Promise((resolve, reject) => {
|
||||
// resolve(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
// 根据工序查询订单
|
||||
export function regionOrder(code) {
|
||||
return request({
|
||||
url: 'api/fab/regionOrder?regionCode=' + code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// export function regionOrder(code) {
|
||||
// const res = {
|
||||
// content: [{ order_code: '800034202869', region_code: '111-07', material_id: 'A7E0019008760_00', material_type: 'S39_SA01', custom: 'BBC支撑板后上', material_qty: '120', plan_date: '2024/8/11' }]
|
||||
// }
|
||||
// return new Promise((resolve, reject) => {
|
||||
// resolve(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
// 根据工单查询匹配库存
|
||||
export function getMaterListByOrder(code, order) {
|
||||
return request({
|
||||
url: 'api/fab/getMaterListByOrder?regionCode=' + code + '&?order=' + order,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// export function getMaterListByOrder(code, order) {
|
||||
// let res = {
|
||||
// content: [{ point_code: 'XXS23023012334', region_code: '800034202869', point_type: '120', point_status: '2' }]
|
||||
// }
|
||||
// return new Promise((resolve, reject) => {
|
||||
// resolve(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
// 呼叫库存物料
|
||||
export function callMater(data) {
|
||||
return request({
|
||||
url: 'api/fab/callMater',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
// 呼叫空料框
|
||||
export function callEmp(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/produceTask',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevice() {
|
||||
return request({
|
||||
url: 'api/produceTask/getDevice',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaterial() {
|
||||
return request({
|
||||
url: 'api/produceTask/getMaterial',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getProduceStatus() {
|
||||
return request({
|
||||
url: 'api/produceTask/getProduceStatus',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function importExcel(id) {
|
||||
return request({
|
||||
url: 'api/produceTask/importExcel/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTask(device_code) {
|
||||
debugger
|
||||
return request({
|
||||
url: 'api/produceTask/queryTask/' + device_code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function querAllTask() {
|
||||
return request({
|
||||
url: 'api/produceTask/querAllTask',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function callMaterial(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/callMaterial',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function finish(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/finish',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialBack(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/materialBack',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function emptyVehicleBack(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/emptyVehicleBack',
|
||||
url: 'api/fab/callEmp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryIdDevice(id) {
|
||||
// 工序下料
|
||||
export function sendMater(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function popSeek(code) {
|
||||
return request({
|
||||
url: 'api/produceTask/popSeek/' + code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function queryOne() {
|
||||
return request({
|
||||
url: 'api/produceTask/queryOne',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function saveOrder(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/saveOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function forceFinish(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/forceFinish',
|
||||
url: 'api/fab/sendMater',
|
||||
method: 'post',
|
||||
data: data
|
||||
data
|
||||
})
|
||||
}
|
||||
export function queryIvtByPscn(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/queryIvtByPscn',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const machine = () => {
|
||||
const res = [
|
||||
{ value: '111-02', label: 'TP5000冲床加工' },
|
||||
{ value: '111 03', label: '警平' },
|
||||
{ value: '111-04', label: '激光切闻' },
|
||||
{ value: '111-05', label: '复合机' },
|
||||
{ value: '111-06', label: 'Amada 801冲床' },
|
||||
{ value: '111-07', label: 'TruBend 7038' },
|
||||
{ value: '111-08', label: 'TruBend 5170' },
|
||||
{ value: '111 09', label: 'TruBend Cell 7000' },
|
||||
{ value: '111-10', label: 'LAG Robot Bending Cell' },
|
||||
{ value: '111-12', label: '气保焊' },
|
||||
{ value: '111-13', label: '姆柱焊、点焊' },
|
||||
{ value: '111-14', label: '林肯焊接机器人' },
|
||||
{ value: '111-15', label: '铜冲机' },
|
||||
{ value: '111-16', label: '铜弯机' },
|
||||
{ value: '111-22', label: '钳床' },
|
||||
{ value: '111-23', label: '压铆机' },
|
||||
{ value: '111-24', label: '斯图加特焊接机器人' }
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const n1list = () => {
|
||||
const res = [
|
||||
{ order: '800034202869', work_code: '111-07', material_code: 'A7E0019008760_00', material_type: 'S39_SA01', material_name: 'BBC支撑板后上', qty: '120', plan_date: '2024/8/11' }
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export const n1list2 = () => {
|
||||
const res = [
|
||||
{ vehicle_code: 'XXS23023012334', order: '800034202869', qty: '120', point_code: 'ZW01-03-02' }
|
||||
]
|
||||
return res
|
||||
}
|
||||
|
||||
export default {
|
||||
add, edit, del, getDevice, getMaterial,
|
||||
getProduceStatus, importExcel, queryTask, querAllTask,
|
||||
callMaterial, finish, queryIdDevice, popSeek, queryOne, saveOrder, forceFinish, materialBack, queryIvtByPscn, emptyVehicleBack
|
||||
regionList, regionPoints, regionOrder, getMaterListByOrder, callMater, callEmp, sendMater
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属车间">
|
||||
<el-form-item label="所属车间" v-if="false">
|
||||
<el-select
|
||||
v-model="query.workshop_code"
|
||||
clearable
|
||||
@@ -36,6 +36,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型">
|
||||
<el-select
|
||||
style="width: 230px;"
|
||||
v-model="query.region_code"
|
||||
clearable
|
||||
filterable
|
||||
@@ -245,7 +246,7 @@
|
||||
<!--表格渲染-->
|
||||
<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 prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
|
||||
<el-table-column v-if="false" prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
||||
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
|
||||
|
||||
@@ -180,13 +180,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="提示信息" :min-width="flexWidth('remark',crud.data,'提示信息')" />
|
||||
<el-table-column prop="config_code" label="配置编码" :min-width="flexWidth('config_code',crud.data,'配置编码')" />
|
||||
<el-table-column prop="point_code1" label="起点" :min-width="flexWidth('point_code1',crud.data,'点位1')" />
|
||||
<el-table-column prop="point_code2" label="终点" :min-width="flexWidth('point_code2',crud.data,'点位2')" />
|
||||
<!-- <el-table-column prop="point_code3" label="起点2" :min-width="flexWidth('point_code3',crud.data,'点位3')" />-->
|
||||
<!-- <el-table-column prop="point_code4" label="终点2" :min-width="flexWidth('point_code4',crud.data,'点位4')" />-->
|
||||
<el-table-column prop="point_code1" label="点位1" :min-width="flexWidth('point_code1',crud.data,'点位1')" />
|
||||
<el-table-column prop="point_code2" label="点位2" :min-width="flexWidth('point_code2',crud.data,'点位2')" />
|
||||
<el-table-column prop="point_code3" label="点位3" :min-width="flexWidth('point_code3',crud.data,'点位3')" />
|
||||
<el-table-column prop="point_code4" label="点位4" :min-width="flexWidth('point_code4',crud.data,'点位4')" />
|
||||
<!-- <el-table-column prop="start_wait_point" label="取货等待点" :min-width="flexWidth('start_wait_point',crud.data,'取货等待点')" />-->
|
||||
<el-table-column prop="next_wait_point" label="放货等待点" :min-width="flexWidth('next_wait_point',crud.data,'放货等待点')" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)">
|
||||
<el-table-column v-if="false" prop="next_wait_point" label="放货等待点" :min-width="flexWidth('next_wait_point',crud.data,'放货等待点')" />
|
||||
<el-table-column v-if="false" prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
@@ -198,7 +198,7 @@
|
||||
<el-table-column prop="car_no" label="车号" :min-width="flexWidth('car_no',crud.data,'车号')" />
|
||||
<el-table-column v-if="false" prop="task_group_id" label="任务组标识" :min-width="flexWidth('task_group_id',crud.data,'任务组标识')" />
|
||||
<el-table-column v-if="false" prop="task_group_seq" label="任务组顺序号" :min-width="flexWidth('task_group_seq',crud.data,'任务组顺序号')" />
|
||||
<el-table-column prop="finished_type" label="任务完成类型" :min-width="flexWidth('finished_type',crud.data,'任务完成类型')">
|
||||
<el-table-column v-if="false" prop="finished_type" label="任务完成类型" :min-width="flexWidth('finished_type',crud.data,'任务完成类型')">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.finished_type[scope.row.finished_type]?dict.label.finished_type[scope.row.finished_type]:'未完成' }}
|
||||
</template>
|
||||
@@ -208,7 +208,7 @@
|
||||
{{ dict.label.create_mode[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="request_param" label="生成任务的请求参数" :min-width="100" show-overflow-tooltip />
|
||||
<el-table-column v-if="false" prop="request_param" label="生成任务的请求参数" :min-width="100" show-overflow-tooltip />
|
||||
<el-table-column v-if="false" prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
|
||||
Reference in New Issue
Block a user