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
ccec5f3d
Commit
ccec5f3d
authored
Jul 26, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-licancan
parents
c1c812fd
d5baee3f
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
346 additions
and
107 deletions
+346
-107
TSettleDomainListVo.java
...u/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
+15
-0
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+7
-4
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+6
-6
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+22
-0
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+6
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
Common.java
.../com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
+40
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+2
-2
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+45
-1
TPreDispatchInfo.java
...fu/cloud/plus/v1/yifu/social/entity/TPreDispatchInfo.java
+2
-2
TSocialFundInfo.java
...ifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
+4
-4
TPreDispatchExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
+1
-1
TPreDispatchInfoController.java
...v1/yifu/social/controller/TPreDispatchInfoController.java
+2
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+101
-66
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+33
-17
ServiceUtil.java
.../com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
+38
-0
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+16
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TSettleDomainListVo.java
0 → 100644
View file @
ccec5f3d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
TSettleDomainListVo
{
/**
* 合同主体对应的单位名称
*/
private
List
<
TSettleDomainSelectVo
>
listSelectVO
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
ccec5f3d
...
...
@@ -149,8 +149,8 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping
(
"/getSettleDomainSelectVoById"
)
public
R
<
TSettleDomainSelectVo
>
getInnerSettleDomainSelectVoByUserId
(
@RequestParam
String
id
)
{
return
new
R
<>(
tSettleDomainService
.
selectSettleDomainSelectVosById
(
id
)
);
public
TSettleDomainSelectVo
getInnerSettleDomainSelectVoByUserId
(
@RequestParam
String
id
)
{
return
tSettleDomainService
.
selectSettleDomainSelectVosById
(
id
);
}
/**
...
...
@@ -161,8 +161,11 @@ public class TSettleDomainController {
**/
@Inner
@PostMapping
(
"/selectAllSettleDomainSelectVos"
)
public
R
<
List
<
TSettleDomainSelectVo
>>
selectAllSettleDomainSelectVos
()
{
return
new
R
<>(
tSettleDomainService
.
selectAllSettleDomainSelectVos
());
public
TSettleDomainListVo
selectAllSettleDomainSelectVos
()
{
List
<
TSettleDomainSelectVo
>
list
=
tSettleDomainService
.
selectAllSettleDomainSelectVos
();
TSettleDomainListVo
listVo
=
new
TSettleDomainListVo
();
listVo
.
setListSelectVO
(
list
);
return
listVo
;
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
ccec5f3d
...
...
@@ -25,10 +25,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
...
...
@@ -57,7 +57,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private
final
TCustomerInfoService
tCustomerInfoService
;
private
final
TSettleDomain
Service
tSettleDomainService
;
private
final
TSettleDomain
Mapper
tSettleDomainMapper
;
private
final
TEmployeeLogServiceImpl
tEmployeeLogService
;
...
...
@@ -89,7 +89,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
TSettleDomain
tSettleDomain
=
tSettleDomain
Service
.
ge
tOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
TSettleDomain
tSettleDomain
=
tSettleDomain
Mapper
.
selec
tOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmpChangeInfo
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDepartName
,
tEmpChangeInfo
.
getNewSettle
())
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
));
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeeProject
.
getId
());
...
...
@@ -149,7 +149,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomain
Service
.
ge
tOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
TSettleDomain
tSettleDomain
=
tSettleDomain
Mapper
.
selec
tOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getNewSettleCode
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
...
...
@@ -217,7 +217,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
@Override
public
R
<
List
<
TSettleDomain
>>
getAllDept
()
{
List
<
TSettleDomain
>
list
=
tSettleDomain
Service
.
l
ist
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
List
<
TSettleDomain
>
list
=
tSettleDomain
Mapper
.
selectL
ist
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
().
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
return
R
.
ok
(
list
);
}
...
...
@@ -243,7 +243,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
@Override
public
IPage
<
TSettleDomain
>
getAllDeptPage
(
Page
page
)
{
LambdaQueryWrapper
<
TSettleDomain
>
wrapper
=
buildQueryWrapper
();
return
tSettleDomain
Service
.
p
age
(
page
,
wrapper
);
return
tSettleDomain
Mapper
.
selectP
age
(
page
,
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
()
{
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
ccec5f3d
...
...
@@ -358,6 +358,20 @@ public interface CommonConstants {
// 是否
String
IS_CHANGE
=
"划转"
;
/**
* 省市
* @Author fxj
* @Date 2020-08-25
**/
public
static
final
String
HEFEISTRING
=
"安徽省-合肥市"
;
/**
* 省
* @Author fxj
* @Date 2020-08-25
**/
public
static
final
String
ANHUISTRING
=
"安徽省"
;
/**
*是所有者
**/
...
...
@@ -378,6 +392,10 @@ public interface CommonConstants {
public
static
final
String
NINE_STRING
=
"9"
;
String
EIGHT_STRING
=
"8"
;
public
static
final
String
PAYMENT_SOCIAL_IMPORT
=
"payment_social_import"
;
public
static
final
String
PAYMENT_SOCIAL_WAIT_EXPORT
=
"payment_social_wait_export"
;
//百分之一 1/100
public
static
final
BigDecimal
ONE_OF_PERCENT
=
new
BigDecimal
(
"0.01"
);
...
...
@@ -389,4 +407,8 @@ public interface CommonConstants {
String
SEVEN_STRING
=
"7"
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"999999.99"
);
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/ExcelAttributeConstants.java
View file @
ccec5f3d
...
...
@@ -126,4 +126,10 @@ public class ExcelAttributeConstants {
public
static
final
String
DEPARTID_PROVINCE_CITY_TOWN
=
"departId_province_city_town"
;
//派减离职原因
public
static
final
String
REDUCE_PROJECT_REASON
=
"reduce_project_reason"
;
//社保缴纳月份
public
static
final
String
SOCIAL_PAY_MONTH
=
"socialPayMonth"
;
//身份证
public
static
final
String
EMPIDCARD
=
"empIdcard"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
ccec5f3d
...
...
@@ -416,4 +416,8 @@ public interface ErrorCodes {
* 派减异常: 本次派增已存在对应身份证号的派减记录
*/
String
EMP_DISPATCH_REDUCE_EXISTS
=
"emp.dispatch.reduce.exists"
;
/**
* 当前社保导入队列不足或者数据量过大,请稍后重试!
*/
String
SOCIALINFO_LIST_NUM_LARGE
=
"socialinfo.list.num.large"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
View file @
ccec5f3d
...
...
@@ -399,4 +399,44 @@ public class Common {
map
.
clear
();
}
}
/**
* 按字段返回字符串
*
* @param list
* @param filedName
* @param <T>
* @return
*/
public
static
<
T
>
List
<
String
>
listObjectToStrList
(
List
<
T
>
list
,
String
filedName
)
{
List
<
String
>
idsStr
=
new
ArrayList
<
String
>();
Object
temp
=
null
;
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
for
(
T
t
:
list
)
{
temp
=
getFieldValueByName
(
filedName
,
t
);
if
(
null
!=
temp
)
{
idsStr
.
add
(
temp
.
toString
());
}
}
}
return
idsStr
;
}
/**
* 默认空 置为零
* @param obj
* @return
*/
public
static
BigDecimal
isBlankToBigDecimalZero
(
BigDecimal
obj
)
{
if
(
obj
==
null
)
{
return
BigDecimal
.
ZERO
;
}
if
(
String
.
valueOf
(
obj
).
trim
().
length
()
==
0
)
{
return
BigDecimal
.
ZERO
;
}
if
(
String
.
valueOf
(
obj
).
trim
().
equals
(
"null"
))
{
return
BigDecimal
.
ZERO
;
}
return
obj
;
}
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
ccec5f3d
...
...
@@ -151,6 +151,8 @@ emp.dispatch.reduce.fund.status.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672A\u627
emp.dispatch.reduce.exists
=
\u
6D3E
\u
51CF
\u
5F02
\u
5E38
\u
FF1A
\u
672C
\u
6B21
\u
6D3E
\u
589E
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8EAB
\u
4EFD
\u
8BC1
\u
53F7
\u7684\u
6D3E
\u
51CF
\u
8BB0
\u
5F55
socialinfo.list.num.large
=
\u
5F53
\u
524D
\u
793E
\u
4FDD
\u
5BFC
\u5165\u
961F
\u5217\u
4E0D
\u
8DB3
\u6216\u8005\u6570\u
636E
\u
91CF
\u
8FC7
\u5927\u
FF0C
\u
8BF7
\u
7A0D
\u
540E
\u
91CD
\u
8BD5
\u
FF01
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
ccec5f3d
...
...
@@ -96,8 +96,8 @@ public class ArchivesDaprUtil {
* @Param
* @return
**/
public
R
<
List
<
TSettleDomainSelectVo
>
>
selectAllSettleDomainSelectVos
(){
R
<
List
<
TSettleDomainSelectVo
>>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/getSettleDomainSelectVoById
"
,
""
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
public
R
<
TSettleDomainListVo
>
selectAllSettleDomainSelectVos
(){
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/tsettledomain/selectAllSettleDomainSelectVos
"
,
""
,
Map
.
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/entity/TDispatchInfo.java
View file @
ccec5f3d
...
...
@@ -101,7 +101,7 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
/**
* 员工电话
* 员工电话
(手机号码)
*/
@Length
(
max
=
32
,
message
=
"员工电话 不能超过32个字符"
)
@ExcelAttribute
(
name
=
"员工电话"
,
maxLength
=
32
)
...
...
@@ -520,6 +520,50 @@ public class TDispatchInfo extends BaseEntity {
private
String
belongUnitName
;
/**
* 学历
*/
@ExcelAttribute
(
name
=
"学历"
,
maxLength
=
32
)
@Schema
(
description
=
"学历"
,
name
=
"contractName"
)
private
String
educationName
;
/**
* 试用期(单位月)
*/
@Length
(
max
=
2
,
message
=
"试用期 不能超过2 个字符"
)
@ExcelAttribute
(
name
=
"试用期"
,
maxLength
=
32
)
@Schema
(
description
=
"试用期"
)
@ExcelProperty
(
"试用期"
)
private
String
tryPeriod
;
/**
* 身份证省
*/
@ExcelAttribute
(
name
=
"身份证省"
,
isArea
=
true
)
@Schema
(
description
=
"身份证省"
)
@ExcelProperty
(
"身份证省"
)
private
String
idCardProvince
;
/**
* 身份证市
*/
@ExcelAttribute
(
name
=
"身份证市"
,
isArea
=
true
,
parentField
=
"idCardProvince"
)
@Schema
(
description
=
"身份证市"
)
@ExcelProperty
(
"身份证市"
)
private
String
idCardCity
;
/**
* 身份证县
*/
@ExcelAttribute
(
name
=
"身份证县"
,
isArea
=
true
,
parentField
=
"idCardCity"
)
@Schema
(
description
=
"身份证县"
)
@ExcelProperty
(
"身份证县"
)
private
String
idCardTown
;
/**
* 身份证所在地
*/
@ExcelAttribute
(
name
=
"身份证所在地"
)
@Schema
(
description
=
"身份证所在地"
)
@ExcelProperty
(
"身份证所在地"
)
private
String
idCardAddress
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TPreDispatchInfo.java
View file @
ccec5f3d
...
...
@@ -636,9 +636,9 @@ public class TPreDispatchInfo extends BaseEntity {
private
String
remark
;
/**
* 是否派单:0 是
2 否
* 是否派单:0 是
1 否
*/
@Schema
(
description
=
"是否派单:0 是
2
否 "
)
@Schema
(
description
=
"是否派单:0 是
1
否 "
)
private
String
dispatchFlag
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFundInfo.java
View file @
ccec5f3d
...
...
@@ -964,18 +964,18 @@ public class TSocialFundInfo extends BaseEntity {
private
BigDecimal
personalFundSum
;
/**
* 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)
* 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败
10 审核不通过
)
*/
@ExcelAttribute
(
name
=
"社保状态"
,
maxLength
=
1
)
@Schema
(
description
=
"社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)"
)
@Schema
(
description
=
"社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败
10 审核不通过
)"
)
@ExcelProperty
(
"社保派增状态"
)
private
String
socialStatus
;
/**
* 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)
* 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败
9 审核不通过
)
*/
@Length
(
max
=
1
,
message
=
"公积金状态 不能超过1个字符"
)
@ExcelAttribute
(
name
=
"公积金状态"
,
maxLength
=
1
)
@Schema
(
description
=
"公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)"
)
@Schema
(
description
=
"公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败
9 审核不通过
)"
)
@ExcelProperty
(
"公积金状态"
)
private
String
fundStatus
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPreDispatchExportVo.java
View file @
ccec5f3d
...
...
@@ -494,7 +494,7 @@ public class TPreDispatchExportVo implements Serializable {
private
String
remark
;
/**
* 是否派单:0 是
2
否
* 是否派单:0 是
1
否
*/
@ExcelProperty
(
value
=
"是否派单"
)
@ExcelAttribute
(
name
=
"是否派单"
,
maxLength
=
2
,
needExport
=
true
,
readConverterExp
=
"0=是,1=否"
)
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPreDispatchInfoController.java
View file @
ccec5f3d
...
...
@@ -225,7 +225,7 @@ public class TPreDispatchInfoController {
@Operation
(
summary
=
"预派单批量新增派增"
,
description
=
"预派单批量新增派增"
)
@SysLog
(
"预派单批量新增派增"
)
@PostMapping
(
"/analysisJsonStringImportAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social
:
tpredispatchinfo_importAddList')"
)
@PreAuthorize
(
"@pms.hasPermission('social
_
tpredispatchinfo_importAddList')"
)
public
R
analysisJsonStringImportAdd
(
@RequestBody
String
jsonString
,
@RequestParam
(
value
=
"socialHouse"
,
required
=
false
)
String
socialHouse
,
@RequestParam
(
value
=
"fundHouse"
,
required
=
false
)
String
fundHouse
,
@RequestParam
String
departId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
@@ -265,7 +265,7 @@ public class TPreDispatchInfoController {
@Operation
(
summary
=
"预派单批量新增派减"
,
description
=
"预派单批量新增派减"
)
@SysLog
(
"预派单批量新增派减"
)
@PostMapping
(
"/analysisJsonStringImportReduce"
)
@PreAuthorize
(
"@pms.hasPermission('social
:tpredispatchinfo_importReduce
List')"
)
@PreAuthorize
(
"@pms.hasPermission('social
_tpredispatchinfo_importAdd
List')"
)
public
R
analysisJsonStringImportReduce
(
@RequestBody
String
jsonString
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
ccec5f3d
...
...
@@ -61,6 +61,7 @@ import java.io.InputStream;
import
java.math.BigDecimal
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
java
.
time
.
format
.
DateTimeFormatter
.
ofPattern
;
...
...
@@ -774,6 +775,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setSettleDomain
(
excel
.
getSettleDomainId
());
dispatch
.
setBelongUnit
(
excel
.
getCustomerId
());
dispatch
.
setBelongUnitName
(
excel
.
getCustomerName
());
dispatch
.
setEducationName
(
excel
.
getEducationName
());
dispatch
.
setIdCardProvince
(
excel
.
getIdCardProvince
());
dispatch
.
setIdCardCity
(
excel
.
getIdCardCity
());
dispatch
.
setIdCardTown
(
excel
.
getIdCardTown
());
dispatch
.
setIdCardAddress
(
excel
.
getIdCardAddress
());
// 封装合同信息 默认取值派单的
dispatch
.
setContractStart
(
excel
.
getContractStart
());
dispatch
.
setContractEnd
(
excel
.
getContractEnd
());
...
...
@@ -796,6 +802,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
if
(
Common
.
isNotNull
(
empVo
.
getIdProvince
())){
dispatch
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
dispatch
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
dispatch
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdTown
()));
}
}
dispatchMap
.
put
(
excel
.
getEmpIdcard
(),
dispatch
);
...
...
@@ -1162,6 +1173,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract
.
setSituation
(
excel
.
getContractType
());
contract
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
contract
.
setEmpName
(
excel
.
getEmpName
());
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
contract
.
setContractParty
(
excel
.
getSocialHousehold
());
}
if
(
Common
.
isEmpty
(
excel
.
getSocialHousehold
())
&&
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
contract
.
setContractParty
(
excel
.
getSocialHousehold
());
}
if
(
Common
.
isNotNull
(
empVo
))
{
contract
.
setEmpId
(
empVo
.
getId
());
contract
.
setEmpNo
(
empVo
.
getEmpCode
());
...
...
@@ -1360,7 +1377,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFundMap
)){
socialFund
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
socialFund
)){
// 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)
// 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败
10 审核不通过
)
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())
&&
(
Common
.
isEmpty
(
socialFund
.
getSocialStatus
())
||
CommonConstants
.
SIX_STRING
.
equals
(
socialFund
.
getSocialStatus
())
...
...
@@ -1371,7 +1388,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_EXISTING
)));
return
true
;
}
// 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)
// 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败
9 审核不通过
)
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())
&&
(
CommonConstants
.
FIVE_STRING
.
equals
(
socialFund
.
getFundStatus
())
&&
CommonConstants
.
SIX_STRING
.
equals
(
socialFund
.
getFundStatus
())
...
...
@@ -1691,69 +1708,100 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorList
.
add
(
new
ErrorMessage
(-
1
,
CommonConstants
.
PARAM_IS_NOT_ERROR
));
return
errorList
;
}
List
<
TDispatchInfo
>
dispatchInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TDispatchInfo
>
query
().
lambda
().
in
(
TDispatchInfo:
:
getId
,
idsList
));
if
(
Common
.
isNotNull
(
dispatchInfoList
))
{
// 获取所有派单信息
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
);
try
{
TSocialInfo
socialInfo
=
null
;
TProvidentFund
providentFund
=
null
;
String
remark
=
""
;
TSocialInfo
socialInfo
;
TProvidentFund
providentFund
;
String
remark
;
TAuditInfo
auditInfo
=
null
;
R
<
Boolean
>
resR
=
null
;
boolean
booleanFlag
;
TEmployeeInfo
employee
=
null
;
boolean
repeatFlag
=
false
;
for
(
TDispatchInfo
dispatchInfo
:
dispatchInfoList
)
{
TSocialFundInfo
sf
;
for
(
TDispatchInfo
dis
:
dispatchs
)
{
remark
=
""
;
employee
=
new
TEmployeeInfo
();
sf
=
socialFundMap
.
get
(
dis
.
getEmpIdcard
());
if
(
Common
.
isEmpty
(
sf
)){
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保公积金查询数据:"
+
dis
.
getEmpName
()));
continue
;
}
//社保状态处理
if
(
Common
.
isNotNull
(
dis
patchInfo
.
getSocialId
()))
{
if
(
Common
.
isNotNull
(
dis
.
getSocialId
()))
{
remark
=
"社保"
;
socialInfo
=
socialMapper
.
selectById
(
dis
patchInfo
.
getSocialId
());
if
(
null
==
socialInfo
&&
Common
.
isNotNull
(
dis
patchInfo
.
getSocialId
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保派单数据:"
+
dis
patchInfo
.
getEmpName
()));
socialInfo
=
socialMapper
.
selectById
(
dis
.
getSocialId
());
if
(
null
==
socialInfo
&&
Common
.
isNotNull
(
dis
.
getSocialId
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工社保派单数据:"
+
dis
.
getEmpName
()));
continue
;
}
if
(
null
!=
socialInfo
&&
Common
.
isNotNull
(
dispatchInfo
.
getSocialId
()))
{
//审核通过
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
()
&&
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dispatchInfo
.
getType
()))
{
socialInfo
.
setAuditStatus
(
CommonConstants
.
ONE_STRING
);
//审核不通过
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
// 作废更新:社保状态、同步预估数据 8 审核不通过直接作废 TODO
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dispatchInfo
.
getType
())){
if
(
null
!=
socialInfo
)
{
// 派增审核
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
//派增审核通过
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
())
{
socialInfo
.
setAuditStatus
(
CommonConstants
.
ONE_STRING
);
// 待办理
sf
.
setSocialAddStatus
(
CommonConstants
.
ONE_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
ONE_STRING
);
//派增审核不通过 需要处理预估数据
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
socialInfo
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
// 作废更新:社保状态、同步预估数据 审核不通过直接作废 TODO
socialInfo
.
setAuditStatus
(
CommonConstants
.
TWO_STRING
);
clearSocialAddInfo
(
sf
,
dis
);
}
}
// 派减审核
if
(
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
dis
.
getType
())){
//派增审核通过
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
())
{
socialInfo
.
setAuditStatus
(
CommonConstants
.
ONE_STRING
);
// 待办理
sf
.
setSocialAddStatus
(
CommonConstants
.
ONE_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
ONE_STRING
);
//派增审核不通过 需要处理预估数据
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
//派增作废同时删除社保或公积金,派减对应社保公积金状态修改 TODO
socialInfo
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
// 作废更新:社保状态、同步预估数据 8 审核不通过直接作废 TODO
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
socialInfo
.
setAuditStatus
(
CommonConstants
.
TWO_STRING
);
}
}
//派增作废同时删除社保或公积金,派减对应社保公积金状态修改 TODO
initSocialDestroy
(
dispatchInfo
,
socialInfo
);
}
socialInfo
.
setAuditTime
(
new
Date
());
socialInfo
.
setAuditUser
(
user
.
getId
());
socialMapper
.
updateById
(
socialInfo
);
}
}
//公积金状态处理
if
(
Common
.
isNotNull
(
dis
patchInfo
.
getFundId
()))
{
if
(
!
""
.
equals
(
remark
))
{
if
(
Common
.
isNotNull
(
dis
.
getFundId
()))
{
if
(
Common
.
isEmpty
(
remark
))
{
remark
+=
"、公积金"
;
}
else
{
remark
+=
"公积金"
;
}
providentFund
=
fundMapper
.
selectById
(
dis
patchInfo
.
getFundId
());
if
(
null
==
providentFund
&&
Common
.
isNotNull
(
dis
patchInfo
.
getFundId
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工公积金派单数据:"
+
dis
patchInfo
.
getEmpName
()));
providentFund
=
fundMapper
.
selectById
(
dis
.
getFundId
());
if
(
null
==
providentFund
&&
Common
.
isNotNull
(
dis
.
getFundId
()))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到员工公积金派单数据:"
+
dis
.
getEmpName
()));
continue
;
}
if
(
null
!=
providentFund
&&
Common
.
isNotNull
(
dis
patchInfo
.
getFundId
()))
{
if
(
null
!=
providentFund
&&
Common
.
isNotNull
(
dis
.
getFundId
()))
{
// 审核通过
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
())
{
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
patchInfo
.
getType
())){
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
providentFund
.
setAuditStatus
(
CommonConstants
.
ONE_STRING
);
}
// 审核不通过
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据 fxj 20200928 审核不通过直接作废
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
patchInfo
.
getType
())){
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
())){
providentFund
.
setAuditStatus
(
CommonConstants
.
TWO_STRING
);
}
}
...
...
@@ -1765,10 +1813,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
// 审核不通过 直接作废 要考虑 部分派增的情况
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
dis
patchInfo
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
dis
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
}
//派单类型信息拼接
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
patchInfo
.
getType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
()))
{
remark
+=
"派增"
;
}
else
{
remark
+=
"派减"
;
...
...
@@ -1780,25 +1828,25 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
remark
+=
"审核不通过:"
+
auditRemark
;
}
//记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询
dis
patchInfo
.
setHandleRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
dis
patchInfo
.
setAuditRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
dis
.
setHandleRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
dis
.
setAuditRemark
(
null
==
auditRemark
?
""
:
auditRemark
);
initAuditInfo
(
auditInfo
,
remark
,
auditStatus
,
user
,
remark
);
auditInfo
.
setDispatchInfoId
(
dis
patchInfo
.
getId
());
auditInfo
.
setDispatchInfoId
(
dis
.
getId
());
//更新派单状态
if
(
CommonConstants
.
ZERO_INT
==
flag
.
intValue
())
{
//审核通过
dis
patchInfo
.
setStatus
(
CommonConstants
.
TWO_STRING
);
dis
.
setStatus
(
CommonConstants
.
TWO_STRING
);
auditInfo
.
setAuditStatus
(
CommonConstants
.
TWO_STRING
);
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
.
intValue
())
{
//审核不通过
dis
patchInfo
.
setStatus
(
CommonConstants
.
THREE_STRING
);
dis
.
setStatus
(
CommonConstants
.
THREE_STRING
);
auditInfo
.
setAuditStatus
(
CommonConstants
.
THREE_STRING
);
}
//新增审核记录信息
auditInfoMapper
.
insert
(
auditInfo
);
dis
patchInfo
.
setAuditUser
(
user
.
getId
());
dis
patchInfo
.
setAuditTime
(
new
Date
());
baseMapper
.
updateById
(
dis
patchInfo
);
dis
.
setAuditUser
(
user
.
getId
());
dis
.
setAuditTime
(
new
Date
());
baseMapper
.
updateById
(
dis
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
DispatchConstants
.
DISPATCH_AUDIT_ERROR
,
e
);
...
...
@@ -1811,27 +1859,14 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
return
errorList
;
}
/**
* 派增作废同时删除社保或公积金,派减对应社保公积金状态修改 TODO 更新社保公积金查询列表
* @Author fxj
* @Date 2020-09-28
* @param dispatchInfo
* @param socialInfo
* @return
**/
private
void
initSocialDestroy
(
TDispatchInfo
dispatchInfo
,
TSocialInfo
socialInfo
)
{
//派减作废 同步处理 社保公积金查询状态
if
(
CommonConstants
.
dingleDigitStrArray
[
1
].
equals
(
dispatchInfo
.
getType
()))
{
socialInfo
.
setReduceCan
(
CommonConstants
.
dingleDigitStrArray
[
0
]);
//改成可派减状态
// 派增-同步预估库数据 TODO
//forecastLibraryService.createForecastSocialOrFund(dispatchInfo.getEmpIdcard(), socialInfo, null);
}
else
{
socialInfo
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
// 派减-同步预估库数据
// 获取社保派减信息-仅含有id、社保减少日期,公积金减少日期 TODO
//forecastLibraryService.reduceForecastSocialOrFund(dispatchInfo.getEmpIdcard(), socialReduceDate, null);
private
void
initSocialFundMap
(
List
<
TDispatchInfo
>
dispatchs
,
Map
<
String
,
TSocialFundInfo
>
socialFundMap
)
{
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
));
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
ccec5f3d
...
...
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
...
@@ -323,14 +324,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
Common
.
isEmpty
(
id
))
{
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
R
<
List
<
TSettleDomainSelectVo
>>
settleDomainR
=
null
;
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
//结算主体名称map key:结算主体id value:结算主体名称
Map
<
String
,
String
>
settleDomainNameMap
=
new
HashMap
<>();
//客户名称map key:客户id value:客户名称
Map
<
String
,
String
>
customerNameMap
=
new
HashMap
<>();
//结算主体客户关系map key:结算主体id value:客户id
Map
<
String
,
String
>
settleIdAndCustomerIdMap
=
new
HashMap
<>();
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
listVo
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
}
}
//map数据封装
initSettleDomainMaps
(
settleDomainR
,
settleDomainNameMap
,
customerNameMap
,
settleIdAndCustomerIdMap
);
TPreDispatchInfo
preInfo
=
baseMapper
.
selectById
(
id
);
...
...
@@ -388,14 +396,21 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
R
<
List
<
TSettleDomainSelectVo
>>
settleDomainR
=
null
;
List
<
TSettleDomainSelectVo
>
settleDomainR
=
null
;
R
<
TSettleDomainListVo
>
listVo
=
null
;
//结算主体名称map key:结算主体id value:结算主体名称
Map
<
String
,
String
>
settleDomainNameMap
=
new
HashMap
<>();
//客户名称map key:客户id value:客户名称
Map
<
String
,
String
>
customerNameMap
=
new
HashMap
<>();
//结算主体客户关系map key:结算主体id value:客户id
Map
<
String
,
String
>
settleIdAndCustomerIdMap
=
new
HashMap
<>();
settleDomainR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
listVo
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
Common
.
isNotNull
(
listVo
))
{
TSettleDomainListVo
tSettleDomainListVo
=
listVo
.
getData
();
if
(
Common
.
isNotNull
(
tSettleDomainListVo
)
&&
Common
.
isNotEmpty
(
tSettleDomainListVo
.
getListSelectVO
()))
{
settleDomainR
=
tSettleDomainListVo
.
getListSelectVO
();
}
}
//map数据封装
initSettleDomainMaps
(
settleDomainR
,
settleDomainNameMap
,
customerNameMap
,
settleIdAndCustomerIdMap
);
// 获取当前创建人 截止到当前时间的 正常未派单 未删除的预派单数据
...
...
@@ -480,6 +495,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
@Override
public
R
update
(
TPreDispatchInfo
tPreDispatchInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -549,7 +565,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
public
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
socialHouse
,
String
fundHouse
,
String
departId
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
departId
);
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
// 获取区域数据MAP
HashMap
<
String
,
SysArea
>
areaHashMap
=
new
HashMap
<>(
CommonConstants
.
SIXTEEN_INT
);
HashMap
<
String
,
SysArea
>
areaIdMap
=
new
HashMap
<>(
CommonConstants
.
SIXTEEN_INT
);
...
...
@@ -559,6 +574,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
dataCheckDepart
(
errorList
,
domainR
))
{
return
errorList
;
}
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
// 获取基数配置信息
HashMap
<
String
,
SysBaseSetInfo
>
baseSocialSetMap
=
new
HashMap
<>();
HashMap
<
String
,
SysBaseSetInfo
>
baseFundSetMap
=
new
HashMap
<>();
...
...
@@ -653,8 +669,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initDayLimit
(
dayConfMap
,
info
);
// 5.保存 有异常也保存 要做标识
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
user
.
getDeptId
().
toString
());
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
info
.
setUserDeptName
(
selectVo
.
getDepartName
());
if
(
Common
.
isNotNull
(
domainR
)
&&
Common
.
isNotNull
(
domainR
.
getData
()))
{
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
info
.
setUserDeptName
(
selectVo
.
getDepartName
());
}
info
.
setPreStatus
(
CommonConstants
.
ZERO_STRING
);
// 如果已经存在未派单的派增 这个时候派减 直接标记异常 客服自行判断是否派单
if
(
null
!=
preAddMap
.
get
(
info
.
getEmpIdcard
()))
{
...
...
@@ -1041,10 +1059,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
// 默认社保代理 4
info
.
setEmpTypeAdd
(
CommonConstants
.
FOUR_STRING
);
info
.
setPositionAdd
(
PreDispatchConstants
.
POSITION
);
info
.
setDepartIdAdd
(
selectVo
.
getId
());
info
.
setDepartNameAdd
(
selectVo
.
getDepartName
());
info
.
setUnitIdAdd
(
selectVo
.
getCustomerId
());
info
.
setUnitNameAdd
(
selectVo
.
getCustomerName
());
if
(
Common
.
isNotNull
(
selectVo
))
{
info
.
setDepartIdAdd
(
selectVo
.
getId
());
info
.
setDepartNameAdd
(
selectVo
.
getDepartName
());
info
.
setUnitIdAdd
(
selectVo
.
getCustomerId
());
info
.
setUnitNameAdd
(
selectVo
.
getCustomerName
());
}
// 默认合同名称为代理社保 合同类型为固定期限1
info
.
setContractNameAdd
(
PreDispatchConstants
.
CONTRACT_NAME
);
info
.
setContractTypeAdd
(
CommonConstants
.
ONE_STRING
);
...
...
@@ -1847,7 +1867,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* map数据封装
*
* @param settleDomain
R
* @param settleDomain
List
* @param settleDomainNameMap
* @param customerNameMap
* @param settleIdAndCustomerIdMap
...
...
@@ -1855,13 +1875,10 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
* @Author huyc
* @Date 2022-07-18
**/
private
void
initSettleDomainMaps
(
R
<
List
<
TSettleDomainSelectVo
>>
settleDomainR
,
private
void
initSettleDomainMaps
(
List
<
TSettleDomainSelectVo
>
settleDomainList
,
Map
<
String
,
String
>
settleDomainNameMap
,
Map
<
String
,
String
>
customerNameMap
,
Map
<
String
,
String
>
settleIdAndCustomerIdMap
)
{
List
<
TSettleDomainSelectVo
>
settleDomainList
;
if
(
null
!=
settleDomainR
)
{
settleDomainList
=
settleDomainR
.
getData
();
//map数据封装
if
(
Common
.
isNotNull
(
settleDomainList
))
{
for
(
TSettleDomainSelectVo
settleDomainSelectVo
:
settleDomainList
)
{
...
...
@@ -1872,7 +1889,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
}
}
}
}
/**
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ServiceUtil.java
View file @
ccec5f3d
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
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.time.LocalDateTime
;
import
java.util.Date
;
/**
* 公用方法提取
...
...
@@ -56,4 +58,40 @@ public class ServiceUtil {
}
return
null
;
}
/**
* 抛个异常先
* @Author fxj
* @Date 2020-09-09
* @param errorInfo
* @return
**/
public
static
void
runTimeExceptionDiy
(
String
errorInfo
)
{
throw
new
CheckedException
(
errorInfo
);
}
/**
* 参数2的是否大于等于参数1的
* @Author fxj
* @Date 20200403
* @param socialStartDate
* @param socialPayMonth
* @param reduceDate
* @return
**/
public
static
boolean
checkMothForPaymentImport
(
Date
socialStartDate
,
String
socialPayMonth
,
Date
reduceDate
)
{
if
(
socialStartDate
!=
null
)
{
if
(
null
==
reduceDate
){
if
(
Integer
.
parseInt
(
socialPayMonth
)
>=
Integer
.
parseInt
(
DateUtil
.
dateToString
(
socialStartDate
))){
return
true
;
}
}
else
{
if
(
Integer
.
parseInt
(
socialPayMonth
)
>=
Integer
.
parseInt
(
DateUtil
.
dateToString
(
socialStartDate
))
&&
Integer
.
parseInt
(
socialPayMonth
)
<
Integer
.
parseInt
(
DateUtil
.
dateToString
(
reduceDate
))){
return
true
;
}
}
}
return
false
;
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
ccec5f3d
...
...
@@ -85,7 +85,15 @@
<result
property=
"belongUnitName"
column=
"BELONG_UNIT_NAME"
/>
<result
property=
"dispatchCode"
column=
"DISPATCH_CODE"
/>
<result
property=
"contractSubName"
column=
"CONTRACT_SUB_NAME"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"educationName"
column=
"EDUCATION_NAME"
/>
<result
property=
"tryPeriod"
column=
"TRY_PERIOD"
/>
<result
property=
"idCardProvince"
column=
"ID_CARD_PROVINCE"
/>
<result
property=
"idCardCity"
column=
"ID_CARD_CITY"
/>
<result
property=
"idCardTown"
column=
"ID_CARD_TOWN"
/>
<result
property=
"idCardAddress"
column=
"ID_CARD_ADDRESS"
/>
</resultMap>
...
...
@@ -152,7 +160,13 @@
a.DISPATCH_CODE,
a.SETTLE_DOMAIN_CODE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_ID
a.CONTRACT_ID,
a.EDUCATION_NAME,
a.TRY_PERIOD,
a.ID_CARD_PROVINCE,
a.ID_CARD_CITY,
a.ID_CARD_TOWN,
a.ID_CARD_ADDRESS
</sql>
<sql
id=
"tDispatchInfo_where"
>
<if
test=
"tDispatchInfo != null"
>
...
...
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