207 lines
10 KiB
XML
207 lines
10 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="com.mhd.bms.domain.businessDocument.repository.mapper.BusinessDocumentMapper">
|
|
|
|
|
|
|
|
<sql id="selectBusinessDocumentPo1">
|
|
<where>
|
|
<if test="createByName != null and createByName != ''">
|
|
and create_by_name like concat('%', #{createByName}, '%')
|
|
</if>
|
|
<if test="updateByName != null and updateByName != ''">
|
|
and update_by_name like concat('%', #{updateByName}, '%')
|
|
</if>
|
|
<if test="topOrganizationId != null ">
|
|
and top_organization_id = #{topOrganizationId}
|
|
</if>
|
|
<if test="organizationId != null ">
|
|
and organization_id = #{organizationId}
|
|
</if>
|
|
<if test="organizationName != null and organizationName != ''">
|
|
and organization_name like concat('%', #{organizationName}, '%')
|
|
</if>
|
|
<if test="businessFlow != null and businessFlow != ''">
|
|
and business_flow = #{businessFlow}
|
|
</if>
|
|
<if test="businessState != null ">
|
|
and business_state = #{businessState}
|
|
</if>
|
|
<if test="belongModule != null and belongModule != ''">
|
|
and belong_module = #{belongModule}
|
|
</if>
|
|
<if test="belongModuleCode != null and belongModuleCode != ''">
|
|
and belong_module_code = #{belongModuleCode}
|
|
</if>
|
|
<if test="dataSources != null ">
|
|
and data_sources = #{dataSources}
|
|
</if>
|
|
<if test="documentTypeId != null ">
|
|
and document_type_id = #{documentTypeId}
|
|
</if>
|
|
<if test="documentTypeCode != null and documentTypeCode != ''">
|
|
and document_type_code = #{documentTypeCode}
|
|
</if>
|
|
<if test="documentType != null and documentType != ''">
|
|
and document_type = #{documentType}
|
|
</if>
|
|
<if test="originalBusinessNum != null and originalBusinessNum != ''">
|
|
and original_business_num = #{originalBusinessNum}
|
|
</if>
|
|
<if test="projectCode != null and projectCode != ''">
|
|
and project_code = #{projectCode}
|
|
</if>
|
|
<if test="projectName != null and projectName != ''">
|
|
and project_name like concat('%', #{projectName}, '%')
|
|
</if>
|
|
<if test="contractNumber != null and contractNumber != ''">
|
|
and contract_number = #{contractNumber}
|
|
</if>
|
|
<if test="contractName != null and contractName != ''">
|
|
and contract_name like concat('%', #{contractName}, '%')
|
|
</if>
|
|
<if test="billAmount != null ">
|
|
and bill_amount = #{billAmount}
|
|
</if>
|
|
<if test="estimatedCost != null ">
|
|
and estimated_cost = #{estimatedCost}
|
|
</if>
|
|
<if test="firstSubjectCode != null and firstSubjectCode != ''">
|
|
and first_subject_code = #{firstSubjectCode}
|
|
</if>
|
|
<if test="firstSubjectName != null and firstSubjectName != ''">
|
|
and first_subject_name like concat('%', #{firstSubjectName}, '%')
|
|
</if>
|
|
<if test="secondSubjectCode != null and secondSubjectCode != ''">
|
|
and second_subject_code = #{secondSubjectCode}
|
|
</if>
|
|
<if test="secondSubjectName != null and secondSubjectName != ''">
|
|
and second_subject_name like concat('%', #{secondSubjectName}, '%')
|
|
</if>
|
|
<if test="settlementCustomersId != null ">
|
|
and settlement_customers_id = #{settlementCustomersId}
|
|
</if>
|
|
<if test="settlementCustomersCode != null and settlementCustomersCode != ''">
|
|
and settlement_customers_code = #{settlementCustomersCode}
|
|
</if>
|
|
<if test="settlementEntity != null and settlementEntity != ''">
|
|
and settlement_entity = #{settlementEntity}
|
|
</if>
|
|
<if test="billingTime != null ">
|
|
and billing_time = #{billingTime}
|
|
</if>
|
|
<if test="documentFormJson != null and documentFormJson != ''">
|
|
and document_form_json = #{documentFormJson}
|
|
</if>
|
|
<if test="revenueExpensesType != null ">
|
|
and revenue_expenses_type = #{revenueExpensesType}
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
|
|
<select id="queryList" parameterType="com.mhd.bms.domain.businessDocument.repository.todo.BusinessDocumentDO"
|
|
resultType="com.mhd.bms.domain.businessDocument.repository.po.BusinessDocumentPO">
|
|
select
|
|
*
|
|
from business_document
|
|
where del_flag = 1
|
|
<include refid="common_where"/>
|
|
ORDER BY create_time DESC
|
|
</select>
|
|
|
|
<sql id="common_where">
|
|
<if test="businessDocumentDO.createTimeStart != null and businessDocumentDO.createTimeStart != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{businessDocumentDO.createTimeStart}
|
|
</if>
|
|
<if test="businessDocumentDO.createTimeEnd != null and businessDocumentDO.createTimeEnd != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.createTimeEnd}
|
|
</if>
|
|
<if test="businessDocumentDO.createByName != null and businessDocumentDO.createByName != ''">
|
|
AND create_by_name like concat('%', #{businessDocumentDO.createByName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.organizationId != null">
|
|
AND organization_id = #{businessDocumentDO.organizationId}
|
|
</if>
|
|
<if test="businessDocumentDO.topOrganizationId != null and businessDocumentDO.topOrganizationId != ''">
|
|
AND top_organization_id = #{businessDocumentDO.topOrganizationId}
|
|
</if>
|
|
<if test="businessDocumentDO.updateByName != null and businessDocumentDO.updateByName != ''">
|
|
AND update_by_name like concat('%', #{businessDocumentDO.updateByName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.updateTimeStart != null and businessDocumentDO.updateTimeStart != ''">
|
|
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{businessDocumentDO.updateTimeStart}
|
|
</if>
|
|
<if test="businessDocumentDO.updateTimeEnd != null and businessDocumentDO.updateTimeEnd != ''">
|
|
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{businessDocumentDO.updateTimeEnd}
|
|
</if>
|
|
<if test="businessDocumentDO.businessFlow != null and businessDocumentDO.businessFlow != ''">
|
|
AND business_flow like concat('%', #{businessDocumentDO.businessFlow}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.dataSources != null and businessDocumentDO.dataSources != ''">
|
|
AND data_sources = #{businessDocumentDO.dataSources}
|
|
</if>
|
|
<if test="businessDocumentDO.businessState != null and businessDocumentDO.businessState != ''">
|
|
AND business_state = #{businessDocumentDO.businessState}
|
|
</if>
|
|
<if test="businessDocumentDO.belongModule != null and businessDocumentDO.belongModule != ''">
|
|
AND belong_module like concat('%', #{businessDocumentDO.belongModule}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.organizationName != null and businessDocumentDO.organizationName != ''">
|
|
AND organization_name like concat('%', #{businessDocumentDO.organizationName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.documentType != null and businessDocumentDO.documentType != ''">
|
|
AND document_type like concat('%', #{businessDocumentDO.documentType}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.originalBusinessNum != null and businessDocumentDO.originalBusinessNum != ''">
|
|
AND original_business_num like concat('%', #{businessDocumentDO.originalBusinessNum}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.projectName != null and businessDocumentDO.projectName != ''">
|
|
AND project_name like concat('%', #{businessDocumentDO.projectName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.contractNumber != null and businessDocumentDO.contractNumber != ''">
|
|
AND contract_number like concat('%', #{businessDocumentDO.contractNumber}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.contractName != null and businessDocumentDO.contractName != ''">
|
|
AND contract_name like concat('%', #{businessDocumentDO.contractName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.billAmount != null and businessDocumentDO.billAmount != ''">
|
|
AND bill_amount like concat('%', #{businessDocumentDO.billAmount}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.estimatedCost != null and businessDocumentDO.estimatedCost != ''">
|
|
AND estimated_cost like concat('%', #{businessDocumentDO.estimatedCost}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.firstSubjectName != null and businessDocumentDO.firstSubjectName != ''">
|
|
AND first_subject_name like concat('%', #{businessDocumentDO.firstSubjectName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.secondSubjectName != null and businessDocumentDO.secondSubjectName != ''">
|
|
AND second_subject_name like concat('%', #{businessDocumentDO.secondSubjectName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.settlementEntity != null and businessDocumentDO.settlementEntity != ''">
|
|
AND settlement_entity like concat('%', #{businessDocumentDO.settlementEntity}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.settlementCustomersCode != null and businessDocumentDO.settlementCustomersCode != ''">
|
|
AND settlement_customers_code like concat('%', #{businessDocumentDO.settlementCustomersCode}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.serviceItemsName != null and businessDocumentDO.serviceItemsName != ''">
|
|
AND service_items_name like concat('%', #{businessDocumentDO.serviceItemsName}, '%')
|
|
</if>
|
|
<if test="businessDocumentDO.serviceItemsCode != null and businessDocumentDO.serviceItemsCode != ''">
|
|
AND service_items_code = #{businessDocumentDO.serviceItemsCode}
|
|
</if>
|
|
<if test="businessDocumentDO.documentTypeCode != null and businessDocumentDO.documentTypeCode != ''">
|
|
AND document_type_code = #{businessDocumentDO.documentTypeCode}
|
|
</if>
|
|
<if test="businessDocumentDO.businessDocumentIdSet != null">
|
|
and business_document_id in
|
|
<foreach item="id" collection="businessDocumentDO.businessDocumentIdSet" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
</sql>
|
|
|
|
|
|
|
|
</mapper>
|