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
216beddf
Commit
216beddf
authored
Oct 15, 2020
by
mobh
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/lal' into develop
parents
2c95b0de
b42e7893
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
+4
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+26
-10
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAdminXzz.java
View file @
216beddf
...
...
@@ -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 @
216beddf
...
...
@@ -212,10 +212,10 @@ public class SalaryManagementController {
/**
* 获取薪资组信息
*/
@GetMapping
(
value
=
"/paylist"
)
@GetMapping
(
value
=
"/paylist
/{yemon}
"
)
@ApiOperation
(
value
=
"获取薪资组信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
ResponseResult
selectpaylist
(
@CurrentUser
UserBean
userBean
)
{
List
<
XcglAdminXzz
>
xcgladminxzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getQyid
,
userBean
.
getOrgCode
()).
list
();
public
ResponseResult
selectpaylist
(
@CurrentUser
UserBean
userBean
,
@PathVariable
String
yemon
)
{
List
<
XcglAdminXzz
>
xcgladminxzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAdminXzz:
:
getMonthtime
,
yemon
).
list
();
return
new
ResponseResult
().
success
(
"获取薪资组信息成功"
,
xcgladminxzz
);
}
...
...
@@ -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
;
...
...
@@ -1477,26 +1482,36 @@ public class SalaryManagementController {
}
/**
* 计算薪资!@#$%^&*()_+
* @param userBean
* @param calcomtiondto
* @return
*/
@PostMapping
(
value
=
"/salary_calculation"
)
@ApiOperation
(
value
=
"计算薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
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().
}
...
...
@@ -1580,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 @
216beddf
...
...
@@ -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