Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
package org.nl.wms.scheduler_manage.controller.scheduler;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/22 14:27
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.SchedulerService;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.FlowElement;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/shceduler")
|
||||
@SaIgnore
|
||||
public class SchedulerController {
|
||||
|
||||
@Autowired
|
||||
SchedulerService schedulerService;
|
||||
|
||||
@GetMapping("/all")
|
||||
public ResponseEntity<Object> allprocess(){
|
||||
return new ResponseEntity<>(schedulerService.all(), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/process")
|
||||
public ResponseEntity<Object> allprocess(String process){
|
||||
return new ResponseEntity<>(schedulerService.getProcess(process), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/processFlow")
|
||||
public ResponseEntity<Object> allprocess(String process,String flow){
|
||||
FlowElement element = schedulerService.currentFlow(process, flow);
|
||||
return new ResponseEntity<>(element, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,21 @@
|
||||
package org.nl.wms.scheduler_manage.service.region.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.product_manage.sch.service.dto.RegionDto;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.region.ISchBaseRegionService;
|
||||
import org.nl.wms.scheduler_manage.service.region.dao.SchBaseRegion;
|
||||
import org.nl.wms.scheduler_manage.service.region.dao.mapper.SchBaseRegionMapper;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.ProcessElement;
|
||||
import org.nl.wms.system_manage.service.dict.ISysDictService;
|
||||
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -31,7 +24,6 @@ import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -169,4 +161,9 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ProcessElement element = new ProcessElement();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.common.publish.AbstraceListener;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.FlowElement;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.ProcessElement;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.core.io.FileSystemResourceLoader;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLInputFactory;
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/22 13:38
|
||||
*/
|
||||
@Service
|
||||
public class SchedulerService implements BeanPostProcessor {
|
||||
@Value("${schedulerFile}")
|
||||
|
||||
private static Map<String,BaseConverter> converterMap =new HashMap<>();
|
||||
|
||||
|
||||
public List<BaseElement> all(){
|
||||
List<BaseElement> readall = XmlReadUtil.readall();
|
||||
return readall;
|
||||
}
|
||||
|
||||
public ProcessElement getProcess(String processId){
|
||||
ProcessElement processElement = XmlReadUtil.readProcess(processId);
|
||||
return processElement;
|
||||
}
|
||||
|
||||
public FlowElement currentFlow(String processId,String flowId){
|
||||
ProcessElement processElement = XmlReadUtil.readProcess(processId);
|
||||
if (processElement!=null){
|
||||
return processElement.flowId(flowId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static class XmlReadUtil{
|
||||
|
||||
static FileSystemResourceLoader loader = new FileSystemResourceLoader();
|
||||
|
||||
@SneakyThrows
|
||||
public static ProcessElement readProcess(String processId){//生成参数:
|
||||
Function<XMLStreamReader, ProcessElement> function = xtr -> {
|
||||
try {
|
||||
while (xtr.hasNext()){
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
System.out.println(xtr.getLocalName()+"___"+processId);
|
||||
if (xtr.getLocalName().equals("process") && xtr.getAttributeValue(0).equals(processId)){
|
||||
BaseConverter converter = converterMap.get(xtr.getLocalName());
|
||||
return (ProcessElement)converter.process(xtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception ex){
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
}
|
||||
return null;
|
||||
};
|
||||
ProcessElement processElement = readXml("classpath:/scheduler.xml", function);
|
||||
return processElement;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static List<BaseElement> readall() {
|
||||
//生成参数:
|
||||
Function<XMLStreamReader, List> function = xtr -> {
|
||||
List<BaseElement> list = new ArrayList<>();
|
||||
try {
|
||||
while (xtr.hasNext()) {
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()) {
|
||||
System.out.println(xtr.getLocalName());
|
||||
BaseConverter converter = converterMap.get(xtr.getLocalName());
|
||||
if (converter != null) {
|
||||
list.add(converter.process(xtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception ex){
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
}
|
||||
return list;
|
||||
};
|
||||
List<BaseElement> baseElements = readXml("classpath:/scheduler.xml", function);
|
||||
return baseElements;
|
||||
}
|
||||
private static<T> T readXml(String path, Function<XMLStreamReader, T> function) throws IOException, XMLStreamException {
|
||||
FileInputStream inputStream = null;
|
||||
InputStreamReader streamReader = null;
|
||||
Resource resource = loader.getResource(path);
|
||||
try {
|
||||
inputStream = new FileInputStream(resource.getFile());
|
||||
streamReader = new InputStreamReader(inputStream, "UTF-8");
|
||||
//TODO:schama校验
|
||||
XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(streamReader);
|
||||
return function.apply(reader);
|
||||
}finally {
|
||||
if (streamReader!=null){
|
||||
streamReader.close();
|
||||
}
|
||||
if (inputStream!=null){
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(@NotNull Object bean, String beanName) throws BeansException {
|
||||
if (bean instanceof BaseConverter){
|
||||
converterMap.put(beanName,(BaseConverter)bean);
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter;
|
||||
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
public interface BaseConverter {
|
||||
BaseElement process(XMLStreamReader xtr) throws XMLStreamException;
|
||||
|
||||
default void setBaseLabel(BaseElement element,XMLStreamReader xtr,String...labels){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
for (String label : labels) {
|
||||
map.put(label,xtr.getAttributeValue(null,label));
|
||||
}
|
||||
element.setAttributeValue(map);
|
||||
element.setId(xtr.getAttributeValue(null,"id"));
|
||||
element.setName(xtr.getAttributeValue(null,"name"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class BaseElement implements Serializable {
|
||||
private String id;
|
||||
private String name;
|
||||
private int xmlRowNumber;
|
||||
private int xmlColumnNumber;
|
||||
private Map<String,String> attributeValue;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getXmlRowNumber() {
|
||||
return xmlRowNumber;
|
||||
}
|
||||
|
||||
public void setXmlRowNumber(int xmlRowNumber) {
|
||||
this.xmlRowNumber = xmlRowNumber;
|
||||
}
|
||||
|
||||
public int getXmlColumnNumber() {
|
||||
return xmlColumnNumber;
|
||||
}
|
||||
|
||||
public void setXmlColumnNumber(int xmlColumnNumber) {
|
||||
this.xmlColumnNumber = xmlColumnNumber;
|
||||
}
|
||||
|
||||
public Map<String, String> getAttributeValue() {
|
||||
return attributeValue;
|
||||
}
|
||||
|
||||
public void setAttributeValue(Map<String, String> attributeValue) {
|
||||
this.attributeValue = attributeValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("end")
|
||||
public class EndConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","sourceRef"};
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
EndElement element = new EndElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class EndElement extends FlowElement {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("flow")
|
||||
public class FlowConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","sourceRef","targetRef"};
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
FlowElement element = new FlowElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
String has = xtr.getAttributeValue(null, "has");
|
||||
if (StringUtils.isNotEmpty(has)){
|
||||
int i = 0;
|
||||
while (true){
|
||||
if (i == Integer.valueOf(has)){
|
||||
break;
|
||||
}
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
System.out.println(xtr.getLocalName());
|
||||
Map<String, String> param = new HashMap();
|
||||
param.put(xtr.getAttributeValue(null,"id"),xtr.getAttributeValue(null,"value"));
|
||||
element.getParams().add(param);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class FlowElement extends BaseElement {
|
||||
|
||||
private FlowElement sourceRef;
|
||||
private FlowElement targetRef;
|
||||
private String sourceRefId;
|
||||
private String targetRefId;
|
||||
private List<Map<String,String>> params = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
public FlowElement pre() {
|
||||
return sourceRef;
|
||||
}
|
||||
|
||||
public FlowElement next() {
|
||||
return targetRef;
|
||||
}
|
||||
|
||||
|
||||
protected void setSourceRef(FlowElement sourceRef) {
|
||||
this.sourceRef = sourceRef;
|
||||
}
|
||||
|
||||
|
||||
protected void setTargetRef(FlowElement targetRef) {
|
||||
this.targetRef = targetRef;
|
||||
}
|
||||
|
||||
protected String getSourceRefId() {
|
||||
return sourceRefId;
|
||||
}
|
||||
|
||||
protected void setSourceRefId(String sourceRefId) {
|
||||
this.sourceRefId = sourceRefId;
|
||||
}
|
||||
|
||||
protected String getTargetRefId() {
|
||||
return targetRefId;
|
||||
}
|
||||
|
||||
protected void setTargetRefId(String targetRefId) {
|
||||
this.targetRefId = targetRefId;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(List<Map<String, String>> params) {
|
||||
this.params = params;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("gatway")
|
||||
public class GatwayConverter implements BaseConverter {
|
||||
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("process")
|
||||
public class ProcessConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name"};
|
||||
@Autowired
|
||||
private Map<String,BaseConverter> converterMap;
|
||||
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) throws XMLStreamException {
|
||||
ProcessElement element = new ProcessElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
while (xtr.hasNext()){
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
String localName = xtr.getLocalName();
|
||||
element.getFlowElements().add((FlowElement) converterMap.get(localName).process(xtr));
|
||||
if (localName.equals("end")){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, FlowElement> eleMap = element.getFlowElements().stream().collect(HashMap::new, (k, v) -> k.put(v.getId(), v), HashMap::putAll);
|
||||
for (FlowElement flowElement : element.getFlowElements()) {
|
||||
flowElement.setTargetRef(eleMap.get(flowElement.getTargetRefId()));
|
||||
flowElement.setSourceRef(eleMap.get(flowElement.getSourceRefId()));
|
||||
}
|
||||
element.setStartElement(eleMap.get("start"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class ProcessElement extends BaseElement {
|
||||
|
||||
private StartElement startElement;
|
||||
|
||||
private List<FlowElement> flowElements = new ArrayList<>();
|
||||
|
||||
public List<FlowElement> getFlowElements() {
|
||||
return flowElements;
|
||||
}
|
||||
|
||||
public FlowElement flowId(String flowId){
|
||||
for (FlowElement flowElement : flowElements) {
|
||||
if (flowElement.getId().equals(flowId)){
|
||||
return flowElement;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setFlowElements(List<FlowElement> flowElements) {
|
||||
this.flowElements = flowElements;
|
||||
}
|
||||
|
||||
public StartElement getStartElement() {
|
||||
return startElement;
|
||||
}
|
||||
|
||||
|
||||
public void setStartElement(BaseElement startElement) {
|
||||
this.startElement = (StartElement)startElement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("start")
|
||||
public class StartConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","targetRef"};
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
StartElement element = new StartElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class StartElement extends FlowElement {
|
||||
|
||||
}
|
||||
@@ -321,6 +321,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
6.更新库存、日物流表等、
|
||||
*/
|
||||
|
||||
|
||||
String struct_id = whereJson.getString("struct_id");
|
||||
StIvtStructattr attrDao = new StIvtStructattr();
|
||||
|
||||
@@ -335,10 +336,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
/* 手动分配 */
|
||||
|
||||
// 查出对应仓位
|
||||
attrDao = iStIvtStructattrService.getOne(
|
||||
new QueryWrapper<StIvtStructattr>().lambda()
|
||||
.eq(StIvtStructattr::getStruct_id,struct_id)
|
||||
);
|
||||
attrDao = iStIvtStructattrService.getById(struct_id);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(attrDao.getStruct_code())) throw new BadRequestException("未找到仓位!");
|
||||
@@ -346,7 +344,18 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
// 2.更新分配明细、分配、明细、主表
|
||||
updateDivIos(attrDao,whereJson);
|
||||
|
||||
// TODO 更新点位
|
||||
// 3.更新仓位状态 - 锁定
|
||||
StIvtIostorinvCp mstDao = this.getById(whereJson.getString("iostorinv_id"));
|
||||
|
||||
attrDao.setLock_type("01"); // TODO 暂时写死
|
||||
attrDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
attrDao.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
attrDao.setUpdate_time(new Date());
|
||||
attrDao.setInv_type(IOSEnum.IO_TYPE.code("入库"));
|
||||
attrDao.setInv_id(mstDao.getIostorinv_id());
|
||||
attrDao.setInv_code(mstDao.getBill_code());
|
||||
iStIvtStructattrService.updateById(attrDao);
|
||||
|
||||
// TODO 更新库存、物流等
|
||||
}
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@ spring:
|
||||
enabled: true
|
||||
client:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.225:8200 #外网
|
||||
endpoints: http://192.168.46.225:8200 #外网
|
||||
#endpoints: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# endpoints: 47.96.133.178:8200 #外网
|
||||
endpoints: http://47.96.133.178:8200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# uris: 192.168.46.225:8200 #外网
|
||||
uris: http://192.168.46.225:9200 #外网
|
||||
# username: elastic
|
||||
# password: 123456
|
||||
#uris: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# uris: 47.96.133.178:8200 #外网
|
||||
uris: http://47.96.133.178:8200 #外网
|
||||
username: elastic
|
||||
password: 123456
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
@@ -8,14 +8,14 @@ spring:
|
||||
enabled: true
|
||||
client:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.2255:8200 #外网
|
||||
endpoints: http://192.168.46.2255:8200 #外网
|
||||
#endpoints: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# endpoints: 47.96.133.1785:8200 #外网
|
||||
endpoints: http://47.96.133.1785:8200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# uris: 192.168.46.2255:8200 #外网
|
||||
uris: http://192.168.46.2255:8200 #外网
|
||||
#uris: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# uris: 47.96.133.1785:8200 #外网
|
||||
uris: http://47.96.133.1785:8200 #外网
|
||||
username: elastic
|
||||
password: 123456
|
||||
datasource:
|
||||
|
||||
@@ -10,7 +10,7 @@ spring:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.2255:8200 #外网
|
||||
endpoints: http://192.168.46.2255:8200 #外网
|
||||
endpoints: http://192.168.46.2255:9200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
|
||||
@@ -92,3 +92,4 @@ mybatis-plus:
|
||||
db-config:
|
||||
id-type: INPUT
|
||||
banner: false
|
||||
schedulerFile: classpath:/scheduler.xml
|
||||
|
||||
@@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<!--引入默认的一些设置-->
|
||||
<!-- <include resource="log/AutoCreateInst.xml"/>-->
|
||||
<!-- <appender name="esLogAppender" class="com.internetitem.logback.elasticsearch.ElasticsearchAppender">
|
||||
<url>http://192.168.46.2255:8200/_bulk</url>
|
||||
<url>http://47.96.133.1785:8200/_bulk</url>
|
||||
<index>${esIndex}</index>
|
||||
<type>mes_log</type>
|
||||
<loggerName>es-logger</loggerName> <!– optional –>
|
||||
|
||||
22
mes/hd/nladmin-system/src/main/resources/scheduler.xml
Normal file
22
mes/hd/nladmin-system/src/main/resources/scheduler.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions>
|
||||
<process id="JGXJ" name="机关下料">
|
||||
<start id="start" name="Starter" targetRef="A1_JGXJ"></start>
|
||||
<flow id="A1_JGXJ" name="机关下料工序" sourceRef="start" targetRef="A1_TWYTJ"></flow>
|
||||
<flow id="A1_TWYTJ" name="推弯工序" sourceRef="A1_JGXJ" targetRef="A1_SKQX"></flow>
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_TWYTJ" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
<process id="WXXL" name="直管无屑下料">
|
||||
<start id="start" name="Starter" targetRef="A1_WXXL"></start>
|
||||
<flow id="A1_WXXL" name="无屑下料工序" has="3" sourceRef="starter" targetRef="A1_STLS">
|
||||
<param id="param1" value="param1"/>
|
||||
<param id="param2" value="param2"/>
|
||||
<param id="param3" value="param3"/>
|
||||
</flow>
|
||||
<flow id="A1_STLS" name="三通拉伸工序" sourceRef="A1_WXXL" targetRef="A1_TK"></flow>
|
||||
<flow id="A1_TK" name="镗孔" sourceRef="A1_TK" targetRef="end"></flow>
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_TK" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
</definitions>
|
||||
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
@@ -0,0 +1,56 @@
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Test3 {
|
||||
public static void main(String[] args) {
|
||||
JSONArray array = new JSONArray();
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("name", "小三");
|
||||
jsonObject1.put("age", "12");
|
||||
array.add(jsonObject1);
|
||||
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("name", "小二");
|
||||
jsonObject2.put("age", "17");
|
||||
array.add(jsonObject2);
|
||||
|
||||
JSONObject jsonObject3 = new JSONObject();
|
||||
jsonObject3.put("name", "小二");
|
||||
jsonObject3.put("age", "17");
|
||||
array.add(jsonObject3);
|
||||
|
||||
Set<JSONObject> name = array.stream().map(row -> ((JSONObject) row)).collect(Collectors.toSet());
|
||||
HashMap<String, JSONObject> name1 = array.stream().collect(HashMap::new, (k, v) -> k.put(((JSONObject) v).getString("name"), (JSONObject) v), HashMap::putAll);
|
||||
HashSet<JSONObject> collect = array.stream().collect(HashSet::new, (k, v) -> k.add((JSONObject) v), HashSet::addAll);
|
||||
collect.stream().forEach(json -> a(json.getString("name")));
|
||||
|
||||
List<Map> maps = new ArrayList<>();
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("storagevehicle_code","1");
|
||||
map.put("storagevehicle_name","sadfs");
|
||||
maps.add(map);
|
||||
HashMap<String, String> map2 = new HashMap<>();
|
||||
map2.put("storagevehicle_code","2");
|
||||
map2.put("storagevehicle_name","sdfd");
|
||||
maps.add(map2);
|
||||
|
||||
boolean age = array.stream().filter(row -> ((JSONObject) row).getString("age").equals("18")).findAny().isPresent();
|
||||
System.out.println(age);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void a(String name) {
|
||||
}
|
||||
|
||||
public static void b(String name) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function getStor(params) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/getStor',
|
||||
url: '/api/Storattr/getStor',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -34,7 +34,7 @@ export function getStor(params) {
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/changeActive',
|
||||
url: '/api/Storattr/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -42,7 +42,7 @@ export function changeActive(data) {
|
||||
|
||||
export function queryStor(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/queryStor',
|
||||
url: '/api/Storattr/queryStor',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -223,6 +223,7 @@ import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
import crudPoint from '@/views/wms/scheduler_manage/point/point'
|
||||
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
|
||||
export default {
|
||||
name: 'DivDialog',
|
||||
@@ -285,7 +286,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudProductIn.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
const area_type = 'A1_RK01'
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开箱机
|
||||
* 刻字包装机
|
||||
*/
|
||||
@Service
|
||||
public class HailiangOldLetteringPackageDeviceDefination implements OpcDeviceDriverDefination {
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 老车间-刻字包装输送线
|
||||
* 老车间-刻字包装机
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@@ -76,10 +76,7 @@ public class HailiangOldLetteringPackageDeviceDriver extends AbstractOpcDeviceDr
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
mode = this.itemProtocol.getMode();
|
||||
move = this.itemProtocol.getMove();
|
||||
error = this.itemProtocol.getError();
|
||||
task = this.itemProtocol.getTask();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||
@@ -96,9 +93,6 @@ public class HailiangOldLetteringPackageDeviceDriver extends AbstractOpcDeviceDr
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error + "复位请求标记");
|
||||
}
|
||||
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task + "复位请求标记");
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
@@ -117,12 +111,6 @@ public class HailiangOldLetteringPackageDeviceDriver extends AbstractOpcDeviceDr
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
|
||||
if(move == 1 && error == 0 && barcode.length() > 0){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -150,27 +138,27 @@ public class HailiangOldLetteringPackageDeviceDriver extends AbstractOpcDeviceDr
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||
EalingOrderDto ealingOrderDto = dto.getEalingOrderDto();
|
||||
if (ealingOrderDto != null) {
|
||||
String is_foreward = ealingOrderDto.getIs_foreward();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_clear", "1");
|
||||
map.put("to_is_foreward", is_foreward);
|
||||
map.put("to_order_box_num", ealingOrderDto.getOrder_box_num());
|
||||
map.put("to_order", ealingOrderDto.getOrder_code());
|
||||
map.put("to_qty", dto.getQty());
|
||||
map.put("to_order", dto.getOrder_code());
|
||||
map.put("item_to_bz_qty", dto.getPackage_qty());
|
||||
map.put("item_to_box_qty", dto.getBox_num());
|
||||
map.put("to_one_box_qty", dto.getOne_box_package_qty());
|
||||
map.put("to_one_bag_qty", dto.getOne_package_qty());
|
||||
map.put("to_one_box_qty", dto.getOne_box_package_qty());
|
||||
this.writing(map);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issuedOrderFinish(String autoFinish) {
|
||||
if (StrUtil.equals(autoFinish, WorkerOrderEnum.FORCEFINISH.getCode())) {
|
||||
this.writing("to_order_compel_finished", "1");
|
||||
} else {
|
||||
this.writing("to_confirm_finished", "1");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,20 +13,32 @@ public class ItemProtocol {
|
||||
|
||||
public static String item_heartbeat = "heartbeat";
|
||||
public static String item_mode = "mode";
|
||||
public static String item_move = "move";
|
||||
public static String item_action = "action";
|
||||
public static String item_kz_mode = "kz_mode";
|
||||
public static String item_ds_mode = "ds_mode";
|
||||
public static String item_bz_mode = "bz_mode";
|
||||
public static String item_kz_status = "kz_status";
|
||||
public static String item_ds_status = "ds_status";
|
||||
public static String item_bz_status = "bz_status";
|
||||
public static String item_error = "error";
|
||||
public static String item_direction = "direction";
|
||||
public static String item_vehicle_type = "vehicle_type";
|
||||
public static String item_task = "task";
|
||||
public static String item_barcode = "barcode";
|
||||
|
||||
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_target = "to_target";
|
||||
public static String item_to_vehicle_type = "to_vehicle_type";
|
||||
public static String item_to_task = "to_task";
|
||||
public static String item_kz_error = "kz_error";
|
||||
public static String item_ds_error = "ds_error";
|
||||
public static String item_bz_error = "bz_error";
|
||||
public static String item_kz_qty = "kz_qty";
|
||||
public static String item_ds_qty = "ds_qty";
|
||||
public static String item_bz_qty = "bz_qty";
|
||||
public static String item_order_finish = "order_finish";
|
||||
public static String item_order_compulsion_finish = "order_compulsion_finish";
|
||||
public static String item_order = "order";
|
||||
|
||||
public static String item_to_order_qty = "to_order_qty";
|
||||
public static String item_to_bz_qty = "to_bz_qty";
|
||||
public static String item_to_box_qty = "to_box_qty";
|
||||
public static String item_to_one_box_qty = "to_one_box_qty";
|
||||
public static String item_to_one_bag_qty = "to_one_bag_qty";
|
||||
public static String item_to_finish = "to_finish";
|
||||
public static String item_to_compulsion_finish = "to_compulsion_finish";
|
||||
public static String item_to_order = "to_order";
|
||||
public static String item_to_clear = "to_clear";
|
||||
|
||||
|
||||
private HailiangOldLetteringPackageDeviceDriver driver;
|
||||
@@ -43,45 +55,62 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_mode);
|
||||
}
|
||||
|
||||
public int getMove() {
|
||||
return this.getOpcIntegerValue(item_move);
|
||||
public int getKz_mode() {
|
||||
return this.getOpcIntegerValue(item_kz_mode);
|
||||
}
|
||||
|
||||
public int getAction() {
|
||||
return this.getOpcIntegerValue(item_action);
|
||||
public int getDs_mode() {
|
||||
return this.getOpcIntegerValue(item_ds_mode);
|
||||
}
|
||||
|
||||
public String getBarcode() {
|
||||
return this.getOpcStringValue(item_barcode);
|
||||
public int getBz_mode() {
|
||||
return this.getOpcIntegerValue(item_bz_mode);
|
||||
}
|
||||
|
||||
public int getKz_status() {
|
||||
return this.getOpcIntegerValue(item_kz_status);
|
||||
}
|
||||
|
||||
public int getDs_status() {
|
||||
return this.getOpcIntegerValue(item_ds_status);
|
||||
}
|
||||
|
||||
public int getBz_status() {
|
||||
return this.getOpcIntegerValue(item_bz_status);
|
||||
}
|
||||
|
||||
public int getKz_qty() {
|
||||
return this.getOpcIntegerValue(item_kz_qty);
|
||||
}
|
||||
|
||||
public int getDs_qty() {
|
||||
return this.getOpcIntegerValue(item_ds_qty);
|
||||
}
|
||||
|
||||
public int getBz_qty() {
|
||||
return this.getOpcIntegerValue(item_bz_qty);
|
||||
}
|
||||
|
||||
public int getError() {
|
||||
return this.getOpcIntegerValue(item_error);
|
||||
}
|
||||
|
||||
public int getVehicle_type() {
|
||||
return this.getOpcIntegerValue(item_vehicle_type);
|
||||
public int getKz_error() {
|
||||
return this.getOpcIntegerValue(item_kz_error);
|
||||
}
|
||||
|
||||
public int getTask() {
|
||||
return this.getOpcIntegerValue(item_task);
|
||||
public int getDs_error() {
|
||||
return this.getOpcIntegerValue(item_ds_error);
|
||||
}
|
||||
|
||||
public int getToCommand() {
|
||||
return this.getOpcIntegerValue(item_to_command);
|
||||
public int getBz_error() {
|
||||
return this.getOpcIntegerValue(item_bz_error);
|
||||
}
|
||||
|
||||
public int getToTarget() {
|
||||
return this.getOpcIntegerValue(item_to_target);
|
||||
public int getOrder() {
|
||||
return this.getOpcIntegerValue(item_order);
|
||||
}
|
||||
|
||||
public int getToVehicle_type() {
|
||||
return this.getOpcIntegerValue(item_to_vehicle_type);
|
||||
}
|
||||
|
||||
public int getToTask() {
|
||||
return this.getOpcIntegerValue(item_to_task);
|
||||
}
|
||||
|
||||
//是否有货
|
||||
public int hasGoods(int move) {
|
||||
@@ -116,24 +145,38 @@ public class ItemProtocol {
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "VW2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电开关信号", "VW4"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "VW6"));
|
||||
list.add(new ItemDto(item_direction, "电机方向", "VW8"));
|
||||
list.add(new ItemDto(item_vehicle_type, "托盘类型", "VW10"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "VW12"));
|
||||
list.add(new ItemDto(item_task, "任务号", "VD14"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "VB18.20"));
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.W0"));
|
||||
list.add(new ItemDto(item_mode, "工作模式", "DB600.W2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_kz_mode, "刻字机工作模式", "DB600.W4", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_ds_mode, "点数机工作模式", "DB600.W6", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_bz_mode, "包装机工作模式", "DB600.W8", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_kz_status, "刻字机工作状态", "DB600.W10"));
|
||||
list.add(new ItemDto(item_ds_status, "点数机工作状态", "DB600.W12"));
|
||||
list.add(new ItemDto(item_bz_status, "包装机工作状态", "DB600.W14"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB600.W16"));
|
||||
list.add(new ItemDto(item_kz_error, "刻字机报警信号", "DB600.W18"));
|
||||
list.add(new ItemDto(item_ds_error, "点数机报警信号", "DB600.W20"));
|
||||
list.add(new ItemDto(item_bz_error, "包装机报警信号", "DB600.W22"));
|
||||
list.add(new ItemDto(item_kz_qty, "刻字数量", "DB600.W24"));
|
||||
list.add(new ItemDto(item_ds_qty, "点数数量", "DB600.W26"));
|
||||
list.add(new ItemDto(item_bz_qty, "包装数量", "DB600.W28"));
|
||||
list.add(new ItemDto(item_order_finish, "工单完成", "DB600.W30"));
|
||||
list.add(new ItemDto(item_order_compulsion_finish, "工单强制完成", "DB600.W32"));
|
||||
list.add(new ItemDto(item_order, "工单号", "DB600.D34"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "下发作业命令", "VW2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_target, "下发目标站", "VW4"));
|
||||
list.add(new ItemDto(item_to_vehicle_type, "下发托盘类型", "VW6"));
|
||||
list.add(new ItemDto(item_to_task, "任务号", "VD8"));
|
||||
list.add(new ItemDto(item_to_order_qty, "下发工单数量", "DB610.W2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_bz_qty, "下发包装袋数", "DB610.W4"));
|
||||
list.add(new ItemDto(item_to_box_qty, "下发箱数", "DB610.W6"));
|
||||
list.add(new ItemDto(item_to_one_box_qty, "下发每箱袋数", "DB610.W8"));
|
||||
list.add(new ItemDto(item_to_one_bag_qty, "下发每袋数量", "DB610.W10"));
|
||||
list.add(new ItemDto(item_to_finish, "下发工单完成反馈", "DB610.W12"));
|
||||
list.add(new ItemDto(item_to_compulsion_finish, "下发工单强制完成反馈", "DB610.W14"));
|
||||
list.add(new ItemDto(item_to_order, "下发工单号", "DB610.D16"));
|
||||
list.add(new ItemDto(item_to_clear, "下发清零", "DB610.W20"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangOldPackageReceivingStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo {
|
||||
public class HailiangOldPackageReceivingStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@@ -162,36 +162,4 @@ public class HailiangOldPackageReceivingStationDeviceDriver extends AbstractOpcD
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||
EalingOrderDto ealingOrderDto = dto.getEalingOrderDto();
|
||||
if (ealingOrderDto != null) {
|
||||
String is_foreward = ealingOrderDto.getIs_foreward();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_clear", "1");
|
||||
map.put("to_is_foreward", is_foreward);
|
||||
map.put("to_order_box_num", ealingOrderDto.getOrder_box_num());
|
||||
map.put("to_order", ealingOrderDto.getOrder_code());
|
||||
this.writing(map);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issuedOrderFinish(String autoFinish) {
|
||||
if (StrUtil.equals(autoFinish, WorkerOrderEnum.FORCEFINISH.getCode())) {
|
||||
this.writing("to_order_compel_finished", "1");
|
||||
} else {
|
||||
this.writing("to_confirm_finished", "1");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toStop() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toStart() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
this.writing("to_command", "0");
|
||||
this.writing("to_target", "0");
|
||||
}
|
||||
requireSucess =false;
|
||||
}
|
||||
|
||||
if (error != last_error) {
|
||||
if (error != 0) {
|
||||
DeviceErrorLogDto dto = new DeviceErrorLogDto();
|
||||
@@ -104,7 +104,6 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号error:" + last_error + "->" + error + "复位请求标记");
|
||||
}
|
||||
|
||||
if (task != last_task) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号task:" + last_task + "->" + task + "复位请求标记");
|
||||
}
|
||||
@@ -126,7 +125,7 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
|
||||
if(move == 1 && error == 0 && barcode.length() > 0){
|
||||
if(move == 1 && error == 0 && barcode.length() > 0 && requireSucess == false ){
|
||||
//2305281100001
|
||||
if(barcode.trim().length() == 16){
|
||||
if(isNumeric(barcode.trim())){
|
||||
@@ -140,9 +139,10 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
int isFlip = Integer.parseInt(barcode.trim().substring(9,10));
|
||||
int target = Integer.parseInt(barcode.trim().substring(10,11));
|
||||
if(isFlip>0 && target>0){
|
||||
this.writing("to_command", String.valueOf(isFlip));
|
||||
this.writing("to_is_flip",String.valueOf(isFlip));
|
||||
this.writing("to_target", String.valueOf(target));
|
||||
|
||||
this.writing("to_command","1");
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = "条码:"+ barcode + ",是否翻转:"+isFlip + "目标巷道:"+target;
|
||||
}
|
||||
@@ -165,6 +165,7 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
last_move = move;
|
||||
last_error = error;
|
||||
last_task = task;
|
||||
last_barcode = barcode;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,8 +173,33 @@ public class HailiangLetteringPackageSsxDeviceDriver extends AbstractOpcDeviceDr
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode == 1 ? "联机" : "未联机");
|
||||
jo.put("move", move == 1 ? "有货" : "无货");
|
||||
String mode = "";
|
||||
String action = "";
|
||||
String move = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
jo.put("hasGoods", false);
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
jo.put("hasGoods", true);
|
||||
} else if (this.getMove() == 2) {
|
||||
move = "有托盘有货";
|
||||
jo.put("move", move);
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
jo.put("move", move);
|
||||
jo.put("mode", mode);
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
jo.put("task", task);
|
||||
jo.put("barcode", barcode);
|
||||
|
||||
@@ -19,15 +19,17 @@ public class ItemProtocol {
|
||||
public static String item_action = "action";
|
||||
public static String item_error = "error";
|
||||
public static String item_direction = "direction";
|
||||
public static String item_vehicle_type = "vehicle_type";
|
||||
public static String item_is_flip = "is_flip";
|
||||
public static String item_task = "task";
|
||||
public static String item_barcode = "barcode";
|
||||
|
||||
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_target = "to_target";
|
||||
public static String item_to_vehicle_type = "to_vehicle_type";
|
||||
public static String item_to_task = "to_task";
|
||||
public static String item_to_is_flip = "to_is_flip";
|
||||
public static String item_to_barcode = "to_barcode";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -61,8 +63,8 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_error);
|
||||
}
|
||||
|
||||
public int getVehicle_type() {
|
||||
return this.getOpcIntegerValue(item_vehicle_type);
|
||||
public int getIsflip() {
|
||||
return this.getOpcIntegerValue(item_is_flip);
|
||||
}
|
||||
|
||||
public int getTask() {
|
||||
@@ -77,10 +79,6 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_target);
|
||||
}
|
||||
|
||||
public int getToVehicle_type() {
|
||||
return this.getOpcIntegerValue(item_to_vehicle_type);
|
||||
}
|
||||
|
||||
public int getToTask() {
|
||||
return this.getOpcIntegerValue(item_to_task);
|
||||
}
|
||||
@@ -123,7 +121,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_move, "光电开关信号", "DB600.W4"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB600.W6"));
|
||||
list.add(new ItemDto(item_direction, "电机方向", "DB600.W8"));
|
||||
list.add(new ItemDto(item_vehicle_type, "托盘类型", "DB600.W10"));
|
||||
list.add(new ItemDto(item_is_flip, "是否翻转", "DB600.W10"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB600.W12"));
|
||||
list.add(new ItemDto(item_task, "任务号", "DB600.D14"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB600.STRING18.20"));
|
||||
@@ -132,10 +130,11 @@ public class ItemProtocol {
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "下发作业命令", "DB601.W0", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_target, "下发目标站", "DB601.W2"));
|
||||
list.add(new ItemDto(item_to_vehicle_type, "下发托盘类型", "DB601.W4"));
|
||||
list.add(new ItemDto(item_to_task, "任务号", "DB601.D6"));
|
||||
list.add(new ItemDto(item_to_command, "下发作业命令", "DB610.W2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_target, "下发目标站", "DB610.W4"));
|
||||
list.add(new ItemDto(item_to_is_flip, "下发是否翻转", "DB610.W6"));
|
||||
list.add(new ItemDto(item_to_task, "下发任务号", "DB610.D8"));
|
||||
list.add(new ItemDto(item_to_barcode, "下发条码", "DB610.STRING12.20"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
@@ -185,6 +186,34 @@ public class HailiangOldPalletizingStationDriver extends AbstractOpcDeviceDriver
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
String mode = "";
|
||||
String action = "";
|
||||
String move = "";
|
||||
if (this.getMode() == 0) {
|
||||
mode = "未联机";
|
||||
} else if (this.getMode() == 1) {
|
||||
mode = "单机";
|
||||
} else if (this.getMode() == 2) {
|
||||
mode = "联机";
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = "运行中";
|
||||
}
|
||||
if (this.getMove() == 0) {
|
||||
move = "无货";
|
||||
jo.put("hasGoods", false);
|
||||
} else if (this.getMove() == 1) {
|
||||
move = "有货";
|
||||
jo.put("hasGoods", true);
|
||||
} else if (this.getMove() == 2) {
|
||||
move = "有托盘有货";
|
||||
jo.put("hasGoods", true);
|
||||
}
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("error", ErrorUtil.getDictDetail("ssx_error_type", String.valueOf(error)));
|
||||
jo.put("isOnline", this.itemProtocol.getIsonline());
|
||||
jo.put("message", message);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package org.nl.acs.device_driver.basedriver.hailiang_old.hailiang_old_stacking_manipulator;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -8,18 +11,25 @@ import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_old.hailiang_old_package_ssx.HailiangLetteringPackageSsxDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_old.hailiang_old_palletizing_station.HailiangOldPalletizingStationDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_auto_cache_line.HailiangAutoCacheLineDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.order.service.ProduceshiftorderService;
|
||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.modules.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.modules.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -52,6 +62,9 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean(ProduceshiftorderService.class);
|
||||
@Autowired
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
|
||||
@Autowired
|
||||
LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
|
||||
|
||||
//心跳
|
||||
int heartbeat = 0;
|
||||
int last_heartbeat = 0;
|
||||
@@ -87,7 +100,7 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
//请求码垛完成标志
|
||||
Boolean stackingRequireSuccess = false;
|
||||
|
||||
|
||||
JSONArray barcodeArr = new JSONArray();
|
||||
//当前设备状态 01代表 关机, 02代表 开机, 03代表 生产中, 04代表 待机, 05代表 异常
|
||||
int status_type = 0;
|
||||
//上次设备状态
|
||||
@@ -139,6 +152,9 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号status:" + last_status + "->" + status);
|
||||
}
|
||||
if (action != last_action) {
|
||||
vehicleInfoRequireSuccess = false;
|
||||
singlePlacementRequireSuccess =false;
|
||||
stackingRequireSuccess = false;
|
||||
logServer.deviceItemValue(this.device_code, "action", String.valueOf(action));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号action:" + last_action + "->" + action);
|
||||
}
|
||||
@@ -220,28 +236,92 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
//根据kep读取到的抓取工位的值 - 1 得到对应设备的下标,再根据下标获得对应设备的编码
|
||||
String getDeviceCode = getDeviceCodeList.get(getGetStation() - 1).replace("\"", "");
|
||||
//根据抓取工位获取托盘信息
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("getStation", getDeviceCode);
|
||||
JSONObject resp = acsToWmsService.getVehicle(map);
|
||||
int code = Integer.parseInt(resp.getString("code"));
|
||||
String message = resp.getString("message");
|
||||
String getStation = resp.getString("getStation");
|
||||
String putStation = resp.getString("putStation");
|
||||
String encoder_qty = resp.getString("encoder_qty");
|
||||
String boxtype = resp.getString("boxtype");
|
||||
if (code == 200) {
|
||||
//根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
||||
int getIndex = getDeviceCodeList.indexOf(getStation);
|
||||
int putIndex = putDeviceCodeList.indexOf(putStation);
|
||||
//将的到的索引 + 1 写入kep中
|
||||
this.writing("to_getStation", String.valueOf(getIndex + 1));
|
||||
// JSONObject map = new JSONObject();
|
||||
// map.put("getStation", getDeviceCode);
|
||||
// JSONObject resp = acsToWmsService.getVehicle(map);
|
||||
// int code = Integer.parseInt(resp.getString("code"));
|
||||
// String message = resp.getString("message");
|
||||
// String getStation = resp.getString("getStation");
|
||||
// String putStation = resp.getString("putStation");
|
||||
// String encoder_qty = resp.getString("encoder_qty");
|
||||
// String boxtype = resp.getString("boxtype");
|
||||
// if (code == 200) {
|
||||
// //根据获取托盘信息返回的结果 得到对应抓取工位/放货工位设备编码所在的索引位置
|
||||
// int getIndex = getDeviceCodeList.indexOf(getStation);
|
||||
// int putIndex = putDeviceCodeList.indexOf(putStation);
|
||||
// //将的到的索引 + 1 写入kep中
|
||||
// this.writing("to_getStation", String.valueOf(getIndex + 1));
|
||||
// this.writing("to_putStation", String.valueOf(putIndex + 1));
|
||||
// this.writing("to_boxtype", boxtype);
|
||||
// this.writing("to_feedback", "1");
|
||||
// //获取托盘信息成功后 设为true 防止多次请求 等单次防止完成时设为false
|
||||
// this.setVehicleInfoRequireSuccess(true);
|
||||
// } else {
|
||||
// log.warn("获取托盘信息失败!设备号:{},原因{}", device_code, message);
|
||||
// }
|
||||
|
||||
int getIndex = 0;
|
||||
int putIndex = 0;
|
||||
//获取取货位条码
|
||||
Device getDevice = deviceAppservice.findDeviceByCode(getDeviceCode);
|
||||
HailiangLetteringPackageSsxDeviceDriver hailiangLetteringPackageSsxDeviceDriver;
|
||||
if(getDevice.getDeviceDriver() instanceof HailiangLetteringPackageSsxDeviceDriver ) {
|
||||
hailiangLetteringPackageSsxDeviceDriver = (HailiangLetteringPackageSsxDeviceDriver) getDevice.getDeviceDriver();
|
||||
String barcode = hailiangLetteringPackageSsxDeviceDriver.getBarcode();
|
||||
if (Objects.isNull(barcode)) {
|
||||
message = "获取托盘信息,取货位:" + getDeviceCode + "条码为空";
|
||||
return false;
|
||||
}
|
||||
String order = barcode.trim().substring(0,9);
|
||||
ProduceshiftorderDto dto =produceshiftorderService.findByCodeFromCache(order);
|
||||
if(Objects.isNull(dto)){
|
||||
message = "获取托盘信息,工单号:" + order + "未找到对应工单";
|
||||
return false;
|
||||
}
|
||||
String boxType = dto.getBox_type();
|
||||
String tray_full_num = dto.getTray_full_num();
|
||||
String targetStation = null;
|
||||
for(int i=0;i<putDeviceCodeList.size();i++){
|
||||
Device device = deviceAppservice.findDeviceByCode(putDeviceCodeList.get(i));
|
||||
HailiangOldPalletizingStationDriver hailiangOldPalletizingStationDriver;
|
||||
if(device.getDeviceDriver() instanceof HailiangOldPalletizingStationDriver){
|
||||
hailiangOldPalletizingStationDriver = (HailiangOldPalletizingStationDriver) device.getDeviceDriver();
|
||||
if(hailiangOldPalletizingStationDriver.getMode() == 2 && hailiangOldPalletizingStationDriver.getMove()==1
|
||||
&& StrUtil.equals(String.valueOf(hailiangOldPalletizingStationDriver.getBoxtype()),boxType)
|
||||
&& hailiangOldPalletizingStationDriver.getNumber() < Integer.parseInt(tray_full_num) ){
|
||||
targetStation = putDeviceCodeList.get(i);
|
||||
putIndex = i;
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code,"单次码垛完成,取货位:"+getDeviceCode+",条码:"+barcode +",分配放货位:"+ putDeviceCodeList.get(i)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StrUtil.isEmpty(targetStation)){
|
||||
for(int i=0;i<putDeviceCodeList.size();i++){
|
||||
Device device = deviceAppservice.findDeviceByCode(putDeviceCodeList.get(i));
|
||||
HailiangOldPalletizingStationDriver hailiangOldPalletizingStationDriver;
|
||||
if(device.getDeviceDriver() instanceof HailiangOldPalletizingStationDriver){
|
||||
hailiangOldPalletizingStationDriver = (HailiangOldPalletizingStationDriver) device.getDeviceDriver();
|
||||
if(hailiangOldPalletizingStationDriver.getNumber() == 0 ){
|
||||
targetStation = putDeviceCodeList.get(i);
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code,"单次码垛完成,取货位:"+getDeviceCode+",条码:"+barcode +",未找到相同箱型放货位,分配空放货位:"+ putDeviceCodeList.get(i)));
|
||||
putIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StrUtil.isEmpty(targetStation)){
|
||||
message = "单次码垛完成,取货位["+getDeviceCode+"],条码["+barcode + "]未找到可放置的放货位";
|
||||
return false;
|
||||
}
|
||||
|
||||
this.writing("to_getStation", String.valueOf(this.getStation));
|
||||
this.writing("to_putStation", String.valueOf(putIndex + 1));
|
||||
this.writing("to_boxtype", boxtype);
|
||||
this.writing("to_boxtype", boxType);
|
||||
this.writing("to_feedback", "1");
|
||||
//获取托盘信息成功后 设为true 防止多次请求 等单次防止完成时设为false
|
||||
this.setVehicleInfoRequireSuccess(true);
|
||||
} else {
|
||||
log.warn("获取托盘信息失败!设备号:{},原因{}", device_code, message);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -264,21 +344,38 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
String getDeviceCode = getDeviceCodeList.get(getGetStation() - 1).replace("\"", "");
|
||||
//根据kep读取到的放货工位的值 - 1 得到对应设备的下标,再根据下标获得对应设备的编码
|
||||
String putDeviceCode = putDeviceCodeList.get(getPutStation() - 1).replace("\"", "");
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("getStation", getDeviceCode);
|
||||
map.put("putStation", putDeviceCode);
|
||||
map.put("encoder_qty", getEncoder_qty());
|
||||
map.put("boxtype", getBoxtype());
|
||||
JSONObject resp = acsToWmsService.singlePlacementCompleted(map);
|
||||
int code = Integer.parseInt(resp.getString("code"));
|
||||
String message = resp.getString("message");
|
||||
JSONObject data = resp.getJSONObject("data");
|
||||
if (code == 200) {
|
||||
this.writing("to_feedback", "2");
|
||||
this.setSinglePlacementRequireSuccess(true);
|
||||
} else {
|
||||
log.warn("单次放置完成反馈失败!设备号:{},原因{}", device_code, message);
|
||||
// JSONObject map = new JSONObject();
|
||||
// map.put("getStation", getDeviceCode);
|
||||
// map.put("putStation", putDeviceCode);
|
||||
// map.put("encoder_qty", getEncoder_qty());
|
||||
// map.put("boxtype", getBoxtype());
|
||||
// JSONObject resp = acsToWmsService.singlePlacementCompleted(map);
|
||||
// int code = Integer.parseInt(resp.getString("code"));
|
||||
// String message = resp.getString("message");
|
||||
// JSONObject data = resp.getJSONObject("data");
|
||||
// if (code == 200) {
|
||||
// this.writing("to_feedback", "2");
|
||||
// this.setSinglePlacementRequireSuccess(true);
|
||||
// } else {
|
||||
// log.warn("单次放置完成反馈失败!设备号:{},原因{}", device_code, message);
|
||||
// }
|
||||
|
||||
//暂时不反馈MES
|
||||
Device getDevice = deviceAppservice.findDeviceByCode(getDeviceCode);
|
||||
HailiangLetteringPackageSsxDeviceDriver hailiangLetteringPackageSsxDeviceDriver;
|
||||
if(getDevice.getDeviceDriver() instanceof HailiangLetteringPackageSsxDeviceDriver ){
|
||||
hailiangLetteringPackageSsxDeviceDriver = (HailiangLetteringPackageSsxDeviceDriver) getDevice.getDeviceDriver();
|
||||
String barcode = hailiangLetteringPackageSsxDeviceDriver.getLast_barcode();
|
||||
if(Objects.isNull(barcode)){
|
||||
message = "单次码垛完成,取货位:"+getDeviceCode+"条码为空";
|
||||
return false;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code,"单次码垛完成,取货位:"+getDeviceCode+",条码:"+barcode));
|
||||
barcodeArr.add(barcode);
|
||||
}
|
||||
|
||||
this.writing("to_feedback", "2");
|
||||
this.setSinglePlacementRequireSuccess(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -297,9 +394,11 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
//根据kep读取到的放货工位的值 - 1 得到对应设备的下标,再根据下标获得对应设备的编码
|
||||
String putDeviceCode = putDeviceCodeList.get(getPutStation() - 1).replace("\"", "");
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("putStation", putDeviceCode);
|
||||
map.put("encoder_qty", getEncoder_qty());
|
||||
map.put("boxtype", getBoxtype());
|
||||
map.put("device_code", putDeviceCode);
|
||||
map.put("encoder_qty", String.valueOf(getEncoder_qty()));
|
||||
map.put("boxtype", String.valueOf(getBoxtype()));
|
||||
map.put("barcodeArr",barcodeArr);
|
||||
map.put("id", IdUtil.simpleUUID());
|
||||
JSONObject resp = acsToWmsService.stackingCompleted(map);
|
||||
int code = Integer.parseInt(resp.getString("code"));
|
||||
String message = resp.getString("message");
|
||||
@@ -340,7 +439,15 @@ public class HailiangOldStackingManipulatorDriver extends AbstractOpcDeviceDrive
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
return null;
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode == 1 ? "联机" : "未联机");
|
||||
jo.put("action", action);
|
||||
jo.put("error", ErrorUtil.getDictDetail("jxs_error_type", String.valueOf(error)));
|
||||
jo.put("barcodeArr", barcodeArr);
|
||||
jo.put("isOnline", this.itemProtocol.getIsonline());
|
||||
jo.put("message", message);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo {
|
||||
public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
@@ -44,34 +44,22 @@ public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDri
|
||||
|
||||
int heartbeat = 0;
|
||||
int mode = 0;
|
||||
int unboxing_error = 0;
|
||||
int unboxing_running = 0;
|
||||
int unboxing_ready = 0;
|
||||
int order_finish = 0;
|
||||
int order_compel_finish = 0;
|
||||
int qty = 0;
|
||||
int one_qty = 0;
|
||||
int two_qty = 0;
|
||||
int three_qty = 0;
|
||||
int four_qty = 0;
|
||||
int five_qty = 0;
|
||||
int one_status = 0;
|
||||
int two_status = 0;
|
||||
int three_status = 0;
|
||||
int four_status = 0;
|
||||
int five_status = 0;
|
||||
int error = 0;
|
||||
int now_order_num = 0;
|
||||
int task = 0;
|
||||
int open_ready_time = 0;
|
||||
int device_running_time = 0;
|
||||
int await_time = 0;
|
||||
int order = 0;
|
||||
|
||||
int last_heartbeat = 0;
|
||||
int last_mode = 0;
|
||||
int last_unboxing_error = 0;
|
||||
int last_unboxing_running = 0;
|
||||
int last_unboxing_ready = 0;
|
||||
int last_order_finish = 0;
|
||||
int last_order_compel_finish = 0;
|
||||
int last_error = 0;
|
||||
int last_now_order_num = 0;
|
||||
int last_task = 0;
|
||||
int last_open_ready_time = 0;
|
||||
int last_device_running_time = 0;
|
||||
int last_await_time = 0;
|
||||
int last_order = 0;
|
||||
|
||||
|
||||
Boolean isonline = true;
|
||||
String message = null;
|
||||
@@ -95,6 +83,8 @@ public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDri
|
||||
device_code = this.getDeviceCode();
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
qty = this.itemProtocol.getQty();
|
||||
|
||||
|
||||
if (mode != last_mode) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode + "复位请求标记");
|
||||
@@ -142,9 +132,19 @@ public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDri
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode == 1 ? "联机" : "未联机");
|
||||
jo.put("error", ErrorUtil.getDictDetail("unbox_error_type", String.valueOf(error)));
|
||||
jo.put("now_order_num", now_order_num);
|
||||
jo.put("task", task);
|
||||
jo.put("order", order);
|
||||
jo.put("qty", qty);
|
||||
jo.put("status", this.itemProtocol.getStatus()==1 ? "未知":"工作中");
|
||||
jo.put("one_qty", this.itemProtocol.getOne_qty());
|
||||
jo.put("two_qty", this.itemProtocol.getTwo_qty());
|
||||
jo.put("three_qty", this.itemProtocol.getThree_qty());
|
||||
jo.put("four_qty", this.itemProtocol.getFour_qty());
|
||||
jo.put("five_qty", this.itemProtocol.getFive_qty());
|
||||
jo.put("one_status", this.itemProtocol.getStatus());
|
||||
jo.put("two_status", this.itemProtocol.getStatus());
|
||||
jo.put("three_status", this.itemProtocol.getStatus());
|
||||
jo.put("four_status", this.itemProtocol.getStatus());
|
||||
jo.put("five_status", this.itemProtocol.getStatus());
|
||||
jo.put("is_disable", this.itemProtocol.getIs_disable());
|
||||
jo.put("isOnline", this.itemProtocol.getIsonline());
|
||||
return jo;
|
||||
}
|
||||
@@ -154,36 +154,4 @@ public class HailiangOldUnboxingMachineDeviceDriver extends AbstractOpcDeviceDri
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issuedOrderInfo(ProduceshiftorderDto dto) {
|
||||
EalingOrderDto ealingOrderDto = dto.getEalingOrderDto();
|
||||
if (ealingOrderDto != null) {
|
||||
String is_foreward = ealingOrderDto.getIs_foreward();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("to_clear", "1");
|
||||
map.put("to_is_foreward", is_foreward);
|
||||
map.put("to_order_box_num", ealingOrderDto.getOrder_box_num());
|
||||
map.put("to_order", ealingOrderDto.getOrder_code());
|
||||
this.writing(map);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void issuedOrderFinish(String autoFinish) {
|
||||
if (StrUtil.equals(autoFinish, WorkerOrderEnum.FORCEFINISH.getCode())) {
|
||||
this.writing("to_order_compel_finished", "1");
|
||||
} else {
|
||||
this.writing("to_confirm_finished", "1");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toStop() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toStart() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class ItemProtocol {
|
||||
public static String item_four_status = "four_status";
|
||||
//前往5巷道状态
|
||||
public static String item_five_status = "five_status";
|
||||
//是否禁用
|
||||
public static String item_is_disable = "is_disable";
|
||||
|
||||
|
||||
//前往1巷道状态
|
||||
@@ -55,6 +57,9 @@ public class ItemProtocol {
|
||||
public static String item_to_five_status = "to_five_status";
|
||||
//清零
|
||||
public static String item_to_clear = "to_clear";
|
||||
//禁用
|
||||
public static String item_to_is_disable = "to_is_disable";
|
||||
|
||||
|
||||
private HailiangOldUnboxingMachineDeviceDriver driver;
|
||||
|
||||
@@ -122,6 +127,9 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_five_status);
|
||||
};
|
||||
|
||||
public int getIs_disable() {
|
||||
return this.getOpcIntegerValue(item_is_disable);
|
||||
};
|
||||
|
||||
Boolean isonline;
|
||||
|
||||
@@ -155,17 +163,20 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_three_status, "3号巷道状态", "DB600.W24"));
|
||||
list.add(new ItemDto(item_four_status, "4号巷道状态", "DB600.W26"));
|
||||
list.add(new ItemDto(item_five_status, "5号巷道状态", "DB600.W28"));
|
||||
list.add(new ItemDto(item_is_disable, "是否禁用", "DB600.W30"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_one_status, "禁用1号巷道状态", "DB601.W2"));
|
||||
list.add(new ItemDto(item_to_two_status, "禁用2号巷道状态", "DB600.W4"));
|
||||
list.add(new ItemDto(item_to_three_status, "禁用3号巷道状态", "DB600.W6"));
|
||||
list.add(new ItemDto(item_to_four_status, "禁用4号巷道状态", "DB600.W8"));
|
||||
list.add(new ItemDto(item_to_five_status, "禁用5号巷道状态", "DB600.W10"));
|
||||
list.add(new ItemDto(item_to_clear, "清零", "DB600.W12"));
|
||||
list.add(new ItemDto(item_to_one_status, "禁用1号巷道状态", "DB610.W2"));
|
||||
list.add(new ItemDto(item_to_two_status, "禁用2号巷道状态", "DB610.W4"));
|
||||
list.add(new ItemDto(item_to_three_status, "禁用3号巷道状态", "DB610.W6"));
|
||||
list.add(new ItemDto(item_to_four_status, "禁用4号巷道状态", "DB610.W8"));
|
||||
list.add(new ItemDto(item_to_five_status, "禁用5号巷道状态", "DB610.W10"));
|
||||
list.add(new ItemDto(item_to_clear, "下发清零", "DB610.W12"));
|
||||
list.add(new ItemDto(item_to_is_disable, "下发禁用", "DB610.W14"));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -572,34 +572,34 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
@Override
|
||||
public JSONObject stackingCompleted(JSONObject param) {
|
||||
a = 20;
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("code", 200);
|
||||
map.put("message", "成功");
|
||||
map.put("data", null);
|
||||
return map;
|
||||
// try {
|
||||
// MDC.put(log_file_type, log_type);
|
||||
// String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
// HttpResponse result = null;
|
||||
// log.info("stackingCompleted-----码垛完成请求");
|
||||
// AddressDto addressDto = addressService.findByCode("stackingCompleted");
|
||||
// String methods_url = addressDto.getMethods_url();
|
||||
// try {
|
||||
// result = HttpRequest.get(wmsurl + methods_url)
|
||||
// .body("")
|
||||
// .execute();
|
||||
// log.info("stackingCompleted-----码垛完成输出参数{}", result.body().toString());
|
||||
// } catch (Exception e) {
|
||||
// String msg = e.getMessage();
|
||||
// //网络不通
|
||||
// System.out.println(msg);
|
||||
// }
|
||||
// JSONObject jo = JSONObject.parseObject(result.body());
|
||||
// return jo;
|
||||
// } finally {
|
||||
// MDC.remove(log_file_type);
|
||||
// }
|
||||
// a = 20;
|
||||
// JSONObject map = new JSONObject();
|
||||
// map.put("code", 200);
|
||||
// map.put("message", "成功");
|
||||
// map.put("data", null);
|
||||
// return map;
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
HttpResponse result = null;
|
||||
log.info("stackingCompleted-----码垛完成请求");
|
||||
AddressDto addressDto = addressService.findByCode("stackingCompleted");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
try {
|
||||
result = HttpRequest.get(wmsurl + methods_url)
|
||||
.body("")
|
||||
.execute();
|
||||
log.info("stackingCompleted-----码垛完成输出参数{}", result.body().toString());
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
//网络不通
|
||||
System.out.println(msg);
|
||||
}
|
||||
JSONObject jo = JSONObject.parseObject(result.body());
|
||||
return jo;
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -246,6 +246,28 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String is_used_fxx = param.getString("is_used_fxx");
|
||||
String ealing_device_code = param.getString("ealing_device_code");
|
||||
String unboxing_device_code = param.getString("unboxing_device_code");
|
||||
|
||||
Map<String, Object> extra_map = param.getJSONObject("extra_map");
|
||||
|
||||
//老车间包装工单信息
|
||||
//每箱袋数
|
||||
String one_box_package_qty = extra_map.get("one_box_package_qty").toString();
|
||||
//袋数
|
||||
String package_qty = extra_map.get("package_qty").toString();
|
||||
//每袋数量
|
||||
String one_package_qty = extra_map.get("one_package_qty").toString();
|
||||
//箱数
|
||||
String box_num = extra_map.get("box_num").toString();
|
||||
//箱型
|
||||
String box_type = extra_map.get("box_type").toString();
|
||||
//目标巷道
|
||||
String target_roadway = extra_map.get("target_roadway").toString();
|
||||
//是否翻转
|
||||
String is_flip = extra_map.get("is_flip").toString();
|
||||
//托盘满托数量
|
||||
String tray_full_num = extra_map.get("tray_full_num").toString();
|
||||
|
||||
|
||||
Map<String, Object> params = param.getJSONObject("params");
|
||||
EalingOrderDto ealingOrderDto = null;
|
||||
if (ObjectUtil.isNotEmpty(params)) {
|
||||
@@ -317,6 +339,14 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
dto.setIs_used_fxx(is_used_fxx);
|
||||
dto.setEaling_device_code(ealing_device_code);
|
||||
dto.setUnboxing_device_code(unboxing_device_code);
|
||||
dto.setOne_box_package_qty(one_box_package_qty);
|
||||
dto.setOne_package_qty(one_package_qty);
|
||||
dto.setPackage_qty(package_qty);
|
||||
dto.setBox_num(box_num);
|
||||
dto.setBox_type(box_type);
|
||||
dto.setTarget_roadway(target_roadway);
|
||||
dto.setIs_flip(is_flip);
|
||||
dto.setTray_full_num(tray_full_num);
|
||||
dto.setEalingOrderDto(ealingOrderDto);
|
||||
dto.setCreate_by("mes");
|
||||
try {
|
||||
|
||||
@@ -135,4 +135,44 @@ public class ProduceshiftorderDto implements Serializable {
|
||||
*/
|
||||
private EalingOrderDto ealingOrderDto;
|
||||
|
||||
/**
|
||||
* 每箱袋数
|
||||
*/
|
||||
private String one_box_package_qty;
|
||||
|
||||
/**
|
||||
* 每袋数量
|
||||
*/
|
||||
private String one_package_qty;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
private String box_num;
|
||||
|
||||
/**
|
||||
* 箱型
|
||||
*/
|
||||
private String box_type;
|
||||
|
||||
/**
|
||||
* 目标巷道
|
||||
*/
|
||||
private String target_roadway;
|
||||
|
||||
/**
|
||||
* 是否翻转
|
||||
*/
|
||||
private String is_flip;
|
||||
|
||||
/**
|
||||
* 托盘满托数量
|
||||
*/
|
||||
private String tray_full_num;
|
||||
|
||||
/**
|
||||
* 袋数
|
||||
*/
|
||||
private String package_qty;
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -82,4 +82,13 @@ public class LuceneLogDto {
|
||||
+ last_home + " -> "
|
||||
+ home;
|
||||
}
|
||||
|
||||
public LuceneLogDto(final String device_code, final String remark) {
|
||||
super();
|
||||
this.device_code = device_code;
|
||||
this.content = "设备 ["
|
||||
+ device_code
|
||||
+ "] : "
|
||||
+ remark;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,61 +334,19 @@ export default {
|
||||
}
|
||||
for (const val in this.data1) {
|
||||
if (this.data1[val].code.indexOf('move') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('ioaction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 3)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('is_full') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 8)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('task') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 5)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('weight') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 9)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('batch') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 13)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('specifications') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 17) + '.50'
|
||||
}
|
||||
if (this.data1[val].code.indexOf('material') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 273) + '.50'
|
||||
}
|
||||
if (this.data1[val].code.indexOf('barcode') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 529) + '.50'
|
||||
}
|
||||
if (this.data1[val].code.indexOf('AlongSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 785)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('BshortSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 787)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Htrapezoidal') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 789)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Wthickness') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 791)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 795)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('unqualified_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 795)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('encoder_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 799)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 803)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_No') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 807) + '.50'
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -414,33 +372,6 @@ export default {
|
||||
if (this.data2[val].code.indexOf('to_task') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_barcode') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 8) + '.50'
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_error') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 264)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_allow_pallet_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 266)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_type') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 268)
|
||||
}
|
||||
// if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
// this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 272)
|
||||
// }
|
||||
if (this.data2[val].code.indexOf('to_order_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 276)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_product_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 280)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_order_No') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 284) + '.50'
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 540) + '.50'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -334,61 +334,25 @@ export default {
|
||||
}
|
||||
for (const val in this.data1) {
|
||||
if (this.data1[val].code.indexOf('move') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('ioaction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 3)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('direction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('is_flip') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 8)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 10)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('task') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 5)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('weight') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 9)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('batch') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 13)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('specifications') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 17) + '.50'
|
||||
}
|
||||
if (this.data1[val].code.indexOf('material') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 273) + '.50'
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 12)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('barcode') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 529) + '.50'
|
||||
}
|
||||
if (this.data1[val].code.indexOf('AlongSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 785)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('BshortSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 787)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Htrapezoidal') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 789)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Wthickness') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 791)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 795)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('unqualified_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 795)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('encoder_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 799)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 803)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_No') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 807) + '.50'
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 16) + '.20'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,35 +375,14 @@ export default {
|
||||
if (this.data2[val].code.indexOf('to_target') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_is_flip') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_task') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 4)
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_barcode') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 8) + '.50'
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_error') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 264)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_allow_pallet_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 266)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_type') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 268)
|
||||
}
|
||||
// if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
// this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 272)
|
||||
// }
|
||||
if (this.data2[val].code.indexOf('to_order_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 276)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_product_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 280)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_order_No') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 284) + '.50'
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 540) + '.50'
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 10) + '.20'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,69 +333,54 @@ export default {
|
||||
return
|
||||
}
|
||||
for (const val in this.data1) {
|
||||
if (this.data1[val].code.indexOf('move') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 1)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('action') !== -1) {
|
||||
if (this.data1[val].code.indexOf('status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('ioaction') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 3)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('error') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('task') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 5)
|
||||
if (this.data1[val].code.indexOf('qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('weight') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 9)
|
||||
if (this.data1[val].code.indexOf('one_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('batch') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 13)
|
||||
if (this.data1[val].code.indexOf('two_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 8)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('specifications') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 17) + '.50'
|
||||
if (this.data1[val].code.indexOf('three_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 10)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('material') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 273) + '.50'
|
||||
if (this.data1[val].code.indexOf('four_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 12)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('barcode') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 529) + '.50'
|
||||
if (this.data1[val].code.indexOf('five_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 14)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('AlongSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 785)
|
||||
if (this.data1[val].code.indexOf('one_status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 16)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('BshortSide') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 787)
|
||||
if (this.data1[val].code.indexOf('two_status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 18)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Htrapezoidal') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 789)
|
||||
if (this.data1[val].code.indexOf('three_status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 20)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('Wthickness') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 791)
|
||||
if (this.data1[val].code.indexOf('four_status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 22)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 795)
|
||||
if (this.data1[val].code.indexOf('five_status') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 24)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('unqualified_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 795)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('encoder_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 799)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_qty') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 803)
|
||||
}
|
||||
if (this.data1[val].code.indexOf('order_No') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 807) + '.50'
|
||||
if (this.data1[val].code.indexOf('is_disable') !== -1) {
|
||||
this.data1[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 26)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
finishWriteEdit(data) {
|
||||
// 编辑的是code列,并且值包含mode
|
||||
if (data.code.indexOf('to_command') !== -1) {
|
||||
if (data.code.indexOf('to_one_status') !== -1) {
|
||||
const dbValue = data.db
|
||||
// .之前的字符串
|
||||
const beforeStr = dbValue.match(/(\S*)\./)[1]
|
||||
@@ -408,38 +393,23 @@ export default {
|
||||
return
|
||||
}
|
||||
for (const val in this.data2) {
|
||||
if (this.data2[val].code.indexOf('to_target') !== -1) {
|
||||
if (this.data2[val].code.indexOf('to_two_status') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 2)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_task') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 4)
|
||||
if (this.data2[val].code.indexOf('to_three_status') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 4)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_barcode') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 8) + '.50'
|
||||
if (this.data2[val].code.indexOf('to_four_status') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 6)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_error') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'B' + (parseInt(endNumber) + 264)
|
||||
if (this.data2[val].code.indexOf('to_five_status') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 8)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_allow_pallet_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'W' + (parseInt(endNumber) + 266)
|
||||
if (this.data2[val].code.indexOf('to_clear') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 10)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_type') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 268)
|
||||
}
|
||||
// if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
// this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 272)
|
||||
// }
|
||||
if (this.data2[val].code.indexOf('to_order_qty') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 276)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_product_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'D' + (parseInt(endNumber) + 280)
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_order_No') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 284) + '.50'
|
||||
}
|
||||
if (this.data2[val].code.indexOf('to_material_code') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + 'STRING' + (parseInt(endNumber) + 540) + '.50'
|
||||
if (this.data2[val].code.indexOf('to_is_disable') !== -1) {
|
||||
this.data2[val].db = beforeStr + '.' + afterStr.substring(0, 1) + (parseInt(endNumber) + 12)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,6 +440,36 @@ export default {
|
||||
} else if (val === 'is_disable') {
|
||||
const obj = { name: '是否禁用', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'one_qty') {
|
||||
const obj = { name: '1号口数量', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'two_qty') {
|
||||
const obj = { name: '2号口数量', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'three_qty') {
|
||||
const obj = { name: '3号口数量', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'four_qty') {
|
||||
const obj = { name: '4号口数量', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'five_qty') {
|
||||
const obj = { name: '5号口数量', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'one_status') {
|
||||
const obj = { name: '1号口状态', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'two_status') {
|
||||
const obj = { name: '2号口状态', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'three_status') {
|
||||
const obj = { name: '3号口状态', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'four_status') {
|
||||
const obj = { name: '4号口状态', value: data[val] }
|
||||
arr.push(obj)
|
||||
} else if (val === 'five_status') {
|
||||
const obj = { name: '5号口状态', value: data[val] }
|
||||
arr.push(obj)
|
||||
}
|
||||
}
|
||||
return arr
|
||||
|
||||
Reference in New Issue
Block a user