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 @@
LEFT JOIN t_salary_account_item l ON l.SALARY_ACCOUNT_ID = a.id and l.JAVA_FIED_NAME = 'relaySalary'
WHERE
a.DELETE_FLAG = 0
and a.SE
TTLEMENT
_MONTH = #{settleMonth}
and a.SE
ND
_MONTH = #{settleMonth}
AND s.STATUS IN (3, 4)
GROUP BY a.EMP_IDCARD,a.SALARY_DATE
) b
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
6f9bf12e
...
...
@@ -272,40 +272,45 @@
<select
id=
"getLastMonthTHaveSalaryNosocial"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial"
>
select a.EMP_ID employee_id
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, a.relaySalary
relay_salary
, s.CREATE_USER
CREATE_USER_ID
, a.SALARY_DATE
month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, s.DEPART_ID
settle_domain_id
, s.DEPART_NAME
SETTLEMENT_ORGAN_NAME
, s.DEPART_NO
SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
, a.EMP_IDCARD employee_id_card
, a.EMP_NAME employee_name
, GROUP_CONCAT(a.relaySalary)
relay_salary
, a.CREATE_BY
CREATE_USER_ID
, GROUP_CONCAT(a.SALARY_MONTH)
month
, a.EMP_NAME employee_name
, a.EMP_IDCARD employee_id_card
, a.DEPT_ID
settle_domain_id
, a.DEPT_NAME
SETTLEMENT_ORGAN_NAME
, a.DEPT_NO
SETTLEMENT_ORGAN_NO
, a.SETTLEMENT_MONTH SETTLE_MONTH
from (
select a.id
, a.SALARY_FORM_ID
, a.EMP_ID
, DISTINCT(a.EMP_IDCARD)
, a.EMP_NAME
, a.SALARY_DATE
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from hr_salary.t_salary_account a
left join hr_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
where
<!-- a.SETTLEMENT_MONTH = '202006' and EMP_ID='1242371741017026561' -->
a.SETTLEMENT_MONTH in ( #{month} , #{month2} , #{month3})
and a.DELETE_FLAG = 0
GROUP BY a.EMP_IDCARD, a.SALARY_DATE
) a
LEFT JOIN hr_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
where a.relaySalary > 0
and a.social = 0
select a.id
, s.DEPT_ID
, s.DEPT_NAME
, s.DEPT_NO
, s.CREATE_BY
, a.SALARY_FORM_ID
, a.EMP_ID
, a.EMP_IDCARD
, a.EMP_NAME
, a.SALARY_MONTH
, a.SETTLEMENT_MONTH
, if(item.JAVA_FIED_NAME = 'relaySalary', item.SALARY_MONEY, 0) relaySalary
, sum(if(item.JAVA_FIED_NAME in
('unitSocial', 'personalSocial', 'withholidingUnitSocial', 'withholidingPersonSocial'),
item.SALARY_MONEY, 0)) social
from mvp_salary.t_salary_account a
left join mvp_salary.t_salary_account_item item on item.SALARY_ACCOUNT_ID = a.id
LEFT JOIN mvp_salary.t_salary_standard s on a.SALARY_FORM_ID = s.id
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>
</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