修改工单完成状态的更新位置

This commit is contained in:
xiaofajia 2024-11-04 16:16:41 +08:00
parent 6a761fb4b3
commit ab35fd68c2

View File

@ -425,6 +425,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
repairOrderInfo.setPayType(repairTicketsRespVO.getPayType());
repairOrderInfoService.updateById(repairOrderInfo);
// 更新工单
// 在这里把工单的状态更新为已完成
repairTicketsRespVO.setIsFinish("1");
baseMapper.updateById(repairTicketsRespVO);
}
@ -1127,11 +1129,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
// 维修服务顾问
if (userRoleCode.equals(RepairRoleEnum.ADVISOR.getCode())) {
repairTicketsReqVO.setNowRepairId(loginUserId);
repairTicketsReqVO.setIsFinish("1");
// 因为完成状态需要在交车之后所以注掉这个
// repairTicketsReqVO.setIsFinish("1");
} else if (userRoleCode.equals(RepairRoleEnum.INSPECTION.getCode())) {
// 总检
repairTicketsReqVO.setNowRepairId(loginUserId);
repairTicketsReqVO.setIsFinish("0");
// 因为完成状态需要在交车之后所以注掉这个
// repairTicketsReqVO.setIsFinish("0");
} else {
return null;
}
@ -1153,7 +1157,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
repairRecordsService.saveRepairRecord(respVO.getId(), null, RecordTypeEnum.ZJ.getCode(), respVO.getRemark(), respVO.getImage());
// 更新工单
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
.set(DlRepairTickets::getIsFinish, "1")
// 因为完成状态需要在交车之后所以注掉这个
// .set(DlRepairTickets::getIsFinish, "1")
.setSql("now_repair_id = adviser_id")
.setSql("now_repair_name = adviser_name")
.eq(DlRepairTickets::getId, respVO.getId())