给报表里面增加规格展示

This commit is contained in:
季圣华
2020-12-26 00:20:00 +08:00
parent 56bc53c235
commit 3f2a592efa
30 changed files with 89 additions and 101 deletions

View File

@@ -12,6 +12,7 @@
<result column="Number" jdbcType="VARCHAR" property="Number" />
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="unit_price" jdbcType="DECIMAL" property="UnitPrice" />
<result column="oper_number" jdbcType="DECIMAL" property="OperNumber" />
<result column="all_price" jdbcType="DECIMAL" property="AllPrice" />
@@ -25,6 +26,7 @@
<result column="MaterialId" jdbcType="BIGINT" property="MaterialId" />
<result column="mName" jdbcType="VARCHAR" property="mName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="numSum" jdbcType="DECIMAL" property="numSum" />
<result column="priceSum" jdbcType="DECIMAL" property="priceSum" />
@@ -136,7 +138,7 @@
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.number,m.`name` MName,m.model,di.unit_price,di.oper_number,di.all_price,s.supplier SName,d.dName DName,
select dh.number,m.`name` MName,m.model,m.standard,di.unit_price,di.oper_number,di.all_price,s.supplier SName,d.dName DName,
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType
from jsh_depot_head dh
inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
@@ -188,8 +190,7 @@
</select>
<select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select di.material_id, m.mName,m.Model,m.categoryName,
select di.material_id, m.mName,m.Model,m.standard,m.categoryName,
(select sum(jdi.basic_number) numSum from jsh_depot_head jdh
INNER JOIN jsh_depot_item jdi on jdh.id=jdi.header_id and ifnull(jdi.delete_flag,'0') !='1'
where jdi.material_id=di.material_id
@@ -223,7 +224,7 @@
) priceSum
from jsh_depot_head dh
INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model, standard, jsh_material_category.`Name` categoryName
from jsh_material
LEFT JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1'
@@ -239,7 +240,7 @@
and di.depot_id in (${dids})
</if>
and ifnull(dh.delete_flag,'0') !='1'
GROUP BY di.material_id,m.mName,m.Model,m.categoryName
GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -247,9 +248,9 @@
<select id="findInOutMaterialCountTotal" resultType="java.lang.Integer">
select count(1) from
(select di.material_id, m.mName,m.Model,m.categoryName from jsh_depot_head dh
(select di.material_id, m.mName,m.Model,m.standard,m.categoryName from jsh_depot_head dh
INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,standard,jsh_material_category.`Name` categoryName
from jsh_material
LEFT JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1'
@@ -264,7 +265,7 @@
and di.depot_id in (${dids})
</if>
and ifnull(dh.delete_flag,'0') !='1'
GROUP BY di.material_id,m.mName,m.Model,m.categoryName) a
GROUP BY di.material_id,m.mName,m.Model,m.standard,m.categoryName) a
</select>
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">

View File

@@ -39,6 +39,7 @@
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
@@ -48,6 +49,7 @@
<resultMap id="ResultStockWarningCount" type="com.jsh.erp.datasource.vo.DepotItemStockWarningCount">
<result column="MaterialName" jdbcType="VARCHAR" property="MaterialName" />
<result column="MaterialModel" jdbcType="VARCHAR" property="MaterialModel" />
<result column="MaterialStandard" jdbcType="VARCHAR" property="MaterialStandard" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="MaterialOther" jdbcType="VARCHAR" property="MaterialOther" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
@@ -155,7 +157,7 @@
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, m.name MName, m.mfrs MMfrs, m.model MModel,
select m.id MId, m.name MName, m.mfrs MMfrs, m.model MModel, m.standard MStandard,
m.unit MaterialUnit, m.color MColor, u.name unit_name,
(select purchase_decimal from jsh_material_extend me
where me.material_id=m.id and me.default_flag=1 and ifnull(me.delete_Flag,'0') !='1' limit 0,1)
@@ -366,6 +368,7 @@
SELECT
m.name MaterialName,
m.model MaterialModel,
m.standard MaterialStandard,
mc.`Name` categoryName,
CONCAT(
'(',