Browse Source

add: 添加日志索引,sorting交互优化

master
yanps 2 months ago
parent
commit
f911e55447
  1. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java
  2. 36
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
  3. 17
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  4. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java
  5. 116
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LuceneAppender.java
  6. 23
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LuceneProperties.java
  7. 44
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Property.java
  8. 11
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java
  9. 64
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java
  10. 34
      acs/nladmin-ui/src/api/monitor/Address.js
  11. 1
      acs/nladmin-ui/src/views/lucene/index.vue
  12. 129
      acs/nladmin-ui/src/views/monitor/log/logQuery.vue
  13. 10
      acs/nladmin-ui/src/views/monitor/lucene/index.vue
  14. 3
      acs/nladmin-ui/src/views/monitor/lucene/search.vue
  15. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java
  16. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  17. 10
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/ConnectorToWmsServiceImpl.java
  18. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java
  19. 56
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/handheld/service/impl/HandheldServiceImpl.java
  20. 28
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/sorting/service/impl/SortingServiceImpl.java
  21. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java
  22. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dto/SchBaseVehiclematerialgroupQuery.java
  23. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java
  24. 23
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java
  25. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/GeneralDefinition.java
  26. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/connector/CNTTask.java
  27. 1
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/pcoperation/PcOperationSMTTask.java
  28. 27
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/sorting/SortingSMTTask.java
  29. 8
      lms/nladmin-system/nlsso-server/src/main/resources/log/ConnectorToWmsServiceImpl.xml
  30. 34
      lms/nladmin-system/nlsso-server/src/main/resources/log/SortingToWms.xml
  31. 2
      lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
  32. 23
      lms/nladmin-ui/src/views/wms/sch/group/index.vue
  33. 22
      lms/nladmin-ui/src/views/wms/sch/point/index.vue
  34. 17
      lms/nladmin-ui/src/views/wms/sch/task/index.vue

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java

@ -4,6 +4,7 @@ import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.acs.ext.wms.data.*;
import org.nl.acs.ext.wms.data.feedBackTaskStatus.FeedBackTaskStatusRequest;
public interface AcsToWmsService {
@ -122,7 +123,7 @@ public interface AcsToWmsService {
/**
* ACS向WMS反馈任务状态
*/
String feedTaskStatus(BaseRequest request);
String feedTaskStatus(FeedBackTaskStatusRequest request);
/**
* ACS向WMS反馈任务状态

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

@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -17,10 +18,14 @@ import org.nl.acs.address.service.dto.AddressDto;
import org.nl.acs.device.service.DeviceService;
import org.nl.acs.ext.wms.LmsUtil;
import org.nl.acs.ext.wms.data.*;
import org.nl.acs.ext.wms.data.feedBackTaskStatus.FeedBackTaskStatusRequest;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.config.SpringContextHolder;
import org.nl.system.service.lucene.LuceneExecuteLogService;
import org.nl.system.service.lucene.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,18 +39,16 @@ import org.springframework.stereotype.Service;
public class AcsToWmsServiceImpl implements AcsToWmsService {
@Autowired
ISysParamService paramService;
@Autowired
DeviceService deviceService;
@Autowired
AddressService addressService;
@Autowired
TaskService taskService;
@Autowired
DeviceExecuteLogService logServer;
@Autowired
LuceneExecuteLogService luceneExecuteLogService;
/*@Value("${acsTowms.token}")*/
public String token;
@ -533,18 +536,25 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Override
public HttpResponse feedAgvTaskStatus(JSONObject from) {
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus");
String methods_url = addressDto.getMethods_url();
String url = wmsUrl + methods_url;
HttpResponse result = null;
log.info("feedAgvTaskStatus----请求参数{}", from);
try {
result = HttpRequest.post(url)
.body(String.valueOf(from))
.execute();
System.out.println(result);
LuceneLogDto reqlogDto = LuceneLogDto.builder()
.device_code(from.getString("device_code"))
.task_code(from.getString("task_code"))
.status_code(StrUtil.toString(result.getStatus()))
.requestparam("请求参数:"+ from)
.responseparam("响应参数:"+result.body())
.content(result.body())
.method("feedAgvTaskStatus")
.build();
luceneExecuteLogService.interfaceExecuteLog(reqlogDto);
log.info("feedAgvTaskStatus----返回参数{}", result);
} catch (Exception e) {
String msg = e.getMessage();
@ -568,12 +578,22 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
}
@Override
public String feedTaskStatus(BaseRequest requestParam) {
public String feedTaskStatus(FeedBackTaskStatusRequest requestParam) {
try {
MDC.put(log_file_type, log_type);
String api = addressService.findByCode("feedTaskStatus").getMethods_url();
log.info("feedTaskStatus-----输入参数{}", JSON.toJSONString(requestParam, SerializerFeature.DisableCircularReferenceDetect));
String result = LmsUtil.notifyAcs(api, requestParam);
LuceneLogDto reqlogDto = LuceneLogDto.builder()
.device_code(requestParam.getDevice_code())
.task_id(requestParam.getTask_id())
.status_code(JSONObject.parseObject(result).getString("code"))
.requestparam("请求参数:"+ JSONUtil.toJsonStr(requestParam))
.responseparam("响应参数:"+result)
.content(result)
.method("feedTaskStatus")
.build();
luceneExecuteLogService.interfaceExecuteLog(reqlogDto);
log.info("feedTaskStatus-----输出参数{}", result);
return result;
} finally {

17
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -3,6 +3,7 @@ package org.nl.acs.ext.wms.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@ -36,6 +37,8 @@ import org.nl.acs.storage_cell.service.mapper.StorageCellMapper;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.common.exception.BadRequestException;
import org.nl.system.service.lucene.LuceneExecuteLogService;
import org.nl.system.service.lucene.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
@ -63,6 +66,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
private final StorageCellMapper storageCellMapper;
@Autowired
private DeviceExtraService deviceExtraService;
@Autowired
private LuceneExecuteLogService luceneExecuteLogService;
private String log_file_type = "log_file_type";
private String log_type = "LMS请求ACS";
@ -622,6 +627,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
}
response.setErrArr(errArr);
}
LuceneLogDto reqlogDto = LuceneLogDto.builder()
.status_code(StrUtil.toString(response.getstatus()))
.requestparam("请求参数:"+ JSONUtil.toJsonStr(reqs))
.responseparam("响应参数:"+JSON.toJSONString(response))
.method("crateTask")
.build();
luceneExecuteLogService.interfaceExecuteLog(reqlogDto);
log.info("createFromWms--------------:输出参数:" + JSON.toJSONString(response));
return response;
} finally {
@ -674,6 +686,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
@Override
public Object updateRoute(JSONObject param) {
Assert.notNull(param.getString("pointCode"), "参数Point不能为空");
LuceneLogDto reqlogDto = LuceneLogDto.builder()
.requestparam("请求参数:"+ JSONUtil.toJsonStr(param))
.method("updateRoute")
.build();
luceneExecuteLogService.interfaceExecuteLog(reqlogDto);
String pointCode = param.getString("pointCode");
if (pointCode.contains(",")) {
String[] split = pointCode.split(",");

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java

@ -207,6 +207,10 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
}
if(!ObjectUtil.isEmpty(value) || "".equals(value)){
accessor_value.setValue(itemId, value);
LuceneLogDto luceneLogDto = new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(),4, itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1),
String.valueOf(his), String.valueOf(value));
luceneLogDto.setLogType(LogTypeEnum.DEVICE_LOG.getDesc());
log.info("{}", JSON.toJSONString(luceneLogDto));
}
if(ObjectUtil.isEmpty(value) && !"".equals(value)){
accessor_value.removeValue(itemId);
@ -387,7 +391,6 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
@Override
public void changed(Item item, ItemState itemState) {
String itemId = item.getId();
try {
Object value = OpcUtl.getValue(item, itemState);
UnifiedDataAccessor accessor_value = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key);

116
acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LuceneAppender.java

@ -12,6 +12,7 @@ import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.ttl.TransmittableThreadLocal;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@ -22,85 +23,95 @@ import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.nl.system.service.lucene.dto.LuceneLogDto;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.wltea.analyzer.lucene.IKAnalyzer;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.Properties;
public class LuceneAppender extends AppenderBase<ILoggingEvent> {
private Directory index;
private IndexWriter indexWriter;
public static final TransmittableThreadLocal<String> traceIdTL = new TransmittableThreadLocal();
public LuceneProperties properties;
public static Directory index;
// private List<LucenePropertyAndEncoder> encoders;
public static IndexWriter indexWriter;
@Override
public void start() {
super.start();
try {
index = FSDirectory.open(Paths.get(LogMessageConstant.INDEX_DIR));
} catch (IOException e) {
init();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void init() throws IOException {
Resource resource = new ClassPathResource("config/application.yml");
YamlPropertiesFactoryBean yamlPropertiesFactoryBean = new YamlPropertiesFactoryBean();
yamlPropertiesFactoryBean.setResources(resource);
Properties properties = yamlPropertiesFactoryBean.getObject();
// 获取配置值
String luceneDir = properties.getProperty("lucene.index.path");
System.out.println("---index地址----" + luceneDir);
index = FSDirectory.open(Paths.get(luceneDir));
// 初始化 Lucene 索引
Analyzer analyzer = new IKAnalyzer();
IndexWriterConfig config = new IndexWriterConfig(analyzer);
try {
indexWriter = new IndexWriter(index, config);
} catch (IOException e) {
e.printStackTrace();
}
indexWriter = new IndexWriter(index, config);
}
@Override
protected void append(ILoggingEvent event) {
String message = event.getFormattedMessage();
String[] split = message.split("@");
LuceneLogDto luceneLogDto = JSONObject.parseObject(split[0], LuceneLogDto.class);
Document document = new Document();
try {
// String[] split = message.split("@");
LuceneLogDto luceneLogDto = JSONObject.parseObject(message, LuceneLogDto.class);
Document document = new Document();
try {
//向document对象中添加域。
Map<String, String> mdcPropertyMap = event.getMDCPropertyMap();
String traceId = mdcPropertyMap.get("traceId");
System.out.println("---追踪号---"+traceId);
if (ObjectUtil.isNotEmpty(traceId)) {
document.add(new StringField("trace_id", traceId, Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getDevice_code())) {
document.add(new StringField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getContent())) {
document.add(new StringField("fieldContent", luceneLogDto.getContent(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getMethod())) {
document.add(new StringField("method", luceneLogDto.getMethod(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getStatus_code())) {
document.add(new StringField("status_code", luceneLogDto.getStatus_code(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getRequestparam())) {
document.add(new StringField("requestparam", luceneLogDto.getRequestparam(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getResponseparam())) {
document.add(new StringField("responseparam", luceneLogDto.getResponseparam(), Field.Store.YES));
}
document.add(new StringField("logType", luceneLogDto.getLogType(), Field.Store.YES));
document.add(new StringField("logTime", DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS"), Field.Store.YES));
document.add(new NumericDocValuesField("time",System.currentTimeMillis()));//排序
//向document对象中添加域。
Map<String, String> mdcPropertyMap = event.getMDCPropertyMap();
String traceId = mdcPropertyMap.get("traceId");
// System.out.println("---追踪号---"+traceId);
if (ObjectUtil.isNotEmpty(traceId)) {
document.add(new StringField("trace_id", traceId, Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getDevice_code())) {
document.add(new StringField("device_code", luceneLogDto.getDevice_code(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getContent())) {
document.add(new StringField("fieldContent", luceneLogDto.getContent(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getMethod())) {
document.add(new StringField("method", luceneLogDto.getMethod(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getStatus_code())) {
document.add(new StringField("status_code", luceneLogDto.getStatus_code(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getRequestparam())) {
document.add(new StringField("requestparam", luceneLogDto.getRequestparam(), Field.Store.YES));
}
if (ObjectUtil.isNotEmpty(luceneLogDto.getResponseparam())) {
document.add(new StringField("responseparam", luceneLogDto.getResponseparam(), Field.Store.YES));
}
document.add(new StringField("logType", luceneLogDto.getLogType(), Field.Store.YES));
document.add(new StringField("logTime", DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS"), Field.Store.YES));
document.add(new NumericDocValuesField("logTime",System.currentTimeMillis()));//排序
try {
indexWriter.addDocument(document);
indexWriter.commit();
} catch (IOException e) {
e.printStackTrace();
}
} catch (Exception e) {
return;
try {
indexWriter.addDocument(document);
indexWriter.commit();
} catch (IOException e) {
e.printStackTrace();
}
} catch (Exception e){
} catch (Exception e) {
return;
}
}
@ -114,4 +125,9 @@ public class LuceneAppender extends AppenderBase<ILoggingEvent> {
e.printStackTrace();
}
}
public void setProperties(LuceneProperties properties) {
this.properties = properties;
}
}

23
acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/LuceneProperties.java

@ -0,0 +1,23 @@
package org.nl.config.lucene;
import java.util.ArrayList;
import java.util.List;
public class LuceneProperties {
private List<Property> properties;
public LuceneProperties() {
this.properties = new ArrayList<Property>();
}
public List<Property> getProperties() {
return properties;
}
public void addProperty(Property property) {
properties.add(property);
}
}

44
acs/nladmin-system/nlsso-server/src/main/java/org/nl/config/lucene/Property.java

@ -0,0 +1,44 @@
package org.nl.config.lucene;
/*
* @author ZZQ
* @Date 2023/12/26 15:30
*/
public class Property {
private String name;
private String value;
private boolean allowEmpty;
public Property() {
}
public Property(String name, String value, boolean allowEmpty) {
this.name = name;
this.value = value;
this.allowEmpty = allowEmpty;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public boolean isAllowEmpty() {
return allowEmpty;
}
public void setAllowEmpty(boolean allowEmpty) {
this.allowEmpty = allowEmpty;
}
}

11
acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/controller/lucence/LuceneController.java

@ -4,6 +4,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.enums.LogTypeEnum;
import org.nl.common.logging.annotation.Log;
import org.nl.system.service.lucene.LuceneService;
import org.springframework.data.domain.Pageable;
@ -30,6 +31,16 @@ public class LuceneController {
@ApiOperation("日志检索")
//@PreAuthorize("@el.check('task:list')")
public ResponseEntity<Object> get(@RequestParam Map whereJson, Pageable page) {
whereJson.put("logType", LogTypeEnum.DEVICE_LOG.getDesc());
return new ResponseEntity<>(luceneService.getAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/getApiAll")
@Log("日志检索")
@ApiOperation("日志检索")
//@PreAuthorize("@el.check('task:list')")
public ResponseEntity<Object> getApiAll(@RequestParam Map whereJson, Pageable page) {
whereJson.put("logType", LogTypeEnum.INTERFACE_LOG.getDesc());
return new ResponseEntity<>(luceneService.getAll(whereJson, page), HttpStatus.OK);
}
}

64
acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/lucene/impl/LuceneServiceImpl.java

@ -56,49 +56,50 @@ public class LuceneServiceImpl implements LuceneService {
String startDate = (String) whereJson.get("begin_time");
String endDate = (String) whereJson.get("end_time");
if (startDate == null){
Calendar calendar=Calendar.getInstance();
if (startDate == null) {
Calendar calendar = Calendar.getInstance();
calendar.set(1970, 0, 1);
startDate = DateUtil.format(calendar.getTime(),"yyyy-MM-dd HH:mm:ss.SSS");
}else{
startDate = DateUtil.format(calendar.getTime(), "yyyy-MM-dd HH:mm:ss.SSS");
} else {
startDate = getDate(startDate);
}
if (endDate == null){
endDate = DateUtil.format(new DateTime(),"yyyy-MM-dd HH:mm:ss.SSS");
if (endDate == null) {
endDate = DateUtil.format(new DateTime(), "yyyy-MM-dd HH:mm:ss.SSS");
} else {
endDate = getDate(endDate);
}
TermRangeQuery termRangeQuery = new TermRangeQuery("logTime", new BytesRef(startDate), new BytesRef(endDate), true, true);
booleanQueryBuilder.add(termRangeQuery, BooleanClause.Occur.MUST);
if (whereJson.get("device_code") != null){
if (whereJson.get("device_code") != null) {
Query termQuery = new TermQuery(new Term("device_code", (String) whereJson.get("device_code")));
booleanQueryBuilder.add(termQuery,BooleanClause.Occur.MUST);
booleanQueryBuilder.add(termQuery, BooleanClause.Occur.MUST);
}
if (whereJson.get("method") != null){
if (whereJson.get("method") != null) {
Query termQuery = new TermQuery(new Term("method", (String) whereJson.get("method")));
booleanQueryBuilder.add(termQuery,BooleanClause.Occur.MUST);
booleanQueryBuilder.add(termQuery, BooleanClause.Occur.MUST);
}
if (whereJson.get("status_code") != null){
if (whereJson.get("status_code") != null) {
Query termQuery = new TermQuery(new Term("status_code", (String) whereJson.get("status_code")));
booleanQueryBuilder.add(termQuery,BooleanClause.Occur.MUST);
booleanQueryBuilder.add(termQuery, BooleanClause.Occur.MUST);
}
if (whereJson.get("requestparam") != null){
WildcardQuery query = new WildcardQuery(new Term("requestparam", "*"+(String) whereJson.get("requestparam")+"*"));
booleanQueryBuilder.add(query,BooleanClause.Occur.MUST);
if (whereJson.get("requestparam") != null) {
WildcardQuery query = new WildcardQuery(new Term("requestparam", "*" + (String) whereJson.get("requestparam") + "*"));
booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);
}
if (whereJson.get("responseparam") != null){
WildcardQuery query = new WildcardQuery(new Term("responseparam", "*"+(String) whereJson.get("responseparam")+"*"));
booleanQueryBuilder.add(query,BooleanClause.Occur.MUST);
if (whereJson.get("responseparam") != null) {
WildcardQuery query = new WildcardQuery(new Term("responseparam", "*" + (String) whereJson.get("responseparam") + "*"));
booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);
}
if (whereJson.get("blurry") != null) {
WildcardQuery query = new WildcardQuery(new Term("fieldContent", "*"+(String) whereJson.get("blurry")+"*"));
WildcardQuery query = new WildcardQuery(new Term("fieldContent", "*" + (String) whereJson.get("blurry") + "*"));
booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);
}
TopFieldCollector collector = TopFieldCollector.create(new Sort(new SortField("logTime", SortField.Type.LONG,true)), 20000, 0);
Query termQuery = new TermQuery(new Term("logType", (String) whereJson.get("logType")));
booleanQueryBuilder.add(termQuery, BooleanClause.Occur.MUST);
TopFieldCollector collector = TopFieldCollector.create(new Sort(new SortField("logTime", SortField.Type.LONG, true)), 20000, 0);
searcher.search(booleanQueryBuilder.build(), collector);
TopDocs topDocs = collector.topDocs(pageNum*pageSize, pageSize);
TopDocs topDocs = collector.topDocs(pageNum * pageSize, pageSize);
int totalSize = collector.getTotalHits();
ScoreDoc[] scoreDocs = topDocs.scoreDocs;
@ -106,16 +107,15 @@ public class LuceneServiceImpl implements LuceneService {
for (ScoreDoc scoreDoc : scoreDocs) {
Document doc = open.document(scoreDoc.doc);
JSONObject object = new JSONObject();
object.put("content",doc.get("fieldContent"));
object.put("device_code",doc.get("device_code"));
object.put("logTime",doc.get("logTime"));
object.put("method",doc.get("method"));
object.put("status_code",doc.get("status_code"));
object.put("requestparam",doc.get("requestparam"));
object.put("responseparam",doc.get("responseparam"));
if(doc.get("fieldContent") != null) {
list.add(object);
}
object.put("content", doc.get("fieldContent"));
object.put("device_code", doc.get("device_code"));
object.put("task_code", doc.get("task_id"));
object.put("logTime", doc.get("logTime"));
object.put("method", doc.get("method"));
object.put("status_code", doc.get("status_code"));
object.put("requestparam", doc.get("requestparam"));
object.put("responseparam", doc.get("responseparam"));
list.add(object);
}
open.close();
directory.close();

34
acs/nladmin-ui/src/api/monitor/Address.js

@ -0,0 +1,34 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/Address',
method: 'post',
data
})
}
export function queryAddressCodeList() {
return request({
url: 'api/Address/queryAddressCodeList',
method: 'get'
})
}
export function del(ids) {
return request({
url: 'api/Address/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/Address',
method: 'put',
data
})
}
export default { add, edit, del, queryAddressCodeList }

1
acs/nladmin-ui/src/views/lucene/index.vue

@ -106,3 +106,4 @@ export default {
<style scoped>
</style>

129
acs/nladmin-ui/src/views/monitor/log/logQuery.vue

@ -0,0 +1,129 @@
<template>
<div class="app-container">
<div class="head-container">
<Search />
<crudOperation />
</div>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<!-- <el-table-column type="selection" width="55"/>-->
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
<el-table-column prop="operate" width="50" label="操作" />
<!-- <el-table-column prop="device_code" label="设备号" width="100" /> -->
<el-table-column prop="task_code" label="任务编号" />
<!-- <el-table-column prop="instruct_code" label="指令编号" /> -->
<el-table-column prop="method" label="方法" />
<el-table-column prop="status_code" label="状态码" />
<!-- <el-table-column prop="requestparam" label="请求参数" :show-overflow-tooltip="true" /> -->
<el-table-column prop="requestparam" label="请求参数" :min-width="150">
<template slot-scope="scope">
<div class="truncate" :title="scope.row.requestparam" placement="top">
{{ scope.row.requestparam }}
</div>
</template>
</el-table-column>
<el-table-column prop="responseparam" label="返回参数" :min-width="150">
<template slot-scope="scope">
<div class="truncate" :title="scope.row.responseparam" placement="top">
{{ scope.row.responseparam }}
</div>
</template>
</el-table-column>
<!-- <el-table-column prop="responseparam" label="返回参数" :show-overflow-tooltip="true" /> -->
<el-table-column prop="logTime" width="170" label="记录时间" :min-width="flexWidth('logTime',crud.data,'记录时间')" />
<!-- <el-table-column prop="content" width="500" label="内容详情" :min-width="flexWidth('content',crud.data,'内容详情')" /> -->
</el-table>
<!--分页组件-->
<pagination />
</div>
</template>
<script>
import Search from '../lucene/search'
import CRUD, { crud, header, presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import { delAll } from '@/api/acs/lucene/log'
export default {
name: 'LogQuery',
components: { Search, pagination, crudOperation },
mixins: [presenter(), header(), crud()],
cruds: function() {
return CRUD({
title: '系统参数', url: 'api/lucene/getApiAll', idField: 'id', sort: 'id,desc',
queryOnPresenterCreated: true,
optShow: {
add: false,
edit: false,
del: false,
download: false
},
page: {
size: 40,
total: 0,
page: 0
},
query: {
createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))]
}
})
},
data() {
return {
query: { blurry: '123' },
permission: {
add: ['admin', 'param:add'],
edit: ['admin', 'param:edit'],
del: ['admin', 'param:del']
},
rules: {}
}
},
created() {
},
methods: {
// false
[CRUD.HOOK.beforeRefresh]() {
return true
},
confirmDelAll() {
this.$confirm(`确认清空所有操作日志吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.crud.delAllLoading = true
delAll('device_execute').then(res => {
this.crud.delAllLoading = false
this.crud.dleChangePage(1)
this.crud.delSuccessNotify()
this.crud.toQuery()
}).catch(err => {
this.crud.delAllLoading = false
console.log(err.response.data.message)
})
}).catch(() => {
})
}
}
}
</script>
<style scoped>
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%; /* 或者设置为具体的宽度 */
cursor: pointer; /* 可选:鼠标悬停时变为手形 */
}
</style>

10
acs/nladmin-ui/src/views/monitor/lucene/index.vue

@ -15,15 +15,15 @@
<!-- <el-table-column type="selection" width="55"/>-->
<!-- <el-table-column v-if="false" prop="id" label="id"/>-->
<el-table-column prop="operate" width="50" label="操作" />
<el-table-column prop="device_code" label="设备号" min-width="130" show-overflow-tooltip />
<el-table-column prop="task_code" label="任务编号" />
<el-table-column prop="device_code" label="设备号" width="100" />
<!-- <el-table-column prop="task_code" label="任务编号" />
<el-table-column prop="instruct_code" label="指令编号" />
<el-table-column prop="method" label="方法" />
<el-table-column prop="status_code" label="状态码" />
<el-table-column prop="status_code" label="状态码" /> -->
<el-table-column prop="requestparam" label="请求参数" />
<el-table-column prop="responseparam" label="返回参数" />
<el-table-column prop="logTime" width="170" label="记录时间" />
<el-table-column prop="content" width="500" label="内容详情" />
<el-table-column prop="logTime" width="170" label="记录时间" :min-width="flexWidth('logTime',crud.data,'记录时间')" />
<el-table-column prop="content" width="500" label="内容详情" :min-width="flexWidth('content',crud.data,'内容详情')" />
</el-table>
<!--分页组件-->

3
acs/nladmin-ui/src/views/monitor/lucene/search.vue

@ -22,13 +22,14 @@
<el-option v-for="item in device_codes" :key="item.id" :label="item.label" :value="item.value" />
</el-select> -->
<el-select
ref="test"
v-model="query.device_code"
filterable
clearable
size="small"
reserve-keyword
placeholder="设备号"
style="width: 190px;"
class="filter-item"
@change="crud.toQuery"
>
<el-option

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/param/impl/SysParamServiceImpl.java

@ -40,6 +40,7 @@ public class SysParamServiceImpl extends ServiceImpl<SysParamMapper, Param> impl
@Override
public Page<Param> queryPage(Map whereJson, PageQuery page) {
QueryWrapper<Param> queryWrapper = new QueryWrapper<>();
page.setPage(page.getPage() + 1);
queryWrapper.orderBy(true, true, "create_time");
Page<Param> paramPage = paramMapper.selectPage(page.build(), queryWrapper);
return paramPage;

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

@ -515,6 +515,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
schBaseVehiclematerialgroup.setRegion_code(connectorDto.getNextOperation());
schBaseVehiclematerialgroup.setExtend(JSON.toJSONString(connectorDto));
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()));

10
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/ConnectorToWmsServiceImpl.java

@ -59,6 +59,7 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
map.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
map.put("message", "请求参数为空!");
objects.add(map);
log.info("connector下发agv任务请求参数为空:{}!", jsonArray);
return map;
}
try {
@ -74,6 +75,8 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
map1.put("message", StrUtil.isEmpty(task_code) ? "任务号不能为空!"
: StrUtil.isEmpty(start_device_code) ? "起点参数不能为空!" : StrUtil.isEmpty(vehicle_code) ? "载具号不能为空!" : "未知");
objects.add(map1);
log.info(StrUtil.isEmpty(task_code) ? "任务号不能为空!"
: StrUtil.isEmpty(start_device_code) ? "起点参数不能为空!" : StrUtil.isEmpty(vehicle_code) ? "载具号不能为空!" : "未知");
continue;
}
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(start_device_code);
@ -82,12 +85,14 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
map1.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
map1.put("message", start_device_code + "点位设备不存在!");
objects.add(map1);
log.info(start_device_code + "点位设备不存在!");
continue;
} else if (schBasePoint.getIs_lock()) {
map1.put("task_code", task_code);
map1.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
map1.put("message", start_device_code + "该设备正在执行任务!");
objects.add(map1);
log.info(start_device_code + "该设备正在执行任务!");
continue;
}
//TODO:固定的载具类型,根据载具类型来决定终点
@ -121,6 +126,7 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
map.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
map.put("message", e.getMessage());
objects.add(map);
log.info("connector下发agv任务异常:{}", e.getMessage());
return map;
}
return map;
@ -132,10 +138,11 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
Assert.noNullElements(jsonArray, "请求参数为空!");
List<ConnectorDto> connectorDtos = BeanUtil.copyToList(jsonArray, ConnectorDto.class);
for (ConnectorDto connectorDto : connectorDtos) {
if(StrUtil.isEmpty(connectorDto.getID())) throw new BadRequestException("物料id为null!");
if (StrUtil.isEmpty(connectorDto.getID())) throw new BadRequestException("物料id为null!");
SchBaseVehiclematerialgroup one = iSchBaseVehiclematerialgroupService.getOne(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getGroup_id, connectorDto.getID()));
if (ObjectUtil.isNotNull(one)) {
log.info("id:" + connectorDto.getID() + "," + "该物料信息已存在!");
throw new BadRequestException("id:" + connectorDto.getID() + "," + "该物料信息已存在!");
}
SchBaseVehiclematerialgroup schBaseVehiclematerialgroup = new SchBaseVehiclematerialgroup();
@ -147,6 +154,7 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
schBaseVehiclematerialgroup.setRegion_code(connectorDto.getNextOperation());
schBaseVehiclematerialgroup.setExtend(JSON.toJSONString(connectorDto));
schBaseVehiclematerialgroup.setOrder_code(connectorDto.getProductionOrder());
schBaseVehiclematerialgroup.setCreate_name("Connector");
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
}
return null;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/connector/service/impl/WmsToConnectorServiceImpl.java

@ -49,7 +49,7 @@ public class WmsToConnectorServiceImpl implements WmsToConnectorService {
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
Param isInvokeConnector = sysParamService.findByCode(GeneralDefinition.IS_INVOKE_CONNECTOR);
if (ObjectUtil.isNotEmpty(isInvokeConnector) && GeneralDefinition.YES.equals(isInvokeConnector.getValue())) {
String api = "/iot/agvarrive";
String api = "/iot/order_report";
JSONObject jsonObject = ConnectorUtil.notifyConnector3(api, json);
return jsonObject;
} else if (ObjectUtil.isNotEmpty(isInvokeConnector) && GeneralDefinition.NO.equals(isInvokeConnector.getValue())) {

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

@ -14,6 +14,7 @@ import org.nl.common.enums.VehicleTypeEnum;
import org.nl.common.enums.region.RegionEnum;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.RedisUtils;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.system.service.param.dao.Param;
import org.nl.system.service.param.impl.SysParamServiceImpl;
@ -255,6 +256,9 @@ public class HandheldServiceImpl implements HandheldService {
private void goShelves(SchBasePoint schBasePoint, JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
Assert.noNullElements(param.getJSONArray("material"), "参数不能为空!");
JSONArray materials = param.getJSONArray("material");
if (materials.size() < 1) {
throw new BadRequestException("物料下料数量不能为空!");
}
JSONObject jo = new JSONObject();
if (StrUtil.isBlank(region_code)) {
JSONObject json = new JSONObject();
@ -328,6 +332,7 @@ public class HandheldServiceImpl implements HandheldService {
schBaseVehiclematerialgroup.setMaterial_code(jsonObject.getString("material_code"));
schBaseVehiclematerialgroup.setOrder_code(jsonObject.getString("order_code"));
schBaseVehiclematerialgroup.setDue_date(jsonObject.getString("due_date"));
schBaseVehiclematerialgroup.setCreate_name(SecurityUtils.getCurrentNickName());
schBaseVehiclematerialgroup.setRegion_code(StrUtil.isBlank(finalRegion_code) ? jsonObject.getString("region_code") : finalRegion_code);
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
@ -344,6 +349,10 @@ public class HandheldServiceImpl implements HandheldService {
*/
private void goWxOrNx(JSONObject param, String region_code, String device_code, String vehicle_code, AbstractTask connectorTask) {
JSONObject jo = new JSONObject();
JSONArray materials = param.getJSONArray("material");
if (materials.size() < 1) {
throw new BadRequestException("物料下料数量不能为空!");
}
jo.put("device_code", device_code);
jo.put("config_code", "ProcessingSMTTask");
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
@ -357,6 +366,30 @@ public class HandheldServiceImpl implements HandheldService {
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue())
.set(SchBasePoint::getIs_lock, true)
.set(SchBasePoint::getVehicle_code, null));
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_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);
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.setCreate_name(SecurityUtils.getCurrentNickName());
schBaseVehiclematerialgroup.setRegion_code(region_code);
iSchBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
}
@ -566,18 +599,19 @@ public class HandheldServiceImpl implements HandheldService {
@Override
public void updateRoute(JSONObject json) {
Assert.noNullElements(new String[]{json.getString("type"), json.getString("status")}, "参数不能为空!");
switch (json.getString("type")) {
case "1":
JSONObject jsonObject = new JSONObject();
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
Param isConnectConnector = sysParamService.findByCode(GeneralDefinition.ADD_ROUTE_DOOR_1);
jsonObject.put("pointCode", isConnectConnector.getValue());
jsonObject.put("status", json.getString("status"));
wmsToAcsService.notifyAcs1(jsonObject);
break;
default:
break;
JSONObject jsonObject = new JSONObject();
SysParamServiceImpl sysParamService = SpringContextHolder.getBean(SysParamServiceImpl.class);
Param isConnectConnector = sysParamService.findByCode("add_route_door_" + json.getString("type"));
jsonObject.put("pointCode", isConnectConnector.getValue());
jsonObject.put("status", json.getString("status"));
wmsToAcsService.notifyAcs1(jsonObject);
Param isConnectConnector1 = sysParamService.findByCode(GeneralDefinition.ADD_ROUTE_DOOR);
if ("1".equals(json.getString("status"))) {
isConnectConnector1.setValue(json.getString("type"));
} else {
isConnectConnector1.setValue("0");
}
sysParamService.update(isConnectConnector1);
}

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

@ -1,6 +1,7 @@
package org.nl.wms.ext.sorting.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@ -31,6 +32,7 @@ import org.nl.wms.sch.task_manage.task.tasks.sorting.SortingSMTTask;
import org.nl.wms.sch.task_manage.task.tasks.sorting.SortingSNTTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import java.util.ArrayList;
@ -75,9 +77,11 @@ public class SortingServiceImpl implements SortingService {
JSONArray jsonArray = JSONUtil.parseArray(jsonObject.get("pallet_detail"));
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(pointCode);
if (ObjectUtil.isEmpty(schBasePoint)) {
log.info("点位编码不存在:{}", pointCode);
return MapOf.of("status", 400, "msg", "点位编码不存在!");
}
if (schBasePoint.getIs_lock()) {
log.info("该点位已创建任务:{}", pointCode);
return MapOf.of("status", 400, "msg", "该点位已创建任务!");
}
JSONObject taskParam = new JSONObject(MapOf.of("task_code", task_code, "job_name", jobname, "device_code", pointCode, "requestNo"
@ -85,10 +89,6 @@ public class SortingServiceImpl implements SortingService {
AbstractTask connectorTask = taskFactory.getTask("CNTTask");
if ("0".equals(vehicle_type)) {
// TODO:呼叫空托
iSchBasePointService.update(new UpdateWrapper<SchBasePoint>()
.set("is_lock", true)
.set("remark", task_code)
.eq("point_code", pointCode));
if (SortingEnum.TASK_TYPE_ONE.getValue().equals(task_type) && SortingEnum.IS_EMPTY.getValue().equals(is_empty)) {
taskParam.put("vehicle_type", "G01");
taskParam.put("config_code", "SortingCNTTask");
@ -96,6 +96,7 @@ public class SortingServiceImpl implements SortingService {
//TODO:叫料
} else if (SortingEnum.TASK_TYPE_ONE.getValue().equals(task_type) && SortingEnum.NOT_EMPTY.getValue().equals(is_empty)) {
if (StrUtil.isEmpty(vehicle_code)) {
log.info("载具号未传递");
return MapOf.of("status", 400, "msg", "载具号未传递!");
}
taskParam.put("config_code", "SortingCMTTask");
@ -103,6 +104,7 @@ public class SortingServiceImpl implements SortingService {
//TODO:将空托盘放到线边库
} else if (SortingEnum.TASK_TYPE_TWO.getValue().equals(task_type) && SortingEnum.IS_EMPTY.getValue().equals(is_empty)) {
if (StrUtil.isEmpty(vehicle_code)) {
log.info("载具号未传递");
return MapOf.of("status", 400, "msg", "载具号未传递!");
}
taskParam.put("config_code", "SortingSNTTask");
@ -110,8 +112,13 @@ public class SortingServiceImpl implements SortingService {
//TODO:将满料放到线边库
} else if (SortingEnum.TASK_TYPE_TWO.getValue().equals(task_type) && SortingEnum.NOT_EMPTY.getValue().equals(is_empty)) {
if (StrUtil.isEmpty(vehicle_code)) {
log.info("载具号未传递");
return MapOf.of("status", 400, "msg", "载具号未传递!");
}
if (CollUtil.isEmpty(jsonArray) || jsonArray.size() < 1) {
log.info("物料信息为空!");
return MapOf.of("status", 400, "msg", "物料信息为空!");
}
taskParam.put("config_code", "SortingSMTTask");
connectorTask.apply(taskParam);
}
@ -130,8 +137,13 @@ public class SortingServiceImpl implements SortingService {
//TODO:将两个笼框放到线边库
} else if (SortingEnum.TASK_TYPE_TWO.getValue().equals(task_type) && SortingEnum.NOT_EMPTY.getValue().equals(is_empty)) {
if (StrUtil.isEmpty(jsonObject.getString("vehicle_code2"))) {
log.info("第二个笼框载具号未传递");
return MapOf.of("status", 400, "msg", "第二个笼框载具号未传递!");
}
if (CollUtil.isEmpty(jsonArray) || jsonArray.size() < 1) {
log.info("物料信息为空!");
return MapOf.of("status", 400, "msg", "物料信息为空!");
}
taskParam.put("config_code", "SortingSMTTask");
taskParam.put("task_seq", "1");
taskParam.put("vehicle_code", jsonObject.getString("vehicle_code2"));
@ -145,14 +157,20 @@ public class SortingServiceImpl implements SortingService {
connectorTask.apply(taskParam);
}
}
iSchBasePointService.update(new UpdateWrapper<SchBasePoint>()
.set("is_lock", true)
.set("remark", task_code)
.eq("point_code", pointCode));
return MapOf.of("status", 200, "msg", "sucess");
} catch (Exception ex) {
log.info("sorting下发任务失败:{}", ex.getMessage());
return MapOf.of("status", 200, "msg", "操作失败", "errMsg", ex.getMessage());
}
}
@Override
public List<ConnectorDto> getStructList(String jobName) {
log.info("sorting查询组盘请求参数数据:{}", jobName);
List<SchBaseVehiclematerialgroup> list = iSchBaseVehiclematerialgroupService.list(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(SchBaseVehiclematerialgroup::getJob_name, jobName));
List<ConnectorDto> connectors = new ArrayList<>();
@ -163,7 +181,7 @@ public class SortingServiceImpl implements SortingService {
connectorDto.setNextOperation(StrUtil.isNotEmpty(connectorDto.getNextOperation()) ? connectorDto.getNextOperation() : DateUtil.now());
connectors.add(connectorDto);
}
// List<PointMaterialInfo> structList = iSchBasePointService.getStructList(RegionEnum.ZDFJ.getRegion_code(), "1");
log.info("sorting查询组盘响应参数:{}", JSONObject.toJSONString(connectors));
return connectors;
}
}

1
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java

@ -88,6 +88,7 @@ public class SchBaseVehiclematerialgroup implements Serializable {
@ApiModelProperty(value = "是否已加工")
private Boolean has_work;
@ApiModelProperty(value = "交期时间")
private String due_date;

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dto/SchBaseVehiclematerialgroupQuery.java

@ -15,5 +15,5 @@ public class SchBaseVehiclematerialgroupQuery implements Serializable {
private String vehicle_code;
private String workshop_code;
private String region_code;
private String group_bind_material_status;
private String job_name;
}

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/impl/SchBaseVehiclematerialgroupServiceImpl.java

@ -62,7 +62,7 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
IPage<SchBaseVehiclematerialgroup> schBaseVehiclematerialgroupIPage = vehiclematerialgroupMapper.selectPage(pages, Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
.eq(StrUtil.isNotBlank(whereJson.getVehicle_code()), SchBaseVehiclematerialgroup::getVehicle_code, whereJson.getVehicle_code())
.eq(StrUtil.isNotBlank(whereJson.getWorkshop_code()), SchBaseVehiclematerialgroup::getWorkshop_code, whereJson.getWorkshop_code())
.eq(StrUtil.isNotBlank(whereJson.getGroup_bind_material_status()), SchBaseVehiclematerialgroup::getGroup_bind_material_status, whereJson.getGroup_bind_material_status())
.eq(StrUtil.isNotBlank(whereJson.getJob_name()), SchBaseVehiclematerialgroup::getJob_name, whereJson.getJob_name())
.eq(StrUtil.isNotBlank(whereJson.getRegion_code()), SchBaseVehiclematerialgroup::getRegion_code, whereJson.getRegion_code()));
schBaseVehiclematerialgroupIPage.getRecords().forEach(item -> {
if (StrUtil.isNotBlank(item.getMaterial_id())) {
@ -87,12 +87,9 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
if (StringUtils.isNotBlank(entity.getPoint_code())) {
entity.setRegion_code(pointService.getById(entity.getPoint_code()).getRegion_code());
}
entity.setGroup_id(StrUtil.isNotEmpty(entity.getGroup_id()) ? entity.getGroup_id() : IdUtil.getSnowflake(1, 1).nextIdStr());
entity.setCreate_id(currentUserId);
entity.setCreate_name(nickName);
entity.setCreate_name(StrUtil.isNotEmpty(entity.getCreate_name()) ? entity.getCreate_name() : nickName);
entity.setCreate_time(now);
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);

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

@ -96,11 +96,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
.eq(ObjectUtil.isNotEmpty(point_type), SchBasePoint::getPoint_type, point_type)
.eq(ObjectUtil.isNotEmpty(point_status), SchBasePoint::getPoint_status, point_status)
.eq(ObjectUtil.isNotEmpty(is_used), SchBasePoint::getIs_used, is_used)
.and(!lock_type, slam -> slam.isNull(SchBasePoint::getIng_task_code)
.or()
.eq(SchBasePoint::getIng_task_code, ""))
.and(lock_type, slam -> slam.isNotNull(SchBasePoint::getIng_task_code)
.ne(SchBasePoint::getIng_task_code, ""))
.eq(ObjectUtil.isNotEmpty(lock_type), SchBasePoint::getIs_lock, lock_type)
.orderByAsc(SchBasePoint::getRegion_code)
.orderByAsc(SchBasePoint::getPoint_type)
.orderByAsc(SchBasePoint::getPoint_code)
@ -175,18 +171,17 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
// 获取region_name
SchBaseRegion baseRegion = regionMapper.selectById(entity.getRegion_code());
entity.setRegion_name(baseRegion.getRegion_name());
// if (ObjectUtil.isNotEmpty(entity.getCan_vehicle_types())) {
// String can_vehicle_type = String.join(",", entity.getCan_vehicle_types());
// entity.setCan_vehicle_type(can_vehicle_type);
// }
String pointStatus = entity.getPoint_status();
String vehicle_code = entity.getVehicle_code();
// 根据点位状态来判断更新内容
if (ObjectUtil.isNotEmpty(pointStatus) && pointStatus.equals(PointStatusEnum.EMPTY_POINT.getCode())) {
entity.setVehicle_type("");
entity.setVehicle_code("");
entity.setVehicle_qty(0);
if (ObjectUtil.isNotEmpty(pointStatus) && pointStatus.equals(GoodsEnum.OUT_OF_STOCK.getValue())) {
vehicle_code = null;
} else if (ObjectUtil.isNotEmpty(pointStatus) && (pointStatus.equals(GoodsEnum.EMPTY_PALLETS.getValue()) || pointStatus.equals(GoodsEnum.IN_STOCK.getValue()))) {
if(StrUtil.isEmpty(entity.getVehicle_code())) throw new BadRequestException("载具编码不能为空");
}
pointMapper.updateById(entity);
pointMapper.update(entity,Wrappers.lambdaUpdate(SchBasePoint.class)
.eq(SchBasePoint::getPoint_code, entity.getPoint_code())
.set(SchBasePoint::getVehicle_code, vehicle_code));
}
@Override

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/GeneralDefinition.java

@ -62,7 +62,7 @@ public class GeneralDefinition {
/**
* 外协区到冲床一自动门
*/
public static final String ADD_ROUTE_DOOR_1 = "add_route_door_1";
public static final String ADD_ROUTE_DOOR = "add_route_door";
/**
* 是否调用connector小插件
*/

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

@ -26,6 +26,7 @@ import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@ -55,12 +56,12 @@ public class CNTTask extends AbstractTask {
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
// 配置信息
// 定义按数字后缀排序的比较器
/*Comparator<SchBaseTask> numericSuffixComparator = (s1, s2) -> {
Comparator<SchBaseTask> numericSuffixComparator = (s1, s2) -> {
Integer suffix1 = getNumericSuffix(s1.getPoint_code1());
Integer suffix2 = getNumericSuffix(s2.getPoint_code1());
return suffix1.compareTo(suffix2);
};
List<SchBaseTask> collect = tasks.stream().sorted(numericSuffixComparator).collect(Collectors.toList());*/
tasks = tasks.stream().sorted(numericSuffixComparator).collect(Collectors.toList());
for (SchBaseTask task : tasks) {
TaskUtils.setUpdateByAcs(task);
// 找起点

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

@ -110,6 +110,7 @@ public class PcOperationSMTTask extends AbstractTask {
schBaseVehiclematerialgroup.setOrder_code(smv.getOrder_code());
schBaseVehiclematerialgroup.setDue_date(smv.getDue_date());
schBaseVehiclematerialgroup.setHas_work(sendMaterVo.getHas_work());
schBaseVehiclematerialgroup.setCreate_name("Sorting");
schBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
});
}

27
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/sorting/SortingSMTTask.java

@ -34,6 +34,12 @@ import org.nl.wms.util.TaskUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.List;
/**
@ -45,6 +51,7 @@ public class SortingSMTTask extends AbstractTask {
private static final String TASK_CONFIG_CODE = "SortingSMTTask";
private static final DateTimeFormatter ISO_8601_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX");
@Autowired
private ISchBasePointService pointService;
@Autowired
@ -108,7 +115,11 @@ public class SortingSMTTask extends AbstractTask {
schBaseVehiclematerialgroup.setRegion_code(region_code);
schBaseVehiclematerialgroup.setOrder_code(workorder);
schBaseVehiclematerialgroup.setJob_name(Jobname);
if (StrUtil.isNotEmpty(dueDate) && isValidISO8601(dueDate)) {
dueDate = parseDate(dueDate);
}
schBaseVehiclematerialgroup.setDue_date(dueDate);
schBaseVehiclematerialgroup.setCreate_name("Sorting");
schBaseVehiclematerialgroup.setExtend(JSON.toJSONString(jO));
schBaseVehiclematerialgroupService.create(schBaseVehiclematerialgroup);
}
@ -128,6 +139,22 @@ public class SortingSMTTask extends AbstractTask {
}
}
public static boolean isValidISO8601(String dateString) {
try {
ZonedDateTime.parse(dateString, ISO_8601_FORMATTER);
return true;
} catch (DateTimeParseException e) {
return false;
}
}
public static String parseDate(String isoString) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
ZonedDateTime zonedDateTime = ZonedDateTime.parse(isoString);
return formatter.format(zonedDateTime);
}
private Long getTime(String dateString) {
String pattern = "yyyy-MM-dd HH:mm:ss";
java.util.Date date = DateUtil.parse(dateString, pattern);

8
lms/nladmin-system/nlsso-server/src/main/resources/log/XgAgvDeviceDriver.xml → lms/nladmin-system/nlsso-server/src/main/resources/log/ConnectorToWmsServiceImpl.xml

@ -4,10 +4,10 @@
<property name="LOG_HOME" value="${logPath}"/>
<!--<define name="DEVICECODE" class="org.nl.common.logging.DeviceCodeDir"/>-->
<!-- 按照每天生成日志文件 -->
<appender name="FILE_XGAGV" class="ch.qos.logback.core.rolling.RollingFileAppender">
<appender name="FILE_12" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/XgAgvDeviceDriver/${DEVICECODE}/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<FileNamePattern>${LOG_HOME}/ConnectorToWms/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
@ -28,7 +28,7 @@
</logger>-->
<!-- 打印sql -->
<logger name="org.nl.system.service.lucene.impl.LuceneExecuteLogServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE_XGAGV"/>
<logger name="org.nl.wms.ext.connector.service.impl.ConnectorToWmsServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE_12"/>
</logger>
</included>

34
lms/nladmin-system/nlsso-server/src/main/resources/log/SortingToWms.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!--<define name="DEVICECODE" class="org.nl.common.logging.DeviceCodeDir"/>-->
<!-- 按照每天生成日志文件 -->
<appender name="FILE_13" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/SortingToWms/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>${log.charset}</charset>
</encoder>
</appender>
<!-- <logger name="org.nl.start.Init" level="info" additivity="false">
<appender-ref ref="FILE3"/>
</logger>-->
<!-- 打印sql -->
<logger name="org.nl.wms.ext.sorting.service.impl.SortingServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE_13"/>
</logger>
</included>

2
lms/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml

@ -19,6 +19,8 @@
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="${logPath}"/>
<include resource="log/ConnectorAndSorting.xml"/>
<include resource="log/ConnectorToWmsServiceImpl.xml"/>
<include resource="log/SortingToWms.xml"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">

23
lms/nladmin-ui/src/views/wms/sch/group/index.vue

@ -49,7 +49,7 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="绑定状态">
<!-- <el-form-item label="绑定状态">
<el-select
v-model="query.group_bind_material_status"
clearable
@ -65,6 +65,15 @@
:value="item.value"
/>
</el-select>
</el-form-item> -->
<el-form-item label="jobName">
<el-input
v-model="query.job_name"
clearable
style="width: 180px"
placeholder="jobName"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
@ -241,9 +250,11 @@
</template>
</el-table-column>
<el-table-column prop="standing_time" label="静置时间(分钟)" :min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')" /> -->
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料数量')" />
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_qty',crud.data,'物料数量')" />
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
<el-table-column v-if="false" prop="material_name" label="物料名称" show-overflow-tooltip :min-width="flexWidth('material_name',crud.data,'物料数量')" />
<el-table-column prop="material_id" label="物料编码" show-overflow-tooltip :min-width="flexWidth('material_id',crud.data,'物料数量')" />
<el-table-column prop="job_name" label="jobName" show-overflow-tooltip :min-width="flexWidth('job_name',crud.data,'jobName')" />
<el-table-column prop="due_date" label="交期时间" show-overflow-tooltip :min-width="flexWidth('due_date',crud.data,'交期时间')" />
<el-table-column v-if="false" prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
<!-- <el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'物料数量')" />
<el-table-column prop="material_weight" label="物料重量" :min-width="flexWidth('material_weight',crud.data,'物料重量')" />
<el-table-column prop="group_number" label="组盘次数" :min-width="flexWidth('group_number',crud.data,'组盘次数')" />
@ -261,8 +272,8 @@
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',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,'创建时间')" />
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column v-if="false" prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
<el-table-column v-if="false" prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation

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

@ -83,7 +83,7 @@
@change="hand"
>
<el-option
v-for="item in pointStatusList"
v-for="item in pointStatus"
:key="item.value"
:label="item.label"
:value="item.value"
@ -217,10 +217,10 @@
<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 !== '1'" label="载具编码" prop="vehicle_code">
<el-form-item v-if="form.point_status !== '0'" 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 !== '1'" label="载具类型" prop="vehicle_type">
<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>
<!-- <el-form-item label="可放载具类型" prop="can_vehicle_types">
@ -233,9 +233,9 @@
/>
</el-select>
</el-form-item> -->
<el-form-item label="载具数量" prop="vehicle_qty">
<!-- <el-form-item label="载具数量" prop="vehicle_qty">
<el-input-number v-model="form.vehicle_qty" style="width: 370px;" :controls="false" class="clear-number-input" :min="0" :precision="0" :max="99999" label="载具数量" size="mini" />
</el-form-item>
</el-form-item> -->
<el-form-item label="点位状态" prop="point_status">
<el-select
v-model="form.point_status"
@ -290,20 +290,20 @@
</el-table-column> -->
<!-- <el-table-column prop="vehicle_type" label="物料类型" :min-width="flexWidth('vehicle_type',crud.data,'物料类型')" />-->
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
<el-table-column v-if="false" prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
<el-table-column label="是否锁定" :min-width="flexWidth('is_lock',crud.data,'是否锁定')">
<template slot-scope="scope">
{{ scope.row.ing_task_code?'是':'否' }}
{{ scope.row.is_lock?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')" />
<el-table-column prop="ing_task_code" label="在执行的任务标识" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" />
<el-table-column v-if="false" prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')" />
<el-table-column v-if="false" prop="ing_task_code" label="在执行的任务标识" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" />
<el-table-column prop="is_has_workder" label="是否有工单" :min-width="flexWidth('is_has_workder',crud.data,'是否有工单')">
<template slot-scope="scope">
{{ scope.row.is_has_workder?'是':'否' }}
</template>
</el-table-column>
<el-table-column prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')">
<el-table-column v-if="false" prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')">
<template slot-scope="scope">
{{ scope.row.is_auto?'是':'否' }}
</template>

17
lms/nladmin-ui/src/views/wms/sch/task/index.vue

@ -182,7 +182,14 @@
<el-table-column prop="config_code" label="配置编码" :min-width="flexWidth('config_code',crud.data,'配置编码')" />
<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="request_param" label="请求参数" :min-width="flexWidth('request_param',crud.data,'请求参数')" />
<!-- <el-table-column prop="request_param" label="请求参数" :min-width="flexWidth('request_param',crud.data,'请求参数')" /> -->
<el-table-column prop="request_param" label="请求参数" :min-width="150">
<template slot-scope="scope">
<div class="truncate" :title="scope.row.request_param" placement="top">
{{ scope.row.request_param }}
</div>
</template>
</el-table-column>
<!-- <el-table-column prop="start_wait_point" label="取货等待点" :min-width="flexWidth('start_wait_point',crud.data,'取货等待点')" />-->
<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)">
@ -377,5 +384,11 @@ export default {
</script>
<style scoped>
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%; /* 或者设置为具体的宽度 */
cursor: pointer; /* 可选:鼠标悬停时变为手形 */
}
</style>

Loading…
Cancel
Save