|
@@ -45,7 +45,8 @@ public class MaintenanceOptionController {
|
|
|
.in("mt_company_id", 10086L, req.getMtCompanyId())
|
|
|
.in(req.getType() != null, "type", type(req))
|
|
|
.eq(req.getLiftCategory() != null, "lift_category", req.getLiftCategory())
|
|
|
- .eq(req.getStatus() != null, "status", req.getStatus()));
|
|
|
+ .eq(req.getStatus() != null, "status", req.getStatus())
|
|
|
+ .orderByDesc("id"));
|
|
|
if (page.getRecords().isEmpty()) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
@@ -91,6 +92,9 @@ public class MaintenanceOptionController {
|
|
|
*/
|
|
|
@PostMapping("/add")
|
|
|
public RestResponse add(@RequestBody MaintenanceOption option) {
|
|
|
+ if (option.getLiftCategory() == 3) {
|
|
|
+ option.setSort(-1);
|
|
|
+ }
|
|
|
return RestResponse.success(optionService.save(option));
|
|
|
}
|
|
|
|