'20240306'

This commit is contained in:
xd 2024-03-06 11:12:13 +08:00
parent 4552e9f081
commit f5e76bb60e
6 changed files with 63 additions and 63 deletions

View File

@ -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);
/** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */

View File

@ -15,5 +15,7 @@ import java.util.List;
* @Version 1.0
*/
public interface QuoteMapper {
List<MaterialDto> queryMaterialListByParam(String precMaterialName,String vagueMaterialName,String vagueModel);
List<MaterialDto> selectMaterialListByParam(@Param("precMaterialName") String precMaterialName,
@Param("vagueMaterialName")String vagueMaterialName,
@Param("vagueModel") String vagueModel);
}

View File

@ -32,6 +32,6 @@ public class QuoteServiceImpl implements QuoteService {
* @return: java.util.List<com.ruoyi.quote.domain.MaterialDto>
*/
public List<MaterialDto> queryMaterialListByParam(String precMaterialName, String vagueMaterialName, String vagueModel) {
return quoteMapper.queryMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel);
return quoteMapper.selectMaterialListByParam(precMaterialName, vagueMaterialName, vagueModel);
}
}

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.quote.mapper.QuoteMapper">
<resultMap type="MaterialDto" id="MaterialResult">
<result property="uid" column="uid" />
<result property="model" column="model" />
<result property="specification" column="specification" />
<result property="voltLevel" column="voltLevel" />
<result property="measureUnit" column="measureUnit" />
<result property="prodCategory" column="prodCategory" />
<result property="matCostPrice" column="matCostPrice" />
<result property="manuCost" column="manuCost" />
<result property="wdFSurcharge" column="wdFSurcharge" />
<result property="redBookPrice" column="redBookPrice" />
<result property="rbFacPrice" column="rbFacPrice" />
<result property="redBookCost" column="redBookCost" />
</resultMap>
<select id="selectMaterialListByParam" resultType="com.ruoyi.quote.domain.MaterialDto">
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,
b.price matCostPrice, d.factory_total_ratio/100 manuCost,d.factory_pj_ratio/100 wdFSurcharge
from c_material a
left join
(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
left join c_yl_material b on a.cost_cl_id=b.material_no
group by a.cost_material_id
)b on a.material_id=b.cost_material_id
left join c_material_type_factory c on a.material_type_id = c.type_no
left join c_factory d on d.factory_no = c.factory_id
<where>
<if test="precMaterialName != null and precMaterialName != ''"> and a.material_xingh like concat('', #{precMaterialName}, '%')</if>
<if test="vagueMaterialName != null and vagueMaterialName != ''"> and a.material_xingh like concat('%', #{vagueMaterialName}, '%')</if>
<if test="vagueModel != null and vagueModel != ''"> and a.material_guig like concat('%', #{vagueModel}, '%')</if>
</where>
</select>
</mapper>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.quote.mapper.QuoteMapper">
<resultMap type="MaterialDto" id="MaterialResult">
<result property="uid" column="uid" />
<result property="model" column="model" />
<result property="specification" column="specification" />
<result property="voltLevel" column="voltLevel" />
<result property="measureUnit" column="measureUnit" />
<result property="prodCategory" column="prodCategory" />
<result property="matCostPrice" column="matCostPrice" />
<result property="manuCost" column="manuCost" />
<result property="wdFSurcharge" column="wdFSurcharge" />
<result property="redBookPrice" column="redBookPrice" />
<result property="rbFacPrice" column="rbFacPrice" />
<result property="redBookCost" column="redBookCost" />
</resultMap>
<select id="queryMaterialListByParam" resultType="com.ruoyi.quote.domain.MaterialDto">
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, b.price matCostPrice, d.factory_total_ratio/100 manuCost,d.factory_pj_ratio/100 wdFSurcharge,
cc.红本价格 AS redBookPrice,cc.红本价格*0.8 rbFacPrice,dd.成本价格 AS redBookCost
from c_material a
left join
(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
left join c_yl_material b on a.cost_cl_id=b.material_no
group by a.cost_material_id
)b on a.material_id=b.cost_material_id
left join c_material_type_factory c on a.material_type_id = c.type_no
left join c_factory d on d.factory_no = c.factory_id
left join(select 型号,规格,电压等级,红本价格 from [REDBOOK].[RedBook].[dbo].rb_product_price
where version_uid_0 = (select max(version_uid_0) from [REDBOOK].[RedBook].[dbo].rb_product_price a
left join [REDBOOK].[RedBook].[dbo].rb_productVersion b on b.uid_0 = a.version_uid_0
where b.tong_price_0 ='70') and 型号 like '%KYJV%'
)as cc on cc.型号=a.material_xingh collate Chinese_PRC_CI_AS and cc.规格 = a.material_guig collate Chinese_PRC_CI_AS
and cc.电压等级 = a.material_diany collate Chinese_PRC_CI_AS
left join(select 型号,规格,电压等级,成本价格 from [REDBOOK].[RedBook].[dbo].rb_productbase_price
where version_uid_0 = (select max(version_uid_0) from [REDBOOK].[RedBook].[dbo].rb_product_price a
left join [REDBOOK].[RedBook].[dbo].rb_productVersion b on b.uid_0 = a.version_uid_0
where b.tong_price_0 ='70') and 型号 like '%KYJV%'
)as dd on dd.型号=a.material_xingh collate Chinese_PRC_CI_AS and dd.规格 = a.material_guig collate Chinese_PRC_CI_AS
and dd.电压等级= a.material_diany collate Chinese_PRC_CI_AS
where a.material_xingh like '%KYJV%'
</select>
</mapper>

View File

@ -437,7 +437,7 @@
</el-form>
</div>
<div style="display: flex; flex-direction: row;">
<div style="width: 688px">
<div style="width: 758px">
<el-table
:data="materialDialogData"
@selection-change="handleSelectionChange"
@ -483,6 +483,13 @@
label="单位">
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="searchMaterial"
/>
</div>
<div style="flex-grow: 1; padding-left: 20px;">
<div
@ -495,13 +502,7 @@
</div>
</div>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="searchMaterial"
/>
<div style="text-align: center; padding-top: 20px">
<el-button-group>
<el-button type="primary" size="small" style="margin-right: 80px" >确认</el-button>