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
2ae2b6d9
Commit
2ae2b6d9
authored
Aug 19, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
&& !"".equals(obj)
parent
9ea3d0e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
11 deletions
+37
-11
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+1
-2
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+1
-0
TSalaryEmployeeServiceImpl.java
.../yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
+13
-6
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+19
-3
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+3
-0
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
2ae2b6d9
...
...
@@ -222,8 +222,7 @@ public class TSalaryAccount {
/**
* 年终奖扣税方案0:合并;1:单独
*/
@ExcelAttribute
(
name
=
"年终奖扣税方案0:合并;1:单独"
,
isNotEmpty
=
true
,
errorInfo
=
"年终奖扣税方案0:合并;1:单独不能为空"
,
maxLength
=
1
)
@NotBlank
(
message
=
"年终奖扣税方案0:合并;1:单独不能为空"
)
@ExcelAttribute
(
name
=
"年终奖扣税方案0:合并;1:单独"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"年终奖扣税方案0:合并;1:单独不能超过1个字符"
)
@ExcelProperty
(
"年终奖扣税方案0:合并;1:单独"
)
private
String
annualBonusType
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
2ae2b6d9
...
...
@@ -202,6 +202,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
View file @
2ae2b6d9
...
...
@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
...
@@ -41,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeVo
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -282,15 +284,20 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
TCheckBankNo
checkIdCard
=
new
TCheckBankNo
();
checkIdCard
.
setName
(
employee
.
getEmpName
());
checkIdCard
.
setBankNo
(
employee
.
getBankNo
());
R
<
TCheckBankN
o
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
checkProperties
.
getAppUrl
(),
checkProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
checkIdCard
,
TCheckBankN
o
.
class
,
SecurityConstants
.
FROM_IN
);
R
<
CheckBankNoV
o
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
checkProperties
.
getAppUrl
(),
checkProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
checkIdCard
,
CheckBankNoV
o
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
TCheckBankNo
check
=
checkListR
.
getData
();
if
(!
CommonConstants
.
ONE_STRING
.
equals
(
check
.
getResult
()))
{
return
check
.
getMessage
();
CheckBankNoVo
vo
=
checkListR
.
getData
();
TCheckBankNo
check
=
(
null
==
vo
.
getRes
())
?
null
:
vo
.
getRes
().
getData
();
if
(
Common
.
isEmpty
(
vo
))
{
return
SalaryConstants
.
CHECK_NO_RESPONSE
;
}
else
if
(!
CommonConstants
.
SUCCESS
.
equals
(
vo
.
getRes
().
getCode
()))
{
return
vo
.
getRes
().
getMsg
();
}
else
if
(
check
!=
null
&&
!
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_ONE
))
{
return
check
.
getRemark
();
}
}
else
{
return
"校验服务未找到银行卡,请联系管理员"
;
return
SalaryConstants
.
CHECK_NO_RESPONSE
;
}
}
// 手机号
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
2ae2b6d9
...
...
@@ -125,7 +125,10 @@ public class SalaryAccountUtil implements Serializable {
String
saveNewEmpReturn
;
// 每一行是否有错误 true : 无错误
boolean
errorFlag
;
// 是否含有年终奖 false 没有
boolean
annualBonusFlag
;
for
(
int
i
=
0
;
i
<
rows
;
i
++)
{
annualBonusFlag
=
false
;
error
=
""
;
errorFlag
=
true
;
temp
=
list
.
get
(
i
);
...
...
@@ -140,7 +143,6 @@ public class SalaryAccountUtil implements Serializable {
relaySalary
=
null
;
actualSalarySum
=
null
;
entity
.
setSettlementMonth
(
nowMonth
);
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
0
]);
for
(
Map
.
Entry
<
String
,
TSalaryConfigStandard
>
entry
:
salaryConfigMap
.
entrySet
())
{
cellValueObj
=
getFieldValueByName
(
entry
.
getKey
(),
temp
);
scs
=
entry
.
getValue
();
...
...
@@ -156,8 +158,16 @@ public class SalaryAccountUtil implements Serializable {
if
(
isMustMap
.
get
(
dbFiedName
)
!=
null
&&
Boolean
.
TRUE
.
equals
(
isMustMap
.
get
(
dbFiedName
)))
{
isMustMap
.
put
(
dbFiedName
,
false
);
}
if
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE
.
equals
(
scs
.
getJavaFiedName
())
&&
SalaryConstants
.
ANNUAL_BONUS_ALONE
.
equals
(
cellValueStr
))
{
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
1
]);
if
(
SalaryConstants
.
ANNUAL_BONUS_JAVA
.
equals
(
scs
.
getJavaFiedName
())
&&
Common
.
isNotNull
(
cellValueStr
))
{
annualBonusFlag
=
true
;
}
if
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE
.
equals
(
scs
.
getJavaFiedName
()))
{
if
(
SalaryConstants
.
ANNUAL_BONUS_ALONE
.
equals
(
cellValueStr
))
{
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
1
]);
}
if
(
SalaryConstants
.
ANNUAL_BONUS_MERGE
.
equals
(
cellValueStr
))
{
entity
.
setAnnualBonusType
(
SalaryConstants
.
ANNUAL_BONUS_TAX_TYPE_VALUE
[
0
]);
}
}
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
scs
.
getJavaFiedName
()))
{
try
{
...
...
@@ -282,6 +292,12 @@ public class SalaryAccountUtil implements Serializable {
continue
;
}
if
(
annualBonusFlag
&&
Common
.
isEmpty
(
entity
.
getAnnualBonusType
()))
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:年终奖有值,【年终奖扣税方式】需填写【单独】/【合并】"
;
errorList
.
add
(
new
ErrorMessage
((
i
+
2
),
error
));
continue
;
}
if
(
"3"
.
equals
(
salaryType
)
&&
actualSalarySum
==
null
)
{
errorFlag
=
false
;
error
=
"第"
+
(
i
+
2
)
+
"行:【实发劳务费】列_不可缺少"
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
2ae2b6d9
...
...
@@ -177,6 +177,7 @@ public class SalaryConstants {
public
static
final
String
ANNUAL_BONUS_TAX_TYPE
=
"annualBonusTaxType"
;
// 年终奖扣税方式:单独
public
static
final
String
ANNUAL_BONUS_ALONE
=
"单独"
;
public
static
final
String
ANNUAL_BONUS_MERGE
=
"合并"
;
// 年终奖扣税方式的值:0合并/1单独
public
static
final
String
[]
ANNUAL_BONUS_TAX_TYPE_VALUE
=
{
"0"
,
"1"
};
...
...
@@ -280,4 +281,6 @@ public class SalaryConstants {
public
static
final
String
CONFIG_SALARY_REPEAT
=
"项目薪资配置重复"
;
//项目薪资权限重复
public
static
final
String
DEPT_SEE_REPEAT
=
"项目薪资权限重复"
;
public
static
final
String
CHECK_NO_RESPONSE
=
"校验服务器未返回,请联系管理员!"
;
}
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