Browse Source

rev:页面优化

master2
刘先源 1 month ago
parent
commit
8eaf155dd6
  1. 31
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/XgAgvEnum.java
  2. 6
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/rest/XianGongAgvController.java
  3. 17
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/AgvWaitUtil.java
  4. 11
      acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java
  5. BIN
      acs2/nladmin-ui/public/favicon.ico
  6. BIN
      acs2/nladmin-ui/src/assets/images/noblelift.png
  7. 4
      acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue
  8. 2
      acs2/nladmin-ui/src/views/login.vue
  9. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/controller/MesToWmsController.java
  10. 2
      lms/nladmin-ui/src/layout/components/Sidebar/Logo.vue
  11. 2
      lms/nladmin-ui/src/views/login.vue

31
acs2/nladmin-system/src/main/java/org/nl/acs/agv/XgAgvEnum.java

@ -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;
}

6
acs2/nladmin-system/src/main/java/org/nl/acs/agv/rest/XianGongAgvController.java

@ -1,13 +1,19 @@
package org.nl.acs.agv.rest; package org.nl.acs.agv.rest;
import cn.dev33.satoken.annotation.SaIgnore; 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 com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.acs.agv.server.XianGongAgvService; 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.logging.annotation.Log;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;

17
acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/AgvWaitUtil.java

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

11
acs2/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java

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

BIN
acs2/nladmin-ui/public/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 622 B

BIN
acs2/nladmin-ui/src/assets/images/noblelift.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

4
acs2/nladmin-ui/src/layout/components/Sidebar/Logo.vue

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

2
acs2/nladmin-ui/src/views/login.vue

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

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/controller/MesToWmsController.java

@ -1,10 +1,15 @@
package org.nl.wms.ext.mes.controller; package org.nl.wms.ext.mes.controller;
import cn.dev33.satoken.annotation.SaIgnore; import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.logging.annotation.Log; import org.nl.common.logging.annotation.Log;
import org.nl.wms.ext.mes.service.MesToWmsService; 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.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* @Author: lyd * @Author: lyd
* @Description: mes请求wms * @Description: mes请求wms

2
lms/nladmin-ui/src/layout/components/Sidebar/Logo.vue

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

2
lms/nladmin-ui/src/views/login.vue

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

Loading…
Cancel
Save