Prechádzať zdrojové kódy

fix. 客户设备导入空数据修改

caozixuan 8 mesiacov pred
rodič
commit
634deaa65b

+ 2 - 3
sop-business/src/main/java/com/qmth/sop/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -21,7 +21,6 @@ import com.qmth.sop.business.util.excel.BasicExcelListener;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.*;
 import com.qmth.sop.common.util.DateDisposeUtils;
-import com.qmth.sop.common.util.GsonUtil;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -281,7 +280,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                     Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.ERROR)).size() :
                     0;
             if (errorSize == 0) {
-                Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS))
+                Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS),"未读取到有效数据")
                         .forEach(e -> {
                             SysCustom sysCustom = new SysCustom();
                             sysCustom.setAddress(e.getAddress());
@@ -466,7 +465,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                         new QueryWrapper<SysSupplier>().lambda().eq(SysSupplier::getType, SupplierTypeEnum.DEVICE));
                 List<SysDeviceBrand> brandList = sysDeviceBrandService.list();
                 List<SysDeviceModel> modelList = sysDeviceModelService.list();
-                Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS))
+                Objects.requireNonNull(customImportDtoLinkedMultiValueMap.get(BasicExcelListener.SUCCESS),"未读取到有效数据")
                         .forEach(e -> {
                             SysDevice device = new SysDevice();
                             if (brandList.stream().noneMatch(r -> r.getBrand().equals(e.getBrand()))) {