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 324b1442
authored
Jan 23, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提成方案:提成方案添加,审批相关
1 parent
87dcea42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
1015 additions
and
137 deletions
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceCommissionStaffDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceConfigMerchantBrandRefDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceConfigRuleDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceParamConfigConditionDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveDetailDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveHandleDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePageDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePermissionDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigDetailDTO.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/dto/performance/PerformanceConfigPageDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceTimeCycleDTO.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/StaffPerformanceGetDTO.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/PerformanceApproveOperatorStatusEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApprovePushStatusEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApproverTypeEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceConfigApproveStatusEnum.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceConfigStatusEnum.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/StaffProductPerformanceRemote.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigApproveRemote.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigRemote.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/job/PerformanceConfigEnableJob.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigApproveMapper.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/PerformanceConfigMerchantBrandRefMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigRuleMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceParamConfigConditionMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceParamConfigMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/StaffPerformanceMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/StaffProductPerformanceRemoteImpl.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigApproveRemoteImpl.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/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/PerformanceConfigMerchantBrandRefService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigRuleService.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/PerformanceParamConfigConditionService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceParamConfigService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/StaffPerformanceService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/StaffProductPerformanceService.java
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveMapper.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/PerformanceConfigMerchantBrandRefMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigRuleMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceParamConfigConditionMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceParamConfigMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceTimeCycleMapper.xml
rpc-dj-staff/src/main/resources/META-INF/orm/StaffPerformanceMapper.xml
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceCommissionStaffDTO.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
PerformanceCommissionStaffDTO
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
staffPhone
;
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
staffName
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceConfigMerchantBrandRefDTO.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef
;
import
lombok.Data
;
import
lombok.*
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.experimental.SuperBuilder
;
import
lombok.experimental.SuperBuilder
;
@SuperBuilder
@SuperBuilder
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
@Data
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
PerformanceConfigMerchantBrandRefDTO
extends
PerformanceConfigMerchantBrandRef
{
public
class
PerformanceConfigMerchantBrandRefDTO
extends
PerformanceConfigMerchantBrandRef
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Byte
businessType
;
}
}
\ 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/PerformanceConfigRuleDTO.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigRule
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigRule
;
import
lombok.Data
;
import
lombok.*
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.experimental.SuperBuilder
;
import
lombok.experimental.SuperBuilder
;
@SuperBuilder
@SuperBuilder
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@NoArgsConstructor
public
class
PerformanceConfigRuleDTO
extends
PerformanceConfigRule
{
public
class
PerformanceConfigRuleDTO
extends
PerformanceConfigRule
{
private
static
final
long
serialVersionUID
=
-
448678837056991912L
;
private
static
final
long
serialVersionUID
=
-
448678837056991912L
;
}
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/PerformanceParamConfigConditionDTO.java
View file @
324b144
...
@@ -10,6 +10,8 @@ import lombok.experimental.SuperBuilder;
...
@@ -10,6 +10,8 @@ import lombok.experimental.SuperBuilder;
@ToString
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@AllArgsConstructor
@NoArgsConstructor
public
class
PerformanceParamConfigConditionDTO
extends
PerformanceParamConfigCondition
{
public
class
PerformanceParamConfigConditionDTO
extends
PerformanceParamConfigCondition
{
private
MerchantPerformanceProductDefineDTO
productDefine
;
private
MerchantPerformanceProductDefineDTO
productDefine
;
@ApiModelProperty
(
notes
=
"提成方案置ID"
)
@ApiModelProperty
(
notes
=
"提成方案置ID"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveDetailDTO.java
View file @
324b144
...
@@ -4,13 +4,15 @@ import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
...
@@ -4,13 +4,15 @@ import cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Builder
@Builder
public
class
PerformanceConfigApproveDetailDTO
{
public
class
PerformanceConfigApproveDetailDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Integer
id
;
private
Integer
id
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApproveHandleDTO.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
PerformanceConfigApproveHandleDTO
{
@ApiModelProperty
(
notes
=
"performanceConfigApproveId"
)
private
Integer
performanceConfigApproveId
;
@ApiModelProperty
(
notes
=
"审批状态 2:已通过;3:已驳回"
)
private
Integer
status
;
@ApiModelProperty
(
notes
=
"手机号码"
)
private
String
mobile
;
@ApiModelProperty
(
notes
=
"审批意见"
)
private
String
approveOpinion
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePageDTO.java
View file @
324b144
...
@@ -4,10 +4,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
...
@@ -4,10 +4,12 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
public
class
PerformanceConfigApprovePageDTO
{
public
class
PerformanceConfigApprovePageDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Integer
id
;
private
Integer
id
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePermissionDTO.java
View file @
324b144
...
@@ -3,8 +3,11 @@ package cn.com.glsx.dj.staff.dto.performance;
...
@@ -3,8 +3,11 @@ package cn.com.glsx.dj.staff.dto.performance;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@Data
public
class
PerformanceConfigApprovePermissionDTO
{
public
class
PerformanceConfigApprovePermissionDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Integer
id
;
private
Integer
id
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigDetailDTO.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO
;
import
cn.com.glsx.dj.staff.dto.*
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
...
@@ -19,6 +17,9 @@ public class PerformanceConfigDetailDTO implements Serializable {
...
@@ -19,6 +17,9 @@ public class PerformanceConfigDetailDTO implements Serializable {
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
notes
=
"源提成方案配置ID(dj_car_life_performance_config.id)"
)
private
Integer
originPerformanceConfigId
;
@ApiModelProperty
(
notes
=
"方案名称"
)
@ApiModelProperty
(
notes
=
"方案名称"
)
private
String
schemeName
;
private
String
schemeName
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigPageByMerchantDTO.java
View file @
324b144
...
@@ -3,11 +3,14 @@ package cn.com.glsx.dj.staff.dto.performance;
...
@@ -3,11 +3,14 @@ package cn.com.glsx.dj.staff.dto.performance;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
java.io.Serializable
;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@ToString
@ToString
public
class
PerformanceConfigPageByMerchantDTO
{
public
class
PerformanceConfigPageByMerchantDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
// 业务类型
// 业务类型
private
Byte
businessType
;
private
Byte
businessType
;
// 状态
// 状态
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigPageDTO.java
View file @
324b144
...
@@ -2,10 +2,7 @@ package cn.com.glsx.dj.staff.dto.performance;
...
@@ -2,10 +2,7 @@ package cn.com.glsx.dj.staff.dto.performance;
import
com.fasterxml.jackson.annotation.JsonFormat
;
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.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -16,6 +13,7 @@ import java.util.Date;
...
@@ -16,6 +13,7 @@ import java.util.Date;
@ToString
@ToString
public
class
PerformanceConfigPageDTO
implements
Serializable
{
public
class
PerformanceConfigPageDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
schemeType
;
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Long
id
;
private
Long
id
;
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceTimeCycleDTO.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
performance
;
import
cn.com.glsx.dj.staff.model.PerformanceTimeCycle
;
import
cn.com.glsx.dj.staff.model.PerformanceTimeCycle
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
lombok.experimental.SuperBuilder
;
import
lombok.experimental.SuperBuilder
;
import
java.util.Date
;
@Data
@Data
@ToString
@ToString
@SuperBuilder
@SuperBuilder
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
PerformanceTimeCycleDTO
extends
PerformanceTimeCycle
{
public
class
PerformanceTimeCycleDTO
extends
PerformanceTimeCycle
{
@ApiModelProperty
(
notes
=
"周期开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
startDate
;
@ApiModelProperty
(
notes
=
"周期结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
endDate
;
}
}
\ 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/StaffPerformanceGetDTO.java
View file @
324b144
...
@@ -4,11 +4,35 @@ import cn.com.glsx.dj.staff.dto.StaffProductPerformanceDTO;
...
@@ -4,11 +4,35 @@ import cn.com.glsx.dj.staff.dto.StaffProductPerformanceDTO;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
StaffPerformanceGetDTO
{
public
class
StaffPerformanceGetDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
name
=
"staffPerformanceList"
,
notes
=
"工资提成列表获取"
)
private
String
month
;
private
String
staffPhone
;
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
staffName
;
@ApiModelProperty
(
notes
=
"门店ID"
)
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"门店名称"
)
private
String
merchantName
;
@ApiModelProperty
(
notes
=
"有效引荐量"
)
private
Integer
effectiveReferralQuantity
;
@ApiModelProperty
(
notes
=
"实际售前触客数总数"
)
private
Integer
touchNumber
;
@ApiModelProperty
(
notes
=
"总提成金额"
)
private
BigDecimal
totalPerformanceAmount
;
@ApiModelProperty
(
name
=
"staffPerformanceList"
,
notes
=
"工资提成列表"
)
private
List
<
StaffProductPerformanceDTO
>
staffPerformanceList
;
private
List
<
StaffProductPerformanceDTO
>
staffPerformanceList
;
}
}
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/PerformanceApprove
Operator
StatusEnum.java
View file @
324b144
...
@@ -6,7 +6,8 @@ import lombok.Getter;
...
@@ -6,7 +6,8 @@ import lombok.Getter;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
public
enum
PerformanceApproveStatusEnum
{
public
enum
PerformanceApproveOperatorStatusEnum
{
INIT
(
0
,
"初始化"
),
// 已读
// 已读
READ
(
1
,
"已读"
),
READ
(
1
,
"已读"
),
// 已通过
// 已通过
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApprovePushStatusEnum.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@AllArgsConstructor
@Getter
public
enum
PerformanceApprovePushStatusEnum
{
FAILED
(
0
,
"失败"
),
SUCCESS
(
1
,
"成功"
),
;
private
Integer
code
;
private
String
desc
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceApproverTypeEnum.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@AllArgsConstructor
@Getter
public
enum
PerformanceApproverTypeEnum
{
READER
(
1
,
"查阅人"
),
APPROVER
(
2
,
"审批人"
),
;
private
final
Integer
code
;
private
final
String
desc
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceConfigApproveStatusEnum.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@AllArgsConstructor
@Getter
public
enum
PerformanceConfigApproveStatusEnum
{
APPROVEING
(
1
,
"审批中"
),
APPROVE_SUCCESS
(
2
,
"已通过"
),
APPROVE_FAIL
(
3
,
"已驳回"
),
;
private
final
Integer
code
;
private
final
String
desc
;
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/enums/PerformanceConfigStatusEnum.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@AllArgsConstructor
@Getter
public
enum
PerformanceConfigStatusEnum
{
DRAFT
(
0
,
"草稿"
),
APPROVING
(
1
,
"审批中"
),
EFFECTIVE
(
2
,
"生效"
),
NOT_EFFECTIVE
(
3
,
"失效"
),
;
private
final
Integer
code
;
private
final
String
desc
;
public
static
PerformanceConfigStatusEnum
getByCode
(
Integer
code
)
{
for
(
PerformanceConfigStatusEnum
value
:
values
())
{
if
(
value
.
getCode
().
equals
(
code
))
{
return
value
;
}
}
return
null
;
}
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceConfigApproveOperationRecord.java
View file @
324b144
...
@@ -33,10 +33,18 @@ public class PerformanceConfigApproveOperationRecord implements Serializable {
...
@@ -33,10 +33,18 @@ public class PerformanceConfigApproveOperationRecord implements Serializable {
@Column
(
name
=
"performance_config_approve_id"
)
@Column
(
name
=
"performance_config_approve_id"
)
private
Integer
performanceConfigApproveId
;
private
Integer
performanceConfigApproveId
;
@ApiModelProperty
(
notes
=
"审批状态(
1:审批中
;2:已通过;3:已驳回)"
)
@ApiModelProperty
(
notes
=
"审批状态(
0:初始化状态 1:已查看
;2:已通过;3:已驳回)"
)
@Column
(
name
=
"approve_status"
)
@Column
(
name
=
"approve_status"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
notes
=
"审批人类型(1:查阅人;2:审批人)"
)
@Column
(
name
=
"approver_type"
)
private
Integer
approverType
;
@ApiModelProperty
(
notes
=
"推送状态 0推送失败 1推送成功"
)
@Column
(
name
=
"push_status"
)
private
Integer
pushStatus
;
@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"
)
@Column
(
name
=
"approve_time"
)
@Column
(
name
=
"approve_time"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/model/PerformanceTimeCycle.java
View file @
324b144
...
@@ -42,18 +42,13 @@ public class PerformanceTimeCycle implements Serializable {
...
@@ -42,18 +42,13 @@ public class PerformanceTimeCycle implements Serializable {
private
String
cycleItem
;
private
String
cycleItem
;
@ApiModelProperty
(
notes
=
"周期开始时间"
)
@ApiModelProperty
(
notes
=
"周期开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@Column
(
name
=
"start_day_of_month"
)
@Column
(
name
=
"start_date"
)
private
String
stratDayOfMonth
;
private
Date
startDate
;
@ApiModelProperty
(
notes
=
"周期结束时间"
)
@ApiModelProperty
(
notes
=
"周期结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@Column
(
name
=
"end_date"
)
@Column
(
name
=
"end_day_of_month"
)
private
Date
endDate
;
private
String
endDayOfMonth
;
@ApiModelProperty
(
notes
=
"是否启用(N:否,Y:是)"
)
@Column
(
name
=
"enable_flag"
)
private
String
enableFlag
;
@ApiModelProperty
(
notes
=
"创建人"
)
@ApiModelProperty
(
notes
=
"创建人"
)
@Column
(
name
=
"created_by"
)
@Column
(
name
=
"created_by"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/StaffProductPerformanceRemote.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
remote
;
import
cn.com.glsx.dj.staff.dto.PerformanceCommissionStaffDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceGetDTO
;
import
cn.com.glsx.framework.core.annotation.*
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
java.util.List
;
@ApiService
(
value
=
"员工提成"
,
owner
=
"zhangjb"
,
protocol
=
ApiService
.
ProtocolEnum
.
dubbo
,
version
=
"1.0.0"
)
public
interface
StaffProductPerformanceRemote
{
@ApiMethod
(
"查询员工提成构成"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成构成信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"提成构成列表"
)
RpcResponse
<
List
<
StaffPerformanceGetDTO
>>
getPerformanceCommissionCompositionForStaff
(
StaffPerformanceGetDTO
dto
);
@ApiMethod
(
"查询有绩效提成的人员"
)
@ApiResponse
(
"有绩效提成的人员列表(员工名称、手机号码)"
)
RpcResponse
<
List
<
PerformanceCommissionStaffDTO
>>
listStaffWithPerformanceCommission
();
}
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigApproveRemote.java
View file @
324b144
...
@@ -22,4 +22,14 @@ public interface PerformanceConfigApproveRemote {
...
@@ -22,4 +22,14 @@ public interface PerformanceConfigApproveRemote {
@ApiParam
(
name
=
"dto"
,
notes
=
"查询信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"查询信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"提成方案审批详情"
)
@ApiResponse
(
"提成方案审批详情"
)
RpcResponse
<
PerformanceConfigApprovePermissionDTO
>
performanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
);
RpcResponse
<
PerformanceConfigApprovePermissionDTO
>
performanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
);
@ApiMethod
(
"提交提成方案审批"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"提交提成方案审批"
)
RpcResponse
<
Boolean
>
approveSubmit
(
PerformanceConfigApproveDTO
dto
);
@ApiMethod
(
"提成方案审批"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案审批信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"提成方案审批"
)
RpcResponse
<
Boolean
>
approveHandle
(
PerformanceConfigApproveHandleDTO
request
);
}
}
\ 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 @
324b144
...
@@ -17,7 +17,7 @@ public interface PerformanceConfigRemote {
...
@@ -17,7 +17,7 @@ public interface PerformanceConfigRemote {
@ApiMethod
(
"提成方案新增"
)
@ApiMethod
(
"提成方案新增"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiResponse
(
"是否成功"
)
@ApiResponse
(
"是否成功"
)
RpcResponse
<
Boolean
>
performanceConfigAdd
(
@NotNull
PerformanceConfigDTO
dto
);
RpcResponse
<
Integer
>
performanceConfigSave
(
@NotNull
PerformanceConfigDTO
dto
);
@ApiMethod
(
"提成方案修改"
)
@ApiMethod
(
"提成方案修改"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"提成方案信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
...
@@ -52,5 +52,10 @@ public interface PerformanceConfigRemote {
...
@@ -52,5 +52,10 @@ public interface PerformanceConfigRemote {
@ApiMethod
(
"查询门店是否有有效的提成方案"
)
@ApiMethod
(
"查询门店是否有有效的提成方案"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"门店id"
,
dataType
=
DataTypeEnum
.
INT
,
required
=
true
)
@ApiParam
(
name
=
"dto"
,
notes
=
"门店id"
,
dataType
=
DataTypeEnum
.
INT
,
required
=
true
)
@ApiResponse
(
"提成方案"
)
@ApiResponse
(
"提成方案"
)
RpcResponse
<
Boolean
>
isEffectivePerformanceExist
(
@NotNull
Integer
merchantId
);
RpcResponse
<
Boolean
>
hasEffectivePerformanceConfigForMerchant
(
@NotNull
Integer
merchantId
);
@ApiMethod
(
"查询门店是否有有效的提成方案"
)
@ApiParam
(
name
=
"dto"
,
notes
=
"门店id"
,
dataType
=
DataTypeEnum
.
INT
,
required
=
true
)
@ApiResponse
(
"提成方案"
)
RpcResponse
<
List
<
PerformanceConfigDetailDTO
>>
performanceConfigDetailWithMerchant
(
PerformanceConfigDTO
dto
);
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/job/PerformanceConfigEnableJob.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
job
;
import
cn.com.glsx.dj.staff.service.staffPerformance.PerformanceConfigService
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.dangdang.ddframe.job.api.simple.SimpleJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf
;
import
org.springframework.beans.factory.annotation.Autowired
;
@Slf4j
@ElasticJobConf
(
name
=
"PerformanceConfigEnableJob"
,
cron
=
"0 0 0 1 * ?"
,
description
=
"提成方案启用定时任务"
,
overwrite
=
false
)
public
class
PerformanceConfigEnableJob
implements
SimpleJob
{
@Autowired
private
PerformanceConfigService
performanceConfigService
;
@Override
public
void
execute
(
ShardingContext
shardingContext
)
{
log
.
info
(
"----------------提成方案启用定时任务-----------------"
);
long
beginTime
=
System
.
currentTimeMillis
();
try
{
performanceConfigService
.
enblePerformanceConfig
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
finally
{
log
.
info
(
"----------------提成方案启用定时任务,耗时:{}-----------------"
,
System
.
currentTimeMillis
()
-
beginTime
);
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigApproveMapper.java
View file @
324b144
...
@@ -15,4 +15,12 @@ public interface PerformanceConfigApproveMapper extends OreMapper<PerformanceCon
...
@@ -15,4 +15,12 @@ public interface PerformanceConfigApproveMapper extends OreMapper<PerformanceCon
PerformanceConfigApproveDetailDTO
getPerformanceConfigApproveDetail
(
PerformanceConfigApproveDTO
dto
);
PerformanceConfigApproveDetailDTO
getPerformanceConfigApproveDetail
(
PerformanceConfigApproveDTO
dto
);
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
);
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
);
Integer
insertOne
(
PerformanceConfigApproveDTO
dto
);
PerformanceConfigApproveDTO
selectById
(
Integer
id
);
void
updateById
(
PerformanceConfigApproveDTO
approveDTO
);
List
<
PerformanceConfigApproveDTO
>
selectByPerformanceConfigId
(
Integer
performanceConfigId
);
}
}
\ 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 @
324b144
...
@@ -5,8 +5,14 @@ import cn.com.glsx.dj.staff.model.PerformanceConfigApproveOperationRecord;
...
@@ -5,8 +5,14 @@ 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
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
PerformanceConfigApproveOperationRecordMapper
extends
OreMapper
<
PerformanceConfigApproveOperationRecord
>
{
public
interface
PerformanceConfigApproveOperationRecordMapper
extends
OreMapper
<
PerformanceConfigApproveOperationRecord
>
{
void
addOp
(
PerformanceConfigApproveOperationRecordDTO
dto
);
List
<
PerformanceConfigApproveOperationRecordDTO
>
listByPerformanceConfigApproveId
(
Integer
performanceConfigApproveId
);
void
updateApproveOpinionAndStatusById
(
PerformanceConfigApproveOperationRecordDTO
dto
);
void
updateReadStatusByMobile
(
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/PerformanceConfigMapper.java
View file @
324b144
...
@@ -25,5 +25,11 @@ public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
...
@@ -25,5 +25,11 @@ public interface PerformanceConfigMapper extends OreMapper<PerformanceConfig> {
List
<
PerformanceConfigDTO
>
effectivePerformanceConfigByMerchantId
(
@Param
(
"merchantId"
)
Integer
merchantId
);
List
<
PerformanceConfigDTO
>
effectivePerformanceConfigByMerchantId
(
@Param
(
"merchantId"
)
Integer
merchantId
);
Boolean
isEffectivePerformanceExist
(
Integer
merchantId
);
Boolean
hasEffectivePerformanceConfigForMerchant
(
Integer
merchantId
);
int
insertOne
(
PerformanceConfigDTO
dto
);
void
updateById
(
PerformanceConfigDTO
dto
);
void
enblePerformanceConfig
();
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigMerchantBrandRefMapper.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigMerchantBrandRef
;
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
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
PerformanceConfigMerchantBrandRefMapper
extends
OreMapper
<
PerformanceConfigMerchantBrandRef
>
{
public
interface
PerformanceConfigMerchantBrandRefMapper
extends
OreMapper
<
PerformanceConfigMerchantBrandRef
>
{
void
deleteByConfigId
(
Integer
performanceConfigId
);
void
insertLists
(
List
<
PerformanceConfigMerchantBrandRefDTO
>
merchantBrandModelPageBrands
);
List
<
PerformanceConfigMerchantBrandRefDTO
>
listByConfigId
(
Integer
id
);
void
invalidByBusinessTypeAndMerchantBrand
(
PerformanceConfigMerchantBrandRefDTO
merchantBrandRef
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceConfigRuleMapper.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigRule
;
import
cn.com.glsx.dj.staff.model.PerformanceConfigRule
;
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
;
@Mapper
@Mapper
public
interface
PerformanceConfigRuleMapper
extends
OreMapper
<
PerformanceConfigRule
>
{
public
interface
PerformanceConfigRuleMapper
extends
OreMapper
<
PerformanceConfigRule
>
{
PerformanceConfigRuleDTO
listByConfigId
(
Integer
id
);
void
insertOne
(
PerformanceConfigRuleDTO
performanceConfigRule
);
void
deleteByConfigId
(
Integer
performanceConfigId
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceParamConfigConditionMapper.java
View file @
324b144
...
@@ -13,4 +13,6 @@ public interface PerformanceParamConfigConditionMapper extends OreMapper<Perform
...
@@ -13,4 +13,6 @@ public interface PerformanceParamConfigConditionMapper extends OreMapper<Perform
List
<
PerformanceParamConfigConditionDTO
>
listByParamConfigId
(
List
<
PerformanceParamConfigConditionDTO
>
listByParamConfigId
(
PerformanceParamConfigConditionDTO
dto
);
PerformanceParamConfigConditionDTO
dto
);
void
deleteByPerformanceConfigId
(
@Param
(
"performanceConfigId"
)
Integer
performanceConfigId
);
void
deleteByPerformanceConfigId
(
@Param
(
"performanceConfigId"
)
Integer
performanceConfigId
);
void
insertLists
(
List
<
PerformanceParamConfigConditionDTO
>
performanceParamConfigConditionDTOList
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/PerformanceParamConfigMapper.java
View file @
324b144
...
@@ -12,4 +12,6 @@ public interface PerformanceParamConfigMapper extends OreMapper<PerformanceParam
...
@@ -12,4 +12,6 @@ public interface PerformanceParamConfigMapper extends OreMapper<PerformanceParam
List
<
PerformanceParamConfigDTO
>
listByConfigId
(
PerformanceParamConfigDTO
dto
);
List
<
PerformanceParamConfigDTO
>
listByConfigId
(
PerformanceParamConfigDTO
dto
);
void
deleteByPerformanceParamConfigId
(
Integer
id
);
void
deleteByPerformanceParamConfigId
(
Integer
id
);
int
insertOne
(
PerformanceParamConfigDTO
performanceParamConfig
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/StaffPerformanceMapper.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
mapper
;
import
cn.com.glsx.dj.staff.dto.
StaffProductPerformance
DTO
;
import
cn.com.glsx.dj.staff.dto.
PerformanceCommissionStaff
DTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceDTO
;
import
cn.com.glsx.dj.staff.model.StaffPerformance
;
import
cn.com.glsx.dj.staff.model.StaffPerformance
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
@@ -19,4 +19,9 @@ public interface StaffPerformanceMapper extends OreMapper<StaffPerformance> {
...
@@ -19,4 +19,9 @@ public interface StaffPerformanceMapper extends OreMapper<StaffPerformance> {
* @return
* @return
*/
*/
int
removeStaffPerformance
(
StaffPerformance
staffPerformance
);
int
removeStaffPerformance
(
StaffPerformance
staffPerformance
);
/**
* 查询有生成过绩效工资的员工信息
*/
List
<
PerformanceCommissionStaffDTO
>
listStaffWithPerformanceCommission
();
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/StaffProductPerformanceRemoteImpl.java
0 → 100644
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
remote
;
import
cn.com.glsx.dj.staff.dto.PerformanceCommissionStaffDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceGetDTO
;
import
cn.com.glsx.dj.staff.service.staffPerformance.StaffPerformanceService
;
import
cn.com.glsx.dj.staff.service.staffPerformance.StaffProductPerformanceService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
@Slf4j
@DubboService
(
version
=
"1.0.0"
,
validation
=
"true"
)
public
class
StaffProductPerformanceRemoteImpl
implements
StaffProductPerformanceRemote
{
@Autowired
private
StaffProductPerformanceService
staffProductPerformanceService
;
@Autowired
private
StaffPerformanceService
staffPerformanceService
;
@Override
public
RpcResponse
<
List
<
StaffPerformanceGetDTO
>>
getPerformanceCommissionCompositionForStaff
(
StaffPerformanceGetDTO
dto
)
{
return
RpcResponse
.
success
(
staffProductPerformanceService
.
getPerformanceCommissionCompositionForStaff
(
dto
));
}
@Override
public
RpcResponse
<
List
<
PerformanceCommissionStaffDTO
>>
listStaffWithPerformanceCommission
()
{
return
RpcResponse
.
success
(
staffPerformanceService
.
listStaffWithPerformanceCommission
());
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceConfigApproveRemoteImpl.java
View file @
324b144
...
@@ -30,4 +30,13 @@ public class PerformanceConfigApproveRemoteImpl implements PerformanceConfigAppr
...
@@ -30,4 +30,13 @@ public class PerformanceConfigApproveRemoteImpl implements PerformanceConfigAppr
return
RpcResponse
.
success
(
performanceConfigApproveService
.
getPerformanceConfigApproveDetailAndPermission
(
dto
));
return
RpcResponse
.
success
(
performanceConfigApproveService
.
getPerformanceConfigApproveDetailAndPermission
(
dto
));
}
}
@Override
public
RpcResponse
<
Boolean
>
approveSubmit
(
PerformanceConfigApproveDTO
dto
)
{
return
RpcResponse
.
success
(
performanceConfigApproveService
.
submit
(
dto
));
}
@Override
public
RpcResponse
<
Boolean
>
approveHandle
(
PerformanceConfigApproveHandleDTO
dto
)
{
return
RpcResponse
.
success
(
performanceConfigApproveService
.
approveHandle
(
dto
));
}
}
}
\ 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 @
324b144
...
@@ -19,8 +19,8 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
...
@@ -19,8 +19,8 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
@Override
@Override
public
RpcResponse
<
Boolean
>
performanceConfigAdd
(
PerformanceConfigDTO
dto
)
{
public
RpcResponse
<
Integer
>
performanceConfigSave
(
PerformanceConfigDTO
dto
)
{
return
null
;
return
performanceConfigService
.
savePerformanceConfig
(
dto
)
;
}
}
@Override
@Override
...
@@ -57,8 +57,13 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
...
@@ -57,8 +57,13 @@ public class PerformanceConfigRemoteImpl implements PerformanceConfigRemote {
}
}
@Override
@Override
public
RpcResponse
<
Boolean
>
isEffectivePerformanceExist
(
Integer
merchantId
)
{
public
RpcResponse
<
Boolean
>
hasEffectivePerformanceConfigForMerchant
(
Integer
merchantId
)
{
return
RpcResponse
.
success
(
performanceConfigService
.
isEffectivePerformanceExist
(
merchantId
));
return
RpcResponse
.
success
(
performanceConfigService
.
hasEffectivePerformanceConfigForMerchant
(
merchantId
));
}
@Override
public
RpcResponse
<
List
<
PerformanceConfigDetailDTO
>>
performanceConfigDetailWithMerchant
(
PerformanceConfigDTO
dto
)
{
return
RpcResponse
.
success
(
performanceConfigService
.
performanceConfigDetailWithMerchant
(
dto
));
}
}
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveOperationRecordService.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO
;
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
cn.com.glsx.dj.staff.mapper.PerformanceConfigApproveOperationRecordMapper
;
import
lombok.extern.slf4j.Slf4j
;
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
public
class
PerformanceConfigApproveOperationRecordService
{
public
class
PerformanceConfigApproveOperationRecordService
{
@Autowired
@Autowired
PerformanceConfigApproveOperationRecordMapper
performanceConfigApproveOperationRecordMapper
;
PerformanceConfigApproveOperationRecordMapper
performanceConfigApproveOperationRecordMapper
;
public
void
addOperatorRecord
(
Integer
id
,
String
mobile
,
PerformanceApproveStatusEnum
performanceApproveStatusEnum
,
String
approveName
,
String
opinion
)
{
public
List
<
PerformanceConfigApproveOperationRecordDTO
>
listByPerformanceConfigApproveId
(
Integer
performanceConfigApproveId
)
{
PerformanceConfigApproveOperationRecordDTO
dto
=
new
PerformanceConfigApproveOperationRecordDTO
();
return
performanceConfigApproveOperationRecordMapper
.
listByPerformanceConfigApproveId
(
performanceConfigApproveId
);
dto
.
setApproverMobile
(
mobile
);
}
dto
.
setStatus
(
performanceApproveStatusEnum
.
getCode
());
dto
.
setPerformanceConfigApproveId
(
id
);
public
void
updateApproveOpinionAndStatusById
(
PerformanceConfigApproveOperationRecordDTO
dto
)
{
dto
.
setApproveOpinion
(
opinion
);
performanceConfigApproveOperationRecordMapper
.
updateApproveOpinionAndStatusById
(
dto
);
dto
.
setApproverName
(
approveName
);
}
performanceConfigApproveOperationRecordMapper
.
addOp
(
dto
);
public
void
insertList
(
List
<
PerformanceConfigApproveOperationRecordDTO
>
recordDTOList
)
{
performanceConfigApproveOperationRecordMapper
.
insertList
(
recordDTOList
);
}
public
void
updateReadStatusByMobile
(
String
mobile
)
{
performanceConfigApproveOperationRecordMapper
.
updateReadStatusByMobile
(
mobile
);
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
View file @
324b144
This diff is collapsed.
Click to expand it.
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigMerchantBrandRefService.java
View file @
324b144
...
@@ -21,6 +21,19 @@ public class PerformanceConfigMerchantBrandRefService {
...
@@ -21,6 +21,19 @@ public class PerformanceConfigMerchantBrandRefService {
public
List
<
PerformanceConfigMerchantBrandRefDTO
>
listByConfigId
(
Integer
id
)
{
public
List
<
PerformanceConfigMerchantBrandRefDTO
>
listByConfigId
(
Integer
id
)
{
return
null
;
return
performanceConfigMerchantBrandRefMapper
.
listByConfigId
(
id
);
}
public
void
addRef
(
List
<
PerformanceConfigMerchantBrandRefDTO
>
merchantBrandModelPageBrands
,
Integer
performanceConfigId
)
{
for
(
PerformanceConfigMerchantBrandRefDTO
merchantBrandModelPageBrand
:
merchantBrandModelPageBrands
)
{
merchantBrandModelPageBrand
.
setPerformanceConfigId
(
performanceConfigId
);
}
performanceConfigMerchantBrandRefMapper
.
deleteByConfigId
(
performanceConfigId
);
performanceConfigMerchantBrandRefMapper
.
insertLists
(
merchantBrandModelPageBrands
);
}
public
void
invalidByBusinessTypeAndMerchantBrand
(
Byte
businessType
,
PerformanceConfigMerchantBrandRefDTO
merchantBrandRef
)
{
merchantBrandRef
.
setBusinessType
(
businessType
);
performanceConfigMerchantBrandRefMapper
.
invalidByBusinessTypeAndMerchantBrand
(
merchantBrandRef
);
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigRuleService.java
View file @
324b144
...
@@ -17,6 +17,12 @@ public class PerformanceConfigRuleService {
...
@@ -17,6 +17,12 @@ public class PerformanceConfigRuleService {
@Autowired
@Autowired
private
PerformanceConfigRuleMapper
performanceConfigRuleMapper
;
private
PerformanceConfigRuleMapper
performanceConfigRuleMapper
;
public
PerformanceConfigRuleDTO
listByConfigId
(
Integer
id
)
{
public
PerformanceConfigRuleDTO
listByConfigId
(
Integer
id
)
{
return
null
;
return
performanceConfigRuleMapper
.
listByConfigId
(
id
);
}
public
void
addRule
(
PerformanceConfigRuleDTO
performanceConfigRule
,
Integer
performanceConfigId
)
{
performanceConfigRuleMapper
.
deleteByConfigId
(
performanceConfigId
);
performanceConfigRule
.
setPerformanceConfigId
(
performanceConfigId
);
performanceConfigRuleMapper
.
insertOne
(
performanceConfigRule
);
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigService.java
View file @
324b144
...
@@ -5,6 +5,7 @@ import cn.com.glsx.dj.staff.dto.performance.*;
...
@@ -5,6 +5,7 @@ import cn.com.glsx.dj.staff.dto.performance.*;
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
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.util.RpcAssert
;
import
cn.com.glsx.framework.core.util.RpcAssert
;
...
@@ -15,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -15,6 +16,7 @@ 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.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -147,7 +149,70 @@ public class PerformanceConfigService {
...
@@ -147,7 +149,70 @@ public class PerformanceConfigService {
return
performanceConfigDTOS
;
return
performanceConfigDTOS
;
}
}
public
Boolean
isEffectivePerformanceExist
(
Integer
merchantId
)
{
public
Boolean
hasEffectivePerformanceConfigForMerchant
(
Integer
merchantId
)
{
return
performanceConfigMapper
.
isEffectivePerformanceExist
(
merchantId
);
return
performanceConfigMapper
.
hasEffectivePerformanceConfigForMerchant
(
merchantId
);
}
/**
* 保存一个方案
*/
public
RpcResponse
<
Integer
>
savePerformanceConfig
(
PerformanceConfigDTO
dto
)
{
Integer
id
=
dto
.
getId
();
if
(
id
==
null
)
{
performanceConfigMapper
.
insertOne
(
dto
);
id
=
dto
.
getId
();
}
else
{
performanceConfigMapper
.
updateById
(
dto
);
}
performanceParamConfigService
.
addParamConfig
(
dto
.
getPerformanceParamConfigs
(),
id
);
performanceConfigRuleService
.
addRule
(
dto
.
getPerformanceConfigRule
(),
id
);
performanceConfigMerchantBrandRefService
.
addRef
(
dto
.
getMerchantBrandModelPageBrands
(),
id
);
return
RpcResponse
.
success
(
id
);
}
public
PerformanceConfigDTO
selectById
(
Integer
id
)
{
return
performanceConfigMapper
.
selectById
(
id
);
}
public
void
updateById
(
PerformanceConfigDTO
config
)
{
performanceConfigMapper
.
updateById
(
config
);
}
public
List
<
PerformanceConfigDetailDTO
>
performanceConfigDetailWithMerchant
(
PerformanceConfigDTO
dto
)
{
log
.
info
(
"selectEffectiveConfig dto: {}"
,
dto
);
RpcAssert
.
assertNotNull
(
dto
,
DefaultErrorEnum
.
DATA_NULL
,
"dto不能为空"
);
RpcAssert
.
assertNotNull
(
dto
.
getMerchantId
(),
DefaultErrorEnum
.
DATA_NULL
,
"merchantId不能为空"
);
// 1 查询生效中的方案
List
<
PerformanceConfigDTO
>
performanceConfigDTOS
=
performanceConfigMapper
.
effectivePerformanceConfigByMerchantId
(
dto
.
getMerchantId
());
List
<
PerformanceConfigDetailDTO
>
result
=
new
ArrayList
<>();
for
(
PerformanceConfigDTO
performanceConfigDTO
:
performanceConfigDTOS
)
{
PerformanceConfigDetailDTO
detailDTO
=
PerformanceConfigDetailDTO
.
builder
()
.
id
(
null
)
.
originPerformanceConfigId
(
performanceConfigDTO
.
getId
())
.
schemeName
(
performanceConfigDTO
.
getSchemeName
())
.
schemeType
(
2
)
.
businessType
(
performanceConfigDTO
.
getBusinessType
())
.
effectiveMonth
(
performanceConfigDTO
.
getEffectiveMonth
())
.
build
();
// 查询rule
PerformanceConfigRuleDTO
ruleDTO
=
performanceConfigRuleService
.
listByConfigId
(
performanceConfigDTO
.
getId
());
detailDTO
.
setPerformanceConfigRule
(
ruleDTO
);
// 查询参数配置
List
<
PerformanceParamConfigDTO
>
performanceParamConfigs
=
performanceParamConfigService
.
listByConfigId
(
performanceConfigDTO
.
getId
());
detailDTO
.
setParamConfigList
(
performanceParamConfigs
);
// 查询商户品牌
List
<
PerformanceConfigMerchantBrandRefDTO
>
merchantBrandRefs
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
performanceConfigDTO
.
getId
());
merchantBrandRefs
.
removeIf
(
merchantBrandRef
->
!
merchantBrandRef
.
getMerchantId
().
equals
(
dto
.
getMerchantId
()));
detailDTO
.
setMerchantBrandRefList
(
merchantBrandRefs
);
result
.
add
(
detailDTO
);
}
return
result
;
}
public
void
enblePerformanceConfig
()
{
performanceConfigMapper
.
enblePerformanceConfig
();
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceParamConfigConditionService.java
View file @
324b144
...
@@ -13,10 +13,10 @@ import java.util.List;
...
@@ -13,10 +13,10 @@ import java.util.List;
public
class
PerformanceParamConfigConditionService
{
public
class
PerformanceParamConfigConditionService
{
@Autowired
@Autowired
private
PerformanceParamConfigConditionMapper
performanceParamConfigConditionMapper
;
private
PerformanceParamConfigConditionMapper
performanceParamConfigConditionMapper
;
public
void
deleteByPerformanceConfigId
(
Integer
performanceConfigId
)
{
performanceParamConfigConditionMapper
.
deleteByPerformanceConfigId
(
performanceConfigId
);
}
public
void
insertList
(
List
<
PerformanceParamConfigConditionDTO
>
performanceParamConfigConditionDTOList
)
{
public
void
insertList
(
List
<
PerformanceParamConfigConditionDTO
>
performanceParamConfigConditionDTOList
)
{
// 1 把物理删除久的condition
performanceParamConfigConditionMapper
.
insertLists
(
performanceParamConfigConditionDTOList
);
performanceParamConfigConditionMapper
.
deleteByPerformanceConfigId
(
performanceParamConfigConditionDTOList
.
get
(
0
).
getPerformanceConfigId
());
// 2 插入新的condition
performanceParamConfigConditionMapper
.
insertList
(
performanceParamConfigConditionDTOList
);
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceParamConfigService.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.dto.PerformanceParamConfigConditionDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO
;
import
cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO
;
import
cn.com.glsx.dj.staff.mapper.PerformanceParamConfigMapper
;
import
cn.com.glsx.dj.staff.mapper.PerformanceParamConfigMapper
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
...
@@ -20,6 +21,9 @@ public class PerformanceParamConfigService {
...
@@ -20,6 +21,9 @@ public class PerformanceParamConfigService {
@Autowired
@Autowired
private
PerformanceParamConfigMapper
performanceParamConfigMapper
;
private
PerformanceParamConfigMapper
performanceParamConfigMapper
;
@Autowired
private
PerformanceParamConfigConditionService
performanceParamConfigConditionService
;
/**
/**
* 根据配置ID查询参数列表
* 根据配置ID查询参数列表
*
*
...
@@ -32,4 +36,24 @@ public class PerformanceParamConfigService {
...
@@ -32,4 +36,24 @@ public class PerformanceParamConfigService {
PerformanceParamConfigDTO
dto
=
PerformanceParamConfigDTO
.
builder
().
performanceConfigId
(
configId
).
build
();
PerformanceParamConfigDTO
dto
=
PerformanceParamConfigDTO
.
builder
().
performanceConfigId
(
configId
).
build
();
return
performanceParamConfigMapper
.
listByConfigId
(
dto
);
return
performanceParamConfigMapper
.
listByConfigId
(
dto
);
}
}
public
void
addParamConfig
(
List
<
PerformanceParamConfigDTO
>
performanceParamConfigs
,
Integer
performanceConfigId
)
{
// 1. 先删掉原来的配置
performanceParamConfigMapper
.
deleteByPerformanceParamConfigId
(
performanceConfigId
);
// 2. 删除掉原有的条件
performanceParamConfigConditionService
.
deleteByPerformanceConfigId
(
performanceConfigId
);
for
(
PerformanceParamConfigDTO
performanceParamConfig
:
performanceParamConfigs
)
{
performanceParamConfig
.
setPerformanceConfigId
(
performanceConfigId
);
// 3. 执行插入,拿到id
int
id
=
performanceParamConfigMapper
.
insertOne
(
performanceParamConfig
);
// 4. 插入条件
List
<
PerformanceParamConfigConditionDTO
>
performanceParamConfigConditions
=
performanceParamConfig
.
getPerformanceParamConfigConditions
();
if
(
performanceParamConfigConditions
!=
null
&&
!
performanceParamConfigConditions
.
isEmpty
())
{
for
(
PerformanceParamConfigConditionDTO
performanceParamConfigCondition
:
performanceParamConfigConditions
)
{
performanceParamConfigCondition
.
setPerformanceConfigId
(
id
);
}
performanceParamConfigConditionService
.
insertList
(
performanceParamConfigConditions
);
}
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/StaffPerformanceService.java
View file @
324b144
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
package
cn
.
com
.
glsx
.
dj
.
staff
.
service
.
staffPerformance
;
import
cn.com.glsx.dj.staff.constant.CommonConstants
;
import
cn.com.glsx.dj.staff.constant.CommonConstants
;
import
cn.com.glsx.dj.staff.dto.StaffPerformanceCalContextDTO
;
import
cn.com.glsx.dj.staff.dto.*
;
import
cn.com.glsx.dj.staff.dto.StaffPerformanceDetailDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceDTO
;
import
cn.com.glsx.dj.staff.enums.CommissionTypeEnum
;
import
cn.com.glsx.dj.staff.enums.CommissionTypeEnum
;
import
cn.com.glsx.dj.staff.mapper.StaffPerformanceMapper
;
import
cn.com.glsx.dj.staff.mapper.StaffPerformanceMapper
;
...
@@ -220,4 +219,14 @@ public class StaffPerformanceService {
...
@@ -220,4 +219,14 @@ public class StaffPerformanceService {
cn
.
com
.
glsx
.
framework
.
core
.
enums
.
DefaultErrorEnum
.
DATABASE_ERROR
);
cn
.
com
.
glsx
.
framework
.
core
.
enums
.
DefaultErrorEnum
.
DATABASE_ERROR
);
}
}
}
}
public
List
<
PerformanceCommissionStaffDTO
>
listStaffWithPerformanceCommission
()
{
try
{
return
staffPerformanceMapper
.
listStaffWithPerformanceCommission
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
cn
.
com
.
glsx
.
framework
.
core
.
exception
.
RpcServiceException
(
cn
.
com
.
glsx
.
framework
.
core
.
enums
.
DefaultErrorEnum
.
DATABASE_ERROR
);
}
}
}
}
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/StaffProductPerformanceService.java
View file @
324b144
...
@@ -3,10 +3,9 @@ package cn.com.glsx.dj.staff.service.staffPerformance;
...
@@ -3,10 +3,9 @@ package cn.com.glsx.dj.staff.service.staffPerformance;
import
cn.com.glsx.dj.smartcarlife.constant.CommonConstants
;
import
cn.com.glsx.dj.smartcarlife.constant.CommonConstants
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.merchantPerformanceConfig.MerchantPerformanceProductDefineDTO
;
import
cn.com.glsx.dj.smartcarlife.remote.MerchantPerformanceProductDefineRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.MerchantPerformanceProductDefineRemote
;
import
cn.com.glsx.dj.staff.dto.StaffPerformanceCalContextDTO
;
import
cn.com.glsx.dj.staff.dto.*
;
import
cn.com.glsx.dj.staff.dto.StaffPerformanceDetailDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceDTO
;
import
cn.com.glsx.dj.staff.dto.StaffPerformanceSubOrderDTO
;
import
cn.com.glsx.dj.staff.dto.performance.StaffPerformanceGetDTO
;
import
cn.com.glsx.dj.staff.dto.StaffProductPerformanceDTO
;
import
cn.com.glsx.dj.staff.enums.CommissionTypeEnum
;
import
cn.com.glsx.dj.staff.enums.CommissionTypeEnum
;
import
cn.com.glsx.dj.staff.enums.GoodsConfigTypeEnum
;
import
cn.com.glsx.dj.staff.enums.GoodsConfigTypeEnum
;
import
cn.com.glsx.dj.staff.mapper.StaffProductPerformanceMapper
;
import
cn.com.glsx.dj.staff.mapper.StaffProductPerformanceMapper
;
...
@@ -28,8 +27,6 @@ import org.springframework.stereotype.Service;
...
@@ -28,8 +27,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctc.wstx.util.StringUtil
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -48,6 +45,8 @@ public class StaffProductPerformanceService {
...
@@ -48,6 +45,8 @@ public class StaffProductPerformanceService {
private
StaffProductPerformanceMapper
staffProductPerformanceMapper
;
private
StaffProductPerformanceMapper
staffProductPerformanceMapper
;
@Autowired
@Autowired
private
MerchantPerformanceProductDefineRemote
merchantPerformanceProductDefineRemote
;
private
MerchantPerformanceProductDefineRemote
merchantPerformanceProductDefineRemote
;
@Autowired
private
StaffPerformanceService
staffPerformanceService
;
StaffProductPerformanceService
(
AutoPerformRuleService
autoPerformRuleService
)
{
StaffProductPerformanceService
(
AutoPerformRuleService
autoPerformRuleService
)
{
this
.
autoPerformRuleService
=
autoPerformRuleService
;
this
.
autoPerformRuleService
=
autoPerformRuleService
;
...
@@ -299,6 +298,42 @@ public class StaffProductPerformanceService {
...
@@ -299,6 +298,42 @@ public class StaffProductPerformanceService {
return
DataCalUtil
.
divideToPercent
(
new
BigDecimal
(
upgradeOrderNum
),
personalTargetTouchCount
);
return
DataCalUtil
.
divideToPercent
(
new
BigDecimal
(
upgradeOrderNum
),
personalTargetTouchCount
);
}
}
public
List
<
StaffPerformanceGetDTO
>
getPerformanceCommissionCompositionForStaff
(
StaffPerformanceGetDTO
dto
)
{
StaffProductPerformanceDTO
query
=
StaffProductPerformanceDTO
.
builder
().
staffPhone
(
dto
.
getStaffPhone
()).
month
(
dto
.
getMonth
()).
build
();
List
<
StaffProductPerformanceDTO
>
staffProductPerformanceDTOList
=
staffProductPerformanceMapper
.
listStaffPerformance
(
query
);
if
(
staffProductPerformanceDTOList
.
isEmpty
())
{
return
new
ArrayList
<>();
}
StaffPerformanceDTO
staffPerformanceDTO
=
StaffPerformanceDTO
.
builder
().
staffPhone
(
dto
.
getStaffPhone
()).
month
(
dto
.
getMonth
()).
build
();
List
<
StaffPerformanceDTO
>
staffPerformanceDTOList
=
staffPerformanceService
.
listStaffPerformance
(
staffPerformanceDTO
);
Map
<
Integer
,
List
<
StaffProductPerformanceDTO
>>
map
=
staffProductPerformanceDTOList
.
stream
().
collect
(
Collectors
.
groupingBy
(
StaffProductPerformanceDTO:
:
getMerchantId
));
List
<
StaffPerformanceGetDTO
>
staffPerformanceGetDTOList
=
new
ArrayList
<>();
for
(
List
<
StaffProductPerformanceDTO
>
value
:
map
.
values
())
{
StaffProductPerformanceDTO
staffProductPerformanceDTO
=
value
.
get
(
0
);
StaffPerformanceGetDTO
staffPerformanceGetDTO
=
new
StaffPerformanceGetDTO
();
staffPerformanceGetDTOList
.
add
(
staffPerformanceGetDTO
);
staffPerformanceGetDTO
.
setStaffName
(
staffProductPerformanceDTO
.
getStaffName
());
staffPerformanceGetDTO
.
setMerchantId
(
staffProductPerformanceDTO
.
getMerchantId
());
int
effectiveReferralQuantity
=
0
;
int
touchNumber
=
0
;
BigDecimal
totalPerformanceAmount
=
BigDecimal
.
ZERO
;
for
(
StaffPerformanceDTO
performanceDTO
:
staffPerformanceDTOList
)
{
if
(
performanceDTO
.
getMerchantId
().
equals
(
staffProductPerformanceDTO
.
getMerchantId
()))
{
effectiveReferralQuantity
+=
performanceDTO
.
getEffectiveReferralQuantity
();
touchNumber
+=
performanceDTO
.
getTouchNumber
();
}
}
for
(
StaffProductPerformanceDTO
productPerformanceDTO
:
value
)
{
totalPerformanceAmount
=
totalPerformanceAmount
.
add
(
productPerformanceDTO
.
getPerformanceAmount
());
}
staffPerformanceGetDTO
.
setEffectiveReferralQuantity
(
effectiveReferralQuantity
);
staffPerformanceGetDTO
.
setTouchNumber
(
touchNumber
);
staffPerformanceGetDTO
.
setStaffPerformanceList
(
value
);
}
return
staffPerformanceGetDTOList
;
}
private
static
class
MetricsResult
{
private
static
class
MetricsResult
{
private
final
int
upgradeOrderNum
;
private
final
int
upgradeOrderNum
;
private
final
BigDecimal
gmvOutput
;
private
final
BigDecimal
gmvOutput
;
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveMapper.xml
View file @
324b144
...
@@ -19,15 +19,6 @@
...
@@ -19,15 +19,6 @@
</resultMap>
</resultMap>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
extends=
"BaseResultMap"
>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
extends=
"BaseResultMap"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"performance_config_id"
property=
"performanceConfigId"
jdbcType=
"INTEGER"
/>
<result
column=
"approve_remark"
property=
"approveRemark"
jdbcType=
"VARCHAR"
/>
<result
column=
"approve_attachments"
property=
"approveAttachments"
jdbcType=
"VARCHAR"
/>
<result
column=
"attachment_imgs"
property=
"attachmentImgs"
jdbcType=
"VARCHAR"
/>
<result
column=
"submit_username"
property=
"submitUsername"
jdbcType=
"VARCHAR"
/>
<result
column=
"approve_status"
property=
"approveStatus"
jdbcType=
"TINYINT"
/>
<result
column=
"merchant_names"
property=
"merchantNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"brands_names"
property=
"brandsNames"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
...
@@ -74,7 +65,7 @@
...
@@ -74,7 +65,7 @@
SELECT
SELECT
a.id AS a_id,
a.id AS a_id,
c.scheme_name AS c_scheme_name,
c.scheme_name AS c_scheme_name,
c.business_type
G
AS c_business_type,
c.business_type AS c_business_type,
c.effective_month AS c_effective_month,
c.effective_month AS c_effective_month,
c.status AS c_status,
c.status AS c_status,
a.merchant_names AS a_merchant_names,
a.merchant_names AS a_merchant_names,
...
@@ -138,4 +129,94 @@
...
@@ -138,4 +129,94 @@
AND a.id = #{id}
AND a.id = #{id}
LIMIT 1
LIMIT 1
</select>
</select>
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_config_approve (
performance_config_id,
approve_remark,
approve_attachments,
attachment_imgs,
submit_username,
approve_status,
merchant_names,
brands_names,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
) VALUES (
#{performanceConfigId},
#{approveRemark},
#{approveAttachments},
#{attachmentImgs},
#{submitUsername},
#{approveStatus},
#{merchantNames},
#{brandsNames},
#{createdBy},
NOW(),
#{updatedBy},
NOW(),
'N'
)
</insert>
<select
id=
"selectById"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_config_approve
WHERE
deleted_flag = 'N'
AND id = #{id}
LIMIT 1
</select>
<update
id=
"updateById"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
>
UPDATE dj_car_life_performance_config_approve
SET
<if
test=
"performanceConfigId != null"
>
performance_config_id = #{performanceConfigId},
</if>
<if
test=
"approveRemark != null and approveRemark != ''"
>
approve_remark = #{approveRemark},
</if>
<if
test=
"approveAttachments != null and approveAttachments != ''"
>
approve_attachments = #{approveAttachments},
</if>
<if
test=
"attachmentImgs != null and attachmentImgs != ''"
>
attachment_imgs = #{attachmentImgs},
</if>
<if
test=
"submitUsername != null and submitUsername != ''"
>
submit_username = #{submitUsername},
</if>
<if
test=
"approveStatus != null"
>
approve_status = #{approveStatus},
</if>
<if
test=
"merchantNames != null and merchantNames != ''"
>
merchant_names = #{merchantNames},
</if>
<if
test=
"brandsNames != null and brandsNames != ''"
>
brands_names = #{brandsNames},
</if>
<if
test=
"updatedBy != null and updatedBy != ''"
>
updated_by = #{updatedBy},
</if>
WHERE
deleted_flag = 'N'
AND id = #{id}
</update>
<select
id=
"selectByPerformanceConfigId"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_config_approve
WHERE
deleted_flag = 'N'
AND performance_config_id = #{performanceConfigId}
</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 @
324b144
...
@@ -7,7 +7,9 @@
...
@@ -7,7 +7,9 @@
-->
-->
<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=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"approver_type"
property=
"approverType"
jdbcType=
"TINYINT"
/>
<result
column=
"push_status"
property=
"pushStatus"
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"
/>
...
@@ -19,57 +21,54 @@
...
@@ -19,57 +21,54 @@
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<!-- <resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO" extends="BaseResultMap">-->
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO"
extends=
"BaseResultMap"
>
<!-- </resultMap>-->
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, performance_config_approve_id, approve_status, approve_time, approve_opinion, approver_name,
id, performance_config_approve_id, approve_status, approver_type, push_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>
<!-- 通用字段映射: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>
</sql>
<!-- 通用值映射:DTO参数 → 字段值 -->
<select
id=
"listByPerformanceConfigApproveId"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
<sql
id=
"value_map"
>
SELECT
#{dto.performanceConfigApproveId},
<include
refid=
"Base_Column_List"
/>
#{dto.status},
FROM
#{dto.approveTime},
dj_car_life_performance_config_approve_operation_record
#{dto.approveOpinion},
WHERE
#{dto.approverName},
deleted_flag = 'N'
#{dto.approverMobile},
AND performance_config_approve_id = #{performanceConfigApproveId}
#{dto.createdBy},
ORDER BY
<!-- 创建时间:为空则填充当前时间,否则用传入值 -->
approve_time DESC
IFNULL(#{dto.createdDate}, NOW()),
</select>
#{dto.updatedBy},
<update
id=
"updateApproveOpinionAndStatusById"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO"
>
<!-- 修改时间:每次操作都更新为当前时间 -->
UPDATE dj_car_life_performance_config_approve_operation_record
NOW()
SET
</sql>
<if
test=
"status != null"
>
approve_status = #{status},
</if>
<if
test=
"approveOpinion != null and approveOpinion != ''"
>
approve_opinion = #{approveOpinion},
</if>
<if
test=
"approveTime != null"
>
approve_time = #{approveTime},
</if>
<if
test=
"updatedBy != null and updatedBy != ''"
>
updated_by = #{updatedBy},
</if>
updated_date = NOW()
WHERE
deleted_flag = 'N'
AND id = #{id}
</update>
<!-- 插入/更新审批操作记录:重复则更新最新数据 -->
<update
id=
"updateReadStatusByMobile"
parameterType=
"string"
>
<insert
id=
"addOp"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveOperationRecordDTO"
>
UPDATE dj_car_life_performance_config_approve_operation_record
INSERT INTO dj_car_life_performance_config_approve_operation_record (
SET
<include
refid=
"column_map"
/>
approve_status = 1
) VALUES (
WHERE
<include
refid=
"value_map"
/>
deleted_flag = 'N'
) ON DUPLICATE KEY UPDATE
AND approver_mobile = #{mobile}
-- 重复时更新以下字段(保留创建时间,仅更新最新操作数据)
AND approver_type = 2
status = #{dto.status},
</update>
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 @
324b144
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
>
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
>
SELECT
SELECT
c.id,
c.id,
c.scheme_type,
c.scheme_name AS schemeName,
c.scheme_name AS schemeName,
c.business_type AS businessType,
c.business_type AS businessType,
c.status,
c.status,
...
@@ -85,6 +86,9 @@
...
@@ -85,6 +86,9 @@
AND r.deleted_flag = 'N'
AND r.deleted_flag = 'N'
WHERE
WHERE
c.deleted_flag = 'N'
c.deleted_flag = 'N'
<if
test=
"scheme_type != null"
>
AND c.scheme_type = #{schemeType}
</if>
GROUP BY
GROUP BY
c.id,
c.id,
c.scheme_name,
c.scheme_name,
...
@@ -156,7 +160,7 @@
...
@@ -156,7 +160,7 @@
GROUP BY
GROUP BY
ref.merchant_id, s.merchant_name
ref.merchant_id, s.merchant_name
ORDER BY
ORDER BY
ref.merchant_id
ASC;
ref.merchant_id
DESC
</select>
</select>
...
@@ -176,12 +180,13 @@
...
@@ -176,12 +180,13 @@
WHERE
WHERE
cfg.deleted_flag = 'N'
cfg.deleted_flag = 'N'
AND cfg.status = 2
AND cfg.status = 2
AND cfg.enable_flag = 'Y'
GROUP BY
GROUP BY
ref.merchant_id
ref.merchant_id
</select>
</select>
<select
id=
"
isEffectivePerformanceExis
t"
<select
id=
"
hasEffectivePerformanceConfigForMerchan
t"
parameterType=
"java.lang.Integer"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Boolean"
>
resultType=
"java.lang.Boolean"
>
SELECT EXISTS (
SELECT EXISTS (
...
@@ -197,4 +202,55 @@
...
@@ -197,4 +202,55 @@
) AS exist_flag;
) AS exist_flag;
</select>
</select>
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.PerformanceConfigDTO"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_config (scheme_name,
scheme_type,
origin_performance_config_id,
business_type,
effective_month,
status)
VALUES (#{schemeName},
#{schemeType},
#{originPerformanceConfigId},
#{businessType},
#{effectiveMonth},
#{status})
</insert>
<update
id=
"updateById"
parameterType=
"cn.com.glsx.dj.staff.dto.PerformanceConfigDTO"
>
UPDATE dj_car_life_performance_config
SET
<if
test=
"schemeName != null and schemeName != ''"
>
scheme_name = #{schemeName},
</if>
<if
test=
"schemeType != null"
>
scheme_type = #{schemeType},
</if>
<if
test=
"originPerformanceConfigId != null"
>
origin_performance_config_id = #{originPerformanceConfigId},
</if>
<if
test=
"businessType != null"
>
business_type = #{businessType},
</if>
<if
test=
"effectiveMonth != null and effectiveMonth != ''"
>
effective_month = #{effectiveMonth},
</if>
<if
test=
"status != null"
>
status = #{status}
</if>
WHERE id = #{id}
</update>
<update
id=
"enblePerformanceConfig"
>
UPDATE dj_car_life_performance_config
SET
enable_flag = 'Y',
updated_by = 'system'
WHERE
deleted_flag = 'N'
AND effective_month
<
= DATE_FORMAT(NOW(), '%Y-%m')
AND status = 2
AND enable_flag = 'N';
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMerchantBrandRefMapper.xml
View file @
324b144
...
@@ -19,6 +19,9 @@
...
@@ -19,6 +19,9 @@
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO"
extends=
"BaseResultMap"
>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
...
@@ -26,4 +29,88 @@
...
@@ -26,4 +29,88 @@
id, performance_config_id, merchant_id, merchant_name, brand_id, brand_name, child_id,
id, performance_config_id, merchant_id, merchant_name, brand_id, brand_name, child_id,
child_name, created_by, created_date, updated_by, updated_date, deleted_flag
child_name, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
<!-- 新增:根据配置ID逻辑删除商户品牌关联数据 -->
<update
id=
"deleteByConfigId"
parameterType=
"java.lang.Integer"
>
UPDATE dj_car_life_performance_config_merchant_brand_ref
SET
deleted_flag = 'D',
updated_date = NOW()
WHERE
deleted_flag = 'N'
AND performance_config_id = #{performanceConfigId}
</update>
<!-- 新增:批量插入商户品牌关联数据 -->
<insert
id=
"insertLists"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_config_merchant_brand_ref (
performance_config_id,
merchant_id,
merchant_name,
brand_id,
brand_name,
child_id,
child_name,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.performanceConfigId},
#{item.merchantId},
#{item.merchantName},
#{item.brandId},
#{item.brandName},
#{item.childId},
#{item.childName},
#{item.createdBy},
NOW(),
#{item.updatedBy},
NOW(),
'N'
)
</foreach>
</insert>
<!-- 新增:根据配置ID查询商户品牌关联列表 -->
<select
id=
"listByConfigId"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_config_merchant_brand_ref
WHERE
deleted_flag = 'N'
AND performance_config_id = #{id}
ORDER BY
id DESC
</select>
<update
id=
"invalidByBusinessTypeAndMerchantBrand"
parameterType=
"cn.com.glsx.dj.staff.dto.PerformanceConfigMerchantBrandRefDTO"
>
UPDATE 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'
AND cfg.status = 2
AND cfg.business_type = #{businessType}
SET
ref.deleted_flag = 'D',
ref.updated_date = NOW(),
WHERE
ref.deleted_flag = 'N'
AND ref.merchant_id = #{merchantId}
AND ref.brand_id = #{brandId}
<!-- 兼容child_id为NULL的场景 -->
<if
test=
"childId != null"
>
AND ref.child_id = #{childId}
</if>
<if
test=
"childId == null"
>
AND ref.child_id IS NULL
</if>
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigRuleMapper.xml
View file @
324b144
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO"
extends=
"BaseResultMap"
>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
...
@@ -24,4 +27,57 @@
...
@@ -24,4 +27,57 @@
id, performance_config_id, assessment_factors, commission_bases, commission_types,
id, performance_config_id, assessment_factors, commission_bases, commission_types,
goods_config_types, created_by, created_date, updated_by, updated_date, deleted_flag
goods_config_types, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
<!-- 新增:根据配置ID查询单条规则 -->
<select
id=
"listByConfigId"
parameterType=
"java.lang.Integer"
resultMap=
"DTOResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
dj_car_life_performance_config_rule
WHERE
deleted_flag = 'N'
AND performance_config_id = #{id}
LIMIT 1
</select>
<!-- 新增:单条插入规则数据 -->
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.PerformanceConfigRuleDTO"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_config_rule (
performance_config_id,
assessment_factors,
commission_bases,
commission_types,
goods_config_types,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
) VALUES (
#{performanceConfigId},
#{assessmentFactors},
#{commissionBases},
#{commissionTypes},
#{goodsConfigTypes},
#{createdBy},
NOW(),
#{updatedBy},
NOW(),
'N'
)
</insert>
<!-- 新增:根据配置ID逻辑删除规则 -->
<update
id=
"deleteByConfigId"
parameterType=
"java.lang.Integer"
>
UPDATE dj_car_life_performance_config_rule
SET
deleted_flag = 'D',
updated_date = NOW()
WHERE
deleted_flag = 'N'
AND performance_config_id = #{performanceConfigId}
</update>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceParamConfigConditionMapper.xml
View file @
324b144
...
@@ -88,4 +88,61 @@
...
@@ -88,4 +88,61 @@
ORDER BY
ORDER BY
dcpcc.id DESC
dcpcc.id DESC
</select>
</select>
<!-- 新增的批量插入语句 -->
<insert
id=
"insertLists"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_param_config_condition (
performance_param_config_id,
condition_type,
condition_goods_config_type,
condition_goods_type,
condition_goods_type_name,
condition_secondary_goods_type,
condition_secondary_goods_type_name,
condition_third_level_goods_type,
condition_third_level_goods_type_name,
condition_product_define_id,
condition_product_define_name,
condition_assessment_factors,
condition_start_value,
condition_end_value,
condition_commission_base,
condition_commission_type,
condition_commission_type_value,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.performanceParamConfigId},
#{item.conditionType},
#{item.conditionGoodsConfigType},
#{item.conditionGoodsType},
#{item.conditionGoodsTypeName},
#{item.conditionSecondaryGoodsType},
#{item.conditionSecondaryGoodsTypeName},
#{item.conditionThirdLevelGoodsType},
#{item.conditionThirdLevelGoodsTypeName},
#{item.conditionProductDefineId},
#{item.conditionProductDefineName},
#{item.conditionAssessmentFactors},
#{item.conditionStartValue},
#{item.conditionEndValue},
#{item.conditionCommissionBase},
#{item.conditionCommissionType},
#{item.conditionCommissionTypeValue},
#{item.createdBy},
NOW(),
#{item.updatedBy},
NOW(),
'N'
)
</foreach>
</insert>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceParamConfigMapper.xml
View file @
324b144
...
@@ -84,4 +84,54 @@
...
@@ -84,4 +84,54 @@
deleted_flag = 'N'
deleted_flag = 'N'
AND performance_config_id = #{id}
AND performance_config_id = #{id}
</update>
</update>
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.PerformanceParamConfigDTO"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
INSERT INTO dj_car_life_performance_param_config (performance_config_id,
template_type,
assessment_factor,
start_value,
end_value,
commission_base,
commission_type,
goods_config_type,
goods_type,
goods_type_name,
secondary_goods_type,
secondary_goods_type_name,
third_level_goods_type,
third_level_goods_type_name,
product_define_id,
product_define_name,
commission_type_value,
created_by,
created_date,
updated_by,
updated_date,
deleted_flag)
VALUES (#{performanceConfigId},
#{templateType},
#{assessmentFactor},
#{startValue},
#{endValue},
#{commissionBase},
#{commissionType},
#{goodsConfigType},
#{goodsType},
#{goodsTypeName},
#{secondaryGoodsType},
#{secondaryGoodsTypeName},
#{thirdLevelGoodsType},
#{thirdLevelGoodsTypeName},
#{productDefineId},
#{productDefineName},
#{commissionTypeValue},
#{createdBy},
NOW(),
#{updatedBy},
NOW(),
'N')
</insert>
</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 @
324b144
...
@@ -9,9 +9,8 @@
...
@@ -9,9 +9,8 @@
<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_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_day_of_month"
property=
"stratDayOfMonth"
jdbcType=
"VARCHAR"
/>
<result
column=
"end_date"
property=
"endDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"end_day_of_month"
property=
"endDayOfMonth"
jdbcType=
"VARCHAR"
/>
<result
column=
"enable_flag"
property=
"enableFlag"
jdbcType=
"CHAR"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
...
@@ -20,46 +19,50 @@
...
@@ -20,46 +19,50 @@
</resultMap>
</resultMap>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO"
extends=
"BaseResultMap"
>
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO"
extends=
"BaseResultMap"
>
<result
column=
"start_date"
property=
"startDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"end_date"
property=
"endDate"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, cycle_name,cycle_code, cycle_item, start_da
te, end_date, enable_flag
,
id, cycle_name,cycle_code, cycle_item, start_da
y_of_month, end_day_of_month
,
created_by, created_date, updated_by, updated_date, deleted_flag
created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
</sql>
<sql
id=
"DTO_Column_List"
>
<include
refid=
"Base_Column_List"
/>
,
STR_TO_DATE(CONCAT(DATE_FORMAT(NOW(), '%Y-%m-'), start_day_of_month), '%Y-%m-%d %H:%i:%s') AS start_date,
STR_TO_DATE(CONCAT(DATE_FORMAT(NOW(), '%Y-%m-'), end_day_of_month), '%Y-%m-%d %H:%i:%s') AS end_date
</sql>
<select
id=
"selectCurrCycle"
resultMap=
"DTOResultMap"
>
<select
id=
"selectCurrCycle"
resultMap=
"DTOResultMap"
>
SELECT
SELECT
<include
refid=
"
Base
_Column_List"
/>
<include
refid=
"
DTO
_Column_List"
/>
FROM
FROM
dj_car_life_performance_time_cycle
dj_car_life_performance_time_cycle
WHERE
WHERE
deleted_flag = 'N'
deleted_flag = 'N'
AND enable_flag = 'Y'
AND NOW() BETWEEN STR_TO_DATE(CONCAT(DATE_FORMAT(NOW(), '%Y-%m-'), start_day_of_month), '%Y-%m-%d %H:%i:%s') AND STR_TO_DATE(CONCAT(DATE_FORMAT(NOW(), '%Y-%m-'), end_day_of_month), '%Y-%m-%d %H:%i:%s')
AND NOW() BETWEEN start_date AND end_date
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"list"
resultMap=
"DTOResultMap"
>
<select
id=
"list"
resultMap=
"DTOResultMap"
>
SELECT
SELECT
<include
refid=
"
Base
_Column_List"
/>
<include
refid=
"
DTO
_Column_List"
/>
FROM
FROM
dj_car_life_performance_time_cycle
dj_car_life_performance_time_cycle
WHERE
WHERE
deleted_flag = 'N'
deleted_flag = 'N'
AND enable_flag = 'Y'
</select>
</select>
<select
id=
"selectByCode"
parameterType=
"string"
resultMap=
"DTOResultMap"
>
<select
id=
"selectByCode"
parameterType=
"string"
resultMap=
"DTOResultMap"
>
SELECT
SELECT
<include
refid=
"
Base
_Column_List"
/>
<include
refid=
"
DTO
_Column_List"
/>
FROM
FROM
dj_car_life_performance_time_cycle
dj_car_life_performance_time_cycle
WHERE
WHERE
deleted_flag = 'N'
deleted_flag = 'N'
AND enable_flag = 'Y'
AND cycle_code = #{code}
AND cycle_code = #{code}
LIMIT 1
LIMIT 1
</select>
</select>
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/StaffPerformanceMapper.xml
View file @
324b144
...
@@ -79,4 +79,15 @@
...
@@ -79,4 +79,15 @@
AND month = #{month}
AND month = #{month}
AND deleted_flag = 'N'
AND deleted_flag = 'N'
</update>
</update>
<select
id=
"listStaffWithPerformanceCommission"
resultType=
"cn.com.glsx.dj.staff.dto.PerformanceCommissionStaffDTO"
>
SELECT
staff_name as staffName,
staff_phone as staffPhone
FROM
dj_car_life_staff_performance dclsp
WHERE
dclsp.deleted_flag = 'N'
group by dclsp.staff_phone
</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