优化商品导出功能

This commit is contained in:
季圣华
2020-06-06 00:35:46 +08:00
parent 761721ec91
commit 0dde92a035
2 changed files with 11 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
<result column="unitName" jdbcType="VARCHAR" property="unitName" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="bar_code" jdbcType="VARCHAR" property="mBarCode" />
<result column="commodity_unit" jdbcType="VARCHAR" property="commodityUnit" />
<result column="purchase_decimal" jdbcType="VARCHAR" property="purchaseDecimal" />
<result column="commodity_decimal" jdbcType="VARCHAR" property="commodityDecimal" />
<result column="wholesale_decimal" jdbcType="VARCHAR" property="wholesaleDecimal" />
@@ -124,11 +125,14 @@
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
select m.*,u.uname unitName, mc.name categoryName
select m.*,u.uname unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if test="name != null">
and m.name like '%${name}%'
</if>