| | |
| | | t.comp_id, |
| | | t1.contract_no, |
| | | t2.company_name AS busGuestName, |
| | | t1.partyB |
| | | t1.party_b |
| | | FROM |
| | | contract_invoice t |
| | | LEFT JOIN contract t1 ON ( t1.id = t.contract_id AND t1.del_flag = '0' ) |
| | |
| | | ORDER BY |
| | | t.create_time DESC |
| | | </select> |
| | | <select id="pageScope" resultType="com.by4cloud.platformx.business.vo.ContractInvoicePageVo"> |
| | | SELECT |
| | | id, |
| | | contract_no, |
| | | contract_name, |
| | | party_a_id, |
| | | party_a, |
| | | party_b_id, |
| | | party_b, |
| | | amount, |
| | | currency, |
| | | contract_type, |
| | | supply_attribute, |
| | | contract_status, |
| | | contract_attribute, |
| | | sign_date, |
| | | sign_place, |
| | | effective_date, |
| | | delivery_cycle, |
| | | expiration_date, |
| | | attachment_url, |
| | | remark, |
| | | parent_id, |
| | | approve_time, |
| | | arrival_schedule_id, |
| | | accept_schedule_id, |
| | | warranty_schedule_id, |
| | | erp_push_flag, |
| | | billing_status, |
| | | billing_amout, |
| | | next_schedule_name, |
| | | template_id, |
| | | sales_model, |
| | | paid_amount, |
| | | contract_category, |
| | | exec_frequency, |
| | | exec_times, |
| | | exec_day, |
| | | environment, |
| | | standard, |
| | | use_month, |
| | | after_ship_month, |
| | | ship_method, |
| | | ship_address, |
| | | packaging, |
| | | repair_period, |
| | | repair_breach_amount, |
| | | goods_short, |
| | | goods_short_breach_amount, |
| | | overdue_breach_amount, |
| | | terminate_contract, |
| | | court, |
| | | contract_attchment, |
| | | city, |
| | | region, |
| | | invoice_notice, |
| | | contract_tax, |
| | | economic_matters, |
| | | erp_contract_no, |
| | | data_id, |
| | | industry_code, |
| | | area_code, |
| | | create_by, |
| | | update_by, |
| | | create_time, |
| | | update_time, |
| | | del_flag, |
| | | comp_id, |
| | | (select count(1) from contract_invoice ci where ci.del_flag = '0' and ci.contract_id = c.id) invoiceNum |
| | | FROM |
| | | contract c |
| | | WHERE |
| | | del_flag = '0' |
| | | <if test="queryDTO.contractNo !=null and queryDTO.contractNo !=''"> |
| | | AND contract_no LIKE CONCAT('%', #{queryDTO.contractNo}, '%') |
| | | </if> |
| | | <if test="queryDTO.partyA !=null and queryDTO.partyA !=''"> |
| | | AND party_a LIKE CONCAT('%', #{queryDTO.partyA}, '%') |
| | | </if> |
| | | <if test="queryDTO.billingStatus !=null and queryDTO.billingStatus !=''"> |
| | | AND billing_status = #{queryDTO.billingStatus} |
| | | </if> |
| | | ORDER BY |
| | | create_time ASC |
| | | </select> |
| | | </mapper> |