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
7dd42df7
Commit
7dd42df7
authored
Nov 05, 2020
by
mobh
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
81e3a48f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
36 deletions
+51
-36
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+28
-31
src/main/java/cn/timer/api/dto/xcgl/ImportDescriptionDto.java
+23
-5
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
7dd42df7
...
...
@@ -11,6 +11,8 @@ import javax.script.ScriptEngineManager;
import
javax.script.ScriptException
;
import
cn.timer.api.dto.xcgl.*
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
lombok.SneakyThrows
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -3280,29 +3282,25 @@ public class SalaryManagementController {
Integer
orgCode
=
userBean
.
getOrgCode
();
int
success
=
0
;
//成功
int
failure
=
0
;
//失败
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
String
[]
names
=
new
String
[
individualtaxdetailsdto
.
size
()];
int
i
=
0
;
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
IndividualTaxDetailsDto
indv
:
individualtaxdetailsdto
)
{
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
getTaxMonth
()+
"-01 00:00:00"
);
}
String
name
=
indv
.
getUserName
();
String
userName
=
indv
.
getUserName
();
String
phone
=
indv
.
getPhone
();
String
date
=
indv
.
getSalaryMonth
();
//薪资月
String
date
=
indv
.
getSalaryMonth
();
//薪资月
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
name
)
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
getTaxMonth
()+
"-01 00:00:00"
);
}
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
userName
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(
ygl
!=
null
)
{
...
...
@@ -3337,7 +3335,7 @@ public class SalaryManagementController {
gsgs
.
setCumYbtse
(
indv
.
getCumYbtse
()
==
null
?
null
:
Double
.
valueOf
(
indv
.
getCumYbtse
()));
gsgs
.
setQyid
(
ygl
.
getOrgCode
());
gsgs
.
insert
();
success
++;
toinsert
++;
}
else
{
XcglAssoGsjsmx
gsgs
=
XcglAssoGsjsmx
.
builder
().
build
();
gsgs
.
setUserNum
(
String
.
valueOf
(
ygl
.
getEmpNum
()));
...
...
@@ -3371,27 +3369,26 @@ public class SalaryManagementController {
}
}
else
{
failure
++;
int
j
=
5
/
0
;
map
.
put
(
"name"
,
userName
);
map
.
put
(
"msg"
,
"员工不存在"
);
}
}
catch
(
Exception
e
)
{
// e.printStackTrace();
names
[
i
]
=
indv
.
getUserName
();
i
++;
failure
++;
map
.
put
(
"name"
,
userName
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
}
finally
{
reasons
.
add
(
map
);
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
success
);
//成功
imds
.
set
Failure
(
failure
);
//失败
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
set
Toinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setNames
(
ClockInTool
.
deleteArrayNull
(
names
));
return
ResultUtil
.
data
(
imds
,
"编辑员工权限成功"
);
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
// return ResultUtil.success("成功
");
return
ResultUtil
.
data
(
imds
,
"导入个税明细
"
);
}
...
...
src/main/java/cn/timer/api/dto/xcgl/ImportDescriptionDto.java
View file @
7dd42df7
...
...
@@ -4,13 +4,31 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
import
java.util.Map
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ImportDescriptionDto
{
int
success
=
0
;
//成功
int
failure
=
0
;
//失败
int
toupdate
=
0
;
//更新
String
[]
names
;
/**
* 成功(包含新增和更新)
*/
int
success
=
0
;
/**
* 成功新增
*/
int
toinsert
=
0
;
/**
* 成功更新
*/
int
toupdate
=
0
;
/**
* 失败
*/
int
failure
=
0
;
/**
* 失败原因
*/
List
<
Map
<
String
,
String
>>
reasons
;
}
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