This commit is contained in:
Vinjor 2024-10-18 16:10:53 +08:00
parent c146d42c8c
commit 88dab0293f

View File

@ -495,17 +495,18 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
* @param reqVO 请求对象
**/
@Override
public void updateRepair(DlRepairTicketsReqVO reqVO){
// 指派的时候看下是不是已经有人接单了
public void updateRepair(DlRepairTicketsReqVO reqVO) {
// 指派的时候看下是不是已经有人接单了----vinjor-m 服务顾问指派不需要判断是否已有人接单
int update = baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
.set(DlRepairTickets::getNowRepairId, reqVO.getNowRepairId())
.set(DlRepairTickets::getNowRepairName, reqVO.getNowRepairName())
.and(item -> {
item.eq(DlRepairTickets::getId, reqVO.getId())
.eq(DlRepairTickets::getTicketsWorkStatus, "01");
})
//工单状态设置为---施工中
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.WORKING.getCode())
//维修状态设置为待接单
.set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING.getCode())
.and(item -> item.eq(DlRepairTickets::getId, reqVO.getId()))
);
if (update != 1){
if (update != 1) {
throw exception0(500, "工单已开始");
}
}