|
@@ -188,6 +188,23 @@ public class DeviceSimServiceImpl extends ServiceImpl<DeviceSimMapper, DeviceSim
|
|
|
return R.ok(toPageBean(iPage));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("pageByNotInit")
|
|
|
+ @ApiOperation("未初始化分页查询")
|
|
|
+ public R<PageBean<DeviceSimDto.PageVo>> pageByNotInit(@RequestBody DeviceSimDto.Page page) {
|
|
|
+ Map<String, SysDictRedis> simConfig = SysDictUtils.get(EnumSimConfig.Code.CODE.getCode());
|
|
|
+ IPage<DeviceSimDto.PageVo> iPage = baseMapper.page2(toIPage(page.getPage()), page);
|
|
|
+ List<DeviceSimDto.PageVo> records = iPage.getRecords();
|
|
|
+ if (Emptys.check(records)) {
|
|
|
+ String name = simConfig.get(EnumSimConfig.name.getCode()).getValue();
|
|
|
+ Integer money = Integer.valueOf(simConfig.get(EnumSimConfig.money.getCode()).getValue());
|
|
|
+ records.forEach(record -> {
|
|
|
+ //封装计费标准
|
|
|
+ record.setChargingName(name).setChargingMoney(money);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return R.ok(toPageBean(iPage));
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("pageCount")
|
|
|
@ApiOperation("分页数量查询")
|
|
|
public R<DeviceSimDto.PageCountVo> pageCount(@RequestBody @Validated DeviceSimDto.PageCount pageCount) {
|
|
@@ -196,7 +213,7 @@ public class DeviceSimServiceImpl extends ServiceImpl<DeviceSimMapper, DeviceSim
|
|
|
String theTime = DataTime.getStringAround(0, 0, value, 0, 0, 0);
|
|
|
//并行数据
|
|
|
DeviceSimDto.PageCountVo pageCountVo = new DeviceSimDto.PageCountVo();
|
|
|
- ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.DEVICE_COMMON_POLL, 5)
|
|
|
+ ThreadPoolUtils.excPoll(DeviceThreadPoolConfig.DEVICE_COMMON_POLL, 6)
|
|
|
.execute(() -> {
|
|
|
//全部
|
|
|
DeviceSimDto.PageCount paramsObj = Beans.copy(DeviceSimDto.PageCount.class, pageCount);
|
|
@@ -235,6 +252,12 @@ public class DeviceSimServiceImpl extends ServiceImpl<DeviceSimMapper, DeviceSim
|
|
|
int count = baseMapper.pageCount(paramsObj);
|
|
|
pageCountVo.setIsNotActivate(count);
|
|
|
})
|
|
|
+ .execute(() -> {
|
|
|
+ //未初始化
|
|
|
+ DeviceSimDto.PageCount paramsObj = Beans.copy(DeviceSimDto.PageCount.class, pageCount);
|
|
|
+ int count = baseMapper.pageCount2(paramsObj);
|
|
|
+ pageCountVo.setNotInitCount(count);
|
|
|
+ })
|
|
|
.end();
|
|
|
return R.ok(pageCountVo);
|
|
|
}
|
|
@@ -253,7 +276,7 @@ public class DeviceSimServiceImpl extends ServiceImpl<DeviceSimMapper, DeviceSim
|
|
|
Integer value = Integer.valueOf(simConfig.get(EnumSimConfig.N_200.getCode()).getValue());
|
|
|
String theTime = DataTime.getStringAround(0, 0, value, 0, 0, 0);
|
|
|
download.setThisTime(LocalDateTime.now()).setTheTime(DataTime.toLocal(theTime));
|
|
|
- List<DeviceSimDto.PageVo> pageVos = baseMapper.page(download);
|
|
|
+ List<DeviceSimDto.PageVo> pageVos = download.getIsNotInit() ? baseMapper.page2(download) : baseMapper.page(download);
|
|
|
List<UploadSim> uploadSims = new ArrayList<>();
|
|
|
pageVos.forEach(pageVo -> {
|
|
|
UploadSim uploadSim = new UploadSim();
|