Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1bf6aa5687
@ -559,6 +559,14 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
@Override
|
@Override
|
||||||
@DSTransactional
|
@DSTransactional
|
||||||
public void updateStatus(DlRepairTicketsRespVO respVO) {
|
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())) {
|
if (StringUtils.isNotEmpty(respVO.getTicketsWorkStatus())) {
|
||||||
// 更新工单主表
|
// 更新工单主表
|
||||||
LambdaUpdateWrapper<DlRepairTickets> wrapper = new LambdaUpdateWrapper<>();
|
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());
|
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()), "您有新的工单可以交车");
|
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), "您有新的工单可以交车");
|
||||||
} else {
|
} else {
|
||||||
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), message);
|
repairWorkerService.sentMessage(Long.valueOf(tickets.getAdviserId()), message);
|
||||||
@ -608,7 +616,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
|
List<Long> ids = permissionApi.getUserIdByRoleId(roleInfo.getId());
|
||||||
if (CollectionUtil.isEmpty(ids)) return;
|
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));
|
AdminUserRespDTO user = adminUserApi.getUser(ids.get(0));
|
||||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||||
@ -633,19 +641,23 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
return result + "上传了工单:" + no + "中" + projectName + "项目的维修记录";
|
return result + "上传了工单:" + no + "中" + projectName + "项目的维修记录";
|
||||||
// 施工完成
|
// 施工完成
|
||||||
case "sgwczj":
|
case "sgwczj":
|
||||||
result = result + "完成了工单:" + no + "中" + projectName + "项目";
|
if (ObjectUtil.isNotEmpty(finishType)){
|
||||||
switch (finishType) {
|
result = result + "完成了工单:" + no + "中" + projectName + "项目";
|
||||||
// 完成并移交下一班组
|
switch (finishType) {
|
||||||
case "01":
|
// 完成并移交下一班组
|
||||||
return result + "并移交工单给了" + nextName;
|
case "01":
|
||||||
// 完成并移交总检
|
return result + "并移交工单给了" + nextName;
|
||||||
case "02":
|
// 完成并移交总检
|
||||||
return result + "并移交给了总检";
|
case "02":
|
||||||
// 完成工单
|
return result + "并移交给了总检";
|
||||||
case "03":
|
// 完成工单
|
||||||
return who + "完成了工单";
|
case "03":
|
||||||
default:
|
return who + "完成了工单";
|
||||||
return "异常消息";
|
default:
|
||||||
|
return "异常消息";
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return result + "部分完成了工单:" + no + "中" + projectName + "项目";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return "异常消息";
|
return "异常消息";
|
||||||
|
Loading…
Reference in New Issue
Block a user