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
Hide 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:
...
@@ -22,11 +22,13 @@ spring:
username
:
${spring.datasource.username}
username
:
${spring.datasource.username}
password
:
${spring.datasource.password}
password
:
${spring.datasource.password}
pool-name
:
AmytangHikariCP
pool-name
:
AmytangHikariCP
connection-timeout
:
600000
#最大超时时间
minimum-idle
:
10
# 最小空闲连接数量
minimum-idle
:
10
# 最小空闲连接数量
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)
validation-timeout
:
3000
#此属性控制测试连接是否活跃的最长时间。此值必须小于 connectionTimeout
maximum-pool-size
:
12
# 连接池最大连接数,默认是10
idle-timeout
:
60000
# 空闲连接存活最大时间,默认600000(10分钟)此属性控制允许连接在池中处于空闲状态的最长时间
maximum-pool-size
:
20
# 连接池最大连接数,默认是10
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
auto-commit
:
true
#此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime
:
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
max-lifetime
:
180000
0
#此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
## spring security 配置
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;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
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.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.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -27,7 +28,7 @@ import java.io.Serializable;
...
@@ -27,7 +28,7 @@ import java.io.Serializable;
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_config_salary"
)
@TableName
(
"t_config_salary"
)
@Tag
(
name
=
"薪资配置-普通薪资配置"
)
@Tag
(
name
=
"薪资配置-普通薪资配置"
)
public
class
TConfigSalary
extends
Model
<
TConfigSalary
>
implements
Serializable
{
public
class
TConfigSalary
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
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 {
...
@@ -56,6 +56,15 @@ public class TDeptSee extends BaseEntity {
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptName
;
private
String
deptName
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
isNotEmpty
=
true
,
errorInfo
=
"项目名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"项目名称不能为空"
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
private
String
deptNo
;
/**
/**
* 是否可查看工资:0否;1是
* 是否可查看工资: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;
...
@@ -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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
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.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
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.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -87,7 +90,13 @@ public class TConfigSalaryController {
...
@@ -87,7 +90,13 @@ public class TConfigSalaryController {
@Operation
(
description
=
"新增(wxhr:tconfigsalary_add)"
)
@Operation
(
description
=
"新增(wxhr:tconfigsalary_add)"
)
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_add')"
)
@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
));
return
new
R
<>(
tConfigSalaryService
.
save
(
tConfigSalary
));
}
}
...
@@ -101,7 +110,14 @@ public class TConfigSalaryController {
...
@@ -101,7 +110,14 @@ public class TConfigSalaryController {
@SysLog
(
"修改工资报账配置"
)
@SysLog
(
"修改工资报账配置"
)
@PutMapping
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_edit')"
)
@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
));
return
new
R
<>(
tConfigSalaryService
.
updateById
(
tConfigSalary
));
}
}
...
@@ -115,7 +131,7 @@ public class TConfigSalaryController {
...
@@ -115,7 +131,7 @@ public class TConfigSalaryController {
@SysLog
(
"删除工资报账配置"
)
@SysLog
(
"删除工资报账配置"
)
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:tconfigsalary_del')"
)
@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
));
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 @@
...
@@ -18,11 +18,13 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
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.entity.TDeptSee
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TDeptSeeService
;
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
com.yifu.cloud.plus.v1.yifu.salary.vo.TDeptSeeSearchVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -31,6 +33,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
...
@@ -31,6 +33,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.List
;
import
java.util.WeakHashMap
;
/**
/**
...
@@ -97,6 +100,10 @@ public class TDeptSeeController {
...
@@ -97,6 +100,10 @@ public class TDeptSeeController {
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tdeptsee_add')"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tdeptsee_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TDeptSee
tDeptSee
)
{
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
));
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
...
@@ -86,7 +86,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -86,7 +86,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/**
/**
* @param jsonString 客户原表数据
* @param jsonString 客户原表数据
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
*
repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @Description: 普通工资上传
* @Description: 普通工资上传
* @Author: hgw
* @Author: hgw
* @Date: 2019/9/4 15:58
* @Date: 2019/9/4 15:58
...
@@ -128,127 +128,84 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -128,127 +128,84 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if
(
null
==
user
||
null
==
user
.
getId
())
{
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
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
);
try
{
}
else
{
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
configSalary
=
configSalaryService
.
getById
(
CommonConstants
.
ONE_STRING
);
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
}
try
{
TSalaryEmployee
empSearch
=
new
TSalaryEmployee
();
jsonString
=
URLDecoder
.
decode
(
jsonString
,
"UTF-8"
).
replace
(
"="
,
""
);
empSearch
.
setUnitId
(
dept
.
getCustomerId
());
SalaryAccountUtil
util1
=
new
SalaryAccountUtil
();
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
TSalaryEmployee
empSearch
=
new
TSalaryEmployee
();
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
empSearch
.
setUnitId
(
dept
.
getCustomerId
());
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
List
<
TSalaryEmployee
>
empList
=
employeeService
.
list
(
Wrappers
.<
TSalaryEmployee
>
query
().
lambda
()
boolean
isDuplicateName
=
false
;
.
eq
(
TSalaryEmployee:
:
getUnitId
,
dept
.
getCustomerId
()));
if
(
empList
!=
null
)
{
Map
<
String
,
TSalaryEmployee
>
empIdCardMap
=
new
HashMap
<>();
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
Map
<
String
,
TSalaryEmployee
>
empNameMap
=
new
HashMap
<>();
for
(
TSalaryEmployee
e
:
empList
)
{
boolean
isDuplicateName
=
false
;
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
if
(
empList
!=
null
)
{
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
TSalaryEmployee
es
;
//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
for
(
TSalaryEmployee
e
:
empList
)
{
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
es
=
empIdCardMap
.
get
(
e
.
getEmpIdcard
());
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
if
(
es
==
null
||
CommonConstants
.
ZERO_INT
!=
es
.
getFileStatus
()
||
Common
.
isEmpty
(
es
.
getBankName
())
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
||
(
e
.
getDeptId
().
equals
(
settleDepart
)
&&
CommonConstants
.
ZERO_INT
==
e
.
getFileStatus
()
}
&&
Common
.
isNotNull
(
e
.
getBankName
())))
{
}
empIdCardMap
.
put
(
e
.
getEmpIdcard
(),
e
);
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
empNameMap
.
put
(
e
.
getEmpName
().
replace
(
" "
,
""
),
e
);
isDuplicateName
=
true
;
}
}
}
}
// 自有员工结算主体id,新员工使用
if
(
empNameMap
.
size
()
==
empIdCardMap
.
size
())
{
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
isDuplicateName
=
true
;
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
// 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
(
"数据导入解析失败!"
);
}
}
//劳务费导入
// 自有员工结算主体id,新员工使用
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
Map
<
String
,
Integer
>
ownDeptMap
=
tOwnDeptService
.
getOwnDeptMap
();
// 自有员工所在结算主体Map
Map
<
String
,
Integer
>
ownEmployeeMap
=
tOwnDeptService
.
getOwnEmpMap
();
TConfigSalary
configSalary
=
new
TConfigSalary
();
// 2.6.6:校验导入数据重复的Map格式:#身份证号_工资月份_报表类型_应发金额
// 薪资配置-结算月、社保月等信息
Map
<
String
,
Integer
>
checkMap
=
tSalaryAccountService
.
getAccountCheckMap
(
dept
.
getId
(),
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
()));
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
();
List
<
String
>
checkListY
=
new
ArrayList
<>();
if
(
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
))
{
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
// 薪资类型互斥校验Map格式:本年度#身份证号_报表类型
List
<
String
>
checkListY
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
configSalary
))
{
if
(
Common
.
isNotNull
(
configSalary
))
{
checkListY
=
tSalaryAccountService
.
getAccountYearCheckMap
(
dept
.
getId
());
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
);
List
<
TSalaryAccountVo
>
saList
=
util1
.
getEntityList
();
if
((
null
!=
util1
.
getErrorInfo
()
&&
!
util1
.
getErrorInfo
().
isEmpty
()))
{
util1
.
getJsonStringToList
(
user
,
jsonString
,
dept
,
configSalary
,
salaryConfigMap
,
isMustMap
,
return
R
.
failed
(
util1
.
getErrorInfo
());
empIdCardMap
,
empNameMap
,
isDuplicateName
,
salaryType
,
checkListY
,
invoiceTitle
,
}
else
{
employeeService
,
checkMap
,
ownEmployeeMap
,
ownDeptMap
,
tSalaryAccountService
);
if
(
null
!=
saList
&&
!
saList
.
isEmpty
())
{
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
);
return
this
.
saveLaborSubmit
(
saList
,
dept
);
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
}
}
else
{
return
R
.
failed
(
"导入数据不可为空"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
R
.
failed
(
"数据导入解析失败!"
);
}
}
}
}
return
R
.
failed
(
"导入数据不可为空"
);
return
R
.
failed
(
"导入数据不可为空"
);
}
}
...
@@ -825,7 +782,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -825,7 +782,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
}
...
@@ -1104,7 +1061,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1104,7 +1061,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
BigDecimal
money
=
SalaryConstants
.
B_ZERO
;
BigDecimal
money
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sub
=
SalaryConstants
.
B_ZERO
;
BigDecimal
sub
=
SalaryConstants
.
B_ZERO
;
if
(
isSocial
&&
deptSet
.
getUnitSeriousIllnessProp
()
!=
null
if
(
isSocial
&&
deptSet
.
getUnitSeriousIllnessProp
()
!=
null
&&
deptSet
.
getUnitSeriousIllnessProp
().
compareTo
(
SalaryConstants
.
B_ONEHUNDRED
)
==
SalaryConstants
.
LESS_THAN
)
{
&&
deptSet
.
getUnitSeriousIllnessProp
().
compareTo
(
SalaryConstants
.
B_ONEHUNDRED
)
==
SalaryConstants
.
LESS_THAN
)
{
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
sub
=
(
new
BigDecimal
(
"100"
).
subtract
(
deptSet
.
getUnitSeriousIllnessProp
()))
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
.
divide
(
SalaryConstants
.
B_ONEHUNDRED
,
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
}
}
...
@@ -1112,7 +1069,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1112,7 +1069,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
money
=
this
.
getSocialFundMoney
(
idNumber
,
estmateList
,
isSocial
,
isPerson
,
socialList
,
fundList
,
money
,
sub
);
money
=
this
.
getSocialFundMoney
(
idNumber
,
estmateList
,
isSocial
,
isPerson
,
socialList
,
fundList
,
money
,
sub
);
}
}
// 缴费库没找到,从预估库找
// 缴费库没找到,从预估库找
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundType
)
&&
forecastList
!=
null
&&
!
forecastList
.
isEmpty
())
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundType
)
&&
forecastList
!=
null
&&
!
forecastList
.
isEmpty
())
{
money
=
this
.
getSocialFundMoney
(
idNumber
,
forecastList
,
isSocial
,
isPerson
,
forecastSocialList
,
forecastFundList
,
money
,
sub
);
money
=
this
.
getSocialFundMoney
(
idNumber
,
forecastList
,
isSocial
,
isPerson
,
forecastSocialList
,
forecastFundList
,
money
,
sub
);
}
}
return
money
;
return
money
;
...
@@ -1529,7 +1486,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1529,7 +1486,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryLock
lockUpdate
;
TSalaryLock
lockUpdate
;
try
{
try
{
// 薪资核心导入代码
// 薪资核心导入代码
return
this
.
doLaborCoreSalary
(
savList
,
saiList
,
sai
,
dept
,
invoiceTitle
,
salary
);
return
this
.
doLaborCoreSalary
(
savList
,
saiList
,
sai
,
dept
,
invoiceTitle
,
salary
,
user
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
lockUpdate
=
new
TSalaryLock
();
lockUpdate
=
new
TSalaryLock
();
lockUpdate
.
setId
(
lock
.
getId
());
lockUpdate
.
setId
(
lock
.
getId
());
...
@@ -1560,7 +1517,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1560,7 +1517,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @return: com.yifu.cloud.v1.common.core.util.R
* @return: com.yifu.cloud.v1.common.core.util.R
**/
**/
public
R
doLaborCoreSalary
(
List
<
TSalaryAccountVo
>
savList
,
List
<
TSalaryAccountItem
>
saiList
,
TSalaryAccountItem
sai
,
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
<>();
List
<
TSalaryAccount
>
aList
=
new
ArrayList
<>();
TSalaryAccount
a
;
//定库:
TSalaryAccount
a
;
//定库:
BigDecimal
money
=
new
BigDecimal
(
CommonConstants
.
ZERO_STRING
);
//初始化金额备用
BigDecimal
money
=
new
BigDecimal
(
CommonConstants
.
ZERO_STRING
);
//初始化金额备用
...
@@ -1642,7 +1599,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1642,7 +1599,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
SALARY_TAX
,
SalaryConstants
.
SALARY_TAX_JAVA
,
SalaryConstants
.
SALARY_TAX_JAVA
,
calculationLabor
(
saiList
,
asList
calculationLabor
(
saiList
,
asList
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
,
saiList
,
a
),
CommonConstants
.
ZERO_INT
);
a
.
setSaiList
(
saiList
);
a
.
setSaiList
(
saiList
);
aList
.
add
(
a
);
aList
.
add
(
a
);
...
@@ -1659,7 +1616,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1659,7 +1616,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setHaveSpecialFlag
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setIsRepeat
(
CommonConstants
.
ZERO_INT
);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
salary
.
setStatus
(
SalaryConstants
.
AUDIT_STATUS
[
0
]);
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
||
haveSpecialFlag
||
ownNum
>
0
||
repeatFlag
)
{
if
(
haveSalaryFlag
)
{
if
(
haveSalaryFlag
)
{
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
salary
.
setHaveSalaryFlag
(
CommonConstants
.
ONE_INT
);
}
}
...
@@ -1673,6 +1630,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1673,6 +1630,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//保存工资表
//保存工资表
tSalaryStandardService
.
save
(
salary
);
tSalaryStandardService
.
save
(
salary
);
// 获取上一个工资条顺序,复制:
tSalaryStandardSetService
.
copyLastSetByDeptId
(
salary
.
getId
(),
dept
.
getId
(),
String
.
valueOf
(
user
.
getId
()));
salaryDetailVo
.
setSalary
(
salary
);
salaryDetailVo
.
setSalary
(
salary
);
for
(
TSalaryAccount
account
:
aList
)
{
for
(
TSalaryAccount
account
:
aList
)
{
...
@@ -1733,10 +1693,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1733,10 +1693,10 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
nowTaxY
=
getNowTax
(
actualSalarySum
);
nowTaxY
=
getNowTax
(
actualSalarySum
);
relaySalary
=
BigDecimalUtils
.
safeAdd
(
actualSalarySumNow
,
nowTaxT
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
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
.
setSalaryTax
(
salaryTax
);
a
.
setSalaryTaxUnit
(
nowTaxT
);
a
.
setSalaryTaxUnit
(
nowTaxT
);
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
a
.
setActualSalary
(
BigDecimalUtils
.
safeSubtract
(
actualSalarySumNow
,
salaryTax
));
}
else
{
}
else
{
nowTaxY
=
getNowTax
(
actualSalarySum
);
nowTaxY
=
getNowTax
(
actualSalarySum
);
if
(
sumTax
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
if
(
sumTax
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
)
{
...
@@ -1757,7 +1717,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
...
@@ -1757,7 +1717,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
return
nowTaxT
;
return
nowTaxT
;
}
}
public
static
BigDecimal
getNowTax
(
BigDecimal
actualSalarySum
)
{
public
static
BigDecimal
getNowTax
(
BigDecimal
actualSalarySum
)
{
BigDecimal
nowTax
;
BigDecimal
nowTax
;
// 2022-3-3 11:24:20 运营中心郭华照提供的公式:
// 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)
// 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
...
@@ -47,7 +47,7 @@ public class TConfigSalaryServiceImpl extends ServiceImpl<TConfigSalaryMapper, T
}
}
vo
=
domainListVoR
.
getData
();
vo
=
domainListVoR
.
getData
();
if
(
Common
.
isEmpty
(
vo
)
||
!
Common
.
isNotEmpty
(
vo
.
getDeptIds
()))
{
if
(
Common
.
isEmpty
(
vo
)
||
!
Common
.
isNotEmpty
(
vo
.
getDeptIds
()))
{
throw
new
RuntimeException
(
"
未获取到相关结算信息
"
);
throw
new
RuntimeException
(
"
无项目权限
"
);
}
}
}
}
if
(
Common
.
isEmpty
(
vo
)){
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 {
...
@@ -276,4 +276,8 @@ public class SalaryConstants {
//派单限制统计表更新类型(0认领更新/1撤销认领更新/2匹配更新/3取消匹配更新)
//派单限制统计表更新类型(0认领更新/1撤销认领更新/2匹配更新/3取消匹配更新)
public
static
final
Integer
[]
DISPATCH_UPDTYPE
=
{
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 @@
...
@@ -76,6 +76,7 @@
</foreach>
</foreach>
</if>
</if>
</where>
</where>
order by CREATE_TIME DESC
</select>
</select>
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TDeptSeeMapper.xml
View file @
d0022ad9
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -41,7 +42,8 @@
...
@@ -41,7 +42,8 @@
a.CREATE_NAME,
a.CREATE_NAME,
a.CREATE_TIME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_BY,
a.UPDATE_TIME
a.UPDATE_TIME,
a.DEPT_NO
</sql>
</sql>
<sql
id=
"tDeptSee_where"
>
<sql
id=
"tDeptSee_where"
>
<if
test=
"tDeptSee != null"
>
<if
test=
"tDeptSee != null"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
View file @
d0022ad9
spring
:
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
:
mvc
:
pathmatch
:
pathmatch
:
matching-strategy
:
ant_path_matcher
matching-strategy
:
ant_path_matcher
...
@@ -6,17 +48,6 @@ spring:
...
@@ -6,17 +48,6 @@ spring:
activate
:
activate
:
on-profile
:
dev
on-profile
:
dev
redis
:
redis
:
host
:
127.0.0.1
host
:
192.168.1.65
port
:
6379
port
:
22379
password
:
'
@yf_2017'
password
:
'
@yf_2017'
datasource
:
\ No newline at end of file
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