Compare commits

..

4 Commits

Author SHA1 Message Date
xiaofajia
0f9fb58281 代码补正 2024-11-23 11:58:55 +08:00
xiaofajia
f67a6a1098 通知客户取车处的补正 2024-11-23 11:26:44 +08:00
xiaofajia
07e9852265 工单结算逻辑补正 2024-11-23 11:11:47 +08:00
xiaofajia
69463a58c1 工单结算逻辑修改 2024-11-23 10:42:10 +08:00
3 changed files with 28 additions and 11 deletions

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.custom.controller.admin;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
@ -23,6 +24,7 @@ import javax.validation.Valid;
import java.util.List;
import static cn.iocoder.yudao.common.BaseConstants.*;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
@ -190,11 +192,13 @@ public class CustomerMainController {
@PostMapping("/getByNameAndMobile")
@Operation(summary = "根据姓名和电话查询单条记录")
public CommonResult<?> getByNameAndMobile(@Valid @RequestBody CustomerMain customerMain) {
CustomerMain one = customerMainService.getOne(new LambdaQueryWrapper<CustomerMain>().and(item -> {
List<CustomerMain> list = customerMainService.list(new LambdaQueryWrapper<CustomerMain>().and(item -> {
item.eq(CustomerMain::getCusName, customerMain.getCusName())
.eq(CustomerMain::getPhoneNumber, customerMain.getPhoneNumber());
}));
return success(one);
if (CollectionUtil.isNotEmpty(list)) {
return success(list.get(0));
}
throw exception0(500, "系统异常");
}
}

View File

@ -491,13 +491,15 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
// 更新工单
// 在这里把工单的状态更新为已完成---需要判断如果是线上支付需要在支付回调更新
if (!repairTicketsRespVO.getPayType().equals("01")) {
// 不在这儿结束
// repairTicketsRespVO.setIsFinish("1");
// 在这里把工单的状态更新为已完成---需要判断如果是线上支付需要在支付回调更新----有点问题
if (repairTicketsRespVO.getPayType().equals("01")){
// 线上支付需要在回调中去更新状态工单状态和订单状态
}else {
// 线下支付和签单挂账才是直接结束工单和订单
// 更新工单
baseMapper.updateById(repairTicketsRespVO);
} else {
// 线下结账和签单挂账直接算已支付
// 更新订单
repairOrderInfo.setPayTime(LocalDateTime.now());
repairOrderInfo.setOrderStatus("1");
}
@ -1521,6 +1523,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.NO_PAY.getCode())
.eq(DlRepairTickets::getId, noticeCusVO.getId())
);
// 这里如果是拨打电话通知的就不走下面的逻辑了判断条件是看name是不是就是客户的名字
if (noticeCusVO.getName().equals(tickets.getUserName())){
repairRecordsService.saveRepairRecord(noticeCusVO.getId(), null, RecordTypeEnum.TZQC.getCode(), tickets.getAdviserName() + "电话通知客户取车", null);
return;
}
CustomerMain cus = customerService.getById(tickets.getUserId());
// 维修项目
List<DictDataRespDTO> repairType = dictDataApi.getDictDataList(DICT_REPAIR_TYPE);

View File

@ -169,11 +169,17 @@
</select>
<select id="getTicketsPage" resultMap="BaseResultMap">
<include refid="Base_SQL"/>
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus != '01'">
-- 已结算的
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus == '02'">
and drt.tickets_status in ('08', #{map.ticketsStatus})
</if>
-- 已作废的
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus == '03'">
and drt.tickets_status = #{map.ticketsStatus}
</if>
-- 待结算的
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus == '01'">
and (drt.tickets_status = #{map.ticketsStatus} or drt.tickets_status = '06')
and (drt.tickets_status = #{map.ticketsStatus})
</if>
<if test="map.ticketNo != null and map.ticketNo != ''">
and (