Bladeren bron

质检商户根据字典配置统一处理

tanbin 7 maanden geleden
bovenliggende
commit
e0fcb2bfed

+ 3 - 6
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -1179,12 +1179,8 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
             }
         }
 
-        boolean isQa = false;
-        if ("393010594508869".equals(String.valueOf(mercId)) || "498503052238597".equals(String.valueOf(mercId))) {
-            isQa = true;
-        } else {
-            dto.setActiveState("1");
-        }
+        boolean isQa = dto.getIsQaMode();
+
         List<Long> searchDeviceIds = new ArrayList<>();
         if (StrUtil.isNotEmpty(searchKey) || StrUtil.isNotEmpty(dto.getAdminName())) {
             // 名称或者编号搜索设备
@@ -1275,6 +1271,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
         lqw.in(CollUtil.isNotEmpty(deviceIdList), DeviceInfo::getDeviceId, deviceIdList);
         lqw.like(StrUtil.isNotEmpty(deviceName), DeviceInfo::getDeviceName, deviceName).orderByAsc(true, DeviceInfo::getDeviceName, DeviceInfo::getDeviceId);
         List<DeviceInfoDto.Vo> deviceInfoList = copy(DeviceInfoDto.Vo.class, this.list(lqw));
+
         // 根据点位ID查询管理员名字
         List<Long> placeIdList = deviceInfoList.stream().map(DeviceInfoDto.Vo::getPlaceId).distinct().filter(Objects::nonNull).collect(Collectors.toList());
         List<MercPlaceDto.Vo> mercPlaceList = mercPlaceService.list(new MercPlaceDto.ListDto().setIds(placeIdList)).getData();

+ 3 - 0
device-api/src/main/java/com/xy/dto/DeviceInfoDto.java

@@ -1036,6 +1036,9 @@ public class DeviceInfoDto {
         @ApiModelProperty("管理员名字")
         private String adminName;
 
+        @ApiModelProperty("是否QA模式")
+        private Boolean isQaMode;
+
     }