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
9a3374f9
Commit
9a3374f9
authored
Aug 23, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
c2bef9dc
3fa2fe83
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
674 additions
and
247 deletions
+674
-247
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-1
pom.xml
yifu-common/yifu-common-ekp/pom.xml
+13
-1
EkpSalaryUtil.java
...a/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
+53
-0
EkpConstants.java
...om/yifu/cloud/plus/v1/yifu/ekp/constant/EkpConstants.java
+19
-0
EkpSalaryParam.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
+13
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+2
-10
TInsuranceEkp.java
...u/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
+148
-0
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+2
-2
EKPInteractiveParam.java
...cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
+7
-1
InsuranceHandleImportParam.java
...lus/v1/yifu/insurances/vo/InsuranceHandleImportParam.java
+3
-3
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+19
-2
TInsuranceEkpMapper.java
...d/plus/v1/yifu/insurances/mapper/TInsuranceEkpMapper.java
+17
-0
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+11
-1
TInsuranceEkpService.java
...plus/v1/yifu/insurances/service/TInsuranceEkpService.java
+13
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+180
-76
TInsuranceEkpServiceImpl.java
...ifu/insurances/service/impl/TInsuranceEkpServiceImpl.java
+17
-0
TInsuranceEkpMapper.xml
...ces-biz/src/main/resources/mapper/TInsuranceEkpMapper.xml
+49
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+7
-46
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+2
-1
TSpecialDeducationSumServiceImpl.java
...salary/service/impl/TSpecialDeducationSumServiceImpl.java
+8
-8
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+68
-78
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+5
-5
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+15
-10
application-dev.yml
...al/yifu-social-biz/src/main/resources/application-dev.yml
+2
-2
No files found.
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
9a3374f9
...
...
@@ -175,7 +175,7 @@ emp.dispatch.fund.start.is.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u516C\u79EF\u91
emp.dispatch.emp.contract.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u5408\u
540C
\u
76F8
\u5173\u
4FE1
\u
606F
\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
emp.dispatch.emp.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
7CFB
\u
7EDF
\u
65E0
\u
5BF9
\u
5E94
\u9879\u
76EE
\u6863\u6848\u
FF0C
\u6863\u6848\u
76F8
\u5173\u
540C
\u8272
\u
5B57
\u
6BB5
\u
5FC5
\u
586B
emp.dispatch.emp.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
7CFB
\u
7EDF
\u
65E0
\u
5BF9
\u
5E94
\u9879\u
76EE
\u6863\u6848\u
FF0C
\u6863\u6848\u
53CA
\u5408\u
540C
\u
76F8
\u5173
\u
5B57
\u
6BB5
\u
5FC5
\u
586B
emp.dispatch.settleDomain.stop
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5BF9
\u
5E94
\u9879\u
76EE
\u
7F16
\u7801\u
5DF2
\u
505C
\u
6B62
\u5408\u
4F5C
...
...
yifu-common/yifu-common-ekp/pom.xml
View file @
9a3374f9
...
...
@@ -19,5 +19,17 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot
</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>
org.codehaus.jackson
</groupId>
<artifactId>
jackson-mapper-asl
</artifactId>
<version>
1.9.13
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.8.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpSalaryUtil.java
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.log4j.Log4j2
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
cn.hutool.json.JSONObject
;
/**
* @Author fxj
...
...
@@ -17,4 +26,48 @@ public class EkpSalaryUtil {
@Autowired
private
EkpSalaryProperties
ekpProperties
;
public
String
sendToEKP
(
EkpSalaryParam
param
){
log
.
info
(
"推送EKP开始--薪资明细数据"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject
loginName
=
new
JSONObject
();
loginName
.
append
(
"LoginName"
,
ekpProperties
.
getLoginName
());
String
loginData
=
new
ObjectMapper
().
writeValueAsString
(
loginName
);
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
//wholeForm.add("docCreator", loginData);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getFdFlowId
());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
info
(
e
.
getMessage
());
return
null
;
}
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/constant/EkpConstants.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
constant
;
/**
* @Author fxj
* @Date 2022/8/22
* @Description
* @Version 1.0
*/
public
interface
EkpConstants
{
/**
* 推送成功
*/
String
SEND_SUCCESS
=
"推送成功"
;
/**
* 推送失败
*/
String
SEND_FAILED
=
"推送失败"
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpSalaryParam.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public
class
EkpSalaryParam
{
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
9a3374f9
...
...
@@ -820,17 +820,9 @@ public class InsurancesConstants {
*/
/**
* 减员退回的办理意见不能为空
*/
public
static
final
String
REFUND_MESSAGE_IS_EMPTY
=
"办理失败意见不能为空"
;
/**
* 该保单信息已被更新为减员退回
*/
/**
* 该保单信息已被更新为减员成功
* 减员/投保退回的办理意见不能为空
*/
public
static
final
String
ROLLBACK_MESSAGE_IS_EMPTY
=
"办理失败意见不能为空"
;
/**
* 该保单信息已被删除
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* ekp交互失败存储表
* @TableName t_insurance_ekp
*/
@Data
@Tag
(
name
=
"ekp交互失败存储表"
)
public
class
TInsuranceEkp
implements
Serializable
{
/**
* 主键id
*/
private
String
id
;
/**
* 商险id
*/
private
String
detailId
;
/**
* 结算id
*/
private
String
defaultSettleId
;
/**
* 项目编码
*/
private
String
deptNo
;
/**
* 项目名称
*/
private
String
deptName
;
/**
* 客户名称
*/
private
String
customerName
;
/**
* 客户编码
*/
private
String
customerCode
;
/**
* 员工姓名
*/
private
String
empName
;
/**
* 员工身份证号
*/
private
String
empIdcardNo
;
/**
* 发票号
*/
private
String
invoiceNo
;
/**
* 发生日期
*/
private
Date
happenDate
;
/**
* 保单编号
*/
private
String
policyNo
;
/**
* 保险公司名称
*/
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
private
String
insuranceTypeName
;
/**
* 保单开始时间
*/
private
Date
policyStart
;
/**
* 保单结束时间
*/
private
Date
policyEnd
;
/**
* 购买标准
*/
private
String
buyStandard
;
/**
* 医疗额度
*/
private
String
medicalQuota
;
/**
* 身故或残疾额度
*/
private
String
dieDisableQuota
;
/**
* 实际保费
*/
private
String
actualPremium
;
/**
* 预估保费
*/
private
String
estimatePremium
;
/**
* 结算月
*/
private
String
settleMonth
;
/**
* 单据状态
*/
private
String
interactiveType
;
/**
* 重发标识
*/
private
String
resendFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 发送时间
*/
private
Date
pushTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
9a3374f9
...
...
@@ -139,8 +139,8 @@ public class EKPUtil {
TInsuranceSettlePushParam
pushParam
=
new
TInsuranceSettlePushParam
();
param
.
setHappenDate
(
format
);
//ekpId
if
(
null
!=
param
.
getId
()
&&
null
!=
param
.
getDefaultSettleId
()){
pushParam
.
setFd_3afa8a70006bea
(
param
.
getId
()+
CommonConstants
.
DOWN_LINE_STRING
+
param
.
getDefaultSettleId
());
if
(
null
!=
param
.
get
Detail
Id
()
&&
null
!=
param
.
getDefaultSettleId
()){
pushParam
.
setFd_3afa8a70006bea
(
param
.
get
Detail
Id
()+
CommonConstants
.
DOWN_LINE_STRING
+
param
.
getDefaultSettleId
());
}
else
{
pushParam
.
setFd_3afa8a70006bea
(
CommonConstants
.
EMPTY_STRING
);
}
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
View file @
9a3374f9
...
...
@@ -8,7 +8,6 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Date
;
/**
* @author zhaji
...
...
@@ -19,6 +18,7 @@ import java.util.Date;
public
class
EKPInteractiveParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 主键
*/
...
...
@@ -26,6 +26,12 @@ public class EKPInteractiveParam implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 商险id
*/
@Schema
(
description
=
"主键"
)
private
String
detailId
;
/**
* 结算id
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/Insurance
Refund
ImportParam.java
→
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/Insurance
Handle
ImportParam.java
View file @
9a3374f9
...
...
@@ -8,12 +8,12 @@ import java.io.Serializable;
/**
* @author zhaji
* @description 减员办理导入校验
* @description
投保成功/退回/
减员办理导入校验
* @date 2022-08-22 10:15:19
*/
@Data
@Tag
(
name
=
"减员办理导入参数"
)
public
class
Insurance
Refund
ImportParam
implements
Serializable
{
@Tag
(
name
=
"
投保成功/退回/
减员办理导入参数"
)
public
class
Insurance
Handle
ImportParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
9a3374f9
...
...
@@ -244,6 +244,23 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
rollBackInsurance
(
user
,
paramList
);
}
/**
* 投保成功/退回办理导入
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceHandleImportParam>>}
*/
@Operation
(
summary
=
"投保成功/退回办理导入"
,
description
=
"投保成功/退回办理导入"
)
@PostMapping
(
"/insuranceHandleImport"
)
public
R
<
List
<
InsuranceHandleImportParam
>>
insuranceHandleImport
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceHandleImportParam
>
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
return
tInsuranceDetailService
.
insuranceHandleImport
(
user
,
param
);
}
/**
* 办理成功
*
...
...
@@ -410,11 +427,11 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param insuranceRefundImportList 减员信息
* @return {@link R<List<
InsuranceRefundImportParam
>>}
* @return {@link R<List<
InsuranceHandleImportParam
>>}
*/
@Operation
(
summary
=
"减员办理导入"
,
description
=
"减员办理导入"
)
@PostMapping
(
"/insuranceRefundImport"
)
public
R
insuranceRefundImport
(
@RequestBody
List
<
Insurance
Refund
ImportParam
>
insuranceRefundImportList
)
{
public
R
insuranceRefundImport
(
@RequestBody
List
<
Insurance
Handle
ImportParam
>
insuranceRefundImportList
)
{
return
tInsuranceDetailService
.
insuranceRefundImport
(
insuranceRefundImportList
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceEkpMapper.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Mapper
* @createDate 2022-08-23 17:02:49
* @Entity generator.domain.TInsuranceEkp
*/
@Mapper
public
interface
TInsuranceEkpMapper
extends
BaseMapper
<
TInsuranceEkp
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
9a3374f9
...
...
@@ -159,6 +159,16 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
<
List
<
InsuranceListVO
>>
rollBackInsurance
(
YifuUser
user
,
List
<
InsuranceHandleParam
>
paramList
);
/**
* 投保成功/退回办理导入
*
* @author licancan
* @param user
* @param param
* @return {@link R<List<InsuranceHandleImportParam>>}
*/
R
<
List
<
InsuranceHandleImportParam
>>
insuranceHandleImport
(
YifuUser
user
,
List
<
InsuranceHandleImportParam
>
param
);
/**
* 办理成功
*
...
...
@@ -262,7 +272,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param insuranceRefundImportList 减员办理导入
* @return {@link R}
*/
R
insuranceRefundImport
(
List
<
Insurance
Refund
ImportParam
>
insuranceRefundImportList
);
R
insuranceRefundImport
(
List
<
Insurance
Handle
ImportParam
>
insuranceRefundImportList
);
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceEkpService.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp
;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service
* @createDate 2022-08-23 17:02:49
*/
public
interface
TInsuranceEkpService
extends
IService
<
TInsuranceEkp
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
9a3374f9
...
...
@@ -1073,6 +1073,54 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 投保成功/退回办理导入
*
* @param user
* @param param
* @return {@link R<List<InsuranceHandleImportParam>>}
* @author licancan
*/
@Override
public
R
<
List
<
InsuranceHandleImportParam
>>
insuranceHandleImport
(
YifuUser
user
,
List
<
InsuranceHandleImportParam
>
param
)
{
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
map
=
insuranceChangeCheck
(
param
,
user
,
false
);
//检验成功的数据
List
<
InsuranceHandleImportParam
>
successList
=
map
.
get
(
"successList"
);
//校验失败的数据
List
<
InsuranceHandleImportParam
>
errorList
=
map
.
get
(
"errorList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//投保成功的数据
List
<
InsuranceHandleImportParam
>
collectSuccess
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
SUCCESS
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
//投保退回的数据
List
<
InsuranceHandleImportParam
>
collectRollBack
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
FAILED
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
//投保成功
if
(
CollectionUtils
.
isNotEmpty
(
collectSuccess
)){
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
collectSuccess
.
stream
().
forEach
(
e
->{
InsuranceHandleParam
handleParam
=
new
InsuranceHandleParam
();
handleParam
.
setId
(
e
.
getId
());
handleParam
.
setRemark
(
e
.
getRemark
());
list
.
add
(
handleParam
);
});
this
.
successfulInsurance
(
user
,
list
);
}
//投保退回
if
(
CollectionUtils
.
isNotEmpty
(
collectRollBack
)){
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
collectRollBack
.
stream
().
forEach
(
e
->{
InsuranceHandleParam
handleParam
=
new
InsuranceHandleParam
();
handleParam
.
setId
(
e
.
getId
());
handleParam
.
setRemark
(
e
.
getRemark
());
list
.
add
(
handleParam
);
});
this
.
rollBackInsurance
(
user
,
list
);
}
}
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
/**
* 办理成功
*
...
...
@@ -3185,18 +3233,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
R
insuranceRefundImport
(
List
<
Insurance
Refund
ImportParam
>
insuranceRefundImportList
)
{
public
R
insuranceRefundImport
(
List
<
Insurance
Handle
ImportParam
>
insuranceRefundImportList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
insuranceRefundImportList
))
{
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_REFUND_IMPORT_LIST_IS_EMPTY
);
}
Map
<
String
,
List
<
Insurance
RefundImportParam
>>
map
=
insuranceChangeCheck
(
insuranceRefundImportList
,
user
);
List
<
Insurance
Refund
ImportParam
>
successList
=
map
.
get
(
"successList"
);
List
<
Insurance
Refund
ImportParam
>
errorList
=
map
.
get
(
"errorList"
);
Map
<
String
,
List
<
Insurance
HandleImportParam
>>
map
=
insuranceChangeCheck
(
insuranceRefundImportList
,
user
,
true
);
List
<
Insurance
Handle
ImportParam
>
successList
=
map
.
get
(
"successList"
);
List
<
Insurance
Handle
ImportParam
>
errorList
=
map
.
get
(
"errorList"
);
//减员退回
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
for
(
Insurance
Refund
ImportParam
param
:
successList
)
{
for
(
Insurance
Handle
ImportParam
param
:
successList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
LambdaUpdateWrapper
<
TInsuranceRefund
>
refund
=
new
LambdaUpdateWrapper
<>();
refund
.
eq
(
TInsuranceRefund
::
getInsDetailId
,
param
.
getId
());
...
...
@@ -3228,7 +3276,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
/**
...
...
@@ -3284,7 +3332,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
))
{
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
get
Detail
Id
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
@@ -3292,7 +3340,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceOperateService
.
save
(
insuranceOperate
);
}
else
{
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getId
()))
{
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
get
Detail
Id
()))
{
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
errorList
.
add
(
success
);
}
...
...
@@ -4246,17 +4294,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
/**
* 减员办理校验
*
投保成功/退回/
减员办理校验
*
* @author zhaji
* @param settleMonthCheckList 减员办理校验
* @return {@link R}
* @param checkList 投保成功/退回/减员办理校验
* @param user
* @param flag true 减员 false 投保成功/退回
* @return {@link Map<String, List<InsuranceHandleImportParam>}
*/
private
Map
<
String
,
List
<
InsuranceRefundImportParam
>>
insuranceChangeCheck
(
List
<
InsuranceRefundImportParam
>
settleMonthCheckList
,
YifuUser
user
)
{
Map
<
String
,
List
<
InsuranceRefundImportParam
>>
map
=
new
HashMap
<>(
16
);
List
<
InsuranceRefundImportParam
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceRefundImportParam
>
successList
=
new
ArrayList
<>();
for
(
InsuranceRefundImportParam
param
:
settleMonthCheckList
)
{
private
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
insuranceChangeCheck
(
List
<
InsuranceHandleImportParam
>
checkList
,
YifuUser
user
,
Boolean
flag
)
{
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
map
=
new
HashMap
<>(
16
);
List
<
InsuranceHandleImportParam
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceHandleImportParam
>
successList
=
new
ArrayList
<>();
List
<
InsuranceHandleImportParam
>
distinctList
=
checkList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//定义外层循环标识,方便去重的时候跳出
outer:
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
InsuranceHandleImportParam
param
=
distinctList
.
get
(
i
);
//办理结果
String
handType
=
param
.
getHandType
();
if
(
StringUtils
.
isBlank
(
handType
)){
...
...
@@ -4272,7 +4326,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//办理意见
String
remark
=
param
.
getRemark
();
if
(
InsurancesConstants
.
FAILED
.
equals
(
handType
)
&&
StringUtils
.
isBlank
(
remark
)){
param
.
setErrorMessage
(
InsurancesConstants
.
R
EFUND
_MESSAGE_IS_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
R
OLLBACK
_MESSAGE_IS_EMPTY
);
errorList
.
add
(
param
);
continue
;
}
...
...
@@ -4348,15 +4402,33 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司名称、险种名称、保单开始日期、保单结束日期、购买标准 去重
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceHandleImportParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
&&
param
.
getEmpIdcardNo
().
equals
(
repeat
.
getEmpIdcardNo
())
&&
param
.
getInsuranceCompanyName
().
equals
(
repeat
.
getInsuranceCompanyName
())
&&
param
.
getInsuranceTypeName
().
equals
(
repeat
.
getInsuranceTypeName
())
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
errorList
.
add
(
param
);
continue
outer
;
}
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
)
.
eq
(
TInsuranceDetail
::
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
queryWrapper
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
:
:
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
:
:
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail
:
:
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
:
:
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
policyStart
)
)
.
eq
(
TInsuranceDetail
:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
policyEnd
))
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
TInsuranceDetail
insuranceDetail
=
getOne
(
queryWrapper
);
...
...
@@ -4375,73 +4447,105 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//投保办理状态
Integer
buyHandleStatus
=
insuranceDetail
.
getBuyHandleStatus
();
//减员状态
Integer
reduceHandleStatus
=
insuranceDetail
.
getReduceHandleStatus
();
//商险待投保,无法办理
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_ONE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//商险投保中,无法办理
if
(
CommonConstants
.
TWO_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_TWO_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//商险投保成功,无法办理
if
(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
null
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_THREE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//商险投保退回,无法办理
if
(
CommonConstants
.
FOUR_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_FOUR_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
null
!=
reduceHandleStatus
){
//待减员
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_ONE_HANDLE_ERROR
);
if
(
flag
){
//减员办理
//投保办理状态
Integer
buyHandleStatus
=
insuranceDetail
.
getBuyHandleStatus
();
//减员状态
Integer
reduceHandleStatus
=
insuranceDetail
.
getReduceHandleStatus
();
//商险待投保,无法办理
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_ONE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//
已减员
if
(
CommonConstants
.
THREE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_THREE
_HANDLE_ERROR
);
//
商险投保中,无法办理
if
(
CommonConstants
.
TWO_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_TWO
_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//减员退回
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_FOUR_HANDLE_ERROR
);
//商险投保成功,无法办理
if
(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
null
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_THREE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//商险投保退回,无法办理
if
(
CommonConstants
.
FOUR_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_FOUR_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
null
!=
reduceHandleStatus
){
//待减员
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_ONE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//已减员
if
(
CommonConstants
.
THREE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_THREE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//减员退回
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_FOUR_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
}
}
else
{
//投保成功/退回办理
//商险不是投保中,无法办理
if
(
CommonConstants
.
TWO_INT
!=
insuranceDetail
.
getBuyHandleStatus
()){
String
buyHandleStatus
=
getBuyHandleStatus
(
insuranceDetail
.
getBuyHandleStatus
());
param
.
setErrorMessage
(
"当前为"
+
buyHandleStatus
+
"状态,不可办理"
);
errorList
.
add
(
param
);
continue
;
}
}
param
.
setId
(
detailId
);
boolean
b
=
successList
.
stream
().
anyMatch
(
u
->
u
.
getEmpName
().
equals
(
param
.
getEmpName
())
&&
u
.
getEmpIdcardNo
().
equals
(
param
.
getEmpIdcardNo
())
&&
u
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())
&&
u
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())
&&
u
.
getPolicyStart
().
equals
(
param
.
getPolicyStart
())
&&
u
.
getPolicyEnd
().
equals
(
param
.
getPolicyEnd
())
&&
u
.
getBuyStandard
().
equals
(
param
.
getBuyStandard
())
);
if
(!
b
){
successList
.
add
(
param
);
}
successList
.
add
(
param
);
}
map
.
put
(
"successList"
,
successList
);
map
.
put
(
"errorList"
,
errorList
);
return
map
;
}
/**
* 获取投保状态的值
*
* @author licancan
* @param buyHandleStatus
* @return {@link String}
*/
private
String
getBuyHandleStatus
(
Integer
buyHandleStatus
){
String
result
;
switch
(
buyHandleStatus
){
case
1
:
result
=
"待投保"
;
break
;
case
2
:
result
=
"投保中"
;
break
;
case
3
:
result
=
"已投保"
;
break
;
case
4
:
result
=
"投保退回"
;
break
;
case
5
:
result
=
"已减员"
;
break
;
default
:
result
=
""
;
}
return
result
;
}
/**
* 校验所属项目
*
...
...
@@ -4919,7 +5023,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
SettleMonthChangeCheckParam
param
:
list
)
{
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
ekpInteractiveParam
.
setId
(
param
.
getId
());
ekpInteractiveParam
.
set
Detail
Id
(
param
.
getId
());
ekpInteractiveParam
.
setSettleMonth
(
param
.
getSettleMonth
());
ekpInteractiveParam
.
setDeptName
(
projectSetInfoVo
.
getDepartName
());
ekpInteractiveParam
.
setCustomerName
(
projectSetInfoVo
.
getCustomerName
());
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceEkpServiceImpl.java
0 → 100644
View file @
9a3374f9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEkpMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEkpService
;
import
org.springframework.stereotype.Service
;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Service实现
* @createDate 2022-08-23 17:02:49
*/
@Service
public
class
TInsuranceEkpServiceImpl
extends
ServiceImpl
<
TInsuranceEkpMapper
,
TInsuranceEkp
>
implements
TInsuranceEkpService
{
}
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceEkpMapper.xml
0 → 100644
View file @
9a3374f9
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEkpMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp"
>
<id
property=
"id"
column=
"id"
jdbcType=
"VARCHAR"
/>
<result
property=
"detailId"
column=
"DETAIL_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"defaultSettleId"
column=
"DEFAULT_SETTLE_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptName"
column=
"DEPT_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"customerName"
column=
"CUSTOMER_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"customerCode"
column=
"CUSTOMER_CODE"
jdbcType=
"VARCHAR"
/>
<result
property=
"empName"
column=
"EMP_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"empIdcardNo"
column=
"EMP_IDCARD_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"invoiceNo"
column=
"INVOICE_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"happenDate"
column=
"HAPPEN_DATE"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"policyNo"
column=
"POLICY_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceCompanyName"
column=
"INSURANCE_COMPANY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeName"
column=
"INSURANCE_TYPE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyStart"
column=
"POLICY_START"
jdbcType=
"DATE"
/>
<result
property=
"policyEnd"
column=
"POLICY_END"
jdbcType=
"DATE"
/>
<result
property=
"buyStandard"
column=
"BUY_STANDARD"
jdbcType=
"VARCHAR"
/>
<result
property=
"medicalQuota"
column=
"MEDICAL_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"dieDisableQuota"
column=
"DIE_DISABLE_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"actualPremium"
column=
"ACTUAL_PREMIUM"
jdbcType=
"VARCHAR"
/>
<result
property=
"estimatePremium"
column=
"ESTIMATE_PREMIUM"
jdbcType=
"VARCHAR"
/>
<result
property=
"settleMonth"
column=
"SETTLE_MONTH"
jdbcType=
"VARCHAR"
/>
<result
property=
"interactiveType"
column=
"INTERACTIVE_TYPE"
jdbcType=
"VARCHAR"
/>
<result
property=
"resendFlag"
column=
"RESEND_FLAG"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushTime"
column=
"PUSH_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,DETAIL_ID,DEFAULT_SETTLE_ID,
DEPT_NO,DEPT_NAME,CUSTOMER_NAME,
CUSTOMER_CODE,EMP_NAME,EMP_IDCARD_NO,
INVOICE_NO,HAPPEN_DATE,POLICY_NO,
INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,POLICY_START,
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME
</sql>
</mapper>
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
9a3374f9
...
...
@@ -1543,24 +1543,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
int
ownNum
=
0
;
// 自有员工应发金额
BigDecimal
ownMoney
=
BigDecimal
.
ZERO
;
// 发薪特殊值人数
int
specialNums
=
0
;
// 发薪特殊值应发总额
BigDecimal
specialMoney
=
BigDecimal
.
ZERO
;
// 薪资员工发放稿酬/劳务费人数
int
salaryNums
=
0
;
// 薪资员工发放稿酬/劳务费总额
BigDecimal
salaryMoney
=
BigDecimal
.
ZERO
;
// 本月是否重复金额人数
int
repeatNums
=
0
;
// 本月是否重复金额总额
BigDecimal
repeatMoney
=
BigDecimal
.
ZERO
;
BigDecimal
relaySalary
;
//工资应发
// 劳务费、稿酬是否含有发薪false:否;true:是
boolean
haveSalaryFlag
=
false
;
// 是否含有特殊金额false:否;true:是
boolean
haveSpecialFlag
=
false
;
// 是否重复金额false:否;true:是
boolean
repeatFlag
=
false
;
...
...
@@ -1575,7 +1560,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
Map
<
String
,
List
<
TSalaryAccountItem
>>
itemMap
=
tSalaryAccountItemService
.
getAllItemVoList
(
idCardList
,
invoiceTitle
);
for
(
int
i
=
CommonConstants
.
ZERO_INT
;
i
<
size
;
i
++)
{
relaySalary
=
BigDecimal
.
ZERO
;
a
=
new
TSalaryAccount
();
// 本次实发
BigDecimal
actualSalarySumNow
=
BigDecimal
.
ZERO
;
...
...
@@ -1586,9 +1570,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(!
haveSalaryFlag
&&
a
.
getHaveSalaryFlag
()
!=
null
&&
a
.
getHaveSalaryFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSalaryFlag
=
true
;
}
if
(!
haveSpecialFlag
&&
a
.
getHaveSpecialFlag
()
!=
null
&&
a
.
getHaveSpecialFlag
()
==
CommonConstants
.
ONE_INT
)
{
haveSpecialFlag
=
true
;
}
if
(!
repeatFlag
&&
a
.
getIsRepeat
()
!=
null
&&
a
.
getIsRepeat
()
==
CommonConstants
.
ONE_INT
)
{
repeatFlag
=
true
;
}
...
...
@@ -1606,29 +1587,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
saiList
.
add
(
sai
);
}
}
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
ownNum
++;
ownMoney
=
ownMoney
.
add
(
relaySalary
);
}
// 发薪特殊值人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getHaveSpecialFlag
())
&&
a
.
getHaveSpecialFlag
()
==
1
)
{
specialNums
++;
specialMoney
=
specialMoney
.
add
(
relaySalary
);
}
// 薪资员工发放稿酬/劳务费人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getHaveSalaryFlag
())
&&
a
.
getHaveSalaryFlag
()
==
1
)
{
salaryNums
++;
salaryMoney
=
salaryMoney
.
add
(
relaySalary
);
}
// 本月是否重复金额人数以及应发金额
if
(
Common
.
isNotNull
(
a
.
getIsRepeat
())
&&
a
.
getIsRepeat
()
==
1
)
{
repeatNums
++;
repeatMoney
=
repeatMoney
.
add
(
relaySalary
);
}
//累计扣税list
asList
=
this
.
getLaborAsList
(
itemMap
.
get
(
a
.
getEmpIdcard
()),
a
.
getSettlementMonth
());
...
...
@@ -1639,6 +1597,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
calculationLabor
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
// 自有员工以及自有员工应发金额
if
(
Common
.
isNotNull
(
a
.
getOwnFlag
())
&&
a
.
getOwnFlag
()
==
1
)
{
ownNum
++;
ownMoney
=
ownMoney
.
add
(
a
.
getRelaySalaryUnit
());
}
a
.
setSaiList
(
saiList
);
aList
.
add
(
a
);
}
catch
(
Exception
e
)
{
...
...
@@ -1659,13 +1623,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
haveSpecialFlag
)
{
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
repeatFlag
)
{
salary
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
9a3374f9
...
...
@@ -264,9 +264,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
auditFlag
))
{
tSalaryStandard
.
setStatus
(
CommonConstants
.
TWO_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ZERO_STRING
);
tApprovalRecord
.
setNodeId
(
"审核通过"
);
}
else
{
tSalaryStandard
.
setStatus
(
CommonConstants
.
FIVE_INT
);
tApprovalRecord
.
setApprovalResult
(
CommonConstants
.
ONE_STRING
);
tApprovalRecord
.
setNodeId
(
"审核不通过"
);
}
if
(
Common
.
isNotNull
(
auditRemark
))
{
tSalaryStandard
.
setAuditRemark
(
auditRemark
);
...
...
@@ -280,7 +282,6 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
tApprovalRecord
.
setApprovalMan
(
user
.
getId
());
tApprovalRecord
.
setApprovalManName
(
user
.
getNickname
());
tApprovalRecord
.
setApprovalTime
(
DateUtil
.
getCurrentDateTime
());
tApprovalRecord
.
setNodeId
(
"审核"
);
approvalRecordService
.
save
(
tApprovalRecord
);
}
return
R
.
ok
();
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSpecialDeducationSumServiceImpl.java
View file @
9a3374f9
...
...
@@ -12,6 +12,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSpecialDeducationSumMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSpecialDeducationSumService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
...
...
@@ -99,12 +100,11 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
}
/**
* @param sdsList
* @Description: 保存专项
* @Author: hgw
* @Date: 2019/10/14 14:48
* @return: com.yifu.cloud.v1.common.core.util.R
**/
* @Author fxj
* @Description 保存专项
* @Date 10:05 2022/8/23
**/
@Transactional
@Override
public
R
<
List
<
ErrorMessage
>>
uploadSds
(
List
<
TSpecialDeducationSum
>
sdsList
)
{
if
(
Common
.
isNotNull
(
sdsList
))
{
...
...
@@ -149,7 +149,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
s
.
setCreateBy
(
String
.
valueOf
(
user
.
getId
()));
}
if
(
this
.
saveBatch
(
sdsList
)){
return
R
.
failed
(
CommonConstants
.
SAVE_SUCCESS
);
return
R
.
ok
(
null
,
CommonConstants
.
SAVE_SUCCESS
);
}
else
{
return
R
.
failed
(
CommonConstants
.
SAVE_FAILED
);
}
...
...
@@ -163,7 +163,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
int
i
=
0
;
for
(
TSpecialDeducationSum
data:
sdsList
)
{
i
++;
errorMessage
=
util1
.
checkEntity
(
data
,
-
1
);
errorMessage
=
util1
.
checkEntity
(
data
,
i
);
if
(
Common
.
isNotNull
(
errorMessage
))
{
errorMessages
.
add
(
errorMessage
);
}
else
{
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
9a3374f9
...
...
@@ -275,85 +275,75 @@ public class SalaryAccountUtil implements Serializable {
}
}
}
must
=
null
;
for
(
Map
.
Entry
<
String
,
Boolean
>
entry
:
isMustMap
.
entrySet
())
{
if
(
Boolean
.
TRUE
.
equals
(
entry
.
getValue
()))
{
if
(
Common
.
isEmpty
(
must
))
{
must
=
entry
.
getKey
();
}
else
{
must
=
must
.
concat
(
"、"
).
concat
(
entry
.
getKey
());
if
(
errorFlag
)
{
must
=
null
;
for
(
Map
.
Entry
<
String
,
Boolean
>
entry
:
isMustMap
.
entrySet
())
{
if
(
Boolean
.
TRUE
.
equals
(
entry
.
getValue
()))
{
if
(
Common
.
isEmpty
(
must
))
{
must
=
entry
.
getKey
();
}
else
{
must
=
must
.
concat
(
"、"
).
concat
(
entry
.
getKey
());
}
}
}
}
if
(
Common
.
isNotNull
(
must
))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:"
+
must
+
"列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
annualBonusFlag
&&
Common
.
isEmpty
(
entity
.
getAnnualBonusType
()))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【实发劳务费】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
Common
.
isEmpty
(
entity
.
getIsPersonTax
()))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【是否个人承担部分税费】列_不可为空"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"4"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【稿酬】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
Common
.
isNotNull
(
must
))
{
error
=
"第"
+
(
i
+
2
)
+
"行:"
+
must
+
"列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
// 应发、实发、实发劳务费不可都为空
if
(
relaySalary
==
null
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【应发工资】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
annualBonusFlag
&&
Common
.
isEmpty
(
entity
.
getAnnualBonusType
()))
{
error
=
"第"
+
(
i
+
2
)
+
"行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:【实发劳务费】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
Common
.
isEmpty
(
entity
.
getIsPersonTax
()))
{
error
=
"第"
+
(
i
+
2
)
+
"行:【是否个人承担部分税费】列_不可为空"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"4"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:【稿酬】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
// 版本2.6.6判重:对同一“项目”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
entity
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
if
(
relaySalary
!=
null
)
{
relaySalary
=
relaySalary
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
// 应发、实发、实发劳务费不可都为空
if
(
relaySalary
==
null
&&
actualSalarySum
==
null
)
{
error
=
"第"
+
(
i
+
2
)
+
"行:【应发工资】列_不可缺少"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
new
BigDecimal
(
"3500"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
||
new
BigDecimal
(
"5000"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
// 版本2.6.6判重:对同一“项目”、同一“结算月份”、同一“报表类型”、同一“工资月份”、同一“身份证号”、同一“应发金额”进行校验
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
entity
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
if
(
relaySalary
!=
null
)
{
relaySalary
=
relaySalary
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
if
(
new
BigDecimal
(
"3500"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
||
new
BigDecimal
(
"5000"
).
compareTo
(
relaySalary
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
}
if
(
actualSalarySum
!=
null
)
{
actualSalarySum
=
actualSalarySum
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
actualSalarySum
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
if
(
actualSalarySum
!=
null
)
{
actualSalarySum
=
actualSalarySum
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
actualSalarySum
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
}
if
(
new
BigDecimal
(
"3500"
).
compareTo
(
actualSalarySum
)
==
CommonConstants
.
ZERO_INT
||
new
BigDecimal
(
"5000"
).
compareTo
(
actualSalarySum
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
if
(
Common
.
isNotNull
(
checkListY
)
&&
checkListY
.
contains
(
entity
.
getEmpIdcard
()))
{
entity
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
}
if
(
Common
.
isNotNull
(
checkListY
)
&&
checkListY
.
contains
(
entity
.
getEmpIdcard
()))
{
entity
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
if
(
errorFlag
)
{
if
(
Common
.
isNotNull
(
entity
.
getSalaryStyle
()))
{
salaryStyle
=
entity
.
getSalaryStyle
();
}
else
if
(
configSalary
.
getGrantType
()
!=
null
)
{
...
...
@@ -426,16 +416,16 @@ public class SalaryAccountUtil implements Serializable {
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankProvince
(
Integer
.
parseInt
(
areaStr
));
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行省错误:"
+
entity
.
getBankProvince
();
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行省错误:"
+
entity
.
getBankProvince
();
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankCity
().
trim
()
areaStr
=
ExcelUtil
.
getRedisAreaValue
(
CacheConstants
.
AREA_VALUE
+
entity
.
getBankCity
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
entity
.
getBankProvince
().
trim
());
if
(
Common
.
isNotNull
(
areaStr
))
{
newEmp
.
setBankCity
(
Integer
.
parseInt
(
areaStr
));
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行市错误:"
+
entity
.
getBankCity
();
error
=
"第"
+
(
i
+
2
)
+
"行:新员工-开户行市错误:"
+
entity
.
getBankCity
();
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
...
...
@@ -496,7 +486,7 @@ public class SalaryAccountUtil implements Serializable {
}
saveNewEmpReturn
=
tSalaryEmployeeService
.
saveNewSalaryEmployee
(
newEmp
);
if
(
Common
.
isNotNull
(
saveNewEmpReturn
))
{
error
=
"第"
+
(
i
+
2
)
+
"行:该员工新建失败:【"
+
saveNewEmpReturn
+
"】"
;
error
=
"第"
+
(
i
+
2
)
+
"行:该员工新建失败:【"
+
saveNewEmpReturn
+
"】"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
...
...
@@ -504,7 +494,7 @@ public class SalaryAccountUtil implements Serializable {
}
else
{
if
(
"3"
.
equals
(
salaryType
)
||
"4"
.
equals
(
salaryType
))
{
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
}
else
{
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
}
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
...
@@ -625,7 +615,7 @@ public class SalaryAccountUtil implements Serializable {
entity
.
setBankCity
(
null
);
}
}
if
(!
"3"
.
equals
(
salaryType
)
&&
!
"4"
.
equals
(
salaryType
))
{
if
(!
"3"
.
equals
(
salaryType
)
&&
!
"4"
.
equals
(
salaryType
))
{
if
(
emp
.
getTaxMonth
().
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
entity
.
setTaxMonth
(
emp
.
getTaxMonth
().
substring
(
0
,
6
));
}
else
if
(
emp
.
getTaxMonth
().
length
()
<
CommonConstants
.
dingleDigitIntArray
[
6
])
{
...
...
@@ -650,7 +640,7 @@ public class SalaryAccountUtil implements Serializable {
}
else
{
if
(
"3"
.
equals
(
salaryType
)
||
"4"
.
equals
(
salaryType
))
{
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、手机号码!"
;
}
else
{
}
else
{
error
=
"第"
+
(
i
+
2
)
+
"行:薪酬人员查询处中,该客户下无此员工,请添加<是否新员工(默认否)>列,并录入身份证号、开户行总行、开户行省、开户行市、银行卡号、计税月份、手机号码!"
;
}
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
9a3374f9
...
...
@@ -54,7 +54,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -148,7 +148,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 就职岗位
*/
@Length
(
max
=
30
,
message
=
"岗位 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"岗位"
,
maxLength
=
30
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"岗位"
,
maxLength
=
30
)
@Schema
(
description
=
"岗位"
)
@ExcelProperty
(
"岗位"
)
private
String
post
;
...
...
@@ -166,7 +166,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 工时制:1标准工时 2 综合工时 3不定时工时制
*/
@Length
(
max
=
1
,
message
=
"工时制 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
50
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
50
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@Schema
(
description
=
"工时制:1标准工时 2 综合工时 3不定时工时制"
)
@ExcelProperty
(
"工时制"
)
private
String
workingHours
;
...
...
@@ -174,7 +174,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 民族
*/
@Length
(
max
=
32
,
message
=
"民族 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"民族"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATIONAL
)
@Schema
(
description
=
"民族"
)
@ExcelProperty
(
"民族"
)
private
String
empNational
;
...
...
@@ -239,7 +239,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 学历名称
*/
@ExcelAttribute
(
name
=
"学历"
)
@ExcelAttribute
(
name
=
"学历"
,
isNotEmpty
=
true
)
@NotNull
(
message
=
"学历不可为空"
)
@Schema
(
description
=
"学历:派增只做记录"
)
@ExcelProperty
(
value
=
"学历"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
9a3374f9
...
...
@@ -1930,11 +1930,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isEmpty
(
empVo
)){
if
(
Common
.
isEmpty
(
excel
.
getFileProvince
())
||
Common
.
isEmpty
(
excel
.
getFileCity
())
||
Common
.
isEmpty
(
excel
.
getIdCardProvince
())
||
Common
.
isEmpty
(
excel
.
getIdCardCity
())
||
Common
.
isEmpty
(
excel
.
getWorkingHours
())
||
Common
.
isEmpty
(
excel
.
getEmpNational
())
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getPost
())){
||
Common
.
isEmpty
(
excel
.
getPost
())
||
Common
.
isEmpty
(
excel
.
getEducationName
())
||
Common
.
isEmpty
(
excel
.
getContractName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
return
true
;
}
...
...
@@ -1958,6 +1962,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
}
Date
contractDateTemp
=
excel
.
getContractStart
();
/*项目档案有可用状态的合同:
不对合同做判断,取值:项目档案的合同;
项目档案无可用状态的合同:
...
...
@@ -2093,7 +2098,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
//校验各项基数
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
)){
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
,
contractDateTemp
)){
return
true
;
}
}
...
...
@@ -2139,7 +2144,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
false
;
}
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
)
{
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
,
Date
contractDateTemp
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
(
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
...
...
@@ -2183,13 +2188,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
flag
=
(
Common
.
isNotNull
(
excel
.
getContractStart
()
)
&&
((!
excel
.
getContractStart
()
.
equals
(
excel
.
getPensionStart
())
&&
Common
.
isNotNull
(
excel
.
getPensionStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getMedicalStart
())
&&
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getUnemployStart
())
&&
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getBirthStart
())
&&
Common
.
isNotNull
(
excel
.
getBirthStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
||
(!
excel
.
getContractStart
()
.
equals
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))));
flag
=
(
Common
.
isNotNull
(
contractDateTemp
)
&&
((!
contractDateTemp
.
equals
(
excel
.
getPensionStart
())
&&
Common
.
isNotNull
(
excel
.
getPensionStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getMedicalStart
())
&&
Common
.
isNotNull
(
excel
.
getMedicalStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getUnemployStart
())
&&
Common
.
isNotNull
(
excel
.
getUnemployStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getBirthStart
())
&&
Common
.
isNotNull
(
excel
.
getBirthStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getWorkInjuryStart
())
&&
Common
.
isNotNull
(
excel
.
getWorkInjuryStart
()))
||
(!
contractDateTemp
.
equals
(
excel
.
getBigailmentStart
())
&&
Common
.
isNotNull
(
excel
.
getBigailmentStart
()))));
if
(
flag
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR2
)));
return
true
;
...
...
yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
View file @
9a3374f9
...
...
@@ -48,6 +48,6 @@ spring:
activate
:
on-profile
:
dev
redis
:
host
:
1
92.168.1.65
port
:
22
379
host
:
1
27.0.0.1
port
:
6
379
password
:
'
@yf_2017'
\ No newline at end of file
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