优化商品信息的字段

This commit is contained in:
季圣华
2020-05-04 10:28:40 +08:00
parent 3f83d340c1
commit d074471de2
12 changed files with 483 additions and 2011 deletions

View File

@@ -38,8 +38,7 @@
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="UName" jdbcType="VARCHAR" property="UName" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="PresetPriceOne" jdbcType="DECIMAL" property="presetPriceOne" />
<result column="PriceStrategy" jdbcType="VARCHAR" property="priceStrategy" />
<result column="purchase_decimal" jdbcType="DECIMAL" property="purchaseDecimal" />
</resultMap>
<resultMap id="ResultStockWarningCount" type="com.jsh.erp.datasource.vo.DepotItemStockWarningCount">
@@ -149,11 +148,13 @@
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor,
m.PresetPriceOne, m.PriceStrategy, u.UName UName
me.purchase_decimal, u.UName UName
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_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'
where 1=1
and me.default_flag=1
<if test="headIds != null">
and di.HeaderId in (${headIds})
</if>
@@ -161,7 +162,7 @@
and di.MaterialId in (${materialIds})
</if>
and ifnull(di.delete_Flag,'0') !='1'
group by m.id,m.Name, m.Model, m.Unit, m.Color, m.PresetPriceOne, m.PriceStrategy, u.UName
group by m.id,m.Name, m.Model, m.Unit, m.Color, me.purchase_decimal, u.UName
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>