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
d0022ad9
Commit
d0022ad9
authored
Aug 19, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
5f8720d8
a7bfb97c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
170 additions
and
137 deletions
+170
-137
application-test.yml
...ck/yifu-check-biz/src/main/resources/application-test.yml
+5
-3
TConfigSalary.java
.../yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
+2
-1
TDeptSee.java
...a/com/yifu/cloud/plus/v1/yifu/salary/entity/TDeptSee.java
+9
-0
TConfigSalaryController.java
...us/v1/yifu/salary/controller/TConfigSalaryController.java
+19
-3
TDeptSeeController.java
...ud/plus/v1/yifu/salary/controller/TDeptSeeController.java
+7
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+74
-114
TConfigSalaryServiceImpl.java
...v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
+1
-1
SalaryConstants.java
.../yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
+4
-0
TConfigSalaryMapper.xml
...ary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
+1
-0
TDeptSeeMapper.xml
...u-salary-biz/src/main/resources/mapper/TDeptSeeMapper.xml
+3
-1
application-dev.yml
...al/yifu-social-biz/src/main/resources/application-dev.yml
+45
-14
No files found.
yifu-check/yifu-check-biz/src/main/resources/application-test.yml
View file @
d0022ad9
...
...
@@ -22,11 +22,13 @@ spring:
username
:
${spring.datasource.username}
password
:
${spring.datasource.password}
pool-name
:
AmytangHikariCP
connection-timeout
:
600000
#最大超时时间
minimum-idle
:
10
# 最小空闲连接数量
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size
:
12
# 连接池最大连接数,默认是10
validation-timeout
:
3000
#此属性控制测试连接是否活跃的最长时间。此值必须小于 connectionTimeout
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)此属性控制允许连接在池中处于空闲状态的最长时间
maximum-pool-size
:
20
# 连接池最大连接数,默认是10
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime
:
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
max-lifetime
:
180000
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security
:
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
View file @
d0022ad9
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -27,7 +28,7 @@ import java.io.Serializable;
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_config_salary"
)
@Tag
(
name
=
"薪资配置-普通薪资配置"
)
public
class
TConfigSalary
extends
Model
<
TConfigSalary
>
implements
Serializable
{
public
class
TConfigSalary
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TDeptSee.java
View file @
d0022ad9
...
...
@@ -56,6 +56,15 @@ public class TDeptSee extends BaseEntity {
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
isNotEmpty
=
true
,
errorInfo
=
"项目名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"项目名称不能为空"
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptNo
;
/**
* 是否可查看工资:0否;1是
*/
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TConfigSalaryController.java
View file @
d0022ad9
...
...
@@ -2,11 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
...
...
@@ -87,7 +90,13 @@ public class TConfigSalaryController {
@Operation
(
description
=
"新增(wxhr:tconfigsalary_add)"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_add')"
)
public
R
save
(
@Valid
@RequestBody
TConfigSalary
tConfigSalary
)
{
public
R
<
Boolean
>
save
(
@Valid
@RequestBody
TConfigSalary
tConfigSalary
)
{
long
res
=
tConfigSalaryService
.
count
(
Wrappers
.<
TConfigSalary
>
query
().
lambda
()
.
eq
(
TConfigSalary:
:
getDepartId
,
tConfigSalary
.
getDepartId
())
.
eq
(
TConfigSalary:
:
getName
,
tConfigSalary
.
getName
()));
if
(
res
>
0
){
return
R
.
failed
(
SalaryConstants
.
CONFIG_SALARY_REPEAT
);
}
return
new
R
<>(
tConfigSalaryService
.
save
(
tConfigSalary
));
}
...
...
@@ -101,7 +110,14 @@ public class TConfigSalaryController {
@SysLog
(
"修改工资报账配置"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_edit')"
)
public
R
update
(
@RequestBody
TConfigSalary
tConfigSalary
)
{
public
R
<
Boolean
>
update
(
@RequestBody
TConfigSalary
tConfigSalary
)
{
long
res
=
tConfigSalaryService
.
count
(
Wrappers
.<
TConfigSalary
>
query
().
lambda
()
.
eq
(
TConfigSalary:
:
getDepartId
,
tConfigSalary
.
getDepartId
())
.
eq
(
TConfigSalary:
:
getName
,
tConfigSalary
.
getName
())
.
ne
(
TConfigSalary:
:
getId
,
tConfigSalary
.
getId
()));
if
(
res
>
0
){
return
R
.
failed
(
SalaryConstants
.
CONFIG_SALARY_REPEAT
);
}
return
new
R
<>(
tConfigSalaryService
.
updateById
(
tConfigSalary
));
}
...
...
@@ -115,7 +131,7 @@ public class TConfigSalaryController {
@SysLog
(
"删除工资报账配置"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_del')"
)
public
R
removeById
(
@PathVariable
String
id
)
{
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
new
R
<>(
tConfigSalaryService
.
removeById
(
id
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TDeptSeeController.java
View file @
d0022ad9
...
...
@@ -18,11 +18,13 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TDeptSee
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TDeptSeeService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TDeptSeeSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -31,6 +33,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.WeakHashMap
;
/**
...
...
@@ -97,6 +100,10 @@ public class TDeptSeeController {
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tdeptsee_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TDeptSee
tDeptSee
)
{
long
res
=
tDeptSeeService
.
count
(
Wrappers
.<
TDeptSee
>
query
().
lambda
().
eq
(
TDeptSee:
:
getId
,
tDeptSee
.
getId
()));
if
(
res
>
0
){
return
R
.
failed
(
SalaryConstants
.
DEPT_SEE_REPEAT
);
}
return
R
.
ok
(
tDeptSeeService
.
save
(
tDeptSee
));
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
d0022ad9
...
...
@@ -128,11 +128,15 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
//薪资导入
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
salaryType
)
&&
Common
.
isNotNull
(
configId
))
{
TConfigSalary
configSalary
=
new
TConfigSalary
();
if
(
Common
.
isNotNull
(
configId
))
{
// 薪资配置-结算月、社保月等信息
TConfigSalary
configSalary
=
configSalaryService
.
getById
(
configId
);
configSalary
=
configSalaryService
.
getById
(
configId
);
}
else
{
configSalary
=
configSalaryService
.
getById
(
CommonConstants
.
ONE_STRING
);
}
try
{
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
...
...
@@ -166,80 +170,33 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
null
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
return
R
.
failed
(
util1
.
getErrorInfo
());
}
else
{
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
// return R.ok(saList)
return
this
.
saveAndSubmit
(
saList
);
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
//劳务费导入
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
TConfigSalary
configSalary
=
new
TConfigSalary
();
// 薪资配置-结算月、社保月等信息
configSalary
=
configSalaryService
.
getById
(
CommonConstants
.
ONE_STRING
);
try
{
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
boolean
isDuplicateName
=
false
;
if
(
empList
!=
null
)
{
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
for
(
TSalaryEmployee
e
:
empList
)
{
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
}
}
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
isDuplicateName
=
true
;
}
}
// 自有员工结算主体id,新员工使用
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
List
<
String
>
checkListY
=
new
ArrayList
<>();
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
if
(
Common
.
isNotNull
(
configSalary
))
{
checkListY
=
tSalaryAccountService
.
getAccountYearCheckMap
(
dept
.
getId
());
}
// 校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
Map
<
String
,
Integer
>
checkMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
configSalary
))
{
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
}
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
!
Common
.
isNotNull
(
configSalary
)
?
null
:
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
null
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
invoiceTitle
,
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
return
R
.
failed
(
util1
.
getErrorInfo
());
}
else
{
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
// return R.ok(saList)
//薪资导入
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
salaryType
))
{
return
this
.
saveAndSubmit
(
saList
);
}
//劳务费导入
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
return
this
.
saveLaborSubmit
(
saList
,
dept
);
}
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
...
...
@@ -248,7 +205,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
}
return
R
.
failed
(
"导入数据不可为空"
);
}
...
...
@@ -825,7 +782,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
...
...
@@ -1529,7 +1486,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryLock
lockUpdate
;
try
{
// 薪资核心导入代码
return
this
.
doLaborCoreSalary
(
savList
,
saiList
,
sai
,
dept
,
invoiceTitle
,
salary
);
return
this
.
doLaborCoreSalary
(
savList
,
saiList
,
sai
,
dept
,
invoiceTitle
,
salary
,
user
);
}
catch
(
Exception
e
)
{
lockUpdate
=
new
TSalaryLock
();
lockUpdate
.
setId
(
lock
.
getId
());
...
...
@@ -1560,7 +1517,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public
R
doLaborCoreSalary
(
List
<
TSalaryAccountVo
>
savList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
TSalaryStandard
salary
)
{
TSettleDomainSelectVo
dept
,
String
invoiceTitle
,
TSalaryStandard
salary
,
YifuUser
user
)
{
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
BigDecimal
money
=
new
BigDecimal
(
CommonConstants
.
ZERO_STRING
);
//初始化金额备用
...
...
@@ -1642,7 +1599,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationLabor
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
a
.
setSaiList
(
saiList
);
aList
.
add
(
a
);
...
...
@@ -1659,7 +1616,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
...
...
@@ -1673,6 +1630,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//保存工资表
tSalaryStandardService
.
save
(
salary
);
// 获取上一个工资条顺序,复制:
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
salaryDetailVo
.
setSalary
(
salary
);
for
(
TSalaryAccount
account
:
aList
)
{
...
...
@@ -1733,10 +1693,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
nowTaxY
=
getNowTax
(
actualSalarySum
);
relaySalary
=
BigDecimalUtils
.
safeAdd
(
actualSalarySumNow
,
nowTaxT
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
salaryTax
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
BigDecimalUtils
.
safeAdd
(
nowTaxT
,
sumTax
));
BigDecimal
salaryTax
=
BigDecimalUtils
.
safeSubtract
(
nowTaxY
,
BigDecimalUtils
.
safeAdd
(
nowTaxT
,
sumTax
));
a
.
setSalaryTax
(
salaryTax
);
a
.
setSalaryTaxUnit
(
nowTaxT
);
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
}
else
{
nowTaxY
=
getNowTax
(
actualSalarySum
);
if
(
sumTax
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
...
...
@@ -1757,7 +1717,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
nowTaxT
;
}
public
static
BigDecimal
getNowTax
(
BigDecimal
actualSalarySum
)
{
public
static
BigDecimal
getNowTax
(
BigDecimal
actualSalarySum
)
{
BigDecimal
nowTax
;
// 2022-3-3 11:24:20 运营中心郭华照提供的公式:
// ROUND(IF(B7<=800,0,IF(B7<=3360,(B7-800)/4,IF(B7<=21000,0.16*B7/0.84,IF(B7<=49500,(0.24*B7-2000)/0.76,(0.32*B7-7000)/0.68)))),2)
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TConfigSalaryServiceImpl.java
View file @
d0022ad9
...
...
@@ -47,7 +47,7 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
}
vo
=
domainListVoR
.
getData
();
if
(
Common
.
isEmpty
(
vo
)
||
!
Common
.
isNotEmpty
(
vo
.
getDeptIds
()))
{
throw
new
RuntimeException
(
"
未获取到相关结算信息
"
);
throw
new
RuntimeException
(
"
无项目权限
"
);
}
}
if
(
Common
.
isEmpty
(
vo
)){
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryConstants.java
View file @
d0022ad9
...
...
@@ -276,4 +276,8 @@ public class SalaryConstants {
//派单限制统计表更新类型(0认领更新/1撤销认领更新/2匹配更新/3取消匹配更新)
public
static
final
Integer
[]
DISPATCH_UPDTYPE
=
{
0
,
1
,
2
,
3
};
//项目薪资配置重复
public
static
final
String
CONFIG_SALARY_REPEAT
=
"项目薪资配置重复"
;
//项目薪资权限重复
public
static
final
String
DEPT_SEE_REPEAT
=
"项目薪资权限重复"
;
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
View file @
d0022ad9
...
...
@@ -76,6 +76,7 @@
</foreach>
</if>
</where>
order by CREATE_TIME DESC
</select>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TDeptSeeMapper.xml
View file @
d0022ad9
...
...
@@ -32,6 +32,7 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -41,7 +42,8 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
a.UPDATE_TIME,
a.DEPT_NO
</sql>
<sql
id=
"tDeptSee_where"
>
<if
test=
"tDeptSee != null"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
View file @
d0022ad9
spring
:
shardingsphere
:
datasource
:
ds0
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://192.168.1.65:22306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username
:
root
password
:
yf_zsk
hikari
:
driver-class-name
:
${spring.datasource.driver-class-name}
jdbc-url
:
${spring.datasource.url}
username
:
${spring.datasource.username}
password
:
${spring.datasource.password}
pool-name
:
AmytangHikariCP
minimum-idle
:
10
# 最小空闲连接数量
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size
:
12
# 连接池最大连接数,默认是10
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime
:
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
names
:
ds0
rules
:
sharding
:
key-generators
:
snowflake
:
type
:
SNOWFLAKE
sharding-algorithms
:
t-payment-inline
:
props
:
strategy
:
standard
algorithmClassName
:
com.yifu.cloud.plus.v1.yifu.social.config.OTAStrategyShardingAlgorithm
type
:
CLASS_BASED
tables
:
t_payment_info
:
actual-data-nodes
:
ds0.t_payment_info_20$->{17..22}
key-generate-strategy
:
column
:
ID
key-generator-name
:
snowflake
table-strategy
:
standard
:
sharding-column
:
CREATE_TIME
sharding-algorithm-name
:
t-payment-inline
mvc
:
pathmatch
:
matching-strategy
:
ant_path_matcher
...
...
@@ -6,17 +48,6 @@ spring:
activate
:
on-profile
:
dev
redis
:
host
:
1
27.0.0.1
port
:
6
379
host
:
1
92.168.1.65
port
:
22
379
password
:
'
@yf_2017'
\ No newline at end of file
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
username
:
root
password
:
yf_zsk
url
:
jdbc:mysql://192.168.1.65:22306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=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