Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-staff
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5df5fa9
authored
Jan 20, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提成方案:提成系统周期配置相关
1 parent
0df4c557
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
553 additions
and
94 deletions
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/MerchantBrandDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/MerchantBrandModelPageBrandDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceConfigDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/MerchantBrandPageDTO.java → rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/ServiceMerchantPageWithBrandDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceApproveConfigDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveOperationRecordDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigPageByMerchantDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApproveStatusEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceTimeCycleCodeEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceApproveConfig.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceConfigApproveOperationRecord.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceTimeCycle.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceApproveConfigRemote.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigRemote.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemote.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceApproveConfigMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigApproveOperationRecordMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceTimeCycleMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceApproveConfigRemoteImpl.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigRemoteImpl.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemoteImpl.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceApproveConfigService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveOperationRecordService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceTimeCycleService.java
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceApproveConfigMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveOperationRecordMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceTimeCycleMapper.xml
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/MerchantBrandDTO.java
deleted
100644 → 0
View file @
0df4c55
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public
class
MerchantBrandDTO
{
@ApiModelProperty
(
notes
=
"主品牌ID"
)
private
Long
first_brand_id
;
@ApiModelProperty
(
notes
=
"主品牌名称"
)
private
String
first_brand_name
;
@ApiModelProperty
(
notes
=
"二级品牌ID"
)
private
Long
sec_brand_id
;
@ApiModelProperty
(
notes
=
"二级品牌名称"
)
private
String
sec_brand_name
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/MerchantBrandModelPageBrandDTO.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public
class
MerchantBrandModelPageBrandDTO
{
@ApiModelProperty
(
notes
=
"主品牌id"
)
private
Integer
brandId
;
@ApiModelProperty
(
notes
=
"主品牌名称"
)
private
String
brandName
;
@ApiModelProperty
(
notes
=
"子品牌id"
)
private
Integer
childId
;
@ApiModelProperty
(
notes
=
"子品牌名称"
)
private
String
childName
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceConfigDTO.java
View file @
e5df5fa
...
@@ -22,6 +22,8 @@ public class PerformanceConfigDTO extends PerformanceConfig {
...
@@ -22,6 +22,8 @@ public class PerformanceConfigDTO extends PerformanceConfig {
private
List
<
PerformanceParamConfigDTO
>
performanceParamConfigs
;
private
List
<
PerformanceParamConfigDTO
>
performanceParamConfigs
;
private
List
<
PerformanceConfigMerchantBrandRefDTO
>
merchantBrandModelPageBrands
;
/**
/**
* 门店ID
* 门店ID
*/
*/
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/
MerchantBrandPage
DTO.java
→
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/
ServiceMerchantPageWithBrand
DTO.java
View file @
e5df5fa
...
@@ -2,10 +2,7 @@ package cn.com.glsx.dj.staff.dto;
...
@@ -2,10 +2,7 @@ package cn.com.glsx.dj.staff.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.*
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.util.List
;
import
java.util.List
;
...
@@ -13,15 +10,17 @@ import java.util.List;
...
@@ -13,15 +10,17 @@ import java.util.List;
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@ToString
@ToString
public
class
MerchantBrandPageDTO
{
public
class
ServiceMerchantPageWithBrandDTO
{
// 查询参数,商户号,门店名称
private
String
queryParam
;
@ApiModelProperty
(
notes
=
"门店ID"
)
@ApiModelProperty
(
notes
=
"门店ID"
)
private
String
merchantId
;
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"门店名称"
)
@ApiModelProperty
(
notes
=
"门店名称"
)
private
String
merchantName
;
private
String
merchantName
;
@ApiModelProperty
(
name
=
"merchantBrandList"
,
notes
=
"品牌列表"
)
@ApiModelProperty
(
name
=
"merchantBrandList"
,
notes
=
"品牌列表"
)
private
List
<
MerchantBrandDTO
>
merchantBrandList
;
private
List
<
MerchantBrand
ModelPageBrand
DTO
>
merchantBrandList
;
}
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceApproveConfigDTO.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
io.swagger.annotations.ApiModelProperty
;
import
cn.com.glsx.dj.staff.model.PerformanceApproveConfig
;
import
lombok.AllArgsConstructor
;
import
lombok.*
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
lombok.experimental.SuperBuilder
;
import
lombok.experimental.SuperBuilder
;
import
java.io.Serializable
;
@Data
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ToString
@SuperBuilder
@SuperBuilder
public
class
PerformanceApproveConfigDTO
implements
Serializable
{
public
class
PerformanceApproveConfigDTO
extends
PerformanceApproveConfig
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"审批人姓名"
)
private
String
approverName
;
@ApiModelProperty
(
notes
=
"审批人手机号码"
)
private
String
approverMobile
;
@ApiModelProperty
(
notes
=
"审批人类型(1:查阅人;2:审批人)"
)
private
Integer
approverType
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveOperationRecordDTO.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord
;
import
lombok.*
;
import
lombok.experimental.SuperBuilder
;
@Data
@ToString
@SuperBuilder
@EqualsAndHashCode
(
callSuper
=
false
)
@NoArgsConstructor
public
class
PerformanceConfigApproveOperationRecordDTO
extends
PerformanceConfigApproveOperationRecord
{
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigPageByMerchantDTO.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.*
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
import
java.util.Date
;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@ToString
@ToString
public
class
PerformanceConfigPageByMerchantDTO
{
public
class
PerformanceConfigPageByMerchantDTO
{
@ApiModelProperty
(
notes
=
"主键ID"
)
// 业务类型
private
Long
id
;
private
Byte
businessType
;
// 状态
private
Integer
status
;
@ApiModelProperty
(
notes
=
"门店id"
)
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"方案名称"
)
@ApiModelProperty
(
notes
=
"方案名称
, 多个以逗号分隔
"
)
private
String
schemeName
;
private
String
schemeName
;
@ApiModelProperty
(
notes
=
"
名
店名称"
)
@ApiModelProperty
(
notes
=
"
门
店名称"
)
private
String
merchantName
;
private
String
merchantName
s
;
@ApiModelProperty
(
notes
=
"品牌"
)
@ApiModelProperty
(
notes
=
"品牌
, 多个以逗号分隔
"
)
private
String
brandNames
;
private
String
brandNames
;
@ApiModelProperty
(
notes
=
"业务类型(0:轻改,1:权益;2:延保)"
)
@ApiModelProperty
(
notes
=
"业务类型(0:轻改,1:权益;2:延保), 多个以逗号分隔"
)
private
Byte
businessType
;
private
String
businessTypes
;
@ApiModelProperty
(
notes
=
"状态(0.草稿,1.审批中,2.生效,3.未生效)"
)
private
Integer
status
;
@ApiModelProperty
(
notes
=
"生效月份(格式:yyyy-MM)"
)
private
String
effectiveMonth
;
@ApiModelProperty
(
notes
=
"更新时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updatedDate
;
}
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApproveStatusEnum.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@AllArgsConstructor
@Getter
public
enum
PerformanceApproveStatusEnum
{
// 已读
READ
(
1
,
"已读"
),
// 已通过
PASS
(
2
,
"已通过"
),
// 未通过
NOT_PASS
(
3
,
"未通过"
),
;
private
final
Integer
code
;
private
final
String
desc
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceTimeCycleCodeEnum.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
*
*
* @time 2026-01-20 10:19
*/
@Getter
@AllArgsConstructor
public
enum
PerformanceTimeCycleCodeEnum
{
/**
* T1:薪资计算触发周期
*/
T1
(
"T1"
,
"1. 确定绩效,产生绩效发放工资;2. 确定门店有客资量(交车数),触发运营相关事项;3. 产生基本考勤数据,产生系统核算薪资"
),
/**
* T2:系统核算薪资周期
*/
T2
(
"T2"
,
"4. 系统基于考勤、绩效工资、提成运算产生工资条金额明细"
),
/**
* T3:门店考勤申诉周期
*/
T3
(
"T3"
,
"5. 申诉工资异议,包含考勤天数、订单数、日报平账抗议"
),
/**
* T4:工资异议处理周期
*/
T4
(
"T4"
,
"6. 接受申诉,处理违章修正考勤、订单数、日报平账抗议"
),
/**
* T5:绩效评分申诉周期
*/
T5
(
"T5"
,
"7. 申诉提佣、减免,修订提成部分个人渗透率等评分,涉及重新计算员工提成"
),
/**
* T6:薪资最终核算周期
*/
T6
(
"T6"
,
"8. 补充应发和扣减;9. 基于确定的薪资、扣减、补发放提成,系统重新运算最终工资数据"
),
/**
* T7:工资锁定周期
*/
T7
(
"T7"
,
"10. 发放最终工资,定稿工资数据"
),
;
;
private
String
code
;
private
String
desc
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceApproveConfig.java
View file @
e5df5fa
...
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
...
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.SuperBuilder
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -18,6 +19,7 @@ import java.util.Date;
...
@@ -18,6 +19,7 @@ import java.util.Date;
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@SuperBuilder
@Table
(
name
=
"dj_car_life_performance_approve_config"
)
@Table
(
name
=
"dj_car_life_performance_approve_config"
)
public
class
PerformanceApproveConfig
implements
Serializable
{
public
class
PerformanceApproveConfig
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceConfigApproveOperationRecord.java
View file @
e5df5fa
...
@@ -35,7 +35,7 @@ public class PerformanceConfigApproveOperationRecord implements Serializable {
...
@@ -35,7 +35,7 @@ public class PerformanceConfigApproveOperationRecord implements Serializable {
@ApiModelProperty
(
notes
=
"审批状态(1:审批中;2:已通过;3:已驳回)"
)
@ApiModelProperty
(
notes
=
"审批状态(1:审批中;2:已通过;3:已驳回)"
)
@Column
(
name
=
"approve_status"
)
@Column
(
name
=
"approve_status"
)
private
Integer
approveS
tatus
;
private
Integer
s
tatus
;
@ApiModelProperty
(
notes
=
"审批操作时间"
)
@ApiModelProperty
(
notes
=
"审批操作时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceTimeCycle.java
View file @
e5df5fa
...
@@ -33,6 +33,10 @@ public class PerformanceTimeCycle implements Serializable {
...
@@ -33,6 +33,10 @@ public class PerformanceTimeCycle implements Serializable {
@Column
(
name
=
"cycle_name"
)
@Column
(
name
=
"cycle_name"
)
private
String
cycleName
;
private
String
cycleName
;
@ApiModelProperty
(
notes
=
"周期CODE"
)
@Column
(
name
=
"cycle_code"
)
private
String
cycleCode
;
@ApiModelProperty
(
notes
=
"周期基本事项"
)
@ApiModelProperty
(
notes
=
"周期基本事项"
)
@Column
(
name
=
"cycle_item"
)
@Column
(
name
=
"cycle_item"
)
private
String
cycleItem
;
private
String
cycleItem
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceApproveConfigRemote.java
View file @
e5df5fa
...
@@ -7,5 +7,5 @@ import java.util.List;
...
@@ -7,5 +7,5 @@ import java.util.List;
@ApiService
(
value
=
"提成方案审批人配置"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
@ApiService
(
value
=
"提成方案审批人配置"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
public
interface
PerformanceApproveConfigRemote
{
public
interface
PerformanceApproveConfigRemote
{
List
<
PerformanceApproveConfigDTO
>
selec
tAll
();
List
<
PerformanceApproveConfigDTO
>
lis
tAll
();
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigRemote.java
View file @
e5df5fa
...
@@ -2,14 +2,13 @@ package cn.com.glsx.dj.staff.remote.performance;
...
@@ -2,14 +2,13 @@ package cn.com.glsx.dj.staff.remote.performance;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigDTO
;
import
cn.com.glsx.dj.staff.dto.performance.*
;
import
cn.com.glsx.dj.staff.dto.performance.*
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
import
cn.com.glsx.framework.core.annotation.ApiParam.DataTypeEnum
;
import
cn.com.glsx.framework.core.annotation.ApiResponse
;
import
cn.com.glsx.framework.core.annotation.ApiService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@ApiService
(
value
=
"提成方案"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
@ApiService
(
value
=
"提成方案"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
...
@@ -35,7 +34,6 @@ public interface PerformanceConfigRemote {
...
@@ -35,7 +34,6 @@ public interface PerformanceConfigRemote {
@ApiResponse
(
"招聘需求分页"
)
@ApiResponse
(
"招聘需求分页"
)
RpcResponse
<
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>>
performanceConfigPageByMerchant
(
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>
pagination
);
RpcResponse
<
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>>
performanceConfigPageByMerchant
(
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>
pagination
);
@ApiMethod
(
"通过名称查询提成方案"
)
@ApiMethod
(
"通过名称查询提成方案"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"是否成功"
)
@ApiResponse
(
"是否成功"
)
...
@@ -45,4 +43,14 @@ public interface PerformanceConfigRemote {
...
@@ -45,4 +43,14 @@ public interface PerformanceConfigRemote {
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"是否成功"
)
@ApiResponse
(
"是否成功"
)
RpcResponse
<
PerformanceConfigDetailDTO
>
performanceConfigDetail
(
PerformanceConfigDTO
dto
);
RpcResponse
<
PerformanceConfigDetailDTO
>
performanceConfigDetail
(
PerformanceConfigDTO
dto
);
@ApiMethod
(
"查询门店有效的提成方案"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"门店id"
,
dataType
=
DataTypeEnum
.
INT
,
required
=
true
)
@ApiResponse
(
"提成方案"
)
RpcResponse
<
List
<
PerformanceConfigDTO
>>
effectivePerformanceConfigByMerchant
(
@NotNull
Integer
merchantId
);
@ApiMethod
(
"查询门店是否有有效的提成方案"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"门店id"
,
dataType
=
DataTypeEnum
.
INT
,
required
=
true
)
@ApiResponse
(
"提成方案"
)
RpcResponse
<
Boolean
>
isEffectivePerformanceExist
(
@NotNull
Integer
merchantId
);
}
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemote.java
View file @
e5df5fa
...
@@ -2,6 +2,9 @@ package cn.com.glsx.dj.staff.remote.performance;
...
@@ -2,6 +2,9 @@ package cn.com.glsx.dj.staff.remote.performance;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.annotation.ApiParam.DataTypeEnum
;
import
java.util.List
;
@ApiService
(
value
=
"提成系统周期"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
@ApiService
(
value
=
"提成系统周期"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
public
interface
PerformanceTimeCycleRemote
{
public
interface
PerformanceTimeCycleRemote
{
...
@@ -10,4 +13,21 @@ public interface PerformanceTimeCycleRemote {
...
@@ -10,4 +13,21 @@ public interface PerformanceTimeCycleRemote {
@ApiParam
(
name
=
"dto"
,
notes
=
"dto"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"dto"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"当前工资提成系统周期"
)
@ApiResponse
(
"当前工资提成系统周期"
)
PerformanceTimeCycleDTO
getCurrPerformanceTimeCycle
(
PerformanceTimeCycleDTO
dto
);
PerformanceTimeCycleDTO
getCurrPerformanceTimeCycle
(
PerformanceTimeCycleDTO
dto
);
@ApiMethod
(
"全部工资提成系统周期管理"
)
@ApiResponse
(
"工资提成系统周期"
)
List
<
PerformanceTimeCycleDTO
>
getPerformanceTimeCycle
();
/**
* 根据Code获取工资提成系统周期管理
*
* @param code {@link cn.com.glsx.dj.staff.enums.PerformanceTimeCycleCodeEnum}
* @return
*/
@ApiMethod
(
"根据Code获取工资提成系统周期管理"
)
@ApiParam
(
name
=
"code"
,
notes
=
"code"
,
dataType
=
DataTypeEnum
.
CHAR
,
required
=
true
)
@ApiResponse
(
"工资提成系统周期"
)
PerformanceTimeCycleDTO
getPerformanceTimeCycleByCode
(
String
code
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceApproveConfigMapper.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceApproveConfig
;
import
cn.com.glsx.dj.staff.model.PerformanceApproveConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
PerformanceApproveConfigMapper
extends
OreMapper
<
PerformanceApproveConfig
>
{
public
interface
PerformanceApproveConfigMapper
extends
OreMapper
<
PerformanceApproveConfig
>
{
List
<
PerformanceApproveConfigDTO
>
list
();
List
<
PerformanceApproveConfigDTO
>
listByMoblie
(
@Param
(
"mobile"
)
String
mobile
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigApproveOperationRecordMapper.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
...
@@ -7,4 +8,5 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
...
@@ -7,4 +8,5 @@ import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@Mapper
public
interface
PerformanceConfigApproveOperationRecordMapper
extends
OreMapper
<
PerformanceConfigApproveOperationRecord
>
{
public
interface
PerformanceConfigApproveOperationRecordMapper
extends
OreMapper
<
PerformanceConfigApproveOperationRecord
>
{
void
addOp
(
PerformanceConfigApproveOperationRecordDTO
dto
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigMapper.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageByMerchantDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceConfig
;
import
cn.com.glsx.dj.staff.model.PerformanceConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -19,4 +20,10 @@ public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
...
@@ -19,4 +20,10 @@ public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
List
<
PerformanceConfigPageDTO
>
listPerformanceConfig
(
PerformanceConfigPageDTO
dto
);
List
<
PerformanceConfigPageDTO
>
listPerformanceConfig
(
PerformanceConfigPageDTO
dto
);
PerformanceConfigDTO
selectById
(
@Param
(
"id"
)
Integer
id
);
PerformanceConfigDTO
selectById
(
@Param
(
"id"
)
Integer
id
);
List
<
PerformanceConfigPageByMerchantDTO
>
listByMerchant
(
PerformanceConfigPageByMerchantDTO
condition
);
List
<
PerformanceConfigDTO
>
effectivePerformanceConfigByMerchantId
(
@Param
(
"merchantId"
)
Integer
merchantId
);
Boolean
isEffectivePerformanceExist
(
Integer
merchantId
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceTimeCycleMapper.java
View file @
e5df5fa
...
@@ -3,10 +3,17 @@ package cn.com.glsx.dj.staff.mapper;
...
@@ -3,10 +3,17 @@ package cn.com.glsx.dj.staff.mapper;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceTimeCycle
;
import
cn.com.glsx.dj.staff.model.PerformanceTimeCycle
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
PerformanceTimeCycleMapper
extends
OreMapper
<
PerformanceTimeCycle
>
{
public
interface
PerformanceTimeCycleMapper
extends
OreMapper
<
PerformanceTimeCycle
>
{
PerformanceTimeCycleDTO
selectCurrCycle
();
PerformanceTimeCycleDTO
selectCurrCycle
();
List
<
PerformanceTimeCycleDTO
>
list
();
PerformanceTimeCycleDTO
selectByCode
(
@Param
(
"code"
)
String
code
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceApproveConfigRemoteImpl.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
remote
.
performance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
remote
.
performance
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO
;
import
cn.com.glsx.dj.staff.service.staffPerformance.PerformanceApproveConfigService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
@Slf4j
@Slf4j
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
public
class
PerformanceApproveConfigRemoteImpl
implements
PerformanceApproveConfigRemote
{
public
class
PerformanceApproveConfigRemoteImpl
implements
PerformanceApproveConfigRemote
{
@Autowired
private
PerformanceApproveConfigService
performanceApproveConfigService
;
@Override
@Override
public
List
<
PerformanceApproveConfigDTO
>
selec
tAll
()
{
public
List
<
PerformanceApproveConfigDTO
>
lis
tAll
()
{
return
Collections
.
emptyList
();
return
performanceApproveConfigService
.
listAll
();
}
}
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigRemoteImpl.java
View file @
e5df5fa
...
@@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
@Slf4j
@Slf4j
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
public
class
PerformanceConfigRemoteImpl
implements
PerformanceConfigRemote
{
public
class
PerformanceConfigRemoteImpl
implements
PerformanceConfigRemote
{
...
@@ -35,7 +37,8 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
...
@@ -35,7 +37,8 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
@Override
@Override
public
RpcResponse
<
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>>
performanceConfigPageByMerchant
(
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>
pagination
)
{
public
RpcResponse
<
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>>
performanceConfigPageByMerchant
(
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>
pagination
)
{
return
null
;
pagination
=
RpcPagination
.
copyPage
(
performanceConfigService
.
pageByMerchant
(
pagination
));
return
RpcResponse
.
success
(
pagination
);
}
}
@Override
@Override
...
@@ -48,5 +51,15 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
...
@@ -48,5 +51,15 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
return
RpcResponse
.
success
(
performanceConfigService
.
selectPerformanceConfigDetail
(
dto
));
return
RpcResponse
.
success
(
performanceConfigService
.
selectPerformanceConfigDetail
(
dto
));
}
}
@Override
public
RpcResponse
<
List
<
PerformanceConfigDTO
>>
effectivePerformanceConfigByMerchant
(
Integer
merchantId
)
{
return
RpcResponse
.
success
(
performanceConfigService
.
effectivePerformanceConfigByMerchant
(
merchantId
));
}
@Override
public
RpcResponse
<
Boolean
>
isEffectivePerformanceExist
(
Integer
merchantId
)
{
return
RpcResponse
.
success
(
performanceConfigService
.
isEffectivePerformanceExist
(
merchantId
));
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemoteImpl.java
View file @
e5df5fa
...
@@ -6,6 +6,8 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -6,6 +6,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
@Slf4j
@Slf4j
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
public
class
PerformanceTimeCycleRemoteImpl
implements
PerformanceTimeCycleRemote
{
public
class
PerformanceTimeCycleRemoteImpl
implements
PerformanceTimeCycleRemote
{
...
@@ -15,4 +17,15 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot
...
@@ -15,4 +17,15 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot
public
PerformanceTimeCycleDTO
getCurrPerformanceTimeCycle
(
PerformanceTimeCycleDTO
dto
)
{
public
PerformanceTimeCycleDTO
getCurrPerformanceTimeCycle
(
PerformanceTimeCycleDTO
dto
)
{
return
performanceTimeCycleService
.
selectCurrCycle
();
return
performanceTimeCycleService
.
selectCurrCycle
();
}
}
@Override
public
List
<
PerformanceTimeCycleDTO
>
getPerformanceTimeCycle
()
{
return
performanceTimeCycleService
.
list
();
}
@Override
public
PerformanceTimeCycleDTO
getPerformanceTimeCycleByCode
(
String
code
)
{
return
performanceTimeCycleService
.
selectByCode
(
code
);
}
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceApproveConfigService.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO
;
import
cn.com.glsx.dj.staff.mapper.PerformanceApproveConfigMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Slf4j
@Service
public
class
PerformanceApproveConfigService
{
@Autowired
private
PerformanceApproveConfigMapper
performanceApproveConfigMapper
;
public
List
<
PerformanceApproveConfigDTO
>
listAll
()
{
return
performanceApproveConfigMapper
.
list
();
}
public
List
<
PerformanceApproveConfigDTO
>
listByMoblie
(
String
mobile
)
{
return
performanceApproveConfigMapper
.
listByMoblie
(
mobile
);
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveOperationRecordService.java
0 → 100644
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO
;
import
cn.com.glsx.dj.staff.enums.PerformanceApproveStatusEnum
;
import
cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveOperationRecordMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Slf4j
@Service
public
class
PerformanceConfigApproveOperationRecordService
{
@Autowired
PerformanceConfigApproveOperationRecordMapper
performanceConfigApproveOperationRecordMapper
;
public
void
addOperatorRecord
(
Integer
id
,
String
mobile
,
PerformanceApproveStatusEnum
performanceApproveStatusEnum
,
String
approveName
,
String
opinion
)
{
PerformanceConfigApproveOperationRecordDTO
dto
=
new
PerformanceConfigApproveOperationRecordDTO
();
dto
.
setApproverMobile
(
mobile
);
dto
.
setStatus
(
performanceApproveStatusEnum
.
getCode
());
dto
.
setPerformanceConfigApproveId
(
id
);
dto
.
setApproveOpinion
(
opinion
);
dto
.
setApproverName
(
approveName
);
performanceConfigApproveOperationRecordMapper
.
addOp
(
dto
);
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
View file @
e5df5fa
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.staffPerformance;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.staffPerformance;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO
;
import
cn.com.glsx.dj.staff.dto.performance.*
;
import
cn.com.glsx.dj.staff.dto.performance.*
;
import
cn.com.glsx.dj.staff.enums.PerformanceApproveStatusEnum
;
import
cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper
;
import
cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveMapper
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
...
@@ -22,6 +23,10 @@ public class PerformanceConfigApproveService {
...
@@ -22,6 +23,10 @@ public class PerformanceConfigApproveService {
private
PerformanceConfigApproveMapper
performanceConfigApproveMapper
;
private
PerformanceConfigApproveMapper
performanceConfigApproveMapper
;
@Autowired
@Autowired
private
PerformanceConfigMerchantBrandRefService
performanceConfigMerchantBrandRefService
;
private
PerformanceConfigMerchantBrandRefService
performanceConfigMerchantBrandRefService
;
@Autowired
private
PerformanceApproveConfigService
performanceApproveConfigService
;
@Autowired
private
PerformanceConfigApproveOperationRecordService
performanceConfigApproveOperationRecordService
;
public
Page
<
PerformanceConfigApprovePageDTO
>
pagePerformanceConfigApprove
(
RpcPagination
<
PerformanceConfigApprovePageDTO
>
pagination
)
{
public
Page
<
PerformanceConfigApprovePageDTO
>
pagePerformanceConfigApprove
(
RpcPagination
<
PerformanceConfigApprovePageDTO
>
pagination
)
{
try
{
try
{
Page
<
PerformanceConfigApprovePageDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
Page
<
PerformanceConfigApprovePageDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
...
@@ -44,6 +49,22 @@ public class PerformanceConfigApproveService {
...
@@ -44,6 +49,22 @@ public class PerformanceConfigApproveService {
}
}
public
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
)
{
public
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
)
{
return
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetailAndPermission
(
dto
);
// 1. 获取方案审批详情
PerformanceConfigApprovePermissionDTO
performanceConfigApproveDetailAndPermission
=
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetailAndPermission
(
dto
);
// 2. 如果手机号码是查询人,则将查询人状态更新为已查看
List
<
PerformanceApproveConfigDTO
>
approveConfigs
=
performanceApproveConfigService
.
listByMoblie
(
dto
.
getMobile
());
boolean
isQuery
=
false
;
String
approveName
=
""
;
for
(
PerformanceApproveConfigDTO
approveConfig
:
approveConfigs
)
{
if
(
approveConfig
.
getApproverType
()
==
1
)
{
isQuery
=
true
;
approveName
=
approveConfig
.
getApproverName
();
break
;
}
}
if
(
isQuery
)
{
performanceConfigApproveOperationRecordService
.
addOperatorRecord
(
dto
.
getId
(),
dto
.
getMobile
(),
PerformanceApproveStatusEnum
.
READ
,
approveName
,
""
);
}
return
performanceConfigApproveDetailAndPermission
;
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigService.java
View file @
e5df5fa
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.dto.*
;
import
cn.com.glsx.dj.staff.dto.*
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigDetailDTO
;
import
cn.com.glsx.dj.staff.dto.performance.*
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO
;
import
cn.com.glsx.dj.staff.mapper.PerformanceConfigMapper
;
import
cn.com.glsx.dj.staff.mapper.PerformanceConfigMapper
;
import
cn.com.glsx.dj.staff.model.PerformanceConfig
;
import
cn.com.glsx.dj.staff.model.PerformanceConfig
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
...
@@ -110,4 +109,40 @@ public class PerformanceConfigService {
...
@@ -110,4 +109,40 @@ public class PerformanceConfigService {
result
.
setMerchantBrandRefList
(
merchantBrandRefs
);
result
.
setMerchantBrandRefList
(
merchantBrandRefs
);
return
result
;
return
result
;
}
}
public
Page
<
PerformanceConfigPageByMerchantDTO
>
pageByMerchant
(
RpcPagination
<
PerformanceConfigPageByMerchantDTO
>
pagination
)
{
try
{
Page
<
PerformanceConfigPageByMerchantDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
performanceConfigMapper
.
listByMerchant
(
pagination
.
getCondition
());
return
page
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATABASE_ERROR
);
}
}
public
List
<
PerformanceConfigDTO
>
effectivePerformanceConfigByMerchant
(
Integer
merchantId
)
{
// 1 查询出有效的方案
List
<
PerformanceConfigDTO
>
performanceConfigDTOS
=
performanceConfigMapper
.
effectivePerformanceConfigByMerchantId
(
merchantId
);
for
(
PerformanceConfigDTO
dto
:
performanceConfigDTOS
)
{
// 2 查询参数配置
List
<
PerformanceParamConfigDTO
>
performanceParamConfigs
=
performanceParamConfigService
.
listByConfigId
(
dto
.
getId
());
dto
.
setPerformanceParamConfigs
(
performanceParamConfigs
);
// 3 查询配置规则
PerformanceConfigRuleDTO
ruleDTO
=
performanceConfigRuleService
.
listByConfigId
(
dto
.
getId
());
dto
.
setPerformanceConfigRule
(
ruleDTO
);
// 4 获取商户品牌
List
<
PerformanceConfigMerchantBrandRefDTO
>
merchantBrandRefs
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
dto
.
getId
());
dto
.
setMerchantBrandModelPageBrands
(
merchantBrandRefs
);
}
return
performanceConfigDTOS
;
}
public
Boolean
isEffectivePerformanceExist
(
Integer
merchantId
)
{
return
performanceConfigMapper
.
isEffectivePerformanceExist
(
merchantId
);
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceTimeCycleService.java
View file @
e5df5fa
...
@@ -6,6 +6,8 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -6,6 +6,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Slf4j
@Slf4j
@Service
@Service
...
@@ -22,4 +24,12 @@ public class PerformanceTimeCycleService {
...
@@ -22,4 +24,12 @@ public class PerformanceTimeCycleService {
public
PerformanceTimeCycleDTO
selectCurrCycle
()
{
public
PerformanceTimeCycleDTO
selectCurrCycle
()
{
return
performanceTimeCycleMapper
.
selectCurrCycle
();
return
performanceTimeCycleMapper
.
selectCurrCycle
();
}
}
public
List
<
PerformanceTimeCycleDTO
>
list
()
{
return
performanceTimeCycleMapper
.
list
();
}
public
PerformanceTimeCycleDTO
selectByCode
(
String
code
)
{
return
performanceTimeCycleMapper
.
selectByCode
(
code
);
}
}
}
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceApproveConfigMapper.xml
View file @
e5df5fa
...
@@ -17,10 +17,49 @@
...
@@ -17,10 +17,49 @@
</resultMap>
</resultMap>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO"
extends=
"BaseResultMap"
>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceApproveConfigDTO"
extends=
"BaseResultMap"
>
<!-- 主键ID -->
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<!-- 审批人姓名 -->
<result
column=
"approver_name"
property=
"approverName"
jdbcType=
"VARCHAR"
/>
<!-- 审批人手机号码 -->
<result
column=
"approver_mobile"
property=
"approverMobile"
jdbcType=
"VARCHAR"
/>
<!-- 审批人类型(1:查阅人;2:审批人) -->
<result
column=
"approver_type"
property=
"approverType"
jdbcType=
"TINYINT"
/>
<!-- 创建人 -->
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<!-- 创建时间 -->
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<!-- 修改人 -->
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<!-- 修改时间 -->
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<!-- 删除标识(D:已删除;N:未删除) -->
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, approver_name, approver_mobile, approver_type,
id, approver_name, approver_mobile, approver_type,
created_by, created_date, updated_by, updated_date, deleted_flag
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
<select
id=
"list"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_approve_config
WHERE
deleted_flag = 'N'
ORDER BY
created_date DESC
</select>
<select
id=
"listByMoblie"
parameterType=
"java.lang.String"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_approve_config
WHERE
deleted_flag = 'N'
AND approver_mobile = #{mobile}
ORDER BY
created_date DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveOperationRecordMapper.xml
View file @
e5df5fa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-->
-->
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"performance_config_approve_id"
property=
"performanceConfigApproveId"
jdbcType=
"INTEGER"
/>
<result
column=
"performance_config_approve_id"
property=
"performanceConfigApproveId"
jdbcType=
"INTEGER"
/>
<result
column=
"approve_status"
property=
"
approveS
tatus"
jdbcType=
"TINYINT"
/>
<result
column=
"approve_status"
property=
"
s
tatus"
jdbcType=
"TINYINT"
/>
<result
column=
"approve_time"
property=
"approveTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"approve_time"
property=
"approveTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"approve_opinion"
property=
"approveOpinion"
jdbcType=
"VARCHAR"
/>
<result
column=
"approve_opinion"
property=
"approveOpinion"
jdbcType=
"VARCHAR"
/>
<result
column=
"approver_name"
property=
"approverName"
jdbcType=
"VARCHAR"
/>
<result
column=
"approver_name"
property=
"approverName"
jdbcType=
"VARCHAR"
/>
...
@@ -26,4 +26,50 @@
...
@@ -26,4 +26,50 @@
id, performance_config_approve_id, approve_status, approve_time, approve_opinion, approver_name,
id, performance_config_approve_id, approve_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
<!-- 通用字段映射:DTO → 数据库字段 -->
<sql
id=
"column_map"
>
performance_config_approve_id,
status,
approve_time,
approve_opinion,
approver_name,
approver_mobile,
created_by,
created_date,
updated_by,
updated_date
</sql>
<!-- 通用值映射:DTO参数 → 字段值 -->
<sql
id=
"value_map"
>
#{dto.performanceConfigApproveId},
#{dto.status},
#{dto.approveTime},
#{dto.approveOpinion},
#{dto.approverName},
#{dto.approverMobile},
#{dto.createdBy},
<!-- 创建时间:为空则填充当前时间,否则用传入值 -->
IFNULL(#{dto.createdDate}, NOW()),
#{dto.updatedBy},
<!-- 修改时间:每次操作都更新为当前时间 -->
NOW()
</sql>
<!-- 插入/更新审批操作记录:重复则更新最新数据 -->
<insert
id=
"addOp"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO"
>
INSERT INTO dj_car_life_performance_config_approve_operation_record (
<include
refid=
"column_map"
/>
) VALUES (
<include
refid=
"value_map"
/>
) ON DUPLICATE KEY UPDATE
-- 重复时更新以下字段(保留创建时间,仅更新最新操作数据)
status = #{dto.status},
approve_time = #{dto.approveTime},
approve_opinion = #{dto.approveOpinion},
approver_name = #{dto.approverName},
updated_by = #{dto.updatedBy},
updated_date = NOW() -- 强制更新修改时间
-- created_date 保留原有值,不更新
</insert>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMapper.xml
View file @
e5df5fa
...
@@ -22,6 +22,15 @@
...
@@ -22,6 +22,15 @@
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.PerformanceConfigDTO"
extends=
"BaseResultMap"
>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.PerformanceConfigDTO"
extends=
"BaseResultMap"
>
</resultMap>
</resultMap>
<resultMap
id=
"MerchantPerformanceResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageByMerchantDTO"
>
<result
column=
"merchant_id"
property=
"merchantId"
jdbcType=
"INTEGER"
/>
<result
column=
"merchant_name"
property=
"merchantName"
jdbcType=
"VARCHAR"
/>
<result
column=
"scheme_names"
property=
"schemeNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"brand_names"
property=
"brandNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"business_types"
property=
"businessTypes"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
...
@@ -101,4 +110,91 @@
...
@@ -101,4 +110,91 @@
AND c.id = #{id}
AND c.id = #{id}
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"listByMerchant"
parameterType=
"cn.com.glsx.dj.staff.dto.MerchantPerformanceQueryDTO"
resultMap=
"MerchantPerformanceResultMap"
>
SELECT
ref.merchant_id AS merchant_id,
IFNULL(s.merchant_name, '') AS merchant_name,
IFNULL(GROUP_CONCAT(DISTINCT cfg.scheme_name SEPARATOR ','), '') AS scheme_names,
IFNULL(GROUP_CONCAT(DISTINCT ref.brand_name SEPARATOR ','), '') AS brand_names,
IFNULL(GROUP_CONCAT(DISTINCT cfg.business_type SEPARATOR ','), '') AS business_types
FROM
dj_car_life_performance_config_merchant_brand_ref ref
INNER JOIN
dj_car_life_performance_config cfg
ON
ref.performance_config_id = cfg.id
AND cfg.deleted_flag = 'N'
LEFT JOIN
dj_car_life_service_merchant s
ON
ref.merchant_id = s.merchant_id
AND s.deleted_flag = 'N'
WHERE
ref.deleted_flag = 'N'
<if
test=
"merchantId != null"
>
AND ref.merchant_id = #{merchantId}
</if>
<if
test=
"status != null"
>
AND cfg.status = #{status}
</if>
<if
test=
"businessType != null"
>
AND EXISTS (
SELECT 1
FROM dj_car_life_performance_config_merchant_brand_ref ref_sub
INNER JOIN dj_car_life_performance_config cfg_sub
ON ref_sub.performance_config_id = cfg_sub.id
WHERE
ref_sub.merchant_id = ref.merchant_id
AND cfg_sub.business_type = #{businessType}
AND ref_sub.deleted_flag = 'N'
AND cfg_sub.deleted_flag = 'N'
)
</if>
GROUP BY
ref.merchant_id, s.merchant_name
ORDER BY
ref.merchant_id ASC;
</select>
<select
id=
"effectivePerformanceConfigByMerchantId"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
SELECT
cfg.*
FROM
dj_car_life_performance_config cfg
INNER JOIN
dj_car_life_performance_config_merchant_brand_ref ref
ON
cfg.id = ref.performance_config_id
AND ref.deleted_flag = 'N'
AND ref.merchant_id = #{merchantId}
WHERE
cfg.deleted_flag = 'N'
AND cfg.status = 2
GROUP BY
ref.merchant_id
</select>
<select
id=
"isEffectivePerformanceExist"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Boolean"
>
SELECT EXISTS (
SELECT 1
FROM dj_car_life_performance_config cfg
INNER JOIN dj_car_life_performance_config_merchant_brand_ref ref
ON cfg.id = ref.performance_config_id
WHERE
cfg.deleted_flag = 'N'
AND cfg.status = 2
AND ref.deleted_flag = 'N'
AND ref.merchant_id = #{merchantId}
) AS exist_flag;
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceTimeCycleMapper.xml
View file @
e5df5fa
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
-->
-->
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"cycle_name"
property=
"cycleName"
jdbcType=
"VARCHAR"
/>
<result
column=
"cycle_name"
property=
"cycleName"
jdbcType=
"VARCHAR"
/>
<result
column=
"cycle_code"
property=
"cycleCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"cycle_item"
property=
"cycleItem"
jdbcType=
"VARCHAR"
/>
<result
column=
"cycle_item"
property=
"cycleItem"
jdbcType=
"VARCHAR"
/>
<result
column=
"start_date"
property=
"startDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"start_date"
property=
"startDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"end_date"
property=
"endDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"end_date"
property=
"endDate"
jdbcType=
"TIMESTAMP"
/>
...
@@ -25,7 +26,7 @@
...
@@ -25,7 +26,7 @@
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, cycle_name, cycle_item, start_date, end_date, enable_flag,
id, cycle_name,
cycle_code,
cycle_item, start_date, end_date, enable_flag,
created_by, created_date, updated_by, updated_date, deleted_flag
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
...
@@ -40,4 +41,26 @@
...
@@ -40,4 +41,26 @@
AND NOW() BETWEEN start_date AND end_date
AND NOW() BETWEEN start_date AND end_date
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"list"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_time_cycle
WHERE
deleted_flag = 'N'
AND enable_flag = 'Y'
</select>
<select
id=
"selectByCode"
parameterType=
"string"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_time_cycle
WHERE
deleted_flag = 'N'
AND enable_flag = 'Y'
AND cycle_code = #{code}
LIMIT 1
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment