Merge branch 'dev' into dev_user0622
# Conflicts: # mhd_wms/src/main/resources/mapper/pickingOrder/PickingOrderMapper.xml
This commit is contained in:
@@ -6,11 +6,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectContractManagePo">
|
||||
select
|
||||
*
|
||||
from contract_manage
|
||||
SELECT DISTINCT a.*
|
||||
FROM CONTRACT_MANAGE a
|
||||
INNER JOIN CONTRACT_MANAGE_DETAIL b
|
||||
ON a.CONTRACT_MANAGE_ID = b.CONTRACT_MANAGE_ID
|
||||
where
|
||||
del_flag = 1
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectContractManagePo1">
|
||||
@@ -46,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and contract_state = #{contractState}
|
||||
</if>
|
||||
<if test="signingUnit != null and signingUnit != ''">
|
||||
and signing_unit = #{signingUnit}
|
||||
and asigning_unit = #{signingUnit}
|
||||
</if>
|
||||
<if test="settlementCustomers != null and settlementCustomers != ''">
|
||||
and settlement_customers = #{settlementCustomers}
|
||||
@@ -108,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="theyOperatorPhone != null and theyOperatorPhone != ''">
|
||||
and they_operator_phone = #{theyOperatorPhone}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -132,73 +134,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="contractManageDO.contractNumber != null and contractManageDO.contractNumber != ''">
|
||||
and contract_number like concat('%', #{contractManageDO.contractNumber}, '%')
|
||||
and a.contract_number like concat('%', #{contractManageDO.contractNumber}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.originalContractNumber != null and contractManageDO.originalContractNumber != ''">
|
||||
and original_contract_number like concat('%', #{contractManageDO.originalContractNumber}, '%')
|
||||
and a.original_contract_number like concat('%', #{contractManageDO.originalContractNumber}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.commonContractFlag != null">
|
||||
and common_contract_flag = #{contractManageDO.commonContractFlag}
|
||||
and a.common_contract_flag = #{contractManageDO.commonContractFlag}
|
||||
</if>
|
||||
<if test="contractManageDO.contractType != null">
|
||||
and contract_type = #{contractManageDO.contractType}
|
||||
and a.contract_type = #{contractManageDO.contractType}
|
||||
</if>
|
||||
<if test="contractManageDO.settlementCustomers != null and contractManageDO.settlementCustomers != '' " >
|
||||
and settlement_customers like concat('%', #{contractManageDO.settlementCustomers}, '%')
|
||||
and a.settlement_customers like concat('%', #{contractManageDO.settlementCustomers}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.settlementCustomersCode != null">
|
||||
and settlement_customers_code = #{contractManageDO.settlementCustomersCode}
|
||||
and a.settlement_customers_code = #{contractManageDO.settlementCustomersCode}
|
||||
</if>
|
||||
<if test="contractManageDO.signingUnit != null and contractManageDO.signingUnit != ''">
|
||||
and signing_unit like concat('%', #{contractManageDO.signingUnit}, '%')
|
||||
and a.signing_unit like concat('%', #{contractManageDO.signingUnit}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.contractName != null and contractManageDO.contractName != ''">
|
||||
and contract_name like concat('%', #{contractManageDO.contractName}, '%')
|
||||
and a.contract_name like concat('%', #{contractManageDO.contractName}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.contractState != null">
|
||||
and contract_state = #{contractManageDO.contractState}
|
||||
and a.contract_state = #{contractManageDO.contractState}
|
||||
</if>
|
||||
<if test="contractManageDO.signingDateStart != null and contractManageDO.signingDateStart != ''">
|
||||
AND date_format(signing_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.signingDateStart}
|
||||
AND date_format(a.signing_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.signingDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.signingDateEnd != null and contractManageDO.signingDateEnd != ''">
|
||||
AND date_format(signing_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.signingDateEnd}
|
||||
AND date_format(a.signing_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.signingDateEnd}
|
||||
</if>
|
||||
|
||||
<if test="contractManageDO.effectiveDateStart != null and contractManageDO.effectiveDateStart != ''">
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateStart}
|
||||
AND date_format(a.effective_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.effectiveDateEnd != null and contractManageDO.effectiveDateEnd != ''">
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.effectiveDateEnd}
|
||||
AND date_format(a.effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.effectiveDateEnd}
|
||||
</if>
|
||||
|
||||
<if test="contractManageDO.expirationDateStart != null and contractManageDO.expirationDateStart != ''">
|
||||
AND date_format(expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.expirationDateStart}
|
||||
AND date_format(a.expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.expirationDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.expirationDateEnd != null and contractManageDO.expirationDateEnd != ''">
|
||||
AND date_format(expiration_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateEnd}
|
||||
AND date_format(a.expiration_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateEnd}
|
||||
</if>
|
||||
<!-- 时间段重叠判断:只有当已有合同与传入的有效期真正有交集时才算冲突
|
||||
条件:已有合同开始日期 <= 新合同结束日期 且 已有合同结束日期 >= 新合同开始日期 -->
|
||||
<if test="contractManageDO.effectiveDateString != null and contractManageDO.effectiveDateString != ''
|
||||
and contractManageDO.expirationDateString != null and contractManageDO.expirationDateString != ''">
|
||||
AND (
|
||||
date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateString}
|
||||
AND date_format(expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateString}
|
||||
date_format(a.effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateString}
|
||||
AND date_format(a.expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateString}
|
||||
)
|
||||
</if>
|
||||
<if test="contractManageDO.nowDateString != null and contractManageDO.nowDateString != ''">
|
||||
AND (
|
||||
date_format(expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.nowDateString}
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.nowDateString}
|
||||
date_format(a.expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.nowDateString}
|
||||
AND date_format(a.effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.nowDateString}
|
||||
)
|
||||
</if>
|
||||
<if test="contractManageDO.organizationId != null">
|
||||
and organization_id = #{contractManageDO.organizationId}
|
||||
and a.organization_id = #{contractManageDO.organizationId}
|
||||
</if>
|
||||
<if test="contractManageDO.topOrganizationId != null">
|
||||
and top_organization_id = #{contractManageDO.topOrganizationId}
|
||||
and a.top_organization_id = #{contractManageDO.topOrganizationId}
|
||||
</if>
|
||||
<if test="contractManageDO.firstSubjectCode != null and contractManageDO.firstSubjectCode != ''">
|
||||
and b.FIRST_SUBJECT_CODE = #{contractManageDO.firstSubjectCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user