渗压设备新增,修改分页查询修改
parent
4491ee8d94
commit
9a9d599359
|
|
@ -48,7 +48,7 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
||||||
|
|
||||||
boolean result = service.save(dto);
|
boolean result = service.save(dto);
|
||||||
if (result){
|
if (result){
|
||||||
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getProfileCode());
|
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||||
}
|
}
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
@ -56,12 +56,12 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public R<OsmoticPressDevice> update(@Validated(Update.class) @RequestBody OsmoticPressDevice dto) {
|
public R<OsmoticPressDevice> update(@Validated(Update.class) @RequestBody OsmoticPressDevice dto) {
|
||||||
if (Objects.isNull(service.getById(dto.getProfileCode()))) {
|
if (Objects.isNull(service.getById(dto.getStationCode()))) {
|
||||||
throw new IllegalArgumentException("当前数据不存在");
|
throw new IllegalArgumentException("当前数据不存在");
|
||||||
}
|
}
|
||||||
boolean result = service.updateById(dto);
|
boolean result = service.updateById(dto);
|
||||||
if (result){
|
if (result){
|
||||||
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getProfileCode());
|
fileService.saveFile(dto.getFiles(), getGroupId(), dto.getStationCode());
|
||||||
}
|
}
|
||||||
return R.ok(result ? dto : null);
|
return R.ok(result ? dto : null);
|
||||||
}
|
}
|
||||||
|
|
@ -95,7 +95,7 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
||||||
|
|
||||||
Page<OsmoticPressDevice> data = service.page(page.getPageSo().toPage(), query);
|
Page<OsmoticPressDevice> data = service.page(page.getPageSo().toPage(), query);
|
||||||
data.getRecords().forEach(o -> o.setFiles(
|
data.getRecords().forEach(o -> o.setFiles(
|
||||||
fileService.getFiles(getGroupId(),o.getProfileCode())
|
fileService.getFiles(getGroupId(),o.getStationCode())
|
||||||
));
|
));
|
||||||
return R.ok(data);
|
return R.ok(data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue