Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9bdefeaab4
|
|
@ -498,4 +498,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from ma_type
|
||||
where parent_id = #{typeId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectTypeList4Keeper" parameterType="com.bonus.material.ma.domain.Type" resultMap="TypeResult">
|
||||
select
|
||||
mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price,
|
||||
mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num,
|
||||
mt4.create_by, mt4.create_time, mt4.update_by, mt4.update_time, mt4.is_plan,mt4.is_ancuo, mt4.remark, mt4.fac_model, mt4.intelligent_code, whs.house_id, mtk.user_id
|
||||
from ma_type mt4
|
||||
left join ma_type mt3 on mt3.type_id=mt4.parent_id
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
left join ma_type_keeper mtk on mt4.type_id=mtk.type_id
|
||||
where mt4.del_flag = 0 and mt4.level = 4
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt3.type_id, mt3.type_name, mt3.parent_id, mt3.storage_num, mt3.type_code, mt3.model_code, mt3.unit_id, mt3.unit_name, mt3.manage_type, mt3.lease_price,
|
||||
mt3.eff_time, mt3.rent_price, mt3.buy_price, mt3.pay_ratio, mt3.pay_price, mt3.tax_ratio, mt3.level, mt3.rated_load, mt3.test_load, mt3.holding_time, mt3.warn_num,
|
||||
mt3.create_by, mt3.create_time, mt3.update_by, mt3.update_time, mt3.is_plan,mt3.is_ancuo, mt3.remark, mt3.fac_model, mt3.intelligent_code, whs.house_id, null as user_id
|
||||
from ma_type mt3
|
||||
left join ma_type mt2 on mt2.type_id=mt3.parent_id
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
where mt3.del_flag = 0 and mt3.level = 3
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt2.type_id, mt2.type_name, mt2.parent_id, mt2.storage_num, mt2.type_code, mt2.model_code, mt2.unit_id, mt2.unit_name, mt2.manage_type, mt2.lease_price,
|
||||
mt2.eff_time, mt2.rent_price, mt2.buy_price, mt2.pay_ratio, mt2.pay_price, mt2.tax_ratio, mt2.level, mt2.rated_load, mt2.test_load, mt2.holding_time, mt2.warn_num,
|
||||
mt2.create_by, mt2.create_time, mt2.update_by, mt2.update_time, mt2.is_plan,mt2.is_ancuo, mt2.remark, mt2.fac_model, mt2.intelligent_code, whs.house_id, null as user_id
|
||||
from ma_type mt2
|
||||
left join ma_type mt1 on mt1.type_id=mt2.parent_id
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
where mt2.del_flag = 0 and mt2.level = 2
|
||||
|
||||
UNION
|
||||
|
||||
select
|
||||
mt1.type_id, mt1.type_name, mt1.parent_id, mt1.storage_num, mt1.type_code, mt1.model_code, mt1.unit_id, mt1.unit_name, mt1.manage_type, mt1.lease_price,
|
||||
mt1.eff_time, mt1.rent_price, mt1.buy_price, mt1.pay_ratio, mt1.pay_price, mt1.tax_ratio, mt1.level, mt1.rated_load, mt1.test_load, mt1.holding_time, mt1.warn_num,
|
||||
mt1.create_by, mt1.create_time, mt1.update_by, mt1.update_time, mt1.is_plan,mt1.is_ancuo, mt1.remark, mt1.fac_model, mt1.intelligent_code, whs.house_id, null as user_id
|
||||
from ma_type mt1
|
||||
left join wh_house_set whs on mt1.type_id=whs.type_id
|
||||
where mt1.del_flag = 0 and mt1.level = 1
|
||||
|
||||
order by type_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -223,9 +223,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<insert id="insertPurchaseCheckDetailsList">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
insert into purchase_check_details(task_id,type_id,purchase_price,purchase_tax_price,purchase_num,check_num,bind_num,check_result,supplier_id,status,production_time,create_by,create_time,update_by,update_time,remark,check_url_name,check_url,input_num,input_status,input_time,file_name,file_url,company_id)
|
||||
values(#{item.taskId},#{item.typeId},#{item.purchasePrice},#{item.purchaseTaxPrice},#{item.purchaseNum},#{item.checkNum},#{item.bindNum},#{item.checkResult},#{item.supplierId},#{item.status},#{item.productionTime},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.checkUrlName},#{item.checkUrl},#{item.inputNum},#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId})
|
||||
insert into purchase_check_details(task_id,type_id,purchase_price,purchase_tax_price,
|
||||
purchase_num,check_num,bind_num,check_result,supplier_id,
|
||||
status,production_time,create_by,create_time,update_by,
|
||||
update_time,remark,check_url_name,check_url,input_num,
|
||||
input_status,input_time,file_name,file_url,company_id)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.taskId},#{item.typeId},#{item.purchasePrice},#{item.purchaseTaxPrice},
|
||||
#{item.purchaseNum},#{item.checkNum},#{item.bindNum},#{item.checkResult},#{item.supplierId},
|
||||
#{item.status},#{item.productionTime},#{item.createBy},#{item.createTime},#{item.updateBy},
|
||||
#{item.updateTime},#{item.remark},#{item.checkUrlName},#{item.checkUrl},#{item.inputNum},
|
||||
#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue