From 852cb4e84d21d214d2b1d61fe006746bb694f258 Mon Sep 17 00:00:00 2001 From: jiang <1354748262@qq.com> Date: 星期三, 24 一月 2024 13:43:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java | 31 +++++++++- jcdm-ui/src/views/main/kb/engineCheck/index.vue | 68 +++++++++++----------- jcdm-ui/src/views/main/kb/repairMark/index.vue | 22 +++--- jcdm-ui/src/views/main/pr/tightenReport/index.vue | 2 4 files changed, 75 insertions(+), 48 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java index 9189ab9..1fe5a1e 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/cert/MethodName.java +++ b/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); diff --git a/jcdm-ui/src/views/main/kb/engineCheck/index.vue b/jcdm-ui/src/views/main/kb/engineCheck/index.vue index 858494b..fbcb8b3 100644 --- a/jcdm-ui/src/views/main/kb/engineCheck/index.vue +++ b/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; !* 璁剧疆楂樺害 *!*/ diff --git a/jcdm-ui/src/views/main/kb/repairMark/index.vue b/jcdm-ui/src/views/main/kb/repairMark/index.vue index ffea7be..4a040c2 100644 --- a/jcdm-ui/src/views/main/kb/repairMark/index.vue +++ b/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> diff --git a/jcdm-ui/src/views/main/pr/tightenReport/index.vue b/jcdm-ui/src/views/main/pr/tightenReport/index.vue index edb177a..f1f45df 100644 --- a/jcdm-ui/src/views/main/pr/tightenReport/index.vue +++ b/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> -- Gitblit v1.9.3