工单做了操作以后,排列顺序都要到第一位。
This commit is contained in:
parent
9f28180481
commit
a4fad99298
@ -379,6 +379,14 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
remark += "确认领料" + String.join(";", nameAndCount);
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.LL.getCode(), remark, image);
|
||||
|
||||
// 更新工单主表时间
|
||||
if (ObjectUtil.isNotEmpty(so) && ObjectUtil.isNotEmpty(so.getTwId())){
|
||||
DlTicketWares ticketWares = ticketWaresService.getById(so.getTwId());
|
||||
if (ObjectUtil.isNotEmpty(ticketWares) && ObjectUtil.isNotEmpty(ticketWares.getTicketId())){
|
||||
ticketsService.refreshUpdateTime(ticketWares.getTicketId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -420,6 +428,14 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
remark += "确认退料" + String.join(",", nameAndCount);
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.TL.getCode(), remark, image);
|
||||
|
||||
// 更新工单主表时间
|
||||
if (ObjectUtil.isNotEmpty(newSo) && ObjectUtil.isNotEmpty(newSo.getTwId())){
|
||||
DlTicketWares ticketWares = ticketWaresService.getById(newSo.getTwId());
|
||||
if (ObjectUtil.isNotEmpty(ticketWares) && ObjectUtil.isNotEmpty(ticketWares.getTicketId())){
|
||||
ticketsService.refreshUpdateTime(ticketWares.getTicketId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,4 +262,13 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
|
||||
* @param id id
|
||||
**/
|
||||
CustomerAndCarVO getCusAndCarById(String id);
|
||||
|
||||
/**
|
||||
* 用于刷新工单的更新时间
|
||||
*
|
||||
* @author 小李
|
||||
* @date 10:31 2024/11/27
|
||||
* @param id 工单ID
|
||||
**/
|
||||
void refreshUpdateTime(String id);
|
||||
}
|
||||
|
@ -443,6 +443,10 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
List<DictDataRespDTO> recordTypeList = dictDataApi.getDictDataList(DICT_REPAIR_RECORDS_TYPE);
|
||||
Map<String, String> typeMap = recordTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue, DictDataRespDTO::getLabel));
|
||||
result.setRecords(records.stream().peek(item -> item.setType(typeMap.get(item.getType()))).collect(Collectors.toList()));
|
||||
|
||||
// 更新主表时间
|
||||
refreshUpdateTime(id);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1862,6 +1866,21 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
customerAndCarVO.setCarInfo(BeanUtil.toBean(carMain, CarMainReqVO.class));
|
||||
return customerAndCarVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于刷新工单的更新时间
|
||||
*
|
||||
* @author 小李
|
||||
* @date 10:31 2024/11/27
|
||||
* @param id 工单ID
|
||||
**/
|
||||
@Override
|
||||
public void refreshUpdateTime(String id){
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getUpdateTime, LocalDateTime.now())
|
||||
.eq(DlRepairTickets::getId, id)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.tickets.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||
import cn.iocoder.yudao.module.tickets.mapper.DlRepairTitemMapper;
|
||||
import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
|
||||
@ -70,6 +71,10 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
|
||||
*/
|
||||
@Override
|
||||
public DlRepairTitem updateRepairAndSale(DlRepairTitem dlRepairTitem) {
|
||||
// 刷新主表时间
|
||||
if (ObjectUtil.isNotEmpty(dlRepairTitem.getTicketId())){
|
||||
repairTicketsService.refreshUpdateTime(dlRepairTitem.getTicketId());
|
||||
}
|
||||
baseMapper.updateRepairAndSale(dlRepairTitem);
|
||||
return dlRepairTitem;
|
||||
}
|
||||
@ -156,6 +161,8 @@ public class DlRepairTitemServiceImpl extends ServiceImpl<DlRepairTitemMapper, D
|
||||
**/
|
||||
@Override
|
||||
public List<DlRepairTitemRespVO> getProjList(String ticketId,String isOpen) {
|
||||
// 更新工单主表时间
|
||||
repairTicketsService.removeTicketById(ticketId);
|
||||
return dlRepairTitemMapper.selectProjList(ticketId,isOpen);
|
||||
}
|
||||
}
|
||||
|
@ -243,6 +243,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
if (CollectionUtil.isNotEmpty(ids)) {
|
||||
ids.forEach(id -> repairWorkerService.sentMessage(id, "您有新的配件申请单需要审核"));
|
||||
}
|
||||
|
||||
// 更新工单主表时间
|
||||
if (ObjectUtil.isNotEmpty(respVO.getTicketId())){
|
||||
repairTicketsService.refreshUpdateTime(respVO.getTicketId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -255,6 +260,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void removeTicketWares(String id) {
|
||||
// 更新工单主表时间
|
||||
DlTicketWares ticketWares = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(ticketWares) && ObjectUtil.isNotEmpty(ticketWares.getTicketId())){
|
||||
repairTicketsService.refreshUpdateTime(ticketWares.getTicketId());
|
||||
}
|
||||
// 删除主表
|
||||
baseMapper.deleteById(id);
|
||||
// 删除子表
|
||||
@ -505,6 +515,11 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
// 通知维修工
|
||||
// 查维修工的userId
|
||||
repairWorkerService.sentMessage(respVO.getRepairId(), type.equals("02") ? "您有新的领料单需要确认" : "您有新的退料单需要确认");
|
||||
|
||||
// 刷新工单主表时间
|
||||
if (ObjectUtil.isNotEmpty(respVO.getTicketId())){
|
||||
repairTicketsService.refreshUpdateTime(respVO.getTicketId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -569,6 +584,10 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
|
||||
twItemService.saveBatch(list);
|
||||
}
|
||||
|
||||
// 更新工单主表时间
|
||||
if (ObjectUtil.isNotEmpty(respVO.getTicketId())){
|
||||
repairTicketsService.refreshUpdateTime(respVO.getTicketId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user