|
|
@@ -41,6 +41,9 @@ public class RateController extends BaseController {
|
|
|
public Rate save(@RequestBody Rate record) {
|
|
|
if (record.getId() != null) {
|
|
|
Rate orig = rateRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
|
|
|
+ if (RateStatus.SUBMIT_GRADE.equals(record.getStatus())) {
|
|
|
+ record.setUndertakeExamination(orig.isUndertakeExamination());
|
|
|
+ }
|
|
|
ObjUtils.merge(orig, record);
|
|
|
return rateRepo.save(orig);
|
|
|
}
|
|
|
@@ -66,6 +69,7 @@ public class RateController extends BaseController {
|
|
|
|
|
|
@PostMapping("/all2")
|
|
|
public Page<Rate> all2(@RequestBody PageQuery pageQuery) {
|
|
|
+ pageQuery.setSort("createdAt,desc");
|
|
|
Map<Long, Organization> organizationMap = organizationRepo.findAll()
|
|
|
.stream()
|
|
|
.collect(Collectors.toMap(Organization::getId, organization -> organization));
|
|
|
@@ -73,8 +77,8 @@ public class RateController extends BaseController {
|
|
|
Organization organization = organizationMap.get(rate.getOrganizationId());
|
|
|
if (ObjectUtil.isNotEmpty(organization)) {
|
|
|
rate.setOrganizer(organization.getName());
|
|
|
- String address= "南京市" + organization.getDistrict();
|
|
|
- if (StrUtil.isNotBlank(organization.getAddress())){
|
|
|
+ String address = "南京市" + organization.getDistrict();
|
|
|
+ if (StrUtil.isNotBlank(organization.getAddress())) {
|
|
|
address += organization.getAddress();
|
|
|
}
|
|
|
rate.setAddress(address);
|