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
f740cb35
Commit
f740cb35
authored
May 30, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4
parents
d1b9172b
e0aaea28
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
23 deletions
+54
-23
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+8
-4
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+4
-0
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+4
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
FundImportHandleVo.java
...yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
+1
-8
SocialImportHandleVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialImportHandleVo.java
+2
-1
TForecastLibraryMapper.java
...ud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
+2
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+25
-4
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+5
-4
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+2
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
f740cb35
...
...
@@ -296,7 +296,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 初始化
tEmployeeContractInfo
.
setUpdateBy
(
user
.
getId
());
tEmployeeContractInfo
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeContractInfo
.
getContractType
()))
{
tEmployeeContractInfo
.
setContractEnd
(
null
);
}
//是否归档:否
tEmployeeContractInfo
.
setIsFile
(
CommonConstants
.
ONE_STRING
);
//是否在用:否
...
...
@@ -1148,7 +1151,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorInfo
.
append
(
"该员工已存在相同起始日期的合同,禁止重复添加!"
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始日期的合同,禁止重复添加!"
));
return
;
}
}
...
...
@@ -1165,8 +1169,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
contractInfo
!=
null
)
{
errorInfo
.
append
(
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
)
;
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"该员工已存在相同起始和截止日期的合同,禁止重复添加"
));
return
;
}
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
f740cb35
...
...
@@ -155,4 +155,8 @@ public class ExcelAttributeConstants {
public
static
final
String
HOUSEHOLD
=
"household"
;
// 派单办理失败类型
public
static
final
String
DISPATCH_HANDLE_REASON
=
"dispatch-audit-add-reason"
;
// 社保办理失败类型
public
static
final
String
SOCIAL_DISPATCH_HANDLE_REASON
=
"social-conduct-add-reason"
;
// 公积金办理失败类型
public
static
final
String
FUND_DISPATCH_HANDLE_REASON
=
"fund-conduct-add-reason"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
f740cb35
...
...
@@ -567,4 +567,8 @@ public interface ErrorCodes {
* 社保办理:无办理权限或无可需要办理的社保数据
*/
String
SOCIAL_IMPORT_HANDLE_NOT_EXITS
=
"social.import.handle.not.exits"
;
/**
* 社保办理:该数据已处理,请勿重复操作
*/
String
SOCIAL_IMPORT_SAME_INFO
=
"social.import.same.info"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
f740cb35
...
...
@@ -221,6 +221,7 @@ fund_import_handle_reason_not_empty=\u516C\u79EF\u91D1\u529E\u7406\uFF1A\u529E\u
social_import_handle_reason_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u
FF1A
\u
4EFB
\u
4E00
\u9669\u
79CD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u5931\u
8D25
\u
7C7B
\u
578B
\u
5FC5
\u
586B
social_import_handle_not_empty
=
\u
793E
\u
4FDD
\u
529E
\u7406\u5931\u
8D25
\u
FF0C
\u
5FC5
\u
987B
\u
529E
\u7406\u5176\u
4E2D
\u
4E00
\u
4E2A
\u9669\u
79CD
social.import.handle.not.exits
=
\u
65E0
\u
529E
\u7406\u6743\u9650\u6216\u
65E0
\u
53EF
\u9700\u8981\u
529E
\u7406\u7684\u
793E
\u
4FDD
\u6570\u
636E
social.import.same.info
=
\u
8BE5
\u6570\u
636E
\u
5DF2
\u5904\u7406\u
FF0C
\u
8BF7
\u
52FF
\u
91CD
\u
590D
\u
64CD
\u
4F5C
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FundImportHandleVo.java
View file @
f740cb35
...
...
@@ -16,21 +16,14 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
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.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 派单信息记录表
...
...
@@ -72,7 +65,7 @@ public class FundImportHandleVo extends RowIndex implements Serializable {
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
DISPATCH_HANDLE_REASON
)
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
FUND_
DISPATCH_HANDLE_REASON
)
@Schema
(
description
=
"失败类型"
)
@ExcelProperty
(
"失败类型"
)
private
String
reasonType
;
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialImportHandleVo.java
View file @
f740cb35
...
...
@@ -18,6 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
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.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -108,7 +109,7 @@ public class SocialImportHandleVo extends RowIndex implements Serializable {
/**
* 失败类型
*/
@ExcelAttribute
(
name
=
"失败类型"
)
@ExcelAttribute
(
name
=
"失败类型"
,
isDataId
=
true
,
isConvert
=
false
,
dataType
=
ExcelAttributeConstants
.
SOCIAL_DISPATCH_HANDLE_REASON
)
@Schema
(
description
=
"失败类型"
)
@ExcelProperty
(
"失败类型"
)
private
String
reasonType
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TForecastLibraryMapper.java
View file @
f740cb35
...
...
@@ -69,7 +69,8 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
int
updateForecastFundStatusByIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"status"
)
String
status
);
int
deleteForecastSocial
(
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"socialPayMonth"
)
String
socialPayMonth
,
@Param
(
"socialCreateMonth"
)
String
socialCreateMonth
);
int
deleteForecastSocial
(
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"socialPayMonth"
)
String
socialPayMonth
,
@Param
(
"socialCreateMonth"
)
String
socialCreateMonth
,
@Param
(
"fundPayMonth"
)
String
fundPayMonth
,
@Param
(
"fundCreateMonth"
)
String
fundCreateMonth
);
void
updateForSocialAndFound
(
@Param
(
"infoVo"
)
UpdateSocialFoundVo
infoVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
f740cb35
...
...
@@ -78,6 +78,7 @@ import java.math.BigDecimal;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -5029,6 +5030,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
FundImportHandleVo
>
util1
=
new
ExcelUtil
<>(
FundImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5073,7 +5075,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
);
fundImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
tDispatchInfo
,
map
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5091,7 +5093,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
)
{
public
void
fundImportHandle
(
List
<
FundImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
TDispatchInfo
dispatchInfo
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5127,6 +5130,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
CommonConstants
.
PARAM_INFO_ERROR
),
excel
));
continue
;
}
//表内数据重复 员工身份证
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
// 办理失败,原因必填
if
(
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getReasonType
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
FUND_IMPORT_HANDLE_REASON_NOT_EMPY
),
excel
));
...
...
@@ -5185,6 +5195,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
SocialImportHandleVo
>
util1
=
new
ExcelUtil
<>(
SocialImportHandleVo
.
class
);
ConcurrentHashMap
<
String
,
String
>
idcardMap
=
new
ConcurrentHashMap
<>();
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
@@ -5229,7 +5240,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
*/
private
void
saveData
()
{
log
.
info
(
"{}条数据,开始存储数据库!"
,
cachedDataList
.
size
());
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
mId
);
socialImportHandle
(
cachedDataList
,
errorMessageList
,
user
,
mId
,
idcardMap
);
log
.
info
(
"存储数据库成功!"
);
}
}).
sheet
().
doRead
();
...
...
@@ -5247,7 +5258,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Param
* @return
**/
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
mId
)
{
public
void
socialImportHandle
(
List
<
SocialImportHandleVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
YifuUser
user
,
String
mId
,
ConcurrentHashMap
<
String
,
String
>
map
)
{
if
(!
Common
.
isNotNull
(
excelVOList
))
{
return
;
}
...
...
@@ -5273,10 +5285,19 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
List
<
ErrorMessage
>
messageList
;
String
handlerRemaek
;
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
StringBuilder
socialSucessType
=
new
StringBuilder
();
StringBuilder
socialFailureType
=
new
StringBuilder
();
excel
=
excelVOList
.
get
(
i
);
//表内数据重复 员工身份证
if
(
null
==
map
.
get
(
excel
.
getEmpIdcard
()))
{
map
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getRowIndex
().
toString
());
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
SOCIAL_IMPORT_SAME_INFO
)
,
excel
));
continue
;
}
//身份证加任一险种必填
if
(
Common
.
isEmpty
(
excel
.
getDbHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getGsHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getSjHandleStatus
())
&&
Common
.
isEmpty
(
excel
.
getSyHandleStatus
())
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
f740cb35
...
...
@@ -1868,9 +1868,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
}
}
// 新基数,老比例,存放Map
HashMap
<
String
,
TForecastLibrary
>
socialHistoryMap
=
new
HashMap
<>();
...
...
@@ -1912,7 +1912,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitSocialSum
()))
!=
CommonConstants
.
ZERO_INT
||
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitFundSum
()))
!=
CommonConstants
.
ZERO_INT
)
{
//判断是否有重复数据有则删除
baseMapper
.
deleteForecastSocial
(
library
.
getEmpIdcard
(),
library
.
getSocialPayMonth
(),
library
.
getSocialCreateMonth
());
baseMapper
.
deleteForecastSocial
(
library
.
getEmpIdcard
(),
library
.
getSocialPayMonth
(),
library
.
getSocialCreateMonth
()
,
library
.
getProvidentPayMonth
(),
library
.
getProvidentCreateMonth
());
library
.
setCreateBy
(
userId
);
library
.
setCreateName
(
userName
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
f740cb35
...
...
@@ -679,7 +679,8 @@
</update>
<delete
id=
"deleteForecastSocial"
>
delete from t_forecast_library where SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth}
delete from t_forecast_library where (SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth})
or (PROVIDENT_PAY_MONTH = #{fundPayMonth} and PROVIDENT_CREATE_MONTH = #{fundCreateMonth})
and EMP_IDCARD = #{idCard} and DATA_PUSH = 0
</delete>
...
...
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