select s.f_id, s.f_billtype, dic.dict_label as f_billtype_name, s.f_corpid, s.pol_id, ltd.f_name as pol_name, s.pod_id, dtd.f_name as pod_name, s.f_validdate, s.f_date_changed, CASE WHEN s.f_billstatus=0 THEN '正常' WHEN s.f_billstatus=1 THEN '停用' END as f_billstatus_name, s.f_billstatus, s.del_flag, s.create_by, s.create_time, s.update_by, s.update_time, s.remarks, s.f_lineid, s.f_bookagentid, s.f_transit_port_id, s.f_sailing_schedule, s.f_voyage, j.f_name AS f_line_name, q.f_name AS f_bookagent_name, tc.f_name AS fNamec from t_seaprice s LEFT JOIN t_address j ON s.f_lineid = j.f_id LEFT JOIN t_corps q ON s.f_bookagentid = q.f_id LEFT JOIN t_corps tc ON s.f_corpid = tc.f_id LEFT JOIN ( SELECT * FROM sys_dict_data dic WHERE dic.dict_label = IF(dic.dict_type = "data_billType", dic.dict_label, NULL) ) dic ON dic.dict_value = s.f_billtype LEFT JOIN t_address ltd ON s.pol_id = ltd.f_id LEFT JOIN t_address dtd ON s.pod_id = dtd.f_id insert into t_seaprice f_billtype, f_corpid, pol_id, pod_id, f_validdate, f_date_changed, f_billstatus, del_flag, create_by, create_time, update_by, update_time, remarks, f_lineid, f_bookagentid, f_transit_port_id, f_sailing_schedule, f_voyage, #{fBilltype}, #{fCorpid}, #{polId}, #{podId}, #{fValiddate}, #{fDateChanged}, #{fBillstatus}, #{delFlag}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remarks}, #{fLineid}, #{fBookagentid}, #{fTransitPortId}, #{fSailingSchedule}, #{fVoyage}, update t_seaprice f_billtype = #{fBilltype}, f_corpid = #{fCorpid}, pol_id = #{polId}, pod_id = #{podId}, f_validdate = #{fValiddate}, f_billstatus = #{fBillstatus}, f_date_changed = #{fDateChanged}, del_flag = #{delFlag}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remarks = #{remarks}, f_lineid = #{fLineid}, f_bookagentid = #{fBookagentid}, f_transit_port_id = #{fTransitPortId}, f_sailing_schedule = #{fSailingSchedule}, f_voyage = #{fVoyage}, where f_id = #{fId} delete from t_seaprice where f_id = #{fId} delete from t_seaprice where f_id in #{fId}