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] '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 @@ + + + + + + + + + + + + + + + + + + + + + +