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
9232d95d
Commit
9232d95d
authored
4 years ago
by
mobh
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
4e3449a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
98 deletions
+120
-98
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+119
-97
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 @
9232d95d
...
...
@@ -159,31 +159,31 @@ public class SalaryManagementController {
//考勤组
@
Autowired
@
Resource
private
AttendanceGroupMapper
attendancegroupservice
;
//打卡明细表
@
Autowired
@
Resource
private
PunchCardDetailsMapper
punchcarddetailsservice
;
//打卡记录
@
Autowired
@
Resource
private
PunchRecordMapper
punchrecordservice
;
@
Autowired
@
Resource
private
SpecialDateMapper
specialdateservice
;
//考勤周排班
@
Autowired
@
Resource
private
AttendanceWeeklySchMapper
attendanceweeklyschservice
;
//排班明细
@
Autowired
@
Resource
private
ScheduleMapper
scheduleservice
;
//专项附加扣除
@
Autowired
@
Resource
private
XcglAssoZxfjkcMapper
xcglassozxfjkcmapper
;
//工资条组内成员状态
@
Autowired
@
Resource
private
XcglAssoGztztMapper
xcglassogztztmapper
;
//工资条组-设置
@
Autowired
@
Resource
private
XcglAssoGztszMapper
xcglassogztszmapper
;
static
SimpleDateFormat
mat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -1455,20 +1455,20 @@ public class SalaryManagementController {
*/
@PostMapping
(
value
=
"/payimport"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
ImportSalaryDto
[]
ims
=
impor
.
getImsalary
();
//
if
(
ims
.
length
>
0
){
for
(
int
p
=
0
;
p
<
ims
.
length
;
p
++){
public
Result
<
ImportDescriptionDto
>
ImportSalaryData
(
@CurrentUser
UserBean
userBean
,
@RequestBody
ImportSalarySetDto
impor
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
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
())
.
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
)
{
XcglAssoXzb
xzb
=
XcglAssoXzb
.
builder
().
build
();
xzb
.
setUserid
(
xzuryone
.
getUserid
());
//
...
...
@@ -1477,21 +1477,24 @@ public class SalaryManagementController {
xzb
.
setXzxjg
(
ims
[
p
].
getSrz
());
//
xzb
.
setQyid
(
userBean
.
getOrgCode
());
xcglassoxzbmapper
.
ModifyImportedSalary
(
xzb
);
k
++;
toupdate
++;
}
// if(yhmpp != null && k == 0) {
// XcglAssoXzb xzb = XcglAssoXzb.builder().build();
// xzb.setUserid(yhmpp.getUserid());//
// xzb.setXzyf(impor.getSxrq());//
// xzb.setXzxid(ims[p].getJsgzzx());//
// xzb.setXzxjg(Double.valueOf(ims[p].getSrz()));//
// xzb.setQyid(userBean.getOrgCode());
// xcglassoxzbmapper.ModifyImportedSalary(xzb);
// }
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
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"
)
...
...
@@ -3193,81 +3196,100 @@ public class SalaryManagementController {
*/
@PostMapping
(
value
=
"/import_special_additional_deduction"
)
@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
{
Integer
orgCode
=
userBean
.
getOrgCode
();
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
SpecialDeductionDto
spec
:
specialdeductiondto
)
{
String
name
=
spec
.
getName
();
String
phone
=
spec
.
getPhone
();
String
date
=
spec
.
getDate
();
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
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
fjkc
.
setTotalmoney
(
Double
.
valueOf
(
result
));
//累计专项附加扣除
xcglassozxfjkcmapper
.
updateXcglAssoZxfjkc
(
fjkc
);
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
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
()));
if
(
xcg
==
null
)
{
XcglAssoZxfjkc
xcglas
=
XcglAssoZxfjkc
.
builder
().
build
();
xcglas
.
setUserid
(
ygl
.
getEmpNum
());
xcglas
.
setTaxmonth
(
date
);
xcglas
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
xcglas
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
xcglas
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
xcglas
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
xcglas
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
xcglas
.
setTotalmoney
(
result
);
//累计专项附加扣除
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
toinsert
++;
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
fjkc
.
setChildrenedu
(
Double
.
valueOf
(
spec
.
getZljy
()));
//子女教育
fjkc
.
setHouseloans
(
Double
.
valueOf
(
spec
.
getZfdk
()));
//住房贷款利息
fjkc
.
setHouserents
(
Double
.
valueOf
(
spec
.
getZfzj
()));
//住房租金
fjkc
.
setSupportolder
(
Double
.
valueOf
(
spec
.
getSylr
()));
//赡养老人
fjkc
.
setContinueedu
(
Double
.
valueOf
(
spec
.
getJxjy
()));
//继续教育
BigDecimal
num1
=
new
BigDecimal
(
spec
.
getZljy
());
BigDecimal
num2
=
new
BigDecimal
(
spec
.
getZfdk
());
double
result1
=
num1
.
add
(
num2
).
doubleValue
();
BigDecimal
num3
=
new
BigDecimal
(
result1
);
BigDecimal
num4
=
new
BigDecimal
(
spec
.
getZfzj
());
double
result2
=
num3
.
add
(
num4
).
doubleValue
();
BigDecimal
num5
=
new
BigDecimal
(
result2
);
BigDecimal
num6
=
new
BigDecimal
(
spec
.
getSylr
());
double
result3
=
num5
.
add
(
num6
).
doubleValue
();
BigDecimal
num7
=
new
BigDecimal
(
result3
);
BigDecimal
num8
=
new
BigDecimal
(
spec
.
getJxjy
());
double
result
=
num7
.
add
(
num8
).
doubleValue
();
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
);
}
}
return
ResultUtil
.
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
,
"成功"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
9232d95d
...
...
@@ -253,7 +253,7 @@ public class YgglController {
String
phone
=
addygdaDto
.
getPhone
();
Integer
zjType
=
addygdaDto
.
getZjType
();
String
zjNum
=
addygdaDto
.
getZjNum
();
int
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
Integer
attgroupid
=
addygdaDto
.
getAttgroupid
();
//考勤组id
boolean
isvalid
=
true
;
switch
(
zjType
)
{
case
0
:
...
...
This diff is collapsed.
Click to expand it.
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