bug修复

This commit is contained in:
attiya 2025-09-01 14:50:06 +08:00
parent e3ea282568
commit 28bdeb831c

View File

@ -631,10 +631,10 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
ebikeBikeFaultReport.setHandleState("1");
bikeCodes.add(ebikeBikeFaultReport.getBikeCode());
}
if (!bikeCodes.isEmpty()){
if (!bikeCodes.isEmpty()) {
UpdateChain.of(EbikeBikeInfo.class)
.set(EbikeBikeInfo::getIsInWarehouse,"0")
.in(EbikeBikeInfo::getBikeCode,bikeCodes);
.set(EbikeBikeInfo::getIsInWarehouse, "0")
.in(EbikeBikeInfo::getBikeCode, bikeCodes);
}
List<ReqEbikeFaultReportFileDto> fileList = reqEbikeBikeFaultHandleDto.getFileList();
if (!fileList.isEmpty()) {
@ -1209,7 +1209,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
*/
@Transactional // 添加事务注解
public String createWorkOrderDispatch(ReqWorkOrderDispatchDto eqWorkOrderDispatchDto) {
try {
// 获取 token 和用户信息
StaffFeign staffFeign = getStaffFeignInfo();
@ -1255,14 +1255,6 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
// 返回工单 ID
return ebikeBikeOrder.getOrderId();
} catch (Exception e) {
// 异常处理记录日志并抛出自定义异常或包装成 RuntimeException
// 可以使用日志工具例如 log4j slf4j记录错误详细信息
log.error("创建工单调度失败", e);
// 可根据需求抛出更具体的异常
throw new RuntimeException("创建工单调度时发生异常", e);
}
}
private void checkBikeCodes(ReqWorkOrderDispatchDto eqWorkOrderDispatchDto) {