|
|
|
|
@ -72,28 +72,23 @@
|
|
|
|
|
|
|
|
|
|
<select id="selectBudgetMaterialsByProjectId"
|
|
|
|
|
resultType="org.dromara.oa.erp.domain.vo.ErpProjectPurchaseMaterialVo">
|
|
|
|
|
select null as purchase_material_id,
|
|
|
|
|
null as project_purchase_id,
|
|
|
|
|
t.material_cost_id as relation_details_id,
|
|
|
|
|
#{spareFlag} as spare_flag,
|
|
|
|
|
null as purchase_plan_flag,
|
|
|
|
|
null as material_flag,
|
|
|
|
|
t.materiel_id as material_id,
|
|
|
|
|
t.relation_materiel_id as relation_material_id,
|
|
|
|
|
t.materiel_code as material_code,
|
|
|
|
|
t.materiel_name as material_name,
|
|
|
|
|
t.materiel_code as specification_description,
|
|
|
|
|
select t.material_cost_id as relation_details_id,
|
|
|
|
|
0 as spare_flag,
|
|
|
|
|
null as purchase_plan_flag,
|
|
|
|
|
case when t.material_id is not null then 1 else 0 end as material_flag,
|
|
|
|
|
t.material_id,
|
|
|
|
|
t.relation_material_id,
|
|
|
|
|
t.material_code as material_code,
|
|
|
|
|
t.material_name as material_name,
|
|
|
|
|
t.remark as specification_description,
|
|
|
|
|
t.unit_id,
|
|
|
|
|
t.amount as need_purchase_amount,
|
|
|
|
|
t.amount as purchase_amount,
|
|
|
|
|
null as arrival_time,
|
|
|
|
|
null as serial_number,
|
|
|
|
|
t.remark,
|
|
|
|
|
null as active_flag,
|
|
|
|
|
t.materiel_code as relation_material_code,
|
|
|
|
|
t.materiel_name as relation_material_name,
|
|
|
|
|
t.materiel_name as purchase_material_name
|
|
|
|
|
u.unit_name,
|
|
|
|
|
t.amount as need_purchase_amount,
|
|
|
|
|
t.amount as purchase_amount,
|
|
|
|
|
t.material_code as relation_material_code,
|
|
|
|
|
t.material_name as relation_material_name
|
|
|
|
|
from erp_budget_material_cost t
|
|
|
|
|
left join base_unit_info u on u.unit_id = t.unit_id
|
|
|
|
|
where t.del_flag = '0'
|
|
|
|
|
and t.project_id = #{projectId}
|
|
|
|
|
order by t.material_cost_id asc
|
|
|
|
|
|