|
@@ -252,6 +252,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
Long mercId = auth.getMercId();
|
|
|
String mercCode = auth.getMercCode();
|
|
|
Long algorithmId = auth.getAlgorithmId();
|
|
|
+ String mercName = auth.getMercName();
|
|
|
//商户最终设备列表
|
|
|
List<Long> deviceIds = auth.getDeviceIds();
|
|
|
List<DeviceInfo> devices = getDevicesByMercId(mercId);
|
|
@@ -266,7 +267,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
List<DeviceInfo> deviceInfos = this.listByIds(deviceIds);
|
|
|
deviceInfos.forEach(deviceInfo -> {
|
|
|
//绑定关系
|
|
|
- deviceInfo.setMercId(mercId).setMercCode(mercCode).setAlgorithmId(algorithmId);
|
|
|
+ deviceInfo.setMercId(mercId).setMercCode(mercCode).setAlgorithmId(algorithmId).setMercName(mercName);
|
|
|
});
|
|
|
updateBatchById(deviceInfos);
|
|
|
//原来存在的设备关系,不在最终设备列表中的移除
|
|
@@ -423,6 +424,10 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
vo.setPlaceLineId(v.getPlaceLineId());
|
|
|
//线路下的设备列表
|
|
|
List<DeviceInfoDto.MercHomeDeviceVo> deviceInfos = Beans.copy(DeviceInfoDto.MercHomeDeviceVo.class, deviceMap.get(placeLineId));
|
|
|
+// deviceInfos.stream().map(DeviceInfoDto.MercHomeDeviceVo::getDeviceId);
|
|
|
+ //状态信息
|
|
|
+// DeviceStatusDto.Vo deviceStatus = deviceStatusService.obj(new DeviceStatusDto.Vo().setDeviceId(deviceInfo.getDeviceId())).getData();
|
|
|
+// deviceStatusService.listByIds()
|
|
|
deviceInfos.forEach(device -> {
|
|
|
//设备类型 反显
|
|
|
SysDictRedis dictDeviceType = SysDictUtils.get(DictConsts.DEVICE_TYPE, String.valueOf(device.getDeviceType()));
|
|
@@ -433,6 +438,8 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
//初始化数字
|
|
|
device.setDayOrderNum(0).setOnSaleNum(0).setFillNum(0).setDaySalesPrice("0");
|
|
|
//TODO: 数字统计
|
|
|
+ //可售库存
|
|
|
+
|
|
|
});
|
|
|
vo.setDeviceInfos(deviceInfos);
|
|
|
dataList.add(vo);
|