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
Expand all
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:
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
This diff is collapsed.
Click to expand it.
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
:
127.0.0.1
port
:
6379
password
:
'
@yf_2017'
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
host
:
192.168.1.65
port
:
22379
password
:
'
@yf_2017'
\ No newline at end of file
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