|
@@ -128,19 +128,7 @@
|
|
|
<select id="queryIssueSalaryMonthBankCardInfo"
|
|
|
resultType="com.gree.mall.manager.bean.settle.repair.DailyWokerBankCardMonthBean">
|
|
|
SELECT * FROM settle_daily_issue_summary_month_record a
|
|
|
- JOIN (
|
|
|
- SELECT
|
|
|
- u.id_card,
|
|
|
- wb.worker_number,
|
|
|
- u.nick_name
|
|
|
- FROM
|
|
|
- user u, websit_user wb
|
|
|
- WHERE
|
|
|
- u.company_wechat_id = wb.company_wechat_id
|
|
|
- AND u.user_id = wb.user_id
|
|
|
- AND u.apply_type = 'WORKER'
|
|
|
- AND wb.examine_status = 'OK'
|
|
|
- ) aa ON a.service_number = aa.worker_number
|
|
|
+ JOIN user aa on a.service_number = aa.worker_number AND aa.apply_type = 'WORKER'
|
|
|
JOIN settle_daily_bank_account b ON aa.id_card = b.idcard
|
|
|
WHERE
|
|
|
a.company_wechat_id = #{companyWechatId}
|
|
@@ -158,19 +146,7 @@
|
|
|
|
|
|
<select id="queryIssueSalaryAndBankCardInfo" resultType="com.gree.mall.manager.bean.settle.repair.DailyWorkerBankCardBean">
|
|
|
select a.*,b.* from settle_daily_issue_summary_record a
|
|
|
- JOIN (
|
|
|
- SELECT
|
|
|
- u.id_card,
|
|
|
- wb.worker_number,
|
|
|
- u.nick_name
|
|
|
- FROM
|
|
|
- user u, websit_user wb
|
|
|
- WHERE
|
|
|
- u.company_wechat_id = wb.company_wechat_id
|
|
|
- AND u.user_id = wb.user_id
|
|
|
- AND u.apply_type = 'WORKER'
|
|
|
- AND wb.examine_status = 'OK'
|
|
|
- ) aa ON a.service_number = aa.worker_number
|
|
|
+ JOIN user aa on a.service_number = aa.worker_number AND aa.apply_type = 'WORKER'
|
|
|
join settle_daily_bank_account b on aa.id_card = b.idcard
|
|
|
where
|
|
|
a.company_wechat_id = #{companyWechatId}
|
|
@@ -289,19 +265,7 @@
|
|
|
select
|
|
|
a.*,b.bank_account ,b.bank_account_name,deposit_bank,c.issue_time ,c.issue_by,c.status as issueStatus
|
|
|
from settle_daily_import_summary_item a
|
|
|
- left JOIN (
|
|
|
- SELECT
|
|
|
- u.id_card,
|
|
|
- wb.worker_number,
|
|
|
- u.nick_name
|
|
|
- FROM
|
|
|
- user u, websit_user wb
|
|
|
- WHERE
|
|
|
- u.company_wechat_id = wb.company_wechat_id
|
|
|
- AND u.user_id = wb.user_id
|
|
|
- AND u.apply_type = 'WORKER'
|
|
|
- AND wb.examine_status = 'OK'
|
|
|
- ) aa ON a.worker_number = aa.worker_number
|
|
|
+ left JOIN user aa on a.worker_number = aa.worker_number AND aa.apply_type = 'WORKER'
|
|
|
left join settle_daily_bank_account b on aa.id_card = b.idcard AND a.websit_number = b.websit_id
|
|
|
left join settle_daily_issue_summary_record c on c.id = a.issue_salary_id
|
|
|
|
|
@@ -489,19 +453,7 @@
|
|
|
settle_daily_import_summary_item a
|
|
|
left join
|
|
|
settle_daily_issue_summary_record b on a.issue_salary_id =b.id
|
|
|
- left join (
|
|
|
- SELECT
|
|
|
- u.id_card,
|
|
|
- wb.worker_number,
|
|
|
- u.nick_name
|
|
|
- FROM
|
|
|
- user u, websit_user wb
|
|
|
- WHERE
|
|
|
- u.company_wechat_id = wb.company_wechat_id
|
|
|
- AND u.user_id = wb.user_id
|
|
|
- AND u.apply_type = 'WORKER'
|
|
|
- AND wb.examine_status = 'OK'
|
|
|
- ) aa on a.worker_number = aa.worker_number
|
|
|
+ left join user aa on a.worker_number = aa.worker_number AND aa.apply_type = 'WORKER'
|
|
|
left join settle_daily_bank_account c on aa.id_card = c.idcard
|
|
|
<where>
|
|
|
<if test="companyWechatIds != null and companyWechatIds.size > 0">
|