修复预报方案管理列表查询
parent
e3f6304665
commit
f863285523
|
|
@ -20,7 +20,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.Mapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
@ -92,7 +91,15 @@ public class ForecastProjectController {
|
||||||
if(StringUtils.isNotBlank(forecastProject.getOrderField())){
|
if(StringUtils.isNotBlank(forecastProject.getOrderField())){
|
||||||
wrapper.orderBy(true, ObjectUtils.isEmpty(forecastProject.getIsAsc()) ? false : forecastProject.getIsAsc(), forecastProject.getOrderField());
|
wrapper.orderBy(true, ObjectUtils.isEmpty(forecastProject.getIsAsc()) ? false : forecastProject.getIsAsc(), forecastProject.getOrderField());
|
||||||
}
|
}
|
||||||
return R.ok(service.list(wrapper));
|
List<ForecastProject> list = service.list(wrapper);
|
||||||
|
if (list.size() > 0) {
|
||||||
|
for (ForecastProject fp : list) {
|
||||||
|
if (StringUtils.isNotEmpty(fp.getUserId()) && fp.getUserId().contains("_")) {
|
||||||
|
fp.setUserId(fp.getUserId().substring(fp.getUserId().indexOf("_") + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
|
|
@ -106,7 +113,15 @@ public class ForecastProjectController {
|
||||||
if(StringUtils.isNotBlank(forecastProject.getOrderField())){
|
if(StringUtils.isNotBlank(forecastProject.getOrderField())){
|
||||||
wrapper.orderBy(true, ObjectUtils.isEmpty(forecastProject.getIsAsc()) ? false : forecastProject.getIsAsc(), forecastProject.getOrderField());
|
wrapper.orderBy(true, ObjectUtils.isEmpty(forecastProject.getIsAsc()) ? false : forecastProject.getIsAsc(), forecastProject.getOrderField());
|
||||||
}
|
}
|
||||||
return R.ok(service.page(forecastProject.getPageSo().toPage(), wrapper));
|
Page<ForecastProject> page = service.page(forecastProject.getPageSo().toPage(), wrapper);
|
||||||
|
if (page.getRecords().size() > 0) {
|
||||||
|
for (ForecastProject fp : page.getRecords()) {
|
||||||
|
if (StringUtils.isNotEmpty(fp.getUserId()) && fp.getUserId().contains("_")) {
|
||||||
|
fp.setUserId(fp.getUserId().substring(fp.getUserId().indexOf("_") + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue