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
3e6e75da
Commit
3e6e75da
authored
Aug 01, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
cff2366e
84c5b112
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
1530 additions
and
1217 deletions
+1530
-1217
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+6
-0
EmpContractDispatchVo.java
...cloud/plus/v1/yifu/archives/vo/EmpContractDispatchVo.java
+40
-0
EmpProjectDispatchVo.java
.../cloud/plus/v1/yifu/archives/vo/EmpProjectDispatchVo.java
+74
-0
ProjectSetInfoVo.java
...yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
+22
-0
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+2
-2
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+4
-0
TSettleDomainMapper.xml
...ves-biz/src/main/resources/mapper/TSettleDomainMapper.xml
+10
-6
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+2
-0
ExcelAttribute.java
...oud.plus.v1/yifu/common/core/constant/ExcelAttribute.java
+6
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+20
-0
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+5
-1
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+9
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+1
-1
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+54
-8
Dept.java
.../java/com/yifu/cloud/plus/v1/yifu/insurances/vo/Dept.java
+7
-2
UpdateInsuranceSettleParam.java
...lus/v1/yifu/insurances/vo/UpdateInsuranceSettleParam.java
+68
-0
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+30
-1
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+20
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+59
-9
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+217
-23
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+47
-16
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+4
-3
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+1
-1
TPaymentInfo.java
...m/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
+8
-32
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+5
-5
TSocialInfo.java
...om/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
+10
-10
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+5
-5
TDispatchInfoPageVo.java
...ifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoPageVo.java
+55
-0
TDispatchInfoSearchVo.java
...u/cloud/plus/v1/yifu/social/vo/TDispatchInfoSearchVo.java
+19
-0
TPaymentInfoImportLogVo.java
...cloud/plus/v1/yifu/social/vo/TPaymentInfoImportLogVo.java
+6
-6
TPaymentInfoVo.java
...com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
+0
-32
TSocialInfoVo.java
.../com/yifu/cloud/plus/v1/yifu/social/vo/TSocialInfoVo.java
+5
-5
PaymentConstants.java
...cloud/plus/v1/yifu/social/constants/PaymentConstants.java
+0
-11
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+4
-7
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+12
-37
TDispatchInfoMapper.java
...cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
+2
-7
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+0
-8
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+1
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+11
-15
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+258
-101
TPaymentInfoImportLogServiceImpl.java
...social/service/impl/TPaymentInfoImportLogServiceImpl.java
+1
-1
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+354
-582
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+3
-3
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+27
-0
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+31
-11
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+5
-69
TPreDispatchInfoMapper.xml
...-biz/src/main/resources/mapper/TPreDispatchInfoMapper.xml
+0
-196
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
3e6e75da
...
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
@@ -110,12 +111,14 @@ public class TEmployeeContractInfo extends BaseEntity {
@NotBlank
(
message
=
"合同起始时间不能为空"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同起始时间"
,
name
=
"contractStart"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
Date
contractStart
;
/**
* 合同到期时间
*/
@ExcelAttribute
(
name
=
"合同到期时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同到期时间"
,
name
=
"contractEnd"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
Date
contractEnd
;
/**
* 项目名称
...
...
@@ -204,6 +207,7 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"入职日期"
)
@Schema
(
description
=
"入职日期"
,
name
=
"enjoinDate"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
enjoinDate
;
/**
...
...
@@ -291,12 +295,14 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"试用期开始时间"
)
@Schema
(
description
=
"合同试用期开始时间"
,
name
=
"periodStart"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
periodStart
;
/**
* 合同试用期结束时间
*/
@ExcelAttribute
(
name
=
"试用期结束时间"
)
@Schema
(
description
=
"合同试用期结束时间"
,
name
=
"periodEnd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
periodEnd
;
/**
* 试用期工资元/月
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpContractDispatchVo.java
View file @
3e6e75da
...
...
@@ -160,4 +160,44 @@ public class EmpContractDispatchVo implements Serializable {
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
200
)
@Schema
(
description
=
"备注"
,
name
=
"remark"
)
private
String
remark
;
/**
* 档案-省
*/
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
""
)
@Schema
(
description
=
"档案-省"
,
name
=
"fileProvince"
)
private
Integer
fileProvince
;
/**
* 档案-市
*/
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
,
name
=
"fileCity"
)
private
Integer
fileCity
;
/**
* 档案-县
*/
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"fileCity"
)
@Schema
(
description
=
"档案-县"
,
name
=
"fileTown"
)
private
Integer
fileTown
;
/**
* 客户id
*/
@Schema
(
description
=
"客户id"
)
private
String
customerId
;
/**
* 客户编码
*/
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
/**
* 项目
*/
@NotBlank
(
message
=
"项目不能为空"
)
@Length
(
max
=
32
,
message
=
"项目不能超过32个字符"
)
@ExcelAttribute
(
name
=
"项目"
,
errorInfo
=
"项目不能为空"
,
isOrgan
=
true
,
maxLength
=
32
)
@Schema
(
description
=
"项目"
,
name
=
"settleDomain"
)
private
String
settleDomain
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpProjectDispatchVo.java
View file @
3e6e75da
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
...
...
@@ -9,6 +13,7 @@ import lombok.Data;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* @Author fxj
...
...
@@ -97,4 +102,73 @@ public class EmpProjectDispatchVo implements Serializable {
@Schema
(
description
=
"员工项目编码"
)
@Size
(
max
=
20
,
message
=
"员工项目编码不可超过20位"
)
private
String
empNo
;
/**
* 创建者-姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
/**
* 创建者
*/
@Schema
(
description
=
"创建人"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelIgnore
private
String
createBy
;
/**
* 业务类型一级分类
*/
@Schema
(
description
=
"业务类型一级分类"
)
private
String
businessPrimaryType
;
/**
* 业务类型二级分类
*/
@Schema
(
description
=
"业务类型二级分类"
)
private
String
businessSecondType
;
/**
* 业务类型三级分类
*/
@Schema
(
description
=
"业务类型三级分类"
)
private
String
businessThirdType
;
/**
* 客户id
*/
@Schema
(
description
=
"客户id"
)
private
String
unitId
;
/**
* 客户名称
*/
@Schema
(
description
=
"客户名称"
)
private
String
unitName
;
/**
* 客户编码
*/
@Schema
(
description
=
"客户编码"
)
private
String
unitNo
;
/**
* 社保-省
*/
@Schema
(
description
=
"社保-省"
)
private
Integer
socialProvince
;
/**
* 社保-市
*/
@Schema
(
description
=
"社保-市"
)
private
Integer
socialCity
;
/**
* 社保-县
*/
@Schema
(
description
=
"社保-县"
)
private
Integer
socialTown
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
View file @
3e6e75da
...
...
@@ -60,5 +60,27 @@ public class ProjectSetInfoVo implements Serializable {
@Schema
(
description
=
"商险结算类型"
)
private
String
insuranceSettleType
=
CommonConstants
.
ONE_STRING
;
/**
* 业务类型一级分类
*/
@Schema
(
description
=
"业务类型一级分类"
)
private
String
businessPrimaryType
;
/**
* 业务类型二级分类
*/
@Schema
(
description
=
"业务类型二级分类"
)
private
String
businessSecondType
;
/**
* 业务类型三级分类
*/
@Schema
(
description
=
"业务类型三级分类"
)
private
String
businessThirdType
;
/**
* 服务状态:0正常 1停止服务
*/
@Schema
(
description
=
"服务状态:0正常 1停止服务"
)
private
String
stopFlag
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
3e6e75da
...
...
@@ -291,7 +291,7 @@ public class TEmployeeContractInfoController {
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询员工合同"
)
@Inner
@PostMapping
(
"/getContractById"
)
public
R
<
TEmployeeContractInfo
>
getContractById
(
@RequestBody
String
id
)
{
return
R
.
ok
(
tEmployeeContractInfoService
.
getById
(
id
)
);
public
TEmployeeContractInfo
getContractById
(
@RequestBody
String
id
)
{
return
tEmployeeContractInfoService
.
getById
(
id
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
3e6e75da
...
...
@@ -2106,6 +2106,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
emp
=
empAddsMap
.
get
(
contract
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
emp
)){
contract
.
setEmpId
(
emp
.
getId
());
contract
.
setEmpNatrue
(
emp
.
getEmpNatrue
());
contract
.
setFileProvince
(
emp
.
getFileProvince
());
contract
.
setFileCity
(
emp
.
getFileCity
());
contract
.
setFileTown
(
emp
.
getFileTown
());
}
}
contractMapper
.
insert
(
contract
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TSettleDomainMapper.xml
View file @
3e6e75da
...
...
@@ -193,12 +193,16 @@
</select>
<select
id=
"getSetInfoByCodes"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo"
>
SELECT a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.INSURANCE_SETTLE_TYPE,
c.ID AS 'customerId',
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode'
a.DEPART_NO,
a.DEPART_NAME,
a.INSURANCE_SETTLE_TYPE,
c.ID AS 'customerId',
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.STOP_FLAG
FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
3e6e75da
...
...
@@ -420,6 +420,8 @@ public interface CommonConstants {
public
static
final
int
TWENTY_INT
=
20
;
public
static
final
int
TWENTY_ONE_STRING
=
21
;
public
static
final
String
ERROR_MSG_PRFIX
=
"error="
;
public
static
final
String
SUCCESS_MSG_PREFIX
=
"success="
;
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ExcelAttribute.java
View file @
3e6e75da
...
...
@@ -185,6 +185,12 @@ public @interface ExcelAttribute {
*/
public
abstract
boolean
isOrgan
()
default
false
;
/**
* 是否转义,默认 true 如果是字典会转义, false不会转义值
* @return
*/
public
abstract
boolean
isConvert
()
default
true
;
/**
* 是否为区域数据 前提:isDataId = true
* @Author fxj
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
3e6e75da
...
...
@@ -448,4 +448,24 @@ public interface ErrorCodes {
* 派增异常: 社保各项起缴日不一致,委托备注必填
*/
String
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
=
"emp.dispatch.social.date.limit.error"
;
/**
* 派增异常: 社保各项起缴月份需为可补缴月份,请确认后操作
*/
String
EMP_DISPATCH_SOCIAL_START_IS_ERROR
=
"emp.dispatch.social.start.is.error"
;
/**
* 派增异常: 公积金起缴月份需为可补缴月份,请确认后操作
*/
String
EMP_DISPATCH_FUND_DATE_LIMIT_ERROR
=
"emp.dispatch.fund.start.is.error"
;
/**
* 派增异常: 合同相关信息不可为空
*/
String
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
=
"emp.dispatch.emp.contract.not.empty"
;
/**
* 派增异常: 系统无对应项目档案,档案相关同色字段必填
*/
String
EMP_DISPATCH_EMP_NOT_EMPTY
=
"emp.dispatch.emp.not.empty"
;
/**
* 派增异常: 对应项目编码已停止合作
*/
String
EMP_DISPATCH_SETTLEDOMAIN_STOP
=
"emp.dispatch.settleDomain.stop"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
3e6e75da
...
...
@@ -475,7 +475,11 @@ public class ExcelUtil <T> implements Serializable {
boolean
flag
=
true
;
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getValue
())
&&
entry
.
getValue
().
equals
(
c
.
trim
())){
tempStr
=
entry
.
getKey
();
if
(
attr
.
isConvert
()){
tempStr
=
entry
.
getKey
();
}
else
{
tempStr
=
c
;
}
flag
=
false
;
break
;
}
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
3e6e75da
...
...
@@ -167,6 +167,15 @@ emp.dispatch.social.base.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD
emp.dispatch.social.date.limit.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
793E
\u
4FDD
\u5404\u9879\u
8D77
\u
7F34
\u
65E5
\u
4E0D
\u
4E00
\u
81F4
\u
FF0C
\u
59D4
\u6258\u5907\u
6CE8
\u
5FC5
\u
586B
emp.dispatch.social.start.is.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
793E
\u
4FDD
\u5404\u9879\u
8D77
\u
7F34
\u6708\u
4EFD
\u9700\u
4E3A
\u
53EF
\u8865\u
7F34
\u6708\u
4EFD
\u
FF0C
\u
8BF7
\u
786E
\u
8BA4
\u
540E
\u
64CD
\u
4F5C
\u
FF01
emp.dispatch.fund.start.is.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
516C
\u
79EF
\u
91D1
\u
8D77
\u
7F34
\u6708\u
4EFD
\u9700\u
4E3A
\u
53EF
\u8865\u
7F34
\u6708\u
4EFD
\u
FF0C
\u
8BF7
\u
786E
\u
8BA4
\u
540E
\u
64CD
\u
4F5C
\u
FF01
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.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-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
3e6e75da
...
...
@@ -156,7 +156,7 @@ public class ArchivesDaprUtil {
public
R
<
TEmployeeContractInfo
>
getContractById
(
String
id
)
{
R
<
TEmployeeContractInfo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
()
,
"/temployee
info/inner
/getContractById"
,
id
,
TEmployeeContractInfo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/temployee
contractinfo
/getContractById"
,
id
,
TEmployeeContractInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取档案信息失败!"
);
}
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
3e6e75da
...
...
@@ -76,6 +76,14 @@ public class InsurancesConstants {
* 投保信息不存在
*/
public
static
final
String
DATA_IS_NOT_EXIST
=
"投保信息不存在"
;
/**
* 结算信息不存在
*/
public
static
final
String
SETTLE_DATA_IS_NOT_EXIST
=
"结算信息不存在"
;
/**
* 推送信息不存在
*/
public
static
final
String
PUSH_DATA_IS_NOT_EXIST
=
"推送信息不存在"
;
/**
* 被替换员工投保记录不存在
*/
...
...
@@ -253,21 +261,21 @@ public class InsurancesConstants {
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EXIST
=
"商险购买地市不存在"
;
/**
* 商险办理省名称不能为空
* 商险办理
地
省名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
=
"商险办理省名称不能为空"
;
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
=
"商险办理
地
省名称不能为空"
;
/**
* 商险办理省不存在
* 商险办理
地
省不存在
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
=
"商险办理省不存在"
;
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
=
"商险办理
地
省不存在"
;
/**
* 商险办理城市名称不能为空
* 商险办理
地
城市名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
=
"商险办理城市名称不能为空"
;
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
=
"商险办理
地
城市名称不能为空"
;
/**
* 商险办理城市不存在
* 商险办理
地
城市不存在
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
=
"商险办理城市不存在"
;
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
=
"商险办理
地
城市不存在"
;
/**
* 结算月不能为空
*/
...
...
@@ -565,6 +573,12 @@ public class InsurancesConstants {
* 修改保险公司
*/
public
static
final
String
UPDATE_INSURANCE_COMPANY
=
"修改保险公司"
;
/**
* 删除保险公司
*/
public
static
final
String
DELETE_INSURANCE_COMPANY
=
"删除保险公司"
;
/**
* 新增险种
*/
...
...
@@ -591,6 +605,38 @@ public class InsurancesConstants {
public
static
final
String
DELETE_INSURANCE_TYPE_STANDARD
=
"删除购买标准"
;
/**
* 导入减员数据
*/
public
static
final
String
INSURANCE_REFUND_IMPORT
=
"导入减员数据"
;
/**
* 导出待减员数据
*/
public
static
final
String
INSURANCE_REFUND_EXPORT
=
"导出待减员数据"
;
/**
* 减员成功
*/
public
static
final
String
INSURANCE_REFUND_SUCCESS
=
"减员成功"
;
/**
* 减员退回
*/
public
static
final
String
INSURANCE_REFUND_FAILED
=
"减员退回"
;
/**
* 变更所属项目
*/
public
static
final
String
DEPT_CHANGE
=
"变更所属项目"
;
/**
* 变更结算月
*/
public
static
final
String
MONTH_CHANGE
=
"变更结算月"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/
entity
/Dept.java
→
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/
vo
/Dept.java
View file @
3e6e75da
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -8,7 +8,7 @@ import java.io.Serializable;
/**
* @author zhaji
* @description 项目
* @description 项目
信息
* @date 2022-07-29 09:35:31
*/
@Data
...
...
@@ -26,4 +26,9 @@ public class Dept implements Serializable {
*/
@Schema
(
description
=
"项目名称"
)
private
String
projectName
;
public
Dept
(
String
departNo
,
String
departName
)
{
this
.
deptNo
=
departNo
;
this
.
projectName
=
departName
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/UpdateInsuranceSettleParam.java
0 → 100644
View file @
3e6e75da
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author licancan
* @description EKP2INSURANCES 更新结算请求参数
* @date 2022-08-01 09:50:33
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"EKP2INSURANCES 更新结算请求参数"
)
public
class
UpdateInsuranceSettleParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1459385763943903153L
;
/**
* 结算信息
*/
@Schema
(
description
=
"结算信息"
)
private
List
<
SettleData
>
settleData
;
/**
* 推送信息
*/
@Schema
(
description
=
"推送信息"
)
private
PushData
pushData
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
static
class
SettleData
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4572786452410956413L
;
/**
* 结算单号(唯一标识) 生成规则:商险明细id + "_" + 结算id
*/
@Schema
(
description
=
"结算单号(唯一标识)"
)
private
String
sn
;
/**
* 结算状态
*/
@Schema
(
description
=
"结算状态"
)
private
String
settleStatus
;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
static
class
PushData
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4572786452410956413L
;
/**
* 推送时间
*/
@Schema
(
description
=
"推送时间"
)
private
LocalDateTime
pushTime
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
3e6e75da
...
...
@@ -3,7 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.
entity
.Dept
;
import
com.yifu.cloud.plus.v1.yifu.insurances.
vo
.Dept
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.core.userdetails.User
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -35,6 +36,20 @@ public class TInsuranceDetailController {
private
TInsuranceDetailService
tInsuranceDetailService
;
/***********************商险办理********************************/
/**
* EKP2INSURANCES 更新结算状态
*
* @author licancan
* @param param
* @return {@link R<String>}
*/
@Operation
(
summary
=
"更新结算状态"
,
description
=
"更新结算状态"
)
@PostMapping
(
"/updateInsuranceSettle"
)
public
R
<
String
>
updateInsuranceSettle
(
@RequestBody
UpdateInsuranceSettleParam
param
)
{
return
tInsuranceDetailService
.
updateInsuranceSettle
(
param
);
}
/**
* 投保办理分页查询
*
...
...
@@ -390,4 +405,18 @@ public class TInsuranceDetailController {
return
tInsuranceDetailService
.
getDeptList
();
}
/**
* 出险
*
* @author zhaji
* @param userName 姓名
* @param empIdcardNo 身份证
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation
(
summary
=
"紧急出险"
,
description
=
"紧急出险"
)
@GetMapping
(
"/urgentUpdateIsUse"
)
public
R
urgentUpdateIsUse
(
String
userName
,
String
empIdcardNo
)
{
return
tInsuranceDetailService
.
urgentUpdateIsUse
(
userName
,
empIdcardNo
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
3e6e75da
...
...
@@ -18,6 +18,16 @@ import java.util.List;
public
interface
TInsuranceDetailService
extends
IService
<
TInsuranceDetail
>
{
/***********************商险办理********************************/
/**
* EKP2INSURANCES 更新结算状态
*
* @author licancan
* @param param
* @return {@link R<String>}
*/
R
<
String
>
updateInsuranceSettle
(
UpdateInsuranceSettleParam
param
);
/**
* 投保办理分页查询
*
...
...
@@ -266,4 +276,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
getDeptList
();
/**
* EKP紧急出险
*
* @author zhaji
* @param userName
* @param empIdcardNo
* @return {@link R}
*/
R
urgentUpdateIsUse
(
String
userName
,
String
empIdcardNo
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
3e6e75da
...
...
@@ -5,23 +5,24 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -35,15 +36,34 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
@Resource
private
TInsuranceDetailService
i
nsuranceDetailService
;
private
TInsuranceDetailService
tI
nsuranceDetailService
;
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
/**
* 分页查询保险公司
*
* @author zhaji
* @param page 分页参数
* @param insuranceCompany 查询类
* @return {@link IPage< TInsuranceCompany>}
*/
@Override
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
IPage
<
TInsuranceCompany
>
list
=
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
return
list
;
}
/**
* 新增保险公司
*
* @author zhaji
* @param insuranceCompany 新增类
* @return {@link R}
*/
@Override
public
R
saveInsuranceCompany
(
TInsuranceCompany
insuranceCompany
)
{
if
(
Common
.
isEmpty
(
insuranceCompany
)){
...
...
@@ -63,9 +83,11 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
insuranceCompany
.
setCreateName
(
user
.
getNickname
());
insuranceCompany
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceCompany
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
save
(
insuranceCompany
),
"新增成功"
);
save
(
insuranceCompany
);
addOperate
(
insuranceCompany
,
user
,
InsurancesConstants
.
DELETE_INSURANCE_COMPANY
);
return
R
.
ok
(
"新增成功"
);
}
else
{
return
R
.
failed
(
"
当前保险公司已存在
"
);
return
R
.
failed
(
"
保险公司名称不能重复添加
"
);
}
}
...
...
@@ -104,7 +126,7 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
LambdaQueryWrapper
<
TInsuranceDetail
>
detailQueryWrapper
=
new
LambdaQueryWrapper
<>();
detailQueryWrapper
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
companyName
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceDetail
>
list
=
i
nsuranceDetailService
.
list
(
detailQueryWrapper
);
List
<
TInsuranceDetail
>
list
=
tI
nsuranceDetailService
.
list
(
detailQueryWrapper
);
if
(
Common
.
isNotEmpty
(
list
)){
return
R
.
failed
(
"当前保险公司的名称已存在对应的商险信息,不能进行修改"
);
}
else
{
...
...
@@ -119,7 +141,9 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
}
else
{
insuranceCompany
.
setUpdateBy
(
user
.
getId
());
insuranceCompany
.
setUpdateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
updateById
(
insuranceCompany
));
updateById
(
insuranceCompany
);
addOperate
(
one
,
user
,
InsurancesConstants
.
UPDATE_INSURANCE_COMPANY
);
return
R
.
ok
(
"修改保险信息公司成功"
);
}
}
/**
...
...
@@ -143,10 +167,36 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
set
(
TInsuranceCompany
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceCompany
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
));
update
(
updateWrapper
);
addOperate
(
one
,
user
,
InsurancesConstants
.
DELETE_INSURANCE_COMPANY
);
return
R
.
ok
(
"删除成功"
);
}
}
/**
* 操作记录
*
* @author zhaji
* @param insuranceCompany 保险公司
* @param user 登录用户
* @param operateDesc 操作描述
* @return void
*/
private
void
addOperate
(
TInsuranceCompany
insuranceCompany
,
YifuUser
user
,
String
operateDesc
){
try
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setInsuranceDetailId
(
insuranceCompany
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceOperateService
.
save
(
operate
);
}
catch
(
Exception
e
){
e
.
getStackTrace
();
}
}
/**
* 查询当前保险公司列表
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
3e6e75da
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -79,6 +80,49 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
/***********************商险办理********************************/
/**
* EKP2INSURANCES 更新结算状态
*
* @param param
* @return {@link R<String>}
* @author licancan
*/
@Override
public
R
<
String
>
updateInsuranceSettle
(
UpdateInsuranceSettleParam
param
)
{
if
(!
Optional
.
ofNullable
(
param
).
isPresent
()){
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
if
(
CollectionUtils
.
isEmpty
(
param
.
getSettleData
())){
return
R
.
failed
(
InsurancesConstants
.
SETTLE_DATA_IS_NOT_EXIST
);
}
if
(!
Optional
.
ofNullable
(
param
.
getPushData
()).
isPresent
()){
return
R
.
failed
(
InsurancesConstants
.
PUSH_DATA_IS_NOT_EXIST
);
}
try
{
LocalDateTime
pushTime
=
param
.
getPushData
().
getPushTime
();
List
<
UpdateInsuranceSettleParam
.
SettleData
>
settleData
=
param
.
getSettleData
();
List
<
TInsuranceSettle
>
list
=
new
ArrayList
<>();
for
(
UpdateInsuranceSettleParam
.
SettleData
settleDatum
:
settleData
)
{
TInsuranceSettle
settle
=
new
TInsuranceSettle
();
String
settleId
=
settleDatum
.
getSn
().
split
(
"_"
)[
1
];
settle
.
setId
(
settleId
);
settle
.
setUpdateTime
(
pushTime
);
settle
.
setSettleHandleStatus
(
settleDatum
.
getSettleStatus
());
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDatum
.
getSettleStatus
())){
settle
.
setSettleDoneTime
(
pushTime
);
}
list
.
add
(
settle
);
}
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
tInsuranceSettleService
.
saveOrUpdateBatch
(
list
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
R
.
failed
();
}
return
R
.
ok
();
}
/**
* 投保办理分页查询
*
...
...
@@ -2055,9 +2099,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
Map
<
String
,
List
<
InsuranceRefundCheck
>>
refundMap
=
checkInsuranceRefundList
(
insuranceRefundCheckList
);
List
<
InsuranceRefundCheck
>
successList
=
refundMap
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
InsuranceRefundCheck
refund
:
successList
){
TInsuranceRefund
insuranceRefund
=
new
TInsuranceRefund
();
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceRefund
.
setInsDetailId
(
refund
.
getId
());
insuranceRefund
.
setReduceHandleStatus
(
CommonConstants
.
ONE_INT
);
insuranceRefund
.
setCreateBy
(
user
.
getId
());
...
...
@@ -2077,8 +2123,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
);
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
refund
.
getId
());
update
(
updateWrapper
);
insuranceOperate
.
setInsuranceDetailId
(
refund
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
INSURANCE_REFUND_IMPORT
);
operateList
.
add
(
insuranceOperate
);
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
InsuranceRefundCheck
>
errorList
=
refundMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"校验完成"
);
}
...
...
@@ -2298,7 +2351,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
INSURANCE_
REFUND_EXPORT
);
}
return
refundExportList
;
}
...
...
@@ -2323,6 +2376,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
RefundErrorVo
refundErrorVo
=
new
RefundErrorVo
();
...
...
@@ -2347,6 +2401,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
}
successList
.
add
(
tInsuranceDetail
);
//新增减员记录
refund
.
setInsDetailId
(
tInsuranceDetail
.
getId
());
refund
.
setCreateBy
(
user
.
getId
());
refund
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
@@ -2364,9 +2419,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateBatchById
(
successList
);
//操作记录
if
(
CommonConstants
.
FOUR_INT
==
refundType
){
addOperate
(
successList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
_SUCCESS
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND
_SUCCESS
);
}
else
{
addOperate
(
successList
,
user
,
InsurancesConstants
.
REFUND_EXPORT
_FAILED
);
addOperate
(
successList
,
user
,
InsurancesConstants
.
INSURANCE_REFUND
_FAILED
);
}
return
R
.
ok
(
errorList
,
"操作成功"
);
}
...
...
@@ -2388,6 +2443,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
);
//todo 生成EKP通知,通知ekp变更结算月份
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
...
...
@@ -2396,8 +2452,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
...
...
@@ -2419,19 +2483,97 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
DeptChangeCheckParam
>>
stringListMap
=
deptChangeCheck
(
deptChangeCheckList
);
//todo 生成EKP通知,通知ekp变更结算所属项目
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
DeptChangeCheckParam
success
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
Integer
oldSettleType
=
success
.
getOldSettleType
();
Integer
newSettleType
=
success
.
getNewSettleType
();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
success
.
getId
())
.
set
(
TInsuranceDetail
::
getDeptNo
,
success
.
getNewDeptNo
())
.
set
(
TInsuranceDetail
::
getSettleType
,
success
.
getNewSettleType
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
TInsuranceSettle
tInsuranceSettle
=
new
TInsuranceSettle
();
//如果旧项目为合并结算,且新项目也是合并结算,则计算新的预估保费,作废旧的预估保费
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//如果存在则更新,不存在则新建
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//将结算id赋值给保单信息
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
}
}
//如果旧项目为预估,且新的项目为单独结算,则作废旧的预估保费,更新项目信息
if
(
CommonConstants
.
ZERO_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
//更新旧的结算信息
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
new
BigDecimal
(
"0"
));
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
//更新预估保费
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0"
));
}
}
//如果旧项目为单独结算,且新项目为合并结算,则计算预估保费,作废旧的预估保费
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ZERO_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
//更新旧的结算信息
if
(
StringUtils
.
isNotBlank
(
success
.
getDefaultSettleId
())){
tInsuranceSettle
.
setId
(
success
.
getDefaultSettleId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
//推送EKP
}
else
{
tInsuranceSettle
.
setInsDetailId
(
success
.
getId
());
tInsuranceSettle
.
setSettleType
(
success
.
getNewSettleType
());
tInsuranceSettle
.
setSettleHandleStatus
(
CommonConstants
.
ONE_STRING
);
tInsuranceSettle
.
setEstimatePremium
(
success
.
getEstimatePremium
());
tInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ZERO_INT
);
tInsuranceSettle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
tInsuranceSettle
);
//更新保单信息
updateWrapper
.
set
(
TInsuranceDetail:
:
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
}
}
//如果旧项目为单独结算,且新项目也是单独结算,则更新单独结算信息
if
(
CommonConstants
.
ONE_INT
==
oldSettleType
&&
CommonConstants
.
ONE_INT
==
newSettleType
){
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
success
.
getEstimatePremium
());
}
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
success
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
DEPT_CHANGE
);
operateList
.
add
(
insuranceOperate
);
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
List
<
DeptChangeCheckParam
>
errorList
=
stringListMap
.
get
(
"errorList"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
...
...
@@ -2506,7 +2648,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CommonConstants
.
FIVE_INT
==
buyHandleStatus
){
return
R
.
failed
(
"当前员工已减员,不能进行出险操作"
);
}
if
(
null
!=
reduceHandleStatus
){
if
(
null
!=
reduceHandleStatus
&&
CommonConstants
.
THREE_INT
!=
reduceHandleStatus
){
return
R
.
failed
(
"当前员工在减员中,不能进行出险操作"
);
}
Integer
isEffect
=
insuranceDetail
.
getIsEffect
();
...
...
@@ -3144,7 +3286,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//预估
if
(
insuranceDetail
.
get
SettleType
()
==
CommonConstants
.
ZERO_INT
){
if
(
param
.
getNew
SettleType
()
==
CommonConstants
.
ZERO_INT
){
//根据险种获取费率,没费率返回错误
TInsuranceType
insuranceType
=
tInsuranceTypeService
.
getById
(
insuranceDetail
.
getInsuranceTypeId
());
//险种存不存在
...
...
@@ -3177,7 +3319,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
// 预估保费 = 费率 * 购买标准
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
multiply
(
new
BigDecimal
(
typeRate
.
getRate
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
else
{
//按天
...
...
@@ -3185,15 +3327,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
long
day
=
LocalDateUtil
.
betweenDay
(
insuranceDetail
.
getPolicyStart
().
toString
(),
insuranceDetail
.
getPolicyEnd
().
toString
());
//预估保费 = (购买标准 / 365) * 天数
BigDecimal
estimatePremium
=
new
BigDecimal
(
insuranceDetail
.
getBuyStandard
()).
divide
(
new
BigDecimal
(
"365"
),
2
,
BigDecimal
.
ROUND_HALF_UP
).
multiply
(
new
BigDecimal
(
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
insuranceDetail
.
setEstimatePremium
(
estimatePremium
);
param
.
setEstimatePremium
(
estimatePremium
);
}
}
}
}
//判断当前数据中是否存在重复数据
param
.
setEstimatePremium
(
insuranceDetail
.
getEstimatePremium
());
param
.
setActualPremium
(
insuranceDetail
.
getActualPremium
());
param
.
setOldSettleType
(
insuranceDetail
.
getSettleType
());
param
.
setDefaultSettleId
(
insuranceDetail
.
getDefaultSettleId
());
param
.
setId
(
insuranceDetail
.
getId
());
successList
.
add
(
param
);
}
...
...
@@ -3202,21 +3342,75 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
map
;
}
/**
* 查询项目列表
*
* @author zhaji
* @param
* @return {@link R}
*/
@Override
public
R
getDeptList
(){
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
();
List
<
Dept
>
deptList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSelectVO
)){
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
Dept
dept
=
new
Dept
();
dept
.
setDeptNo
(
tSettleDomainSelectVo
.
getDepartNo
());
dept
.
setProjectName
(
tSettleDomainSelectVo
.
getDepartName
());
deptList
.
add
(
dept
);
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
null
!=
tSettleDomainListVoR
&&
tSettleDomainListVoR
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
tSettleDomainListVoR
.
getData
()))
{
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
List
<
TSettleDomainSelectVo
>
listSelectVO
=
data
.
getListSelectVO
();
if
(
CollectionUtils
.
isNotEmpty
(
listSelectVO
)){
//listSelectVO.stream().filter(item->deptList.add(new Dept(item.getDepartNo(),item.getDepartName())));
for
(
TSettleDomainSelectVo
tSettleDomainSelectVo
:
listSelectVO
)
{
deptList
.
add
(
new
Dept
(
tSettleDomainSelectVo
.
getDepartNo
(),
tSettleDomainSelectVo
.
getDepartName
()));
}
}
}
return
R
.
ok
(
deptList
);
};
}
/**
* EKP紧急出险
*
* @author zhaji
* @param userName
* @param empIdcardNo
* @return {@link R}
*/
@Override
public
R
urgentUpdateIsUse
(
String
userName
,
String
empIdcardNo
)
{
//员工姓名
if
(
StringUtils
.
isBlank
(
userName
)){
}
//员工身份证
if
(
StringUtils
.
isBlank
(
empIdcardNo
)){
return
R
.
failed
(
"身份证号为空"
);
}
//员工身份证
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
empIdcardNo
)){
return
R
.
failed
(
"身份证格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
//查询所有在保,未出险,未过期,未失效,未减员的保单信息
queryWrapper
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdcardNo
).
eq
(
TInsuranceDetail
::
getBuyHandleStatus
,
CommonConstants
.
THREE_INT
)
.
eq
(
TInsuranceDetail
::
getIsEffect
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getIsUse
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail
::
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
ONE_INT
)
.
ne
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
TWO_INT
);
List
<
TInsuranceDetail
>
list
=
list
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
return
R
.
failed
(
"无可出险的保单"
);
}
for
(
TInsuranceDetail
tInsuranceDetail
:
list
)
{
tInsuranceDetail
.
setIsUse
(
CommonConstants
.
ONE_INT
);
//tInsuranceDetail.setUpdateBy();
tInsuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
}
boolean
b
=
updateBatchById
(
list
);
if
(
b
){
return
R
.
ok
(
"EKP紧急出险成功"
);
}
else
{
return
R
.
ok
(
"EKP紧急出险失败"
);
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
3e6e75da
...
...
@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -11,19 +10,15 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsurance
Detail
Service
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsurance
Operate
Service
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -39,7 +34,10 @@ import java.util.List;
public
class
TInsuranceTypeServiceImpl
extends
ServiceImpl
<
TInsuranceTypeMapper
,
TInsuranceType
>
implements
TInsuranceTypeService
{
@Resource
private
TInsuranceCompanyService
insuranceCompanyService
;
private
TInsuranceCompanyService
tInsuranceCompanyService
;
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
/**
* 险种分页查询
...
...
@@ -85,22 +83,23 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
}
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
insuranceCompany
=
i
nsuranceCompanyService
.
getOne
(
companyWrapper
);
TInsuranceCompany
insuranceCompany
=
tI
nsuranceCompanyService
.
getOne
(
companyWrapper
);
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
}
LambdaQueryWrapper
<
TInsuranceType
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
typeWrapper
.
eq
(
TInsuranceType
::
getInsuranceCompanyId
,
companyId
).
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
()).
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
type
=
getOne
(
typeWrapper
);
if
(!
Common
.
isEmpty
(
type
)){
return
R
.
failed
(
"当前
险种已存在
"
);
return
R
.
failed
(
"当前
保险公司已存在该险种
"
);
}
else
{
insuranceType
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceType
.
setCreateBy
(
user
.
getId
());
insuranceType
.
setCreateName
(
user
.
getNickname
());
insuranceType
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
save
(
insuranceType
));
save
(
insuranceType
);
addOperate
(
insuranceType
,
user
,
InsurancesConstants
.
NEW_INSURANCE_TYPE
);
return
R
.
ok
(
"新增险种信息成功"
);
}
}
...
...
@@ -136,6 +135,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
*/
@Override
public
R
updateInsuranceType
(
TInsuranceType
insuranceType
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
insuranceType
.
getId
())){
return
R
.
failed
(
"险种ID不能为空"
);
}
...
...
@@ -144,7 +144,11 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
if
(
byId
.
getName
().
equals
(
insuranceType
.
getName
())){
return
R
.
ok
(
this
.
updateById
(
insuranceType
),
"修改险种信息成功"
);
insuranceType
.
setUpdateBy
(
user
.
getId
());
insuranceType
.
setUpdateTime
(
LocalDateTime
.
now
());
updateById
(
insuranceType
);
addOperate
(
insuranceType
,
user
,
InsurancesConstants
.
UPDATE_INSURANCE_TYPE
);
return
R
.
ok
(
"修改险种信息成功"
);
}
else
{
LambdaQueryWrapper
<
TInsuranceType
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
())
...
...
@@ -152,13 +156,40 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
R
.
ok
(
this
.
updateById
(
insuranceType
),
"修改险种信息成功"
);
insuranceType
.
setUpdateBy
(
user
.
getId
());
insuranceType
.
setUpdateTime
(
LocalDateTime
.
now
());
updateById
(
insuranceType
);
addOperate
(
insuranceType
,
user
,
InsurancesConstants
.
UPDATE_INSURANCE_TYPE
);
return
R
.
ok
(
"修改险种信息成功"
);
}
else
{
return
R
.
failed
(
"当前险种名称已存在"
);
}
}
}
/**
* 操作记录
*
* @author zhaji
* @param insuranceType 险种信息
* @param user 登录用户
* @param operateDesc 操作描述
* @return void
*/
private
void
addOperate
(
TInsuranceType
insuranceType
,
YifuUser
user
,
String
operateDesc
){
try
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setInsuranceDetailId
(
insuranceType
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceOperateService
.
save
(
operate
);
}
catch
(
Exception
e
){
e
.
getStackTrace
();
}
}
/**
* 查询险种列表
*
...
...
@@ -178,7 +209,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
}
else
{
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
insuranceCompany
=
i
nsuranceCompanyService
.
getOne
(
companyWrapper
);
TInsuranceCompany
insuranceCompany
=
tI
nsuranceCompanyService
.
getOne
(
companyWrapper
);
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
}
else
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
3e6e75da
...
...
@@ -107,7 +107,7 @@
#{item}
</foreach>
</if>
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.
BUY_HANDLE_STATUS,detail.
CREATE_TIME DESC
</select>
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
...
...
@@ -152,7 +152,7 @@
#{item}
</foreach>
</if>
ORDER BY detail.CREATE_TIME DESC
ORDER BY detail.
BUY_HANDLE_STATUS,detail.
CREATE_TIME DESC
</select>
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
...
...
@@ -284,7 +284,8 @@
detail.POLICY_END as policyEnd,
detail.POLICY_EFFECT as policyEffect,
detail.IS_USE as isUse,
detail.INVOICE_NO as isOverdue,
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
3e6e75da
...
...
@@ -69,7 +69,7 @@
a.INSURANCE_COMPANY_ID = b.ID
and
a.DELETE_FLAG = 0
ORDER BY a.create_time DESC
</select>
<select
id=
"getInsuranceTypeDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"
>
select
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPaymentInfo.java
View file @
3e6e75da
...
...
@@ -148,22 +148,6 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"锁定状态 0 未锁定 1 锁定"
)
private
String
lockStatus
;
/**
* 社保结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@ExcelAttribute
(
name
=
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
)
@Schema
(
description
=
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
)
@ExcelProperty
(
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
)
private
String
socialSettlementFlag
;
/**
* 公积金结算状态
*/
@ExcelAttribute
(
name
=
"公积金结算状态"
)
@Schema
(
description
=
"公积金结算状态"
)
@ExcelProperty
(
"公积金结算状态"
)
private
String
fundSettlementFlag
;
/**
* 总合计
*/
...
...
@@ -316,22 +300,6 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"公积金核准表ID"
)
private
String
fundSettlementId
;
/**
* 工资社保结算状态 0: 未结算 1: 已结算
*/
@ExcelAttribute
(
name
=
"工资社保结算状态 0: 未结算 1: 已结算"
)
@Schema
(
description
=
"工资社保结算状态 0: 未结算 1: 已结算"
)
@ExcelProperty
(
"工资社保结算状态 0: 未结算 1: 已结算"
)
private
String
salarySocialFlag
;
/**
* 工资公积金结算状态 0: 未结算 1: 已结算
*/
@ExcelAttribute
(
name
=
"工资公积金结算状态 0: 未结算 1: 已结算"
)
@Schema
(
description
=
"工资公积金结算状态 0: 未结算 1: 已结算"
)
@ExcelProperty
(
"工资公积金结算状态 0: 未结算 1: 已结算"
)
private
String
salaryFundFlag
;
/**
* 就职班组
*/
...
...
@@ -372,6 +340,14 @@ public class TPaymentInfo extends BaseEntity {
@ExcelProperty
(
"财务账单ID"
)
private
String
financeBillId
;
/**
* 财务账单ID
*/
@ExcelAttribute
(
name
=
"推送状态 0已推送 1未推送"
)
@Schema
(
description
=
"推送状态 0已推送 1未推送"
)
@ExcelProperty
(
"推送状态 0已推送 1未推送"
)
private
String
pushStatus
;
/**
* 单位社保补缴利息
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
3e6e75da
...
...
@@ -553,12 +553,12 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty
(
"补缴是否采用最新基数0是1否"
)
private
String
latestCardinality
;
/**
* 大病是否收费:0
否 1 是
* 大病是否收费:0
收取;1不收取
*/
@Length
(
max
=
1
,
message
=
"大病是否收费:0
否 1 是
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"大病是否收费:0
否 1 是
"
,
maxLength
=
1
)
@Schema
(
description
=
"大病是否收费:0
否 1 是
"
)
@ExcelProperty
(
"大病是否收费:0
否 1 是
"
)
@Length
(
max
=
1
,
message
=
"大病是否收费:0
收取;1不收取
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"大病是否收费:0
收取;1不收取
"
,
maxLength
=
1
)
@Schema
(
description
=
"大病是否收费:0
收取;1不收取
"
)
@ExcelProperty
(
"大病是否收费:0
收取;1不收取
"
)
private
String
isIllness
;
/**
* 大病缴纳周期:0按年1按月
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
View file @
3e6e75da
...
...
@@ -392,12 +392,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty
(
"个人大病金额"
)
private
BigDecimal
personalBigailmentMoney
;
/**
* 大病取值方式
0 按比例 1按定值
* 大病取值方式
0.按定值1比例
*/
@Length
(
max
=
1
,
message
=
"大病取值方式
0 按比例 1按定值
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"大病取值方式
0 按比例 1按定值
"
,
maxLength
=
1
)
@Schema
(
description
=
"大病取值方式
0 按比例 1按定值
"
)
@ExcelProperty
(
"大病取值方式
0 按比例 1按定值
"
)
@Length
(
max
=
1
,
message
=
"大病取值方式
0.按定值1比例
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"大病取值方式
0.按定值1比例
"
,
maxLength
=
1
)
@Schema
(
description
=
"大病取值方式
0.按定值1比例
"
)
@ExcelProperty
(
"大病取值方式
0.按定值1比例
"
)
private
String
valueType
;
/**
* 个人大病比例
...
...
@@ -414,12 +414,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty
(
"单位大病救助比例"
)
private
BigDecimal
unitBigailmentPer
;
/**
* 是否收取大病费用
0否 1 是
* 是否收取大病费用
: 0收取;1不收取
*/
@Length
(
max
=
1
,
message
=
"是否收取大病费用0
否 1 是
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"是否收取大病费用0
否 1 是
"
,
maxLength
=
1
)
@Schema
(
description
=
"是否收取大病费用0
否 1 是
"
)
@ExcelProperty
(
"是否收取大病费用0
否 1 是
"
)
@Length
(
max
=
1
,
message
=
"是否收取大病费用0
收取;1不收取
不能超过1个字符"
)
@ExcelAttribute
(
name
=
"是否收取大病费用0
收取;1不收取
"
,
maxLength
=
1
)
@Schema
(
description
=
"是否收取大病费用0
收取;1不收取
"
)
@ExcelProperty
(
"是否收取大病费用0
收取;1不收取
"
)
private
String
isIllness
;
/**
* 大病按年收收取月份1-12月
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
3e6e75da
...
...
@@ -54,7 +54,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
...
...
@@ -62,7 +62,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 员工类型
*/
@Length
(
max
=
32
,
message
=
"员工类型 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
...
...
@@ -70,7 +70,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 手机号码
*/
@Length
(
max
=
32
,
message
=
"手机号码 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
32
)
@Schema
(
description
=
"手机号码"
)
@ExcelProperty
(
"手机号码"
)
private
String
empMobile
;
...
...
@@ -123,7 +123,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/**
* 档案-市
*/
@ExcelAttribute
(
name
=
"档案-市"
,
isArea
=
true
,
parentField
=
"fileProvince"
,
isNotEmpty
=
true
)
@ExcelAttribute
(
name
=
"档案-市"
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
)
@ExcelProperty
(
"档案-市"
)
private
String
fileCity
;
...
...
@@ -191,7 +191,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 合同类型
*/
@Length
(
max
=
32
,
message
=
"合同类型 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
32
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
PERSONNEL_TYPE
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
32
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
PERSONNEL_TYPE
)
@Schema
(
description
=
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
private
String
contractName
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoPageVo.java
0 → 100644
View file @
3e6e75da
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Set
;
/**
* 派单信息记录表
*
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Data
public
class
TDispatchInfoPageVo
extends
TDispatchInfo
{
/**
* 社保户名称
*/
@ExcelAttribute
(
name
=
"社保户名称"
,
maxLength
=
32
)
@Schema
(
description
=
"社保户名称"
)
@ExcelProperty
(
"社保户名称"
)
private
String
socialHouseholdName
;
/**
* 公积金户名称
*/
@ExcelAttribute
(
name
=
"公积金户名称"
,
maxLength
=
32
)
@Schema
(
description
=
"公积金户名称"
)
@ExcelProperty
(
"公积金户名称"
)
private
String
providentHouseholdName
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoSearchVo.java
View file @
3e6e75da
...
...
@@ -16,7 +16,9 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -64,4 +66,21 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
/**
* 社保户名称
*/
@ExcelAttribute
(
name
=
"社保户名称"
,
maxLength
=
32
)
@Schema
(
description
=
"社保户名称"
)
@ExcelProperty
(
"社保户名称"
)
private
String
socialHouseholdName
;
/**
* 公积金户名称
*/
@ExcelAttribute
(
name
=
"公积金户名称"
,
maxLength
=
32
)
@Schema
(
description
=
"公积金户名称"
)
@ExcelProperty
(
"公积金户名称"
)
private
String
providentHouseholdName
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoImportLogVo.java
View file @
3e6e75da
...
...
@@ -40,7 +40,7 @@ public class TPaymentInfoImportLogVo extends RowIndex implements Serializable {
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@NotBlank
(
message
=
"主键 不能为空"
)
@ExcelAttribute
(
name
=
"
主键
"
,
isNotEmpty
=
true
,
errorInfo
=
"主键 不能为空"
)
@ExcelAttribute
(
name
=
"
id
"
,
isNotEmpty
=
true
,
errorInfo
=
"主键 不能为空"
)
@Schema
(
description
=
"主键"
)
@ExcelProperty
(
"主键"
)
private
Integer
id
;
...
...
@@ -48,7 +48,7 @@ public class TPaymentInfoImportLogVo extends RowIndex implements Serializable {
* 姓名
*/
@Length
(
max
=
50
,
message
=
"姓名 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"
姓名
"
,
maxLength
=
50
)
@ExcelAttribute
(
name
=
"
empName
"
,
maxLength
=
50
)
@Schema
(
description
=
"姓名"
)
@ExcelProperty
(
"姓名"
)
private
String
empName
;
...
...
@@ -56,7 +56,7 @@ public class TPaymentInfoImportLogVo extends RowIndex implements Serializable {
* 身份证号
*/
@Length
(
max
=
32
,
message
=
"身份证号 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"
身份证号
"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"
idCard
"
,
maxLength
=
32
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
idCard
;
...
...
@@ -64,14 +64,14 @@ public class TPaymentInfoImportLogVo extends RowIndex implements Serializable {
* 错误信息
*/
@Length
(
max
=
500
,
message
=
"错误信息 不能超过500 个字符"
)
@ExcelAttribute
(
name
=
"
错误信息
"
,
maxLength
=
500
)
@ExcelAttribute
(
name
=
"
errMsg
"
,
maxLength
=
500
)
@Schema
(
description
=
"错误信息"
)
@ExcelProperty
(
"错误信息"
)
private
String
errMsg
;
/**
* 问题行数
*/
@ExcelAttribute
(
name
=
"
问题行数
"
)
@ExcelAttribute
(
name
=
"
line
"
)
@Schema
(
description
=
"问题行数"
)
@ExcelProperty
(
"问题行数"
)
private
Integer
line
;
...
...
@@ -79,7 +79,7 @@ public class TPaymentInfoImportLogVo extends RowIndex implements Serializable {
* 导入标识key
*/
@Length
(
max
=
64
,
message
=
"导入标识key 不能超过64 个字符"
)
@ExcelAttribute
(
name
=
"
导入标识k
ey"
,
maxLength
=
64
)
@ExcelAttribute
(
name
=
"
randomK
ey"
,
maxLength
=
64
)
@Schema
(
description
=
"导入标识key"
)
@ExcelProperty
(
"导入标识key"
)
private
String
randomKey
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoVo.java
View file @
3e6e75da
...
...
@@ -145,22 +145,6 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@Schema
(
description
=
"锁定状态 0 未锁定 1 锁定"
)
@ExcelProperty
(
"锁定状态 0 未锁定 1 锁定"
)
private
String
lockStatus
;
/**
* 社保结算状态 0: 未结算 1: 待结算 2: 已结算
*/
@Length
(
max
=
1
,
message
=
"社保结算状态 0: 未结算 1: 待结算 2: 已结算 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
,
maxLength
=
1
)
@Schema
(
description
=
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
)
@ExcelProperty
(
"社保结算状态 0: 未结算 1: 待结算 2: 已结算"
)
private
String
socialSettlementFlag
;
/**
* 公积金结算状态
*/
@Length
(
max
=
1
,
message
=
"公积金结算状态 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"公积金结算状态"
,
maxLength
=
1
)
@Schema
(
description
=
"公积金结算状态"
)
@ExcelProperty
(
"公积金结算状态"
)
private
String
fundSettlementFlag
;
/**
* 总合计
*/
...
...
@@ -308,22 +292,6 @@ public class TPaymentInfoVo extends RowIndex implements Serializable {
@Schema
(
description
=
"公积金核准表ID"
)
@ExcelProperty
(
"公积金核准表ID"
)
private
String
fundSettlementId
;
/**
* 工资社保结算状态 0: 未结算 1: 已结算
*/
@Length
(
max
=
1
,
message
=
"工资社保结算状态 0: 未结算 1: 已结算 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"工资社保结算状态 0: 未结算 1: 已结算"
,
maxLength
=
1
)
@Schema
(
description
=
"工资社保结算状态 0: 未结算 1: 已结算"
)
@ExcelProperty
(
"工资社保结算状态 0: 未结算 1: 已结算"
)
private
String
salarySocialFlag
;
/**
* 工资公积金结算状态 0: 未结算 1: 已结算
*/
@Length
(
max
=
1
,
message
=
"工资公积金结算状态 0: 未结算 1: 已结算 不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"工资公积金结算状态 0: 未结算 1: 已结算"
,
maxLength
=
1
)
@Schema
(
description
=
"工资公积金结算状态 0: 未结算 1: 已结算"
)
@ExcelProperty
(
"工资公积金结算状态 0: 未结算 1: 已结算"
)
private
String
salaryFundFlag
;
/**
* 就职班组
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TSocialInfoVo.java
View file @
3e6e75da
...
...
@@ -409,12 +409,12 @@ public class TSocialInfoVo extends RowIndex implements Serializable {
@ExcelProperty
(
"单位大病救助比例"
)
private
BigDecimal
unitBigailmentPer
;
/**
* 是否收取大病费用0
否 1 是
* 是否收取大病费用0
收取;1不收取
*/
@Length
(
max
=
1
,
message
=
"是否收取大病费用0
否 1 是
不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"是否收取大病费用0
否 1 是
"
,
maxLength
=
1
)
@Schema
(
description
=
"是否收取大病费用0
否 1 是
"
)
@ExcelProperty
(
"是否收取大病费用0
否 1 是
"
)
@Length
(
max
=
1
,
message
=
"是否收取大病费用0
收取;1不收取
不能超过1 个字符"
)
@ExcelAttribute
(
name
=
"是否收取大病费用0
收取;1不收取
"
,
maxLength
=
1
)
@Schema
(
description
=
"是否收取大病费用0
收取;1不收取
"
)
@ExcelProperty
(
"是否收取大病费用0
收取;1不收取
"
)
private
String
isIllness
;
/**
* 大病按年收收取月份1-12月
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/PaymentConstants.java
View file @
3e6e75da
...
...
@@ -7,17 +7,6 @@ package com.yifu.cloud.plus.v1.yifu.social.constants;
**/
public
class
PaymentConstants
{
public
static
final
String
saveFailExistsSocialSettlement
=
"社保数据已生成核准表,无法删除!"
;
public
static
final
String
saveFailExistsSalarySocialSettlement
=
"社保数据已工资结算,无法删除!"
;
public
static
final
String
saveFailExistsFundSettlement
=
"公积金数据已生成核准表,无法删除!"
;
public
static
final
String
saveFailExistsSalaryFundSettlement
=
"公积金数据已工资结算,无法删除!"
;
public
static
final
String
saveFailExistsAgentSettlement
=
"对应缴费库数据已生成代理类结算单,无法删除!"
;
public
static
final
String
saveFailExistsFinanceBillSettlement
=
"数据已生成财务账单,无法删除!"
;
public
static
final
String
PENSION_RISK
=
"养老保险"
;
public
static
final
String
PENSION
=
"养老"
;
public
static
final
String
UNEMPLOYEEMENT_RISK
=
"失业保险"
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
3e6e75da
...
...
@@ -28,10 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -69,7 +66,7 @@ public class TDispatchInfoController {
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
public
R
<
IPage
<
TDispatchInfo
PageVo
>>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
}
...
...
@@ -94,7 +91,7 @@ public class TDispatchInfoController {
*/
@Operation
(
description
=
"简单分页查询--申请"
)
@GetMapping
(
"/pageApply"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchApplyPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
public
R
<
IPage
<
TDispatchInfo
PageVo
>>
getTDispatchApplyPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -112,7 +109,7 @@ public class TDispatchInfoController {
*/
@Operation
(
description
=
"简单分页查询--审核"
)
@GetMapping
(
"/pageAudit"
)
public
R
<
IPage
<
TDispatchInfo
>>
getTDispatchAuditPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
public
R
<
IPage
<
TDispatchInfo
PageVo
>>
getTDispatchAuditPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchVo
tDispatchInfo
)
{
tDispatchInfo
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
tDispatchInfo
.
setStatus
(
CommonConstants
.
ONE_STRING
);
return
new
R
<>(
tDispatchInfoService
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
));
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
3e6e75da
...
...
@@ -96,24 +96,21 @@ public class TPaymentInfoController {
@SysLog
(
"通过id删除缴费库"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tPaymentInfoService
.
removeById
(
id
)
);
public
R
removeById
(
@PathVariable
String
id
)
{
return
tPaymentInfoService
.
removeInFoById
(
id
);
}
/**
* 按类型删除
* @author huyc
* @date 2022-07-22 17:01:22
* @param id
* @param type
* @return
**/
@Operation
(
summary
=
"按类型删除"
,
description
=
"按类型删除:hasPermission('social_tpaymentinfo_del')"
)
@SysLog
(
"按类型删除缴费库"
)
@GetMapping
(
"/removeByIdAndType"
)
* 通过ids删除一条记录
* @param ids
* @return R
*/
@Operation
(
summary
=
"通过ids删除缴费库"
,
description
=
"通过ids删除缴费库:hasPermission('social_tpaymentinfo_del')"
)
@SysLog
(
"删除缴费库"
)
@DeleteMapping
(
"/removeBatchByIds"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_del')"
)
public
R
<
Boolean
>
removeB
yIdAndType
(
@RequestParam
String
id
,
@RequestParam
String
type
)
{
return
tPaymentInfoService
.
remove
ByIdAndType
(
id
,
type
);
public
R
<
Boolean
>
removeB
atchByIds
(
String
ids
)
{
return
tPaymentInfoService
.
remove
AllInfoById
(
ids
);
}
/**
...
...
@@ -177,31 +174,9 @@ public class TPaymentInfoController {
**/
@Operation
(
description
=
"导出缴费库 hasPermission('social_tpaymentinfo_export')"
)
@PostMapping
(
"/export"
)
//
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')")
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
tPaymentInfoService
.
listExport
(
response
,
searchVo
);
}
/**
* 删除当前登录人当前月的社保或公积金数据
* @param type 0 全部删除 1 删除社保 2 删除公积金 必填
* @param settleDepartId 项目ID 可选
* @param unitId 单位ID 可选
* @param empIdCard 员工身份证 可选
* @param socialHouseId 社保户 可选
* @param fundHouseId 公积金户 可选
* @return R
*/
@Operation
(
description
=
"删除(social_tpaymentinfo_del)"
)
@SysLog
(
"删除缴费库"
)
@PostMapping
(
"/removeBatchByIdsAndType"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_del')"
)
public
R
removeBatchByIdsAndType
(
@RequestParam
(
name
=
"type"
,
required
=
true
)
String
type
,
@RequestParam
(
name
=
"settleDepartId"
,
required
=
false
)
String
settleDepartId
,
@RequestParam
(
name
=
"unitId"
,
required
=
false
)
String
unitId
,
@RequestParam
(
name
=
"empIdCard"
,
required
=
false
)
String
empIdCard
,
@RequestParam
(
name
=
"socialHouseId"
,
required
=
false
)
String
socialHouseId
,
@RequestParam
(
name
=
"fundHouseId"
,
required
=
false
)
String
fundHouseId
)
{
return
tPaymentInfoService
.
removeBatchByIdsAndType
(
type
,
settleDepartId
,
unitId
,
empIdCard
,
socialHouseId
,
fundHouseId
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoMapper.java
View file @
3e6e75da
...
...
@@ -22,12 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FundHandleExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -46,7 +41,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
@Param
(
"tDispatchInfo"
)
TDispatchInf
o
tDispatchInfo
);
IPage
<
TDispatchInfo
PageVo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
@Param
(
"tDispatchInfo"
)
TDispatchInfoSearchV
o
tDispatchInfo
);
/**
* @Description: 派单导出
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
3e6e75da
...
...
@@ -86,12 +86,4 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* */
List
<
TPaymentInfo
>
selectListForPaymentImport
(
@Param
(
"months"
)
List
<
String
>
months
,
@Param
(
"idcards"
)
List
<
String
>
idcards
);
/*
* 已存在社保缴费库数据 非删除状态
* @param months
* @param idcards
* @return
* */
List
<
TPaymentInfoVo
>
selectPaymentAllInfoByMonthAndIdCard
(
@Param
(
"months"
)
List
<
String
>
months
,
@Param
(
"idcards"
)
List
<
String
>
idcards
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
3e6e75da
...
...
@@ -42,7 +42,7 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
* @param tDispatchInfo 派单信息记录表
* @return
*/
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInf
o
tDispatchInfo
);
IPage
<
TDispatchInfo
PageVo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchV
o
tDispatchInfo
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
3e6e75da
...
...
@@ -71,36 +71,32 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
*/
void
listExport
(
HttpServletResponse
response
,
TPaymentInfoSearchVo
searchVo
);
/**
*
按类型删除
*
删除缴费库数据 包括明细
* @Author huyc
* @Date 2022-07-24
* @param id
* @param type
* @return
**/
R
<
Boolean
>
removeByIdAndType
(
String
id
,
String
type
);
R
removeInFoById
(
String
id
);
/**
*
通过ID获取缴费库 及社保、公积金
明细
*
删除缴费库数据 包括
明细
* @Author huyc
* @Date 2022-07-24
* @param id
* @param id
s
* @return
**/
R
getAllInfoById
(
String
id
);
R
<
Boolean
>
removeAllInfoById
(
String
ids
);
/**
*
删除当月 当前登录人的 指定类型的缴费库数据
*
通过ID获取缴费库 及社保、公积金明细
* @Author huyc
* @Date 2022-07-27
* @param type
* @param settleDepartId
* @param unitId
* @param empIdCard
* @param socialHouseId
* @param fundHouseId
* @Date 2022-07-24
* @param id
* @return
**/
R
removeBatchByIdsAndType
(
String
type
,
String
settleDepartId
,
String
unitId
,
String
empIdCard
,
String
socialHouseId
,
String
fundHouseId
);
R
getAllInfoById
(
String
id
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
3e6e75da
...
...
@@ -93,7 +93,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @param tDispatchInfo 派单信息记录表
*/
@Override
public
IPage
<
TDispatchInfo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInf
o
tDispatchInfo
)
{
public
IPage
<
TDispatchInfo
PageVo
>
getTDispatchInfoPage
(
Page
<
TDispatchInfo
>
page
,
TDispatchInfoSearchV
o
tDispatchInfo
)
{
return
baseMapper
.
getTDispatchInfoPage
(
page
,
tDispatchInfo
);
}
...
...
@@ -354,7 +354,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue
;
}
// 初始化新增信息:档案、项目档案、员工合同
initAddInfo
(
empAddsMap
,
contractsMap
,
projectsMap
,
empVo
,
excel
);
initAddInfo
(
empAddsMap
,
contractsMap
,
projectsMap
,
empVo
,
excel
,
user
,
setInfoVo
,
socialSet
);
// 新增社保
initSocialAddInfo
(
socialsMap
,
empVo
,
socialSet
,
excel
,
socialFundMap
);
// 新增公积金
...
...
@@ -720,10 +720,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
socialFund
.
setSettleDomain
(
setInfoVo
.
getId
());
socialFund
.
setSettleDomainName
(
setInfoVo
.
getDepartName
());
socialFund
.
setSettleDomainCode
(
setInfoVo
.
getDepartNo
());
socialFund
.
setUnitName
(
setInfoVo
.
getCustomerName
());
socialFund
.
setSettleDomain
Fund
(
setInfoVo
.
getId
());
socialFund
.
setSettleDomainName
Fund
(
setInfoVo
.
getDepartName
());
socialFund
.
setSettleDomainCode
Fund
(
setInfoVo
.
getDepartNo
());
socialFund
.
setUnitName
Fund
(
setInfoVo
.
getCustomerName
());
socialFund
.
setUnitIdFund
(
setInfoVo
.
getCustomerId
());
socialFund
.
setFundStatus
(
CommonConstants
.
ZERO_STRING
);
socialFund
.
setProvidentStart
(
excel
.
getProvidentStart
());
...
...
@@ -760,6 +760,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchImportVo
excel
)
{
TDispatchInfo
dispatch
;
dispatch
=
new
TDispatchInfo
();
dispatch
.
setOrganName
(
user
.
getDeptName
());
dispatch
.
setCreateBy
(
user
.
getId
());
dispatch
.
setCreateTime
(
LocalDateTime
.
now
());
dispatch
.
setContractSubName
(
excel
.
getContractSubName
());
dispatch
.
setContractName
(
excel
.
getContractName
());
dispatch
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
...
...
@@ -817,6 +820,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
dispatch
.
setEmpType
(
empVo
.
getEmpNatrue
());
dispatch
.
setSettleDomainCode
(
empVo
.
getDeptNo
());
dispatch
.
setSettleDomain
(
empVo
.
getDeptId
());
if
(
Common
.
isNotNull
(
empVo
.
getIdProvince
())){
dispatch
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
dispatch
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
...
...
@@ -842,6 +848,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
empVo
)){
fund
.
setEmpId
(
empVo
.
getId
());
fund
.
setEmpNo
(
empVo
.
getEmpNo
());
fund
.
setSettleDomain
(
empVo
.
getDeptId
());
}
fund
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
fund
.
setEmpName
(
excel
.
getEmpName
());
...
...
@@ -853,6 +860,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund
.
setProvidentStart
(
excel
.
getProvidentStart
());
if
(
Common
.
isNotNull
(
fundSet
)){
fund
.
setProvidentHousehold
(
fundSet
.
getDepartId
());
fund
.
setProvidentHouseholdName
(
fundSet
.
getDepartName
());
if
(!
checkFundPer
(
fundSet
.
getFundProList
(),
excel
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_PERCENT_NOT_EXIST
)));
return
true
;
...
...
@@ -895,29 +903,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
void
initAddInfo
(
Map
<
String
,
EmpAddDispatchVo
>
empAdds
,
Map
<
String
,
EmpContractDispatchVo
>
contracts
,
Map
<
String
,
EmpProjectDispatchVo
>
projects
,
DispatchEmpVo
empVo
,
TDispatchImportVo
excel
)
{
DispatchEmpVo
empVo
,
TDispatchImportVo
excel
,
YifuUser
user
,
ProjectSetInfoVo
setInfoVo
,
SysBaseSetInfo
socialSet
)
{
// 无档案无项目档案无合同无学历
if
(
Common
.
isEmpty
(
empVo
)
||
Common
.
isEmpty
(
empVo
.
getId
()))
{
// 初始化档案
initEmpAddInfo
(
empAdds
,
excel
);
initEmpAddInfo
(
empAdds
,
excel
,
user
);
// 初始化项目档案
initProjectInfo
(
projects
,
excel
,
empVo
);
initProjectInfo
(
projects
,
excel
,
empVo
,
user
,
setInfoVo
,
socialSet
);
// 初始化合同
initContractInfo
(
contracts
,
excel
,
empVo
);
initContractInfo
(
contracts
,
excel
,
empVo
,
setInfoVo
);
}
// 有档案无项目档案无合同
if
(
Common
.
isNotNull
(
empVo
)
&&
Common
.
isEmpty
(
empVo
.
getDeptNo
()))
{
// 初始化项目档案
initProjectInfo
(
projects
,
excel
,
empVo
);
initProjectInfo
(
projects
,
excel
,
empVo
,
user
,
setInfoVo
,
socialSet
);
// 初始化合同
initContractInfo
(
contracts
,
excel
,
empVo
);
initContractInfo
(
contracts
,
excel
,
empVo
,
setInfoVo
);
}
// 有档案有项目档案无合同
if
(
Common
.
isNotNull
(
empVo
)
&&
Common
.
isNotNull
(
empVo
.
getDeptNo
())
&&
Common
.
isEmpty
(
empVo
.
getContractType
()))
{
// 初始化合同
initContractInfo
(
contracts
,
excel
,
empVo
);
initContractInfo
(
contracts
,
excel
,
empVo
,
setInfoVo
);
}
}
...
...
@@ -1056,17 +1065,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getCollectType
()))
{
//收取方式按月
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getValueType
()))
{
//收取大病按比例
social
.
setUnitBigailmentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitBigailmentCardinal
(),
socialSet
.
getPayCompanyPro
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setPersonalBigailmentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalBigailmentCardinal
(),
socialSet
.
getPayPersonalPro
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getValueType
())
&&
Common
.
isNotNull
(
socialSet
))
{
//收取大病方式按定值
social
.
setUnitBigailmentMoney
(
socialSet
.
get
Charge
Company
());
social
.
setPersonalBigailmentMoney
(
socialSet
.
get
Charge
Personal
());
social
.
setUnitBigailmentMoney
(
socialSet
.
get
Pay
Company
());
social
.
setPersonalBigailmentMoney
(
socialSet
.
get
Pay
Personal
());
social
.
setPersonalBigailmentCardinal
(
null
);
social
.
setPersonalBigailmentPer
(
null
);
social
.
setUnitBigailmentCardinal
(
null
);
social
.
setUnitBigailmentPer
(
null
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getValueType
())
&&
Common
.
isNotNull
(
socialSet
))
{
//收取大病按比例
social
.
setUnitBigailmentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitBigailmentCardinal
(),
socialSet
.
getPayCompanyPro
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setPersonalBigailmentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalBigailmentCardinal
(),
socialSet
.
getPayPersonalPro
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
}
}
}
...
...
@@ -1139,7 +1149,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
CommonConstants
.
ZERO_STRING
)
.
le
(
SysBaseSetInfo:
:
getApplyStartDate
,
now
)
.
in
(
SysBaseSetInfo:
:
getDepartName
,
socialholds
)
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
SysBaseSetInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
and
(
obj
->
obj
.
isNull
(
SysBaseSetInfo:
:
getApplyEndDate
).
or
().
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
now
))
.
groupBy
(
SysBaseSetInfo:
:
getDepartName
));
if
(
Common
.
isNotNull
(
socialBases
))
{
for
(
SysBaseSetInfo
set:
socialBases
){
...
...
@@ -1161,7 +1173,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
void
initContractInfo
(
Map
<
String
,
EmpContractDispatchVo
>
contracts
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
)
{
DispatchEmpVo
empVo
,
ProjectSetInfoVo
setInfoVo
)
{
// 合同开始时间和截止时间一致直接跳过
if
(
Common
.
isNotNull
(
excel
.
getContractStart
())
&&
Common
.
isNotNull
(
empVo
)
...
...
@@ -1189,19 +1201,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isEmpty
(
excel
.
getSocialHousehold
())
&&
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
contract
.
setContractParty
(
excel
.
getSocialHousehold
());
}
contract
.
setSettleDomain
(
setInfoVo
.
getId
());
contract
.
setDeptNo
(
setInfoVo
.
getDepartNo
());
contract
.
setCustomerId
(
setInfoVo
.
getCustomerId
());
if
(
Common
.
isNotNull
(
empVo
))
{
contract
.
setEmpId
(
empVo
.
getId
());
contract
.
setEmpNo
(
empVo
.
getEmpNo
());
contract
.
setEmpType
(
empVo
.
getEmpNatrue
());
contract
.
setFileProvince
(
empVo
.
getFileProvince
());
contract
.
setFileCity
(
empVo
.
getFileCity
());
contract
.
setFileTown
(
empVo
.
getFileTown
());
}
contracts
.
put
(
excel
.
getEmpIdcard
()+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getSettleDomainCode
(),
contract
);
}
private
void
initProjectInfo
(
Map
<
String
,
EmpProjectDispatchVo
>
projects
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
)
{
DispatchEmpVo
empVo
,
YifuUser
user
,
ProjectSetInfoVo
setInfoVo
,
SysBaseSetInfo
socialSet
)
{
EmpProjectDispatchVo
project
;
project
=
new
EmpProjectDispatchVo
();
project
.
setCreateBy
(
user
.
getId
());
project
.
setCreateName
(
user
.
getNickname
());
project
.
setDeptNo
(
excel
.
getSettleDomainCode
());
project
.
setContractType
(
excel
.
getContractType
());
project
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
...
...
@@ -1209,17 +1229,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
project
.
setEmpNatrue
(
excel
.
getEmpType
());
project
.
setPost
(
excel
.
getPost
());
project
.
setWorkingHours
(
excel
.
getWorkingHours
());
if
(
Common
.
isNotNull
(
socialSet
)){
project
.
setSocialProvince
(
socialSet
.
getProvince
());
project
.
setSocialCity
(
socialSet
.
getCity
());
project
.
setSocialTown
(
socialSet
.
getTown
());
}
if
(
Common
.
isNotNull
(
empVo
))
{
project
.
setEmpId
(
empVo
.
getId
());
project
.
setEmpCode
(
empVo
.
getEmpCode
());
project
.
setEmpNo
(
empVo
.
getEmpNo
());
}
if
(
Common
.
isNotNull
(
setInfoVo
)){
project
.
setBusinessPrimaryType
(
setInfoVo
.
getBusinessPrimaryType
());
project
.
setBusinessSecondType
(
setInfoVo
.
getBusinessSecondType
());
project
.
setBusinessThirdType
(
setInfoVo
.
getBusinessThirdType
());
project
.
setUnitId
(
setInfoVo
.
getCustomerId
());
project
.
setUnitName
(
setInfoVo
.
getCustomerName
());
project
.
setUnitNo
(
setInfoVo
.
getCustomerCode
());
}
projects
.
put
(
excel
.
getEmpIdcard
()+
CommonConstants
.
DOWN_LINE_STRING
+
excel
.
getSettleDomainCode
(),
project
);
}
private
void
initEmpAddInfo
(
Map
<
String
,
EmpAddDispatchVo
>
empAdds
,
TDispatchImportVo
excel
)
{
private
void
initEmpAddInfo
(
Map
<
String
,
EmpAddDispatchVo
>
empAdds
,
TDispatchImportVo
excel
,
YifuUser
user
)
{
EmpAddDispatchVo
emp
;
emp
=
new
EmpAddDispatchVo
();
emp
.
setCreateBy
(
user
.
getId
());
emp
.
setCreateName
(
user
.
getNickname
());
emp
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
emp
.
setEmpName
(
excel
.
getEmpName
());
emp
.
setEmpNational
(
excel
.
getEmpNational
());
...
...
@@ -1349,15 +1384,63 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_PROJECT_NOT_FOUND
)));
return
true
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
setInfoVo
.
getStopFlag
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SETTLEDOMAIN_STOP
)));
return
true
;
}
if
(
Common
.
isEmpty
(
empVo
)){
if
(
Common
.
isEmpty
(
excel
.
getFileProvince
())
||
Common
.
isEmpty
(
excel
.
getFileCity
())
||
Common
.
isEmpty
(
excel
.
getWorkingHours
())
||
Common
.
isEmpty
(
excel
.
getEmpNational
())
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getPost
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
return
true
;
}
if
(
Common
.
isEmpty
(
excel
.
getContractName
())
&&
validContractInfo
(
errorMessageList
,
excel
,
empVo
)){
return
true
;
}
}
/*项目档案有可用状态的合同:
不对合同做判断,取值:项目档案的合同;
项目档案无可用状态的合同:
合同类型必填、业务细分(合同类型为其他时必填)、签订期限必填
签订期限:无固定期限 合同到期时间、合同期限非必填,合同开始时间必填;
签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填*/
if
(
Common
.
isNotNull
(
empVo
)){
if
(
Common
Constants
.
ONE_STRING
.
equals
(
empVo
.
getProjectStatus
())
){
if
(
Common
.
isNotNull
(
empVo
.
getProjectStatus
())
&&
empVo
.
getProjectStatus
().
intValue
()
==
CommonConstants
.
ONE_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_PROJECT_NOT_USED
)));
return
true
;
}
if
(
Common
Constants
.
ONE_STRING
.
equals
(
empVo
.
getFileStatus
())
){
if
(
Common
.
isNotNull
(
empVo
.
getFileStatus
())
&&
empVo
.
getFileStatus
().
intValue
()
==
CommonConstants
.
ONE_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_USED
)));
return
true
;
}
// 档案无合同 合同起日期、合同类型必填
if
(
Common
.
isEmpty
(
empVo
.
getContractName
())
&&
validContractInfo
(
errorMessageList
,
excel
,
empVo
)){
return
true
;
}
excel
.
setEmpType
(
empVo
.
getEmpNatrue
());
excel
.
setEmpMobile
(
empVo
.
getEmpPhone
());
excel
.
setFileProvince
(
Common
.
isNotNullToStr
(
empVo
.
getFileProvince
()));
excel
.
setFileCity
(
Common
.
isNotNullToStr
(
empVo
.
getFileCity
()));
excel
.
setFileTown
(
Common
.
isNotNullToStr
(
empVo
.
getFileTown
()));
excel
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
excel
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setEmpNational
(
empVo
.
getEmpNational
());
excel
.
setEmpRegisType
(
empVo
.
getEmpRegisType
());
excel
.
setPost
(
empVo
.
getPost
());
if
(
Common
.
isNotNull
(
empVo
.
getContractStart
())){
excel
.
setContractStart
(
empVo
.
getContractStart
());
excel
.
setContractEnd
(
empVo
.
getContractEnd
());
excel
.
setContractType
(
empVo
.
getContractType
());
excel
.
setContractSubName
(
empVo
.
getContractSubName
());
excel
.
setContractName
(
empVo
.
getEmpName
());
excel
.
setContractTerm
(
empVo
.
getContractTerm
());
}
}
excel
.
setSettleDomainId
(
setInfoVo
.
getId
());
excel
.
setDepartName
(
setInfoVo
.
getDepartName
());
...
...
@@ -1431,88 +1514,162 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getMedicalCardinal
())
&&
excel
.
getMedicalCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getMedicalCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getUnemploymentCardinal
())
&&
excel
.
getUnemploymentCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getUnemploymentCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getWorkInjuryCardinal
())
&&
excel
.
getWorkInjuryCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getWorkInjuryCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getBirthCardinal
())
&&
excel
.
getBirthCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getBirthCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getBigailmentCardinal
())
&&
excel
.
getBigailmentCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getBigailmentCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_LIMIT_ERROR
)));
// 各个社保基数和日期空 默认养老日期和基数
initExcelBaseAndDate
(
excel
);
// 校验各项起缴日期 查看是否符合社保补缴政策
if
(
validSocialStartDate
(
errorMessageList
,
excel
,
socialSet
))
return
true
;
//校验各项基数
if
(
validSocialBaseInfo
(
errorMessageList
,
excel
,
empVo
,
socialSet
))
return
true
;
}
// 校验公积金上下限和起缴日期
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
if
(
Common
.
isNotNull
(
fundSet
)
&&
Common
.
isNotNull
(
excel
.
getProvidentCardinal
())
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_LIMIT_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getProvidentStart
()),
fundSet
.
getCanOverpay
(),
fundSet
.
getOverpayNumber
(),
fundSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_DATE_LIMIT_ERROR
)));
return
true
;
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if
(
Common
.
isEmpty
(
excel
.
getRecordBase
())
&&
Common
.
isEmpty
(
excel
.
getSocialHousehold
())){
boolean
flag
=
false
;
// 各个社保基数和日期空 默认养老日期和基数
initExcelBaseAndDate
(
excel
);
// 自定义 只要有一个不相当同的 日期或基数 就要提示
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getMedicalCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getUnemploymentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getWorkInjuryCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getBirthCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getBigailmentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
Date
temp
=
new
Date
();
if
(
Common
.
isEmpty
(
empVo
)){
temp
=
excel
.
getContractStart
();
}
else
if
(
Common
.
isNotNull
(
empVo
)
&&
Common
.
isNotNull
(
empVo
.
getContractStart
())){
temp
=
empVo
.
getContractStart
();
}
else
{
temp
=
excel
.
getContractStart
();
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionStart
().
equals
(
temp
)
||
excel
.
getMedicalStart
().
equals
(
temp
)
||
excel
.
getUnemployStart
().
equals
(
temp
)
||
excel
.
getWorkInjuryStart
().
equals
(
temp
)
||
excel
.
getBirthStart
().
equals
(
temp
)
||
excel
.
getBigailmentStart
().
equals
(
temp
)
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
)));
return
true
;
}
// 其他 只用判断对应养老基数和时间 与合同时间 即可
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionStart
().
equals
(
temp
)
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
)));
return
true
;
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
}
return
false
;
}
private
boolean
validContractInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
){
// 合同起缴时间、合同类型、签订期限必填
if
((
Common
.
isEmpty
(
excel
.
getContractStart
())
||
Common
.
isEmpty
(
excel
.
getContractType
())
||
Common
.
isEmpty
(
excel
.
getContractName
()))){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
// 业务细分(合同类型为其他时必填)
if
(
excel
.
getContractType
().
equals
(
CommonConstants
.
TWENTY_ONE_STRING
)
&&
Common
.
isEmpty
(
excel
.
getContractSubName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
// 签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填
if
((
excel
.
getContractType
().
equals
(
CommonConstants
.
ONE_STRING
)
||
excel
.
getContractType
().
equals
(
CommonConstants
.
ZERO_STRING
))
&&
Common
.
isEmpty
(
excel
.
getContractEnd
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
return
false
;
}
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getPensionCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getMedicalCardinal
())
&&
excel
.
getMedicalCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getMedicalCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getUnemploymentCardinal
())
&&
excel
.
getUnemploymentCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getUnemploymentCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getWorkInjuryCardinal
())
&&
excel
.
getWorkInjuryCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getWorkInjuryCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getBirthCardinal
())
&&
excel
.
getBirthCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getBirthCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
||(
Common
.
isNotNull
(
excel
.
getBigailmentCardinal
())
&&
excel
.
getBigailmentCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getBigailmentCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
)
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_LIMIT_ERROR
)));
return
true
;
}
// 备案基数和养老基数 养老起缴日期 必填在前面已必填校验,这里不重复校验
if
(
Common
.
isEmpty
(
excel
.
getRecordBase
())
&&
Common
.
isEmpty
(
excel
.
getSocialHousehold
())){
// 自定义 只要有一个不相当同的 日期或基数 就要提示
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getMedicalCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getUnemploymentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getWorkInjuryCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getBirthCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
||
excel
.
getBigailmentCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
Date
temp
=
new
Date
();
if
(
Common
.
isEmpty
(
empVo
)){
temp
=
excel
.
getContractStart
();
}
else
if
(
Common
.
isNotNull
(
empVo
)
&&
Common
.
isNotNull
(
empVo
.
getContractStart
())){
temp
=
empVo
.
getContractStart
();
}
else
{
temp
=
excel
.
getContractStart
();
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionStart
().
equals
(
temp
)
||
excel
.
getMedicalStart
().
equals
(
temp
)
||
excel
.
getUnemployStart
().
equals
(
temp
)
||
excel
.
getWorkInjuryStart
().
equals
(
temp
)
||
excel
.
getBirthStart
().
equals
(
temp
)
||
excel
.
getBigailmentStart
().
equals
(
temp
)
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
)));
return
true
;
}
// 其他 只用判断对应养老基数和时间 与合同时间 即可
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
(
excel
.
getPensionStart
().
equals
(
temp
)
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
)));
return
true
;
}
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
&&
excel
.
getPensionCardinal
().
compareTo
(
excel
.
getRecordBase
())
!=
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR
)));
return
true
;
}
}
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())
&&
Common
.
isNotNull
(
fundSet
)
&&
Common
.
isNotNull
(
excel
.
getProvidentCardinal
())
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
&&
excel
.
getProvidentCardinal
().
compareTo
(
fundSet
.
getLowerLimit
())<
CommonConstants
.
ZERO_INT
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_FUND_LIMIT_ERROR
)));
return
true
;
return
false
;
}
private
boolean
validSocialStartDate
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())){
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getPensionStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getMedicalStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getUnemployStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getWorkInjuryStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getBirthStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
if
(
ServiceUtil
.
checkDispatchDate
(
LocalDateTimeUtils
.
convertDateToLDT
(
excel
.
getBigailmentStart
()),
socialSet
.
getCanOverpay
(),
socialSet
.
getOverpayNumber
(),
socialSet
.
getHaveThisMonth
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_START_IS_ERROR
)));
return
true
;
}
}
return
false
;
}
...
...
@@ -1936,7 +2093,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
remark
+=
"公积金"
;
}
providentFund
=
fundMapper
.
selectById
(
dis
.
getFundId
());
if
(
Common
.
is
NotNull
(
providentFund
))
{
if
(
Common
.
is
Empty
(
providentFund
))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工公积金派单数据:"
+
dis
.
getEmpName
()));
continue
;
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoImportLogServiceImpl.java
View file @
3e6e75da
...
...
@@ -86,7 +86,7 @@ public class TPaymentInfoImportLogServiceImpl extends ServiceImpl<TPaymentInfoIm
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeProjectExportVO
.
class
).
includeColumnFiledNames
(
getExportFieldNameDetailByClass
(
TPaymentInfoImportLogVo
.
class
)).
sheet
(
"社保导入日志"
)
EasyExcel
.
write
(
out
,
TPaymentInfoImportLogVo
.
class
).
includeColumnFiledNames
(
getExportFieldNameDetailByClass
(
TPaymentInfoImportLogVo
.
class
)).
sheet
(
"社保导入日志"
)
.
doWrite
(
list
);
out
.
flush
();
}
catch
(
IOException
e
)
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
3e6e75da
...
...
@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.security.core.parameters.P
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -53,17 +54,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -138,7 +136,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();;
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
...
...
@@ -184,256 +183,57 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
/**
* 按类型删除 社保或公积金缴费库数据
*
* @param id
* @param type 0 删除社保 1删除公积金
* @return
* @Author huyc
* @Date 2022-07-24
**/
@Override
public
R
<
Boolean
>
removeByIdAndType
(
String
id
,
String
type
)
{
public
R
removeInFoById
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
id
)
||
Common
.
isEmpty
(
type
)
||
(!
CommonConstants
.
ZERO_STRING
.
equals
(
type
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
type
)))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
TPaymentInfo
info
=
baseMapper
.
selectById
(
id
);
R
<
Boolean
>
x
=
removeByIdAndTypeCheck
(
type
,
info
);
if
(
x
!=
null
)
{
return
x
;
TPaymentInfo
paymentInfo
=
baseMapper
.
selectById
(
id
);
if
(!
user
.
getId
().
equals
(
paymentInfo
.
getCreateBy
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
return
R
.
failed
(
"非本人创建的数据禁止删除!"
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
info
.
getSalarySocialFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
info
.
getSalarySocialFlag
())))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsSalarySocialSettlement
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
info
.
getSalaryFundFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
info
.
getSalaryFundFlag
())))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsSalaryFundSettlement
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
paymentInfo
.
getPushStatus
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
return
R
.
failed
(
"已推送至结算平台禁止删除!"
);
}
// 存在差余额生成
List
<
String
>
idList
=
new
ArrayList
<>();
idList
.
add
(
id
);
removeByType
(
type
,
info
);
baseMapper
.
deleteById
(
id
);
return
R
.
ok
();
}
/**
* 通过ID获取缴费库 及社保、公积金明细
*
* @param id
* @Author huyc
* @Date 2022-07-24
**/
@Override
public
R
getAllInfoById
(
String
id
)
{
TPaymentInfoVo
vo
=
baseMapper
.
getAllInfoById
(
id
);
return
R
.
ok
(
vo
,
"查询成功!"
);
}
@Override
public
R
removeBatchByIdsAndType
(
String
type
,
String
settleDepartId
,
String
unitId
,
String
empIdCard
,
String
socialHouseId
,
String
fundHouseId
)
{
public
R
<
Boolean
>
removeAllInfoById
(
String
ids
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
TPaymentInfo
>
paymentInfoList
=
null
;
TPaymentInfo
queryEntity
=
new
TPaymentInfo
();
initQueryCondition
(
user
.
getId
(),
settleDepartId
,
unitId
,
empIdCard
,
socialHouseId
,
fundHouseId
,
queryEntity
,
type
);
//大于零不可删除
// int socialSettleCount = 0;
// int salarySettleCount = 0;
// socialSettleCount = baseMapper.selectCountForDelete(queryEntity,CommonConstants.ZERO_INT,type);
// if (socialSettleCount > 0) {
// return R.failed(PaymentConstants.paymentSaveFailExistsSettlement);
// }
// salarySettleCount = baseMapper.selectCountForDelete(queryEntity,CommonConstants.ONE_INT,type);
// if (salarySettleCount > 0) {
// return R.failed(PaymentConstants.paymentSaveFailExistsSalarySettlement);
// }
paymentInfoList
=
baseMapper
.
selectListForDelete
(
queryEntity
);
if
(
Common
.
isEmpty
(
paymentInfoList
)){
if
(
Common
.
isEmpty
(
ids
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
// 删除操作开始
deletePaymentByType
(
type
,
paymentInfoList
);
return
R
.
ok
();
}
/**
* 删除社保或公积金校验
*
* @param type
* @param info
* @Author huyc
* @Date 2022-07-24
* @return
**/
private
R
<
Boolean
>
removeByIdAndTypeCheck
(
String
type
,
TPaymentInfo
info
)
{
if
(
null
==
info
)
{
return
R
.
failed
(
CommonConstants
.
DATA_CAN_NOT_EMPTY
);
}
// 已财务账单结算不可删除
if
(
Common
.
isNotNull
(
info
.
getFinanceBillId
()))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsFinanceBillSettlement
);
}
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)
&&
Common
.
isNotNull
(
info
.
getSocialSettlementId
()))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsSocialSettlement
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)
&&
Common
.
isNotNull
(
info
.
getFundSettlementId
()))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsFundSettlement
);
}
if
(
Common
.
isNotNull
(
info
.
getAgentId
()))
{
return
R
.
failed
(
PaymentConstants
.
saveFailExistsAgentSettlement
);
}
return
null
;
}
List
<
String
>
idList
=
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
);
TPaymentInfo
paymentInfo
=
null
;
/**
* 初始化查询条件
* @Author huyc
* @Date 2022-07-27
* @param userId
* @param settleDepartId
* @param unitId
* @param empIdCard
* @param socialHouseId
* @param fundHouseId
* @param queryEntity
* @param type 0 全部删除 1 删除社保 2 删除公积金 必填
* @return
**/
private
void
initQueryCondition
(
String
userId
,
String
settleDepartId
,
String
unitId
,
String
empIdCard
,
String
socialHouseId
,
String
fundHouseId
,
TPaymentInfo
queryEntity
,
String
type
)
{
queryEntity
.
setCreateBy
(
userId
);
// 公积金删除 以外的情况 都是查社保生成月份删除
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)){
queryEntity
.
setSocialCreateMonth
(
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
));
queryEntity
.
setProvidentCreateMonth
(
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
));
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)){
queryEntity
.
setSocialCreateMonth
(
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
));
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
type
)){
queryEntity
.
setProvidentCreateMonth
(
DateUtil
.
getYearAndMonth
(
LocalDateTime
.
now
(),
0
));
}
if
(
Common
.
isNotNull
(
settleDepartId
)){
queryEntity
.
setSettleDomainId
(
settleDepartId
);
}
if
(
Common
.
isNotNull
(
unitId
)){
queryEntity
.
setUnitId
(
unitId
);
}
if
(
Common
.
isNotNull
(
empIdCard
)){
queryEntity
.
setEmpIdcard
(
empIdCard
);
}
if
(
Common
.
isNotNull
(
socialHouseId
)){
queryEntity
.
setSocialHousehold
(
socialHouseId
);
}
if
(
Common
.
isNotNull
(
fundHouseId
)){
queryEntity
.
setProvidentHousehold
(
fundHouseId
);
for
(
String
id
:
idList
)
{
paymentInfo
=
baseMapper
.
selectById
(
id
);
if
(
null
!=
paymentInfo
&&
Common
.
isNotNull
(
paymentInfo
.
getId
()))
{
if
((!
user
.
getId
().
equals
(
paymentInfo
.
getCreateBy
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
paymentInfo
.
getPushStatus
()))
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
return
R
.
failed
(
"存在不符合条件的数据(已推送至结算平台或非本人创建),禁止删除!"
);
}
baseMapper
.
deleteById
(
id
);
}
}
return
R
.
ok
();
}
/**
*
删除社保或公积金
*
通过ID获取缴费库 及社保、公积金明细
*
* @param type
* @param info
* @param id
* @Author huyc
* @Date 2022-07-24
* @return
**/
private
void
removeByType
(
String
type
,
TPaymentInfo
info
)
{
// 只删除社保
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)
&&
Common
.
isNotNull
(
info
.
getSocialId
()))
{
info
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
info
.
getProvidentSum
()));
info
.
setSocialSum
(
BigDecimal
.
ZERO
);
info
.
setUnitSocialSum
(
BigDecimal
.
ZERO
);
info
.
setSocialSecurityPersonalSum
(
BigDecimal
.
ZERO
);
info
.
setSocialHousehold
(
null
);
info
.
setSocialId
(
null
);
if
(
Common
.
isNotNull
(
info
.
getFundId
()))
{
baseMapper
.
updateDeleteInfo
(
info
);
}
else
{
baseMapper
.
deleteById
(
info
.
getId
());
}
// 只删除公积金
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)
&&
Common
.
isNotNull
(
info
.
getFundId
()))
{
info
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
info
.
getSocialSum
()));
info
.
setProvidentSum
(
BigDecimal
.
ZERO
);
info
.
setProvidentHousehold
(
null
);
info
.
setFundId
(
null
);
if
(
Common
.
isNotNull
(
info
.
getSocialId
()))
{
baseMapper
.
updateDeleteInfo
(
info
);
}
else
{
baseMapper
.
deleteById
(
info
.
getId
());
}
}
}
/**
* 按类型删除缴费库数据
* @Author huyc
* @Date 2022-07-27
* @param type
* @param paymentInfoList
* @return
**/
private
void
deletePaymentByType
(
String
type
,
List
<
TPaymentInfo
>
paymentInfoList
)
{
for
(
TPaymentInfo
info:
paymentInfoList
){
// 全部删除
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
)){
if
(
Common
.
isNotNull
(
info
.
getId
())){
baseMapper
.
deleteById
(
info
.
getId
());
}
// 只删除社保
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
)){
info
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
info
.
getProvidentSum
()));
info
.
setSocialSum
(
BigDecimal
.
ZERO
);
info
.
setUnitSocialSum
(
BigDecimal
.
ZERO
);
info
.
setSocialSecurityPersonalSum
(
BigDecimal
.
ZERO
);
info
.
setSocialHousehold
(
null
);
info
.
setSocialId
(
null
);
if
(
Common
.
isNotNull
(
info
.
getFundId
())){
baseMapper
.
updateDeleteInfo
(
info
);
}
else
{
baseMapper
.
deleteById
(
info
.
getId
());
}
// 只删除公积金
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
type
)){
info
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
info
.
getSocialSum
()));
info
.
setProvidentSum
(
BigDecimal
.
ZERO
);
info
.
setProvidentHousehold
(
null
);
info
.
setFundId
(
null
);
if
(
Common
.
isNotNull
(
info
.
getSocialId
())){
baseMapper
.
updateDeleteInfo
(
info
);
}
else
{
baseMapper
.
deleteById
(
info
.
getId
());
}
}
}
}
private
Long
noPageCountDiy
(
TPaymentInfoSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
buildQueryWrapper
(
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getIdList
()))
{
wrapper
.
in
(
TPaymentInfo:
:
getId
,
searchVo
.
getIdList
());
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TPaymentInfoSearchVo
entity
)
{
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TPaymentInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TPaymentInfo:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TPaymentInfo:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
@Override
public
R
getAllInfoById
(
String
id
)
{
TPaymentInfoVo
vo
=
baseMapper
.
getAllInfoById
(
id
);
return
R
.
ok
(
vo
,
"查询成功!"
);
}
@Override
...
...
@@ -542,7 +342,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
String
>
monthList
=
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
SOCIAL_PAY_MONTH
).
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//已存在社保缴费库数据 非删除状态
List
<
TPaymentInfo
>
paymentInfos
=
baseMapper
.
selectListForPaymentImport
(
monthList
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
));
//社保唯一性检验条件:身份证+社保缴纳月份+生成月份
//养老
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
=
new
ConcurrentHashMap
<>();
//大病救助金
...
...
@@ -559,7 +358,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
for
(
TPaymentInfo
info
:
paymentInfos
)
{
if
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
info
.
getPersonalPensionMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfo
Big
Map
.
put
(
info
.
getSocialPayAddr
()
paymentInfo
Pension
Map
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
...
...
@@ -572,7 +371,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
if
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
info
.
getPersonalBigmailmentMoney
()),
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitBigmailmentMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfo
Pension
Map
.
put
(
info
.
getSocialPayAddr
()
paymentInfo
Big
Map
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
...
...
@@ -868,10 +667,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
String
[]
areaArray
;
List
<
TPaymentInfo
>
paymentInfoListTemp
;
BigDecimal
cTemp
;
String
result
=
null
;
String
lockKey
;
String
checkRes
;
for
(
TPaymentInfoVo
infoVo
:
list
)
{
atomicLine
.
incrementAndGet
();
...
...
@@ -1163,15 +958,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setSocialPayAddr
(
paymentInfo
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
// 同时设置公积金缴纳地 如果是安徽省公积金不做变更
if
(!
CommonConstants
.
ANHUISTRING
.
equals
(
paymentInfo
.
getProvidentPayAddr
()))
{
paymentInfo
.
setProvidentPayAddr
(
paymentInfo
.
getSocialPayAddr
());
}
paymentInfo
.
setSocialSettlementFlag
(
CommonConstants
.
ZERO_STRING
);
paymentInfo
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
paymentInfo
.
setSocialCreateMonth
(
infoVo
.
getSocialCreateMonth
());
// 同时增加公积金生成月
paymentInfo
.
setProvidentCreateMonth
(
paymentInfo
.
getSocialCreateMonth
());
paymentInfo
.
setUnitPensionMoney
(
infoVo
.
getUnitPensionMoney
());
paymentInfo
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
paymentInfo
.
setUnitBirthMoney
(
null
==
infoVo
.
getUnitBirthMoney
()
?
BigDecimal
.
ZERO
:
infoVo
.
getUnitBirthMoney
());
...
...
@@ -1216,7 +1004,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
,
paymentInfo
.
getPersonalAccrual
()));
paymentInfo
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
paymentInfo
.
getUnitSocialSum
(),
paymentInfo
.
getSocialSecurityPersonalSum
()));
paymentInfo
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
paymentInfo
.
getSocialSum
(),
paymentInfo
.
getProvidentSum
()
));
paymentInfo
.
setSumAll
(
paymentInfo
.
getSocialSum
(
));
paymentInfo
.
setUpdateBy
(
user
.
getId
());
if
(
null
!=
paymentInfo
&&
Common
.
isEmpty
(
paymentInfo
.
getSocialId
()))
{
paymentInfo
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
...
...
@@ -1678,53 +1466,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
=
null
;
}
//安徽省的公积金合并到合肥市的社保缴费库数据中
if
(
CommonConstants
.
ANHUISTRING
.
equals
(
infoVo
.
getProvidentPayAddr
()))
{
paymentInfoListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
and
(
obj
->
obj
.
eq
(
TPaymentInfo:
:
getSocialPayAddr
,
CommonConstants
.
HEFEISTRING
)
.
or
()
.
eq
(
TPaymentInfo:
:
getProvidentPayAddr
,
CommonConstants
.
ANHUISTRING
))
.
eq
(
TPaymentInfo:
:
getEmpIdcard
,
infoVo
.
getEmpIdcard
())
.
eq
(
TPaymentInfo:
:
getProvidentPayMonth
,
infoVo
.
getProvidentPayMonth
().
trim
())
.
eq
(
TPaymentInfo:
:
getProvidentCreateMonth
,
infoVo
.
getProvidentCreateMonth
().
trim
()));
}
else
{
paymentInfoListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getSocialPayAddr
,
infoVo
.
getProvidentPayAddr
())
.
eq
(
TPaymentInfo:
:
getEmpIdcard
,
infoVo
.
getEmpIdcard
())
.
eq
(
TPaymentInfo:
:
getProvidentPayMonth
,
infoVo
.
getProvidentPayMonth
().
trim
())
.
eq
(
TPaymentInfo:
:
getProvidentCreateMonth
,
infoVo
.
getProvidentCreateMonth
().
trim
()));
}
if
(
Common
.
isNotNull
(
paymentInfoListTemp
))
{
for
(
TPaymentInfo
info
:
paymentInfoListTemp
)
{
cTemp
=
BigDecimalUtils
.
safeAdd
(
infoVo
.
getUnitProvidentSum
(),
infoVo
.
getPersonalProvidentSum
());
//如果是退费:社保为零 或 社保相等更新
if
((
BigDecimalUtils
.
isNullToZero
(
info
.
getSumAll
()).
compareTo
(
BigDecimal
.
ZERO
)
<
0
)
&&
cTemp
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
&&
(
BigDecimalUtils
.
isNullToZero
(
info
.
getProvidentSum
()).
compareTo
(
BigDecimal
.
ZERO
)
==
0
||
cTemp
.
compareTo
(
info
.
getProvidentSum
())
==
0
))
{
paymentInfo
=
info
;
break
;
}
//社保为零 或者社保金额相等是更新 其他新增
if
((
BigDecimalUtils
.
isNullToZero
(
info
.
getProvidentSum
()).
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
BigDecimalUtils
.
isNullToZero
(
info
.
getSumAll
()).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
||
(
BigDecimalUtils
.
isNullToZero
(
info
.
getProvidentSum
()).
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
cTemp
.
compareTo
(
info
.
getProvidentSum
())
==
0
))
{
paymentInfo
=
info
;
break
;
}
}
}
if
(
Common
.
isNotNull
(
paymentInfo
)
&&
(
CommonConstants
.
ONE_STRING
.
equals
(
paymentInfo
.
getSalaryFundFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
paymentInfo
.
getSalaryFundFlag
())))
{
errorMessageList
.
add
(
new
ErrorMessage
(
infoVo
.
getRowIndex
(),
"对应员工身份证"
+
infoVo
.
getEmpName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
()
+
"公积金缴费数据已薪资结算,无法更新!"
));
continue
;
}
if
(
null
==
paymentInfo
)
{
paymentInfo
=
new
TPaymentInfo
();
paymentInfo
.
setLockStatus
(
CommonConstants
.
ZERO_STRING
);
...
...
@@ -1740,11 +1481,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setProvidentPayMonth
(
infoVo
.
getProvidentPayMonth
());
//同时设置社保缴纳日期方便导入处理
paymentInfo
.
setSocialPayMonth
(
infoVo
.
getProvidentPayMonth
());
paymentInfo
.
setFundSettlementFlag
(
CommonConstants
.
ZERO_STRING
);
paymentInfo
.
setFundProvince
(
fund
.
getFundProvince
());
paymentInfo
.
setFundCity
(
fund
.
getFundCity
());
paymentInfo
.
setFundTown
(
fund
.
getFundTown
());
paymentInfo
.
setProvidentHousehold
(
fund
.
getProvidentHousehold
());
if
(
null
!=
paymentInfo
.
getFundProvince
())
{
temp
=
areaMap
.
get
(
paymentInfo
.
getFundProvince
());
...
...
@@ -1766,14 +1505,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
if
(
CommonConstants
.
ANHUISTRING
.
equals
(
paymentInfo
.
getProvidentPayAddr
()))
{
paymentInfo
.
setSocialPayAddr
(
CommonConstants
.
HEFEISTRING
);
}
else
{
paymentInfo
.
setSocialPayAddr
(
paymentInfo
.
getProvidentPayAddr
());
}
paymentInfo
.
setProvidentCreateMonth
(
infoVo
.
getProvidentCreateMonth
());
//同步新增社保生成月份
paymentInfo
.
setSocialCreateMonth
(
paymentInfo
.
getProvidentCreateMonth
());
paymentInfo
.
setUnitProvidentSet
(
null
==
infoVo
.
getUnitProvidentSet
()
?
BigDecimal
.
ZERO
:
infoVo
.
getUnitProvidentSet
());
paymentInfo
.
setPersonalProidentSet
(
null
==
infoVo
.
getUnitProvidentSet
()
?
BigDecimal
.
ZERO
:
infoVo
.
getUnitProvidentSet
());
paymentInfo
.
setProvidentPercent
(
null
==
infoVo
.
getProvidentPercent
()
?
BigDecimal
.
ZERO
:
infoVo
.
getProvidentPercent
());
...
...
@@ -1781,7 +1514,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setPersonalProvidentSum
(
null
==
infoVo
.
getUnitProvidentSum
()
?
BigDecimal
.
ZERO
:
infoVo
.
getUnitProvidentSum
());
paymentInfo
.
setUnitProvidentSum
(
null
==
infoVo
.
getUnitProvidentSum
()
?
BigDecimal
.
ZERO
:
infoVo
.
getUnitProvidentSum
());
paymentInfo
.
setProvidentSum
(
BigDecimalUtils
.
safeAdd
(
paymentInfo
.
getUnitProvidentSum
(),
paymentInfo
.
getPersonalProvidentSum
()));
paymentInfo
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
paymentInfo
.
getSocialSum
(),
paymentInfo
.
getProvidentSum
()
));
paymentInfo
.
setSumAll
(
paymentInfo
.
getProvidentSum
(
));
if
(
null
!=
paymentInfo
&&
Common
.
isEmpty
(
paymentInfo
.
getFundId
()))
{
paymentInfo
.
setFundId
(
UUID
.
randomUUID
().
toString
());
}
...
...
@@ -1850,15 +1583,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
getErrorMessageHashMapThree
(
user
,
random
,
errorMessageList
,
key
,
listMap
);
}
// 导入前做队列空闲判断,防止队列不足出现数据丢失的场景
if
(
CollUtil
.
isNotEmpty
(
list
))
{
int
taskSize
=
list
.
size
()
/
partSize
+
CommonConstants
.
ONE_INT
;
int
residualCapacity
=
yfSocialImportThreadPoolExecutor
.
getResidualCapacity
();
if
(
taskSize
>
residualCapacity
)
{
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIALINFO_LIST_NUM_LARGE
)));
}
}
// 将以下代码提取出来,使用paymentInfoMap提升性能,避免list多次循环查询数据库浪费性能
// 导入前做队列空闲判断,防止队列不足出现数据丢失的场景
if
(
CollUtil
.
isNotEmpty
(
list
))
{
...
...
@@ -1873,19 +1597,72 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//已存在的档案数据
List
<
String
>
monthList
=
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
SOCIAL_PAY_MONTH
).
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//已存在社保缴费库数据 非删除状态
List
<
TPaymentInfo
Vo
>
paymentInfos
=
baseMapper
.
selectPaymentAllInfoByMonthAndIdCard
(
monthList
,
List
<
TPaymentInfo
>
paymentInfos
=
baseMapper
.
selectListForPaymentImport
(
monthList
,
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
));
//社保唯一性检验条件:身份证+社保缴纳月份+生成月份
ConcurrentHashMap
<
String
,
TPaymentInfoVo
>
paymentInfoMap
=
new
ConcurrentHashMap
<>();
//养老
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
=
new
ConcurrentHashMap
<>();
//大病救助金
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoBigMap
=
new
ConcurrentHashMap
<>();
//失业
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
=
new
ConcurrentHashMap
<>();
//工伤
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
=
new
ConcurrentHashMap
<>();
//医保
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
=
new
ConcurrentHashMap
<>();
if
(
Common
.
isNotNull
(
paymentInfos
))
{
for
(
TPaymentInfoVo
info
:
paymentInfos
)
{
paymentInfoMap
.
putIfAbsent
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialCreateMonth
(),
info
);
for
(
TPaymentInfo
info
:
paymentInfos
)
{
if
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
info
.
getPersonalPensionMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfoPensionMap
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
PENSION_RISK
,
info
);
}
if
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
info
.
getPersonalUnemploymentMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfoUnEmpMap
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
UNEMPLOYEEMENT_RISK
,
info
);
}
if
(
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitInjuryMoney
()).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfoInjuryMap
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
INJURY_RISK
,
info
);
}
if
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
info
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
info
.
getPersonalMedicalMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
paymentInfoMedicalMap
.
put
(
info
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
info
.
getSocialCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
MEDICAL
,
info
);
}
}
}
// -----------------------------生成paymentInfoMap本段结束--------------------------------
...
...
@@ -1904,7 +1681,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(
list
.
size
()
<
partSize
)
{
CompletableFuture
<
List
<
TPaymentInfoImportLog
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
list
,
areaMap
,
areaMap2
,
paymentInfoMap
,
CommonConstants
.
ONE_INT
,
type
),
yfSocialImportThreadPoolExecutor
)
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
type
),
yfSocialImportThreadPoolExecutor
)
.
whenComplete
((
result
,
e
)
->
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
this
.
tPaymentInfoImportLogService
.
saveBatch
(
result
);
...
...
@@ -1922,7 +1700,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
final
List
<
TPaymentHeFeiVo
>
finalList
=
list
.
subList
(
0
,
1
);
CompletableFuture
<
List
<
TPaymentInfoImportLog
>>
oneCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalList
,
areaMap
,
areaMap2
,
paymentInfoMap
,
CommonConstants
.
ONE_INT
,
type
),
yfSocialImportThreadPoolExecutor
)
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
CommonConstants
.
ONE_INT
,
type
),
yfSocialImportThreadPoolExecutor
)
.
whenComplete
((
result
,
e
)
->
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
this
.
tPaymentInfoImportLogService
.
saveBatch
(
result
);
...
...
@@ -1940,7 +1719,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentHeFeiVo
>
finalTempList1
=
tempList
;
CompletableFuture
<
List
<
TPaymentInfoImportLog
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList1
,
areaMap
,
areaMap2
,
paymentInfoMap
,
idx
,
type
),
yfSocialImportThreadPoolExecutor
)
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
idx
,
type
),
yfSocialImportThreadPoolExecutor
)
.
whenComplete
((
result
,
e
)
->
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
this
.
tPaymentInfoImportLogService
.
saveBatch
(
result
);
...
...
@@ -1971,7 +1751,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
int
finalLastIdx
=
lastIdx
+
1
;
CompletableFuture
<
List
<
TPaymentInfoImportLog
>>
listCompletableFuture
=
CompletableFuture
.
supplyAsync
(()
->
executeImportSocialListThree
(
user
,
atomicLine
,
random
,
finalTempList
,
areaMap
,
areaMap2
,
paymentInfoMap
,
finalLastIdx
,
type
),
yfSocialImportThreadPoolExecutor
)
areaMap2
,
paymentInfoPensionMap
,
paymentInfoMedicalMap
,
paymentInfoUnEmpMap
,
paymentInfoInjuryMap
,
finalLastIdx
,
type
),
yfSocialImportThreadPoolExecutor
)
.
whenComplete
((
result
,
e
)
->
{
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
this
.
tPaymentInfoImportLogService
.
saveBatch
(
result
);
...
...
@@ -2000,7 +1781,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil
.
remove
(
key
);
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
"数据批量导入异常:"
+
e
));
}
finally
{
paymentInfoMap
.
clear
();
paymentInfoPensionMap
.
clear
();
paymentInfoBigMap
.
clear
();
paymentInfoMedicalMap
.
clear
();
paymentInfoUnEmpMap
.
clear
();
paymentInfoInjuryMap
.
clear
();
}
}
...
...
@@ -2039,16 +1824,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentHeFeiVo
>
list
,
HashMap
<
String
,
String
>
areaMap
,
HashMap
<
String
,
String
>
areaMap2
,
ConcurrentHashMap
<
String
,
TPaymentInfoVo
>
paymentInfoMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoPensionMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoMedicalMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoUnEmpMap
,
ConcurrentHashMap
<
String
,
TPaymentInfo
>
paymentInfoInjuryMap
,
int
idx
,
String
type
)
{
int
i
=
idx
;
List
<
TPaymentInfoImportLog
>
logList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
list
))
{
TPaymentInfo
Vo
payExists
=
null
;
TPaymentInfo
payExists
=
null
;
TSocialInfo
socialInfo
=
null
;
String
temp
;
TPaymentInfo
tempPay
;
int
res
=
-
1
;
List
<
String
>
idcards
=
Common
.
listObjectToStrList
(
list
,
ExcelAttributeConstants
.
EMPIDCARD
);
// 全部办理成功 和 部分办理失败
...
...
@@ -2087,8 +1874,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
[]
areaArray
;
String
checkRes
;
String
result
=
null
;
String
lockKey
;
for
(
TPaymentHeFeiVo
infoVo
:
list
)
{
atomicLine
.
incrementAndGet
();
++
i
;
...
...
@@ -2170,205 +1955,237 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"必填项校验失败:社保缴纳月份不可为空!"
,
i
,
random
));
continue
;
}
// 判重 此处代码块要同步,否则无法保证导入数据的重复性
lockKey
=
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCreateMonth
().
trim
();
try
{
result
=
RedisDistributedLock
.
tryLock
(
lockKey
,
CommonConstants
.
ONE_STRING
,
500
,
null
);
}
catch
(
InterruptedException
e
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"竞争导入异常,请重新导入!"
,
i
,
random
));
RedisDistributedLock
.
unlock
(
lockKey
,
result
);
continue
;
//判断是否存在养老缴费数据
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
=
paymentInfoPensionMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCreateMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
PENSION_RISK
);
//存在社保缴费数据
if
(
null
!=
payExists
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitSet
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitPensionMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalPensionMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的养老缴费数据,请勿重复导入!"
,
i
,
random
));
continue
;
}
else
{
payExists
=
null
;
}
}
if
(
Common
.
isNotNull
(
result
))
{
try
{
if
(
null
!=
paymentInfoMap
)
{
payExists
=
paymentInfoMap
.
get
(
lockKey
);
}
//存在社保缴费数据
if
(
Common
.
isNotNull
(
payExists
))
{
// 已结算 提示, 考虑到退费和正常缴纳的 :1.正交缴纳和退费: 生成月份+缴纳月份不可能一致的无需派单 2.异地缴纳:不同区域缴纳也不用判断
if
(
CommonConstants
.
ONE_STRING
.
equals
(
payExists
.
getSalarySocialFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
payExists
.
getSalarySocialFlag
())
||
CommonConstants
.
ONE_STRING
.
equals
(
payExists
.
getSocialSettlementFlag
())
||
CommonConstants
.
TWO_STRING
.
equals
(
payExists
.
getSocialSettlementFlag
()))
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"社保已工资或核准表结算!"
,
i
,
random
));
continue
;
}
// 校验每种险种是否可以导入
if
(
checkImportInfo
(
random
,
i
,
logList
,
payExists
,
infoVo
,
type
))
{
continue
;
}
}
else
{
payExists
=
null
;
}
if
(
null
==
payExists
)
{
payExists
=
new
TPaymentInfoVo
();
payExists
.
setLockStatus
(
CommonConstants
.
ZERO_STRING
);
payExists
.
setEmpId
(
socialInfo
.
getEmpId
());
payExists
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
payExists
.
setEmpName
(
socialInfo
.
getEmpName
());
payExists
.
setEmpNo
(
socialInfo
.
getEmpNo
());
payExists
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
payExists
.
setUnitId
(
socialInfo
.
getBelongUnit
());
payExists
.
setInauguralTeam
(
socialInfo
.
getInauguralTeam
());
payExists
.
setTelecomNumber
(
socialInfo
.
getTelecomNumber
());
payExists
.
setSalaryFundFlag
(
CommonConstants
.
ZERO_STRING
);
payExists
.
setSalarySocialFlag
(
CommonConstants
.
ZERO_STRING
);
payExists
.
setSocialSettlementFlag
(
CommonConstants
.
ZERO_STRING
);
}
payExists
.
setSocialProvince
(
socialInfo
.
getSocialProvince
());
payExists
.
setSocialCity
(
socialInfo
.
getSocialCity
());
payExists
.
setSocialTown
(
socialInfo
.
getSocialTown
());
payExists
.
setSocialHousehold
(
socialInfo
.
getSocialHousehold
());
payExists
.
setSocialPayMonth
(
infoVo
.
getSocialPayMonth
());
// 同时设置公积金缴纳日期方便导入处理
payExists
.
setProvidentPayMonth
(
infoVo
.
getSocialPayMonth
());
//判断是否存在失业缴费数据
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
=
paymentInfoUnEmpMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCreateMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
UNEMPLOYEEMENT_RISK
);
//存在社保缴费数据
if
(
null
!=
payExists
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitSet
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitUnemploymentMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalUnemploymentMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的失业缴费数据,请勿重复导入!"
,
i
,
random
));
continue
;
}
else
{
payExists
=
null
;
}
}
if
(
null
!=
payExists
.
getSocialProvince
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialProvince
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
temp
);
}
}
if
(
null
!=
payExists
.
getSocialCity
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialCity
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
if
(
null
!=
payExists
.
getSocialTown
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialTown
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
// 同时设置公积金缴纳地 如果是安徽省公积金不做变更
if
(!
CommonConstants
.
ANHUISTRING
.
equals
(
payExists
.
getProvidentPayAddr
()))
{
payExists
.
setProvidentPayAddr
(
payExists
.
getSocialPayAddr
());
}
payExists
.
setSocialSettlementFlag
(
CommonConstants
.
ZERO_STRING
);
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setSocialCreateMonth
(
infoVo
.
getSocialCreateMonth
());
// 同时增加公积金生成月
payExists
.
setProvidentCreateMonth
(
payExists
.
getSocialCreateMonth
());
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalPensionMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalPensionSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalPensionMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalPensionSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitPensionMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalPensionMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalUnemploymentMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitUnemploymentSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalUnemploymentSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalUnemploymentMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitUnemploymentSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalUnemploymentSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitUnemploymentMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalUnemploymentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitInjuryMoney
()
,
payExists
.
getUnitSocialSum
()));
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
payExists
.
setUnitMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalMedicalMoney
(
infoVo
.
getPersonalMedicalMoney
());
payExists
.
setPersonalMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalBigmailmentMoney
(
infoVo
.
getPersonalBigailmentMoney
());
payExists
.
setUnitBigmailmentMoney
(
infoVo
.
getUnitBigailmentMoney
());
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
payExists
.
setUnitMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalMedicalMoney
(
infoVo
.
getPersonalMedicalMoney
());
payExists
.
setPersonalMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalBigmailmentMoney
(
infoVo
.
getPersonalBigailmentMoney
());
payExists
.
setUnitBigmailmentMoney
(
infoVo
.
getUnitBigailmentMoney
());
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitMedicalMoney
()
,
payExists
.
getUnitBigmailmentMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalMedicalMoney
()
,
payExists
.
getPersonalBigmailmentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSumAll
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getSocialSum
(),
payExists
.
getProvidentSum
()));
if
(
null
!=
payExists
&&
Common
.
isEmpty
(
payExists
.
getSocialId
()))
{
payExists
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
}
tempPay
=
reflectionPaymentInfo
(
payExists
);
if
(
null
!=
payExists
&&
Common
.
isNotNull
(
payExists
.
getId
()))
{
res
=
baseMapper
.
updateById
(
tempPay
);
if
(
res
<
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库更新失败!"
,
i
,
random
));
continue
;
}
else
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
SUCCESS_MSG_PREFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库更新成功!"
,
i
,
random
));
paymentInfoMap
.
putIfAbsent
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getSocialCreateMonth
().
trim
(),
payExists
);
continue
;
}
}
else
{
res
=
insertAndSTimestamp
(
tempPay
);
if
(
res
<
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库保存失败!"
,
i
,
random
));
continue
;
}
payExists
.
setId
(
tempPay
.
getId
());
paymentInfoMap
.
putIfAbsent
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
payExists
.
getSocialCreateMonth
().
trim
(),
payExists
);
}
//判断是否存在医保缴费数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
payExists
=
paymentInfoMedicalMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCreateMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
MEDICAL
);
//存在社保缴费数据
if
(
null
!=
payExists
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getPersonalMedicalMoney
()))).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的医保缴费数据,请勿重复导入!"
,
i
,
random
));
continue
;
}
else
{
payExists
=
null
;
}
}
//判断是否存在工伤缴费数据
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
=
paymentInfoInjuryMap
.
get
(
infoVo
.
getSocialPayAddr
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getEmpIdcard
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialPayMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
infoVo
.
getSocialCreateMonth
().
trim
()
+
CommonConstants
.
DOWN_LINE_STRING
+
PaymentConstants
.
INJURY_RISK
);
//存在社保缴费数据
if
(
null
!=
payExists
&&
BigDecimalUtils
.
safeMultiply
(
BigDecimalUtils
.
safeAdd
(
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getUnitMedicalMoney
()),
BigDecimalUtils
.
isNullToZero
(
infoVo
.
getPersonalMedicalMoney
())),
BigDecimalUtils
.
isNullToZero
(
payExists
.
getUnitInjuryMoney
())).
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"已存在对应员工身份证"
+
infoVo
.
getEmpIdcard
()
+
"的单位工伤缴费数据,请勿重复导入!"
,
i
,
random
));
continue
;
}
else
{
payExists
=
null
;
}
}
if
(
null
==
payExists
)
{
payExists
=
new
TPaymentInfo
();
payExists
.
setLockStatus
(
CommonConstants
.
ZERO_STRING
);
payExists
.
setEmpId
(
socialInfo
.
getEmpId
());
payExists
.
setEmpIdcard
(
socialInfo
.
getEmpIdcard
());
payExists
.
setEmpName
(
socialInfo
.
getEmpName
());
payExists
.
setEmpNo
(
socialInfo
.
getEmpNo
());
payExists
.
setSettleDomainId
(
socialInfo
.
getSettleDomain
());
payExists
.
setUnitId
(
socialInfo
.
getBelongUnit
());
payExists
.
setInauguralTeam
(
socialInfo
.
getInauguralTeam
());
payExists
.
setTelecomNumber
(
socialInfo
.
getTelecomNumber
());
}
payExists
.
setSocialProvince
(
socialInfo
.
getSocialProvince
());
payExists
.
setSocialCity
(
socialInfo
.
getSocialCity
());
payExists
.
setSocialTown
(
socialInfo
.
getSocialTown
());
payExists
.
setSocialHousehold
(
socialInfo
.
getSocialHousehold
());
payExists
.
setSocialPayMonth
(
infoVo
.
getSocialPayMonth
());
// 同时设置公积金缴纳日期方便导入处理
payExists
.
setProvidentPayMonth
(
infoVo
.
getSocialPayMonth
());
if
(
null
!=
payExists
.
getSocialProvince
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialProvince
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
temp
);
}
}
if
(
null
!=
payExists
.
getSocialCity
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialCity
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
if
(
null
!=
payExists
.
getSocialTown
())
{
temp
=
areaMap
.
get
(
payExists
.
getSocialTown
());
if
(
Common
.
isNotNull
(
temp
))
{
payExists
.
setSocialPayAddr
(
payExists
.
getSocialPayAddr
()
+
CommonConstants
.
CENTER_SPLIT_LINE_STRING
+
temp
);
}
}
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setSocialCreateMonth
(
infoVo
.
getSocialCreateMonth
());
if
(
PaymentConstants
.
PENSION_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalPensionMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalPensionSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitPensionMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalPensionMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitPensionSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalPensionSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitPensionMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalPensionMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
if
(
PaymentConstants
.
UNEMPLOYEEMENT_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalUnemploymentMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitUnemploymentSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalUnemploymentSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitUnemploymentMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setPersonalUnemploymentMoney
(
infoVo
.
getPersonalMoney
());
payExists
.
setUnitUnemploymentSet
(
infoVo
.
getUnitSet
());
payExists
.
setPersonalUnemploymentSet
(
infoVo
.
getPersonalSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitUnemploymentMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalUnemploymentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
if
(
PaymentConstants
.
INJURY_RISK
.
equals
(
infoVo
.
getRiskType
()))
{
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitInjuryMoney
(
infoVo
.
getUnitMoney
());
payExists
.
setUnitInjurySet
(
infoVo
.
getUnitSet
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitInjuryMoney
()
,
payExists
.
getUnitSocialSum
()));
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
payExists
.
setUnitMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalMedicalMoney
(
infoVo
.
getPersonalMedicalMoney
());
payExists
.
setPersonalMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalBigmailmentMoney
(
infoVo
.
getPersonalBigailmentMoney
());
payExists
.
setUnitBigmailmentMoney
(
infoVo
.
getUnitBigailmentMoney
());
payExists
.
setUnitMedicalMoney
(
infoVo
.
getUnitMedicalMoney
());
payExists
.
setUnitMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalMedicalMoney
(
infoVo
.
getPersonalMedicalMoney
());
payExists
.
setPersonalMedicalSet
(
infoVo
.
getMedicalSet
());
payExists
.
setPersonalBigmailmentMoney
(
infoVo
.
getPersonalBigailmentMoney
());
payExists
.
setUnitBigmailmentMoney
(
infoVo
.
getUnitBigailmentMoney
());
payExists
.
setSocialSecurityNo
(
infoVo
.
getSocialSecurityNo
());
payExists
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitMedicalMoney
()
,
payExists
.
getUnitBigmailmentMoney
()
,
payExists
.
getUnitSocialSum
()));
payExists
.
setSocialSecurityPersonalSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getPersonalMedicalMoney
()
,
payExists
.
getPersonalBigmailmentMoney
()
,
payExists
.
getSocialSecurityPersonalSum
()));
}
payExists
.
setSocialSum
(
BigDecimalUtils
.
safeAdd
(
payExists
.
getUnitSocialSum
(),
payExists
.
getSocialSecurityPersonalSum
()));
payExists
.
setSumAll
(
payExists
.
getSocialSum
());
if
(
null
!=
payExists
&&
Common
.
isEmpty
(
payExists
.
getSocialId
()))
{
payExists
.
setSocialId
(
UUID
.
randomUUID
().
toString
());
}
if
(
null
!=
payExists
&&
Common
.
isNotNull
(
payExists
.
getId
()))
{
res
=
baseMapper
.
updateById
(
payExists
);
if
(
res
<
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库更新失败!"
,
i
,
random
));
continue
;
}
else
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
SUCCESS_MSG_PREFIX
+
"保存成功!"
,
i
,
random
));
}
finally
{
RedisDistributedLock
.
unlock
(
lockKey
,
result
);
,
CommonConstants
.
SUCCESS_MSG_PREFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库更新成功!"
,
i
,
random
));
continue
;
}
}
else
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"竞争导入失败,请重新导入!"
,
i
,
random
));
res
=
insertAndSTimestamp
(
payExists
);
if
(
res
<
0
)
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
infoVo
.
getEmpIdcard
()
+
"_缴费库保存失败!"
,
i
,
random
));
continue
;
}
}
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
SUCCESS_MSG_PREFIX
+
"保存成功!"
,
i
,
random
));
}
}
else
{
return
null
;
...
...
@@ -2379,7 +2196,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
/**
* 导入校验
**/
private
boolean
socialThreeCheckBase
(
String
random
,
int
i
,
List
<
TPaymentInfoImportLog
>
logList
,
TPaymentHeFeiVo
infoVo
,
String
type
)
{
private
boolean
socialThreeCheckBase
(
String
random
,
int
i
,
List
<
TPaymentInfoImportLog
>
logList
,
TPaymentHeFeiVo
infoVo
,
String
type
)
{
if
(!
Common
.
isNotNull
(
infoVo
.
getSocialPayMonth
()))
{
logList
.
add
(
new
TPaymentInfoImportLog
(
null
,
infoVo
.
getEmpName
(),
infoVo
.
getEmpIdcard
()
,
CommonConstants
.
ERROR_MSG_PRFIX
+
"社保缴纳月份不可为空!"
,
i
,
random
));
...
...
@@ -2405,58 +2223,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return
false
;
}
/**
* 字段对应
**/
private
TPaymentInfo
reflectionPaymentInfo
(
TPaymentInfoVo
from
)
{
TPaymentInfo
to
=
new
TPaymentInfo
();
if
(
Common
.
isNotNull
(
from
))
{
to
.
setId
(
from
.
getId
());
to
.
setEmpName
(
from
.
getEmpName
());
to
.
setEmpNo
(
from
.
getEmpNo
());
to
.
setEmpId
(
from
.
getEmpId
());
to
.
setEmpIdcard
(
from
.
getEmpIdcard
());
to
.
setUnitId
(
from
.
getUnitId
());
to
.
setSettleDomainId
(
from
.
getSettleDomainId
());
to
.
setSocialHousehold
(
from
.
getSocialHousehold
());
to
.
setSocialSecurityNo
(
from
.
getSocialSecurityNo
());
to
.
setSocialPayAddr
(
from
.
getSocialPayAddr
());
to
.
setSocialProvince
(
from
.
getSocialProvince
());
to
.
setSocialCity
(
from
.
getSocialCity
());
to
.
setSocialTown
(
from
.
getSocialTown
());
to
.
setSocialCreateMonth
(
from
.
getSocialCreateMonth
());
to
.
setSocialPayMonth
(
from
.
getSocialPayMonth
());
to
.
setLockStatus
(
from
.
getLockStatus
());
to
.
setProvidentPayMonth
(
from
.
getProvidentPayMonth
());
to
.
setProvidentCreateMonth
(
from
.
getProvidentCreateMonth
());
to
.
setProvidentHousehold
(
from
.
getProvidentHousehold
());
to
.
setProvidentPayAddr
(
from
.
getProvidentPayAddr
());
to
.
setFundProvince
(
from
.
getFundProvince
());
to
.
setFundCity
(
from
.
getFundCity
());
to
.
setFundTown
(
from
.
getFundTown
());
to
.
setSumAll
(
from
.
getSumAll
());
to
.
setSocialId
(
from
.
getSocialId
());
to
.
setFundId
(
from
.
getFundId
());
to
.
setSocialSum
(
from
.
getSocialSum
());
to
.
setUnitSocialSum
(
from
.
getUnitSocialSum
());
to
.
setSocialSecurityPersonalSum
(
from
.
getSocialSecurityPersonalSum
());
to
.
setProvidentSum
(
from
.
getProvidentSum
());
to
.
setSalarySocialFlag
(
from
.
getSalarySocialFlag
());
to
.
setSalaryFundFlag
(
from
.
getSalaryFundFlag
());
to
.
setSocialSettlementFlag
(
from
.
getSocialSettlementFlag
());
to
.
setFundSettlementFlag
(
from
.
getFundSettlementFlag
());
to
.
setSocialSettlementId
(
from
.
getSocialSettlementId
());
to
.
setFundSettlementId
(
from
.
getFundSettlementId
());
to
.
setInauguralTeam
(
from
.
getInauguralTeam
());
to
.
setTelecomNumber
(
from
.
getTelecomNumber
());
}
return
to
;
}
/**
* 转换缴纳地址为省市县ID
**/
private
TPaymentHeFeiVo
initAddressThree
(
String
[]
areaArray
,
HashMap
<
String
,
String
>
areaMap2
,
TPaymentHeFeiVo
s
)
{
private
TPaymentHeFeiVo
initAddressThree
(
String
[]
areaArray
,
HashMap
<
String
,
String
>
areaMap2
,
TPaymentHeFeiVo
s
)
{
if
(
null
==
areaArray
||
null
==
areaMap2
||
null
==
s
)
{
return
s
;
}
...
...
@@ -2495,7 +2266,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
* @Author huyc
* @Date 2022-07-27
**/
private
boolean
checkImportInfo
(
String
random
,
int
i
,
List
<
TPaymentInfoImportLog
>
logList
,
TPaymentInfoVo
payExists
private
boolean
checkImportInfo
(
String
random
,
int
i
,
List
<
TPaymentInfoImportLog
>
logList
,
TPaymentInfoVo
payExists
,
TPaymentHeFeiVo
infoVo
,
String
type
)
{
boolean
flag
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
))
{
...
...
@@ -2605,17 +2377,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
else
{
}
else
{
return
null
;
}
}
else
if
(
areaArray
.
length
==
1
)
{
}
else
if
(
areaArray
.
length
==
1
)
{
if
(
null
!=
s
.
getFundProvince
()
&&
null
==
s
.
getFundCity
())
{
if
(
areaArray
[
0
].
equals
(
areaMap
.
get
(
String
.
valueOf
(
s
.
getFundProvince
()))))
{
return
s
;
}
}
else
{
return
null
;
}
else
{
return
null
;
}
}
return
null
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
3e6e75da
...
...
@@ -1125,12 +1125,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
Common
.
isEmpty
(
tPreDispatchInfo
.
getPensionAddress
())
&&
Common
.
isEmpty
(
tPreDispatchInfo
.
getFundAddress
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
tPreDispatchInfo
.
getType
()))
{
return
"派增的
社保缴纳地与公积金缴纳地不可同时为空
!"
;
return
"派增的
养老数据和公积金数据不能同时为空,请完善
!"
;
}
if
(
Common
.
isEmpty
(
tPreDispatchInfo
.
getPensionAddressReduce
())
&&
Common
.
isEmpty
(
tPreDispatchInfo
.
getFundAddressReduce
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
tPreDispatchInfo
.
getType
()))
{
return
"派减的
社保缴纳地与公积金缴纳地不可同时为空
!"
;
return
"派减的
养老数据和公积金数据不能同时为空,请完善
!"
;
}
return
null
;
}
...
...
@@ -1190,7 +1190,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
return
"公积金基数不可为空!"
;
}
if
(
Common
.
isNullOrZero
(
tPreDispatchInfo
.
getFundCompanyPer
()))
{
return
"公积金
单位
比例不可为空!"
;
return
"公积金
企业
比例不可为空!"
;
}
if
(
Common
.
isNullOrZero
(
tPreDispatchInfo
.
getFundPersonalPer
()))
{
return
"公积个人比例不可为空!"
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
3e6e75da
...
...
@@ -155,4 +155,31 @@ public class ServiceUtil {
}
return
false
;
}
/**
* 查看社保公积金起缴日期是否符合补缴逻辑
* @Author fxj
* @Date 2020-09-07
* @param socialStartDate 起缴日期
* @param canOverpay 是否可补缴 0:是,1:否
* @param overpayNumber 补缴期限 整数
* @param haveThisMonth 是否含当月 0:是,1:否 如果无符合条件默认不含当月
* @return 符合 false 不符合 true
**/
public
static
boolean
checkDispatchDate
(
LocalDateTime
socialStartDate
,
String
canOverpay
,
Integer
overpayNumber
,
String
haveThisMonth
){
if
(
null
==
socialStartDate
){
return
false
;
}
LocalDateTime
temp
=
null
;
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
canOverpay
)){
temp
=
socialStartDate
.
plusMonths
(
CommonConstants
.
ZERO_STRING
.
equals
(
haveThisMonth
)?(
long
)
overpayNumber:
(
long
)(
overpayNumber
+
1
));
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
canOverpay
)){
temp
=
socialStartDate
;
}
return
(
null
!=
temp
&&
(
temp
.
getYear
()
<
now
.
getYear
()
||
isaBoolean
(
temp
,
now
)));
}
private
static
boolean
isaBoolean
(
LocalDateTime
temp
,
LocalDateTime
now
)
{
return
temp
.
getYear
()
==
now
.
getYear
()
&&
temp
.
getMonthValue
()
<
now
.
getMonthValue
();
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
3e6e75da
...
...
@@ -94,7 +94,10 @@
<result
property=
"idCardTown"
column=
"ID_CARD_TOWN"
/>
<result
property=
"idCardAddress"
column=
"ID_CARD_ADDRESS"
/>
</resultMap>
<resultMap
id=
"dispatchPageMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPageVo"
extends=
"tDispatchInfoMap"
>
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"socialHouseholdName"
column=
"SOCIAL_HOUSEHOLD_NAME"
/>
</resultMap>
<!-- 派单导出vo -->
<resultMap
id=
"exportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoExportVo"
>
<id
property=
"id"
column=
"ID"
/>
...
...
@@ -249,6 +252,13 @@
<if
test=
"tDispatchInfo.settleDomain != null and tDispatchInfo.settleDomain.trim() != ''"
>
AND a.SETTLE_DOMAIN = #{tDispatchInfo.settleDomain}
</if>
<if
test=
"tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''"
>
AND a.SETTLE_DOMAIN_NAME like CONCAT(CONCAT(#{tDispatchInfo.settleDomainName}), '%')
</if>
<if
test=
"tDispatchInfo.settleDomainCode != null and tDispatchInfo.settleDomainCode.trim() != ''"
>
AND a.SETTLE_DOMAIN_CODE = #{tDispatchInfo.settleDomainCode}
</if>
<if
test=
"tDispatchInfo.deleteFlag != null and tDispatchInfo.deleteFlag.trim() != ''"
>
AND a.DELETE_FLAG = #{tDispatchInfo.deleteFlag}
</if>
...
...
@@ -372,19 +382,27 @@
<if
test=
"tDispatchInfo.dispatchItem != null and tDispatchInfo.dispatchItem.trim() != ''"
>
AND a.DISPATCH_ITEM = #{tDispatchInfo.dispatchItem}
</if>
<if
test=
"tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''"
>
AND a.SETTLE_DOMAIN_NAME = #{tDispatchInfo.settleDomainName}
</if>
<if
test=
"tDispatchInfo.belongUnitName != null and tDispatchInfo.belongUnitName.trim() != ''"
>
AND a.BELONG_UNIT_NAME = #{tDispatchInfo.belongUnitName}
</if>
<if
test=
"tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"
>
AND s.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
</if>
<if
test=
"tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"
>
AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
</if>
</sql>
<!--tDispatchInfo简单分页查询-->
<select
id=
"getTDispatchInfoPage"
resultMap=
"
tDispatchInfo
Map"
>
<select
id=
"getTDispatchInfoPage"
resultMap=
"
dispatchPage
Map"
>
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
,
s.SOCIAL_HOUSEHOLD_NAME,
f.PROVIDENT_HOUSEHOLD_NAME
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID
<where>
1=1
<include
refid=
"tDispatchInfo_where"
/>
...
...
@@ -553,15 +571,17 @@
</select>
<!--tDispatchInfo 社保办理数据查询-->
<select
id=
"getTDispatchSocialHandlePage"
resultMap=
"
tDispatchInfo
Map"
>
<select
id=
"getTDispatchSocialHandlePage"
resultMap=
"
dispatchPage
Map"
>
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
,
b.SOCIAL_HOUSEHOLD_NAME
<include
refid=
"where_getSocialRecordRoster"
/>
</select>
<!--tDispatchInfo 公积金办理数据查询-->
<select
id=
"getTDispatchFundHandlePage"
resultMap=
"
tDispatchInfo
Map"
>
<select
id=
"getTDispatchFundHandlePage"
resultMap=
"
dispatchPage
Map"
>
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
,
c.PROVIDENT_HOUSEHOLD_NAME
<include
refid=
"where_getFundRecord"
/>
</select>
...
...
@@ -712,7 +732,7 @@
FROM t_dispatch_info a
left join t_provident_fund c on a.FUND_ID = c.id
<where>
1=1 and
b
.DELETE_FLAG = 0
1=1 and
a
.DELETE_FLAG = 0
<if
test=
"idsStr != null"
>
AND a.ID in
<foreach
item=
"items"
index=
"index"
collection=
"idsStr"
open=
"("
separator=
","
close=
")"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
3e6e75da
...
...
@@ -36,8 +36,7 @@
<result
property=
"socialPayMonth"
column=
"SOCIAL_PAY_MONTH"
/>
<result
property=
"socialCreateMonth"
column=
"SOCIAL_CREATE_MONTH"
/>
<result
property=
"lockStatus"
column=
"LOCK_STATUS"
/>
<result
property=
"socialSettlementFlag"
column=
"SOCIAL_SETTLEMENT_FLAG"
/>
<result
property=
"fundSettlementFlag"
column=
"FUND_SETTLEMENT_FLAG"
/>
<result
property=
"pushStatus"
column=
"PUSH_STATUS"
/>
<result
property=
"sumAll"
column=
"SUM_ALL"
/>
<result
property=
"providentPayMonth"
column=
"PROVIDENT_PAY_MONTH"
/>
<result
property=
"providentCreateMonth"
column=
"PROVIDENT_CREATE_MONTH"
/>
...
...
@@ -57,8 +56,6 @@
<result
property=
"providentSum"
column=
"PROVIDENT_SUM"
/>
<result
property=
"socialSettlementId"
column=
"SOCIAL_SETTLEMENT_ID"
/>
<result
property=
"fundSettlementId"
column=
"FUND_SETTLEMENT_ID"
/>
<result
property=
"salarySocialFlag"
column=
"SALARY_SOCIAL_FLAG"
/>
<result
property=
"salaryFundFlag"
column=
"SALARY_FUND_FLAG"
/>
<result
property=
"inauguralTeam"
column=
"INAUGURAL_TEAM"
/>
<result
property=
"telecomNumber"
column=
"TELECOM_NUMBER"
/>
<result
property=
"sortTime"
column=
"SORT_TIME"
/>
...
...
@@ -120,8 +117,7 @@
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
a.LOCK_STATUS,
a.SOCIAL_SETTLEMENT_FLAG,
a.FUND_SETTLEMENT_FLAG,
a.PUSH_STATUS,
a.SUM_ALL,
a.PROVIDENT_PAY_MONTH,
a.PROVIDENT_CREATE_MONTH,
...
...
@@ -141,8 +137,6 @@
a.PROVIDENT_SUM,
a.SOCIAL_SETTLEMENT_ID,
a.FUND_SETTLEMENT_ID,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.INAUGURAL_TEAM,
a.TELECOM_NUMBER,
a.SORT_TIME,
...
...
@@ -227,8 +221,6 @@
a.PROVIDENT_SUM,
a.INAUGURAL_TEAM,
a.TELECOM_NUMBER,
a.SALARY_SOCIAL_FLAG,
a.SALARY_FUND_FLAG,
a.COMPANY_ACCRUAL,
a.PERSONAL_ACCRUAL,
...
...
@@ -310,11 +302,8 @@
<if
test=
"tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''"
>
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
<if
test=
"tPaymentInfo.socialSettlementFlag != null and tPaymentInfo.socialSettlementFlag.trim() != ''"
>
AND a.SOCIAL_SETTLEMENT_FLAG = #{tPaymentInfo.socialSettlementFlag}
</if>
<if
test=
"tPaymentInfo.fundSettlementFlag != null and tPaymentInfo.fundSettlementFlag.trim() != ''"
>
AND a.FUND_SETTLEMENT_FLAG = #{tPaymentInfo.fundSettlementFlag}
<if
test=
"tPaymentInfo.pushStatus != null and tPaymentInfo.pushStatus.trim() != ''"
>
AND a.PUSH_STATUS = #{tPaymentInfo.pushStatus}
</if>
<if
test=
"tPaymentInfo.sumAll != null"
>
AND a.SUM_ALL = #{tPaymentInfo.sumAll}
...
...
@@ -383,12 +372,6 @@
<if
test=
"tPaymentInfo.fundSettlementId != null and tPaymentInfo.fundSettlementId.trim() != ''"
>
AND a.FUND_SETTLEMENT_ID = #{tPaymentInfo.fundSettlementId}
</if>
<if
test=
"tPaymentInfo.salarySocialFlag != null and tPaymentInfo.salarySocialFlag.trim() != ''"
>
AND a.SALARY_SOCIAL_FLAG = #{tPaymentInfo.salarySocialFlag}
</if>
<if
test=
"tPaymentInfo.salaryFundFlag != null and tPaymentInfo.salaryFundFlag.trim() != ''"
>
AND a.SALARY_FUND_FLAG = #{tPaymentInfo.salaryFundFlag}
</if>
<if
test=
"tPaymentInfo.inauguralTeam != null and tPaymentInfo.inauguralTeam.trim() != ''"
>
AND a.INAUGURAL_TEAM = #{tPaymentInfo.inauguralTeam}
</if>
...
...
@@ -578,12 +561,6 @@
<if
test=
"tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''"
>
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
<if
test=
"tPaymentInfo.socialSettlementFlag != null and tPaymentInfo.socialSettlementFlag.trim() != ''"
>
AND a.SOCIAL_SETTLEMENT_FLAG = #{tPaymentInfo.socialSettlementFlag}
</if>
<if
test=
"tPaymentInfo.fundSettlementFlag != null and tPaymentInfo.fundSettlementFlag.trim() != ''"
>
AND a.FUND_SETTLEMENT_FLAG = #{tPaymentInfo.fundSettlementFlag}
</if>
<if
test=
"tPaymentInfo.sumAll != null"
>
AND a.SUM_ALL = #{tPaymentInfo.sumAll}
</if>
...
...
@@ -651,12 +628,6 @@
<if
test=
"tPaymentInfo.fundSettlementId != null and tPaymentInfo.fundSettlementId.trim() != ''"
>
AND a.FUND_SETTLEMENT_ID = #{tPaymentInfo.fundSettlementId}
</if>
<if
test=
"tPaymentInfo.salarySocialFlag != null and tPaymentInfo.salarySocialFlag.trim() != ''"
>
AND a.SALARY_SOCIAL_FLAG = #{tPaymentInfo.salarySocialFlag}
</if>
<if
test=
"tPaymentInfo.salaryFundFlag != null and tPaymentInfo.salaryFundFlag.trim() != ''"
>
AND a.SALARY_FUND_FLAG = #{tPaymentInfo.salaryFundFlag}
</if>
<if
test=
"tPaymentInfo.inauguralTeam != null and tPaymentInfo.inauguralTeam.trim() != ''"
>
AND a.INAUGURAL_TEAM = #{tPaymentInfo.inauguralTeam}
</if>
...
...
@@ -814,8 +785,6 @@
<result
property=
"socialPayMonth"
column=
"SOCIAL_PAY_MONTH"
/>
<result
property=
"socialCreateMonth"
column=
"SOCIAL_CREATE_MONTH"
/>
<result
property=
"lockStatus"
column=
"LOCK_STATUS"
/>
<result
property=
"socialSettlementFlag"
column=
"SOCIAL_SETTLEMENT_FLAG"
/>
<result
property=
"fundSettlementFlag"
column=
"FUND_SETTLEMENT_FLAG"
/>
<result
property=
"sumAll"
column=
"SUM_ALL"
/>
<result
property=
"providentPayMonth"
column=
"PROVIDENT_PAY_MONTH"
/>
<result
property=
"providentCreateMonth"
column=
"PROVIDENT_CREATE_MONTH"
/>
...
...
@@ -884,9 +853,6 @@
<result
property=
"fundTown"
column=
"FUND_TOWN"
/>
<result
property=
"inauguralTeam"
column=
"INAUGURAL_TEAM"
/>
<result
property=
"telecomNumber"
column=
"TELECOM_NUMBER"
/>
<result
property=
"salarySocialFlag"
column=
"SALARY_SOCIAL_FLAG"
/>
<result
property=
"salaryFundFlag"
column=
"SALARY_FUND_FLAG"
/>
</resultMap>
<!--tPaymentInfo简单分页查询-->
<select
id=
"getTPaymentInfoPage"
resultMap=
"tPaymentInfoMap"
>
...
...
@@ -986,15 +952,10 @@
FROM t_payment_info a
where 1=1
<if
test=
"months != null and months.size > 0"
>
AND
(
a.SOCIAL_PAY_MONTH in
AND a.SOCIAL_PAY_MONTH in
<foreach
item=
"item"
index=
"index"
collection=
"months"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
or a.PROVIDENT_PAY_MONTH in
<foreach
item=
"item"
index=
"index"
collection=
"months"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</if>
<if
test=
"idcards != null and idcards.size > 0"
>
AND a.EMP_IDCARD IN
...
...
@@ -1004,31 +965,6 @@
</if>
</select>
<!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询-->
<select
id=
"selectPaymentAllInfoByMonthAndIdCard"
resultMap=
"tPaymentAllInfoMap"
>
SELECT
<include
refid=
"base_column_list_all"
/>
,
FROM t_payment_info a
where 1=1
<if
test=
"months != null and months.size > 0"
>
AND (a.SOCIAL_PAY_MONTH in
<foreach
item=
"item"
index=
"index"
collection=
"months"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
or a.PROVIDENT_PAY_MONTH in
<foreach
item=
"item"
index=
"index"
collection=
"months"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
)
</if>
<if
test=
"idcards != null and idcards.size > 0"
>
AND A.EMP_IDCARD IN
<foreach
item=
"item"
index=
"index"
collection=
"idcards"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
<!--tPaymentInfo 查询缴费库要删除的数据-->
<select
id=
"selectListForDelete"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo"
>
select
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPreDispatchInfoMapper.xml
View file @
3e6e75da
...
...
@@ -771,202 +771,6 @@
where id = #{id}
</update>
<update
id=
"updateBatchPreDispatchById"
parameterType=
"com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo"
>
update t_pre_dispatch_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"date != null "
>
date = #{date},
</if>
<if
test=
"company != null and company != ''"
>
company = #{company},
</if>
<if
test=
"payAddress != null and payAddress != ''"
>
pay_address = #{payAddress},
</if>
<if
test=
"customerName != null and customerName != ''"
>
customer_name = #{customerName},
</if>
<if
test=
"empName != null and empName != ''"
>
emp_name = #{empName},
</if>
<if
test=
"empIdcard != null and empIdcard != ''"
>
emp_idcard = #{empIdcard},
</if>
<if
test=
"telOne != null and telOne != ''"
>
tel_one = #{telOne},
</if>
<if
test=
"telTwo != null and telTwo != ''"
>
tel_two = #{telTwo},
</if>
<if
test=
"entryDate != null "
>
entry_date = #{entryDate},
</if>
<if
test=
"formalSalary != null and formalSalary != ''"
>
formal_salary = #{formalSalary},
</if>
<if
test=
"dispatchStart != null and dispatchStart != ''"
>
dispatch_start = #{dispatchStart},
</if>
<if
test=
"dispatchEnd != null and dispatchEnd != ''"
>
dispatch_end = #{dispatchEnd},
</if>
<if
test=
"contractType != null and contractType != ''"
>
contract_type = #{contractType},
</if>
<if
test=
"contractStart != null and contractStart != ''"
>
contract_start = #{contractStart},
</if>
<if
test=
"contractEnd != null and contractEnd != ''"
>
contract_end = #{contractEnd},
</if>
<if
test=
"contractNameAdd != null and contractNameAdd != ''"
>
contract_name_add = #{contractNameAdd},
</if>
<if
test=
"contractTypeAdd != null and contractTypeAdd != ''"
>
contract_type_add = #{contractTypeAdd},
</if>
<if
test=
"contractStartAdd != null and contractStartAdd != ''"
>
contract_start_add = #{contractStartAdd},
</if>
<if
test=
"contractEndAdd != null and contractEndAdd != ''"
>
contract_end_add = #{contractEndAdd},
</if>
<if
test=
"contractTermAdd != null and contractTermAdd != ''"
>
contract_term_add = #{contractTermAdd},
</if>
<if
test=
"contractNameAdd == null or contractNameAdd == ''"
>
contract_name_add = null,
</if>
<if
test=
"contractTypeAdd == null or contractTypeAdd == ''"
>
contract_type_add = null,
</if>
<if
test=
"contractStartAdd == null or contractStartAdd == ''"
>
contract_start_add = null,
</if>
<if
test=
"contractEndAdd == null or contractEndAdd == ''"
>
contract_end_add = null,
</if>
<if
test=
"contractTermAdd == null or contractTermAdd == ''"
>
contract_term_add = null,
</if>
<if
test=
"trialStart != null and trialStart != ''"
>
trial_start = #{trialStart},
</if>
<if
test=
"trialEnd != null and trialEnd != ''"
>
trial_end = #{trialEnd},
</if>
<if
test=
"trialSalary != null and trialSalary !='' "
>
trial_salary = #{trialSalary},
</if>
<if
test=
"workingSystem != null and workingSystem != ''"
>
working_system = #{workingSystem},
</if>
<if
test=
"contractVersion != null and contractVersion != ''"
>
contract_version = #{contractVersion},
</if>
<if
test=
"telNotice != null and telNotice != ''"
>
tel_notice = #{telNotice},
</if>
<if
test=
"workingAddress != null and workingAddress != ''"
>
working_address = #{workingAddress},
</if>
<if
test=
"remarkOne != null and remarkOne != ''"
>
remark_one = #{remarkOne},
</if>
<if
test=
"remarkTwo != null and remarkTwo != ''"
>
remark_two = #{remarkTwo},
</if>
<if
test=
'type == "0"'
>
<if
test=
"pensionAddress != null and pensionAddress != ''"
>
pension_address = #{pensionAddress},
<if
test=
"socialProvince != null and socialProvince != ''"
>
social_province = #{socialProvince},
</if>
<if
test=
"socialCity != null and socialCity != ''"
>
social_city = #{socialCity},
</if>
<if
test=
"socialTown != null and socialTown != ''"
>
social_town = #{socialTown},
</if>
</if>
<if
test=
'pensionAddress == null || pensionAddress == ""'
>
pension_address = null,
social_province = null,
social_city = null,
social_town = null,
</if>
<if
test=
"fundAddress != null and fundAddress != ''"
>
fund_address = #{fundAddress},
<if
test=
"fundProvince != null and fundProvince != ''"
>
fund_province = #{fundProvince},
<if
test=
"fundCity == null"
>
fund_city = null,
</if>
<if
test=
"fundTown == null"
>
fund_town = null,
</if>
</if>
<if
test=
"fundCity != null and fundCity != ''"
>
fund_city = #{fundCity},
</if>
<if
test=
"fundTown != null and fundTown != ''"
>
fund_town = #{fundTown},
</if>
</if>
<if
test=
'fundAddress == null || fundAddress == ""'
>
fund_address = null,
fund_province = null,
fund_city = null,
fund_town = null,
</if>
</if>
<if
test=
'type == "1"'
>
<if
test=
"pensionAddressReduce != null and pensionAddressReduce != ''"
>
pension_address_reduce = #{pensionAddressReduce},
pension_address = #{pensionAddressReduce},
<if
test=
"socialProvince != null and socialProvince != ''"
>
social_province = #{socialProvince},
</if>
<if
test=
"socialCity != null and socialCity != ''"
>
social_city = #{socialCity},
</if>
<if
test=
"socialTown != null and socialTown != ''"
>
social_town = #{socialTown},
</if>
</if>
<if
test=
'pensionAddressReduce == null || pensionAddressReduce ==""'
>
pension_address_reduce = null,
pension_end_reduce = null,
pension_address = null,
social_province = null,
social_city = null,
social_town = null,
</if>
<if
test=
"fundAddressReduce != null and fundAddressReduce != ''"
>
fund_address_reduce = #{fundAddressReduce},
fund_address = #{fundAddressReduce},
<if
test=
"fundProvince != null and fundProvince != ''"
>
fund_province = #{fundProvince},
<if
test=
"fundCity == null"
>
fund_city = null,
</if>
<if
test=
"fundTown == null"
>
fund_town = null,
</if>
</if>
<if
test=
"fundCity != null and fundCity != ''"
>
fund_city = #{fundCity},
</if>
<if
test=
"fundTown != null and fundTown != ''"
>
fund_town = #{fundTown},
</if>
</if>
<if
test=
'fundAddressReduce == null || fundAddressReduce == ""'
>
fund_address_reduce = null,
fund_address = null,
fund_end_reduce = null,
fund_province = null,
fund_city = null,
fund_town = null,
</if>
</if>
<if
test=
"pensionBase != null "
>
pension_base = #{pensionBase},
</if>
<if
test=
"pensionStart != null and pensionStart != ''"
>
pension_start = #{pensionStart},
</if>
<if
test=
"medicalAddress != null and medicalAddress != ''"
>
medical_address = #{medicalAddress},
</if>
<if
test=
"medicalBase != null "
>
medical_base = #{medicalBase},
</if>
<if
test=
"medicalStart != null and medicalStart != ''"
>
medical_start = #{medicalStart},
</if>
<if
test=
"injuryAddress != null and injuryAddress != ''"
>
injury_address = #{injuryAddress},
</if>
<if
test=
"injuryBase != null "
>
injury_base = #{injuryBase},
</if>
<if
test=
"injuryStart != null and injuryStart != ''"
>
injury_start = #{injuryStart},
</if>
<if
test=
"birthAddress != null and birthAddress != ''"
>
birth_address = #{birthAddress},
</if>
<if
test=
"birthBase != null "
>
birth_base = #{birthBase},
</if>
<if
test=
"birthStart != null and birthStart != ''"
>
birth_start = #{birthStart},
</if>
<if
test=
"unemploymentAddress != null and unemploymentAddress != ''"
>
unemployment_address = #{unemploymentAddress},
</if>
<if
test=
"unemploymentBase != null "
>
unemployment_base = #{unemploymentBase},
</if>
<if
test=
"unemploymentStart != null and unemploymentStart != ''"
>
unemployment_start = #{unemploymentStart},
</if>
<if
test=
"pensionBase == null "
>
pension_base = null,
</if>
<if
test=
"pensionStart == null"
>
pension_start = null,
</if>
<if
test=
"medicalAddress == null or medicalAddress == ''"
>
medical_address = null,
</if>
<if
test=
"medicalBase == null "
>
medical_base = null,
</if>
<if
test=
"medicalStart == null"
>
medical_start = null,
</if>
<if
test=
"injuryAddress == null or injuryAddress == ''"
>
injury_address = null,
</if>
<if
test=
"injuryBase == null "
>
injury_base = null,
</if>
<if
test=
"injuryStart == null"
>
injury_start = null,
</if>
<if
test=
"birthAddress == null or birthAddress == ''"
>
birth_address = null,
</if>
<if
test=
"birthBase == null "
>
birth_base = null,
</if>
<if
test=
"birthStart == null"
>
birth_start = null,
</if>
<if
test=
"unemploymentAddress == null or unemploymentAddress == ''"
>
unemployment_address = null,
</if>
<if
test=
"unemploymentBase == null "
>
unemployment_base = null,
</if>
<if
test=
"unemploymentStart == null"
>
unemployment_start = null,
</if>
<if
test=
"fundBase != null "
>
fund_base = #{fundBase},
</if>
<if
test=
"fundStart != null and fundStart != ''"
>
fund_start = #{fundStart},
</if>
<if
test=
"fundPersonalPer != null "
>
fund_personal_per = #{fundPersonalPer},
</if>
<if
test=
"fundCompanyPer != null "
>
fund_company_per = #{fundCompanyPer},
</if>
<if
test=
"fundBase == null "
>
fund_base = null,
</if>
<if
test=
"fundStart == null"
>
fund_start = null,
</if>
<if
test=
"fundPersonalPer == null "
>
fund_personal_per = null,
</if>
<if
test=
"fundCompanyPer == null "
>
fund_company_per = null,
</if>
<if
test=
"dispatchCompany != null and dispatchCompany != ''"
>
dispatch_company = #{dispatchCompany},
</if>
<if
test=
"customerService != null and customerService != ''"
>
customer_service = #{customerService},
</if>
<if
test=
"contractMinorName != null and contractMinorName != ''"
>
contract_minor_name = #{contractMinorName},
</if>
<if
test=
"uniqueNumber != null and uniqueNumber != ''"
>
unique_number = #{uniqueNumber},
</if>
<if
test=
"customerNumber != null and customerNumber != ''"
>
customer_number = #{customerNumber},
</if>
<if
test=
"serviceType != null and serviceType != ''"
>
service_type = #{serviceType},
</if>
<if
test=
"pensionEndReduce != null and pensionEndReduce != ''"
>
pension_end_reduce = #{pensionEndReduce},
</if>
<if
test=
"medicalAddressReduce != null and medicalAddressReduce != ''"
>
medical_address_reduce = #{medicalAddressReduce},
</if>
<if
test=
"medicalEndReduce != null and medicalEndReduce != ''"
>
medical_end_reduce = #{medicalEndReduce},
</if>
<if
test=
"injuryAddressReduce != null and injuryAddressReduce != ''"
>
injury_address_reduce = #{injuryAddressReduce},
</if>
<if
test=
"injuryEndReduce != null and injuryEndReduce != ''"
>
injury_end_reduce = #{injuryEndReduce},
</if>
<if
test=
"birthAddressReduce != null and birthAddressReduce != ''"
>
birth_address_reduce = #{birthAddressReduce},
</if>
<if
test=
"birthEndReduce != null and birthEndReduce != ''"
>
birth_end_reduce = #{birthEndReduce},
</if>
<if
test=
"unemploymentAddressReduce != null and unemploymentAddressReduce != ''"
>
unemployment_address_reduce = #{unemploymentAddressReduce},
</if>
<if
test=
"unemploymentEndReduce != null and unemploymentEndReduce != ''"
>
unemployment_end_reduce = #{unemploymentEndReduce},
</if>
<if
test=
"fundEndReduce != null and fundEndReduce != ''"
>
fund_end_reduce = #{fundEndReduce},
</if>
<if
test=
"leaveDate != null "
>
leave_date = #{leaveDate},
</if>
<if
test=
"leaveReason != null and leaveReason != ''"
>
leave_reason = #{leaveReason},
</if>
<if
test=
"leaveReasonAdd != null and leaveReasonAdd != ''"
>
leave_reason_add = #{leaveReasonAdd},
</if>
<if
test=
"empTypeAdd != null and empTypeAdd != ''"
>
emp_type_add = #{empTypeAdd},
</if>
<if
test=
"unitIdAdd != null and unitIdAdd != ''"
>
unit_id_add = #{unitIdAdd},
</if>
<if
test=
"departIdAdd != null and departIdAdd != ''"
>
depart_id_add = #{departIdAdd},
</if>
<if
test=
"socialHouseAdd != null and socialHouseAdd != ''"
>
social_house_add = #{socialHouseAdd},
</if>
<if
test=
"fundHouseAdd != null and fundHouseAdd != ''"
>
fund_house_add = #{fundHouseAdd},
</if>
<if
test=
"preStatus != null and preStatus != ''"
>
pre_status = #{preStatus},
</if>
<if
test=
"status != null and status != ''"
>
status = #{status},
</if>
<if
test=
"exceptionContent != null"
>
exception_content = #{exceptionContent},
</if>
<if
test=
"dataSubStatus != null and dataSubStatus != ''"
>
data_sub_status = #{dataSubStatus},
</if>
<if
test=
"remark != null and remark != ''"
>
remark = #{remark},
</if>
<if
test=
"dispatchFlag != null and dispatchFlag != ''"
>
dispatch_flag = #{dispatchFlag},
</if>
<if
test=
"cancelRemark != null and cancelRemark != ''"
>
cancel_remark = #{cancelRemark},
</if>
</trim>
where id = #{id}
</update>
<!-- 批量更新资料提交状态-->
<update
id=
"modifyDataSubmitStatus"
>
update t_pre_dispatch_info
...
...
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