Compare commits
No commits in common. "9bb6c0b201640833d5f0514217e05b27537f074e" and "01f5aa9017870d4dd16f64cba3424b5d42a70cd0" have entirely different histories.
9bb6c0b201
...
01f5aa9017
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||
import cn.iocoder.yudao.module.custom.service.CarMainService;
|
||||
import cn.iocoder.yudao.module.custom.service.UserCarService;
|
||||
@ -216,10 +215,8 @@ public class CarMainController {
|
||||
@PostMapping("/getByLicenseNumber")
|
||||
@Operation(summary = "根据车牌查单条记录")
|
||||
public CommonResult<?> getByLicenseNumber(@RequestBody CarMain carMain) {
|
||||
// 可能查到多条,只用一条就是,理论上讲是不会有多条的
|
||||
// CarMain one = carMainService.list(new LambdaQueryWrapper<CarMain>().eq(CarMain::getLicenseNumber, carMain.getLicenseNumber()));
|
||||
List<CarMain> list = carMainService.list(new LambdaQueryWrapper<CarMain>().eq(CarMain::getLicenseNumber, carMain.getLicenseNumber()).last("limit 1"));
|
||||
return success(CollectionUtil.isNotEmpty(list) ? list.get(0) : null);
|
||||
CarMain one = carMainService.getOne(new LambdaQueryWrapper<CarMain>().eq(CarMain::getLicenseNumber, carMain.getLicenseNumber()));
|
||||
return success(one);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -29,8 +29,7 @@ public class TicketsServiceImpl extends ServiceImpl<TicketsMapper, Tickets> impl
|
||||
baseMapper.update(new LambdaUpdateWrapper<Tickets>()
|
||||
.in(Tickets::getId, ticketIds)
|
||||
.set(Tickets::getTicketsStatus, "02")
|
||||
// 不在这儿结束
|
||||
// .set(Tickets::getIsFinish, "1")
|
||||
.set(Tickets::getIsFinish, "1")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,19 +336,6 @@ public class DlRepairTicketsController {
|
||||
return CommonResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否工单子表的任何一个类目没有价格或价格为0
|
||||
*
|
||||
* @param id 工单ID
|
||||
* @author 小李
|
||||
* @date 15:00 2024/11/16
|
||||
**/
|
||||
@GetMapping("/hasPrice")
|
||||
@Operation(summary = "判断是否工单子表的任何一个类目没有价格或价格为0")
|
||||
public CommonResult<?> hasPrice(@RequestParam("id")String id){
|
||||
return success(dlRepairTicketsService.hasPrice(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单子项
|
||||
*
|
||||
|
||||
@ -243,13 +243,4 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
|
||||
* @param respVO
|
||||
**/
|
||||
void overOrder(DlRepairTicketsRespVO respVO);
|
||||
|
||||
/**
|
||||
* 判断是否工单子表的任何一个类目没有价格或价格为0
|
||||
*
|
||||
* @param id 工单ID
|
||||
* @author 小李
|
||||
* @date 15:00 2024/11/16
|
||||
**/
|
||||
Boolean hasPrice(String id);
|
||||
}
|
||||
|
||||
@ -222,6 +222,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// });
|
||||
|
||||
|
||||
|
||||
// 门店信息
|
||||
Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();
|
||||
DeptRespDTO dept = deptApi.getDept(deptId);
|
||||
@ -447,8 +448,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 更新工单
|
||||
// 在这里把工单的状态更新为已完成---需要判断,如果是线上支付,需要在支付回调更新
|
||||
if (!repairTicketsRespVO.getPayType().equals("01")){
|
||||
// 不在这儿结束
|
||||
// repairTicketsRespVO.setIsFinish("1");
|
||||
repairTicketsRespVO.setIsFinish("1");
|
||||
baseMapper.updateById(repairTicketsRespVO);
|
||||
}else {
|
||||
// 线下结账和签单挂账,直接算已支付
|
||||
@ -1025,12 +1025,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
|
||||
/**
|
||||
* 指派施工,施工项目中不包含选中人员处理
|
||||
*
|
||||
* @author PQZ
|
||||
* @date 16:30 2024/11/13
|
||||
* @param ticketId 工单id
|
||||
* @param nowRepairId 当前处理人id
|
||||
* @param nowRepairName 当前处理人名称
|
||||
* @author PQZ
|
||||
* @date 16:30 2024/11/13
|
||||
**/
|
||||
private void setTicketItem(String ticketId,Long nowRepairId,String nowRepairName){
|
||||
//查询所有维修工
|
||||
@ -1469,29 +1468,6 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
repairRecordsService.saveRepairRecord(noticeCusVO.getId(), null, RecordTypeEnum.TZQC.getCode(), recordStr, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否工单子表的任何一个类目没有价格或价格为0
|
||||
*
|
||||
* @param id 工单ID
|
||||
* @author 小李
|
||||
* @date 15:00 2024/11/16
|
||||
**/
|
||||
@Override
|
||||
public Boolean hasPrice(String id) {
|
||||
List<DlRepairTitem> titems = titemService.list(new LambdaQueryWrapper<DlRepairTitem>().in(DlRepairTitem::getTicketId, id));
|
||||
for (DlRepairTitem item : titems) {
|
||||
// 如果有为空的,直接报错
|
||||
if (ObjectUtil.isEmpty(item.getItemPrice())) {
|
||||
throw exception0(500, "工单中有项目或配件没有设置价格,请服务顾问填写项目价格,仓库填写配件价格");
|
||||
}
|
||||
// 如果有为0的,那就提示,让操作人选择
|
||||
if (item.getItemPrice().equals(new BigDecimal("0.00"))){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新计算工单的一些数值,子表也要重新计算
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user