|
@@ -296,6 +296,13 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
|
|
}
|
|
}
|
|
LocalDate lastDay = lift.getAnnualInspectionDate().with(TemporalAdjusters.lastDayOfMonth());
|
|
LocalDate lastDay = lift.getAnnualInspectionDate().with(TemporalAdjusters.lastDayOfMonth());
|
|
lift.setAnnualInspectionDate(lastDay);
|
|
lift.setAnnualInspectionDate(lastDay);
|
|
|
|
+ //根据电梯类别判断电梯类型
|
|
|
|
+ Integer category = lift.getCategory();
|
|
|
|
+ if (category == 1 || category == 2 || category == 3) {
|
|
|
|
+ lift.setLiftType(1);
|
|
|
|
+ } else {
|
|
|
|
+ lift.setLiftType(2);
|
|
|
|
+ }
|
|
//新增电梯表
|
|
//新增电梯表
|
|
boolean liftResult = save(lift);
|
|
boolean liftResult = save(lift);
|
|
if (!liftResult)
|
|
if (!liftResult)
|
|
@@ -431,6 +438,13 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
|
|
// }
|
|
// }
|
|
LocalDate lastDay = lift.getAnnualInspectionDate().with(TemporalAdjusters.lastDayOfMonth());
|
|
LocalDate lastDay = lift.getAnnualInspectionDate().with(TemporalAdjusters.lastDayOfMonth());
|
|
lift.setAnnualInspectionDate(lastDay);
|
|
lift.setAnnualInspectionDate(lastDay);
|
|
|
|
+ //根据电梯类别判断电梯类型
|
|
|
|
+ Integer category = lift.getCategory();
|
|
|
|
+ if (category == 1 || category == 2 || category == 3) {
|
|
|
|
+ lift.setLiftType(1);
|
|
|
|
+ } else {
|
|
|
|
+ lift.setLiftType(2);
|
|
|
|
+ }
|
|
boolean result = updateById(lift);
|
|
boolean result = updateById(lift);
|
|
if (!result)
|
|
if (!result)
|
|
return RestResponse.fail(MessageUtils.get("msg.modify.fail"));
|
|
return RestResponse.fail(MessageUtils.get("msg.modify.fail"));
|