select m.id, m.bill_code, m.miss_reason, m.create_by, m.create_time, m.update_by, m.update_time, m.remark, m.del_flag, m.line_code, m.product_type, m.start_site_code, m.next_site_code, m.supplier_code, m.start_date, m.end_date, w.send_site_code, s.site_name as send_site_name, w.send_country, c1.name as send_country_name, w.destination_code, n.dest_name as destination_name,w.bl_is_question, w.receive_country, c2.name as receive_country_name, w.send_date, w.bl_sign, w.sign_date, w.product_type, j.prod_name as product_type_name, w.payment_type, w.parcel_qty, w.bill_weight, w.total_volume, w.volume_weight, w.settlement_weight, w.freight, w.remark as waybill_remark, w.fee_remark, m.manager, k.trans_manager from emis_tms_site_batch_miss m left join emis_waybill w on m.bill_code = w.bill_code and w.del_flag='0' left join emis_site s on w.send_site_code=s.site_code and s.del_flag=0 left join emis_country c1 on w.send_country=c1.code and c1.del_flag='0' left join emis_country c2 on w.receive_country=c2.code and c2.del_flag='0' left join emis_destination n on w.destination_code=n.dest_code and n.del_flag='0' left join emis_trans_line k on w.trans_line_type=k.line_code and k.del_flag='0' left join emis_trans_product j on w.product_type=j.prod_code and j.del_flag='0' left join emis_trans_plan_rule r on m.trans_plan_rule_id=r.id and r.del_flag='0' left join emis_trans_line l on m.line_code=l.line_code and l.del_flag='0' left join emis_trans_product p on m.product_type=p.prod_code and p.del_flag='0' left join emis_site s1 on m.start_site_code=s1.site_code and s1.del_flag='0' left join emis_site s2 on m.next_site_code=s2.site_code and s2.del_flag='0' left join emis_supplier sup on m.supplier_code=sup.code and sup.del_flag='0' insert into emis_tms_site_batch_miss bill_code, miss_reason, create_by, create_time, update_by, update_time, remark, #{billCode}, #{missReason}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, update emis_tms_site_batch_miss bill_code = #{billCode}, miss_reason = #{missReason}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, where id = #{id} update emis_tms_site_batch_miss set del_flag = '1' where id = #{id} update emis_tms_site_batch_miss set del_flag = '1' where id in #{id} update emis_tms_site_batch_miss set del_flag = '1' insert into emis_tms_site_batch_miss (trans_plan_rule_id, bill_code, miss_reason, line_code,manager, product_type, start_site_code, next_site_code, supplier_code, start_date, end_date, create_by, create_time, update_by, update_time, remark, create_site, update_site, miss_type) values ( #{item.transPlanRuleId,jdbcType=BIGINT}, #{item.billCode,jdbcType=VARCHAR}, #{item.missReason,jdbcType=VARCHAR}, #{item.lineCode,jdbcType=VARCHAR}, #{item.manager,jdbcType=VARCHAR}, #{item.productType,jdbcType=VARCHAR}, #{item.startSiteCode,jdbcType=VARCHAR}, #{item.nextSiteCode,jdbcType=VARCHAR}, #{item.supplierCode,jdbcType=VARCHAR}, #{item.startDate,jdbcType=TIMESTAMP}, #{item.endDate,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR}, #{item.createSite,jdbcType=VARCHAR}, #{item.updateSite,jdbcType=VARCHAR}, #{item.missType,jdbcType=VARCHAR} )