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 164dfa31
authored
Jan 23, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/v5.6.0' into v5.6.0
2 parents
274c1dd0
509da204
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
219 additions
and
130 deletions
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/PerformanceConfigApprovePageDTO.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/remote/performance/PerformanceTimeCycleRemote.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/perfSalary/AttendanceDataCleansingService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/ClockInCompleteAnalysisStaffService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/EffectiveReferralReviewMiniProgramService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/EffectiveReferralReviewService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/salary/StaffMonthSalarySlipService.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/util/DistanceTest.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/util/LocationResponse.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-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceApproveConfigDTO.java
View file @
164dfa3
...
...
@@ -7,5 +7,6 @@ import lombok.experimental.SuperBuilder;
@Data
@ToString
@SuperBuilder
@NoArgsConstructor
public
class
PerformanceApproveConfigDTO
extends
PerformanceApproveConfig
{
}
\ No newline at end of file
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceConfigApprovePageDTO.java
View file @
164dfa3
...
...
@@ -2,13 +2,16 @@ package cn.com.glsx.dj.staff.dto.performance;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PerformanceConfigApprovePageDTO
implements
Serializable
{
private
Integer
merchantId
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"主键ID"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/performance/PerformanceTimeCycleDTO.java
View file @
164dfa3
...
...
@@ -12,6 +12,8 @@ import java.util.Date;
@ToString
@SuperBuilder
@EqualsAndHashCode
(
callSuper
=
false
)
@AllArgsConstructor
@NoArgsConstructor
public
class
PerformanceTimeCycleDTO
extends
PerformanceTimeCycle
{
@ApiModelProperty
(
notes
=
"周期开始时间"
)
...
...
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemote.java
View file @
164dfa3
...
...
@@ -17,7 +17,7 @@ public interface PerformanceTimeCycleRemote {
@ApiMethod
(
"全部工资提成系统周期管理"
)
@ApiResponse
(
"工资提成系统周期"
)
List
<
PerformanceTimeCycleDTO
>
get
PerformanceTimeCycle
();
List
<
PerformanceTimeCycleDTO
>
listAll
PerformanceTimeCycle
();
/**
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/remote/performance/PerformanceTimeCycleRemoteImpl.java
View file @
164dfa3
...
...
@@ -19,7 +19,7 @@ public class PerformanceTimeCycleRemoteImpl implements PerformanceTimeCycleRemot
}
@Override
public
List
<
PerformanceTimeCycleDTO
>
get
PerformanceTimeCycle
()
{
public
List
<
PerformanceTimeCycleDTO
>
listAll
PerformanceTimeCycle
()
{
return
performanceTimeCycleService
.
list
();
}
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/AttendanceDataCleansingService.java
View file @
164dfa3
...
...
@@ -87,7 +87,7 @@ public class AttendanceDataCleansingService {
// 失败记录最大容量(防止内存溢出)
Integer
MAX_FAILURE_RECORDS
=
OrePropertyConfigurer
.
getProperty
(
"MAX_FAILURE_RECORDS"
,
Integer
.
class
,
1000
);
// 是否开启多线程处理(1-不使用,2-使用)
Integer
USE_MULTITHREAD
=
OrePropertyConfigurer
.
getProperty
(
"USE_MULTITHREAD"
,
Integer
.
class
,
2
);
Integer
USE_MULTITHREAD
=
OrePropertyConfigurer
.
getProperty
(
"USE_MULTITHREAD"
,
Integer
.
class
,
1
);
// 允许的最近商户距离(公里)
Double
JUDGE_DISTANCE
=
OrePropertyConfigurer
.
getProperty
(
"judgeDistance"
,
Double
.
class
,
0.1
);
// 考勤打卡门店清单
...
...
@@ -302,6 +302,11 @@ public class AttendanceDataCleansingService {
// 1. 遍历每个考勤记录
for
(
StaffQwClockClean
clockInfo
:
staffQwClockCleans
)
{
log
.
info
(
"处理员工 {} ({}) 考勤数据-打卡日期:{},\n上班打卡时间:{},下班打卡时间:{},\n上班打卡经纬度:{},{},下班打卡经纬度:{},{}"
,
employee
.
getStaffName
(),
employee
.
getStaffPhone
(),
clockInfo
.
getClockInDate
(),
clockInfo
.
getClockInTimeStart
(),
clockInfo
.
getClockOutTimeEnd
(),
clockInfo
.
getClockInAddrLng
(),
clockInfo
.
getClockInAddrLat
(),
clockInfo
.
getClockOutAddrLng
(),
clockInfo
.
getClockOutAddrLat
());
try
{
// 2. 处理每条考勤记录
// 判断该打卡日期是否在离职直接之后,如果在离职日期之后则不计算
...
...
@@ -378,16 +383,19 @@ public class AttendanceDataCleansingService {
if
(
ObjectUtil
.
isNotEmpty
(
clockInfo
.
getClockInTimeStart
())
&&
StrUtil
.
isNotBlank
(
clockInfo
.
getClockInAddrLng
())
&&
StrUtil
.
isNotBlank
(
clockInfo
.
getClockInAddrLat
()))
{
log
.
info
(
"采用策略一"
);
return
new
ClockInStrategyOne
();
}
// 2. 下班打卡时间不为空 下班打卡经纬度不为空 - 策略二
if
(
ObjectUtil
.
isNotEmpty
(
clockInfo
.
getClockOutTimeEnd
())
&&
StrUtil
.
isNotBlank
(
clockInfo
.
getClockOutAddrLng
())
&&
StrUtil
.
isNotBlank
(
clockInfo
.
getClockOutAddrLat
()))
{
log
.
info
(
"采用策略二"
);
return
new
ClockInStrategyTwo
();
}
// 4. 没有经纬度,使用默认策略
log
.
info
(
"采用默认策略"
);
return
new
DefaultClockInStrategy
();
}
...
...
@@ -751,11 +759,14 @@ public class AttendanceDataCleansingService {
public
ClockInResult
process
(
StaffQwClockClean
clockInfo
,
DateTime
lastMonthYMD
,
StaffBeisenBaseInfo
employee
)
{
// 1. 获取最近的商户
MerchantAttendanceList
merchant
=
findNearestMerchant
(
clockInfo
.
getClockInAddrLng
(),
clockInfo
.
getClockInAddrLat
());
if
(
ObjectUtil
.
isEmpty
(
merchant
))
{
// 如果没有找到最近的商户,使用默认策略
log
.
info
(
"策略一-没有找到最近的商户,使用默认策略"
);
return
new
DefaultClockInStrategy
().
process
(
clockInfo
,
lastMonthYMD
,
employee
);
}
log
.
info
(
"已找到最近的商户: {}-{},上下班打卡时间:{}-{},经纬度:{},{}"
,
merchant
.
getId
(),
merchant
.
getMerchantName
(),
clockInfo
.
getClockInTimeStart
(),
clockInfo
.
getClockOutTimeEnd
(),
merchant
.
getAddressLng
(),
merchant
.
getAddressLat
());
// 2. 处理打卡时间
return
processWithMerchant
(
clockInfo
,
merchant
,
employee
);
...
...
@@ -764,6 +775,8 @@ public class AttendanceDataCleansingService {
private
ClockInResult
processWithMerchant
(
StaffQwClockClean
clockInfo
,
MerchantAttendanceList
merchant
,
StaffBeisenBaseInfo
employee
)
{
log
.
info
(
"策略一:处理打卡时间:{}-{},经纬度:{},{}"
,
clockInfo
.
getClockInTimeStart
(),
clockInfo
.
getClockOutTimeEnd
(),
merchant
.
getAddressLng
(),
merchant
.
getAddressLat
());
String
clockInDate
=
clockInfo
.
getClockInDate
();
String
officialDate
=
employee
.
getOfficialDate
();
// yyyy-MM-dd 比较clockInDate officialDate 日期大小 该打卡日期是否转正后
...
...
@@ -895,6 +908,7 @@ public class AttendanceDataCleansingService {
if
(
ObjectUtil
.
isEmpty
(
merchant
))
{
// 如果没有找到最近的商户,使用默认策略
log
.
info
(
"策略二-没有找到最近的商户,使用默认策略"
);
return
new
DefaultClockInStrategy
().
process
(
clockInfo
,
lastMonthYMD
,
employee
);
}
...
...
@@ -903,6 +917,7 @@ public class AttendanceDataCleansingService {
}
private
ClockInResult
processWithTwo
(
StaffQwClockClean
clockInfo
,
MerchantAttendanceList
merchant
,
StaffBeisenBaseInfo
employee
)
{
log
.
info
(
"采用策略二: clockInfo:{}"
,
clockInfo
);
String
clockInDate
=
clockInfo
.
getClockInDate
();
String
officialDate
=
employee
.
getOfficialDate
();
BigDecimal
totalWorkHours
=
BigDecimal
.
ZERO
;
...
...
@@ -1037,7 +1052,7 @@ public class AttendanceDataCleansingService {
if
(
ObjectUtil
.
isNotEmpty
(
clockInfo
.
getClockOutTimeEnd
()))
{
// 使用默认考勤时间
JudgeResult
timeRangeResult
=
TimeRangeChecker
.
getReasonForNotInRange
(
clockInfo
.
getClock
InTimeStart
(),
DEFAULT_CLOCK_OUT_TIME
,
LATEST_CLOCK_OUT_TIME
,
1
);
clockInfo
.
getClock
OutTimeEnd
(),
DEFAULT_CLOCK_OUT_TIME
,
LATEST_CLOCK_OUT_TIME
,
1
);
if
(
timeRangeResult
.
getInRangeType
()
==
1
)
{
// 在打卡时间范围内
normalClockCount
++;
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/ClockInCompleteAnalysisStaffService.java
View file @
164dfa3
...
...
@@ -6,6 +6,7 @@ import cn.com.glsx.dj.staff.mapper.perfSalary.StaffQwClockInInfoMapper;
import
cn.com.glsx.dj.staff.model.perfSalary.StaffQwClockClean
;
import
cn.com.glsx.dj.staff.model.perfSalary.StaffQwClockInInfo
;
import
cn.com.glsx.dj.staff.util.HttpUtil
;
import
cn.com.glsx.dj.staff.util.LocationResponse
;
import
cn.com.glsx.scrm.wechat.dto.workwechat.checkin.request.GetWorkWechatUserCheckInDataRequestDTO
;
import
cn.com.glsx.scrm.wechat.dto.workwechat.checkin.response.WorkWechatUserCheckInDataResponseDTO
;
import
cn.hutool.core.collection.CollUtil
;
...
...
@@ -14,6 +15,7 @@ import cn.hutool.core.date.DateTime;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -38,6 +40,10 @@ public class ClockInCompleteAnalysisStaffService {
@Resource
private
StaffQwClockCleanMapper
staffQwClockCleanMapper
;
// 测试 pbKP9T69inAX0GVwS9uar2l1Yz6OLyyg
// 线上 j140gfsl1LTZeUYH8hEUrfXVqOUcRH1C
String
baiduAk
=
OrePropertyConfigurer
.
getProperty
(
"baidu.ak"
,
String
.
class
,
"j140gfsl1LTZeUYH8hEUrfXVqOUcRH1C"
);
public
void
syncQwClockInDetailData
(
String
clockInDateStr
)
{
Integer
merchantId
=
OrePropertyConfigurer
.
getProperty
(
"syncQwClockInData.build.merchantId"
,
Integer
.
class
,
44202977
);
// 查询企微打卡表指定日期所有人员
...
...
@@ -80,7 +86,7 @@ public class ClockInCompleteAnalysisStaffService {
int
batchCount
=
(
int
)
Math
.
ceil
((
double
)
totalUserCount
/
100
);
log
.
info
(
"开始同步企微打卡数据:总用户数={},分{}个批次处理"
,
totalUserCount
,
batchCount
);
for
(
List
<
String
>
userIdList
:
partition
(
new
ArrayList
<>(
userIdSet
),
100
))
{
handlerData
(
userIdList
,
requestDTO
,
userIdStaffPhoneMap
);
taskExecutor
.
execute
(()
->
handlerData
(
userIdList
,
requestDTO
,
userIdStaffPhoneMap
)
);
}
}
...
...
@@ -153,11 +159,21 @@ public class ClockInCompleteAnalysisStaffService {
.
min
(
Comparator
.
comparingLong
(
CheckInRecordDTO:
:
getCheckinTime
));
// 如果当前记录中没有打卡照片或者打卡状态为0,且找到了上班打卡记录 保存经纬度信息
if
(
checkIn
.
isPresent
())
{
Integer
lng
=
checkIn
.
get
().
getLng
();
Integer
lat
=
checkIn
.
get
().
getLat
();
record
.
setClockInAddrLng
(
ObjectUtil
.
isEmpty
(
lng
)
?
null
:
((
double
)
lng
/
1000000
)
+
""
);
record
.
setClockInAddrLat
(
ObjectUtil
.
isEmpty
(
lat
)
?
null
:
((
double
)
lat
/
1000000
)
+
""
);
record
.
setClockInAddrInfo
(
checkIn
.
get
().
getLocationDetail
());
String
locationDetail
=
checkIn
.
get
().
getLocationDetail
();
if
(
StrUtil
.
isNotBlank
(
locationDetail
))
{
String
url
=
"https://api.map.baidu.com/geocoding/v3/?address="
+
locationDetail
+
"&output=json&ak="
+
baiduAk
+
"&ret_coordtype=gcj02ll"
;
String
s
=
cn
.
hutool
.
http
.
HttpUtil
.
get
(
url
);
LocationResponse
bean
=
JSONUtil
.
toBean
(
s
,
LocationResponse
.
class
);
if
(
ObjectUtil
.
equals
(
bean
.
getStatus
(),
0
))
{
String
lng
=
bean
.
getResult
().
getLocation
().
getLng
();
String
lat
=
bean
.
getResult
().
getLocation
().
getLat
();
record
.
setClockInAddrLng
(
StrUtil
.
isBlank
(
lng
)
?
null
:
lng
);
record
.
setClockInAddrLat
(
StrUtil
.
isBlank
(
lat
)
?
null
:
lat
);
}
else
{
log
.
error
(
"百度地图接口异常:{}"
,
s
);
}
}
record
.
setClockInAddrInfo
(
locationDetail
);
record
.
setClockInTimeStart
(
DateUtil
.
date
(
checkIn
.
get
().
getCheckinTime
()
*
1000
));
}
// 查找下班打卡记录(最晚的一次,且有照片媒体文件)
...
...
@@ -169,10 +185,20 @@ public class ClockInCompleteAnalysisStaffService {
.
max
(
Comparator
.
comparingLong
(
CheckInRecordDTO:
:
getCheckinTime
));
// 如果当前记录中没有下班打卡照片,且找到了下班打卡记录 保存经纬度信息
if
(
checkOut
.
isPresent
())
{
Integer
lng
=
checkOut
.
get
().
getLng
();
Integer
lat
=
checkOut
.
get
().
getLat
();
record
.
setClockOutAddrLng
(
ObjectUtil
.
isEmpty
(
lng
)
?
null
:
((
double
)
lng
/
1000000
)
+
""
);
record
.
setClockOutAddrLat
(
ObjectUtil
.
isEmpty
(
lat
)
?
null
:
((
double
)
lat
/
1000000
)
+
""
);
String
locationDetail
=
checkOut
.
get
().
getLocationDetail
();
if
(
StrUtil
.
isNotBlank
(
locationDetail
))
{
String
url
=
"https://api.map.baidu.com/geocoding/v3/?address="
+
locationDetail
+
"&output=json&ak="
+
baiduAk
+
"&ret_coordtype=gcj02ll"
;
String
s
=
cn
.
hutool
.
http
.
HttpUtil
.
get
(
url
);
LocationResponse
bean
=
JSONUtil
.
toBean
(
s
,
LocationResponse
.
class
);
if
(
ObjectUtil
.
equals
(
bean
.
getStatus
(),
0
))
{
String
lng
=
bean
.
getResult
().
getLocation
().
getLng
();
String
lat
=
bean
.
getResult
().
getLocation
().
getLat
();
record
.
setClockOutAddrLng
(
StrUtil
.
isBlank
(
lng
)
?
null
:
lng
);
record
.
setClockOutAddrLat
(
StrUtil
.
isBlank
(
lat
)
?
null
:
lat
);
}
else
{
log
.
error
(
"百度地图接口异常:{}"
,
s
);
}
}
record
.
setClockOutAddrInfo
(
checkOut
.
get
().
getLocationDetail
());
record
.
setClockOutTimeEnd
(
DateUtil
.
date
(
checkOut
.
get
().
getCheckinTime
()
*
1000
));
}
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/EffectiveReferralReviewMiniProgramService.java
View file @
164dfa3
...
...
@@ -55,6 +55,7 @@ public class EffectiveReferralReviewMiniProgramService {
//特殊逻辑:根据商户门店id去重,根据门店首字母倒序。要根据门店的不同业务场景的数据判断是否已提交和未提交。
//不同业务场景`scene_type` '业务场景:1-精品升级(轻改);2-会员权益(广联权益);3-单延保 状态`status` '状态:0-未提交,1-草稿,2-已提交',全部为已提交时,总的提交状态submitStatus才是已提交。
//注意:要跟服务商户表dj_car_life_service_merchant根据`merchant_id`关联,用于筛选项门店搜索,sal_effective_referral_review作为主表
request
.
getMerchantIds
().
addAll
(
Lists
.
newArrayList
(
44211832
,
44209298
,
44209902
,
44209880
));
List
<
EffectiveReferralReviewCommonDTO
>
list
=
effectiveReferralReviewMapper
.
selectStoreList
(
request
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
list
;
...
...
@@ -182,6 +183,7 @@ public class EffectiveReferralReviewMiniProgramService {
referralDTO
.
setRemark
(
referralReviewDTO
.
getRemark
());
referralDTO
.
setImageUrls
(
referralReviewDTO
.
getImageUrls
());
referralDTO
.
setEffectiveReferralCountDTOS
(
effectiveReferralCountDTOS
);
referralDTO
.
setStatus
(
referralReviewDTO
.
getStatus
().
byteValue
());
sceneTypeEffectiveReferrals
.
add
(
referralDTO
);
}
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/perfSalary/EffectiveReferralReviewService.java
View file @
164dfa3
...
...
@@ -5,6 +5,8 @@ import cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewCommonDTO;
import
cn.com.glsx.dj.staff.dto.perfSalary.EffectiveReferralReviewDTO
;
import
cn.com.glsx.dj.staff.dto.perfSalary.MerchantBrandReportDTO
;
import
cn.com.glsx.dj.staff.dto.perfSalary.MerchantCarBrandDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
import
cn.com.glsx.dj.staff.enums.PerformanceTimeCycleCodeEnum
;
import
cn.com.glsx.dj.staff.mapper.perfSalary.EffectiveReferralReviewMapper
;
import
cn.com.glsx.dj.staff.model.perfSalary.EffectiveReferralReview
;
import
cn.com.glsx.dj.staff.service.staffPerformance.PerformanceTimeCycleService
;
...
...
@@ -101,10 +103,10 @@ public class EffectiveReferralReviewService {
List
<
EffectiveReferralReviewCommonDTO
>
list
=
effectiveReferralReviewMapper
.
selectStoreEffectiveReferralList
(
pagination
.
getCondition
());
//2、查询T1时间配置
//
PerformanceTimeCycleDTO performanceTimeCycleDTO = performanceTimeCycleService.selectByCode(PerformanceTimeCycleCodeEnum.T1.getCode());
PerformanceTimeCycleDTO
performanceTimeCycleDTO
=
performanceTimeCycleService
.
selectByCode
(
PerformanceTimeCycleCodeEnum
.
T1
.
getCode
());
//3、填充复核状态,待复核状态下的数据,如果当前时间大于T1时间配置内的结束时间,置为已失效
/*
for (EffectiveReferralReviewCommonDTO item : list) {
for
(
EffectiveReferralReviewCommonDTO
item
:
list
)
{
if
(
Objects
.
nonNull
(
performanceTimeCycleDTO
)
&&
performanceTimeCycleDTO
.
getStartDate
()
!=
null
&&
performanceTimeCycleDTO
.
getEndDate
()
!=
null
...
...
@@ -113,7 +115,7 @@ public class EffectiveReferralReviewService {
item
.
setIsReviewed
(
2
);
}
}
}
*/
}
//4、返回结果
pagination
=
RpcPagination
.
copyPage
(
page
);
...
...
@@ -133,7 +135,18 @@ public class EffectiveReferralReviewService {
if
(
referralReviewCommonDTOS
.
isEmpty
())
{
return
null
;
}
return
referralReviewCommonDTOS
.
get
(
0
);
EffectiveReferralReviewCommonDTO
reviewCommonDTO
=
referralReviewCommonDTOS
.
get
(
0
);
//2、查询T1时间配置
PerformanceTimeCycleDTO
performanceTimeCycleDTO
=
performanceTimeCycleService
.
selectByCode
(
PerformanceTimeCycleCodeEnum
.
T1
.
getCode
());
if
(
Objects
.
nonNull
(
performanceTimeCycleDTO
)
&&
performanceTimeCycleDTO
.
getStartDate
()
!=
null
&&
performanceTimeCycleDTO
.
getEndDate
()
!=
null
&&
reviewCommonDTO
.
getIsReviewed
().
equals
(
0
))
{
if
(
new
Date
().
after
(
performanceTimeCycleDTO
.
getEndDate
()))
{
reviewCommonDTO
.
setIsReviewed
(
2
);
}
}
return
reviewCommonDTO
;
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
RpcServiceException
.
class
)
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/salary/StaffMonthSalarySlipService.java
View file @
164dfa3
...
...
@@ -730,30 +730,30 @@ public class StaffMonthSalarySlipService {
}
StaffMonthSalarySlipSend
monthSalary
=
list
.
get
(
0
);
StaffMonthSalarySlipSendDTO
resp
=
new
StaffMonthSalarySlipSendDTO
();
staffMonthSalarySlipSend
.
setStaffName
(
monthSalary
.
getStaffName
());
staffMonthSalarySlipSend
.
setStaffPhone
(
monthSalary
.
getStaffPhone
());
staffMonthSalarySlipSend
.
setBusinessTypes
(
monthSalary
.
getBusinessTypes
());
staffMonthSalarySlipSend
.
setSalaryMonth
(
monthSalary
.
getSalaryMonth
());
staffMonthSalarySlipSend
.
setFinalDataFlag
(
monthSalary
.
getFinalDataFlag
());
staffMonthSalarySlipSend
.
setActualWorkDay
(
monthSalary
.
getActualWorkDay
());
staffMonthSalarySlipSend
.
setMinimumSalary
(
monthSalary
.
getMinimumSalary
());
staffMonthSalarySlipSend
.
setPerformanceLevel
(
monthSalary
.
getPerformanceLevel
());
staffMonthSalarySlipSend
.
setPerformanceSalary
(
monthSalary
.
getPerformanceSalary
());
staffMonthSalarySlipSend
.
setCommissionPrice
(
monthSalary
.
getCommissionPrice
());
staffMonthSalarySlipSend
.
setDailyDeductMoney
(
monthSalary
.
getDailyDeductMoney
());
staffMonthSalarySlipSend
.
setPadDeductMoney
(
monthSalary
.
getPadDeductMoney
());
staffMonthSalarySlipSend
.
setDeferExpenses
(
monthSalary
.
getDeferExpenses
());
staffMonthSalarySlipSend
.
setDeferIncome
(
monthSalary
.
getDeferIncome
());
staffMonthSalarySlipSend
.
setOtherDeduction
(
monthSalary
.
getOtherDeduction
());
staffMonthSalarySlipSend
.
setOtherRewards
(
monthSalary
.
getOtherRewards
());
staffMonthSalarySlipSend
.
setSalary
(
monthSalary
.
getSalary
());
staffMonthSalarySlipSend
.
setCreatedBy
(
monthSalary
.
getCreatedBy
());
staffMonthSalarySlipSend
.
setUpdatedBy
(
monthSalary
.
getUpdatedBy
());
staffMonthSalarySlipSend
.
setDeletedFlag
(
monthSalary
.
getDeletedFlag
());
staffMonthSalarySlipSend
.
setId
(
monthSalary
.
getId
());
staffMonthSalarySlipSend
.
setCreatedDate
(
monthSalary
.
getCreatedDate
());
staffMonthSalarySlipSend
.
setUpdatedDate
(
monthSalary
.
getUpdatedDate
());
staffMonthSalarySlipSend
.
setStatus
(
monthSalary
.
getStatus
());
resp
.
setStaffName
(
monthSalary
.
getStaffName
());
resp
.
setStaffPhone
(
monthSalary
.
getStaffPhone
());
resp
.
setBusinessTypes
(
monthSalary
.
getBusinessTypes
());
resp
.
setSalaryMonth
(
monthSalary
.
getSalaryMonth
());
resp
.
setFinalDataFlag
(
monthSalary
.
getFinalDataFlag
());
resp
.
setActualWorkDay
(
monthSalary
.
getActualWorkDay
());
resp
.
setMinimumSalary
(
monthSalary
.
getMinimumSalary
());
resp
.
setPerformanceLevel
(
monthSalary
.
getPerformanceLevel
());
resp
.
setPerformanceSalary
(
monthSalary
.
getPerformanceSalary
());
resp
.
setCommissionPrice
(
monthSalary
.
getCommissionPrice
());
resp
.
setDailyDeductMoney
(
monthSalary
.
getDailyDeductMoney
());
resp
.
setPadDeductMoney
(
monthSalary
.
getPadDeductMoney
());
resp
.
setDeferExpenses
(
monthSalary
.
getDeferExpenses
());
resp
.
setDeferIncome
(
monthSalary
.
getDeferIncome
());
resp
.
setOtherDeduction
(
monthSalary
.
getOtherDeduction
());
resp
.
setOtherRewards
(
monthSalary
.
getOtherRewards
());
resp
.
setSalary
(
monthSalary
.
getSalary
());
resp
.
setCreatedBy
(
monthSalary
.
getCreatedBy
());
resp
.
setUpdatedBy
(
monthSalary
.
getUpdatedBy
());
resp
.
setDeletedFlag
(
monthSalary
.
getDeletedFlag
());
resp
.
setId
(
monthSalary
.
getId
());
resp
.
setCreatedDate
(
monthSalary
.
getCreatedDate
());
resp
.
setUpdatedDate
(
monthSalary
.
getUpdatedDate
());
resp
.
setStatus
(
monthSalary
.
getStatus
());
return
resp
;
}
}
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/staffPerformance/PerformanceConfigApproveService.java
View file @
164dfa3
...
...
@@ -55,13 +55,20 @@ public class PerformanceConfigApproveService {
}
public
PerformanceConfigApproveDetailDTO
getPerformanceConfigApproveDetail
(
PerformanceConfigApproveDTO
dto
)
{
PerformanceConfigApproveDetailDTO
performanceConfigApproveDetail
=
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetail
(
dto
);
if
(
performanceConfigApproveDetail
==
null
)
{
PerformanceConfigApproveDetailDTO
result
=
performanceConfigApproveMapper
.
getPerformanceConfigApproveDetail
(
dto
);
if
(
result
==
null
)
{
return
null
;
}
List
<
PerformanceConfigMerchantBrandRefDTO
>
performanceConfigMerchantBrandRefDTOS
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
performanceConfigApproveDetail
.
getPerformanceConfigId
());
performanceConfigApproveDetail
.
setMerchantBrandRefList
(
performanceConfigMerchantBrandRefDTOS
);
return
performanceConfigApproveDetail
;
// 获取门店品牌
List
<
PerformanceConfigMerchantBrandRefDTO
>
performanceConfigMerchantBrandRefDTOS
=
performanceConfigMerchantBrandRefService
.
listByConfigId
(
result
.
getPerformanceConfigId
());
result
.
setMerchantBrandRefList
(
performanceConfigMerchantBrandRefDTOS
);
// 获取审批记录
List
<
PerformanceConfigApproveOperationRecordDTO
>
recordDTOList
=
performanceConfigApproveOperationRecordService
.
listByPerformanceConfigApproveId
(
dto
.
getId
());
result
.
setApproveOperationRecordList
(
recordDTOList
);
// 获取审批人配置
List
<
PerformanceApproveConfigDTO
>
performanceApproveConfigDTOS
=
performanceApproveConfigService
.
listAll
();
result
.
setApproveConfigList
(
performanceApproveConfigDTOS
);
return
result
;
}
public
PerformanceConfigApprovePermissionDTO
getPerformanceConfigApproveDetailAndPermission
(
PerformanceConfigApproveDTO
dto
)
{
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/util/DistanceTest.java
View file @
164dfa3
...
...
@@ -34,10 +34,15 @@ public class DistanceTest {
//(116.368904, 39.923423) (116.387271, 39.772501)
public
static
void
main
(
String
[]
args
)
{
double
lon1
=
116.368904
;
double
lat1
=
39.923423
;
double
lon2
=
116.387271
;
double
lat2
=
39.772501
;
// double lon1 = 116.368904;
// double lat1 = 39.923423;
// double lon2 = 116.387271;
// double lat2 = 39.772501;
double
lon1
=
108.2803613945588
;
double
lat1
=
22.77437977665505
;
double
lon2
=
108.2803613945588
;
double
lat2
=
22.77437977665505
;
double
dist
=
GetDistance
(
lat1
,
lon1
,
lat2
,
lon2
);
System
.
out
.
println
(
"输出结果:"
+
dist
*
1000
+
"m"
);
...
...
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/util/LocationResponse.java
0 → 100644
View file @
164dfa3
package
cn
.
com
.
glsx
.
dj
.
staff
.
util
;
import
lombok.Builder
;
import
lombok.Data
;
@Data
@Builder
public
class
LocationResponse
{
private
int
status
;
private
Result
result
;
@Data
@Builder
public
static
class
Result
{
private
Location
location
;
private
int
precise
;
private
int
confidence
;
private
int
comprehension
;
private
String
level
;
}
@Data
@Builder
public
static
class
Location
{
private
String
lng
;
private
String
lat
;
}
}
\ No newline at end of file
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveMapper.xml
View file @
164dfa3
...
...
@@ -20,75 +20,60 @@
<resultMap
id=
"DTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
extends=
"BaseResultMap"
>
</resultMap>
<!-- 分页DTO结果映射:联表后完整匹配所有字段 -->
<resultMap
id=
"PageDTOResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"c_scheme_name"
property=
"schemeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_business_type"
property=
"businessType"
jdbcType=
"TINYINT"
/>
<result
column=
"c_effective_month"
property=
"effectiveMonth"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_status"
property=
"status"
jdbcType=
"TINYINT"
/>
<result
column=
"a_merchant_names"
property=
"merchantNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_brands_names"
property=
"brandsNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_created_date"
property=
"submitDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"a_updated_date"
property=
"approveDate"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"ApproveDetailResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"a_performance_config_id"
property=
"performanceConfigId"
jdbcType=
"INTEGER"
/>
<!-- 新增的方案ID -->
<result
column=
"c_scheme_name"
property=
"schemeName"
jdbcType=
"VARCHAR"
/>
<result
column=
"c_scheme_type"
property=
"schemeType"
jdbcType=
"TINYINT"
/>
<result
column=
"c_effective_month"
property=
"effectiveMonth"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"ApprovePermissionResultMap"
type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO"
>
<id
column=
"a_id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"a_performance_config_id"
property=
"performanceConfigId"
jdbcType=
"INTEGER"
/>
<result
column=
"a_approve_remark"
property=
"approveRemark"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_approve_attachments"
property=
"approveAttachments"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_attachment_imgs"
property=
"attachmentImgs"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_submit_username"
property=
"submitUsername"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_approve_status"
property=
"approveStatus"
jdbcType=
"TINYINT"
/>
<result
column=
"a_merchant_names"
property=
"merchantNames"
jdbcType=
"VARCHAR"
/>
<result
column=
"a_brands_names"
property=
"brandsNames"
jdbcType=
"VARCHAR"
/>
<!-- 权限字段:1=查阅人/2=审批人/0=无权限 -->
<result
column=
"approve_permission"
property=
"approvePermission"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, 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
</sql>
<!-- 联表查询:审批主表 + 提成方案配置表 -->
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultMap=
"PageDTOResultMap"
>
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePageDTO"
>
SELECT
a.id AS
a_
id,
c.scheme_name AS
c_scheme_n
ame,
c.business_type AS
c_business_t
ype,
c.effective_month AS
c_effective_m
onth,
c.status AS
c_
status,
a.merchant_names AS
a_merchant_n
ames,
a.brands_names AS
a_brands_n
ames,
a.created_date AS
a_created_d
ate,
a.updated_date AS
a_updated_d
ate
a.id AS id,
c.scheme_name AS
schemeN
ame,
c.business_type AS
businessT
ype,
c.effective_month AS
effectiveM
onth,
c.status AS status,
a.merchant_names AS
merchantN
ames,
a.brands_names AS
brandsN
ames,
a.created_date AS
createdD
ate,
a.updated_date AS
updatedD
ate
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
ON a.performance_config_id = c.id
AND c.deleted_flag = 'N'
LEFT JOIN dj_car_life_performance_config_merchant_brand_ref ref
ON c.id = ref.performance_config_id
AND ref.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if
test=
"status != null"
>
AND c.status = #{status}
</if>
<if
test=
"businessType != null"
>
AND c.business_type = #{businessType}
</if>
<if
test=
"merchantId != null"
>
AND ref.merchant_id = #{merchantId}
</if>
GROUP BY
a.id, c.scheme_name, c.business_type, c.effective_month, c.status,
a.merchant_names, a.brands_names, a.created_date, a.updated_date
ORDER BY
a.created_date DESC
</select>
<select
id=
"getPerformanceConfigApproveDetail"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultMap=
"ApproveDetailResultMap"
>
<select
id=
"getPerformanceConfigApproveDetail"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDetailDTO"
>
SELECT
a.id AS a_id,
a.performance_config_id AS a_performance_config_id,
c.scheme_name AS c_scheme_name,
c.scheme_type AS c_scheme_type,
c.effective_month AS c_effective_month
a.id AS id,
a.performance_config_id AS performanceConfigId,
c.scheme_name AS schemeName,
c.scheme_type AS schemeType,
c.effective_month AS effectiveMonth,
a.approve_remark AS approveRemark,
a.attachment_imgs AS attachment_imgs
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_config c
...
...
@@ -96,39 +81,41 @@
AND c.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
<if
test=
"id != null"
>
AND a.id = #{id}
</if>
LIMIT 1
<if
test=
"id != null"
>
AND a.id = #{id}
</if>
LIMIT 1
</select>
<select
id=
"getPerformanceConfigApproveDetailAndPermission"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
result
Map=
"ApprovePermissionResultMap
"
>
result
Type=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApprovePermissionDTO
"
>
SELECT
a.id AS a
_i
d,
a.performance_config_id AS
a_performance_config_i
d,
a.approve_remark AS a
_approve_r
emark,
a.approve_attachments AS a
_approve_a
ttachments,
a.attachment_imgs AS a
_attachment_i
mgs,
a.submit_username AS
a_submit_u
sername,
a.approve_status AS a
_approve_s
tatus,
a.merchant_names AS
a_merchant_n
ames,
a.brands_names AS
a_brands_n
ames,
a.id AS a
pproveI
d,
a.performance_config_id AS
performanceConfigI
d,
a.approve_remark AS a
pproveR
emark,
a.approve_attachments AS a
pproveA
ttachments,
a.attachment_imgs AS a
ttachmentI
mgs,
a.submit_username AS
submitU
sername,
a.approve_status AS a
pproveS
tatus,
a.merchant_names AS
merchantN
ames,
a.brands_names AS
brandsN
ames,
CASE
WHEN ac.approver_type IS NOT NULL THEN CAST(ac.approver_type AS CHAR)
ELSE '0'
END AS approve
_p
ermission
ELSE '0'
END AS approve
P
ermission
FROM
dj_car_life_performance_config_approve a
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
LEFT JOIN dj_car_life_performance_approve_config ac
ON a.performance_config_id = ac.performance_config_id
AND ac.approver_mobile = #{mobile}
AND ac.deleted_flag = 'N'
WHERE
a.deleted_flag = 'N'
AND a.id = #{id}
a.deleted_flag = 'N'
AND a.id = #{id}
LIMIT 1
</select>
<insert
id=
"insertOne"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigApproveDTO"
useGeneratedKeys=
"true"
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigApproveOperationRecordMapper.xml
View file @
164dfa3
...
...
@@ -26,7 +26,7 @@
<sql
id=
"Base_Column_List"
>
id, performance_config_approve_id,
approve_
status, approver_type, push_status, approve_time, approve_opinion, approver_name,
id, performance_config_approve_id, status, approver_type, push_status, approve_time, approve_opinion, approver_name,
approver_mobile, created_by, created_date, updated_by, updated_date, deleted_flag
</sql>
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/PerformanceConfigMapper.xml
View file @
164dfa3
...
...
@@ -73,7 +73,6 @@
<select
id=
"listPerformanceConfig"
parameterType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
resultType=
"cn.com.glsx.dj.staff.dto.performance.PerformanceConfigPageDTO"
>
SELECT
c.id,
c.scheme_type,
c.scheme_name AS schemeName,
c.business_type AS businessType,
c.status,
...
...
@@ -86,7 +85,7 @@
AND r.deleted_flag = 'N'
WHERE
c.deleted_flag = 'N'
<if
test=
"scheme
_t
ype != null"
>
<if
test=
"scheme
T
ype != null"
>
AND c.scheme_type = #{schemeType}
</if>
GROUP BY
...
...
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