|
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@@ -38,7 +39,9 @@ public class DeviceChargingConfigServiceImpl extends ServiceImpl<DeviceChargingC
|
|
|
|
|
|
private MercService mercService;
|
|
private MercService mercService;
|
|
|
|
|
|
- @Override
|
|
|
|
|
|
+ private DeviceAlgorithmChargingServiceImpl deviceAlgorithmChargingService;
|
|
|
|
+
|
|
|
|
+ @PostMapping("list")
|
|
@ApiOperation("集合查询")
|
|
@ApiOperation("集合查询")
|
|
public R<List<DeviceChargingConfigDto.Vo>> list(DeviceChargingConfigDto.SelectList selectList) {
|
|
public R<List<DeviceChargingConfigDto.Vo>> list(DeviceChargingConfigDto.SelectList selectList) {
|
|
MercDto.Vo merc = mercService.obj(new MercDto.Vo().setId(selectList.getMercId())).getData();
|
|
MercDto.Vo merc = mercService.obj(new MercDto.Vo().setId(selectList.getMercId())).getData();
|
|
@@ -88,4 +91,18 @@ public class DeviceChargingConfigServiceImpl extends ServiceImpl<DeviceChargingC
|
|
}
|
|
}
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ @ApiOperation("集合查询2")
|
|
|
|
+ public R<List<DeviceChargingConfigDto.Vo>> list2(DeviceChargingConfigDto.SelectList selectList) {
|
|
|
|
+ MercDto.Vo merc = mercService.obj(new MercDto.Vo().setId(selectList.getMercId())).getData();
|
|
|
|
+ List<String> mercCodes = new ArrayList<>();
|
|
|
|
+ deviceAlgorithmChargingService.getMercCodes(merc.getMercCode(), mercCodes);
|
|
|
|
+ LambdaQueryWrapper<DeviceChargingConfig> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(selectList, DeviceChargingConfig.class)
|
|
|
|
+ .in(DeviceChargingConfig::getMercCode, mercCodes)
|
|
|
|
+ .build()
|
|
|
|
+ .orderByDesc(DeviceChargingConfig::getMercCode);
|
|
|
|
+ List<DeviceChargingConfig> list = list(lambdaQueryWrapper);
|
|
|
|
+ return R.ok(Beans.copy(DeviceChargingConfigDto.Vo.class, list));
|
|
|
|
+ }
|
|
}
|
|
}
|