From ee2a27313fbf5e7741644f9f3701d243487dbaa4 Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期二, 16 七月 2024 16:04:42 +0800 Subject: [PATCH] 修改 --- modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java | 6 +++++- web/src/views/modules/basicInfo/XhProductModel.vue | 10 +++++++--- modules/mainPart/src/main/resources/mapper/baseReliability/ParamDataBasicDao.xml | 12 ++++++------ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java index b942504..fb30953 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java @@ -65,7 +65,7 @@ List<XhProductModel> productList = null; if (showXdy) { productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, - Constant.Bool.NO).lt("product_type", 5).orderByAsc(Constant.TableColumn.SORT)); + Constant.Bool.NO).ne("product_type", 5).orderByAsc(Constant.TableColumn.SORT)); } else { if (ztShow == 1) { productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, @@ -295,6 +295,8 @@ } if (StringUtils.isNotBlank(basicMtbfOperatingRatio)){ itemEntity.setBasicMtbfOperatingRatio(Double.valueOf(basicMtbfOperatingRatio)); + }else{ + itemEntity.setBasicMtbfOperatingRatio(1.0); } if (StringUtils.isNotBlank(taskMtbcfRegulate)){ itemEntity.setTaskMtbcfRegulate(Double.valueOf(taskMtbcfRegulate)); @@ -310,6 +312,8 @@ } if (StringUtils.isNotBlank(taskMtbcfOperatingRatio)){ itemEntity.setTaskMtbcfOperatingRatio(Double.valueOf(taskMtbcfOperatingRatio)); + }else{ + itemEntity.setTaskMtbcfOperatingRatio(1.0); } itemEntity.setRepairable(isOrNot.get(repairable)); itemEntity.setRepairDistribType(repairType.get(repairDistribType)); diff --git a/modules/mainPart/src/main/resources/mapper/baseReliability/ParamDataBasicDao.xml b/modules/mainPart/src/main/resources/mapper/baseReliability/ParamDataBasicDao.xml index fe5ab9c..286fedf 100644 --- a/modules/mainPart/src/main/resources/mapper/baseReliability/ParamDataBasicDao.xml +++ b/modules/mainPart/src/main/resources/mapper/baseReliability/ParamDataBasicDao.xml @@ -51,14 +51,14 @@ and c.ship_id = ${shipId} and c.product_type = ${productType} and c.is_delete = 0 and b.ship_id = ${shipId} and b.pid = c.id and b.is_delete = 0 and a.IS_DELETE = 0 and a.product_id = b.id - AND (b.product_type =5 AND a.basic_join_compute = 1 || b.product_type < 5) - AND ((a.reliab_distrib_type =1 + AND ( (b.product_type = 5 AND a.basic_join_compute = 1 + and (( + a.reliab_distrib_type = 1 AND a.basic_mtbf_regulate > 0 ) - OR ( a.reliab_distrib_type = 2 - AND a.basic_mtbf_regul_succ_rate > 0 - )) - + OR ( a.reliab_distrib_type = 2 AND a.basic_mtbf_regul_succ_rate > 0 )) + ) + || (b.product_type < 5 AND a.basic_mtbf_regulate > 0 ) ) GROUP BY c.id,c.name ) c )d set f.basic_mtbf_regulate = d.basic_mtbf_regulate, diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue index 1ef5428..9d1c645 100644 --- a/web/src/views/modules/basicInfo/XhProductModel.vue +++ b/web/src/views/modules/basicInfo/XhProductModel.vue @@ -84,16 +84,18 @@ }, methods: { add() { + console.log(this.dataForm.type,'this.dataForm.type') this.dataForm.type = this.productType if (this.dataForm.type !== '1') { if (this.dataForm.type !== '3') { - this.dataForm.type = this.dataForm.type - 1 + this.dataForm.type = this.dataForm.type + 1 } else if (this.dataForm.type === '3') { - this.dataForm.type = this.dataForm.type - 2 + this.dataForm.type = this.dataForm.type + 2 } else if (this.dataForm.type === '0') { this.$alert("褰撳墠鑺傜偣涓嶅彲鏂板瀛愯妭鐐癸紝璇烽噸鏂拌缃�") return } + console.log(this.dataForm.type,'this.dataForm.type') this.$refs.SelectTyModel.$refs.dialog.init(null, {type: this.dataForm.type, id: this.dataForm.pid}) } else { this.$refs.AddOrUpdate.$refs.dialog.init(null, {id: null, type: 'zt', pid: this.dataForm.pid}) @@ -112,13 +114,15 @@ this.$refs.ProductModelTree.getProductList() }, onProductSelected(data) { - console.log(data) + console.log(data,'onProductSelected') this.dataForm.pid = data.id this.dataForm.type = data.productType this.productType = data.productType if (data.productType !== '10') { this.$refs.tableObj.query() } + console.log(data.productType,' data.productType') + console.log(this.productType,' data.productType') }, importData(row) { this.$refs.ProductImport.$refs.dialog.init(row) -- Gitblit v1.9.1