no message
This commit is contained in:
parent
477f252fd1
commit
232509dc14
|
|
@ -1055,6 +1055,24 @@ public class OrderMasterController extends BaseController {
|
|||
}
|
||||
countList = new ArrayList<>(uniqueOrderMap.values());
|
||||
|
||||
List<Long> filterCityIds = orderMaster.getCityIds();
|
||||
Long filterCityId = orderMaster.getCityId();
|
||||
if ((filterCityIds != null && !filterCityIds.isEmpty()) || filterCityId != null) {
|
||||
Set<Long> citySet = new HashSet<>();
|
||||
if (filterCityIds != null) {
|
||||
citySet.addAll(filterCityIds);
|
||||
}
|
||||
if (filterCityId != null) {
|
||||
citySet.add(filterCityId);
|
||||
}
|
||||
uniqueList = uniqueList.stream()
|
||||
.filter(o -> o.getCityId() != null && citySet.contains(o.getCityId()))
|
||||
.collect(Collectors.toList());
|
||||
countList = countList.stream()
|
||||
.filter(o -> o.getCityId() != null && citySet.contains(o.getCityId()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 按创建时间排序
|
||||
uniqueList.sort((o1, o2) -> {
|
||||
if (o1.getUpdateTimeAlias() == null && o2.getUpdateTimeAlias() == null) return 0;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,10 @@
|
|||
<if test="retainMoney != null">retain_money = #{retainMoney},</if>
|
||||
<if test="serviceCategoryId != null">service_category_id = #{serviceCategoryId},</if>
|
||||
<if test="serviceCategoryName != null and serviceCategoryName != ''">service_category_name = #{serviceCategoryName},</if>
|
||||
<if test="countdownHours != null">countdown_hours = #{countdownHours},</if>
|
||||
<choose>
|
||||
<when test="countdownHours != null">countdown_hours = #{countdownHours},</when>
|
||||
<otherwise>countdown_hours = NULL,</otherwise>
|
||||
</choose>
|
||||
|
||||
<if test="pcDeptRate != null and pcDeptRate != ''">pc_dept_rate = #{pcDeptRate},</if>
|
||||
<if test="pcDeptMoney != null">pc_dept_money = #{pcDeptMoney},</if>
|
||||
|
|
@ -143,7 +146,7 @@
|
|||
<if test="retainMoney != null and retainMoney != ''">retain_money,</if>
|
||||
<if test="serviceCategoryId != null">service_category_id,</if>
|
||||
<if test="serviceCategoryName != null and serviceCategoryName != ''">service_category_name,</if>
|
||||
<if test="countdownHours != null">countdown_hours,</if>
|
||||
countdown_hours,
|
||||
|
||||
<if test="pcDeptRate != null and pcDeptRate != ''">pc_dept_rate,</if>
|
||||
<if test="pcDeptMoney != null and pcDeptMoney != ''">pc_dept_money,</if>
|
||||
|
|
@ -171,7 +174,7 @@
|
|||
<if test="retainMoney != null and retainMoney != ''">#{retainMoney},</if>
|
||||
<if test="serviceCategoryId != null">#{serviceCategoryId},</if>
|
||||
<if test="serviceCategoryName != null and serviceCategoryName != ''">#{serviceCategoryName},</if>
|
||||
<if test="countdownHours != null">#{countdownHours},</if>
|
||||
#{countdownHours},
|
||||
|
||||
<if test="pcDeptRate != null and pcDeptRate != ''">#{pcDeptRate},</if>
|
||||
<if test="pcDeptMoney != null and pcDeptMoney != ''">#{pcDeptMoney},</if>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class AfterServiceRecord extends BaseEntity
|
|||
private BigDecimal platformRefund;
|
||||
|
||||
/** 客户最终确认:0为不同意,1为同意 */
|
||||
@Excel(name = "客户最终确认:0为不同意,1为同意")
|
||||
@Excel(name = "客户最终确认:0为不同意,1为同意,2为取消")
|
||||
private Long customerFinalCheck;
|
||||
|
||||
@Excel(name = "最终原路返还的金额")
|
||||
|
|
|
|||
|
|
@ -123,10 +123,10 @@ public class AfterServiceTimeoutTask {
|
|||
} else if (record.getWorkerFeedbackResult() != null &&
|
||||
(record.getWorkerFeedbackResult().equals(0L) || record.getWorkerFeedbackResult().equals(1L))) {
|
||||
// 倒计时3:师傅拒绝或同意后客户36小时不操作自动取消售后
|
||||
record.setCustomerFinalCheck(null);
|
||||
record.setCustomerFinalCheck(2L);
|
||||
record.setAfterServiceStatus(2); // 设置为已取消状态
|
||||
record.setIsAutoProcessed(1); // 自动处理
|
||||
|
||||
record.setWorkerReceiveConfirm(0);
|
||||
// // 检查是否需要恢复财务金额
|
||||
// if (record.getOriginalRefund() != null && record.getOriginalRefund().compareTo(java.math.BigDecimal.ZERO) > 0) {
|
||||
// log.info("售后取消,开始恢复财务金额,记录ID:{},原退款金额:{}",
|
||||
|
|
@ -144,16 +144,23 @@ public class AfterServiceTimeoutTask {
|
|||
|
||||
log.info("师傅拒绝/同意后客户超时自动取消,售后单取消完成,售后记录ID:{}", record.getId());
|
||||
}else if (record.getWorkerFeedbackResult() != null && record.getWorkerFeedbackResult().equals(2L)) {
|
||||
// 倒计时4:客户同意后36小时不操作自动同意完单
|
||||
record.setCustomerFinalCheck(null);
|
||||
//师傅重做补做完成时候,客户36小时不操作自动取消售后
|
||||
record.setCustomerFinalCheck(2L);
|
||||
record.setAfterServiceStatus(2); // 设置为已取消状态
|
||||
record.setIsAutoProcessed(1); // 自动处理
|
||||
record.setWorkerReceiveConfirm(0);
|
||||
|
||||
log.info("客户同意后超时自动取消,订单完成,售后记录ID:{}", record.getId());
|
||||
log.info("师傅重做补做完成时候,客户36小时不操作自动取消售后,订单完成,售后记录ID:{}", record.getId());
|
||||
}
|
||||
|
||||
// 更新记录
|
||||
afterServiceRecordService.updateAfterServiceRecord(record);
|
||||
if (record.getAfterServiceCategory() != null && record.getAfterServiceCategory().equals(1)) {
|
||||
// 商品售后
|
||||
afterServiceRecordService.updateGoodsAfterServiceRecord(record);
|
||||
} else {
|
||||
// 服务售后或其他类型
|
||||
afterServiceRecordService.updateAfterServiceRecord(record);
|
||||
}
|
||||
|
||||
// 恢复确认中倒计时
|
||||
afterServiceRecordService.resumeConfirmTimeout(record.getOrderDetailId());
|
||||
|
|
@ -169,8 +176,8 @@ public class AfterServiceTimeoutTask {
|
|||
|
||||
/**
|
||||
* 师傅重发补发超时处理
|
||||
* 快递为4天 其他未1天
|
||||
*
|
||||
* 同意为4天
|
||||
* 超时后自动按客户同意处理
|
||||
*/
|
||||
@Scheduled(fixedRate = 5 * 60 * 1000) // 5分钟执行一次
|
||||
|
|
@ -190,7 +197,7 @@ public class AfterServiceTimeoutTask {
|
|||
record.setRefundApplyTime(new Date());
|
||||
|
||||
// 更新记录
|
||||
afterServiceRecordService.updateAfterServiceRecord(record);
|
||||
afterServiceRecordService.updateGoodsAfterServiceRecord(record);
|
||||
|
||||
// 恢复确认中倒计时
|
||||
afterServiceRecordService.resumeConfirmTimeout(record.getOrderDetailId());
|
||||
|
|
|
|||
|
|
@ -274,6 +274,18 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
|||
Long one = 1L;
|
||||
Long two = 2L;
|
||||
AfterServiceRecord afterServiceRecord = this.selectAfterServiceRecordById(param.getId());
|
||||
if (param.getIsAutoProcessed() != null) {
|
||||
afterServiceRecord.setIsAutoProcessed(param.getIsAutoProcessed());
|
||||
}
|
||||
if (param.getAfterServiceStatus() != null) {
|
||||
afterServiceRecord.setAfterServiceStatus(param.getAfterServiceStatus());
|
||||
}
|
||||
if (param.getCustomerFinalCheck() != null) {
|
||||
afterServiceRecord.setCustomerFinalCheck(param.getCustomerFinalCheck());
|
||||
}
|
||||
if (param.getWorkerReceiveConfirm() != null) {
|
||||
afterServiceRecord.setWorkerReceiveConfirm(param.getWorkerReceiveConfirm());
|
||||
}
|
||||
Assert.notNull(afterServiceRecord, "售后记录不存在!");
|
||||
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
||||
|
||||
|
|
@ -316,6 +328,7 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
|||
if (param.getUpdateBy() != null) {
|
||||
afterServiceRecord.setUpdateBy(param.getUpdateBy());
|
||||
}
|
||||
|
||||
afterServiceRecordMapper.updateAfterServiceRecord(afterServiceRecord);
|
||||
log.info("师傅重做/补做完成,记录ID:{},完成时间:{}", param.getId(), afterServiceRecord.getRedoCompleteTime());
|
||||
return AjaxResult.success("重做/补做完成状态已更新");
|
||||
|
|
@ -577,6 +590,18 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
|
|||
Long one = 1L;
|
||||
Long two = 2L;
|
||||
AfterServiceRecord afterServiceRecord = this.selectAfterServiceRecordById(param.getId());
|
||||
if (param.getIsAutoProcessed() != null) {
|
||||
afterServiceRecord.setIsAutoProcessed(param.getIsAutoProcessed());
|
||||
}
|
||||
if (param.getAfterServiceStatus() != null) {
|
||||
afterServiceRecord.setAfterServiceStatus(param.getAfterServiceStatus());
|
||||
}
|
||||
if (param.getCustomerFinalCheck() != null) {
|
||||
afterServiceRecord.setCustomerFinalCheck(param.getCustomerFinalCheck());
|
||||
}
|
||||
if (param.getWorkerReceiveConfirm() != null) {
|
||||
afterServiceRecord.setWorkerReceiveConfirm(param.getWorkerReceiveConfirm());
|
||||
}
|
||||
Assert.notNull(afterServiceRecord, "售后记录不存在!");
|
||||
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
||||
boolean drawCash = orderDetail.getDrawCashTime() != null;
|
||||
|
|
|
|||
|
|
@ -316,9 +316,13 @@
|
|||
AND customer_final_check IS NULL
|
||||
AND (is_auto_processed IS NULL OR is_auto_processed = 0)
|
||||
AND (
|
||||
-- 所有类型统一:4天倒计时
|
||||
worker_resend_time <= DATE_SUB(NOW(), INTERVAL 4 DAY)
|
||||
AND worker_resend_time >= DATE_SUB(NOW(), INTERVAL 5790 MINUTE)
|
||||
-- workerResendType为1(快递/物流):4天倒计时
|
||||
(worker_resend_type = 1 AND worker_resend_time <= DATE_SUB(NOW(), INTERVAL 4 DAY)
|
||||
AND worker_resend_time >= DATE_SUB(NOW(), INTERVAL 5790 MINUTE))
|
||||
OR
|
||||
-- workerResendType为2或3(送货上门/自提):24小时倒计时
|
||||
(worker_resend_type IN (2, 3) AND worker_resend_time <= DATE_SUB(NOW(), INTERVAL 24 HOUR)
|
||||
AND worker_resend_time >= DATE_SUB(NOW(), INTERVAL 1440 MINUTE))
|
||||
)
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue