id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price, task_comment, type, create_time, split_status, split_super, receiver_name, official_cost, cost_reduction, service_life, service_year, year_sum, contract_term, declaration_batch, patent_type, change_split_super, last_year, last_year_capital, last_year_income, ht_member, additional_deduction, rd_awardsubsidy, technology_project_Type, ordinary_risk, days, scheme
insert into t_change_task(tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity,
commodity_price, task_comment, type, create_time, split_status, split_super,
receiver_name, official_cost, cost_reduction, service_life, service_year, year_sum,
contract_term, declaration_batch, patent_type, change_split_super, last_year,
last_year_capital, last_year_income, ht_member, additional_deduction, rd_awardsubsidy,
technology_project_Type, ordinary_risk, days, scheme)
values (#{tid}, #{cid}, #{orderNo}, #{main}, #{commodityId}, #{commodityName}, #{commodityQuantity},
#{commodityPrice}, #{taskComment}, #{type}, #{createTime}, #{splitStatus}, #{splitSuper},
#{receiverName}, #{officialCost}, #{costReduction}, #{serviceLife}, #{serviceYear}, #{yearSum},
#{contractTerm}, #{declarationBatch}, #{patentType}, #{changeSplitSuper}, #{lastYear},
#{lastYearCapital}, #{lastYearIncome}, #{htMember}, #{additionalDeduction}, #{rdAwardsubsidy},
#{technologyProjectType}, #{ordinaryRisk}, #{days}, #{scheme})
insert into t_change_task(tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity,
commodity_price, task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
cost_reduction, service_life, service_year, year_sum, contract_term, declaration_batch, patent_type,
change_split_super, last_year, last_year_capital, last_year_income, ht_member, additional_deduction,
rd_awardsubsidy, technology_project_Type, ordinary_risk, days, scheme)
values
(#{entity.tid}, #{entity.cid}, #{entity.orderNo}, #{entity.main}, #{entity.commodityId},
#{entity.commodityName}, #{entity.commodityQuantity}, #{entity.commodityPrice}, #{entity.taskComment},
#{entity.type}, #{entity.createTime}, #{entity.splitStatus}, #{entity.splitSuper}, #{entity.receiverName},
#{entity.officialCost}, #{entity.costReduction}, #{entity.serviceLife}, #{entity.serviceYear},
#{entity.yearSum}, #{entity.contractTerm}, #{entity.declarationBatch}, #{entity.patentType},
#{entity.changeSplitSuper}, #{entity.lastYear}, #{entity.lastYearCapital}, #{entity.lastYearIncome},
#{entity.htMember}, #{entity.additionalDeduction}, #{entity.rdAwardsubsidy},
#{entity.technologyProjectType}, #{entity.ordinaryRisk}, #{entity.days}, #{entity.scheme})
insert into t_change_task(tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity,
commodity_price, task_comment, type, create_time, split_status, split_super, receiver_name, official_cost,
cost_reduction, service_life, service_year, year_sum, contract_term, declaration_batch, patent_type,
change_split_super, last_year, last_year_capital, last_year_income, ht_member, additional_deduction,
rd_awardsubsidy, technology_project_Type, ordinary_risk, days, scheme)
values
(#{entity.tid}, #{entity.cid}, #{entity.orderNo}, #{entity.main}, #{entity.commodityId},
#{entity.commodityName}, #{entity.commodityQuantity}, #{entity.commodityPrice}, #{entity.taskComment},
#{entity.type}, #{entity.createTime}, #{entity.splitStatus}, #{entity.splitSuper}, #{entity.receiverName},
#{entity.officialCost}, #{entity.costReduction}, #{entity.serviceLife}, #{entity.serviceYear},
#{entity.yearSum}, #{entity.contractTerm}, #{entity.declarationBatch}, #{entity.patentType},
#{entity.changeSplitSuper}, #{entity.lastYear}, #{entity.lastYearCapital}, #{entity.lastYearIncome},
#{entity.htMember}, #{entity.additionalDeduction}, #{entity.rdAwardsubsidy},
#{entity.technologyProjectType}, #{entity.ordinaryRisk}, #{entity.days}, #{entity.scheme})
on duplicate key update
tid = values(tid),
cid = values(cid),
order_no = values(order_no),
main = values(main),
commodity_id = values(commodity_id),
commodity_name = values(commodity_name),
commodity_quantity = values(commodity_quantity),
commodity_price = values(commodity_price),
task_comment = values(task_comment),
type = values(type),
create_time = values(create_time),
split_status = values(split_status),
split_super = values(split_super),
receiver_name = values(receiver_name),
official_cost = values(official_cost),
cost_reduction = values(cost_reduction),
service_life = values(service_life),
service_year = values(service_year),
year_sum = values(year_sum),
contract_term = values(contract_term),
declaration_batch = values(declaration_batch),
patent_type = values(patent_type),
change_split_super = values(change_split_super),
last_year = values(last_year),
last_year_capital = values(last_year_capital),
last_year_income = values(last_year_income),
ht_member = values(ht_member),
additional_deduction = values(additional_deduction),
rd_awardsubsidy = values(rd_awardsubsidy),
technology_project_Type = values(technology_project_Type),
ordinary_risk = values(ordinary_risk),
days = values(days),
scheme = values(scheme)
update t_change_task
tid = #{tid},
cid = #{cid},
order_no = #{orderNo},
main = #{main},
commodity_id = #{commodityId},
commodity_name = #{commodityName},
commodity_quantity = #{commodityQuantity},
commodity_price = #{commodityPrice},
task_comment = #{taskComment},
type = #{type},
create_time = #{createTime},
split_status = #{splitStatus},
split_super = #{splitSuper},
receiver_name = #{receiverName},
official_cost = #{officialCost},
cost_reduction = #{costReduction},
service_life = #{serviceLife},
service_year = #{serviceYear},
year_sum = #{yearSum},
contract_term = #{contractTerm},
declaration_batch = #{declarationBatch},
patent_type = #{patentType},
change_split_super = #{changeSplitSuper},
last_year = #{lastYear},
last_year_capital = #{lastYearCapital},
last_year_income = #{lastYearIncome},
ht_member = #{htMember},
additional_deduction = #{additionalDeduction},
rd_awardsubsidy = #{rdAwardsubsidy},
technology_project_Type = #{technologyProjectType},
ordinary_risk = #{ordinaryRisk},
days = #{days},
scheme = #{scheme},
where id = #{id}
delete from t_change_task where id = #{id}
insert into t_change_task
tid ,
cid ,
order_no ,
main ,
commodity_id ,
commodity_name,
commodity_quantity ,
commodity_price,
task_comment ,
type,
create_time,
split_status,
split_super ,
receiver_name ,
official_cost,
cost_reduction ,
service_life ,
service_year ,
year_sum ,
contract_term,
declaration_batch ,
patent_type,
change_split_super ,
last_year ,
last_year_capital ,
last_year_income ,
ht_member ,
additional_deduction ,
rd_awardsubsidy ,
just_forms ,
technology_project_Type ,
ordinary_risk ,
days ,
scheme ,
unilateral_service ,
#{tid},
#{cid},
#{orderNo},
#{main},
#{commodityId},
#{commodityName},
#{commodityQuantity},
#{commodityPrice},
#{taskComment},
#{type},
#{createTime},
#{splitStatus},
#{splitSuper},
#{receiverName},
#{officialCost},
#{costReduction},
#{serviceLife},
#{serviceYear},
#{yearSum},
#{contractTerm},
#{declarationBatch},
#{patentType},
#{changeSplitSuper},
#{lastYear},
#{lastYearCapital},
#{lastYearIncome},
#{htMember},
#{additionalDeduction},
#{rdAwardsubsidy},
#{justForms},
#{technologyProjectType},
#{ordinaryRisk},
#{days},
#{scheme},
#{unilateralService},
update t_change_task
type= #{type},
service_life=null,year_sum=null,
where 1=1
and tid= #{tid}
and cid= #{cid}
and split_super= #{sid}
delete from t_change_task where tid= #{tid};
delete from t_change_task where change_split_super= #{tid};
update t_change_task
type= #{type},
service_life= #{serviceLife},
service_year= #{serviceYear},
year_sum= #{yearSum},
contract_term= #{contractTerm},
where 1=1
and cid= #{cid}
and split_super= #{sid}
update t_change_task set type= #{type}
where id in
#{id}
update t_change_task a,(select a.split_super,GROUP_CONCAT(a.service_year) counts
from t_change_task a where a.split_status =2 and a.type in (0,1,2)
and a.split_super=#{splitSuper} and a.cid= #{cid} group by a.split_super)x
set a.service_year =x.counts
where a.tid =x.split_super and a.cid= #{cid};
update t_change_task a,(select a.change_split_super,GROUP_CONCAT(a.service_year) counts
from t_change_task a where a.split_status =2 and a.type in (0,1,2)
and a.change_split_super = #{changeSplitSuper} group by a.change_split_super)x
set a.service_year =x.counts
where a.id =x.change_split_super