修改判断 参数为空

This commit is contained in:
小朱 2025-05-26 16:07:59 +08:00
parent 18ab5ec446
commit 031bbdd41a

View File

@ -425,19 +425,19 @@ public class EbikeComponentServiceImpl implements EbikeComponentService {
String componentOutRecordId = ebikeComponentOutRecords.getComponentOutRecordId(); String componentOutRecordId = ebikeComponentOutRecords.getComponentOutRecordId();
if (params.getEbikeEcuOutRecords().size() > 0) { if (params.getEbikeEcuOutRecords()!=null && !params.getEbikeEcuOutRecords().isEmpty()) {
// 删除原有的ECU入库记录并保存新的记录 // 删除原有的ECU入库记录并保存新的记录
deleteAndInsertEcuOutRecords(componentOutRecordId, params.getEbikeEcuOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId); deleteAndInsertEcuOutRecords(componentOutRecordId, params.getEbikeEcuOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId);
if (stockInType == 1) { if (stockInType == 1) {
updateInventoryCount(ebikeComponentTypeInfo, orgId, params.getEbikeEcuOutRecords().size(), 2); updateInventoryCount(ebikeComponentTypeInfo, orgId, params.getEbikeEcuOutRecords().size(), 2);
} }
} else if (params.getEbikeBatteryOutRecords().size() > 0) { } else if (params.getEbikeBatteryOutRecords()!=null && !params.getEbikeBatteryOutRecords().isEmpty()) {
// 删除原有的电池入库记录并保存新的记录 // 删除原有的电池入库记录并保存新的记录
deleteAndInsertBatteryOutRecords(componentOutRecordId, params.getEbikeBatteryOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId); deleteAndInsertBatteryOutRecords(componentOutRecordId, params.getEbikeBatteryOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId);
if (stockInType == 1) { if (stockInType == 1) {
updateInventoryCount(ebikeComponentTypeInfo, orgId, params.getEbikeBatteryOutRecords().size(), 2); updateInventoryCount(ebikeComponentTypeInfo, orgId, params.getEbikeBatteryOutRecords().size(), 2);
} }
} else if (params.getEbikeHelmetOutRecords().size() > 0) { } else if (params.getEbikeHelmetOutRecords()!=null && !params.getEbikeHelmetOutRecords().isEmpty()) {
// 删除原有的头盔入库记录并保存新的记录 // 删除原有的头盔入库记录并保存新的记录
deleteAndInsertHelmetOutRecords(componentOutRecordId, params.getEbikeHelmetOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId); deleteAndInsertHelmetOutRecords(componentOutRecordId, params.getEbikeHelmetOutRecords(), stockInType, ebikeComponentTypeInfo, userId, orgId);
if (stockInType == 1) { if (stockInType == 1) {
@ -717,8 +717,6 @@ public class EbikeComponentServiceImpl implements EbikeComponentService {
break; break;
} }
} }
return JsonResult.success(resComponentOutRecordInfoDto); return JsonResult.success(resComponentOutRecordInfoDto);
} }
public StaffFeign getStaffFeignInfo() { public StaffFeign getStaffFeignInfo() {