You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.oa.erp.mapper.ErpContractInfoMapper">
<resultMap type="org.dromara.oa.erp.domain.vo.ErpContractInfoVo" id="ErpContractInfoResult">
</resultMap>
<select id="selectCustomErpContractInfoVoList" resultMap="ErpContractInfoResult">
select t.contract_id,
t.tenant_id,
t.contract_flag,
t.contract_code,
t.customer_contract_code,
t.contract_name,
t.contract_category,
t.contract_type,
t.business_direction,
t.contract_dept_id,
t.contract_date,
t.total_price,
t.one_customer_id,
t.one_represent,
t.one_date,
t.two_customer_id,
t.two_represent,
t.two_date,
t.contract_status,
t.flow_status,
t.template_id,
t.oss_id,
t.payment_method,
t.signature_appendix,
t.internal_contract_code,
t.external_contract_code,
t.order_contract_code,
t.project_contract_code,
t.warranty_period,
t.tax_rate,
t.remark,
t.active_flag,
t.contract_manager_id,
t.capitalized_amount,
t.contract_template_flag,
t.del_flag,
t.create_dept,
t.create_by,
t.create_time,
t.update_by,
t.update_time,
c1.customer_name oneCustomerName,
c2.customer_name twoCustomerName,
d.dept_name,
u.nick_name contractManagerName
from erp_contract_info t
left join crm_customer_info c1 on t.one_customer_id = c1.customer_id
left join crm_customer_info c2 on t.two_customer_id = c2.customer_id
left join sys_dept d on d.dept_id = t.contract_dept_id
left join sys_user u on u.user_id = t.contract_manager_id
${ew.getCustomSqlSegment}
</select>
</mapper>