| | |
| | | <artifactId>gson</artifactId> |
| | | <version>2.10.1</version> |
| | | </dependency> |
| | | |
| | | <!--Server SDKä¾èµ--> |
| | | <dependency> |
| | | <groupId>org.eclipse.milo</groupId> |
| | | <artifactId>sdk-server</artifactId> |
| | | <version>0.3.6</version> |
| | | </dependency> |
| | | |
| | | <!--Client SDKä¾èµ--> |
| | | <dependency> |
| | | <groupId>org.eclipse.milo</groupId> |
| | | <artifactId>sdk-client</artifactId> |
| | | <version>0.3.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.eclipse.milo</groupId> |
| | | <artifactId>stack-client</artifactId> |
| | | <version>0.3.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.eclipse.milo</groupId> |
| | | <artifactId>stack-client</artifactId> |
| | | <version>0.3.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.eclipse.milo</groupId> |
| | | <artifactId>stack-server</artifactId> |
| | | <version>0.3.6</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | package com.jcdm.main.da.collectionParamConf.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ééåæ°é
ç½®Controller |
| | |
| | | package com.jcdm.main.da.collectionParamConf.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | /** |
| | | * ééåæ°é
置对象 da_collection_param_conf |
| | |
| | | package com.jcdm.main.da.collectionParamConf.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ééåæ°é
ç½®Mapperæ¥å£ |
| | | * |
| | |
| | | package com.jcdm.main.da.collectionParamConf.service; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ééåæ°é
ç½®Serviceæ¥å£ |
| | | * |
| | |
| | | package com.jcdm.main.da.collectionParamConf.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | import com.jcdm.main.da.collectionParamConf.mapper.DaCollectionParamConfMapper; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.da.collectionParamConf.mapper.DaCollectionParamConfMapper; |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ééåæ°é
ç½®Serviceä¸å¡å±å¤ç |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.cert; |
| | | |
| | | import org.eclipse.milo.opcua.sdk.server.util.HostnameUtil; |
| | | import org.eclipse.milo.opcua.stack.core.util.SelfSignedCertificateBuilder; |
| | | import org.eclipse.milo.opcua.stack.core.util.SelfSignedCertificateGenerator; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.security.*; |
| | | import java.security.cert.X509Certificate; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * @ClassName: KeyStoreLoader |
| | | * @Description: KeyStoreLoader |
| | | * @author yyt |
| | | * @date 2023å¹´10æ13æ¥ |
| | | */ |
| | | @Component |
| | | public class KeyStoreLoader { |
| | | |
| | | private static final Pattern IP_ADDR_PATTERN = Pattern |
| | | .compile("^(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); |
| | | |
| | | // è¯ä¹¦å«å |
| | | private static final String CLIENT_ALIAS = "jlclient-ai"; |
| | | // è·åç§é¥çå¯ç |
| | | private static final char[] PASSWORD = "yyt@8888888888".toCharArray(); |
| | | |
| | | private final Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | // è¯ä¹¦å¯¹è±¡ |
| | | private X509Certificate clientCertificate; |
| | | // å¯é¥å¯¹å¯¹è±¡ |
| | | private KeyPair clientKeyPair; |
| | | |
| | | /** |
| | | * @MethodName: load |
| | | * @Description: load |
| | | * @param baseDir |
| | | * @return |
| | | * @throws Exception |
| | | * @CreateTime 2023å¹´10æ13æ¥ |
| | | */ |
| | | public KeyStoreLoader load(Path baseDir) throws Exception { |
| | | // å建ä¸ä¸ªä½¿ç¨`PKCS12`å å¯æ åçKeyStoreãKeyStoreå¨åé¢å°ä½ä¸ºè¯»ååçæè¯ä¹¦ç对象ã |
| | | KeyStore keyStore = KeyStore.getInstance("PKCS12"); |
| | | |
| | | // PKCS12çå å¯æ åçæ件åç¼æ¯.pfxï¼å
¶ä¸å
å«äºå
¬é¥åç§é¥ã |
| | | // èå
¶ä»å¦.derççæ ¼å¼åªå
å«å
¬é¥ï¼ç§é¥å¨å¦å¤çæ件ä¸ã |
| | | Path serverKeyStore = baseDir.resolve("OPCUA-client.pfx"); |
| | | |
| | | logger.info("Loading KeyStore at {}", serverKeyStore); |
| | | |
| | | // å¦ææ件ä¸åå¨åå建.pfxè¯ä¹¦æ件ã |
| | | if (!Files.exists(serverKeyStore)) { |
| | | keyStore.load(null, PASSWORD); |
| | | |
| | | // ç¨2048ä½çRASç®æ³ã`SelfSignedCertificateGenerator`为Miloåºç对象ã |
| | | KeyPair keyPair = SelfSignedCertificateGenerator.generateRsaKeyPair(2048); |
| | | |
| | | // `SelfSignedCertificateBuilder`ä¹æ¯Miloåºç对象ï¼ç¨æ¥çæè¯ä¹¦ã |
| | | // ä¸é´æ设置çè¯ä¹¦å±æ§å¯ä»¥èªè¡ä¿®æ¹ã |
| | | SelfSignedCertificateBuilder builder = new SelfSignedCertificateBuilder(keyPair) |
| | | .setCommonName("UaClient@Jellyleo") |
| | | .setOrganization("JL") |
| | | .setOrganizationalUnit("per") |
| | | .setLocalityName("jl") |
| | | .setStateName("JiangSu") |
| | | .setCountryCode("CN") |
| | | .setApplicationUri("urn:Yyt_PC:UnifiedAutomation:UaExpert") |
| | | .addDnsName("Yyt_PC") |
| | | .addIpAddress("127.0.0.1"); |
| | | |
| | | // Get as many hostnames and IP addresses as we can listed in the certificate. |
| | | for (String hostname : HostnameUtil.getHostnames("0.0.0.0")) { |
| | | if (IP_ADDR_PATTERN.matcher(hostname).matches()) { |
| | | builder.addIpAddress(hostname); |
| | | } else { |
| | | builder.addDnsName(hostname); |
| | | } |
| | | } |
| | | // å建è¯ä¹¦ |
| | | X509Certificate certificate = builder.build(); |
| | | |
| | | // 设置对åºç§é¥çå«åï¼å¯ç ï¼è¯ä¹¦é¾ |
| | | keyStore.setKeyEntry(CLIENT_ALIAS, keyPair.getPrivate(), PASSWORD, new X509Certificate[] { certificate }); |
| | | try (OutputStream out = Files.newOutputStream(serverKeyStore)) { |
| | | // ä¿åè¯ä¹¦å°è¾åºæµ |
| | | keyStore.store(out, PASSWORD); |
| | | } |
| | | } else { |
| | | try (InputStream in = Files.newInputStream(serverKeyStore)) { |
| | | // å¦ææ件åå¨å读å |
| | | keyStore.load(in, PASSWORD); |
| | | } |
| | | } |
| | | |
| | | // ç¨å¯ç è·å对åºå«åçç§é¥ã |
| | | Key serverPrivateKey = keyStore.getKey(CLIENT_ALIAS, PASSWORD); |
| | | if (serverPrivateKey instanceof PrivateKey) { |
| | | // è·å对åºå«åçè¯ä¹¦å¯¹è±¡ã |
| | | clientCertificate = (X509Certificate) keyStore.getCertificate(CLIENT_ALIAS); |
| | | // è·åå
¬é¥ |
| | | PublicKey serverPublicKey = clientCertificate.getPublicKey(); |
| | | // å建Keypair对象ã |
| | | clientKeyPair = new KeyPair(serverPublicKey, (PrivateKey) serverPrivateKey); |
| | | } |
| | | |
| | | return this; |
| | | } |
| | | |
| | | // è¿åè¯ä¹¦ |
| | | public X509Certificate getClientCertificate() { |
| | | return clientCertificate; |
| | | } |
| | | |
| | | // è¿åå¯é¥å¯¹ |
| | | public KeyPair getClientKeyPair() { |
| | | return clientKeyPair; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.cert; |
| | | |
| | | import com.jcdm.main.da.collectionParamConf.domain.DaCollectionParamConf; |
| | | import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; |
| | | import com.jcdm.main.da.opcuaconfig.client.ClientHandler; |
| | | import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; |
| | | import com.jcdm.main.da.opcuaconfig.init.BeanUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.jcdm.main.da.opcuaconfig.client.ClientHandler.readValues; |
| | | |
| | | @Slf4j |
| | | public class MethodName { |
| | | private IDaCollectionParamConfService collectionParamConfService = BeanUtils.getBean(IDaCollectionParamConfService.class); |
| | | private IDaParamCollectionService daParamCollectionService = BeanUtils.getBean(IDaParamCollectionService.class); |
| | | private IDaPassingStationCollectionService daPassingStationCollectionService = BeanUtils.getBean(IDaPassingStationCollectionService.class); |
| | | private List<DataValue> s=null; |
| | | public void getSn(String Node, String value) throws Exception { |
| | | log.info(Node+":"+value); |
| | | String[] parts = Node.split("[.]"); |
| | | ClientHandler clientHandler=new ClientHandler(); |
| | | NodeEntity SN_node= NodeEntity.builder().index(2).identifier(parts[0]+"."+parts[1]+".SNCode").value("").type("").build(); |
| | | String SNCode=clientHandler.read(SN_node); |
| | | log.info("读åèç¹:{},ç»æ:{}", SN_node.getIdentifier(),SNCode); |
| | | switch (value) { |
| | | case "0": //åå§ |
| | | NodeEntity node= NodeEntity.builder().index(2).identifier(parts[0]+"."+parts[1]+".RecordDataDone").value("0").type("short").build(); |
| | | Boolean out=clientHandler.write(node); |
| | | log.info("èç¹:{},ååºç»æ:{}", node.getIdentifier(),out); |
| | | break; |
| | | case "1": //请æ±ä¸åè¿ç«ç¶æ |
| | | NodeEntity node1= NodeEntity.builder().index(2).identifier(parts[0]+"."+parts[1]+".RecordDataDone").value("11").type("short").build(); |
| | | Boolean out1=clientHandler.write(node1); |
| | | DaPassingStationCollection PassingStationCollection=new DaPassingStationCollection(); |
| | | PassingStationCollection.setSfcCode(SNCode); |
| | | PassingStationCollection.setLocationCode(parts[1]); |
| | | PassingStationCollection.setInboundTime(new Date()); |
| | | daPassingStationCollectionService.insertDaPassingStationCollection(PassingStationCollection); |
| | | log.info("èç¹:{},ååºç»æ:{}", node1.getIdentifier(),out1); |
| | | break; |
| | | case "2": //请æ±è®°å½å·¥ä½æ°æ® |
| | | List<DaCollectionParamConf> b; |
| | | DaCollectionParamConf daCollectionParamConf=new DaCollectionParamConf(); |
| | | daCollectionParamConf.setGatherAddress(parts[0]+"."+parts[1]); |
| | | b=collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf); |
| | | |
| | | List<NodeId> nodeId = b.stream().map(info -> { |
| | | NodeId nodeid = new NodeId(2,info.getGatherAddress()); |
| | | return nodeid; |
| | | }).collect(Collectors.toList()); |
| | | List<DataValue> s=readValues(nodeId); |
| | | //ä¿åPLCééæ°æ® |
| | | for(int i=0;i<nodeId.size();i++) |
| | | { |
| | | DaParamCollection Config=new DaParamCollection(); |
| | | Config.setParamCode(nodeId.get(i).getIdentifier().toString().split("[.]")[2]); |
| | | Config.setLocationCode(nodeId.get(i).getIdentifier().toString().split("[.]")[1]); |
| | | Config.setParamValue(s.get(i).getValue().getValue().toString()); |
| | | Config.setSfcCode(SNCode); |
| | | Config.setParamName(b.get(i).getGatherAddress()); |
| | | daParamCollectionService.insertDaParamCollection(Config); |
| | | } |
| | | //æ´æ°åºç«æ¶é´ï¼è®¡ç®èæã |
| | | DaPassingStationCollection PSC=new DaPassingStationCollection(); |
| | | PSC.setSfcCode(SNCode); |
| | | List<DaPassingStationCollection> LPSC=daPassingStationCollectionService.selectDaPassingStationCollectionList(PSC); |
| | | if(LPSC != null && LPSC.size() > 0){ |
| | | LPSC.get(0).setOutboundTime(new Date()); |
| | | LPSC.get(0).setCollectionTime(new Date()); |
| | | LPSC.get(0).setBeatTime(Long.toString(Math.abs(new Date().getTime() - LPSC.get(0).getInboundTime().getTime()))); |
| | | daPassingStationCollectionService.updateDaPassingStationCollection(LPSC.get(0)); |
| | | } |
| | | //æ´æ°PLCèç¹ç¶æ |
| | | NodeEntity node2= NodeEntity.builder().index(2).identifier(parts[0]+"."+parts[1]+".RecordDataDone").value("21").type("short").build(); |
| | | Boolean out2=clientHandler.write(node2); |
| | | log.info("èç¹:{},ååºç»æ:{}", node2.getIdentifier(),out2); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.client; |
| | | |
| | | import com.google.common.collect.ImmutableList; |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; |
| | | import org.eclipse.milo.opcua.sdk.client.api.nodes.VariableNode; |
| | | import org.eclipse.milo.opcua.sdk.client.api.subscriptions.UaSubscription; |
| | | import org.eclipse.milo.opcua.stack.core.AttributeId; |
| | | import org.eclipse.milo.opcua.stack.core.BuiltinDataType; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned; |
| | | import org.eclipse.milo.opcua.stack.core.types.enumerated.MonitoringMode; |
| | | import org.eclipse.milo.opcua.stack.core.types.enumerated.TimestampsToReturn; |
| | | import org.eclipse.milo.opcua.stack.core.types.structured.MonitoredItemCreateRequest; |
| | | import org.eclipse.milo.opcua.stack.core.types.structured.MonitoringParameters; |
| | | import org.eclipse.milo.opcua.stack.core.types.structured.ReadValueId; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.concurrent.ExecutionException; |
| | | |
| | | /** |
| | | * @ClassName: ClientHandler |
| | | * @Description: 客æ·ç«¯å¤ç |
| | | * @author Jellyleo |
| | | * @date 2019å¹´12æ12æ¥ |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ClientHandler { |
| | | |
| | | // 客æ·ç«¯å®ä¾ |
| | | public static OpcUaClient client = null; |
| | | |
| | | public List<DaOpcuaConfig> b = null; |
| | | |
| | | @Autowired |
| | | private ClientRunner clientRunner; |
| | | |
| | | @Autowired |
| | | private IDaOpcuaConfigService daOpcuaConfigService; |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @MethodName: connect |
| | | * @Description: connect |
| | | * @throws Exception |
| | | * @CreateTime 2019å¹´12æ18æ¥ ä¸å10:41:09 |
| | | */ |
| | | public String connect() throws Exception { |
| | | |
| | | if (client != null) { |
| | | return "客æ·ç«¯å·²å建"; |
| | | } |
| | | |
| | | client = clientRunner.run(); |
| | | |
| | | if (client == null) { |
| | | return "客æ·ç«¯é
ç½®å®ä¾å失败"; |
| | | } |
| | | |
| | | // å建è¿æ¥ |
| | | client.connect().get(); |
| | | return "å建è¿æ¥æå"; |
| | | } |
| | | |
| | | /** |
| | | * @MethodName: disconnect |
| | | * @Description: æå¼è¿æ¥ |
| | | * @return |
| | | * @throws Exception |
| | | * @CreateTime 2019å¹´12æ18æ¥ ä¸å10:45:21 |
| | | */ |
| | | public String disconnect() throws Exception { |
| | | |
| | | if (client == null) { |
| | | return "è¿æ¥å·²æå¼"; |
| | | } |
| | | |
| | | // æå¼è¿æ¥ |
| | | clientRunner.getFuture().complete(client); |
| | | client = null; |
| | | return "æå¼è¿æ¥æå"; |
| | | } |
| | | |
| | | /** |
| | | * @MethodName: subscribe |
| | | * @Description: 订é
èç¹åé |
| | | * @throws Exception |
| | | * @CreateTime 2019å¹´12æ18æ¥ ä¸å10:38:11 |
| | | */ |
| | | public String subscribe(List<NodeEntity> nodes) throws Exception { |
| | | |
| | | if (client == null) { |
| | | return "æ¾ä¸å°å®¢æ·ç«¯ï¼æä½å¤±è´¥"; |
| | | } |
| | | |
| | | // æ¥è¯¢è®¢é
对象ï¼æ²¡æåå建 |
| | | UaSubscription subscription = null; |
| | | ImmutableList<UaSubscription> subscriptionList = client.getSubscriptionManager().getSubscriptions(); |
| | | if (CollectionUtils.isEmpty(subscriptionList)) { |
| | | subscription = client.getSubscriptionManager().createSubscription(1000.0).get(); |
| | | } else { |
| | | subscription = subscriptionList.get(0); |
| | | } |
| | | |
| | | // çæ§é¡¹è¯·æ±å表 |
| | | List<MonitoredItemCreateRequest> requests = new ArrayList<>(); |
| | | |
| | | if (!CollectionUtils.isEmpty(nodes)) { |
| | | for (NodeEntity node : nodes) { |
| | | // å建çæ§çåæ° |
| | | MonitoringParameters parameters = new MonitoringParameters(subscription.nextClientHandle(), 1000.0, // sampling |
| | | // interval |
| | | null, // filter, null means use default |
| | | Unsigned.uint(10), // queue size |
| | | true // discard oldest |
| | | ); |
| | | // å建订é
çåéï¼ å建çæ§é¡¹è¯· æ± |
| | | MonitoredItemCreateRequest request = new MonitoredItemCreateRequest( |
| | | new ReadValueId(new NodeId(node.getIndex(), node.getIdentifier()), AttributeId.Value.uid(), |
| | | null, null), |
| | | MonitoringMode.Reporting, parameters); |
| | | requests.add(request); |
| | | } |
| | | } |
| | | |
| | | // å建çæ§é¡¹ï¼å¹¶ä¸æ³¨ååéå¼æ¹åæ¶åçåè°å½æ° |
| | | subscription.createMonitoredItems(TimestampsToReturn.Both, requests, (item, id) -> { |
| | | item.setValueConsumer((i, v) -> { |
| | | handle(i.getReadValueId().getNodeId(), v.getValue()); |
| | | }); |
| | | }).get(); |
| | | |
| | | return "订é
æå"; |
| | | } |
| | | |
| | | /** |
| | | * * @MethodName: write |
| | | * @Description: åè°å½æ° |
| | | * @CreateTime 2023å¹´10æ13æ¥ |
| | | */ |
| | | public void handle(NodeId id, Variant value){ |
| | | if (b == null || 0 > b.size()) { |
| | | DaOpcuaConfig opcuaConfParam=new DaOpcuaConfig(); |
| | | opcuaConfParam.setSubscribe("Y"); |
| | | b=daOpcuaConfigService.selectDaOpcuaConfigList(opcuaConfParam); |
| | | } |
| | | //使ç¨Stream APIå¨List<T>ä¸æ¥æ¾å
ç´ |
| | | DaOpcuaConfig daOpcuaConfig = b.stream() |
| | | .filter(customer ->id.getIdentifier().toString().equals(customer.getNode())) |
| | | .findAny() |
| | | .orElse(null); |
| | | try { |
| | | Class<?> clazz = Class.forName("com.jcdm.main.da.opcuaconfig.cert.MethodName"); |
| | | Method method = clazz.getMethod(daOpcuaConfig.getrFunction(), new Class[] { String.class, String.class }); |
| | | method.invoke(clazz.newInstance(),new Object[] { |
| | | new String(id.getIdentifier().toString()), new String(value.getValue().toString()) }); |
| | | } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException | |
| | | InvocationTargetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @MethodName: write |
| | | * @Description: åèç¹éåå
¥ |
| | | * @param node |
| | | * @throws Exception |
| | | * @CreateTime 2019å¹´12æ18æ¥ ä¸å9:51:40 |
| | | */ |
| | | public static Boolean write(NodeEntity node) throws Exception { |
| | | |
| | | if (client == null) { |
| | | log.info("æ¾ä¸å°å®¢æ·ç«¯ï¼æä½å¤±è´¥"); |
| | | return false; |
| | | } |
| | | |
| | | NodeId nodeId = new NodeId(node.getIndex(), node.getIdentifier()); |
| | | Variant value = null; |
| | | switch (node.getType()) { |
| | | case "int": |
| | | value = new Variant(Integer.parseInt(node.getValue().toString())); |
| | | break; |
| | | case "boolean": |
| | | value = new Variant(Boolean.parseBoolean(node.getValue().toString())); |
| | | break; |
| | | case "short": |
| | | value = new Variant(Short.parseShort(node.getValue().toString())); |
| | | break; |
| | | case "long": |
| | | value = new Variant(Long.parseLong(node.getValue().toString())); |
| | | break; |
| | | case "string": |
| | | value = new Variant(node.getValue().toString()); |
| | | break; |
| | | case "char": |
| | | value = new Variant(node.getValue().toString().charAt(0)); |
| | | break; |
| | | } |
| | | DataValue dataValue = new DataValue(value, null, null); |
| | | |
| | | StatusCode statusCode = client.writeValue(nodeId, dataValue).get(); |
| | | |
| | | return statusCode.isGood(); |
| | | } |
| | | |
| | | /** |
| | | * æ¹æ³æè¿°: 读åå¤ä¸ªç¹ä½çå¼ |
| | | * |
| | | * @param nodeIdList ç¹ä½éå |
| | | * @return {@link List<DataValue>} |
| | | * @throws |
| | | */ |
| | | public static List<DataValue> readValues(List<NodeId> nodeIdList){ |
| | | try { |
| | | List<DataValue> dataValues=client.readValues(0.0, TimestampsToReturn.Both,nodeIdList).get(); |
| | | return dataValues; |
| | | } catch (InterruptedException | ExecutionException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * @MethodName: read |
| | | * @Description: 读å |
| | | * @param node |
| | | * @return |
| | | * @throws Exception |
| | | * @CreateTime 2019å¹´12æ19æ¥ ä¸å2:40:34 |
| | | */ |
| | | public String read(NodeEntity node) throws Exception { |
| | | |
| | | if (client == null) { |
| | | return "æ¾ä¸å°å®¢æ·ç«¯ï¼æä½å¤±è´¥"; |
| | | } |
| | | |
| | | NodeId nodeId = new NodeId(node.getIndex(), node.getIdentifier()); |
| | | VariableNode vnode = client.getAddressSpace().createVariableNode(nodeId); |
| | | DataValue value = vnode.readValue().get(); |
| | | log.info("Value={}", value); |
| | | |
| | | Variant variant = value.getValue(); |
| | | log.info("Variant={}", variant.getValue()); |
| | | |
| | | log.info("BackingClass={}", BuiltinDataType.getBackingClass(variant.getDataType().get())); |
| | | |
| | | return variant.getValue().toString(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¹æ³æè¿°: åå
¥å¤ä¸ªèç¹çå¼ |
| | | * |
| | | * @param keys èç¹éå |
| | | * @param values å¼éå |
| | | * @param client 客æ·ç«¯ |
| | | * @return {@link Object} |
| | | * @throws |
| | | */ |
| | | public static Object writeValues(Set<String> keys, List<Object> values, OpcUaClient client){ |
| | | List<NodeId> nodeIs=new ArrayList<>(keys.size()); |
| | | keys.forEach(e->{ |
| | | NodeId nodeId = new NodeId(2, e); |
| | | nodeIs.add(nodeId); |
| | | }); |
| | | List<DataValue> dataValues=new ArrayList<>(values.size()); |
| | | values.forEach(e->{ |
| | | Variant value=new Variant(Double.parseDouble(e.toString())); |
| | | DataValue dataValue=new DataValue(value); |
| | | dataValues.add(dataValue); |
| | | }); |
| | | try { |
| | | client.writeValues(nodeIs,dataValues).get(); |
| | | } catch (InterruptedException | ExecutionException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.client; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.cert.KeyStoreLoader; |
| | | import com.jcdm.main.da.opcuaconfig.init.Properties; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.milo.opcua.sdk.client.OpcUaClient; |
| | | import org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfig; |
| | | import org.eclipse.milo.opcua.sdk.client.api.identity.AnonymousProvider; |
| | | import org.eclipse.milo.opcua.stack.client.DiscoveryClient; |
| | | import org.eclipse.milo.opcua.stack.core.Stack; |
| | | import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText; |
| | | import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned; |
| | | import org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Path; |
| | | import java.nio.file.Paths; |
| | | import java.util.List; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.ExecutionException; |
| | | import java.util.function.Predicate; |
| | | |
| | | /** |
| | | * @ClassName: ClientRunner |
| | | * @Description: 客æ·ç«¯å¯å¨ç±» |
| | | * @author yyt |
| | | * @date 2023å¹´10æ13æ¥ |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class ClientRunner { |
| | | |
| | | private final CompletableFuture<OpcUaClient> future = new CompletableFuture<>(); |
| | | |
| | | @Autowired |
| | | private Properties properties; |
| | | |
| | | @Autowired |
| | | private KeyStoreLoader keyStoreLoader; |
| | | |
| | | /** |
| | | * @MethodName: run |
| | | * @Description: å¯å¨ |
| | | * @return |
| | | * @throws Exception |
| | | * @CreateTime 2023å¹´10æ13æ¥ |
| | | */ |
| | | public OpcUaClient run() throws Exception { |
| | | |
| | | OpcUaClient client = createClient(); |
| | | |
| | | future.whenCompleteAsync((c, ex) -> { |
| | | if (ex != null) { |
| | | log.error("Error running example: {}", ex.getMessage(), ex); |
| | | } |
| | | |
| | | try { |
| | | c.disconnect().get(); |
| | | Stack.releaseSharedResources(); |
| | | } catch (InterruptedException | ExecutionException e) { |
| | | log.error("Error disconnecting:", e.getMessage(), e); |
| | | } |
| | | }); |
| | | |
| | | return client; |
| | | } |
| | | |
| | | /** |
| | | * @MethodName: createClient |
| | | * @Description: å建客æ·ç«¯ |
| | | * @return |
| | | * @throws Exception |
| | | * @CreateTime 2023å¹´10æ13æ¥ |
| | | */ |
| | | private OpcUaClient createClient() throws Exception { |
| | | |
| | | Path securityTempDir = Paths.get(properties.getCertPath(), "security"); |
| | | Files.createDirectories(securityTempDir); |
| | | if (!Files.exists(securityTempDir)) { |
| | | log.error("unable to create security dir: " + securityTempDir); |
| | | return null; |
| | | } |
| | | |
| | | KeyStoreLoader loader = keyStoreLoader.load(securityTempDir); |
| | | |
| | | // æç´¢OPCèç¹ |
| | | List<EndpointDescription> endpoints = null; |
| | | try { |
| | | //è·åå®å
¨çç¥ |
| | | endpoints = DiscoveryClient.getEndpoints(properties.getEndpointUrl()).get(); |
| | | } catch (Throwable e) { |
| | | // try the explicit discovery endpoint as well |
| | | String discoveryUrl = properties.getEndpointUrl(); |
| | | |
| | | if (!discoveryUrl.endsWith("/")) { |
| | | discoveryUrl += "/"; |
| | | } |
| | | discoveryUrl += "discovery"; |
| | | |
| | | log.info("Trying explicit discovery URL: {}", discoveryUrl); |
| | | endpoints = DiscoveryClient.getEndpoints(discoveryUrl).get(); |
| | | } |
| | | |
| | | EndpointDescription endpoint = endpoints.stream() |
| | | .filter(e -> e.getSecurityPolicyUri().equals(SecurityPolicy.None.getUri())).filter(endpointFilter()) |
| | | .findFirst().orElseThrow(() -> new Exception("no desired endpoints returned")); |
| | | |
| | | OpcUaClientConfig config = OpcUaClientConfig.builder() |
| | | // opc uaèªå®ä¹çå称 |
| | | .setApplicationName(LocalizedText.english("plc")) |
| | | // å°å |
| | | .setApplicationUri(properties.getEndpointUrl()) |
| | | .setCertificate(loader.getClientCertificate()).setKeyPair(loader.getClientKeyPair()) |
| | | // å®å
¨çç¥çé
ç½® |
| | | //.setEndpoint(endpoint).setIdentityProvider(new UsernameProvider("OPCUA", "yyt@8888888888")) |
| | | .setEndpoint(endpoint) |
| | | // å¿åéªè¯ |
| | | .setIdentityProvider(new AnonymousProvider()) |
| | | //çå¾
æ¶é´ |
| | | .setRequestTimeout(Unsigned.uint(5000)).build(); |
| | | |
| | | return OpcUaClient.create(config); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * @MethodName: endpointFilter |
| | | * @Description: endpointFilter |
| | | * @return |
| | | * @CreateTime 2023å¹´10æ13æ¥ |
| | | */ |
| | | private Predicate<EndpointDescription> endpointFilter() { |
| | | return e -> true; |
| | | } |
| | | |
| | | /** |
| | | * @return the future |
| | | */ |
| | | public CompletableFuture<OpcUaClient> getFuture() { |
| | | return future; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.controller; |
| | | |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 交äºä¿¡å·é
ç½®Controller |
| | | * |
| | | * @author yyt |
| | | * @date 2024-01-23 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/da/opcuaconfig") |
| | | public class DaOpcuaConfigController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaOpcuaConfigService daOpcuaConfigService; |
| | | |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | startPage(); |
| | | List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäº¤äºä¿¡å·é
ç½®å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:export')") |
| | | @Log(title = "交äºä¿¡å·é
ç½®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | List<DaOpcuaConfig> list = daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | ExcelUtil<DaOpcuaConfig> util = new ExcelUtil<DaOpcuaConfig>(DaOpcuaConfig.class); |
| | | util.exportExcel(response, list, "交äºä¿¡å·é
ç½®æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·å交äºä¿¡å·é
置详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(daOpcuaConfigService.selectDaOpcuaConfigById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢äº¤äºä¿¡å·é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:add')") |
| | | @Log(title = "交äºä¿¡å·é
ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return toAjax(daOpcuaConfigService.insertDaOpcuaConfig(daOpcuaConfig)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹äº¤äºä¿¡å·é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:edit')") |
| | | @Log(title = "交äºä¿¡å·é
ç½®", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return toAjax(daOpcuaConfigService.updateDaOpcuaConfig(daOpcuaConfig)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤äº¤äºä¿¡å·é
ç½® |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:opcuaconfig:remove')") |
| | | @Log(title = "交äºä¿¡å·é
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(daOpcuaConfigService.deleteDaOpcuaConfigByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.domain; |
| | | |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | /** |
| | | * 交äºä¿¡å·é
置对象 da_opcua_config |
| | | * |
| | | * @author yyt |
| | | * @date 2024-01-23 |
| | | */ |
| | | public class DaOpcuaConfig extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private Long id; |
| | | |
| | | /** èç¹ */ |
| | | @Excel(name = "èç¹") |
| | | private String node; |
| | | |
| | | /** æ°æ®ç±»å */ |
| | | @Excel(name = "æ°æ®ç±»å") |
| | | private String sysTypes; |
| | | |
| | | /** æ¯å¦è®¢é
*/ |
| | | @Excel(name = "æ¯å¦è®¢é
") |
| | | private String subscribe; |
| | | |
| | | /** 订é
ç±»å */ |
| | | @Excel(name = "订é
ç±»å") |
| | | private String rFunction; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** å·¥åºå称 */ |
| | | @Excel(name = "å·¥åºå称") |
| | | private String processName; |
| | | |
| | | /** å·¥åºç¼ç */ |
| | | @Excel(name = "å·¥åºç¼ç ") |
| | | private String process; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private Long state; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setNode(String node) |
| | | { |
| | | this.node = node; |
| | | } |
| | | |
| | | public String getNode() |
| | | { |
| | | return node; |
| | | } |
| | | public void setSysTypes(String sysTypes) |
| | | { |
| | | this.sysTypes = sysTypes; |
| | | } |
| | | |
| | | public String getSysTypes() |
| | | { |
| | | return sysTypes; |
| | | } |
| | | public void setSubscribe(String subscribe) |
| | | { |
| | | this.subscribe = subscribe; |
| | | } |
| | | |
| | | public String getSubscribe() |
| | | { |
| | | return subscribe; |
| | | } |
| | | public void setrFunction(String rFunction) |
| | | { |
| | | this.rFunction = rFunction; |
| | | } |
| | | |
| | | public String getrFunction() |
| | | { |
| | | return rFunction; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | public void setProcessName(String processName) |
| | | { |
| | | this.processName = processName; |
| | | } |
| | | |
| | | public String getProcessName() |
| | | { |
| | | return processName; |
| | | } |
| | | public void setProcess(String process) |
| | | { |
| | | this.process = process; |
| | | } |
| | | |
| | | public String getProcess() |
| | | { |
| | | return process; |
| | | } |
| | | public void setState(Long state) |
| | | { |
| | | this.state = state; |
| | | } |
| | | |
| | | public Long getState() |
| | | { |
| | | return state; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("node", getNode()) |
| | | .append("sysTypes", getSysTypes()) |
| | | .append("subscribe", getSubscribe()) |
| | | .append("rFunction", getrFunction()) |
| | | .append("remarks", getRemarks()) |
| | | .append("processName", getProcessName()) |
| | | .append("process", getProcess()) |
| | | .append("state", getState()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.domain; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @Builder(toBuilder = true) |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class NodeEntity { |
| | | |
| | | private Integer index; |
| | | private String identifier; |
| | | private Object value; |
| | | private String type; |
| | | private Integer clientHandle; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.init; |
| | | |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class BeanUtils implements ApplicationContextAware { |
| | | protected static ApplicationContext applicationContext ; |
| | | |
| | | @Override |
| | | public void setApplicationContext(ApplicationContext arg0) throws BeansException { |
| | | if (applicationContext == null) { |
| | | applicationContext = arg0; |
| | | } |
| | | |
| | | } |
| | | public static Object getBean(String name) { |
| | | //name表示å
¶ä»è¦æ³¨å
¥ç注解nameå |
| | | return applicationContext.getBean(name); |
| | | } |
| | | |
| | | /** |
| | | * æ¿å°ApplicationContext对象å®ä¾åå°±å¯ä»¥æå¨è·åBeanç注å
¥å®ä¾å¯¹è±¡ |
| | | */ |
| | | public static <T> T getBean(Class<T> clazz) { |
| | | return applicationContext.getBean(clazz); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.init; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.jcdm.main.da.opcuaconfig.client.ClientHandler; |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class OpcusConfigInit implements CommandLineRunner { |
| | | |
| | | @Autowired |
| | | private ClientHandler clientHandler; |
| | | |
| | | @Autowired |
| | | private IDaOpcuaConfigService daOpcuaConfigService; |
| | | |
| | | @Override |
| | | public void run(String... args) throws Exception { |
| | | try { |
| | | DaOpcuaConfig daOpcuaConfig=new DaOpcuaConfig(); |
| | | daOpcuaConfig.setSubscribe("Y"); //设置æ¥è¯¢æ¡ä»¶ï¼æ¯å¦è®¢é
ç¶æ为Yçæææ°æ®. |
| | | List<DaOpcuaConfig> nodeslist=daOpcuaConfigService.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | clientHandler.connect(); |
| | | if (nodeslist != null && nodeslist.size() > 0) { |
| | | List<NodeEntity> NodeList = Lists.transform(nodeslist, (DaOpcuaConfig) -> { |
| | | NodeEntity nodeEntity = new NodeEntity(); |
| | | nodeEntity.setIndex(2); |
| | | nodeEntity.setIdentifier(DaOpcuaConfig.getNode()); |
| | | return nodeEntity; |
| | | }); |
| | | clientHandler.subscribe(NodeList); |
| | | log.info("åå§åOPC订é
" + nodeslist.size() + "æ¡ï¼"); |
| | | } |
| | | log.info("ç³»ç»æ示ï¼OPCUA订é
æåï¼"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.info("ç³»ç»æ示ï¼OPCUA订é
失败ï¼"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Created by Jellyleo on 2019å¹´12æ19æ¥ |
| | | * Copyright © 2019 jellyleo.com |
| | | * All rights reserved. |
| | | */ |
| | | package com.jcdm.main.da.opcuaconfig.init; |
| | | |
| | | import lombok.Getter; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | |
| | | /** |
| | | * @ClassName: Properties |
| | | * @Description: OpcUaåæ° |
| | | * @author yyt |
| | | * @date 2023å¹´10æ13æ¥ |
| | | */ |
| | | @Getter |
| | | @Configuration |
| | | @PropertySource("classpath:opcua.properties") |
| | | public class Properties { |
| | | @Value("${opcua.server.endpoint.url}") |
| | | private String endpointUrl; |
| | | @Value("${opcua.server.idp.username}") |
| | | private String idpUsername; |
| | | @Value("${opcua.server.idp.password}") |
| | | private String idpPassword; |
| | | @Value("${opcua.client.app.name}") |
| | | private String appName; |
| | | @Value("${opcua.client.app.uri}") |
| | | private String appUri; |
| | | @Value("${opcua.client.cert.path}") |
| | | private String certPath; |
| | | @Value("${opcua.client.cert.file}") |
| | | private String certFile; |
| | | @Value("${opcua.client.cert.alias}") |
| | | private String certAlias; |
| | | @Value("${opcua.client.cert.common.name}") |
| | | private String commonName; |
| | | @Value("${opcua.client.cert.organization}") |
| | | private String organization; |
| | | @Value("${opcua.client.cert.organization.unit}") |
| | | private String orgUnit; |
| | | @Value("${opcua.client.cert.locality.name}") |
| | | private String localityName; |
| | | @Value("${opcua.client.cert.state.name}") |
| | | private String stateName; |
| | | @Value("${opcua.client.cert.country.code}") |
| | | private String countryCode; |
| | | @Value("${opcua.client.cert.dns.name}") |
| | | private String dnsName; |
| | | @Value("${opcua.client.cert.ip.address}") |
| | | private String ipAddress; |
| | | @Value("${opcua.client.cert.keystore.password}") |
| | | private String keyPassword; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.mapper; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 交äºä¿¡å·é
ç½®Mapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2024-01-23 |
| | | */ |
| | | public interface DaOpcuaConfigMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return 交äºä¿¡å·é
ç½® |
| | | */ |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return 交äºä¿¡å·é
ç½®éå |
| | | */ |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ°å¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * ä¿®æ¹äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * å é¤äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.service; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 交äºä¿¡å·é
ç½®Serviceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2024-01-23 |
| | | */ |
| | | public interface IDaOpcuaConfigService |
| | | { |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return 交äºä¿¡å·é
ç½® |
| | | */ |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return 交äºä¿¡å·é
ç½®éå |
| | | */ |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ°å¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * ä¿®æ¹äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig); |
| | | |
| | | /** |
| | | * æ¹éå é¤äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤ç交äºä¿¡å·é
置主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤äº¤äºä¿¡å·é
ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaOpcuaConfigById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.opcuaconfig.service.impl; |
| | | |
| | | import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; |
| | | import com.jcdm.main.da.opcuaconfig.mapper.DaOpcuaConfigMapper; |
| | | import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 交äºä¿¡å·é
ç½®Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2024-01-23 |
| | | */ |
| | | @Service |
| | | public class DaOpcuaConfigServiceImpl implements IDaOpcuaConfigService |
| | | { |
| | | @Autowired |
| | | private DaOpcuaConfigMapper daOpcuaConfigMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return 交äºä¿¡å·é
ç½® |
| | | */ |
| | | @Override |
| | | public DaOpcuaConfig selectDaOpcuaConfigById(Long id) |
| | | { |
| | | return daOpcuaConfigMapper.selectDaOpcuaConfigById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢äº¤äºä¿¡å·é
ç½®å表 |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return 交äºä¿¡å·é
ç½® |
| | | */ |
| | | @Override |
| | | public List<DaOpcuaConfig> selectDaOpcuaConfigList(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.selectDaOpcuaConfigList(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.insertDaOpcuaConfig(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param daOpcuaConfig 交äºä¿¡å·é
ç½® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateDaOpcuaConfig(DaOpcuaConfig daOpcuaConfig) |
| | | { |
| | | return daOpcuaConfigMapper.updateDaOpcuaConfig(daOpcuaConfig); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤äº¤äºä¿¡å·é
ç½® |
| | | * |
| | | * @param ids éè¦å é¤ç交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaOpcuaConfigByIds(Long[] ids) |
| | | { |
| | | return daOpcuaConfigMapper.deleteDaOpcuaConfigByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤äº¤äºä¿¡å·é
ç½®ä¿¡æ¯ |
| | | * |
| | | * @param id 交äºä¿¡å·é
ç½®ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaOpcuaConfigById(Long id) |
| | | { |
| | | return daOpcuaConfigMapper.deleteDaOpcuaConfigById(id); |
| | | } |
| | | } |
| | |
| | | package com.jcdm.main.da.paramCollection.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééController |
| | |
| | | package com.jcdm.main.da.paramCollection.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°éé对象 da_param_collection |
| | |
| | | private String paramStandard; |
| | | |
| | | /** ééæ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´") |
| | | private Date collectionTime; |
| | | |
| | | /** é¢çå段1 */ |
| | |
| | | /** ç±»å */ |
| | | @Excel(name = "ç±»å") |
| | | private String type; |
| | | @Excel(name = "åæ°éç¼ç ") |
| | | private String parameterSetCode; |
| | | @Excel(name = "åæ°éå称") |
| | | private String parameterSetName; |
| | | @Excel(name = "å·¥åºç¼å·") |
| | | private String processesCode; |
| | | @Excel(name = "å·¥åºå称") |
| | | private String processesName; |
| | | |
| | | |
| | | public void setId(Long id) |
| | | { |
| | |
| | | { |
| | | return type; |
| | | } |
| | | public void setParameterSetCode(String parameterSetCode) |
| | | { |
| | | this.parameterSetCode = parameterSetCode; |
| | | } |
| | | |
| | | public String getParameterSetCode() |
| | | { |
| | | return parameterSetCode; |
| | | } |
| | | public void setParameterSetName(String parameterSetName) |
| | | { |
| | | this.parameterSetName = parameterSetName; |
| | | } |
| | | |
| | | public String getParameterSetName() |
| | | { |
| | | return parameterSetName; |
| | | } |
| | | public void setProcessesCode(String processesCode) |
| | | { |
| | | this.processesCode = processesCode; |
| | | } |
| | | |
| | | public String getProcessesCode() |
| | | { |
| | | return processesCode; |
| | | } |
| | | public void setProcessesName(String processesName) |
| | | { |
| | | this.processesName = processesName; |
| | | } |
| | | |
| | | public String getProcessesName() |
| | | { |
| | | return processesName; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | .append("paramName", getParamName()) |
| | | .append("unit", getUnit()) |
| | | .append("type", getType()) |
| | | .append("parameterSetCode", getParameterSetCode()) |
| | | .append("parameterSetName", getParameterSetName()) |
| | | .append("processesCode", getProcessesCode()) |
| | | .append("processesName", getProcessesName()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | package com.jcdm.main.da.paramCollection.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设å¤äº§åè¿ç¨åæ°ééServiceä¸å¡å±å¤ç |
| | | * |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.passingStationCollection.common; |
| | | |
| | | public final class Constants { |
| | | |
| | | } |
| | |
| | | package com.jcdm.main.da.passingStationCollection.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.domain.R; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 产åè¿ç«ééController |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§åè¿ç«ééå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')") |
| | | @GetMapping("/noPageList") |
| | | public TableDataInfo noPageList(DaPassingStationCollection daPassingStationCollection) |
| | | { |
| | | List<DaPassingStationCollection> list = daPassingStationCollectionService.selectDaPassingStationCollectionList(daPassingStationCollection); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | // @PreAuthorize("@ss.hasPermi('da:passingStationCollection:list')") |
| | | // @GetMapping("/getProduceNumToday") |
| | | // public R getProduceNumToday(String fieldName) |
| | | // { |
| | | // Integer num = daPassingStationCollectionService.getProduceNumToday(fieldName); |
| | | // return R.ok(num); |
| | | // } |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§åè¿ç«ééå表 |
| | | */ |
| | | @GetMapping("/insertRepairRecordByIds") |
| | | public AjaxResult insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) |
| | | { |
| | | daPassingStationCollectionService.insertRepairRecordByIds(daPassingStationCollection); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 导åºäº§åè¿ç«ééå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:passingStationCollection:export')") |
| | |
| | | package com.jcdm.main.da.passingStationCollection.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 产åè¿ç«éé对象 da_passing_station_collection |
| | |
| | | private String equipmentNo; |
| | | |
| | | /** å
¥ç«æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å
¥ç«æ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å
¥ç«æ¶é´") |
| | | private Date inboundTime; |
| | | |
| | | /** åºç«æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "åºç«æ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "åºç«æ¶é´") |
| | | private Date outboundTime; |
| | | |
| | | /** å
¥ç«æ¯å¦åæ ¼ */ |
| | |
| | | private String outMsgSign; |
| | | |
| | | /** ééæ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´", width = 30, dateFormat = "yyyy-MM-dd") |
| | | // @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "ééæ¶é´") |
| | | private Date collectionTime; |
| | | |
| | | /** é¢çå段1 */ |
| | |
| | | @Excel(name = "èææ¶é´") |
| | | private String beatTime; |
| | | |
| | | private Long[] ids; |
| | | |
| | | public Long[] getIds() { |
| | | return ids; |
| | | } |
| | | |
| | | public void setIds(Long[] ids) { |
| | | this.ids = ids; |
| | | } |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | */ |
| | | public List<DaPassingStationCollection> selectDaPassingStationCollectionList(DaPassingStationCollection daPassingStationCollection); |
| | | |
| | | |
| | | // /** |
| | | // * è·åé¦é¡µåæ¥ç´¯è®¡é产æ°æ® |
| | | // * @param fieldName bs |
| | | // * @return list |
| | | // */ |
| | | // public Integer getProduceNumToday(String fieldName); |
| | | |
| | | /** |
| | | * æ°å¢äº§åè¿ç«éé |
| | | * |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaPassingStationCollectionById(Long id); |
| | | |
| | | void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection); |
| | | } |
| | |
| | | package com.jcdm.main.da.passingStationCollection.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | //import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | //import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
| | | //import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord; |
| | | import com.jcdm.main.rm.repairRecord.mapper.RmRepairRecordMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 产åè¿ç«ééServiceä¸å¡å±å¤ç |
| | |
| | | { |
| | | @Autowired |
| | | private DaPassingStationCollectionMapper daPassingStationCollectionMapper; |
| | | |
| | | @Autowired |
| | | private RmRepairRecordMapper rmRepairRecordMapper; |
| | | |
| | | // @Autowired |
| | | // private BsOrderSchedulingMapper bsOrderSchedulingMapper; |
| | | // |
| | | // @Autowired |
| | | // private IBsOrderSchedulingService bsOrderSchedulingService; |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§åè¿ç«éé |
| | |
| | | { |
| | | return daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection); |
| | | } |
| | | |
| | | // /** |
| | | // * è·åé¦é¡µåæ¥ç´¯è®¡é产æ°æ® |
| | | // * @param fieldName bs |
| | | // * @return list |
| | | // */ |
| | | // @Override |
| | | // public Integer getProduceNumToday(String fieldName) { |
| | | // |
| | | // BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); |
| | | // bsOrderScheduling.setQueryField(fieldName); |
| | | // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | // LocalDateTime startTime = LocalDate.now().atStartOfDay(); |
| | | // LocalDateTime endTime = LocalDate.now().plusDays(1).atStartOfDay(); |
| | | // String s1 = startTime.format(formatter); |
| | | // String s2 = endTime.format(formatter); |
| | | // bsOrderScheduling.setStartTime(s1); |
| | | // bsOrderScheduling.setEndTime(s2); |
| | | // return bsOrderSchedulingMapper.getProduceNumToday(bsOrderScheduling); |
| | | // } |
| | | |
| | | /** |
| | | * æ°å¢äº§åè¿ç«éé |
| | |
| | | { |
| | | return daPassingStationCollectionMapper.deleteDaPassingStationCollectionById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void insertRepairRecordByIds(DaPassingStationCollection daPassingStationCollection) { |
| | | Long[] conditions = daPassingStationCollection.getIds(); |
| | | for (int i = 0; i < conditions.length; i++) { |
| | | DaPassingStationCollection result = daPassingStationCollectionMapper.selectDaPassingStationCollectionById(conditions[i]); |
| | | RmRepairRecord rmRepairRecord = new RmRepairRecord(); |
| | | rmRepairRecord.setBoxCode(result.getSfcCode()); |
| | | rmRepairRecord.setProcessesCode(result.getLocationCode()); |
| | | rmRepairRecord.setOriginalResult(result.getOutRsSign()); |
| | | rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.tileMatchRules.controller; |
| | | |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; |
| | | import com.jcdm.main.da.tileMatchRules.service.IDaTileMatchRulesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
ç¦è§åController |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/da/tileMatchRules") |
| | | public class DaTileMatchRulesController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaTileMatchRulesService daTileMatchRulesService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(DaTileMatchRules daTileMatchRules) |
| | | { |
| | | startPage(); |
| | | List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºé
ç¦è§åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:export')") |
| | | @Log(title = "é
ç¦è§å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DaTileMatchRules daTileMatchRules) |
| | | { |
| | | List<DaTileMatchRules> list = daTileMatchRulesService.selectDaTileMatchRulesList(daTileMatchRules); |
| | | ExcelUtil<DaTileMatchRules> util = new ExcelUtil<DaTileMatchRules>(DaTileMatchRules.class); |
| | | util.exportExcel(response, list, "é
ç¦è§åæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åé
ç¦è§å详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(daTileMatchRulesService.selectDaTileMatchRulesById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é
ç¦è§å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:add')") |
| | | @Log(title = "é
ç¦è§å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DaTileMatchRules daTileMatchRules) |
| | | { |
| | | return toAjax(daTileMatchRulesService.insertDaTileMatchRules(daTileMatchRules)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
ç¦è§å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:edit')") |
| | | @Log(title = "é
ç¦è§å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DaTileMatchRules daTileMatchRules) |
| | | { |
| | | return toAjax(daTileMatchRulesService.updateDaTileMatchRules(daTileMatchRules)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é
ç¦è§å |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:tileMatchRules:remove')") |
| | | @Log(title = "é
ç¦è§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(daTileMatchRulesService.deleteDaTileMatchRulesByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.tileMatchRules.domain; |
| | | |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | /** |
| | | * é
ç¦è§å对象 da_tile_match_rules |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-24 |
| | | */ |
| | | public class DaTileMatchRules extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** 产åç³»å */ |
| | | @Excel(name = "产åç³»å") |
| | | private String productSeries; |
| | | |
| | | /** æ«ç 对象1 */ |
| | | @Excel(name = "æ«ç 对象1") |
| | | private String scanObject1; |
| | | |
| | | /** æ«ç 对象2 */ |
| | | @Excel(name = "æ«ç 对象2") |
| | | private String scanObject2; |
| | | |
| | | /** è½´å称 */ |
| | | @Excel(name = "è½´å称") |
| | | private String axisName; |
| | | |
| | | /** é¢å称 */ |
| | | @Excel(name = "é¢å称") |
| | | private String neckName; |
| | | |
| | | /** ç¦å称 */ |
| | | @Excel(name = "ç¦å称") |
| | | private String tileName; |
| | | |
| | | /** è½´åæ°æ°ä½ç½® */ |
| | | @Excel(name = "è½´åæ°æ°ä½ç½®") |
| | | private Long axisParameterNoPosition; |
| | | |
| | | /** é¢åæ°æ°ä½ç½® */ |
| | | @Excel(name = "é¢åæ°æ°ä½ç½®") |
| | | private Long neckParameterPosition; |
| | | |
| | | /** è½´å¼ */ |
| | | @Excel(name = "è½´å¼") |
| | | private String axisValue; |
| | | |
| | | /** é¢å¼ */ |
| | | @Excel(name = "é¢å¼") |
| | | private String neckValue; |
| | | |
| | | /** ç¦é¢è² */ |
| | | @Excel(name = "ç¦é¢è²") |
| | | private String tileColor; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** ç¶æï¼1åæ ¼ã2ä¸åæ ¼ï¼ */ |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=åæ ¼ã2ä¸åæ ¼") |
| | | private String state; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setProductSeries(String productSeries) |
| | | { |
| | | this.productSeries = productSeries; |
| | | } |
| | | |
| | | public String getProductSeries() |
| | | { |
| | | return productSeries; |
| | | } |
| | | public void setScanObject1(String scanObject1) |
| | | { |
| | | this.scanObject1 = scanObject1; |
| | | } |
| | | |
| | | public String getScanObject1() |
| | | { |
| | | return scanObject1; |
| | | } |
| | | public void setScanObject2(String scanObject2) |
| | | { |
| | | this.scanObject2 = scanObject2; |
| | | } |
| | | |
| | | public String getScanObject2() |
| | | { |
| | | return scanObject2; |
| | | } |
| | | public void setAxisName(String axisName) |
| | | { |
| | | this.axisName = axisName; |
| | | } |
| | | |
| | | public String getAxisName() |
| | | { |
| | | return axisName; |
| | | } |
| | | public void setNeckName(String neckName) |
| | | { |
| | | this.neckName = neckName; |
| | | } |
| | | |
| | | public String getNeckName() |
| | | { |
| | | return neckName; |
| | | } |
| | | public void setTileName(String tileName) |
| | | { |
| | | this.tileName = tileName; |
| | | } |
| | | |
| | | public String getTileName() |
| | | { |
| | | return tileName; |
| | | } |
| | | public void setAxisParameterNoPosition(Long axisParameterNoPosition) |
| | | { |
| | | this.axisParameterNoPosition = axisParameterNoPosition; |
| | | } |
| | | |
| | | public Long getAxisParameterNoPosition() |
| | | { |
| | | return axisParameterNoPosition; |
| | | } |
| | | public void setNeckParameterPosition(Long neckParameterPosition) |
| | | { |
| | | this.neckParameterPosition = neckParameterPosition; |
| | | } |
| | | |
| | | public Long getNeckParameterPosition() |
| | | { |
| | | return neckParameterPosition; |
| | | } |
| | | public void setAxisValue(String axisValue) |
| | | { |
| | | this.axisValue = axisValue; |
| | | } |
| | | |
| | | public String getAxisValue() |
| | | { |
| | | return axisValue; |
| | | } |
| | | public void setNeckValue(String neckValue) |
| | | { |
| | | this.neckValue = neckValue; |
| | | } |
| | | |
| | | public String getNeckValue() |
| | | { |
| | | return neckValue; |
| | | } |
| | | public void setTileColor(String tileColor) |
| | | { |
| | | this.tileColor = tileColor; |
| | | } |
| | | |
| | | public String getTileColor() |
| | | { |
| | | return tileColor; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setState(String state) |
| | | { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getState() |
| | | { |
| | | return state; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("productSeries", getProductSeries()) |
| | | .append("scanObject1", getScanObject1()) |
| | | .append("scanObject2", getScanObject2()) |
| | | .append("axisName", getAxisName()) |
| | | .append("neckName", getNeckName()) |
| | | .append("tileName", getTileName()) |
| | | .append("axisParameterNoPosition", getAxisParameterNoPosition()) |
| | | .append("neckParameterPosition", getNeckParameterPosition()) |
| | | .append("axisValue", getAxisValue()) |
| | | .append("neckValue", getNeckValue()) |
| | | .append("tileColor", getTileColor()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("state", getState()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.tileMatchRules.mapper; |
| | | |
| | | import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
ç¦è§åMapperæ¥å£ |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-24 |
| | | */ |
| | | public interface DaTileMatchRulesMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§å |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return é
ç¦è§å |
| | | */ |
| | | public DaTileMatchRules selectDaTileMatchRulesById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§åå表 |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return é
ç¦è§åéå |
| | | */ |
| | | public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * æ°å¢é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * ä¿®æ¹é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * å é¤é
ç¦è§å |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTileMatchRulesById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤é
ç¦è§å |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTileMatchRulesByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.tileMatchRules.service; |
| | | |
| | | import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
ç¦è§åServiceæ¥å£ |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-24 |
| | | */ |
| | | public interface IDaTileMatchRulesService |
| | | { |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§å |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return é
ç¦è§å |
| | | */ |
| | | public DaTileMatchRules selectDaTileMatchRulesById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§åå表 |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return é
ç¦è§åéå |
| | | */ |
| | | public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * æ°å¢é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * ä¿®æ¹é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules); |
| | | |
| | | /** |
| | | * æ¹éå é¤é
ç¦è§å |
| | | * |
| | | * @param ids éè¦å é¤çé
ç¦è§å主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTileMatchRulesByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤é
ç¦è§åä¿¡æ¯ |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteDaTileMatchRulesById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.da.tileMatchRules.service.impl; |
| | | |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.tileMatchRules.domain.DaTileMatchRules; |
| | | import com.jcdm.main.da.tileMatchRules.mapper.DaTileMatchRulesMapper; |
| | | import com.jcdm.main.da.tileMatchRules.service.IDaTileMatchRulesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é
ç¦è§åServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-24 |
| | | */ |
| | | @Service |
| | | public class DaTileMatchRulesServiceImpl implements IDaTileMatchRulesService |
| | | { |
| | | @Autowired |
| | | private DaTileMatchRulesMapper daTileMatchRulesMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§å |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return é
ç¦è§å |
| | | */ |
| | | @Override |
| | | public DaTileMatchRules selectDaTileMatchRulesById(Long id) |
| | | { |
| | | return daTileMatchRulesMapper.selectDaTileMatchRulesById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é
ç¦è§åå表 |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return é
ç¦è§å |
| | | */ |
| | | @Override |
| | | public List<DaTileMatchRules> selectDaTileMatchRulesList(DaTileMatchRules daTileMatchRules) |
| | | { |
| | | return daTileMatchRulesMapper.selectDaTileMatchRulesList(daTileMatchRules); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertDaTileMatchRules(DaTileMatchRules daTileMatchRules) |
| | | { |
| | | daTileMatchRules.setCreateTime(DateUtils.getNowDate()); |
| | | return daTileMatchRulesMapper.insertDaTileMatchRules(daTileMatchRules); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹é
ç¦è§å |
| | | * |
| | | * @param daTileMatchRules é
ç¦è§å |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateDaTileMatchRules(DaTileMatchRules daTileMatchRules) |
| | | { |
| | | daTileMatchRules.setUpdateTime(DateUtils.getNowDate()); |
| | | return daTileMatchRulesMapper.updateDaTileMatchRules(daTileMatchRules); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤é
ç¦è§å |
| | | * |
| | | * @param ids éè¦å é¤çé
ç¦è§åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaTileMatchRulesByIds(Long[] ids) |
| | | { |
| | | return daTileMatchRulesMapper.deleteDaTileMatchRulesByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤é
ç¦è§åä¿¡æ¯ |
| | | * |
| | | * @param id é
ç¦è§åä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteDaTileMatchRulesById(Long id) |
| | | { |
| | | return daTileMatchRulesMapper.deleteDaTileMatchRulesById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jcdm.main.da.opcuaconfig.mapper.DaOpcuaConfigMapper"> |
| | | <resultMap type="DaOpcuaConfig" id="DaOpcuaConfigResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="node" column="node" /> |
| | | <result property="sysTypes" column="sys_types" /> |
| | | <result property="subscribe" column="subscribe" /> |
| | | <result property="rFunction" column="r_function" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="processName" column="process_name" /> |
| | | <result property="process" column="process" /> |
| | | <result property="state" column="state" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaOpcuaConfigVo"> |
| | | select id, node, sys_types, subscribe, r_function, remarks, process_name, process, state from da_opcua_config |
| | | </sql> |
| | | |
| | | <select id="selectDaOpcuaConfigList" parameterType="DaOpcuaConfig" resultMap="DaOpcuaConfigResult"> |
| | | <include refid="selectDaOpcuaConfigVo"/> |
| | | <where> |
| | | <if test="node != null and node != ''"> and node = #{node}</if> |
| | | <if test="rFunction != null and rFunction != ''"> and r_function = #{rFunction}</if> |
| | | <if test="process != null and process != ''"> and process = #{process}</if> |
| | | <if test="state != null "> and state = #{state}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDaOpcuaConfigById" parameterType="Long" resultMap="DaOpcuaConfigResult"> |
| | | <include refid="selectDaOpcuaConfigVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into da_opcua_config |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="node != null">node,</if> |
| | | <if test="sysTypes != null">sys_types,</if> |
| | | <if test="subscribe != null">subscribe,</if> |
| | | <if test="rFunction != null">r_function,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="processName != null">process_name,</if> |
| | | <if test="process != null">process,</if> |
| | | <if test="state != null">state,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="node != null">#{node},</if> |
| | | <if test="sysTypes != null">#{sysTypes},</if> |
| | | <if test="subscribe != null">#{subscribe},</if> |
| | | <if test="rFunction != null">#{rFunction},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="processName != null">#{processName},</if> |
| | | <if test="process != null">#{process},</if> |
| | | <if test="state != null">#{state},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
| | | update da_opcua_config |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="node != null">node = #{node},</if> |
| | | <if test="sysTypes != null">sys_types = #{sysTypes},</if> |
| | | <if test="subscribe != null">subscribe = #{subscribe},</if> |
| | | <if test="rFunction != null">r_function = #{rFunction},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="processName != null">process_name = #{processName},</if> |
| | | <if test="process != null">process = #{process},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteDaOpcuaConfigById" parameterType="Long"> |
| | | delete from da_opcua_config where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDaOpcuaConfigByIds" parameterType="String"> |
| | | delete from da_opcua_config where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | <result property="paramName" column="param_name" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="type" column="type" /> |
| | | <result property="parameterSetCode" column="parameter_set_code" /> |
| | | <result property="parameterSetName" column="parameter_set_name" /> |
| | | <result property="processesCode" column="processes_code" /> |
| | | <result property="processesName" column="processes_name" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaParamCollectionVo"> |
| | | select id, work_order_no, sfc_code,processes_name,processes_code, parameter_set_code ,parameter_set_name, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection |
| | | select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, spare_field_1, spare_field_2, create_user, create_time, update_user, update_time, state, param_name, unit, type from da_param_collection |
| | | </sql> |
| | | |
| | | <select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult"> |
| | | <include refid="selectDaParamCollectionVo"/> |
| | | <where> |
| | | <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
| | | <if test="type != null and type != ''"> and type = #{type}</if> |
| | | <if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="parameterSetCode != null and parameterSetCode != ''"> and parameter_set_code = #{parameterSetCode}</if> |
| | | <if test="parameterSetName != null and parameterSetName != ''"> and parameter_set_name = #{parameterSetName}</if> |
| | | <if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if> |
| | | <if test="processesName != null and processesName != ''"> and processes_name = #{processesName}</if> |
| | | <if test="productionLine != null and productionLine != ''"> and production_line = #{productionLine}</if> |
| | | <if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
| | | <if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if> |
| | |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productionLine != null and productionLine != ''">production_line,</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code,</if> |
| | | <if test="parameterSetCode != null and parameterSetCode != ''">parameter_set_code,</if> |
| | | <if test="parameterSetName != null and parameterSetName != ''">parameter_set_name,</if> |
| | | <if test="processesCode != null and processesCode != ''">processes_code,</if> |
| | | <if test="processesName != null and processesName != ''">processes_name,</if> |
| | | <if test="equipmentNo != null">equipment_no,</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code,</if> |
| | | <if test="paramValue != null and paramValue != ''">param_value,</if> |
| | |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productionLine != null and productionLine != ''">#{productionLine},</if> |
| | | <if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
| | | <if test="parameterSetCode != null and parameterSetCode != ''">#{parameter_set_code},</if> |
| | | <if test="parameterSetName != null and parameterSetName != ''">#{parameter_set_name},</if> |
| | | <if test="processesCode != null and processesCode != ''">#{processes_code},</if> |
| | | <if test="processesName != null and processesName != ''">#{processes_name},</if> |
| | | <if test="equipmentNo != null">#{equipmentNo},</if> |
| | | <if test="paramCode != null and paramCode != ''">#{paramCode},</if> |
| | | <if test="paramValue != null and paramValue != ''">#{paramValue},</if> |
| | |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productionLine != null and productionLine != ''">production_line = #{productionLine},</if> |
| | | <if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
| | | <if test="parameterSetCode != null and parameterSetCode != ''">parameter_set_code = #{parameterSetCode},</if> |
| | | <if test="parameterSetName != null and parameterSetName != ''">parameter_set_name = #{parameterSetName},</if> |
| | | <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if> |
| | | <if test="processesName != null and processesName != ''">processes_name = #{processesName},</if> |
| | | <if test="equipmentNo != null">equipment_no = #{equipmentNo},</if> |
| | | <if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if> |
| | | <if test="paramValue != null and paramValue != ''">param_value = #{paramValue},</if> |
| | |
| | | <if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if> |
| | | <if test="inboundTime != null "> and inbound_time = #{inboundTime}</if> |
| | | <if test="outboundTime != null "> and outbound_time = #{outboundTime}</if> |
| | | <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if> |
| | | <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.jcdm.main.da.tileMatchRules.mapper.DaTileMatchRulesMapper"> |
| | | |
| | | <resultMap type="DaTileMatchRules" id="DaTileMatchRulesResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="productSeries" column="product_series" /> |
| | | <result property="scanObject1" column="scan_object1" /> |
| | | <result property="scanObject2" column="scan_object2" /> |
| | | <result property="axisName" column="axis_name" /> |
| | | <result property="neckName" column="neck_name" /> |
| | | <result property="tileName" column="tile_name" /> |
| | | <result property="axisParameterNoPosition" column="axis_parameter_no_position" /> |
| | | <result property="neckParameterPosition" column="neck_parameter_position" /> |
| | | <result property="axisValue" column="axis_value" /> |
| | | <result property="neckValue" column="neck_value" /> |
| | | <result property="tileColor" column="tile_color" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="state" column="state" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDaTileMatchRulesVo"> |
| | | select id, product_series, scan_object1, scan_object2, axis_name, neck_name, tile_name, axis_parameter_no_position, neck_parameter_position, axis_value, neck_value, tile_color, create_user, create_time, update_user, update_time, state from da_tile_match_rules |
| | | </sql> |
| | | |
| | | <select id="selectDaTileMatchRulesList" parameterType="DaTileMatchRules" resultMap="DaTileMatchRulesResult"> |
| | | <include refid="selectDaTileMatchRulesVo"/> |
| | | <where> |
| | | <if test="productSeries != null and productSeries != ''"> and product_series = #{productSeries}</if> |
| | | <if test="scanObject1 != null and scanObject1 != ''"> and scan_object1 = #{scanObject1}</if> |
| | | <if test="scanObject2 != null and scanObject2 != ''"> and scan_object2 = #{scanObject2}</if> |
| | | <if test="axisName != null and axisName != ''"> and axis_name like concat('%', #{axisName}, '%')</if> |
| | | <if test="neckName != null and neckName != ''"> and neck_name like concat('%', #{neckName}, '%')</if> |
| | | <if test="tileName != null and tileName != ''"> and tile_name like concat('%', #{tileName}, '%')</if> |
| | | <if test="axisParameterNoPosition != null "> and axis_parameter_no_position = #{axisParameterNoPosition}</if> |
| | | <if test="neckParameterPosition != null "> and neck_parameter_position = #{neckParameterPosition}</if> |
| | | <if test="axisValue != null and axisValue != ''"> and axis_value = #{axisValue}</if> |
| | | <if test="neckValue != null and neckValue != ''"> and neck_value = #{neckValue}</if> |
| | | <if test="tileColor != null and tileColor != ''"> and tile_color = #{tileColor}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="state != null and state != ''"> and state = #{state}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDaTileMatchRulesById" parameterType="Long" resultMap="DaTileMatchRulesResult"> |
| | | <include refid="selectDaTileMatchRulesVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertDaTileMatchRules" parameterType="DaTileMatchRules" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into da_tile_match_rules |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="productSeries != null">product_series,</if> |
| | | <if test="scanObject1 != null">scan_object1,</if> |
| | | <if test="scanObject2 != null">scan_object2,</if> |
| | | <if test="axisName != null">axis_name,</if> |
| | | <if test="neckName != null">neck_name,</if> |
| | | <if test="tileName != null">tile_name,</if> |
| | | <if test="axisParameterNoPosition != null">axis_parameter_no_position,</if> |
| | | <if test="neckParameterPosition != null">neck_parameter_position,</if> |
| | | <if test="axisValue != null">axis_value,</if> |
| | | <if test="neckValue != null">neck_value,</if> |
| | | <if test="tileColor != null">tile_color,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="state != null">state,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="productSeries != null">#{productSeries},</if> |
| | | <if test="scanObject1 != null">#{scanObject1},</if> |
| | | <if test="scanObject2 != null">#{scanObject2},</if> |
| | | <if test="axisName != null">#{axisName},</if> |
| | | <if test="neckName != null">#{neckName},</if> |
| | | <if test="tileName != null">#{tileName},</if> |
| | | <if test="axisParameterNoPosition != null">#{axisParameterNoPosition},</if> |
| | | <if test="neckParameterPosition != null">#{neckParameterPosition},</if> |
| | | <if test="axisValue != null">#{axisValue},</if> |
| | | <if test="neckValue != null">#{neckValue},</if> |
| | | <if test="tileColor != null">#{tileColor},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="state != null">#{state},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateDaTileMatchRules" parameterType="DaTileMatchRules"> |
| | | update da_tile_match_rules |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="productSeries != null">product_series = #{productSeries},</if> |
| | | <if test="scanObject1 != null">scan_object1 = #{scanObject1},</if> |
| | | <if test="scanObject2 != null">scan_object2 = #{scanObject2},</if> |
| | | <if test="axisName != null">axis_name = #{axisName},</if> |
| | | <if test="neckName != null">neck_name = #{neckName},</if> |
| | | <if test="tileName != null">tile_name = #{tileName},</if> |
| | | <if test="axisParameterNoPosition != null">axis_parameter_no_position = #{axisParameterNoPosition},</if> |
| | | <if test="neckParameterPosition != null">neck_parameter_position = #{neckParameterPosition},</if> |
| | | <if test="axisValue != null">axis_value = #{axisValue},</if> |
| | | <if test="neckValue != null">neck_value = #{neckValue},</if> |
| | | <if test="tileColor != null">tile_color = #{tileColor},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteDaTileMatchRulesById" parameterType="Long"> |
| | | delete from da_tile_match_rules where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteDaTileMatchRulesByIds" parameterType="String"> |
| | | delete from da_tile_match_rules where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ééåæ°é
置对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="700px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form ref="form" inline :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="å·¥åºç¼å·" prop="processesCode"> |
| | | <el-input v-model="form.processesCode" placeholder="请è¾å
¥å·¥åºç¼å·" /> |
| | | </el-form-item> |
| | |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="æå±æ¨¡å" prop="module"> |
| | | <el-input |
| | | v-model="queryParams.module" |
| | | placeholder="请è¾å
¥æå±æ¨¡å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹" prop="node"> |
| | | <el-input |
| | | v-model="queryParams.node" |
| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" prop="length"> |
| | | <el-form-item label="订é
ç±»å" prop="rFunction"> |
| | | <el-select v-model="queryParams.rFunction" placeholder="请éæ©è®¢é
ç±»å" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.subscription_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºç¼ç " prop="process"> |
| | | <el-input |
| | | v-model="queryParams.length" |
| | | placeholder="请è¾å
¥é¿åº¦" |
| | | v-model="queryParams.process" |
| | | placeholder="请è¾å
¥å·¥åºç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="sysTypes"> |
| | | <el-select v-model="queryParams.sysTypes" placeholder="请éæ©ç±»å" clearable> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-select v-model="queryParams.state" placeholder="请éæ©ç¶æ" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">é«çº§æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> |
| | | <el-form-item label="订é
ååºæ¨¡å" prop="rModule"> |
| | | <el-input |
| | | v-model="queryParams.rModule" |
| | | placeholder="请è¾å
¥è®¢é
ååºæ¨¡å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºå½æ°" prop="rFunction"> |
| | | <el-input |
| | | v-model="queryParams.rFunction" |
| | | placeholder="请è¾å
¥è®¢é
ååºå½æ°" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åè½è¯´æ" prop="functionality"> |
| | | <el-input |
| | | v-model="queryParams.functionality" |
| | | placeholder="请è¾å
¥åè½è¯´æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦è®¢é
" prop="subscribe"> |
| | | <el-select v-model="queryParams.subscribe" placeholder="请éæ©æ¯å¦è®¢é
" clearable> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['da:opcuaconfig:export']" |
| | | v-hasPermi="['main:opcuaconfig:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" border :data="opcuaconfigList" @selection-change="handleSelectionChange" v-if="opcuaconfigList.length > 0"> |
| | | <el-table border v-loading="loading" :data="opcuaconfigList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <!-- <el-table-column label="ID" align="center" prop="id" />--> |
| | | <el-table-column label="æå±æ¨¡å" align="center" prop="module"> |
| | | <el-table-column label="å·¥åºå称" align="center" prop="processName"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.module"/>--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.processName"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="èç¹" align="center" prop="node"> |
| | | <el-table-column label="å·¥åºç¼ç " align="center" prop="process"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="交äºèç¹" align="center" prop="node"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.node"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¿åº¦" align="center" prop="length"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.length"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="sysTypes"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.sysTypes"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åè½è¯´æ" align="center" prop="functionality"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.functionality"/>--> |
| | | <!-- </template>--> |
| | | <el-table-column label="æ°æ®ç±»å" align="center" prop="sysTypes"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.data_type" :value="scope.row.sysTypes"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦è®¢é
" align="center" prop="subscribe"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.subscribe"/>--> |
| | | <!-- </template>--> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.subscribe"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="订é
ååºæ¨¡å" align="center" prop="rModule"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.rModule"/>--> |
| | | <!-- </template>--> |
| | | <el-table-column label="订é
ç±»å" align="center" prop="rFunction"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.subscription_type" :value="scope.row.rFunction"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="订é
ååºå½æ°" align="center" prop="rFunction"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.rFunction"/>--> |
| | | <!-- </template>--> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="200" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['da:opcuaconfig:edit']" |
| | | v-hasPermi="['main:opcuaconfig:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['da:opcuaconfig:remove']" |
| | | v-hasPermi="['main:opcuaconfig:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-empty v-else> |
| | | <span slot="description">ææ æ°æ®</span> |
| | | </el-empty> |
| | | </el-card> |
| | | |
| | | <pagination |
| | |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹OPCUAåæ°è®¾ç½®å¯¹è¯æ¡ --> |
| | | <!-- æ·»å æä¿®æ¹äº¤äºä¿¡å·é
置对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="æå±æ¨¡å" prop="module"> |
| | | <el-input v-model="form.module" placeholder="请è¾å
¥æå±æ¨¡å" /> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹" prop="node"> |
| | | <el-form-item label="交äºèç¹" prop="node"> |
| | | <el-input v-model="form.node" placeholder="请è¾å
¥èç¹" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" prop="length"> |
| | | <el-input v-model="form.length" placeholder="请è¾å
¥é¿åº¦" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="sysTypes"> |
| | | <el-select v-model="form.sysTypes" placeholder="请éæ©ç±»å"> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- ></el-option>--> |
| | | <el-form-item label="æ°æ®ç±»å" prop="sysTypes"> |
| | | <el-select v-model="form.sysTypes" placeholder="请éæ©æ°æ®ç±»å"> |
| | | <el-option |
| | | v-for="dict in dict.type.data_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åè½è¯´æ" prop="functionality"> |
| | | <el-input v-model="form.functionality" placeholder="请è¾å
¥åè½è¯´æ" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦è®¢é
" prop="subscribe"> |
| | | <el-select v-model="form.subscribe" placeholder="请éæ©æ¯å¦è®¢é
"> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="parseInt(dict.value)"--> |
| | | <!-- ></el-option>--> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºæ¨¡å" prop="rModule"> |
| | | <el-input v-model="form.rModule" placeholder="请è¾å
¥è®¢é
ååºæ¨¡å" /> |
| | | <el-form-item label="订é
ç±»å" prop="rFunction"> |
| | | <el-select v-model="form.rFunction" placeholder="请éæ©è®¢é
ç±»å"> |
| | | <el-option |
| | | v-for="dict in dict.type.subscription_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="订é
ååºå½æ°" prop="rFunction"> |
| | | <el-input v-model="form.rFunction" placeholder="请è¾å
¥è®¢é
ååºå½æ°" /> |
| | | <!-- <el-form-item label="å·¥åºå称" prop="processName">--> |
| | | <!-- <el-input v-model="form.processName" placeholder="请è¾å
¥å·¥åºå称" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="å·¥åºç¼ç " prop="process">--> |
| | | <!-- <el-input v-model="form.process" placeholder="请è¾å
¥å·¥åºç¼ç " />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="å·¥åºç¼ç " prop="process"> |
| | | <el-select style="width: 100%" @change="handleSelectChange(form.process)" v-model="form.process" placeholder="请éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.processesCode" |
| | | :label="item.processesCode" |
| | | :value="item.processesCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºå称" prop="processName"> |
| | | <el-input disabled v-model="form.processName" placeholder="请è¾å
¥å·¥åºå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-select v-model="form.state" placeholder="请éæ©ç¶æ"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="parseInt(dict.value)" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | |
| | | |
| | | <script> |
| | | import { listOpcuaconfig, getOpcuaconfig, delOpcuaconfig, addOpcuaconfig, updateOpcuaconfig } from "@/api/main/da/opcuaconfig/opcuaconfig"; |
| | | import {listProcesses} from "@/api/main/bs/processes/processes"; |
| | | |
| | | export default { |
| | | name: "Opcuaconfig", |
| | | dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | options: [], |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // OPCUAåæ°è®¾ç½®è¡¨æ ¼æ°æ® |
| | | // 交äºä¿¡å·é
ç½®è¡¨æ ¼æ°æ® |
| | | opcuaconfigList: [], |
| | | advancedShowSearch: false, |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | module: null, |
| | | node: null, |
| | | length: null, |
| | | sysTypes: null, |
| | | functionality: null, |
| | | subscribe: null, |
| | | rModule: null, |
| | | rFunction: null, |
| | | process: null, |
| | | state: null |
| | | }, |
| | | ProcessesqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | process: null, |
| | | processName: null, |
| | | keyProcessesFlag: null, |
| | | routeCode: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getProcessesList(); |
| | | |
| | | }, |
| | | methods: { |
| | | advancedQuery(){ |
| | | this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; |
| | | /** æ¥è¯¢å·¥åºä¿¡æ¯å表 */ |
| | | getProcessesList() { |
| | | this.loading = true; |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | /** æ¥è¯¢OPCUAåæ°è®¾ç½®å表 */ |
| | | handleSelectChange(selectedOption) { |
| | | this.ProcessesqueryParams.process = selectedOption; |
| | | listProcesses(this.ProcessesqueryParams).then(response => { |
| | | this.form.processName = response.rows[0].processesName; |
| | | }); |
| | | }, |
| | | /** æ¥è¯¢äº¤äºä¿¡å·é
ç½®å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listOpcuaconfig(this.queryParams).then(response => { |
| | |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | module: null, |
| | | node: null, |
| | | length: null, |
| | | sysTypes: null, |
| | | functionality: null, |
| | | subscribe: null, |
| | | rModule: null, |
| | | rFunction: null, |
| | | remarks: null |
| | | remarks: null, |
| | | processName: null, |
| | | process: null, |
| | | state: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å OPCUAåæ°è®¾ç½®"; |
| | | this.titleName = "æ·»å 交äºä¿¡å·é
ç½®"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | |
| | | getOpcuaconfig(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹OPCUAåæ°è®¾ç½®"; |
| | | this.titleName = "ä¿®æ¹äº¤äºä¿¡å·é
ç½®"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤OPCUAåæ°è®¾ç½®ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤äº¤äºä¿¡å·é
ç½®ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delOpcuaconfig(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> |
| | | <el-form-item label="æ»æåºåå·" prop="sfcCode"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.sfcCode" |
| | | placeholder="请è¾å
¥æ»æåºåå·" |
| | | v-model="queryParams.productCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åç¼å·" prop="workOrderNo"> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.workOrderNo" |
| | | placeholder="请è¾å
¥å·¥åç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºç¼å·" prop="processesCode"> |
| | | <el-input |
| | | v-model="queryParams.processesCode" |
| | | placeholder="请è¾å
¥å·¥åºç¼å·" |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">é«çº§æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="100px"> |
| | | <el-form-item label="åæ°éç¼ç " prop="parameterSetCode"> |
| | | <el-input |
| | | v-model="queryParams.parameterSetCode" |
| | | placeholder="请è¾å
¥åæ°éç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç¼ç " prop="paramCode"> |
| | | <el-input |
| | | v-model="queryParams.paramCode" |
| | | placeholder="请è¾å
¥åæ°ç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç±»å" prop="type"> |
| | | <el-input |
| | | v-model="queryParams.type" |
| | | placeholder="请è¾å
¥åæ°ç±»å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ééæ¶é´" prop="collectionTime"> |
| | | <el-date-picker clearable |
| | | v-model="queryParams.collectionTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请éæ©ééæ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | |
| | | |
| | | <el-table v-loading="loading" border :data="paramCollectionList" @selection-change="handleSelectionChange" v-if="paramCollectionList.length > 0"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="å·¥åç¼å·" align="center" prop="workOrderNo"> |
| | | </el-table-column> |
| | | <el-table-column label="æ»æåºåå·" align="center" width="100" prop="sfcCode"> |
| | | </el-table-column> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode"> |
| | | </el-table-column> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="productionLine"> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºç¼å·" align="center" prop="processesCode"> |
| | | </el-table-column> |
| | | <el-table-column label="设å¤ç¼å·" align="center" prop="equipmentNo"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°å¼" align="center" prop="paramValue"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramUpper"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramLower"> |
| | | </el-table-column> |
| | | <el-table-column label="æ åå¼" align="center" prop="paramStandard"> |
| | | </el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="180"> |
| | | <el-table-column label="å·¥åç¼å·" align="center" prop="workOrderNo"></el-table-column> |
| | | <el-table-column label="æ»æåºåå·" align="center" width="140" prop="sfcCode" ></el-table-column> |
| | | <el-table-column label="产åç¼å·" align="center" prop="productCode"></el-table-column> |
| | | <el-table-column label="产线ç¼å·" align="center" prop="productionLine"></el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" align="center" prop="locationCode"></el-table-column> |
| | | <el-table-column label="设å¤ç¼å·" align="center" prop="equipmentNo"></el-table-column> |
| | | <el-table-column label="åæ°ç¼ç " align="center" prop="paramCode"></el-table-column> |
| | | <el-table-column label="åæ°å¼" align="center" prop="paramValue"></el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramUpper"></el-table-column> |
| | | <el-table-column label="åæ°ä¸é" align="center" prop="paramLower"></el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°å称" align="center" prop="paramName"> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"> |
| | | </el-table-column> |
| | | <el-table-column label="åæ°ç±»å" align="center" prop="type"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="200" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"></el-table-column> |
| | | <el-table-column label="åæ°å称" align="center" prop="paramName" width="150" ></el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"></el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="type"></el-table-column> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width" > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹è®¾å¤äº§åè¿ç¨åæ°éé对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="600px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="å·¥åç¼å·" prop="workOrderNo"> |
| | | <el-input v-model="form.workOrderNo" placeholder="请è¾å
¥å·¥åç¼å·" /> |
| | | <el-input v-model="form.workOrderNo" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ»æåºåå·" prop="sfcCode"> |
| | | <el-input v-model="form.sfcCode" placeholder="请è¾å
¥æ»æåºåå·" /> |
| | | <el-input v-model="form.sfcCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼å·" prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼å·" /> |
| | | <el-input v-model="form.productCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="产线ç¼å·" prop="productionLine"> |
| | | <el-input v-model="form.productionLine" placeholder="请è¾å
¥äº§çº¿ç¼å·" /> |
| | | <el-input v-model="form.productionLine" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºç¼å·" prop="processesCode"> |
| | | <el-input v-model="form.processesCode" placeholder="请è¾å
¥å·¥åºç¼å·" /> |
| | | <el-form-item label="å·¥ä½ç¼å·" prop="locationCode"> |
| | | <el-input v-model="form.locationCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç¼å·" prop="equipmentNo"> |
| | | <el-input v-model="form.equipmentNo" placeholder="请è¾å
¥è®¾å¤ç¼å·" /> |
| | | <el-input v-model="form.equipmentNo" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç¼ç " prop="paramCode"> |
| | | <el-input v-model="form.paramCode" placeholder="请è¾å
¥åæ°ç¼ç " /> |
| | | <el-input v-model="form.paramCode" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°å¼" prop="paramValue"> |
| | | <el-input v-model="form.paramValue" placeholder="请è¾å
¥åæ°å¼" /> |
| | | <el-input v-model="form.paramValue" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ä¸é" prop="paramUpper"> |
| | | <el-input v-model="form.paramUpper" placeholder="请è¾å
¥åæ°ä¸é" /> |
| | | <el-input v-model="form.paramUpper" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ä¸é" prop="paramLower"> |
| | | <el-input v-model="form.paramLower" placeholder="请è¾å
¥åæ°ä¸é" /> |
| | | <el-input v-model="form.paramLower" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ åå¼" prop="paramStandard"> |
| | | <el-input v-model="form.paramStandard" placeholder="请è¾å
¥æ åå¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="ééæ¶é´" prop="collectionTime"> |
| | | <el-date-picker clearable |
| | | v-model="form.collectionTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请éæ©ééæ¶é´"> |
| | | </el-date-picker> |
| | | <el-input v-model="form.paramStandard" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input v-model="form.state" placeholder="请è¾å
¥ç¶æ" /> |
| | |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç±»å" prop="type"> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <el-select v-model="form.type" placeholder="请éæ©ç±»å"> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | total: 0, |
| | | // 设å¤äº§åè¿ç¨åæ°ééè¡¨æ ¼æ°æ® |
| | | paramCollectionList: [], |
| | | advancedShowSearch: false, |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | advancedQuery(){ |
| | | this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true; |
| | | }, |
| | | /** æ¥è¯¢è®¾å¤äº§åè¿ç¨åæ°ééå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | </el-table-column> |
| | | <el-table-column label="å·¥ä½ç¼å·" align="center" prop="locationCode"> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="设å¤ç¼å·" align="center" prop="equipmentNo"> |
| | | </el-table-column>--> |
| | | <el-table-column label="å
¥ç«æ¶é´" align="center" prop="inboundTime" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d}') }}</span> |
| | | <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åºç«æ¶é´" align="center" prop="outboundTime" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span> |
| | | <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="å
¥ç«æ¯å¦åæ ¼" align="center" prop="inRsSign"> |
| | | </el-table-column> |
| | | <el-table-column label="å
¥ç«NGåå " align="center" prop="inMsgSign"> |
| | | </el-table-column>--> |
| | | |
| | | <el-table-column label="æ¯å¦åæ ¼" align="center" prop="outRsSign"> |
| | | </el-table-column> |
| | | <el-table-column label="NGåå " align="center" prop="outMsgSign"> |
| | | </el-table-column> |
| | | <el-table-column label="ééæ¶é´" align="center" prop="collectionTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span> |
| | | <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="èææ¶é´" align="center" prop="beatTime"> |
| | |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹äº§åè¿ç«éé对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body> |
| | | <el-form ref="form" inline :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="å·¥åç¼å·" prop="workOrderNo"> |
| | | <el-input v-model="form.workOrderNo" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item> |
| | |
| | | placeholder="请éæ©åºç«æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="å
¥ç«æ¯å¦åæ ¼" prop="inRsSign"> |
| | | <el-input v-model="form.inRsSign" placeholder="请è¾å
¥å
¥ç«æ¯å¦åæ ¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="å
¥ç«NGåå " prop="inMsgSign"> |
| | | <el-input v-model="form.inMsgSign" type="textarea" placeholder="请è¾å
¥å
容" /> |
| | | </el-form-item>--> |
| | | <el-form-item label="æ¯å¦åæ ¼" prop="outRsSign"> |
| | | <el-input v-model="form.outRsSign" placeholder="请è¾å
¥åºç«æ¯å¦åæ ¼" /> |
| | | </el-form-item> |
| | |
| | | placeholder="请éæ©ééæ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="é¢çå段1" prop="spareField1">--> |
| | | <!-- <el-input v-model="form.spareField1" type="textarea" placeholder="请è¾å
¥å
容" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢çå段2" prop="spareField2">--> |
| | | <!-- <el-input v-model="form.spareField2" type="textarea" placeholder="请è¾å
¥å
容" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="å建ç¨æ·" prop="createUser">--> |
| | | <!-- <el-input v-model="form.createUser" type="textarea" placeholder="请è¾å
¥å
容" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser">--> |
| | | <!-- <el-input v-model="form.updateUser" type="textarea" placeholder="请è¾å
¥å
容" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="èææ¶é´" prop="beatTime"> |
| | | <el-input v-model="form.beatTime" placeholder="请è¾å
¥èææ¶é´" /> |
| | | </el-form-item> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="产åç³»å" prop="productSeries"> |
| | | <el-input |
| | | v-model="queryParams.productSeries" |
| | | placeholder="请è¾å
¥äº§åç³»å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="æ«ç 对象1" prop="scanObject1">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.scanObject1"--> |
| | | <!-- placeholder="请è¾å
¥æ«ç 对象1"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ«ç 对象2" prop="scanObject2">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.scanObject2"--> |
| | | <!-- placeholder="请è¾å
¥æ«ç 对象2"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="è½´å称" prop="axisName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.axisName"--> |
| | | <!-- placeholder="请è¾å
¥è½´å称"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢å称" prop="neckName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.neckName"--> |
| | | <!-- placeholder="请è¾å
¥é¢å称"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç¦å称" prop="tileName"> |
| | | <el-input |
| | | v-model="queryParams.tileName" |
| | | placeholder="请è¾å
¥ç¦å称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="è½´åæ°æ°ä½ç½®" prop="axisParameterNoPosition">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.axisParameterNoPosition"--> |
| | | <!-- placeholder="请è¾å
¥è½´åæ°æ°ä½ç½®"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢åæ°æ°ä½ç½®" prop="neckParameterPosition">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.neckParameterPosition"--> |
| | | <!-- placeholder="请è¾å
¥é¢åæ°æ°ä½ç½®"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="è½´å¼" prop="axisValue">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.axisValue"--> |
| | | <!-- placeholder="请è¾å
¥è½´å¼"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="é¢å¼" prop="neckValue">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.neckValue"--> |
| | | <!-- placeholder="请è¾å
¥é¢å¼"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="ç¦é¢è²" prop="tileColor">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.tileColor"--> |
| | | <!-- placeholder="请è¾å
¥ç¦é¢è²"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="å建ç¨æ·" prop="createUser">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.createUser"--> |
| | | <!-- placeholder="请è¾å
¥å建ç¨æ·"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.updateUser"--> |
| | | <!-- placeholder="请è¾å
¥æ´æ¹ç¨æ·"--> |
| | | <!-- clearable--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-input |
| | | v-model="queryParams.state" |
| | | placeholder="请è¾å
¥ç¶æ" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card style="margin-top: 10px" class="box-card"> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['da:tileMatchRules:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['da:tileMatchRules:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['da:tileMatchRules:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['da:tileMatchRules:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table border v-loading="loading" :data="tileMatchRulesList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <!-- <el-table-column label="主é®id" align="center" prop="id" />--> |
| | | <el-table-column label="产åç³»å" align="center" prop="productSeries"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="æ«ç 对象1" align="center" prop="scanObject1" width="100"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="æ«ç 对象2" align="center" prop="scanObject2" width="100"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="è½´å称" align="center" prop="axisName"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="é¢å称" align="center" prop="neckName"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="ç¦å称" align="center" prop="tileName"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="è½´åæ°ä½ç½®" align="center" prop="axisParameterNoPosition" width="100"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="é¢åæ°ä½ç½®" align="center" prop="neckParameterPosition" width="100"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="è½´å¼" align="center" prop="axisValue"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="é¢å¼" align="center" prop="neckValue"> |
| | | |
| | | </el-table-column> |
| | | <el-table-column label="ç¦é¢è²" align="center" prop="tileColor"> |
| | | |
| | | </el-table-column> |
| | | <!-- <el-table-column label="å建ç¨æ·" align="center" prop="createUser">--> |
| | | |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="æ´æ¹ç¨æ·" align="center" prop="updateUser">--> |
| | | |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="ç¶æ" align="center" prop="state"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="200" label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['da:tileMatchRules:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | plain |
| | | style="width: 72px" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['da:tileMatchRules:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹é
ç¦è§å对è¯æ¡ --> |
| | | <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body> |
| | | <span slot="title"> |
| | | <i class="el-icon-s-order"></i> |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" inline :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="产åç³»å" prop="productSeries"> |
| | | <el-input v-model="form.productSeries" placeholder="请è¾å
¥äº§åç³»å" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ«ç 对象1" prop="scanObject1"> |
| | | <el-input v-model="form.scanObject1" placeholder="请è¾å
¥æ«ç 对象1" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ«ç 对象2" prop="scanObject2"> |
| | | <el-input v-model="form.scanObject2" placeholder="请è¾å
¥æ«ç 对象2" /> |
| | | </el-form-item> |
| | | <el-form-item label="è½´å称" prop="axisName"> |
| | | <el-input v-model="form.axisName" placeholder="请è¾å
¥è½´å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢å称" prop="neckName"> |
| | | <el-input v-model="form.neckName" placeholder="请è¾å
¥é¢å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¦å称" prop="tileName"> |
| | | <el-input v-model="form.tileName" placeholder="请è¾å
¥ç¦å称" /> |
| | | </el-form-item> |
| | | <el-form-item label="è½´åæ°ä½ç½®" prop="axisParameterNoPosition"> |
| | | <el-input v-model="form.axisParameterNoPosition" placeholder="请è¾å
¥è½´åæ°ä½ç½®" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢åæ°ä½ç½®" prop="neckParameterPosition"> |
| | | <el-input v-model="form.neckParameterPosition" placeholder="请è¾å
¥é¢åæ°ä½ç½®" /> |
| | | </el-form-item> |
| | | <el-form-item label="è½´å¼" prop="axisValue"> |
| | | <el-input v-model="form.axisValue" placeholder="请è¾å
¥è½´å¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢å¼" prop="neckValue"> |
| | | <el-input v-model="form.neckValue" placeholder="请è¾å
¥é¢å¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¦é¢è²" prop="tileColor"> |
| | | <el-input v-model="form.tileColor" placeholder="请è¾å
¥ç¦é¢è²" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input v-model="form.createUser" placeholder="请è¾å
¥å建ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> |
| | | <el-input v-model="form.updateUser" placeholder="请è¾å
¥æ´æ¹ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-select v-model="form.state" placeholder="请éæ©ç¶æ" > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listTileMatchRules, getTileMatchRules, delTileMatchRules, addTileMatchRules, updateTileMatchRules } from "@/api/main/bs/tileMatchRules/tileMatchRules"; |
| | | |
| | | export default { |
| | | name: "TileMatchRules", |
| | | dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | titleName: "", |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // é
ç¦è§åè¡¨æ ¼æ°æ® |
| | | tileMatchRulesList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productSeries: null, |
| | | scanObject1: null, |
| | | scanObject2: null, |
| | | axisName: null, |
| | | neckName: null, |
| | | tileName: null, |
| | | axisParameterNoPosition: null, |
| | | neckParameterPosition: null, |
| | | axisValue: null, |
| | | neckValue: null, |
| | | tileColor: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | | state: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢é
ç¦è§åå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listTileMatchRules(this.queryParams).then(response => { |
| | | this.tileMatchRulesList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | productSeries: null, |
| | | scanObject1: null, |
| | | scanObject2: null, |
| | | axisName: null, |
| | | neckName: null, |
| | | tileName: null, |
| | | axisParameterNoPosition: null, |
| | | neckParameterPosition: null, |
| | | axisValue: null, |
| | | neckValue: null, |
| | | tileColor: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | state: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.titleName = "æ·»å é
ç¦è§å"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getTileMatchRules(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.titleName = "ä¿®æ¹é
ç¦è§å"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateTileMatchRules(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addTileMatchRules(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤é
ç¦è§åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delTileMatchRules(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('da/tileMatchRules/export', { |
| | | ...this.queryParams |
| | | }, `tileMatchRules_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <el-tab-pane name="first"> |
| | | <span slot="label"> <a class="el-icon-date"></a>é¦é¡µ</span> |
| | | <el-col :span="8"> |
| | | <el-table> |
| | | <el-table-column label="åºå·" align="center" prop="repairIdentification" width="50px"/> |
| | | <el-table-column label="æä½å
容" align="center" prop="boxCode" width="300px"/> |
| | | <el-table :data="formulaChildList"> |
| | | <el-table-column label="æåº" width="60" align="center" prop="stepSort"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½å
容" :show-overflow-tooltip='true' align="center" prop="operationSteps"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <!-- <el-input v-model="url" type="text" style="width: 20%" /> --> |
| | | <!-- <el-button @click="join" type="primary">è¿æ¥</el-button>--> |
| | | <!-- <el-button @click="exit" type="danger">æå¼</el-button>--> |
| | | |
| | | <!-- <br />--> |
| | | <!-- <el-input type="textarea" v-model="message" :rows="9" />--> |
| | | <!-- <el-button type="info" @click="send">åéæ¶æ¯</el-button>--> |
| | | <!-- <br />--> |
| | | <!-- <br />--> |
| | | <!-- <el-input type="textarea" v-model="text_content" :rows="9" /> è¿åå
容--> |
| | | <!-- <br />--> |
| | | <!-- <br />--> |
| | | <el-image style="height: 520px;width: 100%" :src="imgSrc"></el-image> |
| | | </el-col> |
| | | </el-tab-pane> |
| | |
| | | <script> |
| | | import {listWorkReport} from "@/api/main/om/workReport/workReport"; |
| | | import {listStationConf,getIpv4} from "@/api/main/sc/stationConf"; |
| | | import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild"; |
| | | |
| | | export default { |
| | | name: "stationTerminal", |
| | | data() { |
| | | return { |
| | | // æ¥è¯¢åæ° |
| | | formulaChildParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | productCode: null, |
| | | }, |
| | | // é
æ¹é
ç½®åä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | formulaChildList: [], |
| | | ipAddress: '', |
| | | imgSrc: '', |
| | | headContent: { |
| | |
| | | message: "", |
| | | text_content: "", |
| | | ws: null, |
| | | inputValue: '9' |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | | this.exit(); |
| | | }, |
| | | created() { |
| | | this.getStationConfList(); |
| | | this.connectWebsocket(); |
| | | |
| | | |
| | | this.initStation(); |
| | | // this.getStationConfList(); |
| | | // setTimeout(() => { |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢é
æ¹é
ç½®åä¿¡æ¯å表 */ |
| | | getListFormulaChild() { |
| | | this.formulaChildParams.productCode = this.workpieceInformation.productCode |
| | | listFormulaChild(this.formulaChildParams).then(response => { |
| | | console.log(this.formulaChildList) |
| | | this.formulaChildList = response.rows; |
| | | }); |
| | | }, |
| | | changeMenu(tab, event) { |
| | | console.log(tab, event); |
| | | }, |
| | |
| | | this.headContent.sfcCode = this.content |
| | | this.queryParams.sfcCode = this.content |
| | | this.getList() |
| | | this.getListFormulaChild() |
| | | this.cakeLamp.scanFinish = 1 |
| | | }, |
| | | /** æ¥è¯¢æ¥å·¥è®°å½ 表å表 */ |