Merge branch 'dev' of http://122.51.230.86:3000/dianliang/lanan-system into dev
This commit is contained in:
commit
d1c037907b
@ -54,6 +54,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -273,6 +274,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
List<RepairProject> repairProjects = projectService.listByIds(ids);
|
||||
items.forEach(item -> repairProjects.stream().filter(i -> i.getId().equals(item.getProjectId())).findFirst().ifPresent(item::setProject));
|
||||
}
|
||||
result.setProjects(projects);
|
||||
|
||||
// 取配件
|
||||
List<DlRepairTitemReqVO> wares = items.stream().filter(item -> item.getItemType().equals("02")).collect(Collectors.toList());
|
||||
@ -281,6 +283,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
List<RepairWares> repairWares = waresService.listByIds(ids);
|
||||
items.forEach(item -> repairWares.stream().filter(i -> i.getId().equals(item.getPartId())).findFirst().ifPresent(item::setWare));
|
||||
}
|
||||
result.setWares(wares);
|
||||
// 取附加
|
||||
List<DlRepairTitemReqVO> others = items.stream().filter(item -> item.getItemType().equals("03")).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(others)) {
|
||||
@ -552,16 +555,20 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
@Override
|
||||
@DSTransactional
|
||||
public void updateStatus(DlRepairTicketsRespVO respVO){
|
||||
// 更新工单主表
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, respVO.getTicketsWorkStatus())
|
||||
.eq(DlRepairTickets::getId, respVO.getId())
|
||||
);
|
||||
// 更新工单子表
|
||||
titemService.update(new LambdaUpdateWrapper<DlRepairTitem>()
|
||||
.set(DlRepairTitem::getItemStatus, respVO.getItem().getItemStatus())
|
||||
.eq(DlRepairTitem::getId, respVO.getItem().getId())
|
||||
);
|
||||
if(StringUtils.isNotEmpty(respVO.getTicketsWorkStatus())){
|
||||
// 更新工单主表
|
||||
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
|
||||
.set(DlRepairTickets::getTicketsWorkStatus, respVO.getTicketsWorkStatus())
|
||||
.eq(DlRepairTickets::getId, respVO.getId())
|
||||
);
|
||||
}
|
||||
if(null!=respVO.getItem() && StringUtils.isNotEmpty(respVO.getItem().getItemStatus())){
|
||||
// 更新工单子表
|
||||
titemService.update(new LambdaUpdateWrapper<DlRepairTitem>()
|
||||
.set(DlRepairTitem::getItemStatus, respVO.getItem().getItemStatus())
|
||||
.eq(DlRepairTitem::getId, respVO.getItem().getId())
|
||||
);
|
||||
}
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(respVO.getId(), respVO.getItem().getId(), respVO.getRecordType(), respVO.getRemark(), respVO.getImage());
|
||||
}
|
||||
|
@ -45,4 +45,7 @@ public class DlRepairTicketsRespVO extends DlRepairTickets {
|
||||
private CustomerMain customerInfo;
|
||||
/** 车辆信息 */
|
||||
private CarMainRespVO carInfo;
|
||||
List<DlRepairTitemReqVO> wares;
|
||||
List<DlRepairTitemReqVO> projects;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user