|
@@ -1119,12 +1119,15 @@
|
|
<if test="dbName == 'mssql'">'%'+#{client.name}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{client.name}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{client.name},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{client.name},'%')</if>
|
|
</if>
|
|
</if>
|
|
- <if test="officeId != null and officeId != ''">
|
|
|
|
|
|
+ <!--<if test="officeId != null and officeId != ''">
|
|
AND so.id = #{officeId}
|
|
AND so.id = #{officeId}
|
|
- </if>
|
|
|
|
|
|
+ </if>-->
|
|
<if test="money != null and money != ''">
|
|
<if test="money != null and money != ''">
|
|
AND a.money = #{money}
|
|
AND a.money = #{money}
|
|
</if>
|
|
</if>
|
|
|
|
+ <!--<if test="submitterId != null and submitterId != ''">
|
|
|
|
+ AND a.create_by = #{submitterId}
|
|
|
|
+ </if>-->
|
|
<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
|
|
<if test="(submitterId != null and submitterId != '') or (submitterName != null and submitterName != '')">
|
|
AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
|
|
AND (a.create_by = #{submitterId} or su.name like concat('%',#{submitterName},'%'))
|
|
</if>
|
|
</if>
|
|
@@ -1146,14 +1149,20 @@
|
|
<if test="companyId != null and companyId != ''">
|
|
<if test="companyId != null and companyId != ''">
|
|
AND a.company_id = #{companyId}
|
|
AND a.company_id = #{companyId}
|
|
</if>
|
|
</if>
|
|
- <if test="office != null and office.id != null and office.id != ''">
|
|
|
|
|
|
+ <!--<if test="office != null and office.id != null and office.id != ''">
|
|
AND a.office_id = #{office.id}
|
|
AND a.office_id = #{office.id}
|
|
|
|
+ </if>-->
|
|
|
|
+ <if test="officeIdList!=null and officeIdList.size!=0">
|
|
|
|
+ and a.office_id in
|
|
|
|
+ <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
|
+ #{officeId}
|
|
|
|
+ </foreach>
|
|
</if>
|
|
</if>
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
AND a.invoice_number LIKE
|
|
AND a.invoice_number LIKE
|
|
- <if test="dbName == 'oracle'">'%'||#{invoiceNumber}||'%'</if>
|
|
|
|
- <if test="dbName == 'mssql'">'%'+#{invoiceNumber}+'%'</if>
|
|
|
|
- <if test="dbName == 'mysql'">concat('%',#{invoiceNumber},'%')</if>
|
|
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{invoiceNumber}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{invoiceNumber}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{invoiceNumber},'%')</if>
|
|
</if>
|
|
</if>
|
|
<if test="invoiceDate != null and invoiceDate != ''">
|
|
<if test="invoiceDate != null and invoiceDate != ''">
|
|
AND a.invoice_date = #{invoiceDate}
|
|
AND a.invoice_date = #{invoiceDate}
|
|
@@ -1179,7 +1188,7 @@
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
|
|
<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
|
|
- AND (a.account_checking_user_id = #{accountCheckingUserId} or acu.name like concat('%',#{accountCheckingUserName},'%'))
|
|
|
|
|
|
+ AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
|
|
</if>
|
|
</if>
|
|
<if test="widNumber != null and widNumber != ''">
|
|
<if test="widNumber != null and widNumber != ''">
|
|
AND wid.number LIKE
|
|
AND wid.number LIKE
|
|
@@ -1187,6 +1196,35 @@
|
|
<if test="dbName == 'mssql'">'%'+#{widNumber}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{widNumber}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{widNumber},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{widNumber},'%')</if>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="newDrawerId != null and newDrawerId != ''">
|
|
|
|
+ and new_drawer_id like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{newDrawerId}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{newDrawerId}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{newDrawerId},'%')</if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newDrawer != null and newDrawer != ''">
|
|
|
|
+ and new_drawer like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{newDrawer}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{newDrawer}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{newDrawer},'%')</if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="projectName != null and projectName != ''">
|
|
|
|
+ and (wipr.details like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
|
|
|
|
+ or rpr.project_name like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{projectName}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{projectName},'%')</if>
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test="reportNumber != null and reportNumber != ''">
|
|
|
|
+ and prds.number like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{reportNumber}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{reportNumber}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{reportNumber},'%')</if>
|
|
|
|
+ </if>
|
|
${sqlMap.dsf}
|
|
${sqlMap.dsf}
|
|
</where>
|
|
</where>
|
|
) as x
|
|
) as x
|
|
@@ -1270,11 +1308,8 @@
|
|
<!--<if test="officeId != null and officeId != ''">
|
|
<!--<if test="officeId != null and officeId != ''">
|
|
AND so.id = #{officeId}
|
|
AND so.id = #{officeId}
|
|
</if>-->
|
|
</if>-->
|
|
- <if test="officeIdList!=null and officeIdList.size!=0">
|
|
|
|
- and a.office_id in
|
|
|
|
- <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
|
- #{officeId}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+ <if test="money != null and money != ''">
|
|
|
|
+ AND a.money = #{money}
|
|
</if>
|
|
</if>
|
|
<!--<if test="submitterId != null and submitterId != ''">
|
|
<!--<if test="submitterId != null and submitterId != ''">
|
|
AND a.create_by = #{submitterId}
|
|
AND a.create_by = #{submitterId}
|
|
@@ -1285,9 +1320,6 @@
|
|
<if test="receiptMoney != null and receiptMoney != ''">
|
|
<if test="receiptMoney != null and receiptMoney != ''">
|
|
AND a.receipt_money = #{receiptMoney}
|
|
AND a.receipt_money = #{receiptMoney}
|
|
</if>
|
|
</if>
|
|
- <if test="money != null and money != ''">
|
|
|
|
- AND a.money = #{money}
|
|
|
|
- </if>
|
|
|
|
<if test="invoiceType != null and invoiceType != ''">
|
|
<if test="invoiceType != null and invoiceType != ''">
|
|
AND a.invoice_type = #{invoiceType}
|
|
AND a.invoice_type = #{invoiceType}
|
|
</if>
|
|
</if>
|
|
@@ -1303,11 +1335,14 @@
|
|
<if test="companyId != null and companyId != ''">
|
|
<if test="companyId != null and companyId != ''">
|
|
AND a.company_id = #{companyId}
|
|
AND a.company_id = #{companyId}
|
|
</if>
|
|
</if>
|
|
- <if test="office != null and office.id != null and office.id != ''">
|
|
|
|
|
|
+ <!--<if test="office != null and office.id != null and office.id != ''">
|
|
AND a.office_id = #{office.id}
|
|
AND a.office_id = #{office.id}
|
|
- </if>
|
|
|
|
- <if test="billingContent != null and billingContent != ''">
|
|
|
|
- AND a.billing_content = #{billingContent}
|
|
|
|
|
|
+ </if>-->
|
|
|
|
+ <if test="officeIdList!=null and officeIdList.size!=0">
|
|
|
|
+ and a.office_id in
|
|
|
|
+ <foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">
|
|
|
|
+ #{officeId}
|
|
|
|
+ </foreach>
|
|
</if>
|
|
</if>
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
AND a.invoice_number LIKE
|
|
AND a.invoice_number LIKE
|
|
@@ -1327,6 +1362,9 @@
|
|
<if test="isInvalid != null and isInvalid != ''">
|
|
<if test="isInvalid != null and isInvalid != ''">
|
|
AND a.is_invalid = #{isInvalid}
|
|
AND a.is_invalid = #{isInvalid}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="billingContent != null and billingContent != ''">
|
|
|
|
+ AND a.billing_content = #{billingContent}
|
|
|
|
+ </if>
|
|
<if test="area != null and area.id != null and area.id != ''">
|
|
<if test="area != null and area.id != null and area.id != ''">
|
|
AND (a.area_parent_id LIKE
|
|
AND (a.area_parent_id LIKE
|
|
<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
|
|
@@ -1344,6 +1382,18 @@
|
|
<if test="dbName == 'mssql'">'%'+#{widNumber}+'%'</if>
|
|
<if test="dbName == 'mssql'">'%'+#{widNumber}+'%'</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{widNumber},'%')</if>
|
|
<if test="dbName == 'mysql'">concat('%',#{widNumber},'%')</if>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="newDrawerId != null and newDrawerId != ''">
|
|
|
|
+ and new_drawer_id like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{newDrawerId}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{newDrawerId}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{newDrawerId},'%')</if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="newDrawer != null and newDrawer != ''">
|
|
|
|
+ and new_drawer like
|
|
|
|
+ <if test="dbName == 'oracle'">'%'||#{newDrawer}||'%'</if>
|
|
|
|
+ <if test="dbName == 'mssql'">'%'+#{newDrawer}+'%'</if>
|
|
|
|
+ <if test="dbName == 'mysql'">concat('%',#{newDrawer},'%')</if>
|
|
|
|
+ </if>
|
|
<if test="projectName != null and projectName != ''">
|
|
<if test="projectName != null and projectName != ''">
|
|
and (wipr.details like
|
|
and (wipr.details like
|
|
<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
<if test="dbName == 'oracle'">'%'||#{projectName}||'%'</if>
|
|
@@ -1690,6 +1740,12 @@
|
|
actual_drawer_email_address = #{actualDrawerEmailAddress},
|
|
actual_drawer_email_address = #{actualDrawerEmailAddress},
|
|
new_drawer = #{newDrawer},
|
|
new_drawer = #{newDrawer},
|
|
actual_drawer_id = #{actualDrawerId}
|
|
actual_drawer_id = #{actualDrawerId}
|
|
|
|
+ <if test="null != auditPassDate">
|
|
|
|
+ ,audit_pass_date = #{auditPassDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="null != cancellationAuditPassDate">
|
|
|
|
+ ,cancellation_audit_pass_date = #{cancellationAuditPassDate}
|
|
|
|
+ </if>
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
<update id="updateDate">
|
|
<update id="updateDate">
|