Browse Source

fix: connector上下层取货放货顺序优化,添加点位页面修改锁功能

master
yanps 3 weeks ago
parent
commit
51cad1bd9d
  1. 52
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/plc_to_agv/PlcToAgvDeviceDriver.java
  2. 399
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java
  3. 113
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/saconfig/CorsFilter.java
  4. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  5. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java
  6. 63
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java
  7. 9
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/sorting/service/impl/WmsToSortingService.java
  8. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java
  9. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml
  10. 13
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java
  11. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/CNTTask.java
  12. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/BlankingTask.java
  13. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/CallEmptyTask.java
  14. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/EmptyCageTask.java
  15. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/MtTask.java
  16. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/RackTask.java
  17. 17
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/ProcessingSMTTask.java
  18. 2
      lms/nladmin-ui/public/config.js
  19. 37
      lms/nladmin-ui/src/views/wms/sch/point/index.vue
  20. 2
      lms/nladmin-ui/vue.config.js

52
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/basedriver/plc_to_agv/PlcToAgvDeviceDriver.java

@ -120,32 +120,6 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
last_heartbeat = heartbeat;
}
/**
* 多个信号一起下发电气
*
* @param map
*/
public void writing(Map<String, Object> map) throws Exception {
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
Map<String, Object> itemMap = new LinkedHashMap<>();
map.forEach((key, value) -> {
if (ObjectUtil.isNotEmpty(value)) {
itemMap.put(getToParam() + key, value);
}
});
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
logDto.setLog_level(3);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
public void writing(String param, String value) {
if (!"heartbeat".equals(param)) {
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
@ -199,6 +173,32 @@ public class PlcToAgvDeviceDriver extends AbstractOpcDeviceDriver implements Dev
}
public void writing(Map<String, Object> map) {
if (!"heartbeat".equals(map.get("heartbeat"))) {
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
Map<String, Object> itemMap = new LinkedHashMap<>();
map.forEach((key, value) -> {
if (ObjectUtil.isNotEmpty(value)) {
itemMap.put(getToParam() + key, value);
}
});
if (ObjectUtil.isNotEmpty(itemMap)) {
try {
this.checkcontrol(itemMap);
} catch (Exception e) {
e.printStackTrace();
}
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
logDto.setLog_level(3);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
}
public String getToParam() {
return this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() + ".";
}

399
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/driver/AbstractOpcDeviceDriver.java

@ -1,6 +1,5 @@
package org.nl.acs.device_driver.driver;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.opc.*;
import org.nl.acs.udw.UnifiedDataAccessor;
import org.nl.acs.udw.UnifiedDataAccessorFactory;
@ -12,164 +11,296 @@ import org.openscada.opc.lib.da.ItemState;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
@Slf4j
public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements OpcDeviceDriver {
UnifiedDataAccessor opcUdw;
private OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService.class);
public AbstractOpcDeviceDriver() {
this.opcUdw = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key);
}
private Date sendTime;
private String last_items;
private int noLog_sendTimeOut;
private Date noLog_sendTime;
private String noLog_last_items;
@Override
public UnifiedDataAccessor getOpcValueAccessor() {
return this.opcUdw;
}
public void checkcontrol(Map<String, Object> itemValues) throws Exception {
Group group = opcServerService.getServer(this.getOpcServer());
Map<String, Object> write = new HashMap();
Map<String, Item> readitems = new LinkedHashMap();
List<String> itemsString = new ArrayList();
itemsString = new ArrayList<> (itemValues.keySet());
Iterator is = itemsString.iterator();
while (is.hasNext()) {
String string = (String) is.next();
try {
readitems.put(string, group.addItem(string));
} catch (Exception e) {
e.printStackTrace();
}
UnifiedDataAccessor opcUdw;
private OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService.class);
public AbstractOpcDeviceDriver() {
this.opcUdw = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key);
}
private Date sendTime;
private String last_items;
private int noLog_sendTimeOut;
private Date noLog_sendTime;
private String noLog_last_items;
@Override
public UnifiedDataAccessor getOpcValueAccessor() {
return this.opcUdw;
}
int i = 0;
while(true) {
//下发信号
control( itemValues);
Map<String, Object> read = new HashMap();
Map<Item, ItemState> itemStatus = group.read(true, (Item[])readitems.values().toArray(new Item[0]));
Set<Item> items = itemStatus.keySet();
Iterator var15 = items.iterator();
while(var15.hasNext()) {
Item item = (Item)var15.next();
ItemState itemState = (ItemState)itemStatus.get(item);
Object value = OpcUtl.getValue(item, itemState);
read.put(item.getId(), value);
}
boolean check = true;
Iterator var24 = itemsString.iterator();
while(var24.hasNext()) {
String itemString = (String)var24.next();
if (!ObjectUtl.isEquals(itemValues.get(itemString), JsonUtl.parse(read.get(itemString)))) {
check = false;
public void checkcontrol(Map<String, Object> itemValues) throws Exception {
CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> {
try {
Group group = opcServerService.getServer(this.getOpcServer());
Map<String, Object> write = new HashMap();
Map<String, Item> readitems = new LinkedHashMap();
List<String> itemsString = new ArrayList();
itemsString = new ArrayList<>(itemValues.keySet());
Iterator is = itemsString.iterator();
while (is.hasNext()) {
String string = (String) is.next();
try {
readitems.put(string, group.addItem(string));
} catch (Exception e) {
e.printStackTrace();
}
}
int i = 0;
while (true) {
//下发信号
try {
if (i == 0) {
control(itemValues);
} else {
controlByNewConn(itemValues);
}
} catch (Exception e) {
e.printStackTrace();
}
Map<String, Object> read = new HashMap();
Map<Item, ItemState> itemStatus = null;
boolean check = true;
try {
if (i > 0) {
group = opcServerService.getServer(this.getOpcServer());
itemsString = new ArrayList<>(itemValues.keySet());
Iterator nis = itemsString.iterator();
while (nis.hasNext()) {
String string = (String) nis.next();
try {
readitems.put(string, group.addItem(string));
} catch (Exception e) {
e.printStackTrace();
}
}
itemStatus = group.read(true, (Item[]) readitems.values().toArray(new Item[0]));
} else {
itemStatus = group.read(true, (Item[]) readitems.values().toArray(new Item[0]));
}
Set<Item> items = itemStatus.keySet();
Iterator var15 = items.iterator();
while (var15.hasNext()) {
Item item = (Item) var15.next();
ItemState itemState = (ItemState) itemStatus.get(item);
Object value = OpcUtl.getValue(item, itemState);
read.put(item.getId(), value);
}
Iterator var24 = itemsString.iterator();
while (var24.hasNext()) {
String itemString = (String) var24.next();
if (!ObjectUtl.isEquals(String.valueOf(itemValues.get(itemString)), String.valueOf(read.get(itemString)))) {
check = false;
}
}
} catch (Exception e) {
e.printStackTrace();
check = false;
}
if (check) {
return "";
}
if (i > 0) {
ThreadUtl.sleep(100L);
}
if (i >= 3) {
// log.info("写入次数超过3次而失败");
throw new RuntimeException("写入次数超过3次而失败");
}
++i;
}
} catch (Exception e) {
Thread.currentThread().interrupt();
throw new IllegalStateException("Interrupted", e);
}
});
try {
String result = future.get(2, TimeUnit.SECONDS); // 设置超时时间为2秒
System.out.println(result);
} catch (CompletionException e) {
Throwable cause = e.getCause();
if (cause instanceof TimeoutException) {
System.out.println("Operation timed out");
} else {
throw e; // rethrow other exceptions
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
if (check) {
return;
}
if (i > 0) {
ThreadUtl.sleep(300L);
}
if (i > 3) {
throw new RuntimeException("写入次数超过3次而失败");
}
++i;
}
}
public boolean control(Map<String, Object> itemValues) {
public boolean controlByNewConn (Map < String, Object > itemValues){
Iterator<Map.Entry<String, Object>> it = itemValues.entrySet().iterator();
Iterator<Map.Entry<String, Object>> it = itemValues.entrySet().iterator();
ItemValue[] p2;
p2 = new ItemValue[itemValues.size()];
int i = 0;
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
System.out.println("即将写入值:" + entry.getKey() + ":" + entry.getValue());
p2[i] = new ItemValue();
p2[i].setItem_code(entry.getKey());
p2[i].setItem_value(entry.getValue());
i++;
}
ItemValue p2[];
p2 = new ItemValue[itemValues.size()];
int i=0;
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
log.info("即将写入值:"+entry.getKey() + ":" + entry.getValue());
p2[i] = new ItemValue();
p2[i].setItem_code(entry.getKey());
p2[i].setItem_value(entry.getValue());
i++;
return this.controlByNewConn(p2);
}
return this.control(p2);
}
public boolean control(ItemValue[] itemValues) {
if (itemValues != null && itemValues.length != 0) {
String this_items = JsonUtl.parseWithoutException(itemValues);
boolean need_write = false;
StringBuilder sb = new StringBuilder();
ItemValue[] var5 = itemValues;
int var6 = itemValues.length;
for (int var7 = 0; var7 < var6; ++var7) {
ItemValue itemValue = var5[var7];
String code = itemValue.getItem_code();
Object udw_value = this.getUdwValue(code);
Object write_value = itemValue.getItem_value();
sb.append(code);
sb.append(":");
sb.append(JsonUtl.parseWithoutException(udw_value));
sb.append(";");
if (!need_write && !UnifiedDataAppService.isEquals(udw_value, write_value)) {
need_write = true;
} else {
log.info("下发信号点位{} 当前写入值:{} 与系统内存值:{} 相同,不再写入 ", code, write_value, udw_value );
public boolean control (Map < String, Object > itemValues){
Iterator<Map.Entry<String, Object>> it = itemValues.entrySet().iterator();
ItemValue[] p2;
p2 = new ItemValue[itemValues.size()];
int i = 0;
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
System.out.println("即将写入值:" + entry.getKey() + ":" + entry.getValue());
p2[i] = new ItemValue();
p2[i].setItem_code(entry.getKey());
p2[i].setItem_value(entry.getValue());
i++;
}
}
// need_write = true;
if (need_write) {
Date date = new Date();
return this.control(p2);
}
public boolean control (ItemValue[]itemValues){
if (itemValues != null && itemValues.length != 0) {
String this_items = JsonUtl.parseWithoutException(itemValues);
boolean need_write = false;
StringBuilder sb = new StringBuilder();
ItemValue[] var5 = itemValues;
int var6 = itemValues.length;
for (int var7 = 0; var7 < var6; ++var7) {
ItemValue itemValue = var5[var7];
String code = itemValue.getItem_code();
Object udw_value = this.getUdwValue(code);
Object write_value = itemValue.getItem_value();
sb.append(code);
sb.append(":");
sb.append(JsonUtl.parseWithoutException(udw_value));
sb.append(";");
if (!need_write && !UnifiedDataAppService.isEquals(udw_value, write_value)) {
need_write = true;
} else {
//log.warn("下发信号点位{} 当前写入值:{} 与系统内存值:{} 相同,不再写入 ", code, write_value, udw_value );
}
}
// need_write = true;
if (need_write) {
Date date = new Date();
/*if (StringUtl.isEqual(this_items, this.last_items) && date.getTime() - this.sendTime.getTime() < (long) WcsConfig.opc_write_repeat_check) {
log.trace("发送时间因为小于{}毫秒,而被无视", WcsConfig.opc_write_repeat_check);
return false;
}*/
this.last_items = this_items;
this.sendTime = date;
this.last_items = this_items;
this.sendTime = date;
/* this.execute_log.setResource(this.getDevice().getCode(), this.getDevice().getName());
this.execute_log.log("原始记录{}->变更为{}", new Object[]{sb, this_items});
OpcServerService opcServerService = OpcServerFactory.getOpcServerService();*/
OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerServiceImpl.class);
OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerServiceImpl.class);
opcServerService.writeInteger(this.getOpcServer(), itemValues);
UnifiedDataAccessor opcValueAccessor = this.getOpcValueAccessor();
ItemValue[] var17 = itemValues;
int var18 = itemValues.length;
opcServerService.writeInteger(this.getOpcServer(), itemValues);
UnifiedDataAccessor opcValueAccessor = this.getOpcValueAccessor();
ItemValue[] var17 = itemValues;
int var18 = itemValues.length;
for (int var19 = 0; var19 < var18; ++var19) {
ItemValue itemValue = var17[var19];
String code = itemValue.getItem_code();
Object value = itemValue.getItem_value();
opcValueAccessor.setValue(code, value);
for (int var19 = 0; var19 < var18; ++var19) {
ItemValue itemValue = var17[var19];
String code = itemValue.getItem_code();
Object value = itemValue.getItem_value();
opcValueAccessor.setValue(code, value);
}
}
return true;
} else {
throw new RuntimeException("下发 无内容");
}
}
}
public boolean controlByNewConn (ItemValue[]itemValues){
if (itemValues != null && itemValues.length != 0) {
String this_items = JsonUtl.parseWithoutException(itemValues);
boolean need_write = false;
StringBuilder sb = new StringBuilder();
ItemValue[] var5 = itemValues;
int var6 = itemValues.length;
// for (int var7 = 0; var7 < var6; ++var7) {
// ItemValue itemValue = var5[var7];
// String code = itemValue.getItem_code();
// Object udw_value = this.getUdwValue(code);
// Object write_value = itemValue.getItem_value();
// sb.append(code);
// sb.append(":");
// sb.append(JsonUtl.parseWithoutException(udw_value));
// sb.append(";");
// if (!need_write && !UnifiedDataAppService.isEquals(udw_value, write_value)) {
// need_write = true;
// } else {
// log.warn("下发信号点位{} 当前写入值:{} 与系统内存值:{} 相同,不再写入 ", code, write_value, udw_value );
// }
// }
need_write = true;
if (need_write) {
Date date = new Date();
/*if (StringUtl.isEqual(this_items, this.last_items) && date.getTime() - this.sendTime.getTime() < (long) WcsConfig.opc_write_repeat_check) {
log.trace("发送时间因为小于{}毫秒,而被无视", WcsConfig.opc_write_repeat_check);
return false;
}*/
this.last_items = this_items;
this.sendTime = date;
OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerServiceImpl.class);
opcServerService.writeIntegerByNewConn(this.getOpcServer(), itemValues);
return true;
} else {
throw new RuntimeException("下发 无内容");
UnifiedDataAccessor opcValueAccessor = this.getOpcValueAccessor();
ItemValue[] var17 = itemValues;
int var18 = itemValues.length;
for (int var19 = 0; var19 < var18; ++var19) {
ItemValue itemValue = var17[var19];
String code = itemValue.getItem_code();
Object value = itemValue.getItem_value();
opcValueAccessor.setValue(code, value);
}
}
return true;
} else {
throw new RuntimeException("下发 无内容");
}
}
}
}

113
lms/nladmin-system/nlsso-server/src/main/java/org/nl/config/saconfig/CorsFilter.java

@ -1,56 +1,57 @@
//package org.nl.config.saconfig;
//
//import org.springframework.core.annotation.Order;
//import org.springframework.stereotype.Component;
//import org.springframework.web.cors.CorsConfiguration;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
///**
// * 跨域过滤器
// * @author kong
// */
//@Component
//@Order(-200)
//public class CorsFilter implements Filter {
//
// static final String OPTIONS = "OPTIONS";
//
// @Override
// public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
// throws IOException, ServletException {
// HttpServletRequest request = (HttpServletRequest) req;
// HttpServletResponse response = (HttpServletResponse) res;
// // 允许指定域访问跨域资源
// response.setHeader("Access-Control-Allow-Origin", "*");
// // 允许所有请求方式
// response.setHeader("Access-Control-Allow-Methods", "*");
// // 有效时间
// response.setHeader("Access-Control-Max-Age", "3600");
// // 允许的header参数
// response.setHeader("Access-Control-Allow-Headers", "*");
// response.setHeader("Access-Control-Allow-Credentials", "true");
//
// // 如果是预检请求,直接返回
// if (OPTIONS.equals(request.getMethod())) {
// System.out.println("=======================浏览器发来了OPTIONS预检请求==========");
// response.getWriter().print("");
// return;
// }
//
// // System.out.println("*********************************过滤器被使用**************************");
// chain.doFilter(req, res);
// }
//
// @Override
// public void init(FilterConfig filterConfig) {
// }
//
// @Override
// public void destroy() {
// }
//
//}
/*
package org.nl.config.saconfig;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.cors.CorsConfiguration;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
*/
/**
* 跨域过滤器
* @author kong
*//*
@Component
@Order(-200)
public class CorsFilter implements Filter {
static final String OPTIONS = "OPTIONS";
@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
// 允许指定域访问跨域资源
response.setHeader("Access-Control-Allow-Origin", "*");
// 允许所有请求方式
response.setHeader("Access-Control-Allow-Methods", "*");
// 有效时间
response.setHeader("Access-Control-Max-Age", "3600");
// 允许的header参数
response.setHeader("Access-Control-Allow-Headers", "*");
response.setHeader("Access-Control-Allow-Credentials", "true");
// 如果是预检请求,直接返回
if (OPTIONS.equals(request.getMethod())) {
System.out.println("=======================浏览器发来了OPTIONS预检请求==========");
response.getWriter().print("");
return;
}
// System.out.println("*********************************过滤器被使用**************************");
chain.doFilter(req, res);
}
@Override
public void destroy() {
}
}
*/

11
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -516,8 +516,15 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
schBaseVehiclematerialgroup.setOrder_code(connectorDto.getProductionOrder());
schBaseVehiclematerialgroup.setCreate_name("Connector");
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
taskService.update(Wrappers.lambdaUpdate(SchBaseTask.class).eq(SchBaseTask::getTask_code, schBaseTask.getTask_code())
.set(SchBaseTask::getJob_name, connectorDto.getJobname()));
if ("Y".equals(connectorDto.getFinished())) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("cJobName",connectorDto.getJobname());
try {
sortingService.applyFinishJobName(jsonObject);
}catch (Exception e){
log.info("wms反馈sorting->JobName完成,失败{}",e.getMessage());
}
}
}
} else {
throw new BadRequestException("LMS向Connector请求取货");

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java

@ -116,7 +116,6 @@ public class FabServiceImpl {
callEmptyTask.apply(param);
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, callEmpVo.getDevice_code())
.set(SchBasePoint::getPoint_status, GoodsEnum.EMPTY_PALLETS.getValue())
.set(SchBasePoint::getIs_lock, true));
break;
case "smt":

63
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java

@ -1,6 +1,5 @@
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;
@ -10,7 +9,6 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import nl.basjes.shaded.org.springframework.util.Assert;
import org.nl.common.enums.GoodsEnum;
import org.nl.common.enums.VehicleEnum;
import org.nl.common.enums.VehicleTypeEnum;
import org.nl.common.enums.region.RegionEnum;
import org.nl.common.exception.BadRequestException;
@ -25,7 +23,6 @@ import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.ext.connector.service.WmsToConnectorService;
import org.nl.wms.ext.handheld.handheldEnum.RouteEnum;
import org.nl.wms.ext.handheld.service.HandheldService;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
@ -44,6 +41,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
/**
* @author LENOVO
@ -248,10 +247,10 @@ public class HandheldServiceImpl implements HandheldService {
Assert.noNullElements(new Object[]{param.getString("device_code"), param.getString("vehicle_code")},
"当前点位或目的地不能为空!");
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(param.getString("device_code"));
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
/*if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
if (schBasePoint.getIs_lock()) {
throw new BadRequestException("该点位正在执行任务,请稍后再试!");
}
}*/
String region_code = param.getString("region_code");
String device_code = param.getString("device_code");
String vehicle_code = param.getString("vehicle_code");
@ -329,10 +328,9 @@ public class HandheldServiceImpl implements HandheldService {
if (material_code) {
((LinkedHashMap) material2).remove("material_code");
}
String replace = StrUtil.replace(StrUtil.toString(material2), "=", ":");
JSONObject jsonObject = JSONObject.parseObject(replace);
map.put("order_code", jsonObject.getString("order_code"));
map.put("qty", jsonObject.getString("material_qty"));
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material2);
map.put("order_code", jsonObject.get("order_code"));
map.put("qty", jsonObject.get("material_qty"));
jsonArray.add(map);
});
json.put("vehicle_code", vehicle_code);
@ -341,16 +339,21 @@ public class HandheldServiceImpl implements HandheldService {
JSONObject json1 = wmsToConnectorService.applyRegionAndDueDate(json);
if (ObjectUtil.isNotEmpty(json1) && json1.getInteger("status") == 200) {
JSONArray date = json1.getJSONArray("data");
date.stream().forEach(date1 -> {
JSONObject json2 = JSONObject.parseObject(StrUtil.toString(date1));
materials.stream().forEach(material -> {
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
JSONObject jsonObject = JSONObject.parseObject(replace);
if (jsonObject.getString("order_code").equals(json2.getString("order_code"))) {
jsonObject.put("due_date", json2.getString("due_date"));
jsonObject.put("region_code", json2.getString("next_region_code"));
}
});
date.stream().map(date1 -> JSONObject.parseObject(StrUtil.toString(date1))).forEach(json2 -> {
List<cn.hutool.json.JSONObject> updatedMaterials = materials.stream()
.map(material -> {
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material);
if (jsonObject.get("order_code").equals(json2.getString("order_code"))) {
jsonObject.putOpt("due_date", json2.getString("due_date"));
jsonObject.putOpt("region_code", json2.getString("next_region_code"));
return jsonObject; // 更新的对象
} else {
return jsonObject; // 其他对象保持不变
}
})
.collect(Collectors.toList());
materials.clear();
materials.addAll(updatedMaterials);
});
region_code = JSONObject.parseObject(StrUtil.toString(date.get(0))).getString("region_code");
jo.put("region_code", region_code);
@ -373,25 +376,15 @@ public class HandheldServiceImpl implements HandheldService {
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code));
String finalRegion_code = region_code;
materials.stream().forEach(material -> {
String replace = StrUtil.replace(StrUtil.toString(material), "=", ":");
replace = replace.replaceAll("material_code:,", "");
// 使用 Hutool 的 JSONUtil 解析 JSON 字符串
cn.hutool.json.JSONObject jsonObject1 = JSONUtil.parseObj(replace);
// 判断 material_code 是否为空
if (replace.contains("OR")) {
Object materialCode = jsonObject1.get("order_code");
jsonObject1.put("order_code", materialCode.toString());
replace = jsonObject1.toString();
}
JSONObject jsonObject = JSONObject.parseObject(replace);
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material);
SchBaseVehiclematerialgroup schBaseVehiclematerialgroup = new SchBaseVehiclematerialgroup();
schBaseVehiclematerialgroup.setVehicle_code(vehicle_code);
schBaseVehiclematerialgroup.setMaterial_qty(jsonObject.getInteger("material_qty"));
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getString("material_code"));
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getString("order_code"));
schBaseVehiclematerialgroup.setDue_date(jsonObject.getString("due_date"));
schBaseVehiclematerialgroup.setMaterial_qty(jsonObject.getInt("material_qty"));
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getStr("material_code"));
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getStr("order_code"));
schBaseVehiclematerialgroup.setDue_date(jsonObject.getStr("due_date"));
schBaseVehiclematerialgroup.setCreate_name(SecurityUtils.getCurrentNickName());
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getString("region_code") : finalRegion_code);
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getStr("region_code") : finalRegion_code);
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
}

9
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/sorting/service/impl/WmsToSortingService.java

@ -28,4 +28,13 @@ public class WmsToSortingService {
AcsResponse acsResponse = ConnectorUtil.notifyEextSystem("api/external/wms/agv", json, GeneralDefinition.SORTING_URL);
return acsResponse;
}
/**
* 反馈Sorting jobname完成
* @param json
*/
public void applyFinishJobName(JSONObject json) {
AcsResponse acsResponse = ConnectorUtil.notifyEextSystem("api/external/jobif/updatejobstatus", json, GeneralDefinition.SORTING_URL);
}
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java

@ -158,7 +158,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
* @param vehicle_type
* @return
*/
SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq);
SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq,int point_type);
/**

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml

@ -18,6 +18,7 @@
WHERE p.point_code = #{id}
FOR UPDATE
</select>
<select id="getStructList" resultType="org.nl.wms.ext.fab.service.dto.OrderMater">
SELECT
sch_base_point.point_code,
@ -46,11 +47,13 @@
AND sch_base_vehiclematerialgroup.region_code = #{region_code}
</select>
<select id="selectByRegionCode" resultType="java.lang.String">
select sbp.point_code
from sch_base_point sbp
where sbp.region_code = #{region_code}
</select>
<select id="selectJobDevice" resultType="java.util.Map">
select sbp.point_code, sbp.point_name
from sch_base_point sbp
@ -58,6 +61,7 @@
and region_code = 'GZQ'
and region_points is not null
</select>
<select id="selectPointByRegion" resultType="com.alibaba.fastjson.JSONObject"
parameterType="java.lang.String">
select point_code, point_name, point_status
@ -65,4 +69,5 @@
where region_code = #{regionCode}
and point_type is null
</select>
</mapper>

13
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

@ -269,8 +269,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
pointMapper.updateById(schBasePoint);
return schBasePoint;
}
SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("不存在该区域!");
/*SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0);
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("不存在该区域!");*/
//分配载具类型相同的站点
List<SchBasePoint> schBasePoints1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
@ -280,7 +280,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
if (CollUtil.isNotEmpty(schBasePoints1) && schBasePoints1.size() > 0) {
schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));
/*schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq())));*/
SchBasePoint schBasePoint = schBasePoints1.get(0);
schBasePoint.setIs_lock(true);
PointUtils.setUpdateByAcs(schBasePoint);
@ -389,13 +389,13 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
}
@Override
public SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq) {
public SchBasePoint selectByGroundPoint(String region_code, String pointStatus, String vehicle_type, int seq,int point_type) {
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
.eq(SchBasePoint::getIs_lock, false)
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, pointStatus)
.eq(!vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "1")
.eq(vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "0")
.eq(vehicle_type.equals("G01"), SchBasePoint::getPoint_type,point_type )
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type)
.isNull(seq == 2, SchBasePoint::getVehicles)
.isNull(seq == 1, SchBasePoint::getVehicle_code)
@ -413,7 +413,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.eq(SchBasePoint::getIs_used, true)
.eq(SchBasePoint::getPoint_status, pointStatus)
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type)
.isNotNull(SchBasePoint::getVehicle_code));
.isNotNull(SchBasePoint::getVehicle_code)
.orderByDesc(SchBasePoint::getIn_order_seq));
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
SchBasePoint schBasePoint = schBasePoints.get(0);
schBasePoint.setIs_lock(true);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/CNTTask.java

@ -83,7 +83,7 @@ public class CNTTask extends AbstractTask {
task.setVehicle_type(schBasePoint.getCan_vehicle_type());
task.setRemark("");
task.setTask_status(TaskStatus.CREATED.getCode());
if (task.getPoint_code1().endsWith("1")) {
if (task.getPoint_code1().endsWith("1") || task.getPoint_code1().endsWith("3")) {
task.setAcs_trace_id("4");
}
taskService.updateById(task);

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/BlankingTask.java

@ -67,10 +67,10 @@ public class BlankingTask extends AbstractTask {
SchBasePoint schBasePoint = null;
if (ObjectUtil.isEmpty(task.getRegion_code())) {
schBasePoint = schBasePointService.selectByGroundPoint(null,
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1);
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1,1);
} else {
schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1);
GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1,1);
}
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/CallEmptyTask.java

@ -63,7 +63,8 @@ public class CallEmptyTask extends AbstractTask {
NoticeTypeEnum.WARN.getCode());
continue;
}
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(), GoodsEnum.OUT_OF_STOCK.getValue(), mdBaseVehicle.getVehicle_type(), 1);
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(task.getRegion_code(), GoodsEnum.OUT_OF_STOCK.getValue()
, mdBaseVehicle.getVehicle_type(), 1,1);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/EmptyCageTask.java

@ -75,22 +75,22 @@ public class EmptyCageTask extends AbstractTask {
case "R01":
//RO1空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R01.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R01.getVehicleCode(), 2,1);
break;
case "R02":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R02.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.FRAME_R02.getVehicleCode(), 2,1);
break;
case "S04":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S04.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S04.getVehicleCode(), 2,1);
break;
case "S06":
//RO2空料容
schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.DDLK.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S06.getVehicleCode(), 2);
GoodsEnum.OUT_OF_STOCK.getValue(), VehicleTypeEnum.RACKS_S06.getVehicleCode(), 2,1);
break;
default:
break;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/MtTask.java

@ -58,7 +58,7 @@ public class MtTask extends AbstractTask {
for (SchBaseTask task : tasks) {
String vehicle_type = task.getVehicle_type();
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.NBJG.getRegion_code(),
GoodsEnum.OUT_OF_STOCK.getValue(), null, 2);
GoodsEnum.OUT_OF_STOCK.getValue(), null, 2,1);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/handheld/RackTask.java

@ -68,7 +68,7 @@ public class RackTask extends AbstractTask {
regionCode = RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code();
}
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(regionCode,
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1);
GoodsEnum.OUT_OF_STOCK.getValue(), vehicle_type, 1,0);
if (ObjectUtil.isEmpty(schBasePoint)) {
task.setRemark("未找到所需点位!");
taskService.updateById(task);

17
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/ProcessingSMTTask.java

@ -10,6 +10,8 @@ import org.nl.common.enums.GoodsEnum;
import org.nl.common.enums.wms.PointStatusEnum;
import org.nl.common.exception.BadRequestException;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
import org.nl.wms.ext.fab.service.dto.SendMaterVo;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
@ -52,6 +54,8 @@ public class ProcessingSMTTask extends AbstractTask {
private ISchBasePointService schBasePointService;
@Autowired
private ISchBaseVehiclematerialgroupService schBaseVehiclematerialgroupService;
@Autowired
private IMdBaseVehicleService mdBaseVehicleService;
@Override
protected void create() throws BadRequestException {
@ -134,7 +138,6 @@ public class ProcessingSMTTask extends AbstractTask {
SchBasePoint schBasePoint = pointService.selectByPointCode(startPoint);
// 起点清空
if (ObjectUtil.isNotEmpty(schBasePoint)) {
PointUtils.updateByIngTaskCode(schBasePoint);
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, startPoint)
.set(SchBasePoint::getVehicle_code, null)
@ -144,11 +147,19 @@ public class ProcessingSMTTask extends AbstractTask {
String point_code2 = taskObj.getPoint_code2();
SchBasePoint schBasePoint2 = pointService.selectByPointCode(point_code2);
if (ObjectUtil.isNotEmpty(schBasePoint2)) {
PointUtils.updateByIngTaskCode(schBasePoint2);
String point_status = GoodsEnum.IN_STOCK.getValue();
Boolean point_type = false;
if (point_code2.contains("NBJGKLLDJW")) {
point_status = GoodsEnum.EMPTY_PALLETS.getValue();
point_type = true;
}
MdBaseVehicle mdBaseVehicle = mdBaseVehicleService.selectByVehicleCode(taskObj.getVehicle_code());
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, point_code2)
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, GoodsEnum.IN_STOCK.getValue())
.set(point_type, SchBasePoint::getCan_vehicle_type, mdBaseVehicle.getVehicle_type())
.set(point_type, SchBasePoint::getIn_order_seq, 5)
.set(SchBasePoint::getPoint_status, point_status)
.set(SchBasePoint::getIs_lock, false));
}
// 任务完成

2
lms/nladmin-ui/public/config.js

@ -3,7 +3,7 @@ window.g = {
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
},
prod: {
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
VUE_APP_BASE_API: 'http://192.168.101.1:8010'
}
}

37
lms/nladmin-ui/src/views/wms/sch/point/index.vue

@ -101,7 +101,7 @@
@change="hand"
/>
</el-form-item>
<el-form-item label="锁定类型">
<el-form-item label="是否锁定">
<el-switch
v-model="query.lock_type"
:active-value="true"
@ -228,11 +228,25 @@
<el-form-item label="父类编码" prop="vehicle_code">
<el-input v-model="form.parent_point_code" clearable style="width: 370px;" @focus="getParentPoint" />
</el-form-item>
<el-form-item v-if="form.point_status !== '0'" label="载具编码" prop="vehicle_code">
<el-form-item label="载具编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
</el-form-item>
<el-form-item v-if="form.point_status !== '0'" label="允许载具类型" prop="vehicle_type">
<el-input v-model="form.vehicle_type" clearable style="width: 370px;" />
<el-form-item label="允许载具类型" prop="can_vehicle_type">
<el-select
v-model="form.can_vehicle_type"
size="mini"
placeholder="允许载具类型"
class="filter-item"
style="width: 370px;"
>
<el-option
v-for="item in dict.can_vehicle_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-input v-model="form.can_vehicle_type" clearable style="width: 370px;" /> -->
</el-form-item>
<!-- <el-form-item label="可放载具类型" prop="can_vehicle_types">
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
@ -263,11 +277,11 @@
/>
</el-select>
</el-form-item>
<el-form-item label="是否有工单">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_has_workder" :label="item.value">{{ item.label }}</el-radio>
<el-form-item label="是否锁定">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_lock" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="是否自动">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_auto" :label="item.value">{{ item.label }}</el-radio>
<el-form-item label="是否启用">
<el-radio v-for="item in dict.TrueOrFalse" :key="item.id" v-model="form.is_used" :label="item.value">{{ item.label }}</el-radio>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" style="width: 370px;" rows="2" type="textarea" />
@ -397,11 +411,12 @@ const defaultForm = {
is_auto: 'true',
remark: null,
is_used: 'true',
is_lock: 'true',
can_vehicle_types: null
}
export default {
name: 'SchBasePoint',
dicts: ['vehicle_type', 'TrueOrFalse'],
dicts: ['vehicle_type', 'TrueOrFalse', 'can_vehicle_type'],
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@ -483,8 +498,8 @@ export default {
return true
},
[CRUD.HOOK.beforeToCU]() {
this.form.is_has_workder = this.form.is_has_workder.toString()
this.form.is_auto = this.form.is_auto.toString()
this.form.is_lock = this.form.is_lock.toString()
this.form.is_used = this.form.is_used.toString()
},
[CRUD.HOOK.afterToCU]() {
if (this.form.region_code) {

2
lms/nladmin-ui/vue.config.js

@ -19,6 +19,8 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
allowedHosts: ['all'],
disableHostCheck: true,
port: port,
open: false,
overlay: {

Loading…
Cancel
Save