Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
2cd47022
Commit
2cd47022
authored
Oct 15, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
85603177
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
+4
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+17
-7
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
View file @
2cd47022
...
...
@@ -73,6 +73,9 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
@ApiModelProperty
(
value
=
"所属月份时间"
,
example
=
"2019-12"
)
private
String
monthtime
;
@ApiModelProperty
(
value
=
"算薪月份"
,
example
=
"2019-12"
)
private
String
salarymonth
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
2cd47022
...
...
@@ -308,6 +308,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
paygro
.
getXzyf
());
//薪资月份
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//开始);//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
...
...
@@ -724,6 +725,7 @@ public class SalaryManagementController {
xcglxzz
.
setPxfs
(
paygro
.
getPxfs
());
// 选择配薪方式(0:空白模板;df:默认)
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setId
(
paygro
.
getId
());
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcglxzz
.
updateById
();
int
payid
=
paygro
.
getId
();
xcglassoxzurymapper
.
xzurydelete
(
payid
);
...
...
@@ -1287,9 +1289,11 @@ public class SalaryManagementController {
/**
* (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
*/
@GetMapping
(
value
=
"/calculatesalary/{id}
/{sxrq}
"
)
@GetMapping
(
value
=
"/calculatesalary/{id}"
)
@ApiOperation
(
value
=
"计算薪资"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
ResponseResult
CalculateSalary
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
String
sxrq
)
{
public
ResponseResult
CalculateSalary
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
String
sxrq
=
""
;
//typeid--1:计算 2:重新计算
//已知薪资组id****
...
...
@@ -1303,6 +1307,7 @@ public class SalaryManagementController {
//薪资组信息
@SuppressWarnings
(
"unused"
)
XcglAdminXzz
xzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getId
,
id
).
one
();
sxrq
=
xzz
.
getSalarymonth
();
//当前薪资组内人员
List
<
XcglAssoXzury
>
znrys
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getXzzid
,
id
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
list
();
List
<
CalculationDto
>
jswsj
=
null
;
...
...
@@ -1478,7 +1483,7 @@ public class SalaryManagementController {
/**
* 计算薪资
* 计算薪资
!@#$%^&*()_+
* @param userBean
* @param calcomtiondto
* @return
...
...
@@ -1488,21 +1493,25 @@ public class SalaryManagementController {
public
Result
<
Object
>
SalaryCalculation
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CalculatingCompensationDto
calcomtiondto
)
{
//#1、计算个税 (薪资组id、薪资月份)
//薪资组信息
XcglAdminXzz
xzz
=
XcglAdminXzz
.
builder
().
id
(
calcomtiondto
.
getPay_group_id
()).
build
().
selectById
();
String
start
=
xzz
.
getPayrollcycle
().
substring
(
0
,
10
);
//开始
String
end
=
xzz
.
getPayrollcycle
().
substring
(
11
,
21
);
//结束
//查询出薪资组内成员
List
<
XcglAssoXzury
>
paygrlist
=
XcglAssoXzury
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoXzury
>().
lambda
().
eq
(
XcglAssoXzury:
:
getXzzid
,
calcomtiondto
.
getPay_group_id
()));
int
[]
noperincuser
=
new
int
[
paygrlist
.
size
()];
//用来储存没有个税的用户id
String
[]
noperincuser
=
new
String
[
paygrlist
.
size
()];
//用来储存没有个税的用户id
int
i
=
0
;
for
(
XcglAssoXzury
pag
:
paygrlist
)
{
XcglAssoGsjsmx
gsjs
=
XcglAssoGsjsmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoGsjsmx
>().
lambda
().
eq
(
XcglAssoGsjsmx:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoGsjsmx:
:
getUserNum
,
pag
.
getUserid
())
.
eq
(
XcglAssoGsjsmx:
:
getSalaryMonth
,
calcomtiondto
.
getSalary_month
()));
if
(
gsjs
==
null
)
{
noperincuser
[
i
]
=
pag
.
getUserid
(
);
noperincuser
[
i
]
=
String
.
valueOf
(
pag
.
getUserid
()
);
i
++;
}
}
//循环计算当前薪资月没有个税的用户
for
(
int
gsus
:
noperincuser
)
{
//循环计算当前薪资月没有个税的用户
根据
for
(
String
gsus
:
ClockInTool
.
deleteArrayNull
(
noperincuser
)
)
{
// XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().
}
...
...
@@ -1586,6 +1595,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
budpaygr
.
getXzyf
());
//薪资月份
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
...
...
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
View file @
2cd47022
...
...
@@ -16,6 +16,7 @@
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"pxfs"
property=
"pxfs"
/>
<result
column=
"monthtime"
property=
"monthtime"
/>
<result
column=
"salarymonth"
property=
"salarymonth"
/>
</resultMap>
<resultMap
id=
"PayrollExceptionDtoMap"
type=
"cn.timer.api.dto.xcgl.PayrollExceptionDto"
>
...
...
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