| | |
| | | import org.jeecg.modules.eam.entity.PlanChangeApply; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | |
| | | return super.importExcel(request, response, PlanChangeApply.class); |
| | | } |
| | | @PostMapping(value = "/addForPlan") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<String> addForPlan(@RequestBody PlanChangeApply planChangeApply) { |
| | | DailyMaintenanceOrder dailyMaintenanceOrder = dailyMaintenanceOrderService |
| | | .getOne(new QueryWrapper<DailyMaintenanceOrder>() |
| | |
| | | .eq("maintenance_order_uda2",planChangeApply.getId()),false); |
| | | if(ObjectUtils.isNull(dailyMaintenanceOrder)){ |
| | | return Result.error("尚未生成工单,无需申请"); |
| | | }else if(!dailyMaintenanceOrder.getStatus().equals(CommonConstant.STATUS_1)){ |
| | | }else if(!dailyMaintenanceOrder.getStatus().equals("3")){ |
| | | return Result.error("工单已下达不允许进行变更"); |
| | | } |
| | | maintenancePlanDetailService.update(new UpdateWrapper<EquipmentMaintenancePlanDetail>().eq("id",planChangeApply.getId()).set("plan_start_time",planChangeApply.getPlanDelayTime())); |