jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/kb/engineCheck/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/kb/repairMark/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/pr/tightenReport/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java
@@ -7,10 +7,13 @@ 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.time.Duration; import java.util.*; import java.util.stream.Collectors; @@ -20,11 +23,15 @@ 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(); @@ -34,28 +41,46 @@ 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.setCollectParameterId(parts[0]+"."+parts[1]); daCollectionParamConf.setGatherAddress(parts[0]+"."+parts[1]); b=collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf); List<NodeId> nodeId = b.stream().map(info -> { NodeId nodeid = new NodeId(2,info.getCollectParameterId()); 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); jcdm-ui/src/views/main/kb/engineCheck/index.vue
@@ -1,47 +1,47 @@ <template> <div class="app-container"> <el-card class="box-card" > <el-card class="box-card" style="height: 60px" > <template> <div class="container"> <el-row type="flex" justify="center" style="text-align: center" > <el-col :span="12"> <span style="fontSize:35px;color:black"><strong>发动机数据检查</strong></span> </el-col> </el-row> <div class="container" type="flex" justify="center" style="text-align:center"> <!-- <el-row type="flex" justify="center" style="text-align:center;height: 12px" >--> <!-- <el-col type="flex" justify="center" :span="14" style="text-align:center">--> <span style="font-size:22px;color:black"><strong>发动机数据检查</strong></span> <!-- </el-col>--> <!-- </el-row>--> </div> </template> </el-card> <el-row :gutter="0" > <el-col :span="14"> <el-card class="box-card" > <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="engineNo" > <span slot="label" style="font-size:40px;color:black"><strong>发动机号</strong></span> <el-input style="font-size:30px" v-model="form.engineNo" placeholder="请输入发动机号" clearable @keyup.enter.native="EngineNohandleChange" > <el-card class="box-card" style="margin-top: 5px" > <el-form ref="form" :model="form" label-width="25%" > <el-form-item prop="engineNo" style="margin-top: 16px"> <span slot="label" style="font-size:22px;color:black;"><strong>发动机号</strong></span> <el-input style="font-size:20px" v-model="form.engineNo" placeholder="请输入发动机号" clearable @keyup.enter.native="EngineNohandleChange" > <el-button slot="append" plain type="info" @click="EngineNohandleChange(form.engineNo)" icon="el-icon-search"></el-button> </el-input> </el-form-item> </el-form> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="productType" > <span slot="label" style="font-size:40px;color:black"><strong>机型</strong></span> <el-input disabled style="font-size:30px" value="form.productType" v-model="form.productType" placeholder="" /> <el-form ref="form" :model="form" label-width="25%" > <el-form-item prop="productType"style="margin-top: 30px" > <span slot="label" style="font-size:22px;color:black"><strong>机型</strong></span> <el-input disabled style="font-size:20px" value="form.productType" v-model="form.productType" placeholder="" /> </el-form-item> </el-form> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="orderNo" > <span slot="label" style="font-size:40px;color:black"><strong>工单编号</strong></span> <el-input disabled style="font-size:30px" v-model="form.orderNo" placeholder="" /> <el-form ref="form" :model="form" label-width="25%" > <el-form-item prop="orderNo" style="margin-top: 30px"> <span slot="label" style="font-size:22px;color:black"><strong>工单编号</strong></span> <el-input disabled style="font-size:20px" v-model="form.orderNo" placeholder="" /> </el-form-item> </el-form> <el-form ref="form" :model="form" label-width="200px" style="height: 60px;margin-top: 20px" > <el-form-item prop="currentWorkstation" > <span slot="label" style="font-size:40px;color:black"><strong>质量状态</strong></span> <el-input disabled style="font-size:30px" v-model:value="form.add" placeholder="" /> <el-form ref="form" :model="form" label-width="25%" > <el-form-item prop="currentWorkstation" style="margin-top: 30px"> <span slot="label" style="font-size:22px;color:black"><strong>质量状态</strong></span> <el-input disabled style="font-size:20px" v-model:value="form.add" placeholder="" /> </el-form-item> </el-form> <el-divider></el-divider> <el-row :gutter="10" class="mb8" type="flex" justify="center" style="text-align: center"> <el-col :span="1.5"> <el-button plain :disabled="buttondisabled" type="primary" style="width:400px;height:160px" v-hasPermi="['bs:formula:add']" @click="forceOnline"> @@ -53,17 +53,17 @@ </el-card> </el-col> <el-col :span="10" inline > <el-col :span="10" inline style="margin-top: 5px"> <el-tabs type="border-card" > <el-card> <el-col :span="14"style="height: 248px;width:800px "> <el-card class="custom-content" style="height: 242px;width:800px"> <el-col :span="14"> <span style="font-size:25px"><strong>质量状态</strong></span> <el-divider></el-divider> {{this.form.engineCheckList}} </el-col> </el-card> <el-card style="margin-top: 10px" > <el-col :span="14"style="height: 248px;width:800px "> <el-card class="custom-content" style="margin-top: 10px;height: 242px;width:800px" > <el-col :span="14"style=" "> <span style="font-size:25px"><strong>最终结果</strong></span> <el-divider></el-divider> {{queryParams.productType}} @@ -191,12 +191,14 @@ </script> <style scoped> ::v-deep .el-input__inner{ height: 50px; height: 40px; } ::v-deep .el-form-item__label { line-height: 50px; line-height: 40px; } .custom-content { height: 50%; /* 设置高度为50% */ } /*.my-custom-modal .el-dialog__wrapper {*/ /* width: 400px; !* 设置宽度 *!*/ /* height: 200px; !* 设置高度 *!*/ jcdm-ui/src/views/main/kb/repairMark/index.vue
@@ -2,7 +2,7 @@ <div class="app-container"> <el-card class="box-card" > <el-row> <el-divider style="margin-bottom: 10px"><span style="font-size: 40px">发动机返修标记系统</span></el-divider> <el-divider><span style="font-size: 30px">发动机返修标记系统</span></el-divider> </el-row> <el-row style="margin-top: 10px"> <el-form :model="queryParams.sfcCode" ref="queryForm" :inline="true" label-width="68px" > @@ -21,7 +21,7 @@ </el-form> </el-row> </el-card> <el-row :gutter="0"> <el-row> <el-col :span="20"> <el-card style="margin-top: 10px; height: 490px;" class="box-card"> <el-table border ref="multipleTable" :data="passingStationCollectionList" @selection-change="handleSelectionChange"> @@ -38,12 +38,12 @@ </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="outRsSign"> @@ -52,7 +52,7 @@ </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"> @@ -62,12 +62,12 @@ </el-col> <el-col :span="4"> <el-card style="margin-top: 10px; min-height: 490px" class="box-card"> <el-button type="success" icon="el-icon-s-grid" @click="selectAll" style="margin-left: 40px;width: 120px;margin-top: 10px">选择所有</el-button> <el-button type="success" icon="el-icon-close" @click="clearAll" style="margin-left: 40px; width: 120px;margin-top: 10px">取消选择</el-button> <el-button type="success" icon="el-icon-document-remove" @click="selectUnqualified" style="margin-left: 40px; width: 120px;margin-top: 10px">选择不合格</el-button> <el-button type="success" icon="el-icon-s-flag" @click="markComplete" style="margin-left: 40px; width: 120px;margin-top: 10px">标记完成</el-button> <el-button type="success" icon="el-icon-files" @click="repairRecord" style="margin-left: 40px; width: 120px;margin-top: 10px">返修记录</el-button> <el-button type="success" icon="el-icon-date" @click="operationLog" style="margin-left: 40px; width: 120px;margin-top: 10px">操作日志</el-button> <el-button type="success" icon="el-icon-s-grid" @click="selectAll" style="margin-left: 10px; width: 100px;margin-top: 10px">选择所有</el-button> <el-button type="success" icon="el-icon-close" @click="clearAll" style="width: 100px;margin-top: 10px">取消选择</el-button> <el-button type="success" icon="el-icon-document-remove" @click="selectUnqualified" style="width: 100px;margin-top: 10px">选择不合格</el-button> <el-button type="success" icon="el-icon-s-flag" @click="markComplete" style="width: 100px;margin-top: 10px">标记完成</el-button> <el-button type="success" icon="el-icon-files" @click="repairRecord" style="width: 100px;margin-top: 10px">返修记录</el-button> <el-button type="success" icon="el-icon-date" @click="operationLog" style="width: 100px;margin-top: 10px">操作日志</el-button> </el-card> </el-col> jcdm-ui/src/views/main/pr/tightenReport/index.vue
@@ -40,7 +40,7 @@ <el-table-column label="参数值" align="center" prop="paramValue"></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="state"></el-table-column>