Compare commits
No commits in common. "0f9fb5828126834aad5f97f8ce47e8cc1d8440f5" and "fcf04d8ad257e66484119cbac99808883a89d8f9" have entirely different histories.
0f9fb58281
...
fcf04d8ad2
@ -1,6 +1,5 @@
|
|||||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
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.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||||
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
import cn.iocoder.yudao.module.custom.service.CustomerCarService;
|
||||||
@ -24,7 +23,6 @@ import javax.validation.Valid;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.common.BaseConstants.*;
|
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;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -192,13 +190,11 @@ public class CustomerMainController {
|
|||||||
@PostMapping("/getByNameAndMobile")
|
@PostMapping("/getByNameAndMobile")
|
||||||
@Operation(summary = "根据姓名和电话查询单条记录")
|
@Operation(summary = "根据姓名和电话查询单条记录")
|
||||||
public CommonResult<?> getByNameAndMobile(@Valid @RequestBody CustomerMain customerMain) {
|
public CommonResult<?> getByNameAndMobile(@Valid @RequestBody CustomerMain customerMain) {
|
||||||
List<CustomerMain> list = customerMainService.list(new LambdaQueryWrapper<CustomerMain>().and(item -> {
|
CustomerMain one = customerMainService.getOne(new LambdaQueryWrapper<CustomerMain>().and(item -> {
|
||||||
item.eq(CustomerMain::getCusName, customerMain.getCusName())
|
item.eq(CustomerMain::getCusName, customerMain.getCusName())
|
||||||
.eq(CustomerMain::getPhoneNumber, customerMain.getPhoneNumber());
|
.eq(CustomerMain::getPhoneNumber, customerMain.getPhoneNumber());
|
||||||
}));
|
}));
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
return success(one);
|
||||||
return success(list.get(0));
|
|
||||||
}
|
|
||||||
throw exception0(500, "系统异常");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -491,15 +491,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
|
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
|
||||||
|
|
||||||
// 更新工单
|
// 更新工单
|
||||||
// 在这里把工单的状态更新为已完成---需要判断,如果是线上支付,需要在支付回调更新----有点问题
|
// 在这里把工单的状态更新为已完成---需要判断,如果是线上支付,需要在支付回调更新
|
||||||
if (repairTicketsRespVO.getPayType().equals("01")){
|
if (!repairTicketsRespVO.getPayType().equals("01")) {
|
||||||
// 线上支付需要在回调中去更新状态工单状态和订单状态
|
// 不在这儿结束
|
||||||
|
// repairTicketsRespVO.setIsFinish("1");
|
||||||
}else {
|
|
||||||
// 线下支付和签单、挂账才是直接结束工单和订单
|
|
||||||
// 更新工单
|
|
||||||
baseMapper.updateById(repairTicketsRespVO);
|
baseMapper.updateById(repairTicketsRespVO);
|
||||||
// 更新订单
|
} else {
|
||||||
|
// 线下结账和签单挂账,直接算已支付
|
||||||
repairOrderInfo.setPayTime(LocalDateTime.now());
|
repairOrderInfo.setPayTime(LocalDateTime.now());
|
||||||
repairOrderInfo.setOrderStatus("1");
|
repairOrderInfo.setOrderStatus("1");
|
||||||
}
|
}
|
||||||
@ -1523,11 +1521,6 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.NO_PAY.getCode())
|
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.NO_PAY.getCode())
|
||||||
.eq(DlRepairTickets::getId, noticeCusVO.getId())
|
.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());
|
CustomerMain cus = customerService.getById(tickets.getUserId());
|
||||||
// 维修项目
|
// 维修项目
|
||||||
List<DictDataRespDTO> repairType = dictDataApi.getDictDataList(DICT_REPAIR_TYPE);
|
List<DictDataRespDTO> repairType = dictDataApi.getDictDataList(DICT_REPAIR_TYPE);
|
||||||
|
|||||||
@ -169,17 +169,11 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getTicketsPage" resultMap="BaseResultMap">
|
<select id="getTicketsPage" resultMap="BaseResultMap">
|
||||||
<include refid="Base_SQL"/>
|
<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}
|
and drt.tickets_status = #{map.ticketsStatus}
|
||||||
</if>
|
</if>
|
||||||
-- 待结算的
|
|
||||||
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus == '01'">
|
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus == '01'">
|
||||||
and (drt.tickets_status = #{map.ticketsStatus})
|
and (drt.tickets_status = #{map.ticketsStatus} or drt.tickets_status = '06')
|
||||||
</if>
|
</if>
|
||||||
<if test="map.ticketNo != null and map.ticketNo != ''">
|
<if test="map.ticketNo != null and map.ticketNo != ''">
|
||||||
and (
|
and (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user