diff --git a/src/com/engine/salary/mapper/InsuranceExportMapper.xml b/src/com/engine/salary/mapper/InsuranceExportMapper.xml
index 8b478e300..b57b97b9b 100644
--- a/src/com/engine/salary/mapper/InsuranceExportMapper.xml
+++ b/src/com/engine/salary/mapper/InsuranceExportMapper.xml
@@ -10,6 +10,8 @@
)a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
+ where e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
SELECT
@@ -20,6 +22,8 @@
)a
LEFT JOIN hrmresource e ON e.ID = a.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
+ where e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
SELECT
diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml
index 639237dc3..094c3ea38 100644
--- a/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml
+++ b/src/com/engine/salary/mapper/archive/SalaryArchiveItemMapper.xml
@@ -542,7 +542,7 @@
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
- AND e.status != '7'
+ AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
AND t1.salary_item_id IN
@@ -589,7 +589,7 @@
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
- AND e.status != '7'
+ AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
AND t1.salary_item_id IN
@@ -696,7 +696,7 @@
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
- AND e.status != '7'
+ AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
AND t1.salary_item_id IN
diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml
index 62c19a594..0dd7d5faa 100644
--- a/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml
+++ b/src/com/engine/salary/mapper/archive/SalaryArchiveMapper.xml
@@ -312,6 +312,8 @@
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE t1.delete_type = 0
+ and e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -330,7 +332,8 @@
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE t1.delete_type = 0
-
+ and e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
AND t1.id IN
@@ -380,7 +383,8 @@
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE t1.delete_type = 0
-
+ and e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
AND t1.id IN
@@ -460,15 +464,15 @@
- INSERT INTO hrsa_salary_archive (
- id,
- employee_id,
- create_time,
- update_time,
- creator,
- tenant_key
- )
- VALUES
+ INSERT INTO hrsa_salary_archive (
+ id,
+ employee_id,
+ create_time,
+ update_time,
+ creator,
+ tenant_key
+ )
+ VALUES
(
#{item.id},
#{item.employeeId},
diff --git a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml
index 98bbd6b2d..25a71e7cd 100644
--- a/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml
+++ b/src/com/engine/salary/mapper/archive/SalaryArchiveTaxAgentMapper.xml
@@ -556,6 +556,7 @@
WHERE
t1.delete_type = 0
AND e.status != '7'
+ and (e.accounttype is null or e.accounttype = 0)
AND (
@@ -579,7 +580,7 @@
WHERE
t1.delete_type = 0
AND e.status != '7'
-
+ and (e.accounttype is null or e.accounttype = 0)
AND (
e.lastname like '%'||#{param.keyword}||'%'
@@ -601,7 +602,7 @@
WHERE
t1.delete_type = 0
AND e.status != '7'
-
+ and (e.accounttype is null or e.accounttype = 0)
AND (
e.lastname like '%'+#{param.keyword}+'%'
diff --git a/src/com/engine/salary/mapper/attend/AttendDataMapper.java b/src/com/engine/salary/mapper/attend/AttendDataMapper.java
deleted file mode 100644
index 28831f038..000000000
--- a/src/com/engine/salary/mapper/attend/AttendDataMapper.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.engine.salary.mapper.attend;
-
-import java.util.List;
-import java.util.Map;
-
-public interface AttendDataMapper {
-
- List> getAttendData();
-
-}
diff --git a/src/com/engine/salary/mapper/attend/AttendDataMapper.xml b/src/com/engine/salary/mapper/attend/AttendDataMapper.xml
deleted file mode 100644
index a5c716000..000000000
--- a/src/com/engine/salary/mapper/attend/AttendDataMapper.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
- a.id as employeeid,
- a.lastname,
- a.workcode,
- a.dsporder,
- b.resourceid,
- a.subcompanyid1 as subcompanyid,
- a.departmentid,
- a.jobtitle,
- sum(b.workdays) as workdays,
- sum(b.workMins) as workmins,
- sum(b.attendancedays) as attendancedays,
- sum(b.attendanceMins) as attendancemins,
- sum(b.beLate) as belate,
- sum(b.beLateMins) as belatemins,
- sum(b.graveBeLate) as gravebelate,
- sum(b.graveBeLateMins) as gravebelatemins,
- sum(b.leaveEearly) as leaveeearly,
- sum(b.leaveEarlyMins) as leaveearlymins,
- sum(b.graveLeaveEarly) as graveleaveearly,
- sum(b.graveLeaveEarlyMins) as graveleaveearlymins,
- sum(b.absenteeism) as absenteeism,
- sum(b.signdays) as signdays,
- sum(b.signmins) as signmins,
- sum(b.absenteeismMins) as absenteeismmins,
- sum(b.forgotCheck) as forgotcheck
-
-
-
-
- SELECT
-
- FROM hrmresource a, kq_format_total b
- where a.id = b.resourceid and b.resourceid in(22)
- group by a.id, a.lastname, a.workcode, a.dsporder, b.resourceid, a.subcompanyid1, a.departmentid, a.jobtitle
-
-
-
-
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml
index 154de7d64..bf1bba0dc 100644
--- a/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/AddUpDeductionMapper.xml
@@ -67,6 +67,7 @@
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
@@ -275,6 +276,7 @@
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -291,6 +293,7 @@
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -306,6 +309,7 @@
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -516,6 +520,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.declare_month DESC
diff --git a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml
index 31d3b195f..24334036e 100644
--- a/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/AddUpSituationMapper.xml
@@ -303,6 +303,7 @@
t1.delete_type = 0
AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -322,6 +323,7 @@
t1.delete_type = 0
AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -341,6 +343,7 @@
t1.delete_type = 0
AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -358,6 +361,7 @@
t1.delete_type = 0
AND t2.delete_type = 0
AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.tax_year_month DESC
diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml
index bfda99fc8..24fd61491 100644
--- a/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteDataMapper.xml
@@ -257,6 +257,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -269,6 +271,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -281,6 +285,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
diff --git a/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml b/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml
index 02b22b951..5eddf1410 100644
--- a/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/AttendQuoteMapper.xml
@@ -282,6 +282,8 @@
LEFT JOIN hrmresource e ON e.id = t1.creator
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
index 44aaa1064..b2d30c40e 100644
--- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml
@@ -9,7 +9,7 @@
e.STATUS as status
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
- where e.status not in (7)
+ where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
@@ -20,7 +20,7 @@
e.companystartdate as companystartdate,
e.mobile as mobile
from hrmresource e
- where e.status not in (7)
+ where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
AND e.id IN
@@ -46,7 +46,7 @@
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join bill_hrmdismiss b on e.id = b.resource_n
- where e.status not in (7)
+ where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
AND e.id IN
@@ -96,7 +96,7 @@
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
- WHERE e.status not in (7)
+ WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
AND ( 1=2
@@ -157,7 +157,7 @@
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join bill_hrmdismiss b on e.id = b.resource_n
- where e.status not in (7)
+ where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
AND e.id = #{id}
@@ -193,7 +193,8 @@
a.LASTNAME as username
from hrmresource a
where
- 1 = 1
+ e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml
index 8b23e4ef8..c3f8fc96f 100644
--- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml
+++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml
@@ -506,6 +506,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.id DESC
@@ -520,6 +522,8 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
WHERE
t1.delete_type = 0 AND t2.delete_type = 0
+ AND e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t1.declare_month DESC
diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
index eee20a3b6..84b8a0d19 100644
--- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
+++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml
@@ -166,6 +166,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -242,6 +243,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -344,6 +346,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -420,6 +423,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -499,6 +503,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -553,6 +558,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -617,6 +623,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -671,6 +678,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -717,6 +725,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE CONCAT('%',#{param.employeeName},'%')
@@ -760,6 +769,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -803,6 +813,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -885,6 +896,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -949,6 +961,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
@@ -1033,6 +1046,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'||#{param.employeeName}||'%'
@@ -1097,6 +1111,7 @@
AND employee_id IN
(
SELECT id FROM hrmresource em WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND em.lastname LIKE '%'+#{param.employeeName}+'%'
diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml
index e14027ccc..50ebe2ea8 100644
--- a/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml
+++ b/src/com/engine/salary/mapper/salarysob/SalarySobRangeMapper.xml
@@ -401,7 +401,8 @@
SELECT id FROM hrmresource em
- WHERE 1=1
+ WHERE em.status not in (7)
+ and (em.accounttype is null or em.accounttype = 0)
AND ( 1=2
diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml
index 00327e607..ae917a135 100644
--- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml
+++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml
@@ -141,6 +141,8 @@
left join hrmresource e
on e.ID = t.employee_id
WHERE t.delete_type = 0
+ and e.status not in (7)
+ and (e.accounttype is null or e.accounttype = 0)
ORDER BY t.update_time DESC
@@ -201,6 +203,7 @@
ON e.ID = l.resource_n
WHERE(
e.status != '5'
+ and (e.accounttype is null or e.accounttype = 0)
OR l.dismissdate IS NULL
OR l.dismissdate = ''
OR l.dismissdate
@@ -262,6 +265,7 @@
ON e.ID = l.resource_n
WHERE(
e.status != '5'
+ and (e.accounttype is null or e.accounttype = 0)
OR l.dismissdate IS NULL
OR l.dismissdate = ''
OR l.dismissdate
@@ -604,7 +608,7 @@
LEFT JOIN bill_hrmdismiss l ON e.ID = l.resource_n
LEFT JOIN hrmdepartment d ON d.ID = e.departmentid
WHERE
- e.STATUS = 5 AND h.payment_status = 0
+ e.STATUS = 5 and (e.accounttype is null or e.accounttype = 0) AND h.payment_status = 0
AND(l.dismissdate IS NOT NULL)
)AS t
@@ -680,6 +684,7 @@
LEFT JOIN hrmdepartment d ON d.ID = e.departmentid
WHERE
e.STATUS not in (4,5,6,7)
+ and (e.accounttype is null or e.accounttype = 0)
AND(
l.dismissdate IS NULL OR l.dismissdate = ''
diff --git a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml
index 0be69bf8f..91d0ef2ce 100644
--- a/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml
+++ b/src/com/engine/salary/mapper/siarchives/SocialSchemeMapper.xml
@@ -273,9 +273,8 @@
LEFT JOIN hrsa_other_archives e ON a.id = e.employee_id
LEFT JOIN bill_hrmdismiss f on a.id = f.resource_n
WHERE
--- c.delete_type = 0 AND d.delete_type = 0
--- AND e.delete_type = 0
- 1 = 1
+ a.status not in (7)
+ and (a.accounttype is null or a.accounttype = 0)
ORDER BY a.id asc