From 5d7a033c7e157c9a81c90836abbd1a61d80f6798 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 6 Mar 2024 15:21:39 +0800 Subject: [PATCH] '20240306 --- .../ruoyi/clMaterial/domain/CYlMaterial.java | 8 +++++ .../com/ruoyi/material/domain/CMaterial.java | 8 +++++ .../materialType/domain/CMaterialType.java | 8 +++++ .../mapper/clMaterial/CYlMaterialMapper.xml | 7 ++++- .../mapper/factory/CFactoryMapper.xml | 7 +++-- .../mapper/material/CMaterialMapper.xml | 21 ++++++++++---- .../materialType/CMaterialTypeMapper.xml | 7 ++++- .../src/views/clMaterial/clMaterial/index.vue | 29 ++++++++++++++++++- ruoyi-ui/src/views/factory/factory/index.vue | 1 + .../src/views/material/material/index.vue | 28 ++++++++++++++++++ .../views/materialType/materialType/index.vue | 26 +++++++++++++++++ 11 files changed, 140 insertions(+), 10 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/clMaterial/domain/CYlMaterial.java b/ruoyi-system/src/main/java/com/ruoyi/clMaterial/domain/CYlMaterial.java index 690e56c..bd18dc5 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/clMaterial/domain/CYlMaterial.java +++ b/ruoyi-system/src/main/java/com/ruoyi/clMaterial/domain/CYlMaterial.java @@ -32,6 +32,10 @@ public class CYlMaterial extends BaseEntity @Excel(name = "单价") private BigDecimal materialPrice; + /** 停用状态 */ + @Excel(name = "停用状态") + private String materialState; + public void setMaterialId(Long materialId) { this.materialId = materialId; @@ -69,6 +73,10 @@ public class CYlMaterial extends BaseEntity return materialPrice; } + public String getMaterialState() {return materialState;} + + public void setMaterialState(String materialState) {this.materialState = materialState;} + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/java/com/ruoyi/material/domain/CMaterial.java b/ruoyi-system/src/main/java/com/ruoyi/material/domain/CMaterial.java index 56d2745..2f2ddc7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/material/domain/CMaterial.java +++ b/ruoyi-system/src/main/java/com/ruoyi/material/domain/CMaterial.java @@ -43,6 +43,10 @@ public class CMaterial extends BaseEntity @Excel(name = "物料类型") private String typeName; + /** 物料状态 */ + @Excel(name = "物料状态") + private String materialState; + /** 物料成本信息 */ private List cMaterialCostList; @@ -119,6 +123,10 @@ public class CMaterial extends BaseEntity this.typeName = typeName; } + public String getMaterialState() {return materialState;} + + public void setMaterialState(String materialState) {this.materialState = materialState;} + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/java/com/ruoyi/materialType/domain/CMaterialType.java b/ruoyi-system/src/main/java/com/ruoyi/materialType/domain/CMaterialType.java index 8dcac28..0cefb73 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/materialType/domain/CMaterialType.java +++ b/ruoyi-system/src/main/java/com/ruoyi/materialType/domain/CMaterialType.java @@ -27,6 +27,10 @@ public class CMaterialType extends BaseEntity @Excel(name = "名称") private String typeName; + /** 状态 */ + @Excel(name = "状态") + private String typeState; + public void setTypeId(Long typeId) { this.typeId = typeId; @@ -55,6 +59,10 @@ public class CMaterialType extends BaseEntity return typeName; } + public String getTypeState() {return typeState;} + + public void setTypeState(String typeState) {this.typeState = typeState;} + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/resources/mapper/clMaterial/CYlMaterialMapper.xml b/ruoyi-system/src/main/resources/mapper/clMaterial/CYlMaterialMapper.xml index 73deced..c806a71 100644 --- a/ruoyi-system/src/main/resources/mapper/clMaterial/CYlMaterialMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/clMaterial/CYlMaterialMapper.xml @@ -9,10 +9,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select material_id, material_no, material_name, material_price from c_yl_material + select material_id, material_no, material_name, material_price, material_state from c_yl_material @@ -34,11 +36,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_no, material_name, material_price, + material_state, #{materialNo}, #{materialName}, #{materialPrice}, + #{materialState}, @@ -48,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_no = #{materialNo}, material_name = #{materialName}, material_price = #{materialPrice}, + material_state = #{materialState}, where material_id = #{materialId} diff --git a/ruoyi-system/src/main/resources/mapper/factory/CFactoryMapper.xml b/ruoyi-system/src/main/resources/mapper/factory/CFactoryMapper.xml index 46e0ab9..fa3a490 100644 --- a/ruoyi-system/src/main/resources/mapper/factory/CFactoryMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/factory/CFactoryMapper.xml @@ -46,10 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml b/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml index 25364c1..b5843d5 100644 --- a/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/material/CMaterialMapper.xml @@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -30,7 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select a.material_id,a.material_type_id, a.material_xingh, a.material_guig, a.material_diany, a.material_dw,b.type_name + select a.material_id,a.material_type_id, a.material_xingh, a.material_guig, a.material_diany, a.material_dw, + case when b.type_state != '0' then b.type_name+'(停用)' else b.type_name end type_name, + a.material_state from c_material a left join c_material_type b on a.material_type_id = b.type_no @@ -45,12 +48,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -19,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and type_no = #{typeNo} and type_name like concat('%', #{typeName}, '%') + and type_state = #{typeState} order by type_no asc @@ -33,10 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type_no, type_name, + type_state, #{typeNo}, #{typeName}, + #{typeState}, @@ -45,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type_no = #{typeNo}, type_name = #{typeName}, + type_state = #{typeState}, where type_id = #{typeId} diff --git a/ruoyi-ui/src/views/clMaterial/clMaterial/index.vue b/ruoyi-ui/src/views/clMaterial/clMaterial/index.vue index 56b326f..7231caf 100644 --- a/ruoyi-ui/src/views/clMaterial/clMaterial/index.vue +++ b/ruoyi-ui/src/views/clMaterial/clMaterial/index.vue @@ -17,6 +17,16 @@ @keyup.enter.native="handleQuery" /> + + + + + 搜索 重置 @@ -76,6 +86,11 @@ + + +