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
e756c16c
Commit
e756c16c
authored
Apr 11, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-入职登记商险待办提交
parent
1c593853
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
265 additions
and
148 deletions
+265
-148
pom.xml
yifu-csp/yifu-csp-api/pom.xml
+12
-0
EmployeeRegistrationBatchErrorVo.java
...loud/plus/v1/csp/vo/EmployeeRegistrationBatchErrorVo.java
+23
-0
EmployeeRegistrationReceiveVo.java
...u/cloud/plus/v1/csp/vo/EmployeeRegistrationReceiveVo.java
+3
-0
EmployeeRegistrationController.java
...lus/v1/csp/controller/EmployeeRegistrationController.java
+1
-1
EmployeeRegistrationMapper.java
.../cloud/plus/v1/csp/mapper/EmployeeRegistrationMapper.java
+1
-1
EmployeeRegistrationService.java
...loud/plus/v1/csp/service/EmployeeRegistrationService.java
+1
-1
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+83
-79
EmployeeRegistrationMapper.xml
.../src/main/resources/mapper/EmployeeRegistrationMapper.xml
+2
-2
TEmployeeInsurancePre.java
...plus/v1/yifu/insurances/entity/TEmployeeInsurancePre.java
+9
-2
TEmployeeInsurancePreVo.java
...d/plus/v1/yifu/insurances/vo/TEmployeeInsurancePreVo.java
+16
-0
TEmployeeInsurancePreController.java
...nsurances/controller/TEmployeeInsurancePreController.java
+13
-0
TEmployeeInsurancePreMapper.java
...rances/mapper/insurances/TEmployeeInsurancePreMapper.java
+2
-0
TEmployeeInsurancePreService.java
...ances/service/insurance/TEmployeeInsurancePreService.java
+2
-0
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+49
-26
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+6
-3
TEmployeeInsurancePreMapper.xml
...sources/mapper/insurances/TEmployeeInsurancePreMapper.xml
+10
-1
TEmployeeInsuranceWorkDayVo.java
...d/plus/v1/yifu/social/vo/TEmployeeInsuranceWorkDayVo.java
+1
-1
THolidayInfoServiceImpl.java
.../v1/yifu/social/service/impl/THolidayInfoServiceImpl.java
+31
-31
No files found.
yifu-csp/yifu-csp-api/pom.xml
View file @
e756c16c
...
@@ -36,5 +36,17 @@
...
@@ -36,5 +36,17 @@
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<artifactId>
fastjson
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-insurances-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-archives-api
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationBatchErrorVo.java
0 → 100644
View file @
e756c16c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsuranceExitCheckVo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
public
class
EmployeeRegistrationBatchErrorVo
implements
Serializable
{
private
List
<
EmployeeRegistrationReceiveVo
>
registrationReceiveVoList
;
private
List
<
TEmployeeInsuranceExitCheckVo
>
errorList
;
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationReceiveVo.java
View file @
e756c16c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
csp
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -34,5 +35,7 @@ public class EmployeeRegistrationReceiveVo implements Serializable {
...
@@ -34,5 +35,7 @@ public class EmployeeRegistrationReceiveVo implements Serializable {
@Schema
(
description
=
"项目档案id"
)
@Schema
(
description
=
"项目档案id"
)
private
String
empProjectId
;
private
String
empProjectId
;
private
EmployeeRegistrationPreVo
preVo
;
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
View file @
e756c16c
...
@@ -257,7 +257,7 @@ public class EmployeeRegistrationController {
...
@@ -257,7 +257,7 @@ public class EmployeeRegistrationController {
*/
*/
@Operation
(
description
=
"入职待确认列表简单分页查询"
)
@Operation
(
description
=
"入职待确认列表简单分页查询"
)
@GetMapping
(
"/hrConfirmIdcardList"
)
@GetMapping
(
"/hrConfirmIdcardList"
)
public
R
<
List
<
String
>>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
employeeRegistration
)
{
public
R
<
List
<
EmployeeRegistration
>>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
employeeRegistration
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
employeeRegistration
);
menuUtil
.
setAuthSql
(
user
,
employeeRegistration
);
return
R
.
ok
(
employeeRegistrationService
.
getHrConfirmIdcardList
(
employeeRegistration
));
return
R
.
ok
(
employeeRegistrationService
.
getHrConfirmIdcardList
(
employeeRegistration
));
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/mapper/EmployeeRegistrationMapper.java
View file @
e756c16c
...
@@ -27,7 +27,7 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
...
@@ -27,7 +27,7 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
*/
*/
IPage
<
EmployeeRegistration
>
getEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
IPage
<
EmployeeRegistration
>
getEmployeeRegistrationPage
(
Page
<
EmployeeRegistration
>
page
,
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
List
<
String
>
getHrConfirmIdcardList
(
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
List
<
EmployeeRegistration
>
getHrConfirmIdcardList
(
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
List
<
EmployeeRegistration
>
getEmployeeRegistrationList
(
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
List
<
EmployeeRegistration
>
getEmployeeRegistrationList
(
@Param
(
"employeeRegistration"
)
EmployeeRegistrationSearchVo
employeeRegistration
);
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
View file @
e756c16c
...
@@ -116,7 +116,7 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
...
@@ -116,7 +116,7 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
* @param searchVo 入离职登记
* @param searchVo 入离职登记
* @return
* @return
*/
*/
List
<
String
>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
searchVo
);
List
<
EmployeeRegistration
>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
searchVo
);
/**
/**
* 入职待确认表确认接收
* 入职待确认表确认接收
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
e756c16c
...
@@ -158,7 +158,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -158,7 +158,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
@Override
@Override
public
List
<
String
>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
searchVo
)
{
public
List
<
EmployeeRegistration
>
getHrConfirmIdcardList
(
EmployeeRegistrationSearchVo
searchVo
)
{
//权限和条件赋值
//权限和条件赋值
initSearchVo
(
searchVo
);
initSearchVo
(
searchVo
);
if
(
Common
.
isEmpty
(
searchVo
.
getStatusList
()))
{
if
(
Common
.
isEmpty
(
searchVo
.
getStatusList
()))
{
...
@@ -547,18 +547,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -547,18 +547,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Override
@Override
public
R
confirmReceive
(
EmployeeRegistrationPreVo
preVo
)
{
public
R
confirmReceive
(
EmployeeRegistrationPreVo
preVo
)
{
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
StringBuilder
errorTemp
=
new
StringBuilder
();
//
StringBuilder errorTemp = new StringBuilder();
List
<
TEmployeeInsuranceExitCheckVo
>
errorList
=
new
ArrayList
<>();
List
<
TEmployeeInsuranceExitCheckVo
>
errorList
=
new
ArrayList
<>();
TEmployeeInsuranceExitCheckVo
checkVo
;
TEmployeeInsuranceExitCheckVo
checkVo
;
String
key
;
String
key
;
// 判断重复性MAP
// 判断重复性MAP
Map
<
String
,
Integer
>
keyMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
keyMap
=
new
HashMap
<>();
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
//是否工作日判断
//
//是否工作日判断
String
error
=
checkInsuranceBuy
(
insurancePreVo
,
CommonConstants
.
ONE_STRING
);
//
String error = checkInsuranceBuy(insurancePreVo,CommonConstants.ONE_STRING);
if
(
null
!=
error
)
{
//
if (null != error) {
errorTemp
.
append
(
error
);
//
errorTemp.append(error);
}
//
}
insurancePreVo
.
setEmpIdcard
(
preVo
.
getEmpIdcard
());
insurancePreVo
.
setEmpIdcard
(
preVo
.
getEmpIdcard
());
insurancePreVo
.
setDeptNo
(
preVo
.
getDeptNo
());
insurancePreVo
.
setDeptNo
(
preVo
.
getDeptNo
());
//商险是否存在判断
//商险是否存在判断
...
@@ -574,9 +574,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -574,9 +574,9 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
"保险公司、险种、购买标准、保单起、止日期不可同时重复;"
);
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
"保险公司、险种、购买标准、保单起、止日期不可同时重复;"
);
}
}
}
}
if
(
errorTemp
.
length
()
>
0
)
{
//
if (errorTemp.length() > 0) {
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
errorTemp
.
toString
());
//
return R.other(CommonConstants.TWO_INT,null,errorTemp.toString());
}
//
}
if
(!
errorList
.
isEmpty
())
{
if
(!
errorList
.
isEmpty
())
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
errorList
);
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
errorList
);
}
}
...
@@ -634,28 +634,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -634,28 +634,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(
Common
.
isEmpty
(
preVo
))
{
if
(
Common
.
isEmpty
(
preVo
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
}
String
key
;
// if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
// 判断重复性MAP
// TEmployeeInsurancePreVo insurancePreVo = preVo.getEmployeeInsurancePreVos().get(0);
Map
<
String
,
Integer
>
keyMap
=
new
HashMap
<>();
// String error = checkInsuranceBuy(insurancePreVo, CommonConstants.TWO_STRING);
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
// if (null != error) {
StringBuilder
errorTemp
=
new
StringBuilder
();
// return R.other(CommonConstants.TWO_INT, null, error);
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
// }
String
error
=
checkInsuranceBuy
(
insurancePreVo
,
CommonConstants
.
TWO_STRING
);
// }
if
(
null
!=
error
)
{
errorTemp
.
append
(
error
);
}
// 1:重复性判断
key
=
this
.
getFiveKey
(
insurancePreVo
);
if
(
keyMap
.
get
(
key
)
==
null
)
{
keyMap
.
put
(
key
,
CommonConstants
.
ONE_INT
);
}
else
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
"保险公司、险种、购买标准、保单起、止日期不可同时重复;"
);
}
}
if
(
errorTemp
.
length
()
>
0
)
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
errorTemp
.
toString
());
}
}
//查询该项目该前端客服下所有待接收的入职登记
//查询该项目该前端客服下所有待接收的入职登记
//前端客服的所有项目权限赋值
//前端客服的所有项目权限赋值
EmployeeRegistrationSearchVo
searchVo
=
new
EmployeeRegistrationSearchVo
();
EmployeeRegistrationSearchVo
searchVo
=
new
EmployeeRegistrationSearchVo
();
...
@@ -674,25 +659,35 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -674,25 +659,35 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//商险存在校验
//商险存在校验
List
<
TEmployeeInsuranceExitCheckVo
>
errorList
=
new
ArrayList
<>();
List
<
TEmployeeInsuranceExitCheckVo
>
errorList
=
new
ArrayList
<>();
TEmployeeInsuranceExitCheckVo
checkVo
;
TEmployeeInsuranceExitCheckVo
checkVo
;
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
for
(
EmployeeRegistration
registration
:
registrationList
)
{
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
insurancePreVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
insurancePreVo
.
setDeptNo
(
registration
.
getDeptNo
());
//商险是否存在判断
checkVo
=
checkInsuranceExit
(
insurancePreVo
,
preVo
.
getEmployeeName
(),
preVo
.
getEmpIdcard
());
if
(
null
!=
checkVo
)
{
errorList
.
add
(
checkVo
);
}
}
}
if
(!
errorList
.
isEmpty
())
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
errorList
);
}
}
List
<
EmployeeRegistrationReceiveVo
>
receiveVoList
=
new
ArrayList
<>();
List
<
EmployeeRegistrationReceiveVo
>
receiveVoList
=
new
ArrayList
<>();
for
(
EmployeeRegistration
registration:
registrationList
)
{
for
(
EmployeeRegistration
registration:
registrationList
)
{
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
TEmployeeInsurancePreVo
insurancePreVo
=
preVo
.
getEmployeeInsurancePreVos
().
get
(
0
);
insurancePreVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
insurancePreVo
.
setDeptNo
(
registration
.
getDeptNo
());
//商险是否存在判断
checkVo
=
checkInsuranceExit
(
insurancePreVo
,
registration
.
getEmployeeName
(),
registration
.
getEmpIdcard
());
if
(
null
!=
checkVo
)
{
errorList
.
add
(
checkVo
);
continue
;
}
//入职日期需要小于等于保单截止日期
if
(
preVo
.
getJoinLeaveDate
().
after
(
insurancePreVo
.
getPolicyEnd
()))
{
TEmployeeInsuranceExitCheckVo
exitCheckVo
=
new
TEmployeeInsuranceExitCheckVo
();
exitCheckVo
.
setBuyType
(
insurancePreVo
.
getBuyType
());
exitCheckVo
.
setEmployeeName
(
preVo
.
getEmployeeName
());
exitCheckVo
.
setEmpIdcard
(
preVo
.
getEmpIdcard
());
exitCheckVo
.
setPolicyStart
(
insurancePreVo
.
getPolicyStart
());
exitCheckVo
.
setPolicyEnd
(
insurancePreVo
.
getPolicyEnd
());
exitCheckVo
.
setBuyStandard
(
insurancePreVo
.
getBuyStandard
());
exitCheckVo
.
setInsuranceCompanyName
(
insurancePreVo
.
getInsuranceCompanyName
());
exitCheckVo
.
setInsuranceTypeName
(
insurancePreVo
.
getInsuranceTypeName
());
exitCheckVo
.
setErrorMsg
(
"入职日期需要小于等于保单截止日期!"
);
errorList
.
add
(
checkVo
);
continue
;
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
...
@@ -707,6 +702,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -707,6 +702,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
receiveVo
.
setReason
(
RegistConstants
.
BEFORE_IN_PROJECT
);
receiveVo
.
setReason
(
RegistConstants
.
BEFORE_IN_PROJECT
);
receiveVo
.
setEmpProjectId
(
exit
.
getEmpProjectId
());
receiveVo
.
setEmpProjectId
(
exit
.
getEmpProjectId
());
receiveVo
.
setProjectCreateTime
(
exit
.
getProjectTime
());
receiveVo
.
setProjectCreateTime
(
exit
.
getProjectTime
());
receiveVo
.
setPreVo
(
preVo
);
receiveVoList
.
add
(
receiveVo
);
receiveVoList
.
add
(
receiveVo
);
continue
;
continue
;
}
}
...
@@ -721,15 +717,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -721,15 +717,20 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(
Common
.
isNotNull
(
domainR
)
&&
Common
.
isNotNull
(
domainR
.
getData
())
&&
if
(
Common
.
isNotNull
(
domainR
)
&&
Common
.
isNotNull
(
domainR
.
getData
())
&&
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
//生成商险待购买的数据
//生成商险待购买的数据
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
TEmployeeInsurancePreVo
insurancePreVo
=
preVo
.
getEmployeeInsurancePreVos
().
get
(
0
);
initInsruancePreInfo
(
registration
,
insurancePreVo
,
user
,
domainR
.
getData
());
initInsruancePreInfo
(
registration
,
insurancePreVo
,
user
,
domainR
.
getData
());
}
insuranceDaprUtil
.
saveInsurancePreInfo
(
preVo
);
insuranceDaprUtil
.
saveInsurancePreInfo
(
preVo
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
EmployeeRegistrationBatchErrorVo
batchErrorVo
=
new
EmployeeRegistrationBatchErrorVo
();
batchErrorVo
.
setErrorList
(
errorList
);
batchErrorVo
.
setRegistrationReceiveVoList
(
receiveVoList
);
if
(!
errorList
.
isEmpty
())
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
batchErrorVo
);
}
if
(!
receiveVoList
.
isEmpty
()
&&
Common
.
isNotNull
(
receiveVoList
))
{
if
(!
receiveVoList
.
isEmpty
()
&&
Common
.
isNotNull
(
receiveVoList
))
{
return
R
.
ok
(
receiveVoList
);
return
R
.
ok
(
receiveVoList
);
}
}
...
@@ -841,6 +842,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -841,6 +842,22 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
deptVo
.
setProjectId
(
vo
.
getEmpProjectId
());
deptVo
.
setProjectId
(
vo
.
getEmpProjectId
());
archivesDaprUtil
.
saveOrDeleteDeptRelation
(
deptVo
);
archivesDaprUtil
.
saveOrDeleteDeptRelation
(
deptVo
);
}
}
//生成入职确认信息
try
{
EmployeeRegistrationPreVo
preVo
=
vo
.
getPreVo
();
initRegistPreInfo
(
registrationNow
,
preVo
,
user
,
CommonConstants
.
FOUR_STRING
);
R
<
String
>
domainR
=
archivesDaprUtil
.
saveRegistPreInfo
(
preVo
);
if
(
Common
.
isNotNull
(
domainR
)
&&
Common
.
isNotNull
(
domainR
.
getData
())
&&
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
//生成商险待购买的数据
for
(
TEmployeeInsurancePreVo
insurancePreVo
:
preVo
.
getEmployeeInsurancePreVos
())
{
initInsruancePreInfo
(
registrationNow
,
insurancePreVo
,
user
,
domainR
.
getData
());
}
insuranceDaprUtil
.
saveInsurancePreInfo
(
preVo
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
else
{
}
else
{
deptVo
.
setProjectId
(
vo
.
getEmpProjectId
());
deptVo
.
setProjectId
(
vo
.
getEmpProjectId
());
archivesDaprUtil
.
saveOrDeleteDeptRelation
(
deptVo
);
archivesDaprUtil
.
saveOrDeleteDeptRelation
(
deptVo
);
...
@@ -1207,41 +1224,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -1207,41 +1224,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setCreateBy
(
user
.
getId
());
preVo
.
setCreateBy
(
user
.
getId
());
preVo
.
setCreateName
(
user
.
getNickname
());
preVo
.
setCreateName
(
user
.
getNickname
());
preVo
.
setUpdateBy
(
user
.
getId
());
preVo
.
setUpdateBy
(
user
.
getId
());
preVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
//预计派单日期
//预计派单日期
if
(
Common
.
isEmpty
(
preVo
.
getExpectedCollectionTime
()))
{
if
(
Common
.
isEmpty
(
preVo
.
getExpectedCollectionTime
())
&&
Common
.
isNotNull
(
preVo
.
getPolicyStartType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
preVo
.
getPolicyStartType
())
)
{
//新增选择保单开始日期类型= 默认等于入职日期
//新增选择保单开始日期类型= 默认等于入职日期
if
(
Common
.
isNotNull
(
preVo
.
getPolicyStartType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
preVo
.
getPolicyStartType
()))
{
preVo
.
setPolicyStart
(
preVo
.
getJoinLeaveDate
());
preVo
.
setPolicyStart
(
preVo
.
getJoinLeaveDate
());
TEmployeeInsuranceWorkDayVo
dayVo
=
new
TEmployeeInsuranceWorkDayVo
();
TEmployeeInsuranceWorkDayVo
dayVo
=
new
TEmployeeInsuranceWorkDayVo
();
dayVo
.
setType
(
CommonConstants
.
TWO_STRING
);
dayVo
.
setType
(
CommonConstants
.
TWO_STRING
);
dayVo
.
setRegistDate
(
preVo
.
getJoinLeaveDate
());
dayVo
.
setRegistDate
(
preVo
.
getJoinLeaveDate
());
R
<
TEmployeeInsuranceWorkDayVo
>
dataR
=
socialDaprUtils
.
getBeforeOrAfterWorkDay
(
dayVo
);
R
<
TEmployeeInsuranceWorkDayVo
>
dataR
=
socialDaprUtils
.
getBeforeOrAfterWorkDay
(
dayVo
);
if
(
Common
.
isNotNull
(
dataR
)
&&
Common
.
isNotNull
(
dataR
.
getData
())
if
(
Common
.
isNotNull
(
dataR
)
&&
Common
.
isNotNull
(
dataR
.
getData
())
&&
Common
.
isNotNull
(
dataR
.
getData
().
getRegistDate
())
&&
Common
.
isNotNull
(
dataR
.
getData
().
getRegistDate
())
&&
Common
.
isNotNull
(
dataR
.
getData
().
getPriDisDate
()))
{
&&
Common
.
isNotNull
(
dataR
.
getData
().
getPriDisDate
()))
{
preVo
.
setExpectedCollectionTime
(
dataR
.
getData
().
getPriDisDate
());
preVo
.
setExpectedCollectionTime
(
dataR
.
getData
().
getPriDisDate
());
preVo
.
setPolicyStart
(
dataR
.
getData
().
getRegistDate
());
preVo
.
setPolicyStart
(
dataR
.
getData
().
getRegistDate
());
}
else
{
preVo
.
setExpectedCollectionTime
(
preVo
.
getJoinLeaveDate
());
preVo
.
setPolicyStart
(
preVo
.
getJoinLeaveDate
());
}
}
else
{
}
else
{
TEmployeeInsuranceWorkDayVo
dayVo
=
new
TEmployeeInsuranceWorkDayVo
();
preVo
.
setExpectedCollectionTime
(
preVo
.
getJoinLeaveDate
());
dayVo
.
setType
(
CommonConstants
.
ONE_STRING
);
preVo
.
setPolicyStart
(
preVo
.
getJoinLeaveDate
());
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
.
getJoinLeaveDate
());
}
}
}
}
}
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 1
4:0
0"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 1
5:2
0"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
}
}
//商险的工作日判断 type 1 单个接收 2 批量接收
//商险的工作日判断 type 1 单个接收 2 批量接收
...
...
yifu-csp/yifu-csp-biz/src/main/resources/mapper/EmployeeRegistrationMapper.xml
View file @
e756c16c
...
@@ -245,9 +245,9 @@
...
@@ -245,9 +245,9 @@
</select>
</select>
<!--employeeRegistration简单分页查询-->
<!--employeeRegistration简单分页查询-->
<select
id=
"getHrConfirmIdcardList"
result
Type=
"java.lang.String
"
>
<select
id=
"getHrConfirmIdcardList"
result
Map=
"employeeRegistrationMap
"
>
SELECT
SELECT
a.emp_idcard
<include
refid=
"Base_Column_List"
/>
FROM employee_registration a
FROM employee_registration a
<where>
<where>
1=1
1=1
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TEmployeeInsurancePre.java
View file @
e756c16c
...
@@ -89,14 +89,15 @@ public class TEmployeeInsurancePre extends BaseEntity {
...
@@ -89,14 +89,15 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema
(
description
=
"购买类型, 1新增、3批增、4替换"
)
@Schema
(
description
=
"购买类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
private
Integer
buyType
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"保单开始时间"
)
@Schema
(
description
=
"保单开始时间"
)
private
Date
policyStart
;
private
Date
policyStart
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"保单结束时间"
)
@Schema
(
description
=
"保单结束时间"
)
private
Date
policyEnd
;
private
Date
policyEnd
;
@Schema
(
description
=
"预计生效日期"
)
private
Date
policyEffect
;
@Schema
(
description
=
"保单号"
)
@Schema
(
description
=
"保单号"
)
private
String
policyNo
;
private
String
policyNo
;
...
@@ -133,6 +134,12 @@ public class TEmployeeInsurancePre extends BaseEntity {
...
@@ -133,6 +134,12 @@ public class TEmployeeInsurancePre extends BaseEntity {
@Schema
(
description
=
"替换项目编码"
)
@Schema
(
description
=
"替换项目编码"
)
private
String
replaceDeptNo
;
private
String
replaceDeptNo
;
@Schema
(
description
=
"配置名称"
)
private
String
configName
;
@Schema
(
description
=
"商险ID"
)
private
String
insurancesId
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@Schema
(
description
=
"修改类型:1新增;2修改;3删除;4状态346为不可编辑"
)
@Schema
(
description
=
"修改类型:1新增;2修改;3删除;4状态346为不可编辑"
)
private
String
modelType
;
private
String
modelType
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TEmployeeInsurancePreVo.java
View file @
e756c16c
...
@@ -168,6 +168,11 @@ public class TEmployeeInsurancePreVo implements Serializable {
...
@@ -168,6 +168,11 @@ public class TEmployeeInsurancePreVo implements Serializable {
@ExcelProperty
(
"保单结束时间"
)
@ExcelProperty
(
"保单结束时间"
)
private
Date
policyEnd
;
private
Date
policyEnd
;
@ExcelAttribute
(
name
=
"保单预计生效日期"
,
isDate
=
true
)
@Schema
(
description
=
"保单预计生效日期"
)
@ExcelProperty
(
"保单预计生效日期"
)
private
Date
policyEffect
;
/**
/**
* 保单号
* 保单号
*/
*/
...
@@ -264,6 +269,17 @@ public class TEmployeeInsurancePreVo implements Serializable {
...
@@ -264,6 +269,17 @@ public class TEmployeeInsurancePreVo implements Serializable {
@ExcelProperty
(
"替换项目编码"
)
@ExcelProperty
(
"替换项目编码"
)
private
String
replaceDeptNo
;
private
String
replaceDeptNo
;
@Schema
(
description
=
"商险ID"
)
private
String
insurancesId
;
/**
* 配置名称
*/
@ExcelAttribute
(
name
=
"配置名称"
)
@Schema
(
description
=
"配置名称"
)
@ExcelProperty
(
"配置名称"
)
private
String
configName
;
@Schema
(
description
=
"创建人-姓名"
)
@Schema
(
description
=
"创建人-姓名"
)
private
String
createName
;
private
String
createName
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TEmployeeInsurancePreController.java
View file @
e756c16c
...
@@ -213,6 +213,19 @@ public class TEmployeeInsurancePreController {
...
@@ -213,6 +213,19 @@ public class TEmployeeInsurancePreController {
tEmployeeInsurancePreService
.
pushWxConfrimMessage
();
tEmployeeInsurancePreService
.
pushWxConfrimMessage
();
}
}
/**
* 每天下午三点二十推送待派单数据
* @author huych
* @date 2025-04-11 10:46:12
* @return void
*/
@SysLog
(
"每天下午三点二十推送待派单数据"
)
@Inner
@PostMapping
(
"/inner/pushDisConfrimInsurances"
)
public
void
pushDisConfrimInsurances
()
{
tEmployeeInsurancePreService
.
pushDisConfrimInsurances
();
}
/**
/**
* @param empPreId 入职确认信息表ID
* @param empPreId 入职确认信息表ID
* @Description: 获取商险信息
* @Description: 获取商险信息
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TEmployeeInsurancePreMapper.java
View file @
e756c16c
...
@@ -39,6 +39,8 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
...
@@ -39,6 +39,8 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
List
<
TEmployeeInsurancePre
>
getAllUnconfimData
();
List
<
TEmployeeInsurancePre
>
getAllUnconfimData
();
List
<
String
>
getAllUnDisData
();
/**
/**
* 根据empPreId查询
* 根据empPreId查询
* @param empPreId 入职确认信息表主键
* @param empPreId 入职确认信息表主键
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/TEmployeeInsurancePreService.java
View file @
e756c16c
...
@@ -84,6 +84,8 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
...
@@ -84,6 +84,8 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
void
pushWxConfrimMessage
();
void
pushWxConfrimMessage
();
void
pushDisConfrimInsurances
();
/**
/**
* @Description: 查询list
* @Description: 查询list
* @Author: hgw
* @Author: hgw
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
e756c16c
...
@@ -37,14 +37,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -37,14 +37,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
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.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -174,7 +171,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -174,7 +171,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
}
}
@Override
@Override
@Transactional
public
R
batchDispatcherInsurance
(
List
<
String
>
idList
)
{
public
R
batchDispatcherInsurance
(
List
<
String
>
idList
)
{
List
<
TEmployeeInsurancePre
>
insurancePreList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeInsurancePre
>
query
()
List
<
TEmployeeInsurancePre
>
insurancePreList
=
baseMapper
.
selectList
(
Wrappers
.<
TEmployeeInsurancePre
>
query
()
.
lambda
().
in
(
TEmployeeInsurancePre:
:
getId
,
idList
)
.
lambda
().
in
(
TEmployeeInsurancePre:
:
getId
,
idList
)
...
@@ -274,6 +270,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -274,6 +270,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
pushIdList
)
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
pushIdList
)
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
);
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
);
this
.
update
(
updateWrapper
);
}
else
{
}
else
{
// 将 autoAddParamList 中的身份证和项目等信息提取出来,放入一个 Set 中
// 将 autoAddParamList 中的身份证和项目等信息提取出来,放入一个 Set 中
Set
<
String
>
autoAddParamSet
=
autoAddParamList
.
stream
()
Set
<
String
>
autoAddParamSet
=
autoAddParamList
.
stream
()
...
@@ -287,16 +284,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -287,16 +284,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
List
<
TEmployeeInsurancePre
>
existingList
=
insurancePreList
.
stream
()
List
<
TEmployeeInsurancePre
>
existingList
=
insurancePreList
.
stream
()
.
filter
(
pre
->
autoAddParamSet
.
contains
(
pre
.
getEmpIdcard
()
+
"-"
+
pre
.
getDeptNo
()
.
filter
(
pre
->
autoAddParamSet
.
contains
(
pre
.
getEmpIdcard
()
+
"-"
+
pre
.
getDeptNo
()
+
"-"
+
pre
.
getBuyStandard
()+
"-"
+
pre
.
getInsuranceTypeName
()
+
"-"
+
pre
.
getBuyStandard
()+
"-"
+
pre
.
getInsuranceTypeName
()
+
"-"
+
pre
.
getInsuranceCompanyName
()
+
"-"
+
pre
.
getPolicyStart
(
)
+
"-"
+
pre
.
getInsuranceCompanyName
()
+
"-"
+
DateUtil
.
dateToString
(
pre
.
getPolicyStart
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
"-"
+
pre
.
getPolicyEnd
(
)))
+
"-"
+
DateUtil
.
dateToString
(
pre
.
getPolicyEnd
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
// 找出 insurancePreList 中在 autoAddParamList 中不存在的数据
// 找出 insurancePreList 中在 autoAddParamList 中不存在的数据
List
<
TEmployeeInsurancePre
>
nonExistingList
=
insurancePreList
.
stream
()
List
<
TEmployeeInsurancePre
>
nonExistingList
=
insurancePreList
.
stream
()
.
filter
(
pre
->
!
autoAddParamSet
.
contains
(
pre
.
getEmpIdcard
()
+
"-"
+
pre
.
getDeptNo
()
.
filter
(
pre
->
!
autoAddParamSet
.
contains
(
pre
.
getEmpIdcard
()
+
"-"
+
pre
.
getDeptNo
()
+
"-"
+
pre
.
getBuyStandard
()+
"-"
+
pre
.
getInsuranceTypeName
()
+
"-"
+
pre
.
getBuyStandard
()+
"-"
+
pre
.
getInsuranceTypeName
()
+
"-"
+
pre
.
getInsuranceCompanyName
()
+
"-"
+
pre
.
getPolicyStart
(
)
+
"-"
+
pre
.
getInsuranceCompanyName
()
+
"-"
+
DateUtil
.
dateToString
(
pre
.
getPolicyStart
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
"-"
+
pre
.
getPolicyEnd
(
)))
+
"-"
+
DateUtil
.
dateToString
(
pre
.
getPolicyEnd
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//派单成功的更新状态为代投保,派单失败更新成派单失败
//派单成功的更新状态为代投保,派单失败更新成派单失败
if
(!
existingList
.
isEmpty
()){
if
(!
existingList
.
isEmpty
()){
...
@@ -304,12 +301,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -304,12 +301,14 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
onIdList
)
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
onIdList
)
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
);
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
TWO_STRING
);
this
.
update
(
updateWrapper
);
}
}
if
(!
nonExistingList
.
isEmpty
()){
if
(!
nonExistingList
.
isEmpty
()){
List
<
String
>
unIdList
=
insurancePreList
.
stream
().
map
(
TEmployeeInsurancePre:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
unIdList
=
insurancePreList
.
stream
().
map
(
TEmployeeInsurancePre:
:
getId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TEmployeeInsurancePre
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
unIdList
)
updateWrapper
.
in
(
TEmployeeInsurancePre:
:
getId
,
unIdList
)
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
);
.
set
(
TEmployeeInsurancePre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
);
this
.
update
(
updateWrapper
);
}
}
}
}
return
R
.
ok
(
autoAddParamList
);
return
R
.
ok
(
autoAddParamList
);
...
@@ -325,8 +324,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -325,8 +324,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
//判断是否存在商险待购买信息
//判断是否存在商险待购买信息
preExit
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeInsurancePre
>
query
().
lambda
()
preExit
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmployeeInsurancePre
>
query
().
lambda
()
.
eq
(
TEmployeeInsurancePre:
:
getEmpIdcard
,
preVo
.
getEmpIdcard
())
.
eq
(
TEmployeeInsurancePre:
:
getEmpIdcard
,
preVo
.
getEmpIdcard
())
.
eq
(
TEmployeeInsurancePre:
:
getDeptNo
,
preVo
.
getDeptNo
())
.
eq
(
TEmployeeInsurancePre:
:
getBuyStandard
,
preVo
.
getBuyStandard
())
.
eq
(
TEmployeeInsurancePre:
:
getBuyType
,
preVo
.
getBuyType
())
.
eq
(
TEmployeeInsurancePre:
:
getInsuranceTypeName
,
preVo
.
getInsuranceTypeName
())
.
eq
(
TEmployeeInsurancePre:
:
getInsuranceCompanyName
,
preVo
.
getInsuranceCompanyName
())
.
eq
(
TEmployeeInsurancePre:
:
getPolicyStart
,
preVo
.
getPolicyStart
())
.
eq
(
TEmployeeInsurancePre:
:
getPolicyEnd
,
preVo
.
getPolicyEnd
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
TEmployeeInsurancePre
pre
=
new
TEmployeeInsurancePre
();
TEmployeeInsurancePre
pre
=
new
TEmployeeInsurancePre
();
BeanUtils
.
copyProperties
(
preVo
,
pre
);
BeanUtils
.
copyProperties
(
preVo
,
pre
);
...
@@ -340,20 +342,21 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -340,20 +342,21 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
//todo 操作记录
//todo 操作记录
}
else
{
}
else
{
baseMapper
.
insert
(
pre
);
baseMapper
.
insert
(
pre
);
if
(
Common
.
isNotNull
(
pre
.
getExpectedCollectionTime
()))
{
//暂时不需要,先注释,后续可能会需要
// 事务提交后触发调度
// if (Common.isNotNull(pre.getExpectedCollectionTime())) {
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
// // 事务提交后触发调度
@Override
// TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
public
void
afterCommit
()
{
// @Override
LocalDateTime
now
=
LocalDateTime
.
now
();
// public void afterCommit() {
if
(
pre
.
getExpectedCollectionTime
().
isEqual
(
now
))
{
// LocalDateTime now = LocalDateTime.now();
scheduleService
.
executeTask
(
pre
.
getId
());
// if (pre.getExpectedCollectionTime().isEqual(now)) {
}
else
if
(
preVo
.
getExpectedCollectionTime
().
compareTo
(
LocalDateTimeUtils
.
convertLDTToDate
(
now
))
>
0
){
// scheduleService.executeTask(pre.getId());
scheduleService
.
scheduleTask
(
pre
);
// } else if (preVo.getExpectedCollectionTime().compareTo(LocalDateTimeUtils.convertLDTToDate(now)) > 0){
}
// scheduleService.scheduleTask(pre);
}
// }
});
// }
}
// });
// }
}
}
}
}
}
}
...
@@ -400,8 +403,25 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -400,8 +403,25 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
//获取所有预计派单时间为当天而且状态是待确认的商险待购买数据
//获取所有预计派单时间为当天而且状态是待确认的商险待购买数据
List
<
TEmployeeInsurancePre
>
unConfirmList
=
baseMapper
.
getAllUnconfimData
();
List
<
TEmployeeInsurancePre
>
unConfirmList
=
baseMapper
.
getAllUnconfimData
();
if
(
Common
.
isNotNull
(
unConfirmList
)
&&
!
unConfirmList
.
isEmpty
())
{
if
(
Common
.
isNotNull
(
unConfirmList
)
&&
!
unConfirmList
.
isEmpty
())
{
for
(
TEmployeeInsurancePre
pre
:
unConfirmList
)
{
for
(
TEmployeeInsurancePre
pre
:
unConfirmList
)
{
sendMessageToWx
(
pre
);
try
{
sendMessageToWx
(
pre
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
@Override
public
void
pushDisConfrimInsurances
()
{
//获取所有待派单的数据
List
<
String
>
unConfirmList
=
baseMapper
.
getAllUnDisData
();
if
(
null
!=
unConfirmList
&&
!
unConfirmList
.
isEmpty
())
{
try
{
this
.
batchDispatcherInsurance
(
unConfirmList
);
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
}
}
}
...
@@ -458,6 +478,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -458,6 +478,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setSettleMonth
(
addParam
.
getSettleMonth
());
autoParam
.
setSettleMonth
(
addParam
.
getSettleMonth
());
autoParam
.
setPost
(
addParam
.
getPost
());
autoParam
.
setPost
(
addParam
.
getPost
());
autoParam
.
setRemark
(
addParam
.
getRemark
());
autoParam
.
setRemark
(
addParam
.
getRemark
());
autoParam
.
setErrorMessage
(
addParam
.
getErrorMessage
());
return
autoParam
;
return
autoParam
;
}
}
...
@@ -476,6 +497,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -476,6 +497,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setSettleMonth
(
batchParam
.
getSettleMonth
());
autoParam
.
setSettleMonth
(
batchParam
.
getSettleMonth
());
autoParam
.
setPost
(
batchParam
.
getPost
());
autoParam
.
setPost
(
batchParam
.
getPost
());
autoParam
.
setRemark
(
batchParam
.
getRemark
());
autoParam
.
setRemark
(
batchParam
.
getRemark
());
autoParam
.
setErrorMessage
(
batchParam
.
getErrorMessage
());
return
autoParam
;
return
autoParam
;
}
}
...
@@ -494,6 +516,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
...
@@ -494,6 +516,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setReplaceEmpName
(
replaceParam
.
getReplaceEmpName
());
autoParam
.
setReplaceEmpName
(
replaceParam
.
getReplaceEmpName
());
autoParam
.
setReplaceDeptNo
(
replaceParam
.
getReplaceDeptNo
());
autoParam
.
setReplaceDeptNo
(
replaceParam
.
getReplaceDeptNo
());
autoParam
.
setReplaceEmpIdcardNo
(
replaceParam
.
getReplaceEmpIdcardNo
());
autoParam
.
setReplaceEmpIdcardNo
(
replaceParam
.
getReplaceEmpIdcardNo
());
autoParam
.
setErrorMessage
(
replaceParam
.
getErrorMessage
());
return
autoParam
;
return
autoParam
;
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
e756c16c
...
@@ -376,9 +376,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -376,9 +376,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setCreateName
(
user
.
getNickname
());
detail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
detail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePre
(
detail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
}
}
this
.
saveBatch
(
detailList
);
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
List
<
String
>
replaceIdList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
d
:
detailList
)
{
for
(
TInsuranceDetail
d
:
detailList
)
{
replaceIdList
.
add
(
d
.
getId
());
replaceIdList
.
add
(
d
.
getId
());
...
@@ -439,9 +439,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -439,9 +439,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detailList
.
add
(
detail
);
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
replaceIdList
.
add
(
detail
.
getId
());
replaceIdList
.
add
(
detail
.
getId
());
baseMapper
.
insert
(
detail
);
updateEmployeeInsurancePre
(
detail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePre
(
detail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
}
}
this
.
saveBatch
(
detailList
);
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
// 同步操作档案的 商险状态为:2正常(0无2正常3失效4处理中)
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
this
.
doFailInfo
(
detailList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
FOUR_STRING
);
}
}
...
@@ -566,7 +566,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -566,7 +566,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setCreateName
(
user
.
getNickname
());
replace
.
setCreateName
(
user
.
getNickname
());
replace
.
setCreateTime
(
LocalDateTime
.
now
());
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
tInsuranceReplaceService
.
save
(
replace
);
updateEmployeeInsurancePre
(
d
etail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
updateEmployeeInsurancePre
(
newD
etail
,
CommonConstants
.
processStatus
,
CommonConstants
.
THREE_STRING
);
}
}
detailList
.
add
(
newDetail
);
detailList
.
add
(
newDetail
);
}
}
...
@@ -8339,6 +8339,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -8339,6 +8339,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
pre
))
{
if
(
Common
.
isNotNull
(
pre
))
{
pre
.
setProcessStatus
(
status
);
pre
.
setProcessStatus
(
status
);
if
(
Common
.
isNotNull
(
insuranceDetail
.
getId
()))
{
pre
.
setInsurancesId
(
insuranceDetail
.
getId
());
}
employeeInsurancePreMapper
.
updateById
(
pre
);
employeeInsurancePreMapper
.
updateById
(
pre
);
}
}
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TEmployeeInsurancePreMapper.xml
View file @
e756c16c
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
<result
property=
"buyType"
column=
"buy_type"
/>
<result
property=
"buyType"
column=
"buy_type"
/>
<result
property=
"policyStart"
column=
"policy_start"
/>
<result
property=
"policyStart"
column=
"policy_start"
/>
<result
property=
"policyEnd"
column=
"policy_end"
/>
<result
property=
"policyEnd"
column=
"policy_end"
/>
<result
property=
"policyEffect"
column=
"policy_effect"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"isAddress"
column=
"is_address"
/>
<result
property=
"isAddress"
column=
"is_address"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"position"
column=
"position"
/>
...
@@ -39,6 +40,7 @@
...
@@ -39,6 +40,7 @@
<result
property=
"replaceEmployeeName"
column=
"replace_employee_name"
/>
<result
property=
"replaceEmployeeName"
column=
"replace_employee_name"
/>
<result
property=
"replaceEmpIdcard"
column=
"replace_emp_idcard"
/>
<result
property=
"replaceEmpIdcard"
column=
"replace_emp_idcard"
/>
<result
property=
"replaceDeptNo"
column=
"replace_dept_no"
/>
<result
property=
"replaceDeptNo"
column=
"replace_dept_no"
/>
<result
property=
"configName"
column=
"config_name"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createName"
column=
"create_name"
/>
<result
property=
"createName"
column=
"create_name"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
@@ -99,7 +101,7 @@
...
@@ -99,7 +101,7 @@
a.create_name,
a.create_name,
a.create_time,
a.create_time,
a.update_by,
a.update_by,
a.update_time,a.policy_no
a.update_time,a.policy_no
,a.config_name,a.policy_effect
</sql>
</sql>
<sql
id=
"tEmployeeInsurancePre_where"
>
<sql
id=
"tEmployeeInsurancePre_where"
>
<if
test=
"tEmployeeInsurancePre != null"
>
<if
test=
"tEmployeeInsurancePre != null"
>
...
@@ -309,4 +311,11 @@
...
@@ -309,4 +311,11 @@
where a.process_status = '0' and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") = CURDATE()
where a.process_status = '0' and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d") = CURDATE()
group by a.customer_user_loginname
group by a.customer_user_loginname
</select>
</select>
<select
id=
"getAllUnDisData"
resultType=
"java.lang.String"
>
SELECT
id
FROM t_employee_insurance_pre a
where a.process_status in ('1','2','5') and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d")
<![CDATA[ <= ]]>
CURDATE()
</select>
</mapper>
</mapper>
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TEmployeeInsuranceWorkDayVo.java
View file @
e756c16c
...
@@ -15,7 +15,7 @@ import java.util.Date;
...
@@ -15,7 +15,7 @@ import java.util.Date;
@Data
@Data
public
class
TEmployeeInsuranceWorkDayVo
implements
Serializable
{
public
class
TEmployeeInsuranceWorkDayVo
implements
Serializable
{
@Schema
(
description
=
"保单开始日期"
)
@Schema
(
description
=
"保单开始日期
/预计生效日期
"
)
private
Date
registDate
;
private
Date
registDate
;
@Schema
(
description
=
"预计派单日期"
)
@Schema
(
description
=
"预计派单日期"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/THolidayInfoServiceImpl.java
View file @
e756c16c
...
@@ -310,42 +310,42 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
...
@@ -310,42 +310,42 @@ public class THolidayInfoServiceImpl extends ServiceImpl<THolidayInfoMapper, THo
holidayMap
.
put
(
h
.
getDate
(),
h
.
getDay
());
holidayMap
.
put
(
h
.
getDate
(),
h
.
getDay
());
}
}
}
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
vo
.
getType
()))
{
//查找入职日期的前一个工作日
//查找入职日期的前一个工作日
TEmployeeInsuranceWorkDayVo
newVo
=
new
TEmployeeInsuranceWorkDayVo
();
TEmployeeInsuranceWorkDayVo
newVo
=
new
TEmployeeInsuranceWorkDayVo
();
newVo
.
setRegistDate
(
vo
.
getRegistDate
());
newVo
.
setRegistDate
(
vo
.
getRegistDate
());
newVo
.
setType
(
CommonConstants
.
ONE_STRING
);
newVo
.
setType
(
CommonConstants
.
ONE_STRING
);
getWorkDay
(
holidayMap
,
newVo
);
getWorkDay
(
holidayMap
,
newVo
);
//判断前一个工作日是否大于今天
//判断前一个工作日是否大于今天
LocalDate
givenLocalDate
=
newVo
.
getRegistDate
().
toInstant
()
LocalDate
givenLocalDate
=
newVo
.
getRegistDate
().
toInstant
()
.
atZone
(
java
.
time
.
ZoneId
.
systemDefault
())
.
atZone
(
java
.
time
.
ZoneId
.
systemDefault
())
.
toLocalDate
();
.
toLocalDate
();
// 获取今天的 LocalDate
// 获取今天的 LocalDate
LocalDate
today
=
LocalDate
.
now
();
LocalDate
today
=
LocalDate
.
now
();
LocalTime
currentTime
=
LocalTime
.
now
();
LocalTime
currentTime
=
LocalTime
.
now
();
if
(
givenLocalDate
.
isBefore
(
today
)
||
givenLocalDate
.
isEqual
(
today
))
{
if
(
givenLocalDate
.
isBefore
(
today
)
||
givenLocalDate
.
isEqual
(
today
))
{
// 如果日期前一个工作日日期小于等于今天
// 如果日期前一个工作日日期小于等于今天
if
(
currentTime
.
isBefore
(
LocalTime
.
of
(
14
,
0
)))
{
if
(
currentTime
.
isBefore
(
LocalTime
.
of
(
15
,
20
))
||
currentTime
.
equals
(
LocalTime
.
of
(
15
,
20
)))
{
// 如果当前时间在14:00之前
// 如果当前时间在15:20之前
vo
.
setRegistDate
(
LocalDateTimeUtils
.
convertLDToDate
(
today
));
vo
.
setPriDisDate
(
LocalDateTimeUtils
.
convertLDToDate
(
today
));
vo
.
setPriDisDate
(
LocalDateTimeUtils
.
convertLDToDate
(
today
));
vo
.
setRegistDate
(
DateUtil
.
addDayByDate
(
vo
.
getPriDisDate
(),
CommonConstants
.
ONE_INT
));
}
else
{
// 如果当前时间在14:00之后
TEmployeeInsuranceWorkDayVo
afterVo
=
new
TEmployeeInsuranceWorkDayVo
();
afterVo
.
setRegistDate
(
vo
.
getRegistDate
());
afterVo
.
setType
(
CommonConstants
.
TWO_STRING
);
getWorkDay
(
holidayMap
,
afterVo
);
vo
.
setRegistDate
(
afterVo
.
getRegistDate
());
vo
.
setPriDisDate
(
afterVo
.
getRegistDate
());
}
}
else
{
}
else
{
//如果前一个工作日日期大于今天
// 如果当前时间在15:20之后
vo
.
setRegistDate
(
newVo
.
getRegistDate
());
TEmployeeInsuranceWorkDayVo
afterVo
=
new
TEmployeeInsuranceWorkDayVo
();
afterVo
.
setRegistDate
(
LocalDateTimeUtils
.
convertLDToDate
(
today
));
afterVo
.
setType
(
CommonConstants
.
TWO_STRING
);
getWorkDay
(
holidayMap
,
afterVo
);
vo
.
setPriDisDate
(
afterVo
.
getRegistDate
());
vo
.
setRegistDate
(
DateUtil
.
addDayByDate
(
newVo
.
getRegistDate
(),
CommonConstants
.
ONE_INT
));
}
}
}
else
{
//如果前一个工作日日期大于今天
//预计派单日期
vo
.
setPriDisDate
(
newVo
.
getRegistDate
());
//预计生效日期
vo
.
setRegistDate
(
DateUtil
.
addDayByDate
(
newVo
.
getRegistDate
(),
CommonConstants
.
ONE_INT
));
}
}
getWorkDay
(
holidayMap
,
vo
);
return
vo
;
return
vo
;
}
}
...
...
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