This commit is contained in:
PQZ 2024-10-18 23:48:07 +08:00
commit 345aaa77af

View File

@ -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;
@ -554,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());
}