rev:页面优化

This commit is contained in:
2024-10-22 18:30:18 +08:00
parent d60e4e09c3
commit 8eaf155dd6
11 changed files with 64 additions and 18 deletions

View File

@@ -0,0 +1,31 @@
package org.nl.acs.agv;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum XgAgvEnum {
APPLY_GET(1, "申请取货"),
APPLY_GET_SUCCESS(2, "取货完成"),
APPLY_PUT(3, "申请放货"),
APPLY_PUT_SUCCESS(4, "放货完成"),
SSX_MOVE_YES(0, "无货"),
SSX_MOVE_NO(1, "有货"),
SSX_ACTION_NOT_GET_PUT(0,"不允许取放"),
SSX_ACTION_GET(1,"允许取货"),
SSX_ACTION_PUT(2,"允许放货"),
GS_ACTION_YES(1,"允许"),
GS_ACTION_NOT(0,"不允许"),
GS_COMMAND_OUT(0,"离开"),
GS_COMMAND_IN(1,"进入"),
GS_COLOR_GREEN(4,"绿灯"),
GS_COLOR_RED(3,"红灯"),
;
private final int code;
private final String name;
}

View File

@@ -1,13 +1,19 @@
package org.nl.acs.agv.rest;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.unit.DataUnit;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.agv.server.XianGongAgvService;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.logging.annotation.Log;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.agv.XgAgvEnum;
import org.nl.acs.device_driver.basedriver.standard_conveyor_control.StandardCoveyorControlDeviceDriver;
import org.nl.acs.device_driver.sdk.PhotoelectricDetectionDeviceDriver;
import org.nl.acs.log.service.DeviceExecuteLogService;
@@ -44,9 +45,9 @@ public class AgvWaitUtil {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线申请取货-1
driver.writing("toCommand",1);
driver.writing("toCommand",XgAgvEnum.APPLY_GET.getCode());
// 判断是否满足条件action = 1允许取货 && move = 1有货
if (driver.getMove() == 1 && driver.getAction() == 1) {
if (driver.getMove() == XgAgvEnum.SSX_ACTION_GET.getCode() && driver.getAction() == XgAgvEnum.SSX_MOVE_NO.getCode()) {
String message = "允许AGV取货。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
@@ -83,8 +84,8 @@ public class AgvWaitUtil {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线取货完成-2
driver.writing("toCommand",2);
if (driver.getMove() == 0) {
driver.writing("toCommand",XgAgvEnum.APPLY_GET_SUCCESS.getCode());
if (driver.getMove() == XgAgvEnum.SSX_MOVE_YES.getCode()) {
String message = "允许AGV取货后离开。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
@@ -123,9 +124,9 @@ public class AgvWaitUtil {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线申请放货-3
driver.writing("toCommand",3);
driver.writing("toCommand",XgAgvEnum.APPLY_PUT.getCode());
// 判断是否满足条件action = 2允许放货 && move = 0无货
if (driver.getMove() == 0 && driver.getAction() == 2) {
if (driver.getMove() == XgAgvEnum.SSX_MOVE_YES.getCode() && driver.getAction() == XgAgvEnum.SSX_ACTION_PUT.getCode()) {
String message = "允许AGV放货。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);
@@ -170,8 +171,8 @@ public class AgvWaitUtil {
// 标准版输送线驱动
StandardCoveyorControlDeviceDriver driver = (StandardCoveyorControlDeviceDriver) device.getDeviceDriver();
// 通知输送线放货完成-4
driver.writing("toCommand",4);
if (driver.getMove() == 1) {
driver.writing("toCommand",XgAgvEnum.APPLY_PUT_SUCCESS.getCode());
if (driver.getMove() == XgAgvEnum.SSX_MOVE_NO.getCode()) {
String message = "允许AGV放货后离开。";
driver.setMessage(message);
this.deviceExecuteLogService.deviceExecuteLog(deviceCode, "", "", message);

View File

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.agv.AgvUtil;
import org.nl.acs.agv.XgAgvEnum;
import org.nl.acs.agv.server.AgvWaitUtil;
import org.nl.acs.agv.server.XianGongAgvService;
import org.nl.acs.agv.server.dto.AgvDto;
@@ -148,11 +149,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
LampThreecolorDeviceDriver driver = (LampThreecolorDeviceDriver) device.getDeviceDriver();
// 给三色灯写入进入命令0-离开1-进入
String[] key = {"toCommand","toColor"};
Integer[] value = {1,3};
Integer[] value = {XgAgvEnum.GS_COMMAND_IN.getCode(),XgAgvEnum.GS_COLOR_RED.getCode()};
driver.writing(Arrays.asList(key),Arrays.asList(value));
// 判断是否允许进入 1-允许0-不允许
if (driver.getAction() == 1) {
// 判断是否允许进入 1-允许0-不允许 1
if (driver.getAction() == XgAgvEnum.GS_ACTION_YES.getCode()) {
// 记录车号
driver.setCar_no(reqParam.getString("robot_name"));
@@ -187,11 +188,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
LampThreecolorDeviceDriver driver = (LampThreecolorDeviceDriver) device.getDeviceDriver();
// 给三色灯写入进入命令0-离开1-进入
String[] key = {"toCommand","toColor"};
Integer[] value = {0,Integer.parseInt(device.getExtraValue().get("color").toString())};
Integer[] value = {XgAgvEnum.GS_COMMAND_OUT.getCode(),Integer.parseInt(device.getExtraValue().get("color").toString())};
driver.writing(Arrays.asList(key),Arrays.asList(value));
// 判断是否允许离开 1-允许0-不允许
if (driver.getAction() == 1) {
if (driver.getAction() == XgAgvEnum.GS_ACTION_YES.getCode()) {
// 判断是否清楚车号
if (device.getExtraValue().get("is_clean").toString().equals("1")) {
driver.setCar_no("");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -14,7 +14,7 @@
</template>
<script>
import Logo from '@/assets/images/logo.png'
import Logo from '@/assets/images/noblelift.png'
import variables from '@/assets/styles/variables.scss'
export default {
name: 'SidebarLogo',
@@ -26,7 +26,7 @@ export default {
},
data() {
return {
title: '诺力开发平台',
title: '上海开能ACS系统',
logo: Logo,
title_param: 'platform'
}

View File

@@ -50,7 +50,7 @@ export default {
name: 'Login',
data() {
return {
title: '诺力开发平台',
title: '上海开能ACS系统',
title_param: 'platform',
Background: Background,
codeUrl: '',

View File

@@ -1,10 +1,15 @@
package org.nl.wms.ext.mes.controller;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.ext.mes.service.MesToWmsService;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -13,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Author: lyd
* @Description: mes请求wms

View File

@@ -34,7 +34,7 @@ export default {
},
data() {
return {
title: '诺力开发平台',
title: '上海开能LMS系统',
logo: Logo,
title_param: 'platform'
}

View File

@@ -50,7 +50,7 @@ export default {
name: 'Login',
data() {
return {
title: '诺力开发平台',
title: '上海开能LMS系统',
title_param: 'platform',
Background: Background,
codeUrl: '',