Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
许允枞 2024-10-23 14:28:25 +08:00
commit 1bf6aa5687

View File

@ -559,6 +559,14 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
@Override
@DSTransactional
public void updateStatus(DlRepairTicketsRespVO respVO) {
// 如果是开始施工但项目还在施工中就不能施工
if (respVO.getRecordType().equals("kssg")){
DlRepairTitem titem = titemService.getById(respVO.getItem().getId());
if (titem.getItemStatus().equals("02")){
throw exception0(500, "选择的项目在施工中,不能重新开始施工");
}
}
if (StringUtils.isNotEmpty(respVO.getTicketsWorkStatus())) {
// 更新工单主表
LambdaUpdateWrapper<DlRepairTickets> wrapper = new LambdaUpdateWrapper<>();
@ -595,7 +603,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
String message = createMessage(tickets.getNowRepairName(), tickets.getTicketNo(), titem.getItemName(), respVO.getRecordType(), respVO.getFinishType(), respVO.getNextName());
// 通知服务顾问
// 如果员工完成了订单
if (respVO.getRecordType().equals("03") && respVO.getFinishType().equals("03")) {
if (respVO.getRecordType().equals("sgwczj") && respVO.getFinishType().equals("03")) {
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), "您有新的工单可以交车");
} else {
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), message);
@ -608,7 +616,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
if (CollectionUtil.isEmpty(ids)) return;
// 如果是移交给总检就需要通知总检并让其总检
if (respVO.getRecordType().equals("03") && respVO.getFinishType().equals("02")) {
if (respVO.getRecordType().equals("sgwczj") && respVO.getFinishType().equals("02")) {
// 工单移交给总检(理论上讲只有一个总检就算有多个这里面也只给一个)
AdminUserRespDTO user = adminUserApi.getUser(ids.get(0));
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
@ -633,19 +641,23 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
return result + "上传了工单:" + no + "" + projectName + "项目的维修记录";
// 施工完成
case "sgwczj":
result = result + "完成了工单:" + no + "" + projectName + "项目";
switch (finishType) {
// 完成并移交下一班组
case "01":
return result + "并移交工单给了" + nextName;
// 完成并移交总检
case "02":
return result + "并移交给了总检";
// 完成工单
case "03":
return who + "完成了工单";
default:
return "异常消息";
if (ObjectUtil.isNotEmpty(finishType)){
result = result + "完成了工单:" + no + "" + projectName + "项目";
switch (finishType) {
// 完成并移交下一班组
case "01":
return result + "并移交工单给了" + nextName;
// 完成并移交总检
case "02":
return result + "并移交给了总检";
// 完成工单
case "03":
return who + "完成了工单";
default:
return "异常消息";
}
}else {
return result + "部分完成了工单:" + no + "" + projectName + "项目";
}
default:
return "异常消息";