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
96ba70b5
Commit
96ba70b5
authored
Nov 23, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
e582ef85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
9 deletions
+46
-9
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
+46
-9
No files found.
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
View file @
96ba70b5
...
@@ -7,7 +7,9 @@ import java.text.SimpleDateFormat;
...
@@ -7,7 +7,9 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -25,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -25,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.bean.sbgjj.SbgjjAdminCbry
;
import
cn.timer.api.bean.sbgjj.SbgjjAdminCbry
;
...
@@ -59,6 +63,7 @@ import cn.timer.api.dto.sbgjj.SocialfundDto;
...
@@ -59,6 +63,7 @@ import cn.timer.api.dto.sbgjj.SocialfundDto;
import
cn.timer.api.dto.sbgjj.StopimmediatelyDto
;
import
cn.timer.api.dto.sbgjj.StopimmediatelyDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDtoListDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDtoListDto
;
import
cn.timer.api.dto.xcgl.ImportDescriptionDto
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
...
@@ -1521,25 +1526,57 @@ public class SocialSecurityFundController {
...
@@ -1521,25 +1526,57 @@ public class SocialSecurityFundController {
@ApiOperationSupport
(
order
=
40
)
@ApiOperationSupport
(
order
=
40
)
public
Result
<
Object
>
Verifytheinsured
(
@CurrentUser
UserBean
userBean
,
@RequestBody
VerifyInsuredDtoListDto
verinlist
)
{
public
Result
<
Object
>
Verifytheinsured
(
@CurrentUser
UserBean
userBean
,
@RequestBody
VerifyInsuredDtoListDto
verinlist
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
List
<
YgglMainEmp
>
ygs
=
new
ArrayList
<
YgglMainEmp
>();
List
<
YgglMainEmp
>
ygs
=
new
ArrayList
<
YgglMainEmp
>();
VerifyInsuredDto
[]
verin
=
verinlist
.
getVerin
();
VerifyInsuredDto
[]
verin
=
verinlist
.
getVerin
();
if
(
verin
.
length
>
0
){
if
(
verin
.
length
>
0
){
for
(
int
n
=
0
;
n
<
verin
.
length
;
n
++){
for
(
int
n
=
0
;
n
<
verin
.
length
;
n
++){
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
verin
[
n
].
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
verin
[
n
].
getPhone
())
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
yg
!=
null
)
{
String
name
=
verin
[
n
].
getEmpname
();
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
();
ygl
.
setName
(
yg
.
getName
());
try
{
ygl
.
setEmpNum
(
yg
.
getEmpNum
());
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
verin
[
n
].
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
verin
[
n
].
getPhone
())
ygs
.
add
(
ygl
);
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
yg
!=
null
)
{
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
();
ygl
.
setName
(
yg
.
getName
());
ygl
.
setEmpNum
(
yg
.
getEmpNum
());
ygs
.
add
(
ygl
);
toinsert
++;
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"该员工不存在"
);
reasons
.
add
(
map
);
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
reasons
.
add
(
map
);
}
}
}
}
}
}
return
ResultUtil
.
data
(
ygs
,
"成功"
);
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
// return ResultUtil.data(ygs, "成功");
return
ResultUtil
.
datas
(
ygs
,
imds
,
"成功"
);
}
}
...
...
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