Commit 72e4670a by 杨林龙

车辆归属用全层级展示

1 parent 9434a0b7
package cn.com.glsx.admin.modules.model.export; package cn.com.glsx.admin.modules.model.export;
import cn.com.glsx.admin.modules.model.BaseOrgDto;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -14,7 +15,7 @@ import lombok.Data; ...@@ -14,7 +15,7 @@ import lombok.Data;
@ApiModel @ApiModel
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
public class DeviceActiveExprot { public class DeviceActiveExprot extends BaseOrgDto {
/** /**
* 工单号 * 工单号
**/ **/
......
...@@ -39,6 +39,9 @@ public class DeviceActiveService { ...@@ -39,6 +39,9 @@ public class DeviceActiveService {
@Autowired @Autowired
private UserApiService userApiService; private UserApiService userApiService;
@Autowired
private OrganizationApiService organizationApiService;
/** /**
* 查询设备激活列表 * 查询设备激活列表
* *
...@@ -52,6 +55,8 @@ public class DeviceActiveService { ...@@ -52,6 +55,8 @@ public class DeviceActiveService {
} }
List<DeviceActiveExprot> deviceActiveList = vehicleMapper.getBaseDeviceActiveListWithAuth(search); List<DeviceActiveExprot> deviceActiveList = vehicleMapper.getBaseDeviceActiveListWithAuth(search);
// 填充组织层级
organizationApiService.drawAllLevel(deviceActiveList);
// 数字类型转换为字符串类型 // 数字类型转换为字符串类型
deviceActiveList.forEach(deviceActiveExprot -> { deviceActiveList.forEach(deviceActiveExprot -> {
deviceActiveExprot.setDeviceTypeStr(TypeConverseEunm.DeviceTypeEnum.getStrByDeviceType(deviceActiveExprot.getDeviceType())); deviceActiveExprot.setDeviceTypeStr(TypeConverseEunm.DeviceTypeEnum.getStrByDeviceType(deviceActiveExprot.getDeviceType()));
...@@ -60,6 +65,7 @@ public class DeviceActiveService { ...@@ -60,6 +65,7 @@ public class DeviceActiveService {
if (!StringUtils.isEmpty(deviceActiveExprot.getLng()) && !StringUtils.isEmpty(deviceActiveExprot.getLat())) { if (!StringUtils.isEmpty(deviceActiveExprot.getLng()) && !StringUtils.isEmpty(deviceActiveExprot.getLat())) {
deviceActiveExprot.setLngAndLat(deviceActiveExprot.getLng() + "," + deviceActiveExprot.getLat()); deviceActiveExprot.setLngAndLat(deviceActiveExprot.getLng() + "," + deviceActiveExprot.getLat());
} }
deviceActiveExprot.setShopName(deviceActiveExprot.getBelongLevels());
}); });
getDeviceActiveData(deviceActiveList); getDeviceActiveData(deviceActiveList);
return deviceActiveList; return deviceActiveList;
...@@ -77,6 +83,8 @@ public class DeviceActiveService { ...@@ -77,6 +83,8 @@ public class DeviceActiveService {
userApiService.setCheckedOrgUsers(search); userApiService.setCheckedOrgUsers(search);
} }
List<DeviceActiveExprot> deviceActiveList = vehicleMapper.getBaseDeviceActiveListWithAuth(search); List<DeviceActiveExprot> deviceActiveList = vehicleMapper.getBaseDeviceActiveListWithAuth(search);
// 填充组织层级
organizationApiService.drawAllLevel(deviceActiveList);
// 数字类型转换为字符串类型 // 数字类型转换为字符串类型
deviceActiveList.forEach(deviceActiveExprot -> { deviceActiveList.forEach(deviceActiveExprot -> {
deviceActiveExprot.setDeviceTypeStr(TypeConverseEunm.DeviceTypeEnum.getStrByDeviceType(deviceActiveExprot.getDeviceType())); deviceActiveExprot.setDeviceTypeStr(TypeConverseEunm.DeviceTypeEnum.getStrByDeviceType(deviceActiveExprot.getDeviceType()));
...@@ -85,6 +93,7 @@ public class DeviceActiveService { ...@@ -85,6 +93,7 @@ public class DeviceActiveService {
if (!StringUtils.isEmpty(deviceActiveExprot.getLng()) && !StringUtils.isEmpty(deviceActiveExprot.getLat())) { if (!StringUtils.isEmpty(deviceActiveExprot.getLng()) && !StringUtils.isEmpty(deviceActiveExprot.getLat())) {
deviceActiveExprot.setLngAndLat(deviceActiveExprot.getLng() + "," + deviceActiveExprot.getLat()); deviceActiveExprot.setLngAndLat(deviceActiveExprot.getLng() + "," + deviceActiveExprot.getLat());
} }
deviceActiveExprot.setShopName(deviceActiveExprot.getBelongLevels());
}); });
return deviceActiveList; return deviceActiveList;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!