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
9798cb7e
Commit
9798cb7e
authored
Jun 06, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
6c513b63
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
26 deletions
+42
-26
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+11
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+22
-10
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+9
-16
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
9798cb7e
...
...
@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
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
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialImportHandleVo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -750,4 +751,14 @@ public class TDispatchInfo extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
noCreateUser
;
@TableField
(
exist
=
false
)
private
SocialImportHandleVo
excel
;
@TableField
(
exist
=
false
)
private
String
handlerRemaek
;
@TableField
(
exist
=
false
)
private
String
socialFailureType
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
9798cb7e
...
...
@@ -5288,6 +5288,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
String
handlerRemaek
;
List
<
TDispatchInfo
>
failueList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
StringBuilder
socialSucessType
=
new
StringBuilder
();
StringBuilder
socialFailureType
=
new
StringBuilder
();
...
...
@@ -5375,27 +5376,38 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
errorMessageList
.
add
(
errorMessage
);
}
//办理失败处理
if
(
socialFailureType
.
length
()
>
1
)
{
if
(!
CommonConstants
.
TWO_STRING
.
equals
(
dispatch
.
getStatus
()))
{
continue
;
}
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatch
.
getId
()),
CommonConstants
.
ZERO_STRING
,
user
,
1
,
CommonConstants
.
TWO_STRING
,
handlerRemaek
+
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()),
socialFailureType
.
substring
(
0
,
socialFailureType
.
length
()
-
1
),
handlerRemaek
+
ServiceUtil
.
ifNullToEmpty
(
excel
.
getRemark
()));
if
(
Common
.
isNotNull
(
messageList
))
{
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
excel
);
}
else
{
errorMessage
=
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
,
excel
);
}
errorMessageList
.
add
(
errorMessage
);
dispatch
.
setHandlerRemaek
(
handlerRemaek
);
dispatch
.
setSocialFailureType
(
socialFailureType
.
toString
());
dispatch
.
setExcel
(
excel
);
failueList
.
add
(
dispatch
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"批量导入办理异常:"
,
e
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_FAILED
,
excel
));
}
}
if
(!
Common
.
isEmpty
(
failueList
))
{
SocialImportHandleVo
vo
;
for
(
TDispatchInfo
dispatchInfo
:
failueList
)
{
vo
=
dispatchInfo
.
getExcel
();
// 执行数据插入操作 组装
messageList
=
addBatchApplyHandle
(
Collections
.
singletonList
(
dispatchInfo
.
getId
()),
CommonConstants
.
ZERO_STRING
,
user
,
1
,
CommonConstants
.
TWO_STRING
,
dispatchInfo
.
getHandlerRemaek
()
+
ServiceUtil
.
ifNullToEmpty
(
vo
.
getRemark
()),
dispatchInfo
.
getSocialFailureType
().
substring
(
0
,
dispatchInfo
.
getSocialFailureType
().
length
()
-
1
),
dispatchInfo
.
getHandlerRemaek
()
+
ServiceUtil
.
ifNullToEmpty
(
vo
.
getRemark
()));
if
(
Common
.
isNotNull
(
messageList
))
{
errorMessage
=
messageList
.
get
(
CommonConstants
.
ZERO_INT
);
errorMessage
.
setData
(
vo
);
}
else
{
errorMessage
=
new
ErrorMessage
(
vo
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
,
vo
);
}
errorMessageList
.
add
(
errorMessage
);
}
}
}
@Override
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
9798cb7e
...
...
@@ -1864,10 +1864,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//先删除然后重新生成
boolean
isSaveAndUpdate
=
false
;
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
...
...
@@ -1908,18 +1906,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
log
.
error
(
"更新一条预估耗时:"
+
times
+
"毫秒"
);
isSaveAndUpdate
=
true
;
}
else
{
synchronized
(
this
)
{
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
()
,
library
.
getProvidentPayMonth
(),
library
.
getProvidentCreateMonth
());
library
.
setCreateBy
(
userId
);
library
.
setCreateName
(
userName
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
isSaveAndUpdate
=
true
;
}
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitSocialSum
()))
!=
CommonConstants
.
ZERO_INT
||
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
library
.
getUnitFundSum
()))
!=
CommonConstants
.
ZERO_INT
)
{
library
.
setCreateBy
(
userId
);
library
.
setCreateName
(
userName
);
library
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
library
);
isSaveAndUpdate
=
true
;
}
}
}
...
...
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