Compare commits
4 Commits
fcf04d8ad2
...
0f9fb58281
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f9fb58281 | ||
|
|
f67a6a1098 | ||
|
|
07e9852265 | ||
|
|
69463a58c1 |
@ -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, "系统异常");
|
||||
}
|
||||
|
||||
}
|
||||
@ -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);
|
||||
|
||||
@ -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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user