完善报表接口返回字段,增加品牌和制造商

This commit is contained in:
jishenghua
2024-10-09 00:48:34 +08:00
parent da693deebd
commit 8795c9358c
9 changed files with 114 additions and 26 deletions

View File

@@ -18,6 +18,9 @@
<result column="mname" jdbcType="VARCHAR" property="mname" />
<result column="model" jdbcType="VARCHAR" property="model" />
<result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="color" jdbcType="VARCHAR" property="color" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="unitPrice" jdbcType="DECIMAL" property="unitPrice" />
<result column="sku" jdbcType="VARCHAR" property="sku" />
<result column="operNumber" jdbcType="DECIMAL" property="operNumber" />
@@ -37,6 +40,9 @@
<result column="mName" jdbcType="VARCHAR" property="mName" />
<result column="model" jdbcType="VARCHAR" property="model" />
<result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="color" jdbcType="VARCHAR" property="color" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" />
<result column="numSum" jdbcType="DECIMAL" property="numSum" />
@@ -293,7 +299,7 @@
</select>
<select id="findInOutDetail" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.number,me.bar_code barCode, m.name mname,m.model,m.standard,di.unit_price unitPrice,di.material_unit as mUnit, di.sku,
select dh.number,me.bar_code barCode, m.name mname,m.model,m.standard,m.color,m.brand,m.mfrs,di.unit_price unitPrice,di.material_unit as mUnit, di.sku,
di.oper_number operNumber,di.all_price allPrice, ifnull(di.tax_rate,0) taxRate, ifnull(di.tax_money,0) taxMoney, ifnull(di.tax_last_money,0) taxLastMoney,
s.supplier sname,d.dname dname, date_format(dh.oper_time, '%Y-%m-%d') operTime, concat(dh.sub_type,dh.type) as newType,
concat_ws(' ',dh.remark,di.remark) as newRemark
@@ -489,7 +495,8 @@
</select>
<select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select di.material_id materialId, me.bar_code barCode, m.name mName,m.model,m.standard,mc.name categoryName,concat_ws('', m.unit, u.basic_unit) materialUnit,
select di.material_id materialId, me.bar_code barCode, m.name mName,m.model,m.standard,m.color,m.brand,m.mfrs,
mc.name categoryName,concat_ws('', m.unit, u.basic_unit) materialUnit,
sum(di.basic_number) numSum,
sum(di.all_price) priceSum
from jsh_depot_head dh
@@ -687,7 +694,7 @@
</select>
<select id="findAllocationDetail" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.number,me.bar_code barCode, m.name mname,m.model,m.standard,di.unit_price unitPrice,di.material_unit as mUnit,
select dh.number,me.bar_code barCode, m.name mname,m.model,m.standard,m.color,m.brand,m.mfrs,di.unit_price unitPrice,di.material_unit as mUnit,
di.oper_number operNumber,di.all_price allPrice,sname, d.dName dname,date_format(dh.oper_time, '%Y-%m-%d') operTime,
concat(dh.sub_type,dh.type) as newType, concat_ws(' ',dh.remark,di.remark) as newRemark
from jsh_depot_head dh

View File

@@ -57,6 +57,7 @@
<result column="unit_id" jdbcType="BIGINT" property="unitId" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="purchase_decimal" jdbcType="DECIMAL" property="purchaseDecimal" />
<result column="currentUnitPrice" jdbcType="DECIMAL" property="currentUnitPrice" />
</resultMap>
@@ -68,6 +69,8 @@
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="brand" jdbcType="VARCHAR" property="brand" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="MOtherField1" jdbcType="VARCHAR" property="MOtherField1" />
<result column="MOtherField2" jdbcType="VARCHAR" property="MOtherField2" />
@@ -346,7 +349,7 @@
</select>
<select id="getInOutStock" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, me.bar_code, m.name MName, m.mfrs MMfrs, m.model MModel, m.standard MStandard,
select m.id MId, me.bar_code, m.name MName, m.mfrs MMfrs, m.model MModel, m.standard MStandard, m.brand,
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
concat_ws('', m.unit, u.basic_unit) MaterialUnit, m.color MColor, m.unit_id, u.name unit_name,
ifnull(me.purchase_decimal,0) purchase_decimal, ifnull(mcs.current_unit_price,0) currentUnitPrice
@@ -406,10 +409,10 @@
group by m.id) cc
</select>
<select id="getListWithBugOrSale" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
<select id="getListWithBuyOrSale" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, me.bar_code, m.name MName, m.mfrs MMfrs, m.model MModel, m.standard MStandard,
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
concat_ws('', m.unit, u.basic_unit) MaterialUnit, m.color MColor, u.name unit_name
concat_ws('', m.unit, u.basic_unit) MaterialUnit, m.color MColor, m.brand, u.name unit_name
from jsh_material m
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
@@ -471,7 +474,7 @@
</if>
</select>
<select id="getListWithBugOrSaleCount" resultType="java.lang.Integer">
<select id="getListWithBuyOrSaleCount" resultType="java.lang.Integer">
select count(1) from (select m.id
from jsh_material m
left join jsh_depot_item di on di.material_id=m.id and ifnull(m.delete_Flag,'0') !='1'
@@ -864,7 +867,7 @@
</select>
<select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount">
select m.id MId, m.name MName, me.bar_code, m.mfrs MMfrs, m.model MModel, m.standard MStandard,m.color MColor,
select m.id MId, m.name MName, me.bar_code, m.mfrs MMfrs, m.model MModel, m.standard MStandard,m.color MColor, m.brand,
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,d.name depotName,
m.unit MaterialUnit, u.basic_unit unit_name,mcs.current_number,
mis.low_safe_stock, mis.high_safe_stock