|
@@ -180,12 +180,12 @@ public class MaintenanceRecordController {
|
|
|
* @return RestResponse
|
|
|
*/
|
|
|
@PostMapping("treeOptions")
|
|
|
- @Validation(fields = {"mtCompanyId", "type", "liftType"})
|
|
|
+ @Validation(fields = {"mtCompanyId", "type", "liftCategory"})
|
|
|
public RestResponse treeOptions(@Val @RequestBody MtRecordRequest request) {
|
|
|
Integer type = request.getType();
|
|
|
- Integer liftType = request.getLiftType();
|
|
|
+ Integer liftCategory = request.getLiftCategory();
|
|
|
Long mtCompanyId = request.getMtCompanyId();
|
|
|
- List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftType(type, liftType, mtCompanyId);
|
|
|
+ List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftCategory(type, liftCategory, mtCompanyId);
|
|
|
Validate.notTrue(IterUtil.isEmpty(optionList), "维保操作项不存在,请核查");
|
|
|
//按照sort groupby
|
|
|
Map<Integer, List<MaintenanceOption>> mtOptionMap = optionList.stream().collect(Collectors.groupingBy(MaintenanceOption::getSort));
|
|
@@ -203,12 +203,12 @@ public class MaintenanceRecordController {
|
|
|
* @return RestResponse
|
|
|
*/
|
|
|
@PostMapping("listOptions")
|
|
|
- @Validation(fields = {"mtCompanyId", "type", "liftType"})
|
|
|
+ @Validation(fields = {"mtCompanyId", "type", "liftCategory"})
|
|
|
public RestResponse listOptions(@Val @RequestBody MtRecordRequest request) {
|
|
|
Integer type = request.getType();
|
|
|
- Integer liftType = request.getLiftType();
|
|
|
+ Integer liftCategory = request.getLiftCategory();
|
|
|
Long mtCompanyId = request.getMtCompanyId();
|
|
|
- List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftType(type, liftType, mtCompanyId);
|
|
|
+ List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftCategory(type, liftCategory, mtCompanyId);
|
|
|
return RestResponse.success(optionList);
|
|
|
}
|
|
|
|