From 8e7f6f72f7f44a33021b8c198be8f252d2641020 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 5 Mar 2024 14:08:13 +0800 Subject: [PATCH 1/9] '20240305' --- .../main/java/com/ruoyi/web/Utils/SHA1.java | 33 +++++++++++++++++++ .../controller/system/SsoLoginController.java | 18 ++++++++-- .../controller/system/SysUserController.java | 3 -- .../src/main/resources/application.yml | 4 +++ 4 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/Utils/SHA1.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/Utils/SHA1.java b/ruoyi-admin/src/main/java/com/ruoyi/web/Utils/SHA1.java new file mode 100644 index 0000000..b62a3a9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/Utils/SHA1.java @@ -0,0 +1,33 @@ +package com.ruoyi.web.Utils; + +import java.security.MessageDigest; + +public class SHA1 { + /** + * @Comment SHA1实现 + * @Author Ron + * @Date 2017年9月13日 下午3:30:36 + * @return + */ + public static String shaEncode(String inStr){ + MessageDigest sha = null; + try { + sha = MessageDigest.getInstance("SHA"); + byte[] byteArray = inStr.getBytes("UTF-8"); + byte[] md5Bytes = sha.digest(byteArray); + StringBuffer hexValue = new StringBuffer(); + for (int i = 0; i < md5Bytes.length; i++) { + int val = ((int) md5Bytes[i]) & 0xff; + if (val < 16) { + hexValue.append("0"); + } + hexValue.append(Integer.toHexString(val)); + } + return hexValue.toString(); + } catch (Exception e) { + System.out.println(e.toString()); + e.printStackTrace(); + return ""; + } + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SsoLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SsoLoginController.java index 4642acf..2293503 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SsoLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SsoLoginController.java @@ -14,12 +14,16 @@ import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.model.NoPswLoginBody; import com.ruoyi.framework.web.service.SsoLoginService; +import com.ruoyi.web.Utils.SHA1; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; +import java.security.MessageDigest; + /** * 第三方登录验证 * @@ -27,6 +31,10 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController public class SsoLoginController { + + @Value("${OA.KEY}") + private String key; + /** * @Description: 平台带着token来系统里面登陆 * 这边需要做两个步骤: @@ -43,14 +51,18 @@ public class SsoLoginController { @PostMapping("/noPwdLogin") @ApiOperation(value = "无密码登录") public AjaxResult noPwdLogin(@RequestBody NoPswLoginBody noPswLoginBody) { + // 生成令牌(免密登录) + AjaxResult ajax = AjaxResult.success(); + String loginid = noPswLoginBody.getLoginid(); String token = noPswLoginBody.getToken(); //OA验证 - //.... + String newToken = SHA1.shaEncode(key+loginid); + if(!token.equals(newToken)){ + return ajax.error("访问异常!"); + } - // 生成令牌(免密登录) - AjaxResult ajax = AjaxResult.success(); // 生成令牌 String systoken = loginService.noPwdLogin(loginid); ajax.put(Constants.TOKEN, systoken); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 89990ec..2858f30 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -13,10 +13,7 @@ import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.system.domain.cost; import com.ruoyi.system.domain.material; -import com.ruoyi.system.domain.temp; import com.ruoyi.system.service.*; -import com.ruoyi.web.Utils.batchInsert; -import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 6deac76..bf479a4 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -198,3 +198,7 @@ minio: accessKey: minioadmin secretKey: minioadmin bucketName: test + +# OA单点登录key +OA: + KEY: uy4MbH From bccde8e7f6b66b615cdcd6aaa483aa100f86ad45 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 5 Mar 2024 16:30:56 +0800 Subject: [PATCH 2/9] '20240305' --- ruoyi-ui/src/views/factory/factory/index.vue | 46 +++++++++++-------- .../src/views/material/material/index.vue | 10 ++-- .../views/materialType/materialType/index.vue | 1 + 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ruoyi-ui/src/views/factory/factory/index.vue b/ruoyi-ui/src/views/factory/factory/index.vue index 39dc70b..950b89e 100644 --- a/ruoyi-ui/src/views/factory/factory/index.vue +++ b/ruoyi-ui/src/views/factory/factory/index.vue @@ -69,19 +69,20 @@ - + + - - - - - - - - + + + + + + + + @@ -419,4 +746,15 @@ export default { backdrop-filter: blur(10px); /* 调整模糊度 */ -webkit-backdrop-filter: blur(10px); /* 兼容性处理,适用于一些WebKit浏览器 */ } + +.changed-field { + background-color: #ffe6e6; /* 更改后的背景颜色 */ +} + +.materialDialogTable .el-dialog__header{ + padding: 20px 20px 0px !important; +} +.materialDialogTable .el-dialog__body{ + padding: 0px 20px !important; +} From 4552e9f081008fd8af2aea897091756111642355 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 6 Mar 2024 09:25:57 +0800 Subject: [PATCH 5/9] '123' --- .../com/ruoyi/quote/domain/MaterialDto.java | 106 +++++++++++++++++- .../com/ruoyi/quote/mapper/QuoteMapper.java | 32 +----- .../quote/service/impl/QuoteServiceImpl.java | 1 + .../src/main/resources/mapper/quote/quote.xml | 50 +++++++++ 4 files changed, 156 insertions(+), 33 deletions(-) create mode 100644 ruoyi-system/src/main/resources/mapper/quote/quote.xml diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java index 338da2d..bf00adc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java @@ -31,5 +31,107 @@ public class MaterialDto extends BaseEntity { private String wdFSurcharge; //盘具点数 - private Integer number = 1; //数量默认1 -} \ No newline at end of file + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getProdCategory() { + return prodCategory; + } + + public void setProdCategory(String prodCategory) { + this.prodCategory = prodCategory; + } + + public String getProdWorkshop() { + return prodWorkshop; + } + + public void setProdWorkshop(String prodWorkshop) { + this.prodWorkshop = prodWorkshop; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getSpecification() { + return specification; + } + + public void setSpecification(String specification) { + this.specification = specification; + } + + public String getVoltLevel() { + return voltLevel; + } + + public void setVoltLevel(String voltLevel) { + this.voltLevel = voltLevel; + } + + public String getMeasureUnit() { + return measureUnit; + } + + public void setMeasureUnit(String measureUnit) { + this.measureUnit = measureUnit; + } + + public String getMatCostPrice() { + return matCostPrice; + } + + public void setMatCostPrice(String matCostPrice) { + this.matCostPrice = matCostPrice; + } + + public String getRedBookPrice() { + return redBookPrice; + } + + public void setRedBookPrice(String redBookPrice) { + this.redBookPrice = redBookPrice; + } + + public String getRedBookCost() { + return redBookCost; + } + + public void setRedBookCost(String redBookCost) { + this.redBookCost = redBookCost; + } + + public String getRbFacPrice() { + return rbFacPrice; + } + + public void setRbFacPrice(String rbFacPrice) { + this.rbFacPrice = rbFacPrice; + } + + public String getManuCost() { + return manuCost; + } + + public void setManuCost(String manuCost) { + this.manuCost = manuCost; + } + + public String getWdFSurcharge() { + return wdFSurcharge; + } + + public void setWdFSurcharge(String wdFSurcharge) { + this.wdFSurcharge = wdFSurcharge; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java b/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java index bc736f3..a951bad 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java @@ -14,36 +14,6 @@ import java.util.List; * @Date 2024/3/5 16:07 * @Version 1.0 */ -@Mapper public interface QuoteMapper { - - @Select("select a.material_id AS uid, a.material_xingh AS model,a.material_guig AS specification,a.material_diany AS voltLevel,a.material_dw AS measureUnit,c.type_name AS prodCategory,\n" + - "b.price matCostPrice, d.factory_total_ratio/100 manuCost,d.factory_pj_ratio/100 wdFSurcharge,\n" + - "cc.红本价格 AS redBookPrice,cc.红本价格*0.8 rbFacPrice,dd.成本价格 AS redBookCost\n" + - "from c_material a \n" + - "left join \n" + - "(select a.cost_material_id,sum((isnull(a.cost_cl_qty,0)+isnull(a.cost_cl_qty_2,0))*b.material_price) price from c_material_cost a\n" + - "left join c_yl_material b on a.cost_cl_id=b.material_no\n" + - "group by a.cost_material_id\n" + - ")b on a.material_id=b.cost_material_id\n" + - "left join c_material_type_factory c on a.material_type_id = c.type_no\n" + - "left join c_factory d on d.factory_no = c.factory_id\n" + - "left join(select 型号,规格,电压等级,红本价格 from [REDBOOK].[RedBook].[dbo].rb_product_price \n" + - " where version_uid_0 = (select max(version_uid_0) from [REDBOOK].[RedBook].[dbo].rb_product_price a\n" + - " left join [REDBOOK].[RedBook].[dbo].rb_productVersion b on b.uid_0 = a.version_uid_0\n" + - " where b.tong_price_0 ='70') and 型号 like '$%{vagueMaterialName}%' \n" + - ")as cc on cc.型号=a.material_xingh collate Chinese_PRC_CI_AS and cc.规格 = a.material_guig collate Chinese_PRC_CI_AS \n" + - "and cc.电压等级 = a.material_diany collate Chinese_PRC_CI_AS\n" + - "\n" + - "left join(select 型号,规格,电压等级,成本价格 from [REDBOOK].[RedBook].[dbo].rb_productbase_price \n" + - " where version_uid_0 = (select max(version_uid_0) from [REDBOOK].[RedBook].[dbo].rb_product_price a\n" + - " left join [REDBOOK].[RedBook].[dbo].rb_productVersion b on b.uid_0 = a.version_uid_0\n" + - " where b.tong_price_0 ='70') and 型号 like '$%{vagueMaterialName}%' \n" + - ")as dd on dd.型号=a.material_xingh collate Chinese_PRC_CI_AS and dd.规格 = a.material_guig collate Chinese_PRC_CI_AS \n" + - " and dd.电压等级= a.material_diany collate Chinese_PRC_CI_AS\n" + - "where a.material_xingh like '${precMaterialName}%' AND a.material_xingh like '%${vagueMaterialName}%' AND a.material_guig like '%${vagueModel}%'" - ) - List queryMaterialListByParam(@Param("precMaterialName") String precMaterialName, - @Param("vagueMaterialName")String vagueMaterialName, - @Param("vagueModel") String vagueModel); + List queryMaterialListByParam(String precMaterialName,String vagueMaterialName,String vagueModel); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java index 73b9094..916dd0e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java @@ -17,6 +17,7 @@ import java.util.List; */ @Service public class QuoteServiceImpl implements QuoteService { + @Autowired QuoteMapper quoteMapper; diff --git a/ruoyi-system/src/main/resources/mapper/quote/quote.xml b/ruoyi-system/src/main/resources/mapper/quote/quote.xml new file mode 100644 index 0000000..a595dd5 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/quote/quote.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + From f5e76bb60ed308cf996de0e0728bd713b4cefa34 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 6 Mar 2024 11:12:13 +0800 Subject: [PATCH 6/9] '20240306' --- .../config/properties/DruidProperties.java | 9 ++-- .../com/ruoyi/quote/mapper/QuoteMapper.java | 4 +- .../quote/service/impl/QuoteServiceImpl.java | 2 +- .../resources/mapper/quote/QuoteMapper.xml | 44 ++++++++++++++++ .../src/main/resources/mapper/quote/quote.xml | 50 ------------------- ruoyi-ui/src/views/quotePage/quote/index.vue | 17 ++++--- 6 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 ruoyi-system/src/main/resources/mapper/quote/QuoteMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/quote/quote.xml diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java index 72592a5..03e0974 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java @@ -6,7 +6,7 @@ import com.alibaba.druid.pool.DruidDataSource; /** * druid 配置属性 - * + * * @author ruoyi */ @Configuration @@ -61,13 +61,16 @@ public class DruidProperties /** 配置获取连接等待超时的时间 */ datasource.setMaxWait(maxWait); - /** 配置驱动连接超时时间,检测数据库建立连接的超时时间,单位是毫秒 */ + /** 配置驱动连接超时时间,检测数据库建立连接的超时时间,单位是毫秒 */ datasource.setConnectTimeout(connectTimeout); /** 配置网络超时时间,等待数据库操作完成的网络超时时间,单位是毫秒 */ datasource.setSocketTimeout(socketTimeout); +/* + datasource.setConnectionProperties("connectTimeout="+connectTimeout+";socketTimeout="+socketTimeout); +*/ - /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ + /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java b/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java index a951bad..5261c01 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/mapper/QuoteMapper.java @@ -15,5 +15,7 @@ import java.util.List; * @Version 1.0 */ public interface QuoteMapper { - List queryMaterialListByParam(String precMaterialName,String vagueMaterialName,String vagueModel); + List selectMaterialListByParam(@Param("precMaterialName") String precMaterialName, + @Param("vagueMaterialName")String vagueMaterialName, + @Param("vagueModel") String vagueModel); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java index 916dd0e..25560e3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/service/impl/QuoteServiceImpl.java @@ -32,6 +32,6 @@ public class QuoteServiceImpl implements QuoteService { * @return: java.util.List */ public List queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel) { - return quoteMapper.queryMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel); + return quoteMapper.selectMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel); } } diff --git a/ruoyi-system/src/main/resources/mapper/quote/QuoteMapper.xml b/ruoyi-system/src/main/resources/mapper/quote/QuoteMapper.xml new file mode 100644 index 0000000..e1f3c78 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/quote/QuoteMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-system/src/main/resources/mapper/quote/quote.xml b/ruoyi-system/src/main/resources/mapper/quote/quote.xml deleted file mode 100644 index a595dd5..0000000 --- a/ruoyi-system/src/main/resources/mapper/quote/quote.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/ruoyi-ui/src/views/quotePage/quote/index.vue b/ruoyi-ui/src/views/quotePage/quote/index.vue index ff7b228..64020ca 100644 --- a/ruoyi-ui/src/views/quotePage/quote/index.vue +++ b/ruoyi-ui/src/views/quotePage/quote/index.vue @@ -437,7 +437,7 @@
-
+
+
- +
确认 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 7/9] '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 @@ + + +