|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.ty.lift.enterprise.option.controller;
|
|
|
|
|
|
|
|
|
+import cn.com.ty.lift.common.constants.ApiConstants;
|
|
|
import cn.com.ty.lift.enterprise.option.dao.entity.MaintenanceOption;
|
|
|
import cn.com.ty.lift.enterprise.option.dao.entity.model.OptionReq;
|
|
|
import cn.com.ty.lift.enterprise.option.service.impl.MaintenanceOptionServiceImpl;
|
|
@@ -65,24 +66,24 @@ public class MaintenanceOptionController {
|
|
|
Integer category = req.getLiftCategory();
|
|
|
String sort = null;
|
|
|
if (Objects.nonNull(category) && (category == 4 || category == 5)) {
|
|
|
- req.setLiftCategory(3);
|
|
|
- sort = "-1";
|
|
|
+ req.setLiftCategory(ApiConstants.Option.ESCALATOR_CATEGORY);
|
|
|
+ sort = ApiConstants.Option.ESCALATOR_SORT;
|
|
|
}
|
|
|
if (Objects.nonNull(category) && category == 3) {
|
|
|
- req.setLiftCategory(4);
|
|
|
+ req.setLiftCategory(ApiConstants.Option.SUNDRIES_CATEGORY);
|
|
|
}
|
|
|
List<MaintenanceOption> options = optionService.list(
|
|
|
new QueryWrapper<MaintenanceOption>()
|
|
|
//10086L是固定数据的公司id
|
|
|
- .in("mt_company_id", 10086L, req.getMtCompanyId())
|
|
|
+ .in("mt_company_id", ApiConstants.Platform.COMPANY_ID, req.getMtCompanyId())
|
|
|
.in(Objects.nonNull(req.getType()), "type", type(req))
|
|
|
.eq(Objects.nonNull(req.getLiftCategory()), "lift_category", req.getLiftCategory())
|
|
|
- .eq("status", 2)
|
|
|
+ .eq("status", ApiConstants.Option.CURRENT_VERSION)
|
|
|
.in(Objects.nonNull(sort), "sort", sort));
|
|
|
if (options.isEmpty()) {
|
|
|
return RestResponse.success();
|
|
|
}
|
|
|
- options.forEach(o -> o.setStatus(0));
|
|
|
+ options.forEach(o -> o.setStatus(ApiConstants.Option.DEFAULT_STATUS));
|
|
|
return RestResponse.success(options);
|
|
|
}
|
|
|
|