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
e6005286
Commit
e6005286
authored
Nov 06, 2020
by
ilal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into develop
parents
fb5903e8
1211ee25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
140 deletions
+120
-140
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+119
-139
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+1
-1
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
e6005286
...
@@ -159,31 +159,31 @@ public class SalaryManagementController {
...
@@ -159,31 +159,31 @@ public class SalaryManagementController {
//考勤组
//考勤组
@
Autowired
@
Resource
private
AttendanceGroupMapper
attendancegroupservice
;
private
AttendanceGroupMapper
attendancegroupservice
;
//打卡明细表
//打卡明细表
@
Autowired
@
Resource
private
PunchCardDetailsMapper
punchcarddetailsservice
;
private
PunchCardDetailsMapper
punchcarddetailsservice
;
//打卡记录
//打卡记录
@
Autowired
@
Resource
private
PunchRecordMapper
punchrecordservice
;
private
PunchRecordMapper
punchrecordservice
;
@
Autowired
@
Resource
private
SpecialDateMapper
specialdateservice
;
private
SpecialDateMapper
specialdateservice
;
//考勤周排班
//考勤周排班
@
Autowired
@
Resource
private
AttendanceWeeklySchMapper
attendanceweeklyschservice
;
private
AttendanceWeeklySchMapper
attendanceweeklyschservice
;
//排班明细
//排班明细
@
Autowired
@
Resource
private
ScheduleMapper
scheduleservice
;
private
ScheduleMapper
scheduleservice
;
//专项附加扣除
//专项附加扣除
@
Autowired
@
Resource
private
XcglAssoZxfjkcMapper
xcglassozxfjkcmapper
;
private
XcglAssoZxfjkcMapper
xcglassozxfjkcmapper
;
//工资条组内成员状态
//工资条组内成员状态
@
Autowired
@
Resource
private
XcglAssoGztztMapper
xcglassogztztmapper
;
private
XcglAssoGztztMapper
xcglassogztztmapper
;
//工资条组-设置
//工资条组-设置
@
Autowired
@
Resource
private
XcglAssoGztszMapper
xcglassogztszmapper
;
private
XcglAssoGztszMapper
xcglassogztszmapper
;
static
SimpleDateFormat
mat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
static
SimpleDateFormat
mat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
@@ -1455,20 +1455,20 @@ public class SalaryManagementController {
...
@@ -1455,20 +1455,20 @@ public class SalaryManagementController {
*/
*/
@PostMapping
(
value
=
"/payimport"
)
@PostMapping
(
value
=
"/payimport"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
public
Result
<
ImportDescriptionDto
>
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
int
toinsert
=
0
;
//新增
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
int
toupdate
=
0
;
//更新
if
(
ims
.
length
>
0
){
int
failure
=
0
;
//失败
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++){
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
)
{
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++)
{
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
String
name
=
ims
[
0
].
getUsername
();
try
{
//用户工号来匹配入库
//用户工号来匹配入库
XcglAssoXzury
xzuryone
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
())
XcglAssoXzury
xzuryone
=
new
LambdaQueryChainWrapper
<
XcglAssoXzury
>(
xcglassoxzurymapper
).
eq
(
XcglAssoXzury:
:
getQyid
,
userBean
.
getOrgCode
())
.
eq
(
XcglAssoXzury:
:
getXzzid
,
impor
.
getGid
()).
eq
(
XcglAssoXzury:
:
getUserid
,
ims
[
p
].
getUsernum
()).
one
();
.
eq
(
XcglAssoXzury:
:
getXzzid
,
impor
.
getGid
()).
eq
(
XcglAssoXzury:
:
getUserid
,
ims
[
p
].
getUsernum
()).
one
();
//用户名称来匹配入库
// XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
int
k
=
0
;
if
(
xzuryone
!=
null
)
{
if
(
xzuryone
!=
null
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
...
@@ -1477,21 +1477,24 @@ public class SalaryManagementController {
...
@@ -1477,21 +1477,24 @@ public class SalaryManagementController {
xzb
.
setXzxjg
(
ims
[
p
].
getSrz
());
//
xzb
.
setXzxjg
(
ims
[
p
].
getSrz
());
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
k
++;
toupdate
++;
}
}
// if(yhmpp != null && k == 0) {
}
catch
(
Exception
e
)
{
// XcglAssoXzb xzb = XcglAssoXzb.builder().build();
failure
++;
// xzb.setUserid(yhmpp.getUserid());//
map
.
put
(
"name"
,
name
);
// xzb.setXzyf(impor.getSxrq());//
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
// xzb.setXzxid(ims[p].getJsgzzx());//
}
finally
{
// xzb.setXzxjg(Double.valueOf(ims[p].getSrz()));//
reasons
.
add
(
map
);
// xzb.setQyid(userBean.getOrgCode());
// xcglassoxzbmapper.ModifyImportedSalary(xzb);
// }
}
}
}
}
return
new
ResponseResult
().
success
(
"导入成功"
);
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
return
ResultUtil
.
data
(
imds
,
"导入成功"
);
}
}
@PostMapping
(
value
=
"/determinesalaryrules"
)
@PostMapping
(
value
=
"/determinesalaryrules"
)
...
@@ -3193,81 +3196,100 @@ public class SalaryManagementController {
...
@@ -3193,81 +3196,100 @@ public class SalaryManagementController {
*/
*/
@PostMapping
(
value
=
"/import_special_additional_deduction"
)
@PostMapping
(
value
=
"/import_special_additional_deduction"
)
@ApiOperation
(
value
=
"导入专项附加扣除"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"导入专项附加扣除"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
JSONObject
>
importSpecialAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
public
Result
<
ImportDescriptionDto
>
importSpecialAdditionalDeduction
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
SpecialDeductionDto
>
specialdeductiondto
)
throws
Exception
{
@Validated
@RequestBody
ValidList
<
SpecialDeductionDto
>
specialdeductiondto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
orgCode
=
userBean
.
getOrgCode
();
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
SpecialDeductionDto
spec
:
specialdeductiondto
)
{
for
(
SpecialDeductionDto
spec
:
specialdeductiondto
)
{
String
name
=
spec
.
getName
();
String
name
=
spec
.
getName
();
String
phone
=
spec
.
getPhone
();
String
phone
=
spec
.
getPhone
();
String
date
=
spec
.
getDate
();
String
date
=
spec
.
getDate
();
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
try
{
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
XcglAssoZxfjkc
xcg
=
XcglAssoZxfjkc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoZxfjkc
>().
lambda
().
eq
(
XcglAssoZxfjkc:
:
getTaxmonth
,
date
)
.
eq
(
XcglAssoZxfjkc:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoZxfjkc:
:
getUserid
,
ygl
.
getEmpNum
()));
XcglAssoZxfjkc
xcg
=
XcglAssoZxfjkc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoZxfjkc
>().
lambda
().
eq
(
XcglAssoZxfjkc:
:
getTaxmonth
,
date
)
.
eq
(
XcglAssoZxfjkc:
:
getQyid
,
userBean
.
getOrgCode
()).
eq
(
XcglAssoZxfjkc:
:
getUserid
,
ygl
.
getEmpNum
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
if
(
xcg
==
null
)
{
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
BigDecimal
num3
=
new
BigDecimal
(
result1
);
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
BigDecimal
num3
=
new
BigDecimal
(
result1
);
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
BigDecimal
num5
=
new
BigDecimal
(
result2
);
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
BigDecimal
num7
=
new
BigDecimal
(
result3
);
double
result
=
num7
.
add
(
num8
).
doubleValue
();
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
xcglas
.
setAddtime
(
new
Date
().
getTime
());
}
else
{
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
toinsert
++;
fjkc
.
setId
(
xcg
.
getId
());
}
else
{
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
BigDecimal
num5
=
new
BigDecimal
(
result2
);
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
BigDecimal
num7
=
new
BigDecimal
(
result3
);
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
toupdate
++;
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
return
ResultUtil
.
success
(
"成功"
);
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
return
ResultUtil
.
data
(
imds
,
"成功"
);
}
}
...
@@ -3765,54 +3787,12 @@ public class SalaryManagementController {
...
@@ -3765,54 +3787,12 @@ public class SalaryManagementController {
}
}
spe
.
setDetailed
(
detailed
);
spe
.
setDetailed
(
detailed
);
}
}
specific
.
add
(
spe
);
specific
.
add
(
spe
);
}
}
top
.
setSpecific
(
specific
);
top
.
setSpecific
(
specific
);
}
}
}
}
return
ResultUtil
.
data
(
top
,
"操作成功!"
);
return
ResultUtil
.
data
(
top
,
"操作成功!"
);
}
}
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
e6005286
...
@@ -253,7 +253,7 @@ public class YgglController {
...
@@ -253,7 +253,7 @@ public class YgglController {
String
phone
=
addygdaDto
.
getPhone
();
String
phone
=
addygdaDto
.
getPhone
();
Integer
zjType
=
addygdaDto
.
getZjType
();
Integer
zjType
=
addygdaDto
.
getZjType
();
String
zjNum
=
addygdaDto
.
getZjNum
();
String
zjNum
=
addygdaDto
.
getZjNum
();
int
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
Integer
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
boolean
isvalid
=
true
;
boolean
isvalid
=
true
;
switch
(
zjType
)
{
switch
(
zjType
)
{
case
0
:
case
0
:
...
...
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