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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
79 deletions
+59
-79
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+58
-78
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 {
//考勤组
@
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
)
{
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
++){
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
++;
}
// 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);
// }
toupdate
++;
}
}
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,16 +3196,21 @@ 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
();
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
));
...
...
@@ -3238,6 +3246,7 @@ public class SalaryManagementController {
xcglas
.
setQyid
(
userBean
.
getOrgCode
());
xcglas
.
setAddtime
(
new
Date
().
getTime
());
xcglassozxfjkcmapper
.
insertXcglAssoZxfjkc
(
xcglas
);
toinsert
++;
}
else
{
XcglAssoZxfjkc
fjkc
=
XcglAssoZxfjkc
.
builder
().
build
();
fjkc
.
setId
(
xcg
.
getId
());
...
...
@@ -3264,10 +3273,23 @@ public class SalaryManagementController {
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
,
"成功"
);
}
...
...
@@ -3765,54 +3787,12 @@ public class SalaryManagementController {
}
spe
.
setDetailed
(
detailed
);
}
specific
.
add
(
spe
);
}
top
.
setSpecific
(
specific
);
}
}
return
ResultUtil
.
data
(
top
,
"操作成功!"
);
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
e6005286
...
...
@@ -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
:
...
...
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