|
@@ -319,7 +319,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
|
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
|
- select di.*,m.name MName,m.model MModel,m.unit MaterialUnit,m.color MColor,m.unit_id,m.standard MStandard,m.weight, m.img_name,
|
|
|
|
|
|
+ select di.*,m.name MName,m.model MModel,m.color MColor,m.unit_id,m.standard MStandard,m.weight, m.img_name,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
|
m.brand, dp1.name DepotName,dp2.name AnotherDepotName, me.purchase_decimal,
|
|
m.brand, dp1.name DepotName,dp2.name AnotherDepotName, me.purchase_decimal,
|
|
me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName
|
|
me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName
|
|
@@ -335,7 +335,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getBillDetailListByIds" resultType="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
|
<select id="getBillDetailListByIds" resultType="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
|
|
- select di.*,m.name MName,m.model MModel,m.unit MaterialUnit,m.color MColor,m.unit_id,m.standard MStandard,m.weight, m.img_name,
|
|
|
|
|
|
+ select di.*,m.name MName,m.model MModel,m.color MColor,m.unit_id,m.standard MStandard,m.weight, m.img_name,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
|
m.brand, dp1.name DepotName,dp2.name AnotherDepotName, me.purchase_decimal,
|
|
m.brand, dp1.name DepotName,dp2.name AnotherDepotName, me.purchase_decimal,
|
|
me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName
|
|
me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.position,s.supplier supplierName
|
|
@@ -354,7 +354,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getInOutStock" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
|
|
<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, m.brand,
|
|
|
|
|
|
+ select m.id MId, me.bar_code, m.name MName, m.model MModel, m.standard MStandard, m.brand,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
|
|
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,
|
|
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
|
|
ifnull(me.purchase_decimal,0) purchase_decimal, ifnull(mcs.current_unit_price,0) currentUnitPrice
|
|
@@ -367,8 +367,8 @@
|
|
where 1=1 and me.default_flag=1
|
|
where 1=1 and me.default_flag=1
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="categoryIdList.size()>0">
|
|
<if test="categoryIdList.size()>0">
|
|
@@ -381,7 +381,7 @@
|
|
and dh.oper_time <= #{endTime}
|
|
and dh.oper_time <= #{endTime}
|
|
</if>
|
|
</if>
|
|
and ifnull(m.delete_flag,'0') !='1'
|
|
and ifnull(m.delete_flag,'0') !='1'
|
|
- group by m.id, me.bar_code, m.name, m.mfrs, m.model, m.standard, m.brand,
|
|
|
|
|
|
+ group by m.id, me.bar_code, m.name, m.model, m.standard, m.brand,
|
|
m.other_field1,m.other_field2,m.other_field3,m.unit, u.basic_unit, m.color, m.unit_id, u.name,
|
|
m.other_field1,m.other_field2,m.other_field3,m.unit, u.basic_unit, m.color, m.unit_id, u.name,
|
|
me.purchase_decimal, mcs.current_unit_price
|
|
me.purchase_decimal, mcs.current_unit_price
|
|
order by m.id desc
|
|
order by m.id desc
|
|
@@ -399,8 +399,8 @@
|
|
where 1=1 and me.default_flag=1
|
|
where 1=1 and me.default_flag=1
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="categoryIdList.size()>0">
|
|
<if test="categoryIdList.size()>0">
|
|
@@ -417,7 +417,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getListWithBuyOrSale" 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,
|
|
|
|
|
|
+ select m.id MId, me.bar_code, m.name MName, m.model MModel, m.standard MStandard,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
|
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
|
|
concat_ws('', m.unit, u.basic_unit) MaterialUnit, m.color MColor, m.brand, 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
|
|
from jsh_material m
|
|
@@ -434,8 +434,8 @@
|
|
</if>
|
|
</if>
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="billType =='buy'">
|
|
<if test="billType =='buy'">
|
|
@@ -480,7 +480,7 @@
|
|
and (dh.status = '1' or dh.status = '2' or dh.status = '3')
|
|
and (dh.status = '1' or dh.status = '2' or dh.status = '3')
|
|
</if>
|
|
</if>
|
|
and ifnull(m.delete_flag,'0') !='1'
|
|
and ifnull(m.delete_flag,'0') !='1'
|
|
- group by m.id, me.bar_code, m.name, m.mfrs, m.model, m.standard,
|
|
|
|
|
|
+ group by m.id, me.bar_code, m.name, m.model, m.standard,
|
|
m.other_field1,m.other_field2,m.other_field3, m.unit, u.basic_unit, m.color, m.brand, u.name
|
|
m.other_field1,m.other_field2,m.other_field3, m.unit, u.basic_unit, m.color, m.brand, u.name
|
|
order by m.id desc
|
|
order by m.id desc
|
|
<if test="offset != null and rows != null">
|
|
<if test="offset != null and rows != null">
|
|
@@ -503,8 +503,8 @@
|
|
</if>
|
|
</if>
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="billType =='buy'">
|
|
<if test="billType =='buy'">
|
|
@@ -893,7 +893,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount">
|
|
<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, m.brand,
|
|
|
|
|
|
+ select m.id MId, m.name MName, me.bar_code, 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.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,
|
|
m.unit MaterialUnit, u.basic_unit unit_name,mcs.current_number,
|
|
mis.low_safe_stock, mis.high_safe_stock
|
|
mis.low_safe_stock, mis.high_safe_stock
|
|
@@ -911,8 +911,8 @@
|
|
or (ifnull(mis.high_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
|
|
or (ifnull(mis.high_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="depotList.size()>0">
|
|
<if test="depotList.size()>0">
|
|
@@ -950,8 +950,8 @@
|
|
or (ifnull(mis.high_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
|
|
or (ifnull(mis.high_safe_stock,0)!=0 and mcs.current_number > ifnull(mis.high_safe_stock,0)))
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<if test="materialParam != null and materialParam !=''">
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
|
- and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
- or m.color like #{bindKey} or m.mfrs like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
|
|
|
|
+ and (me.bar_code like #{bindKey} or me.batch_number like #{bindKey} or m.name like #{bindKey} or m.mnemonic like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey}
|
|
|
|
+ or m.color like #{bindKey} or m.brand like #{bindKey} or m.other_field1 like #{bindKey}
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
or m.other_field2 like #{bindKey} or m.other_field3 like #{bindKey})
|
|
</if>
|
|
</if>
|
|
<if test="depotList.size()>0">
|
|
<if test="depotList.size()>0">
|