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
1863ccc3
Commit
1863ccc3
authored
Aug 11, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
0b397ac1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
38 deletions
+91
-38
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+2
-2
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+12
-12
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+77
-24
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
1863ccc3
...
...
@@ -588,10 +588,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//档案柜存在就自动归档
if
(
Common
.
isNotNull
(
tEmployeeContractInfo
.
getAttaList
()))
{
this
.
updateFileMainId
(
tEmployeeContractInfo
);
this
.
setFileInfo
(
tEmployeeContractInfo
.
getId
(),
"
添加附件
"
);
this
.
setFileInfo
(
tEmployeeContractInfo
.
getId
(),
""
);
tEmployeeContractInfo
.
setIsFile
(
CommonConstants
.
ZERO_STRING
);
}
else
{
this
.
setFileInfo
(
tEmployeeContractInfo
.
getId
(),
"
清空附件
"
);
this
.
setFileInfo
(
tEmployeeContractInfo
.
getId
(),
""
);
tEmployeeContractInfo
.
setIsFile
(
CommonConstants
.
ONE_STRING
);
}
this
.
updateById
(
tEmployeeContractInfo
);
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
1863ccc3
...
...
@@ -210,27 +210,27 @@ public class SalaryAccountUtil implements Serializable {
}
field
=
fieldsMap
.
get
(
scs
.
getJavaFiedName
());
if
(
field
==
null
)
{
sai
=
new
TSalaryAccountItemVo
();
sai
.
setCnName
(
dbFiedName
);
sai
.
setJavaFiedName
(
scs
.
getJavaFiedName
());
if
(
scs
.
getIsTax
()
!=
null
)
{
sai
.
setIsTax
(
scs
.
getIsTax
());
}
else
{
sai
.
setIsTax
(
CommonConstants
.
ZERO_INT
);
}
try
{
cellValueBig
=
new
BigDecimal
(
cellValueStr
);
cellValueBig
=
cellValueBig
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//四舍五入
if
(
cellValueBig
.
toString
().
length
()
>
11
)
{
error
=
"第"
+
(
i
+
2
)
+
"行金额太大了,请检查一下:"
+
cellValueBig
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
break
;
}
sai
=
new
TSalaryAccountItemVo
();
sai
.
setCnName
(
dbFiedName
);
sai
.
setJavaFiedName
(
scs
.
getJavaFiedName
());
sai
.
setSalaryMoney
(
cellValueBig
);
if
(
scs
.
getIsTax
()
!=
null
)
{
sai
.
setIsTax
(
scs
.
getIsTax
());
sai
.
setTextValue
(
cellValueBig
.
toString
());
}
else
{
sai
.
set
IsTax
(
CommonConstants
.
ZERO_INT
);
sai
.
set
SalaryMoney
(
cellValueBig
);
}
saiList
.
add
(
sai
);
}
catch
(
NumberFormatException
e
)
{
sai
.
setTextValue
(
cellValueStr
);
//非数字,不保存
}
saiList
.
add
(
sai
);
}
else
{
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
error
=
validateUtil
(
cellValueStr
,
attr
,
(
i
+
2
));
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
1863ccc3
...
...
@@ -1468,7 +1468,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
sysBaseSetInfoMapper
.
updateById
(
sysBaseSetInfo
);
}
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoMap
.
values
())
{
this
.
updateForecastLibaryCore
(
socialFundInfo
,
socialFundInfo
.
getDoMonth
(),
true
);
this
.
updateForecastLibaryCore
(
socialFundInfo
,
socialFundInfo
.
getDoMonth
(),
true
,
false
);
socialFundInfoMapper
.
updateById
(
socialFundInfo
);
}
}
...
...
@@ -1483,7 +1483,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
@Override
public
R
<
String
>
updateToneForecastLibary
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
doMonth
,
false
);
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
doMonth
,
false
,
false
);
}
/**
...
...
@@ -1495,7 +1495,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
**/
@Override
public
R
<
String
>
updateForecastLibaryByDispatch
(
TSocialFundInfo
socialFundInfo
)
{
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
null
,
false
);
return
this
.
updateForecastLibaryCore
(
socialFundInfo
,
null
,
false
,
true
);
}
/**
...
...
@@ -1615,6 +1615,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
/**
* @param isDispatch 是否是派单,是:区分社保数据与公积金数据
* @param isOnly 是否仅更新传过来的社保公积金,true:是(同时,true时,是户调基,要判断断缴)
* @param socialFundInfo
* @Description: 根据社保公积金信息表更新预估库
...
...
@@ -1622,7 +1623,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @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
doMonth
,
boolean
isOnly
)
{
private
R
<
String
>
updateForecastLibaryCore
(
TSocialFundInfo
socialFundInfo
,
String
doMonth
,
boolean
isOnly
,
boolean
isDispatch
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
librarySocialList
=
null
;
...
...
@@ -1670,26 +1671,78 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
//查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成
if
(
Common
.
isNotNull
(
empIdCard
))
{
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryFundListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
if
(
isDispatch
)
{
if
(
socialFundInfo
.
getSocialStartDate
()
!=
null
)
{
payMonthList
=
new
ArrayList
<>();
// 获取最小的起缴月
Date
minStartDate
=
this
.
getMinSocialDate
(
socialFundInfo
);
// 再计算月份
monthDiff
=
DateUtil
.
getMonthDiff
(
minStartDate
,
new
Date
())
+
2
;
if
(
monthDiff
<=
0
)
{
return
R
.
failed
(
"派单同步预估库,社保起缴月份无法生成,monthDiff="
+
monthDiff
);
}
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
payMonthList
.
add
(
DateUtil
.
addMonth
(
1
-
i
));
}
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
}
}
else
{
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
}
if
(
isDispatch
)
{
if
(
socialFundInfo
.
getProvidentStart
()
!=
null
)
{
payMonthList
=
new
ArrayList
<>();
// 获取最小的起缴月
Date
minStartDate
=
socialFundInfo
.
getProvidentStart
();
// 再计算月份
monthDiff
=
DateUtil
.
getMonthDiff
(
minStartDate
,
new
Date
())
+
2
;
if
(
monthDiff
<=
0
)
{
return
R
.
failed
(
"派单同步预估库,公积金起缴月份无法生成,monthDiff="
+
monthDiff
);
}
for
(
int
i
=
0
;
i
<
monthDiff
;
i
++)
{
payMonthList
.
add
(
DateUtil
.
addMonth
(
1
-
i
));
}
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryFundListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
}
}
else
{
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryFundListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
}
if
(
isOnly
)
{
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
()))
{
socialInfoList
=
new
ArrayList
<>();
...
...
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