Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
6f9bf12e
Commit
6f9bf12e
authored
Aug 18, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
有工资无社保 & 最低工资提醒 & 代码优化
parent
9ea9c330
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
34 deletions
+39
-34
SysMessageSalaryMapper.xml
...-biz/src/main/resources/mapper/SysMessageSalaryMapper.xml
+1
-1
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+38
-33
No files found.
yifu-salary/yifu-salary-biz/src/main/resources/mapper/SysMessageSalaryMapper.xml
View file @
6f9bf12e
...
@@ -194,7 +194,7 @@
...
@@ -194,7 +194,7 @@
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
WHERE
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
and a.SE
TTLEMENT
_MONTH = #{settleMonth}
and a.SE
ND
_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4)
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
) b
) b
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
6f9bf12e
...
@@ -272,40 +272,45 @@
...
@@ -272,40 +272,45 @@
<select
id=
"getLastMonthTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
<select
id=
"getLastMonthTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
select a.EMP_ID employee_id
select a.EMP_ID employee_id
, a.EMP_IDCARD employee_id_card
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, a.EMP_NAME employee_name
, a.relaySalary
relay_salary
, GROUP_CONCAT(a.relaySalary)
relay_salary
, s.CREATE_USER
CREATE_USER_ID
, a.CREATE_BY
CREATE_USER_ID
, a.SALARY_DATE
month
, GROUP_CONCAT(a.SALARY_MONTH)
month
, a.EMP_NAME employee_name
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, a.EMP_IDCARD employee_id_card
, s.DEPART_ID
settle_domain_id
, a.DEPT_ID
settle_domain_id
, s.DEPART_NAME
SETTLEMENT_ORGAN_NAME
, a.DEPT_NAME
SETTLEMENT_ORGAN_NAME
, s.DEPART_NO
SETTLEMENT_ORGAN_NO
, a.DEPT_NO
SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
, a.SETTLEMENT_MONTH SETTLE_MONTH
from (
from (
select a.id
select a.id
, a.SALARY_FORM_ID
, s.DEPT_ID
, a.EMP_ID
, s.DEPT_NAME
, DISTINCT(a.EMP_IDCARD)
, s.DEPT_NO
, a.EMP_NAME
, s.CREATE_BY
, a.SALARY_DATE
, a.SALARY_FORM_ID
, a.SETTLEMENT_MONTH
, a.EMP_ID
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, a.EMP_IDCARD
, sum(if(item.JAVA_FIED_NAME in
, a.EMP_NAME
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
, a.SALARY_MONTH
item.SALARY_MONEY, 0)) social
, a.SETTLEMENT_MONTH
from hr_salary.t_salary_account a
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
left join hr_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
, sum(if(item.JAVA_FIED_NAME in
where
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
<!-- a.SETTLEMENT_MONTH = '202006' and EMP_ID='1242371741017026561' -->
item.SALARY_MONEY, 0)) social
a.SETTLEMENT_MONTH in ( #{month} , #{month2} , #{month3})
from mvp_salary.t_salary_account a
and a.DELETE_FLAG = 0
left join mvp_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
GROUP BY a.EMP_IDCARD, a.SALARY_DATE
LEFT JOIN mvp_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
) a
LEFT JOIN hr_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where a.relaySalary > 0
and a.social = 0
where
a.DELETE_FLAG = 0
and s.send_month in ( #{month} , #{month2} , #{month3})
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD, a.SALARY_MONTH limit 10
) a
where a.relaySalary > 0
and a.social = 0
GROUP BY a.EMP_IDCARD HAVING count(1) = 3
</select>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment