From 49ca7cac33b124324250f307b12ce84370daa2f3 Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期三, 24 七月 2024 15:40:52 +0800 Subject: [PATCH] fix6 --- jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java | 1 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java | 40 ++++++++-- jcdm-ui/src/views/main/om/productionOrde/index.vue | 16 ++++ jcdm-ui/src/views/main/om/productionOrde/detail.vue | 4 jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue | 126 +++++++++++++++--------------- jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java | 3 6 files changed, 118 insertions(+), 72 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java index ee0eac5..d3b46b7 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java @@ -13,6 +13,7 @@ import com.jcdm.common.core.domain.entity.SysDictData; import com.jcdm.common.core.page.TableDataInfo; import com.jcdm.common.enums.BusinessType; +import com.jcdm.common.exception.ServiceException; import com.jcdm.common.utils.StringUtils; import com.jcdm.common.utils.poi.ExcelUtil; import com.jcdm.main.bs.orderScheduling.common.Constants; @@ -45,10 +46,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; import java.util.stream.Collectors; /** @@ -215,6 +213,16 @@ List<BsOrderScheduling> list = new ArrayList<>(); if (StringUtils.isNotEmpty(bsOrderScheduling.getOrderNo())){ list = bsOrderSchedulingService.selectBsOrderSchedulingPage(bsOrderScheduling); + if (CollUtil.isNotEmpty(list)){ + list.forEach(x -> { + if (StrUtil.isNotBlank(x.getWorkingHours())){ + x.setWorkingHoursInt(Integer.parseInt(x.getWorkingHours())); + } else { + x.setWorkingHoursInt(0); + } + }); + list = list.stream().sorted(Comparator.comparing(BsOrderScheduling::getWorkingHoursInt)).collect(Collectors.toList()); + } } List<BsOrderScheduling> collect = list.stream().filter(x -> Constants.UN_QUALIFIED.equals(x.getQualityStatus())).collect(Collectors.toList()); if (CollUtil.isNotEmpty(collect)){ @@ -315,21 +323,35 @@ */ @Transactional(rollbackFor = Exception.class) @GetMapping("/engineNoIsInModel") - public R engineNoIsInModel(String engineNo,String model,String orderNo) throws Exception { + public R engineNoIsInModel(String engineNo,String model,String orderNo,Boolean repairFlag) throws Exception { if (StringUtils.isEmpty(engineNo)){ - return R.fail(500,"绠变綋鐮佷负绌烘垨宸插瓨鍦紝璇烽噸璇�"); + return R.fail(500,"绠变綋鐮佷笉鑳戒负绌猴紝璇烽噸璇�"); } ProductNewPassStation checkStation = new ProductNewPassStation(); checkStation.setBoxCode(engineNo); List<ProductNewPassStation> checkList = productNewPassStationService.getProductPassStationList(checkStation); + if (!repairFlag){ + if (CollUtil.isNotEmpty(checkList)){ + return R.fail(500,"璇峰嬁閲嶅鎵弿绠变綋鐮�"); + } + } BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); bsOrderScheduling.setOrderNo(orderNo); List<BsOrderScheduling> allList = bsOrderSchedulingService.selectBsOrderSchedulingList(bsOrderScheduling); + if (CollUtil.isNotEmpty(allList)){ + allList.forEach(x -> { + if (StrUtil.isNotBlank(x.getWorkingHours())){ + x.setWorkingHoursInt(Integer.parseInt(x.getWorkingHours())); + } else { + x.setWorkingHoursInt(0); + } + }); + allList = allList.stream().sorted(Comparator.comparing(BsOrderScheduling::getWorkingHoursInt)).collect(Collectors.toList()); + } List<BsOrderScheduling> dlist = allList.stream().filter(x->x.getProductionStatus().equals(Constants.WAIT_PRODUCTION)).collect(Collectors.toList()); List<BsOrderScheduling> collect = allList.stream().filter(x -> x.getProductionStatus().equals(Constants.ORDER_STATUS_ING) ||x.getProductionStatus().equals(Constants.FINISH_PRODUCTION)).collect(Collectors.toList()); - if (CollUtil.isNotEmpty(checkList)){ //閲嶅鎵爜 ProductNewPassStation productNewPassStation = checkList.get(0); @@ -347,6 +369,8 @@ } else { //OPC鎿嶄綔 logger.info("褰撳墠绔欓噸鏂版壂鐮�,{}",sfcCode); +// ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP010.ProductTypeSN",sfcCode); +// OPCUaSubscription.miloService.writeToOpcUa(entity3);//鍐欎骇鍝丼N鍙峰弽棣� ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP010.Code", sfcCode); OPCUaSubscription.miloService.writeToOpcUa(entity);//鍐橲N return R.ok(); @@ -363,7 +387,7 @@ OmProductionOrdeInfo omProductionOrdeInfo = omProductionOrdeInfos.get(0); Long planQty = omProductionOrdeInfo.getPlanQty(); if (planQty<collect.size()){ - return R.ok(500,"瓒呭嚭璁″垝鏁伴噺锛岃妫�鏌ュ悗閲嶈瘯"); + return R.fail(500,"瓒呭嚭璁″垝鏁伴噺锛岃妫�鏌ュ悗閲嶈瘯"); } } //鎻掑叆鏁版嵁 diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java index 6756f87..47898d6 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/domain/BsOrderScheduling.java @@ -80,6 +80,9 @@ @ExcelProperty(value = "宸ユ椂", index = 5) private String workingHours; + @TableField(exist = false) + private Integer workingHoursInt; + /** 褰撳墠宸ヤ綅 */ @Excel(name = "褰撳墠宸ヤ綅") @ExcelProperty(value = "褰撳墠宸ヤ綅", index = 6) diff --git a/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java b/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java index 07b14f9..c5671e2 100644 --- a/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java +++ b/jcdm-quartz/src/main/java/com/jcdm/quartz/task/RyTask.java @@ -74,6 +74,7 @@ } for (BsOrderScheduling scheduling : bsOrderSchedulingList) { scheduling.setRemarks("0"); + scheduling.setProductionStatus("1"); bsOrderSchedulingService.updateBsOrderScheduling(scheduling); } diff --git a/jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue b/jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue index eb05d5e..03ecb28 100644 --- a/jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue +++ b/jcdm-ui/src/views/main/cfkb/connectingRodUp/index.vue @@ -8,17 +8,17 @@ </div> </template> </el-card> - <el-card class="query-card" > - <el-form :model="from" size="large" :inline="true" label-width="78px" @submit.native.prevent> - <el-form-item label-width="200" label="杩炴潌鐮�" :prop="from.connectCode" style="align-content: center"> - <input v-model="from.connectCode" - ref="inputdata1" - style="height: 39px; width: 300px" - placeholder="璇锋壂鎻忚繛鏉嗙爜" - /> - </el-form-item> - </el-form> - </el-card> +<!-- <el-card class="query-card" >--> +<!-- <el-form :model="from" size="large" :inline="true" label-width="78px" @submit.native.prevent>--> +<!-- <el-form-item label-width="200" label="杩炴潌鐮�" :prop="from.connectCode" style="align-content: center">--> +<!-- <input v-model="from.connectCode"--> +<!-- ref="inputdata1"--> +<!-- style="height: 39px; width: 300px"--> +<!-- placeholder="璇锋壂鎻忚繛鏉嗙爜"--> +<!-- />--> +<!-- </el-form-item>--> +<!-- </el-form>--> +<!-- </el-card>--> <!-- <el-card class="box-card" >--> <!-- <el-form :model="from" size="large" :inline="true" label-width="68px" @submit.native.prevent>--> <!-- <el-form-item label-width="200" label="娲诲杩炴潌鎵樼洏鐮�" :prop="from.scanObject2" style="align-content: center">--> @@ -126,63 +126,63 @@ } }, mounted() { - this.setFocus1() - this.$refs.inputdata1.addEventListener('keydown',this.handleScannerInput1) + // this.setFocus1() + // this.$refs.inputdata1.addEventListener('keydown',this.handleScannerInput1) this.getStationConf() this.getWebUrl() this.getDetailMessage() }, - beforeDestroy() { - this.$refs.inputdata1.removeEventListener('keydown',this.handleScannerInput1) - }, + // beforeDestroy() { + // this.$refs.inputdata1.removeEventListener('keydown',this.handleScannerInput1) + // }, methods:{ - setFocus1(){ - this.$nextTick(()=>{ - this.$refs.inputdata1.focus() - }) - }, - handleScannerInput1(event) { - if (this.scannerFlag) { - this.$refs.inputdata1.value = '' - this.scannerFlag = false - } - const input = event.target - const inputValue = input.value - this.from.connectCode = inputValue - if (event.key === 'Enter') { - this.scannerFlag = true - //鎵弿瀹屾垚 - console.log('sssss', this.from.connectCode) - getSfcCodeByConnectCode({connectCode:this.from.connectCode}).then(res => { - console.log('res',res) - if (res.code === 200){ - this.queryParams.scanObject2 = res.data.sfcCode - - if (this.queryParams.scanObject1 !== null && this.queryParams.scanObject1 !== '' - && this.queryParams.scanObject2 !== null && this.queryParams.scanObject2 !== ''){ - if (this.queryParams.scanObject1 === this.queryParams.scanObject2){ - this.queryParams.words = "閰嶅鎴愬姛" - this.queryParams.tileColor = "#3dcc1d" - //璇锋眰鍑虹珯 - // this.passStation() - }else { - this.queryParams.words = "閰嶅澶辫触" - this.queryParams.tileColor = "#f50909" - } - } - this.$message({ - message: '鏌ヨ鎴愬姛', - type: 'success' - }); - } else { - this.$message({ - message: '鏌ヨ澶辫触', - type: 'error' - }); - } - }) - } - }, + // setFocus1(){ + // this.$nextTick(()=>{ + // this.$refs.inputdata1.focus() + // }) + // }, + // handleScannerInput1(event) { + // if (this.scannerFlag) { + // this.$refs.inputdata1.value = '' + // this.scannerFlag = false + // } + // const input = event.target + // const inputValue = input.value + // this.from.connectCode = inputValue + // if (event.key === 'Enter') { + // this.scannerFlag = true + // //鎵弿瀹屾垚 + // console.log('sssss', this.from.connectCode) + // getSfcCodeByConnectCode({connectCode:this.from.connectCode}).then(res => { + // console.log('res',res) + // if (res.code === 200){ + // this.queryParams.scanObject2 = res.data.sfcCode + // + // if (this.queryParams.scanObject1 !== null && this.queryParams.scanObject1 !== '' + // && this.queryParams.scanObject2 !== null && this.queryParams.scanObject2 !== ''){ + // if (this.queryParams.scanObject1 === this.queryParams.scanObject2){ + // this.queryParams.words = "閰嶅鎴愬姛" + // this.queryParams.tileColor = "#3dcc1d" + // //璇锋眰鍑虹珯 + // // this.passStation() + // }else { + // this.queryParams.words = "閰嶅澶辫触" + // this.queryParams.tileColor = "#f50909" + // } + // } + // this.$message({ + // message: '鏌ヨ鎴愬姛', + // type: 'success' + // }); + // } else { + // this.$message({ + // message: '鏌ヨ澶辫触', + // type: 'error' + // }); + // } + // }) + // } + // }, getWebUrl(){ getUrl().then(res=>{ this.websocketUrl = res+"OP050" diff --git a/jcdm-ui/src/views/main/om/productionOrde/detail.vue b/jcdm-ui/src/views/main/om/productionOrde/detail.vue index 5d24ee3..b320538 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/detail.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/detail.vue @@ -10,6 +10,7 @@ placeholder="璇锋壂鎻忕浣撶爜" /> </el-form-item> + <el-checkbox class="custom-size" style="margin-left: 40px; margin-right: 40px" v-model="repairFlag">杩斾慨</el-checkbox> <el-button size="large" type="info" @click="refresh">杩斿洖</el-button> </el-form> </el-card> @@ -94,6 +95,7 @@ return{ // 鎬绘潯鏁� total: 0, + repairFlag:false, queryParams: { orderNo:'', pageNum: 1, @@ -131,7 +133,7 @@ this.scannerFlag = true //鎵弿瀹屾垚 engineNoIsInModel({engineNo:this.queryParams.productionNotice, - model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo + model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag }).then(res => { if (res.data===500){ this.$message({ diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue index 7042ed4..0d1bc90 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/index.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue @@ -816,4 +816,20 @@ .hidden-form-item { display: none; } +::v-deep .custom-size .el-checkbox__input .el-checkbox__inner { + width: 20px; + height: 20px; +} +/* 璋冩暣Checkbox鐨勬爣绛炬枃瀛楀ぇ灏� */ +::v-deep .custom-size .el-checkbox__inner::after { + border: 3px solid #fff; + border-left: 0; + border-top: 0; + left: 5px; + top: 5px; +} + +::v-deep .custom-size .el-checkbox__input.is-checked .el-checkbox__inner::after { + transform: rotate(50deg) scaleY(1.3);} + </style> -- Gitblit v1.9.3