select gd.id, gd.com_id, gd.project_id,gd.data_date, gd.item_id, gd.estimate_value, gd.practical_value, gd.state,
gd.remark, gd.is_del, gd.create_by, gd.create_time, gd.update_by, gd.update_time,
dp.`dept_name` comp_name,pi.`project_name`,g.id gid,g.carbon_factor_type,g.carbon_name,g.unit,g.carbon_factor
from green_carbon_data gd
LEFT JOIN sys_dept dp ON gd.`com_id`=dp.`dept_id`
LEFT JOIN pro_project_info pi ON gd.`project_id`=pi.`id`
LEFT JOIN green_carbon_item g on g.id=gd.item_id
insert into green_carbon_data
com_id,project_id,data_date,item_id,estimate_value,practical_value,state,remark,is_del,create_by,create_time,update_by,update_time,#{comId},#{projectId},#{dataDate},#{itemId},#{estimateValue},#{practicalValue},#{state},#{remark},#{isDel},#{createBy},#{createTime},#{updateBy},#{updateTime},
update green_carbon_data
com_id = #{comId},project_id = #{projectId},data_date = #{dataDate},item_id = #{itemId},estimate_value = #{estimateValue},practical_value = #{practicalValue},state = #{state},remark = #{remark},is_del = #{isDel},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},
where id = #{id}
delete from green_carbon_data where id = #{id}
delete from green_carbon_data where id in
#{id}