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
54da3686
Commit
54da3686
authored
Oct 15, 2020
by
mobh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into dev-mobh
parents
61d2daa7
216beddf
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 @
54da3686
...
@@ -73,6 +73,9 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
...
@@ -73,6 +73,9 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
@ApiModelProperty
(
value
=
"所属月份时间"
,
example
=
"2019-12"
)
@ApiModelProperty
(
value
=
"所属月份时间"
,
example
=
"2019-12"
)
private
String
monthtime
;
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 @
54da3686
...
@@ -308,6 +308,7 @@ public class SalaryManagementController {
...
@@ -308,6 +308,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
paygro
.
getXzyf
());
//薪资月份
xcglxzz
.
setMonthtime
(
paygro
.
getXzyf
());
//薪资月份
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//开始);//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
int
payid
=
xcglxzz
.
getId
();
...
@@ -724,6 +725,7 @@ public class SalaryManagementController {
...
@@ -724,6 +725,7 @@ public class SalaryManagementController {
xcglxzz
.
setPxfs
(
paygro
.
getPxfs
());
// 选择配薪方式(0:空白模板;df:默认)
xcglxzz
.
setPxfs
(
paygro
.
getPxfs
());
// 选择配薪方式(0:空白模板;df:默认)
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setId
(
paygro
.
getId
());
xcglxzz
.
setId
(
paygro
.
getId
());
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcglxzz
.
updateById
();
xcglxzz
.
updateById
();
int
payid
=
paygro
.
getId
();
int
payid
=
paygro
.
getId
();
xcglassoxzurymapper
.
xzurydelete
(
payid
);
xcglassoxzurymapper
.
xzurydelete
(
payid
);
...
@@ -1287,9 +1289,11 @@ public class SalaryManagementController {
...
@@ -1287,9 +1289,11 @@ public class SalaryManagementController {
/**
/**
* (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
* (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
*/
*/
@GetMapping
(
value
=
"/calculatesalary/{id}
/{sxrq}
"
)
@GetMapping
(
value
=
"/calculatesalary/{id}"
)
@ApiOperation
(
value
=
"计算薪资"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@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:重新计算
//typeid--1:计算 2:重新计算
//已知薪资组id****
//已知薪资组id****
...
@@ -1303,6 +1307,7 @@ public class SalaryManagementController {
...
@@ -1303,6 +1307,7 @@ public class SalaryManagementController {
//薪资组信息
//薪资组信息
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
XcglAdminXzz
xzz
=
new
LambdaQueryChainWrapper
<
XcglAdminXzz
>(
xcgladminxzzmapper
).
eq
(
XcglAdminXzz:
:
getId
,
id
).
one
();
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
<
XcglAssoXzury
>
znrys
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getXzzid
,
id
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
()).
list
();
List
<
CalculationDto
>
jswsj
=
null
;
List
<
CalculationDto
>
jswsj
=
null
;
...
@@ -1478,7 +1483,7 @@ public class SalaryManagementController {
...
@@ -1478,7 +1483,7 @@ public class SalaryManagementController {
/**
/**
* 计算薪资
* 计算薪资
!@#$%^&*()_+
* @param userBean
* @param userBean
* @param calcomtiondto
* @param calcomtiondto
* @return
* @return
...
@@ -1488,21 +1493,25 @@ public class SalaryManagementController {
...
@@ -1488,21 +1493,25 @@ public class SalaryManagementController {
public
Result
<
Object
>
SalaryCalculation
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CalculatingCompensationDto
calcomtiondto
)
{
public
Result
<
Object
>
SalaryCalculation
(
@CurrentUser
UserBean
userBean
,
@RequestBody
CalculatingCompensationDto
calcomtiondto
)
{
//#1、计算个税 (薪资组id、薪资月份)
//#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
()));
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
;
int
i
=
0
;
for
(
XcglAssoXzury
pag
:
paygrlist
)
{
for
(
XcglAssoXzury
pag
:
paygrlist
)
{
XcglAssoGsjsmx
gsjs
=
XcglAssoGsjsmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoGsjsmx
>().
lambda
().
eq
(
XcglAssoGsjsmx:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoGsjsmx:
:
getUserNum
,
pag
.
getUserid
())
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
()));
.
eq
(
XcglAssoGsjsmx:
:
getSalaryMonth
,
calcomtiondto
.
getSalary_month
()));
if
(
gsjs
==
null
)
{
if
(
gsjs
==
null
)
{
noperincuser
[
i
]
=
pag
.
getUserid
(
);
noperincuser
[
i
]
=
String
.
valueOf
(
pag
.
getUserid
()
);
i
++;
i
++;
}
}
}
}
//循环计算当前薪资月没有个税的用户
//循环计算当前薪资月没有个税的用户
根据
for
(
int
gsus
:
noperincuser
)
{
for
(
String
gsus
:
ClockInTool
.
deleteArrayNull
(
noperincuser
)
)
{
// XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().
// XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().
}
}
...
@@ -1586,6 +1595,7 @@ public class SalaryManagementController {
...
@@ -1586,6 +1595,7 @@ public class SalaryManagementController {
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setQyid
(
orgCode
);
// 企业编码
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setAddtime
(
new
Date
().
getTime
());
// 添加时间
xcglxzz
.
setMonthtime
(
budpaygr
.
getXzyf
());
//薪资月份
xcglxzz
.
setMonthtime
(
budpaygr
.
getXzyf
());
//薪资月份
xcglxzz
.
setSalarymonth
(
payrollcycle
.
substring
(
0
,
7
));
//算薪月份
xcgladminxzzmapper
.
insert
(
xcglxzz
);
xcgladminxzzmapper
.
insert
(
xcglxzz
);
int
payid
=
xcglxzz
.
getId
();
int
payid
=
xcglxzz
.
getId
();
...
...
src/main/resources/mapping/xcgl/XcglAdminXzzMapper.xml
View file @
54da3686
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"pxfs"
property=
"pxfs"
/>
<result
column=
"pxfs"
property=
"pxfs"
/>
<result
column=
"monthtime"
property=
"monthtime"
/>
<result
column=
"monthtime"
property=
"monthtime"
/>
<result
column=
"salarymonth"
property=
"salarymonth"
/>
</resultMap>
</resultMap>
<resultMap
id=
"PayrollExceptionDtoMap"
type=
"cn.timer.api.dto.xcgl.PayrollExceptionDto"
>
<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