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
798adb29
Commit
798adb29
authored
Jul 27, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-licancan
parents
6ad058e5
460b6c68
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
834 additions
and
103 deletions
+834
-103
TSettleDomain.java
...ifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
+6
-0
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+3
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+2
-3
TSettleDomainService.java
...d/plus/v1/yifu/archives/service/TSettleDomainService.java
+1
-1
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+1
-1
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+3
-3
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+3
-0
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+9
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+4
-3
DispatchConstants.java
...loud/plus/v1/yifu/social/constants/DispatchConstants.java
+8
-3
SysBaseSetInfo.java
...yifu/cloud/plus/v1/yifu/social/entity/SysBaseSetInfo.java
+5
-0
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+4
-4
TForecastLibrary.java
...fu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
+6
-0
TProvidentFund.java
...yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
+3
-3
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+4
-5
TSocialInfo.java
...om/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
+2
-2
TPreDispatchExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
+3
-0
SocialConstants.java
.../cloud/plus/v1/yifu/social/constants/SocialConstants.java
+2
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+24
-24
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+4
-0
TForecastLibraryService.java
.../plus/v1/yifu/social/service/TForecastLibraryService.java
+25
-0
SysBaseSetInfoServiceImpl.java
...1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
+3
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+586
-42
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+96
-6
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+1
-1
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+21
-0
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+5
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TSettleDomain.java
View file @
798adb29
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
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.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -116,6 +117,7 @@ public class TSettleDomain extends BaseEntity {
* 最后审核时间
*/
@Schema
(
description
=
"最后审核时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
lastAuditDate
;
/**
...
...
@@ -182,6 +184,7 @@ public class TSettleDomain extends BaseEntity {
* 首次审核通过时间
*/
@Schema
(
description
=
"首次审核通过时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
firstPassTime
;
/**
...
...
@@ -218,6 +221,7 @@ public class TSettleDomain extends BaseEntity {
* 停止时间
*/
@Schema
(
description
=
"停止时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
stopDate
;
/**
...
...
@@ -284,12 +288,14 @@ public class TSettleDomain extends BaseEntity {
* 审核人审核的时间
*/
@Schema
(
description
=
"审核人审核的时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
auditTime
;
/**
* 经理审核时间
*/
@Schema
(
description
=
"经理审核时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
managerAuditTime
;
/**
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
View file @
798adb29
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
TSettleDomainListVo
{
...
...
@@ -12,4 +13,6 @@ public class TSettleDomainListVo {
*/
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
private
Map
<
String
,
TSettleDomainSelectVo
>
mapSlectVo
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
798adb29
...
...
@@ -35,7 +35,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -149,8 +148,8 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping
(
"/getSettleDomainSelectVoById"
)
public
TSettleDomainSelectVo
getInnerSettleDomainSelectVoByUserId
(
@Request
Param
String
id
)
{
return
tSettleDomainService
.
selectSettleDomainSelectVosById
(
id
);
public
TSettleDomainSelectVo
getInnerSettleDomainSelectVoByUserId
(
@Request
Body
TSettleDomainSelectVo
settleDomainSelectVo
)
{
return
tSettleDomainService
.
selectSettleDomainSelectVosById
(
settleDomainSelectVo
);
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TSettleDomainService.java
View file @
798adb29
...
...
@@ -55,7 +55,7 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
* @Author fxj
* @Date 2019-12-24
**/
TSettleDomainSelectVo
selectSettleDomainSelectVosById
(
String
id
);
TSettleDomainSelectVo
selectSettleDomainSelectVosById
(
TSettleDomainSelectVo
settleDomainSelectVo
);
/**
* 获取所有客户单位的结算主体信息
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
798adb29
...
...
@@ -1196,7 +1196,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
list
=
gettEmpProInfoExportVos
(
idstr
,
projectDTO
);
ServletOutputStream
out
=
null
;
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
}
try
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
798adb29
...
...
@@ -87,15 +87,15 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
/**
* @param
id
* @param
settleDomainSelectVo
* @Author: wangan
* @Date: 2019/10/18
* @Description: dataCheckDepart
* @return: com.yifu.cloud.v1.hrms.api.vo.TSettleDomainSelectVo
**/
@Override
public
TSettleDomainSelectVo
selectSettleDomainSelectVosById
(
String
id
)
{
return
baseMapper
.
selectSettleDomainSelectVosById
(
id
);
public
TSettleDomainSelectVo
selectSettleDomainSelectVosById
(
TSettleDomainSelectVo
settleDomainSelectVo
)
{
return
baseMapper
.
selectSettleDomainSelectVosById
(
settleDomainSelectVo
.
getId
()
);
}
@Override
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
798adb29
...
...
@@ -422,5 +422,8 @@ public interface CommonConstants {
public
static
final
String
SUCCESS_MSG_PREFIX
=
"success="
;
// 社保细分类型 hgw 2021-6-9 17:54:08
public
static
final
String
[]
SOCIAL_HANDLE_TYPE
=
{
"0"
,
"养老"
,
"医疗"
,
"失业"
,
"工伤"
,
"生育"
,
"大病"
};
public
static
final
int
SIXTY_INT
=
60
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
798adb29
...
...
@@ -1247,6 +1247,15 @@ public class DateUtil {
return
sdf
.
format
(
cal
.
getTime
());
}
public
static
Date
addMonthByDate
(
Date
date
,
int
mnt
)
{
Calendar
cal
=
Calendar
.
getInstance
();
if
(
date
!=
null
)
{
cal
.
setTime
(
date
);
}
cal
.
add
(
Calendar
.
MONTH
,
mnt
);
return
cal
.
getTime
();
}
/**
* @param mnt 增减日的 值
* @Description: 增减日
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
798adb29
...
...
@@ -11,7 +11,6 @@ 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.dapr.config.DaprArchivesProperties
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
@@ -82,7 +81,9 @@ public class ArchivesDaprUtil {
* @return
**/
public
R
<
TSettleDomainSelectVo
>
getSettleDomainSelectVoById
(
String
departId
){
R
<
TSettleDomainSelectVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleDomainSelectVoById"
,
departId
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
TSettleDomainSelectVo
settleDomainSelectVo
=
new
TSettleDomainSelectVo
();
settleDomainSelectVo
.
setId
(
departId
);
R
<
TSettleDomainSelectVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleDomainSelectVoById"
,
settleDomainSelectVo
,
TSettleDomainSelectVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取派单校验需要的档案信息失败!"
);
}
...
...
@@ -97,7 +98,7 @@ public class ArchivesDaprUtil {
* @return
**/
public
R
<
TSettleDomainListVo
>
selectAllSettleDomainSelectVos
(){
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/selectAllSettleDomainSelectVos"
,
""
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/selectAllSettleDomainSelectVos"
,
""
,
TSettleDomainListVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取所有客户单位的结算主体信息失败!"
);
}
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/DispatchConstants.java
View file @
798adb29
...
...
@@ -23,6 +23,13 @@ public class DispatchConstants {
public
static
final
String
EMP_PHONE_INVALID
=
"档案手机号无效,请更新档案或模板的手机号码!"
;
public
static
final
String
DISPATCH_PHONE_NOT_EMPTY
=
"派单手机号不可为空,请更新档案或模板的手机号码!"
;
public
static
final
String
DISPATCH_ADD
=
"派增"
;
public
static
final
String
DISPATCH_REDUCE
=
"派减"
;
public
static
final
String
DISPATCH_SOCIAL_ADD
=
"社保派增"
;
public
static
final
String
DISPATCH_SOCIAL_HANDLE_SUCCESS
=
"办理成功:"
;
public
static
final
String
DISPATCH_SOCIAL_HANDLE_FAIL
=
"办理失败:"
;
public
static
final
String
DISPATCH_FUND_ADD_SUCCESS
=
"公积金派增办理成功:"
;
public
static
final
String
DISPATCH_FUND_ADD_FAIL
=
"公积金派增办理失败:"
;
/**
...
...
@@ -56,7 +63,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
SOCIAL_INFO
=
"tSocialInfo"
;
/**
...
...
@@ -65,7 +71,6 @@ public class DispatchConstants {
* @Date 2020-10-13
* @param null
* @return
* @see com.yifu.cloud.v1.common.core.constant
**/
public
static
final
String
PROVIDENT_INFO
=
"tProvidentFund"
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/SysBaseSetInfo.java
View file @
798adb29
...
...
@@ -457,6 +457,11 @@ public class SysBaseSetInfo extends BaseEntity {
@ExcelProperty
(
"执行月份"
)
private
String
doMonth
;
@ExcelAttribute
(
name
=
"是否新数据:0否1是。为1,将同步社保公积金查询、预估库。其余值,不同步"
)
@Schema
(
description
=
"是否新数据:0否1是。为1,将同步社保公积金查询、预估库。其余值,不同步"
)
@ExcelProperty
(
"是否新数据:0否1是。为1,将同步社保公积金查询、预估库。其余值,不同步"
)
private
String
isNew
;
@Schema
(
description
=
"适用月"
)
@TableField
(
exist
=
false
)
private
String
applyDate
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
798adb29
...
...
@@ -357,19 +357,19 @@ public class TDispatchInfo extends BaseEntity {
/**
* 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败)
3已派减(已废弃)
* 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败)
3 部分办理成功 4 办理中
*/
@Length
(
max
=
1
,
message
=
"社保办理状态 不能超过1个字符"
)
@ExcelAttribute
(
name
=
"社保办理状态"
,
maxLength
=
1
)
@Schema
(
description
=
"社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 "
)
@Schema
(
description
=
"社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功
4 办理中
"
)
@ExcelProperty
(
"社保办理状态"
)
private
String
socialHandleStatus
;
/**
* 公积金办理状态:0 未办理 1办理成功 2 办理失败
* 公积金办理状态:0 未办理 1办理成功 2 办理失败
3 已派减
*/
@Length
(
max
=
1
,
message
=
"公积金办理状态 不能超过1个字符"
)
@ExcelAttribute
(
name
=
"公积金办理状态"
,
maxLength
=
1
)
@Schema
(
description
=
"公积金办理状态:0 未办理 1办理成功 2 办理失败"
)
@Schema
(
description
=
"公积金办理状态:0 未办理 1办理成功 2 办理失败
3 已派减
"
)
@ExcelProperty
(
"公积金办理状态"
)
private
String
fundHandleStatus
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
View file @
798adb29
...
...
@@ -493,6 +493,12 @@ public class TForecastLibrary extends BaseEntity {
@ExcelAttribute
(
name
=
"类型:0社保;1公积金"
)
@ExcelProperty
(
"类型:0社保;1公积金"
)
private
Integer
dataType
;
/**
* 数据类型:预估/差额(汉字)
*/
@ExcelAttribute
(
name
=
"数据类型:预估/差额"
)
@ExcelProperty
(
"数据类型:预估/差额"
)
private
String
diffType
;
@TableField
(
exist
=
false
)
private
List
<
String
>
idList
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TProvidentFund.java
View file @
798adb29
...
...
@@ -130,10 +130,10 @@ public class TProvidentFund extends BaseEntity {
* 办理状态(0待办理/1已办理2办理失败3已派减)
*/
@NotBlank
(
message
=
"办理状态(0待办理/1已办理)不能为空"
)
@Length
(
max
=
32
,
message
=
"办理状态
(0待办理/1已办理)
不能超过32个字符"
)
@ExcelAttribute
(
name
=
"办理状态
(0待办理/1已办理)"
,
isNotEmpty
=
true
,
errorInfo
=
"办理状态(0待办理/1已办理)
不能为空"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"办理状态不能超过32个字符"
)
@ExcelAttribute
(
name
=
"办理状态
"
,
isNotEmpty
=
true
,
errorInfo
=
"办理状态
不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"办理状态(0待办理/1已办理2办理失败3已派减)"
)
@ExcelProperty
(
"办理状态
(0待办理/1已办理)
"
)
@ExcelProperty
(
"办理状态"
)
private
String
handleStatus
;
/**
* 废弃状态(0正常/1已废弃)
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
798adb29
...
...
@@ -17,9 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
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
;
...
...
@@ -249,11 +247,11 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty
(
"公积金缴纳地-县"
)
private
String
fundTown
;
/**
* 社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 5 审核不通过
* 社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 5 审核不通过
6 办理中
*/
@Length
(
max
=
1
,
message
=
"社保派增状态 不能超过1个字符"
)
@ExcelAttribute
(
name
=
"社保派增状态"
,
maxLength
=
1
)
@Schema
(
description
=
"社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 、5审核不通过"
)
@Schema
(
description
=
"社保派增状态:0待审核、1待办理、2办理成功、3部分办理失败、4办理失败 、5审核不通过
6 办理中
"
)
@ExcelProperty
(
"社保派增状态"
)
private
String
socialAddStatus
;
/**
...
...
@@ -465,6 +463,7 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelAttribute
(
name
=
"社保停缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"社保停缴日期"
)
@ExcelProperty
(
"社保停缴日期"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Date
socialReduceDate
;
/**
* 是否可补缴 0:是,1:否
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
View file @
798adb29
...
...
@@ -234,12 +234,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty
(
"审核状态"
)
private
String
auditStatus
;
/**
* 办理状态
* 办理状态
:0待办理/1已办理2办理失败3已派减 4 办理中 5 部分办理失败
*/
@NotBlank
(
message
=
"办理状态不能为空"
)
@Length
(
max
=
32
,
message
=
"办理状态 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"办理状态"
,
isNotEmpty
=
true
,
errorInfo
=
"办理状态不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"办理状态:0待办理/1已办理2办理失败3已派减"
)
@Schema
(
description
=
"办理状态:0待办理/1已办理2办理失败3已派减
4 办理中 5 部分办理失败
"
)
@ExcelProperty
(
"办理状态"
)
private
String
handleStatus
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
View file @
798adb29
...
...
@@ -17,6 +17,9 @@ import java.time.LocalDateTime;
@Data
public
class
TPreDispatchExportVo
implements
Serializable
{
@ExcelAttribute
(
name
=
"主键"
,
needExport
=
true
)
private
String
id
;
/**
* 0 派增 1 派减
*/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/SocialConstants.java
View file @
798adb29
...
...
@@ -9,4 +9,6 @@ public class SocialConstants {
// 社保补缴配置有误!
public
static
final
String
SOCIAL_SET_ERROR
=
"社保补缴配置有误!"
;
public
static
final
String
EMP_NAME_ERROR
=
"员工姓名错误!"
;
public
static
final
String
DIFF_TYPE_ONE
=
"预估"
;
public
static
final
String
DIFF_TYPE_TWO
=
"差额"
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
798adb29
...
...
@@ -244,29 +244,29 @@ public class TDispatchInfoController {
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
@RequestParam
(
name
=
"auditStatus"
,
required
=
true
)
String
auditStatus
,
@RequestParam
(
name
=
"auditRemark"
,
required
=
false
)
String
auditRemark
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
try
{
if
(!
Common
.
isNotNull
(
ids
))
{
return
R
.
failed
(
DispatchConstants
.
DISPATCH_ID_NOT_EMPTY
);
}
Integer
flag
=
1
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
auditStatus
))
{
//审核通过
flag
=
CommonConstants
.
ZERO_INT
;
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
auditStatus
))
{
//审核不通过
flag
=
CommonConstants
.
ONE_INT
;
}
else
{
return
R
.
failed
(
"派单审核状态参数异常:0待审核 1审核通过 2审核不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
tDispatchInfoService
.
addBatchApplyAudit
(
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
),
user
,
flag
,
auditStatus
,
null
==
auditRemark
?
""
:
auditRemark
);
return
R
.
ok
(
errorInfo
,
"派单审核结果:"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"派单审核异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"数据异常,派单审核失败!"
);
return
tDispatchInfoService
.
addApplyAudit
(
ids
,
auditStatus
,
auditRemark
);
}
/**
* 派单申请办理
* hgw社保办理
* @param ids
* @param handleStatus 1 办理成功 2 办理失败
* @param handleRemark
* @param typeSub 0 社保 1 公积金
* @param socialType (1养老 2医疗 3失业 4工伤 5生育 6大病)
* @return
* @Author fxj
* @Date 2019-09-27
**/
@Operation
(
description
=
"派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle')"
)
@PostMapping
(
"/addApplyHandle"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')"
)
public
R
<
List
<
ErrorMessage
>>
addApplyHandle
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
@RequestParam
(
name
=
"typeSub"
,
required
=
true
)
String
typeSub
,
@RequestParam
(
name
=
"auditStatus"
,
required
=
true
)
String
handleStatus
,
@RequestParam
(
name
=
"auditRemark"
,
required
=
false
)
String
handleRemark
,
@RequestParam
(
name
=
"socialType"
,
required
=
false
)
String
socialType
)
{
return
tDispatchInfoService
.
addApplyHandle
(
ids
,
typeSub
,
handleStatus
,
handleRemark
,
socialType
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
798adb29
...
...
@@ -56,4 +56,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
initStrToList
,
YifuUser
user
,
Integer
flag
,
String
auditStatus
,
String
auditRemark
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
String
ids
,
String
auditStatus
,
String
auditRemark
);
R
<
List
<
ErrorMessage
>>
addApplyHandle
(
String
ids
,
String
typeSub
,
String
handleStatus
,
String
handleRemark
,
String
socialType
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TForecastLibraryService.java
View file @
798adb29
...
...
@@ -68,4 +68,29 @@ public interface TForecastLibraryService extends IService<TForecastLibrary> {
**/
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
);
/**
* @param socialFundInfo
* @Description: 派单变更预估库
* @Author: hgw
* @Date: 2022/7/26 19:02
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
);
/**
* @Description: 基数变更,同步社保公积金查询、预估库 TODO-加定时器
* @Author: hgw
* @Date: 2022/7/26 19:09
* @return: void
**/
void
updateForecastLibaryBySysBase
();
/**
* @Description: 每月定时预估库 TODO-加定时器
* @Author: hgw
* @Date: 2022/7/26 19:09
* @return: void
**/
void
everyMonthCreateForecastLibary
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysBaseSetInfoServiceImpl.java
View file @
798adb29
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
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.DateUtil
;
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
;
...
...
@@ -150,9 +151,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return
R
.
failed
(
"对应户、地市、有效期的基数配置已存在!"
);
}
// 将上一个无截止月的增加截止月
// 将上一个无截止月的增加截止月
(本次起始月的上一个月)
if
(
lastBase
!=
null
)
{
lastBase
.
setApplyEndDate
(
sysBaseSetInfo
.
getApplyStartDate
(
));
lastBase
.
setApplyEndDate
(
DateUtil
.
addMonthByDate
(
sysBaseSetInfo
.
getApplyStartDate
(),
-
1
));
this
.
updateById
(
lastBase
);
}
this
.
saveOrUpdateBaseAndFundPro
(
sysBaseSetInfo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
798adb29
...
...
@@ -45,6 +45,7 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.DispatchConstants;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo
;
...
...
@@ -56,15 +57,15 @@ import org.springframework.stereotype.Service;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.sql.CommonDataSource
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
java
.
time
.
format
.
DateTimeFormatter
.
ofPattern
;
/**
* 派单信息记录表
*
...
...
@@ -937,11 +938,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setPaymentType
(
excel
.
getPaymentType
());
social
.
setRecordBase
(
excel
.
getRecordBase
());
social
.
setPensionStart
(
excel
.
getPensionStart
());
social
.
setMedicalStart
(
ifNull
(
excel
.
getMedicalStart
(),
excel
.
getPensionStart
()));
social
.
setUnemployStart
(
ifNull
(
excel
.
getUnemployStart
(),
excel
.
getPensionStart
()));
social
.
setBigailmentStart
(
ifNull
(
excel
.
getBigailmentStart
(),
excel
.
getPensionStart
()));
social
.
setWorkInjuryStart
(
ifNull
(
excel
.
getWorkInjuryStart
(),
excel
.
getPensionStart
()));
social
.
setBirthStart
(
ifNull
(
excel
.
getBirthStart
(),
excel
.
getPensionStart
()));
social
.
setMedicalStart
(
ServiceUtil
.
ifNull
(
excel
.
getMedicalStart
(),
excel
.
getPensionStart
()));
social
.
setUnemployStart
(
ServiceUtil
.
ifNull
(
excel
.
getUnemployStart
(),
excel
.
getPensionStart
()));
social
.
setBigailmentStart
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentStart
(),
excel
.
getPensionStart
()));
social
.
setWorkInjuryStart
(
ServiceUtil
.
ifNull
(
excel
.
getWorkInjuryStart
(),
excel
.
getPensionStart
()));
social
.
setBirthStart
(
ServiceUtil
.
ifNull
(
excel
.
getBirthStart
(),
excel
.
getPensionStart
()));
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())){
if
(
Common
.
isNotNull
(
socialSet
.
getProvince
())){
social
.
setSocialProvince
(
Integer
.
toString
(
socialSet
.
getProvince
()));
...
...
@@ -954,16 +955,16 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 自定义各个基数起缴时间初试化
social
.
setPersonalPensionCardinal
(
excel
.
getPensionCardinal
());
social
.
setPersonalMedicalCardinal
(
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalUnemploymentCardinal
(
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalBigailmentCardinal
(
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalMedicalCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalUnemploymentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitPensionCardinal
(
excel
.
getPensionCardinal
());
social
.
setUnitMedicalCardinal
(
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitUnemploymentCardinal
(
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitWorkInjuryCardinal
(
ifNull
(
excel
.
getWorkInjuryCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBigailmentCardinal
(
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBirthCardinal
(
ifNull
(
excel
.
getBirthCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitMedicalCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitUnemploymentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitWorkInjuryCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getWorkInjuryCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBirthCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBirthCardinal
(),
excel
.
getPensionCardinal
()));
}
// 获取到政策后封装相关数据
if
(
Common
.
isNotNull
(
socialSet
)){
...
...
@@ -1107,20 +1108,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFundMap
.
put
(
excel
.
getEmpIdcard
(),
socialFund
);
}
}
private
BigDecimal
ifNull
(
BigDecimal
old
,
BigDecimal
last
){
if
(
Common
.
isEmpty
(
old
)){
return
last
;
}
return
old
;
}
private
Date
ifNull
(
Date
old
,
Date
last
){
if
(
Common
.
isEmpty
(
old
)){
return
last
;
}
return
old
;
}
private
void
initHoldInfo
(
List
<
String
>
socialholds
,
List
<
String
>
fundHolds
,
Map
<
String
,
SysBaseSetInfo
>
socialHoldMap
,
...
...
@@ -1717,17 +1704,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List
<
TDispatchInfo
>
dispatchs
=
baseMapper
.
selectList
(
Wrappers
.<
TDispatchInfo
>
query
().
lambda
().
in
(
TDispatchInfo:
:
getId
,
idsList
));
if
(
Common
.
isNotNull
(
dispatchs
))
{
// 获取所有派单查询信息
Map
<
String
,
TSocialFundInfo
>
socialFundMap
=
new
HashMap
<>();
initSocialFundMap
(
dispatchs
,
socialFundMap
);
Map
<
String
,
TSocialFundInfo
>
socialFundMap
=
initSocialFundMap
(
dispatchs
);
try
{
TSocialInfo
socialInfo
;
TProvidentFund
providentFund
;
String
remark
;
TAuditInfo
auditInfo
=
null
;
TSocialFundInfo
sf
;
TSocialFundInfo
sf
=
null
;
Date
now
=
new
Date
();
for
(
TDispatchInfo
dis
:
dispatchs
)
{
remark
=
""
;
if
(
Common
.
isNotNull
(
socialFundMap
)){
sf
=
socialFundMap
.
get
(
dis
.
getEmpIdcard
());
}
if
(
Common
.
isEmpty
(
sf
)){
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保公积金查询数据:"
+
dis
.
getEmpName
()));
continue
;
...
...
@@ -1757,7 +1746,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf
.
setSocialAddStatus
(
CommonConstants
.
FOUR_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
TEN_STRING
);
}
socialInfo
.
setAuditTime
(
n
ew
Date
()
);
socialInfo
.
setAuditTime
(
n
ow
);
socialInfo
.
setAuditUser
(
user
.
getId
());
}
// 派减审核
...
...
@@ -1805,7 +1794,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf
.
setFundAddStatus
(
CommonConstants
.
FOUR_STRING
);
sf
.
setFundStatus
(
CommonConstants
.
NINE_STRING
);
}
providentFund
.
setAuditTime
(
n
ew
Date
()
);
providentFund
.
setAuditTime
(
n
ow
);
providentFund
.
setAuditUser
(
user
.
getId
());
}
//派减
...
...
@@ -1831,9 +1820,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
//派单类型信息拼接
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
remark
+=
"派增"
;
remark
+=
DispatchConstants
.
DISPATCH_ADD
;
}
else
{
remark
+=
"派减"
;
remark
+=
DispatchConstants
.
DISPATCH_REDUCE
;
}
// 派单状态信息拼接
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
())
{
...
...
@@ -1842,8 +1831,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
remark
+=
"审核不通过:"
+
auditRemark
;
}
//记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询
dis
.
setHandleRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
dis
.
setAuditRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
dis
.
setHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
auditRemark
)
);
dis
.
setAuditRemark
(
ServiceUtil
.
ifNullToEmpty
(
auditRemark
)
);
initAuditInfo
(
auditInfo
,
remark
,
auditStatus
,
user
,
remark
);
auditInfo
.
setDispatchInfoId
(
dis
.
getId
());
//更新派单状态
...
...
@@ -1859,7 +1848,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//新增审核记录信息
auditInfoMapper
.
insert
(
auditInfo
);
dis
.
setAuditUser
(
user
.
getId
());
dis
.
setAuditTime
(
n
ew
Date
()
);
dis
.
setAuditTime
(
n
ow
);
baseMapper
.
updateById
(
dis
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -1873,14 +1862,569 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
return
errorList
;
}
private
void
initSocialFundMap
(
List
<
TDispatchInfo
>
dispatchs
,
Map
<
String
,
TSocialFundInfo
>
socialFundMap
)
{
@Override
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
String
ids
,
String
auditStatus
,
String
auditRemark
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
try
{
if
(!
Common
.
isNotNull
(
ids
))
{
return
R
.
failed
(
DispatchConstants
.
DISPATCH_ID_NOT_EMPTY
);
}
Integer
flag
=
1
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
auditStatus
))
{
//审核通过
flag
=
CommonConstants
.
ZERO_INT
;
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
auditStatus
))
{
//审核不通过
flag
=
CommonConstants
.
ONE_INT
;
}
else
{
return
R
.
failed
(
"派单审核状态参数异常:0待审核 1审核通过 2审核不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyAudit
(
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
),
user
,
flag
,
auditStatus
,
null
==
auditRemark
?
""
:
auditRemark
);
return
R
.
ok
(
errorInfo
,
"派单审核结果:"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"派单审核异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"数据异常,派单审核失败!"
);
}
}
@Override
public
R
<
List
<
ErrorMessage
>>
addApplyHandle
(
String
ids
,
String
typeSub
,
String
handleStatus
,
String
handleRemark
,
String
socialType
)
{
try
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
if
(!
Common
.
isNotNull
(
ids
))
{
return
R
.
failed
(
DispatchConstants
.
DISPATCH_ID_NOT_EMPTY
);
}
int
flag
=
1
;
if
(
CommonConstants
.
ONE_STRING
.
equals
(
handleStatus
))
{
//办理成功
flag
=
CommonConstants
.
ZERO_INT
;
}
else
if
(
CommonConstants
.
TWO_STRING
.
equals
(
handleStatus
))
{
//办理失败
flag
=
CommonConstants
.
ONE_INT
;
}
else
{
return
R
.
failed
(
"派单办理状态参数异常:0待办理 1办理通过 2办理不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyHandle
(
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
)
,
typeSub
,
user
,
flag
,
handleStatus
,
null
==
handleRemark
?
""
:
handleRemark
,
socialType
);
if
(
errorInfo
==
null
||
errorInfo
.
isEmpty
())
{
return
R
.
ok
(
null
,
"办理成功!"
);
}
else
{
return
R
.
ok
(
errorInfo
,
"派单办理结果:"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"派单办理异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"数据异常,办理失败!"
);
}
}
private
Map
<
String
,
TSocialFundInfo
>
initSocialFundMap
(
List
<
TDispatchInfo
>
dispatchs
)
{
List
<
String
>
idCards
=
dispatchs
.
stream
().
map
(
TDispatchInfo:
:
getEmpIdcard
).
collect
(
Collectors
.
toList
());
if
(
Common
.
isNotNull
(
idCards
)){
List
<
TSocialFundInfo
>
socialFunds
=
socialFundMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
in
(
TSocialFundInfo:
:
getEmpIdcard
,
idCards
));
if
(
Common
.
isNotNull
(
socialFunds
)){
socialFundMap
=
socialFunds
.
stream
().
collect
(
Collectors
.
toMap
(
k
->
k
.
getEmpIdcard
(),
k
->
k
));
return
socialFunds
.
stream
().
collect
(
Collectors
.
toMap
(
k
->
k
.
getEmpIdcard
(),
k
->
k
));
}
}
return
new
HashMap
<>();
}
/**
* 社保派单批量办理
* @param idsList
* @param user
* @param flag 0审核通过; 1审核不通过
* @param handleStatus 1 办理成功 2 办理失败
* @param handleRemark
* @param socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
* @return
* @Author fxj
* @Date 2022-07-26
**/
public
List
<
ErrorMessage
>
addBatchApplyHandle
(
List
<
String
>
idsList
,
String
typeSub
,
YifuUser
user
,
int
flag
,
String
handleStatus
,
String
handleRemark
,
String
socialType
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
if
(!
Common
.
isNotNull
(
idsList
))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
CommonConstants
.
PARAM_IS_NOT_ERROR
));
return
errorList
;
}
List
<
TDispatchInfo
>
disList
=
baseMapper
.
selectList
(
Wrappers
.<
TDispatchInfo
>
query
().
lambda
().
in
(
TDispatchInfo:
:
getId
,
idsList
));
if
(
Common
.
isNotNull
(
disList
))
{
// 获取所有派单查询信息
Map
<
String
,
TSocialFundInfo
>
socialFundMap
=
initSocialFundMap
(
disList
);
try
{
TSocialInfo
socialInfo
=
null
;
TProvidentFund
providentFund
=
null
;
TAuditInfo
auditInfo
=
null
;
StringBuilder
socialTypeRemark
=
null
;
TSocialFundInfo
sf
=
null
;
Date
now
=
new
Date
();
StringBuffer
temp
=
new
StringBuffer
();
for
(
TDispatchInfo
dis
:
disList
)
{
if
(
Common
.
isNotNull
(
socialFundMap
)){
sf
=
socialFundMap
.
get
(
dis
.
getEmpIdcard
());
}
if
(
Common
.
isEmpty
(
sf
)){
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保公积金查询数据:"
+
dis
.
getEmpName
()));
continue
;
}
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dis
.
getStatus
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单审核通过后才可以办理:"
+
dis
.
getEmpName
()));
continue
;
}
if
(
Common
.
isNotNull
(
dis
.
getSocialId
()))
{
// 无更新直接跳过
if
(
Common
.
isEmpty
(
socialTypeRemark
.
toString
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
())
&&
Common
.
isNotNull
(
socialType
))
{
continue
;
}
socialInfo
=
socialMapper
.
selectById
(
dis
.
getSocialId
());
socialTypeRemark
=
getHandleRemark
(
socialType
,
socialInfo
);
}
else
{
socialInfo
=
null
;
}
if
(
Common
.
isNotNull
(
dis
.
getFundId
()))
{
providentFund
=
fundMapper
.
selectById
(
dis
.
getFundId
());
}
else
{
providentFund
=
null
;
}
//派增处理
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
//社保派增办理
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
))
{
if
(
Common
.
isNotNull
(
socialInfo
)
&&
Common
.
isNotNull
(
socialInfo
.
getId
()))
{
socialInfo
.
setHandleStatus
(
handleStatus
);
socialInfo
.
setHandleTime
(
now
);
socialInfo
.
setHandleUser
(
user
.
getId
());
// 社保办理状态补充判断:
this
.
setSocialHandleStatus
(
handleStatus
,
socialType
,
flag
,
socialInfo
,
dis
,
sf
);
// 派增办理,全部失败,清空社保状态
if
(
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
{
// 同步预估库数据 TODO
}
socialMapper
.
updateById
(
socialInfo
);
dis
.
setSocialHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
));
auditInfo
=
new
TAuditInfo
();
auditInfo
.
setType
(
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
temp
.
setLength
(
CommonConstants
.
ZERO_INT
);
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_ADD
);
temp
.
append
(
socialTypeRemark
.
toString
());
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_HANDLE_SUCCESS
);
initAuditInfo
(
auditInfo
,
(
temp
+
handleRemark
),
handleStatus
,
user
,
temp
.
toString
());
}
else
{
temp
.
setLength
(
CommonConstants
.
ZERO_INT
);
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_ADD
);
temp
.
append
(
socialTypeRemark
.
toString
());
temp
.
append
(
DispatchConstants
.
DISPATCH_SOCIAL_HANDLE_FAIL
);
initAuditInfo
(
auditInfo
,
(
temp
+
handleRemark
),
handleStatus
,
user
,
temp
.
toString
());
}
dis
.
setSocialHandleStatus
(
socialInfo
.
getHandleStatus
());
auditInfo
.
setSocialId
(
dis
.
getId
());
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到对应员工社保派增派单数据:"
+
dis
.
getEmpName
()));
continue
;
}
//公积金办理
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
typeSub
))
{
if
(
null
!=
providentFund
&&
Common
.
isNotNull
(
providentFund
.
getId
()))
{
// 办理状态(0待办理/1已办理2办理失败3已派减)
providentFund
.
setHandleStatus
(
handleStatus
);
providentFund
.
setHandleTime
(
now
);
providentFund
.
setHandleUser
(
user
.
getId
());
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())
&&
CommonConstants
.
ZERO_INT
==
flag
)
{
//派增办理通过 改成可派减状态
providentFund
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
)
{
//派增办理不通过 改成不可派减状态
providentFund
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
// 同步预估库数据 TODO
}
fundMapper
.
updateById
(
providentFund
);
dis
.
setFundHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
));
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
initAuditInfo
(
auditInfo
,
(
DispatchConstants
.
DISPATCH_FUND_ADD_SUCCESS
+
handleRemark
),
handleStatus
,
user
,
DispatchConstants
.
DISPATCH_FUND_ADD_SUCCESS
);
}
else
{
initAuditInfo
(
auditInfo
,
(
DispatchConstants
.
DISPATCH_FUND_ADD_FAIL
+
handleRemark
),
handleStatus
,
user
,
DispatchConstants
.
DISPATCH_FUND_ADD_FAIL
);
}
auditInfo
.
setProvidentId
(
dis
.
getId
());
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到对应员工公积金派增派单数据:"
+
dis
.
getEmpName
()));
continue
;
}
}
//派减处理
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
()))
{
//社保派减办理
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
typeSub
))
{
if
(
null
!=
socialInfo
&&
Common
.
isNotNull
(
socialInfo
.
getId
()))
{
// 社保办理状态补充判断:
this
.
setSocialHandleStatus
(
handleStatus
,
socialType
,
flag
,
socialInfo
,
dis
,
sf
);
//社保派减办理成功才变更社保的办理状态
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
socialInfo
.
setHandleStatus
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setReduceHandleUser
(
user
.
getId
());
socialInfo
.
setReduceHandleTime
(
now
);
if
(
Common
.
isNotNull
(
dis
.
getSocialReduceDate
()))
{
socialInfo
.
setSocialReduceDate
(
dis
.
getSocialReduceDate
());
}
}
socialInfo
.
setHandleTime
(
now
);
socialInfo
.
setHandleUser
(
user
.
getId
().
toString
());
if
(
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
)
{
//派减办理不通过
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
//改成可派减状态
// 同步预估库数据
}
socialMapper
.
updateById
(
socialInfo
);
dis
.
setSocialHandleRemark
(
null
==
handleRemark
?
""
:
handleRemark
);
auditInfo
=
new
TAuditInfo
();
auditInfo
.
setType
(
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
initAuditInfo
(
auditInfo
,
(
"社保派减"
+
socialTypeRemark
.
toString
()
+
"办理成功:"
+
handleRemark
),
handleStatus
,
user
,
""
);
}
else
{
initAuditInfo
(
auditInfo
,
(
"社保派减"
+
socialTypeRemark
.
toString
()
+
"办理失败:"
+
handleRemark
),
handleStatus
,
user
,
""
);
}
dis
.
setSocialHandleStatus
(
handleStatus
);
auditInfo
.
setSocialId
(
dis
.
getId
());
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到对应员工社保数据:"
+
dis
.
getEmpName
()));
continue
;
}
//公积金派减办理
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
typeSub
))
{
if
(
null
!=
providentFund
&&
Common
.
isNotNull
(
providentFund
.
getId
()))
{
//公积金派减办理成功才变更公积金的办理状态
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
providentFund
.
setHandleStatus
(
CommonConstants
.
THREE_STRING
);
providentFund
.
setReduceHandleTime
(
now
);
providentFund
.
setReduceHandleUser
(
user
.
getId
().
toString
());
if
(
Common
.
isNotNull
(
dis
.
getFundReduceDate
()))
{
providentFund
.
setFundReduceDate
(
dis
.
getFundReduceDate
());
}
// 派减办理成功后,同步预估库数据清理
}
providentFund
.
setHandleTime
(
now
);
providentFund
.
setHandleUser
(
user
.
getId
().
toString
());
if
(
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
dis
.
getType
())
&&
CommonConstants
.
ONE_INT
==
flag
)
{
//派减办理不通过
providentFund
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
//改成可派减状态
// 同步预估库数据
}
fundMapper
.
updateById
(
providentFund
);
dis
.
setFundHandleRemark
(
ServiceUtil
.
ifNullToEmpty
(
handleRemark
));
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
initAuditInfo
(
auditInfo
,
(
"公积金派减办理成功:"
+
handleRemark
),
handleStatus
,
user
,
""
);
dis
.
setFundHandleStatus
(
CommonConstants
.
ONE_STRING
);
}
else
{
initAuditInfo
(
auditInfo
,
(
"公积金派减办理失败:"
+
handleRemark
),
handleStatus
,
user
,
""
);
dis
.
setFundHandleStatus
(
CommonConstants
.
TWO_STRING
);
}
auditInfo
.
setProvidentId
(
dis
.
getId
());
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到对应员工公积金数据:"
+
dis
.
getEmpName
()));
continue
;
}
}
//更新派单状态
if
(
null
!=
auditInfo
)
{
//派增判断
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
if
(
null
!=
socialInfo
&&
null
!=
providentFund
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getHandleStatus
())
))
{
//同时有社保和公积金的只要有一条没办理就不改派单状态
}
else
{
if
((
CommonConstants
.
ZERO_INT
==
flag
||
CommonConstants
.
ONE_INT
==
flag
)
&&
(
socialInfo
==
null
||
(!
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
&&
!
CommonConstants
.
FOUR_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))))
{
//办理成功 更新为办理完结 2020-05-26 办理失败 更新为办理完结 2020-05-26
dis
.
setStatus
(
CommonConstants
.
FOUR_STRING
);
}
}
//派减判断
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
()))
{
if
(
null
!=
socialInfo
&&
null
!=
providentFund
&&
(
((
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
||
CommonConstants
.
FIVE_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getReduceCan
()))
||
(
CommonConstants
.
ONE_STRING
.
equals
(
providentFund
.
getHandleStatus
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
providentFund
.
getReduceCan
()))
))
{
//同时有社保和公积金的只要有一条没办理就不改派单状态
}
else
{
if
(
CommonConstants
.
ZERO_INT
==
flag
||
CommonConstants
.
ONE_INT
==
flag
)
{
//办理成功或失败 更新为办理完结 2020-05-26
dis
.
setStatus
(
CommonConstants
.
FOUR_STRING
);
}
}
}
if
(
CommonConstants
.
ZERO_INT
==
flag
)
{
auditInfo
.
setAuditStatus
(
CommonConstants
.
SIX_STRING
);
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
)
{
auditInfo
.
setAuditStatus
(
CommonConstants
.
FIVE_STRING
);
}
dis
.
setHandleRemark
(
null
==
handleRemark
?
""
:
handleRemark
);
//新增办理记录信息
auditInfo
.
setDispatchInfoId
(
dis
.
getId
());
auditInfo
.
setEmpIdcard
(
dis
.
getEmpIdcard
());
auditInfoMapper
.
insert
(
auditInfo
);
baseMapper
.
updateById
(
dis
);
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单数据错误!"
));
}
}
}
}
catch
(
Exception
e
){
log
.
error
(
"派单办理异常:"
,
e
);
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单办理异常:"
+
e
.
getMessage
()));
return
errorList
;
}
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
DispatchConstants
.
NO_OPERATOR_DATA
));
return
errorList
;
}
return
errorList
;
}
private
StringBuilder
getHandleRemark
(
String
socialType
,
TSocialInfo
socialInfo
)
{
StringBuilder
socialTypeRemark
;
socialTypeRemark
=
new
StringBuilder
();
if
(
Common
.
isNotNull
(
socialType
))
{
String
[]
stArr
=
socialType
.
split
(
","
);
for
(
String
st
:
stArr
)
{
// socialType (1养老 2医疗 3失业 4工伤 5生育 6大病)
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
ONE_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getPensionHandle
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
TWO_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
THREE_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
FOUR_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
FIVE_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBirthHandle
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
if
(
Integer
.
parseInt
(
st
)
==
CommonConstants
.
SIX_INT
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getIsIllness
())){
socialTypeRemark
.
append
(
CommonConstants
.
SOCIAL_HANDLE_TYPE
[
Integer
.
parseInt
(
st
)]).
append
(
"、"
);
}
}
if
(
Common
.
isNotNull
(
socialTypeRemark
.
toString
())){
socialTypeRemark
.
deleteCharAt
(
socialTypeRemark
.
length
()-
1
);
}
}
return
socialTypeRemark
;
}
/**
* @param flag 0审核通过; 1审核不通过
* @param socialInfo
* @param dis
* @param socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
* @Description: 判断社保状态并塞值
* @Author: fxj
* @Date: 2022-07-26
* @return: void
**/
private
void
setSocialHandleStatus
(
String
handleStatus
,
String
socialType
,
int
flag
,
TSocialInfo
socialInfo
,
TDispatchInfo
dis
,
TSocialFundInfo
sf
)
{
// 批量办理,或者办理选择对应的类型,修改对应的办理状态
this
.
setSocialSixStatus
(
handleStatus
,
socialType
,
socialInfo
);
// HandleStatus办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3已派减 4办理中 5部分办理失败
// 派减,审核不通过,社保状态不变更
// 1.派减处理
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
())){
//办理成功 (办理失败不做处理,预估在另外的地方处理)
if
(
CommonConstants
.
ZERO_INT
==
flag
){
// 同步社保分项办理状态
socialInfo
.
setPensionHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setMedicalHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setUnemployHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setWorkInjuryHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setBirthHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setBigailmentHandle
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setHandleStatus
(
CommonConstants
.
THREE_STRING
);
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
//改成不可派减状态
sf
.
setSocialReduceStatus
(
CommonConstants
.
TWO_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
EIGHT_STRING
);
sf
.
setPensionHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setMedicalHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setUnemployHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setWorkInjuryHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setBirthHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setBigailmentHandle
(
CommonConstants
.
THREE_STRING
);
sf
.
setHandleStatus
(
CommonConstants
.
THREE_STRING
);
}
//办理失败不做处理,只更新社保公积金查询状态
if
(
CommonConstants
.
ONE_INT
==
flag
){
sf
.
setSocialReduceStatus
(
CommonConstants
.
THREE_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
NINE_STRING
);
}
}
// 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
())){
//办理成功 flag=0 办理失败 flag=1
// 有对应办理项且 对应项为待办理或者空时更新 下同
if
(
socialType
.
indexOf
(
CommonConstants
.
ONE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))){
socialInfo
.
setPensionHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setPensionHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
TEN_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))){
socialInfo
.
setMedicalHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setMedicalHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
THREE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getUnemployHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))){
socialInfo
.
setUnemployHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setUnemployHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
FOUR_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getWorkInjuryHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))){
socialInfo
.
setWorkInjuryHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setWorkInjuryHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
FIVE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getBirthHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))){
socialInfo
.
setBirthHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setBirthHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
SIX_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getBigailmentHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
()))){
socialInfo
.
setBigailmentHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setBigailmentHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
// 派增:
if
((
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getUnemployHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getWorkInjuryHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getBirthHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getBigailmentHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
())))
{
// 全部成功(或者为空--兼容历史数据问题):全部成功
socialInfo
.
setHandleStatus
(
CommonConstants
.
ONE_STRING
);
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
//改成可派减状态
sf
.
setSocialStatus
(
CommonConstants
.
THREE_STRING
);
sf
.
setSocialAddStatus
(
CommonConstants
.
TWO_STRING
);
sf
.
setSocialReduceStatus
(
CommonConstants
.
ONE_STRING_NEGATE
);
sf
.
setSocialReduceDate
(
null
);
dis
.
setSocialHandleStatus
(
CommonConstants
.
ONE_STRING
);
}
else
if
((
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getUnemployHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getWorkInjuryHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getBirthHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getBigailmentHandle
())
||
CommonConstants
.
TWO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
())))
{
// 全部失败(或者为空):全部失败
socialInfo
.
setHandleStatus
(
CommonConstants
.
TWO_STRING
);
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
//改成不可派减状态
sf
.
setSocialStatus
(
CommonConstants
.
FIVE_STRING
);
sf
.
setSocialAddStatus
(
CommonConstants
.
FOUR_STRING
);
dis
.
setSocialHandleStatus
(
CommonConstants
.
TWO_STRING
);
}
else
if
((
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
||
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
||
(
Common
.
isEmpty
(
socialInfo
.
getUnemployHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))
||
(
Common
.
isEmpty
(
socialInfo
.
getWorkInjuryHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))
||
(
Common
.
isEmpty
(
socialInfo
.
getBirthHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))
||
(
Common
.
isNotNull
(
socialInfo
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
())))
{
// 含有办理中的:办理中
socialInfo
.
setHandleStatus
(
CommonConstants
.
FOUR_STRING
);
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
1
]);
//改成不可派减状态
sf
.
setSocialStatus
(
CommonConstants
.
TWO_STRING
);
sf
.
setSocialAddStatus
(
CommonConstants
.
SIX_STRING
);
dis
.
setSocialHandleStatus
(
CommonConstants
.
FOUR_STRING
);
}
else
{
// 其他:部分办理失败
socialInfo
.
setHandleStatus
(
CommonConstants
.
FIVE_STRING
);
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
//改成可派减状态
sf
.
setSocialStatus
(
CommonConstants
.
FOUR_STRING
);
sf
.
setSocialAddStatus
(
CommonConstants
.
THREE_STRING
);
dis
.
setSocialHandleStatus
(
CommonConstants
.
THREE_STRING
);
}
}
}
/**
* @Author fxj
* @Description if flag=obj return value1 else return value2
* @Date 18:02 2022/7/26
**/
private
String
ifNotEquals
(
int
flag
,
int
obj
,
String
value1
,
String
value2
){
if
(
flag
==
obj
){
return
value1
;
}
return
value2
;
}
/**
* @param handleStatus
* @param socialType
* @param socialInfo
* @Description: 填充社保的新的六个状态字段
* @Author: hgw
* @Date: 2021/6/9 17:12
* @return: void
**/
private
void
setSocialSixStatus
(
String
handleStatus
,
String
socialType
,
TSocialInfo
socialInfo
)
{
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
ONE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getPensionHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
{
socialInfo
.
setPensionHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
TWO_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getMedicalHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
{
socialInfo
.
setMedicalHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
THREE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getUnemployHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))
{
socialInfo
.
setUnemployHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
FOUR_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getWorkInjuryHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))
{
socialInfo
.
setWorkInjuryHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
FIVE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getBirthHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))
{
socialInfo
.
setBirthHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
SIX_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
()))
{
socialInfo
.
setBigailmentHandle
(
handleStatus
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
798adb29
...
...
@@ -37,6 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.TAgentConfigMapper;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialFundInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -466,12 +467,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
private
void
initSocialLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
private
void
initSocialLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
lib
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
)
{
if
(
null
==
lib
)
{
lib
=
new
TForecastLibrary
();
}
lib
.
setDiffType
(
diffType
);
lib
.
setDataType
(
CommonConstants
.
ZERO_INT
);
lib
.
setEmpId
(
tSocialInfo
.
getEmpId
());
lib
.
setEmpIdcard
(
tSocialInfo
.
getEmpIdcard
());
...
...
@@ -1125,12 +1127,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Author fxj
* @Date 2020-07-21
**/
private
void
initFundLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
private
void
initFundLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
if
(
lib
==
null
)
{
lib
=
new
TForecastLibrary
();
}
lib
.
setDiffType
(
diffType
);
lib
.
setDataType
(
CommonConstants
.
ONE_INT
);
lib
.
setEmpId
(
providentFund
.
getEmpId
());
lib
.
setEmpIdcard
(
providentFund
.
getEmpIdcard
());
...
...
@@ -1170,6 +1173,44 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
/**
* @Description: 基数新增,同步社保公积金查询表,同步预估库
* @Author: hgw
* @Date: 2022/7/25 17:37
* @return: void
**/
@Override
public
void
updateForecastLibaryBySysBase
()
{
List
<
SysBaseSetInfo
>
sysBaseSetInfoList
=
sysBaseSetInfoMapper
.
selectList
(
Wrappers
.<
SysBaseSetInfo
>
query
().
lambda
()
.
eq
(
SysBaseSetInfo:
:
getIsNew
,
CommonConstants
.
ONE_INT
));
if
(
sysBaseSetInfoList
!=
null
&&
!
sysBaseSetInfoList
.
isEmpty
())
{
Map
<
String
,
TSocialFundInfo
>
socialFundInfoMap
=
new
HashMap
<>();
List
<
TSocialFundInfo
>
socialFundInfoList
;
for
(
SysBaseSetInfo
sysBaseSetInfo
:
sysBaseSetInfoList
)
{
// 社保
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sysBaseSetInfo
.
getBaseType
()))
{
socialFundInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getSocialHousehold
,
sysBaseSetInfo
.
getDepartId
()));
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
// 公积金
if
(
CommonConstants
.
ONE_STRING
.
equals
(
sysBaseSetInfo
.
getBaseType
()))
{
socialFundInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getProvidentHousehold
,
sysBaseSetInfo
.
getDepartId
()));
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
}
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoMap
.
values
())
{
this
.
updateForecastLibaryCore
(
socialFundInfo
);
}
}
}
/**
* @param socialFundInfo
* @Description: 批量调基,同步预估库
...
...
@@ -1179,6 +1220,29 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
@Override
public
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
);
}
/**
* @param socialFundInfo
* @Description: 派单,同步预估库
* @Author: hgw
* @Date: 2022/7/25 17:37
* @return: void
**/
@Override
public
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
);
}
/**
* @param socialFundInfo
* @Description: 根据社保公积金信息表更新预估库
* @Author: hgw
* @Date: 2022/7/26 19:01
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
private
R
<
String
>
updateForecastLibaryCore
(
TSocialFundInfo
socialFundInfo
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialList
=
null
;
...
...
@@ -1295,6 +1359,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String
createMonth
;
String
sfMapKey
;
TForecastLibrary
tForecastLibrary
;
String
diffType
;
for
(
String
payMonth
:
payMonthList
)
{
//封装社保预估数据
if
(
Common
.
isNotNull
(
socialInfoList
))
{
...
...
@@ -1304,12 +1369,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 变更:已推送的,计算变更值
tForecastLibrary
=
socialPushMap
.
get
(
sfMapKey
);
diffType
=
SocialConstants
.
DIFF_TYPE_ONE
;
if
(
null
!=
tForecastLibrary
)
{
diffType
=
SocialConstants
.
DIFF_TYPE_TWO
;
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
5
].
equals
(
tSocialInfo
.
getSocialStatus
())
||
CommonConstants
.
dingleDigitStrArray
[
10
].
equals
(
tSocialInfo
.
getSocialStatus
()))
{
// 5 办理失败 10 审核不通过,且无推送数据,不新增
continue
;
}
//起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialStartDate
())
||
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialReduceDate
()))
{
||
(
Common
.
isNotNull
(
tSocialInfo
.
getSocialReduceDate
())
&&
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialReduceDate
())))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
tSocialInfo
.
getCanOverpay
())
&&
(
null
==
tSocialInfo
.
getOverpayNumber
()
||
null
==
tSocialInfo
.
getHaveThisMonth
()
||
null
==
tSocialInfo
.
getSocialStartDate
());
...
...
@@ -1318,7 +1390,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
socialHistoryMap
.
get
(
sfMapKey
);
// 初始化社保
initSocialLibary
(
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
}
}
}
...
...
@@ -1329,12 +1401,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
sfMapKey
=
this
.
getMapKey
(
providentFund
.
getEmpIdcard
(),
providentFund
.
getSettleDomainFund
(),
payMonth
,
createMonth
);
// 变更:已推送的,计算变更值
tForecastLibrary
=
fundPushMap
.
get
(
sfMapKey
);
diffType
=
SocialConstants
.
DIFF_TYPE_ONE
;
if
(
null
!=
tForecastLibrary
)
{
diffType
=
SocialConstants
.
DIFF_TYPE_TWO
;
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
4
].
equals
(
providentFund
.
getFundStatus
())
||
CommonConstants
.
dingleDigitStrArray
[
9
].
equals
(
providentFund
.
getFundStatus
()))
{
// 4办理失败9 审核不通过,且无推送数据,不新增
continue
;
}
//起缴月份在要生成的月份后不处理 || 截止月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
providentFund
.
getProvidentStart
())
||
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
providentFund
.
getFundReduceDate
()))
{
||
(
Common
.
isNotNull
(
providentFund
.
getFundReduceDate
())
&&
Integer
.
parseInt
(
payMonth
)
>
DateUtil
.
formatDateInt
(
providentFund
.
getFundReduceDate
())))
{
continue
;
}
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getCanOverpay
())
&&
(
null
==
providentFund
.
getOverpayNumber
()
||
null
==
providentFund
.
getHaveThisMonth
()
||
null
==
providentFund
.
getProvidentStart
());
...
...
@@ -1343,7 +1422,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
fundHistoryMap
.
get
(
sfMapKey
);
// 初始化公积金
initFundLibary
(
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
}
}
...
...
@@ -1352,4 +1431,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
null
;
}
@Override
public
void
everyMonthCreateForecastLibary
()
{
List
<
TSocialFundInfo
>
socialFundInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
());
if
(
socialFundInfoList
!=
null
&&
!
socialFundInfoList
.
isEmpty
())
{
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
// TODO-生成新的社保公积金数据
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
798adb29
...
...
@@ -772,7 +772,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
list
=
baseMapper
.
getListForExport
(
tPreDispatchInfo
);
ServletOutputStream
out
=
null
;
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
}
try
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
798adb29
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
...
...
@@ -94,4 +96,23 @@ public class ServiceUtil {
}
return
false
;
}
public
static
BigDecimal
ifNull
(
BigDecimal
old
,
BigDecimal
last
){
if
(
Common
.
isEmpty
(
old
)){
return
last
;
}
return
old
;
}
public
static
Date
ifNull
(
Date
old
,
Date
last
){
if
(
Common
.
isEmpty
(
old
)){
return
last
;
}
return
old
;
}
public
static
String
ifNullToEmpty
(
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
CommonConstants
.
EMPTY_STRING
;
}
return
str
;
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
798adb29
...
...
@@ -94,6 +94,7 @@
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"dataPush"
column=
"DATA_PUSH"
/>
<result
property=
"dataType"
column=
"DATA_TYPE"
/>
<result
property=
"diffType"
column=
"DIFF_TYPE"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
...
...
@@ -171,6 +172,7 @@
a.PROVIDENT_HOUSEHOLD_NAME,
a.DATA_PUSH,
a.DATA_TYPE,
a.DIFF_TYPE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
...
...
@@ -395,6 +397,9 @@
<if
test=
"tForecastLibrary.dataType != null"
>
AND a.DATA_TYPE = #{tForecastLibrary.dataType}
</if>
<if
test=
"tForecastLibrary.diffType != null and tForecastLibrary.diffType.trim() != ''"
>
AND a.DIFF_TYPE = #{tForecastLibrary.diffType}
</if>
<if
test=
"tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tForecastLibrary.createBy}
</if>
...
...
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