Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
9dd0aa39
Commit
9dd0aa39
authored
Apr 09, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.9-修改商险自动化
parent
c10b4d74
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
7 deletions
+56
-7
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+52
-5
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+4
-2
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
9dd0aa39
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper
;
...
@@ -49,6 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
...
@@ -49,6 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.ParseException
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
...
@@ -408,11 +410,16 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -408,11 +410,16 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
**/
**/
@Override
@Override
public
R
updateCommonInfo
(
EmployeeRegistrationPre
employeeRegistrationPre
)
{
public
R
updateCommonInfo
(
EmployeeRegistrationPre
employeeRegistrationPre
)
{
if
(
Common
.
isEmpty
(
employeeRegistrationPre
.
getId
()))
{
String
id
=
employeeRegistrationPre
.
getId
();
if
(
Common
.
isEmpty
(
id
))
{
return
R
.
failed
(
"请传ID"
);
return
R
.
failed
(
"请传ID"
);
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
//旧的对象,用来对比变更参数
//旧的对象,用来对比变更参数
EmployeeRegistrationPre
comparePre
=
baseMapper
.
selectById
(
employeeRegistrationPre
.
getId
()
);
EmployeeRegistrationPre
comparePre
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isEmpty
(
comparePre
))
{
if
(
Common
.
isEmpty
(
comparePre
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
}
...
@@ -420,7 +427,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -420,7 +427,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
=
new
HashMap
<>();
Map
<
String
,
TEmployeeInsurancePre
>
oldMap
=
new
HashMap
<>();
// 查原商险,来对比
// 查原商险,来对比
R
<
EmployeePreLogListVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
()
R
<
EmployeePreLogListVo
>
sdr
=
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
()
,
"/temployeeinsurancepre/inner/getListByEmpPreId"
,
employeeRegistrationPre
.
getId
()
,
EmployeePreLogListVo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/temployeeinsurancepre/inner/getListByEmpPreId"
,
id
,
EmployeePreLogListVo
.
class
,
SecurityConstants
.
FROM_IN
);
List
<
TEmployeeInsurancePre
>
oldList
=
null
;
List
<
TEmployeeInsurancePre
>
oldList
=
null
;
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
&&
sdr
.
getData
().
getPreList
()
!=
null
&&
!
sdr
.
getData
().
getPreList
().
isEmpty
())
{
if
(
sdr
!=
null
&&
sdr
.
getData
()
!=
null
&&
sdr
.
getData
().
getPreList
()
!=
null
&&
!
sdr
.
getData
().
getPreList
().
isEmpty
())
{
oldList
=
sdr
.
getData
().
getPreList
();
oldList
=
sdr
.
getData
().
getPreList
();
...
@@ -448,6 +455,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -448,6 +455,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if
(
Common
.
isNotNull
(
insurancePreVo
.
getId
()))
{
if
(
Common
.
isNotNull
(
insurancePreVo
.
getId
()))
{
newMap
.
put
(
insurancePreVo
.
getId
(),
insurancePreVo
);
newMap
.
put
(
insurancePreVo
.
getId
(),
insurancePreVo
);
}
}
// 初始化信息
initInsurancePreInfo
(
employeeRegistrationPre
,
insurancePreVo
,
user
,
id
);
// 1:重复性判断
// 1:重复性判断
key
=
this
.
getFiveKey
(
insurancePreVo
);
key
=
this
.
getFiveKey
(
insurancePreVo
);
newDeptNo
=
insurancePreVo
.
getDeptNo
();
newDeptNo
=
insurancePreVo
.
getDeptNo
();
...
@@ -611,9 +620,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -611,9 +620,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
}
}
}
}
YifuUser
user
=
SecurityUtils
.
getUser
();
try
{
try
{
baseMapper
.
updateById
(
employeeRegistrationPre
);
baseMapper
.
updateById
(
employeeRegistrationPre
);
if
(
null
!=
natureItemBefore
)
{
if
(
null
!=
natureItemBefore
)
{
comparePre
.
setEmpNature
(
natureItemBefore
);
comparePre
.
setEmpNature
(
natureItemBefore
);
...
@@ -643,6 +650,46 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -643,6 +650,46 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return
R
.
ok
();
return
R
.
ok
();
}
}
private
void
initInsurancePreInfo
(
EmployeeRegistrationPre
registration
,
TEmployeeInsurancePre
preVo
,
YifuUser
user
,
String
id
)
{
preVo
.
setRegisterId
(
id
);
preVo
.
setCustomerUsername
(
registration
.
getCustomerUsername
());
preVo
.
setCustomerUserLoginname
(
registration
.
getCustomerUserLoginname
());
preVo
.
setDeptName
(
registration
.
getDeptName
());
preVo
.
setDeptId
(
registration
.
getDeptId
());
preVo
.
setDataSource
(
registration
.
getDataSource
());
preVo
.
setPosition
(
registration
.
getPosition
());
preVo
.
setJoinLeaveDate
(
registration
.
getJoinLeaveDate
());
preVo
.
setDeptNo
(
registration
.
getDeptNo
());
preVo
.
setEmpPhone
(
registration
.
getEmpPhone
());
preVo
.
setEmployeeName
(
registration
.
getEmployeeName
());
preVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
preVo
.
setCreateBy
(
user
.
getId
());
preVo
.
setCreateName
(
user
.
getNickname
());
preVo
.
setUpdateBy
(
user
.
getId
());
/*if (Common.isNotNull(preVo.getPolicyStartType()) && CommonConstants.ONE_STRING.equals(preVo.getPolicyStartType())) {
preVo.setPolicyStart(preVo.getJoinLeaveDate());
}
//预计派单日期
if (Common.isEmpty(preVo.getExpectedCollectionTime())) {
TEmployeeInsuranceWorkDayVo dayVo = new TEmployeeInsuranceWorkDayVo();
dayVo.setType(CommonConstants.ONE_STRING);
if (preVo.getBuyType() ==1) {
dayVo.setRegistDate(preVo.getPolicyStart());
} else {
dayVo.setRegistDate(preVo.getJoinLeaveDate());
}
R<TEmployeeInsuranceWorkDayVo> dataR = socialDaprUtils.getBeforeOrAfterWorkDay(dayVo);
if (Common.isNotNull(dataR) && Common.isNotNull(dataR.getData())
&& Common.isNotNull(dataR.getData().getRegistDate())) {
preVo.setExpectedCollectionTime(dataR.getData().getRegistDate());
} else {
preVo.setExpectedCollectionTime(preVo.getPolicyStart());
}
}*/
//preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString( preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 14:00", DateUtil.DATETIME_PATTERN_MINUTE));
}
/**
/**
* @param insurancePreVo
* @param insurancePreVo
* @Description: 获取5个字段构成的关键字
* @Description: 获取5个字段构成的关键字
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
9dd0aa39
...
@@ -147,7 +147,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -147,7 +147,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
List
<
TEmployeePreLogDetail
>
detailList
=
new
ArrayList
<>();
List
<
TEmployeePreLogDetail
>
detailList
=
new
ArrayList
<>();
// 档案信息修改
// 档案信息修改
TEmployeePreLogDetail
detailEmpLog
=
null
;
TEmployeePreLogDetail
detailEmpLog
=
null
;
if
(
Common
.
isNotNull
(
differenceKey
))
{
if
(
Common
.
isNotNull
(
differenceKey
)
&&
!
"insurancePreList"
.
equals
(
differenceKey
))
{
differenceKey
=
differenceKey
.
replace
(
"insurancePreList"
,
""
);
diffTitle
=
"档案信息"
;
diffTitle
=
"档案信息"
;
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
TWO_STRING
);
detailEmpLog
.
setModelType
(
CommonConstants
.
TWO_STRING
);
...
@@ -233,9 +234,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -233,9 +234,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
tEmployeePreLogDetailService
.
saveBatch
(
detailList
);
tEmployeePreLogDetailService
.
saveBatch
(
detailList
);
}
}
if
(!
saveOrUpdateList
.
isEmpty
())
{
if
(!
saveOrUpdateList
.
isEmpty
())
{
// JSON.toJSONString(
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
()
HttpDaprUtil
.
invokeMethodPost
(
daprInsurancesProperties
.
getAppUrl
(),
daprInsurancesProperties
.
getAppId
()
,
"/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
,
"/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
,
JSON
.
toJSONString
(
saveOrUpdateList
)
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
,
saveOrUpdateList
,
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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