| | |
| | | inspectionCycle.setCreateTime(new Date()); |
| | | inspectionCycle.setUpdateBy(null); |
| | | inspectionCycle.setUpdateTime(null); |
| | | inspectionCycle.setLoseEfficacyTime(null); |
| | | inspectionCycle.setTakeEffectTime(null); |
| | | boolean b = inspectionCycleService.save(inspectionCycle); |
| | | if(b){ |
| | | return Result.OK("版本升级成功!"); |
| | |
| | | List<InspectionCycle> list = inspectionCycleService.lambdaQuery().eq(InspectionCycle::getCode, inspectionCycle.getCode()).eq(InspectionCycle::getVersionStatus, "2").list(); |
| | | for (InspectionCycle cycle : list) { |
| | | cycle.setVersionStatus("3"); |
| | | cycle.setLoseEfficacyTime(new Date()); |
| | | inspectionCycleService.updateById(cycle); |
| | | } |
| | | inspectionCycle.setTakeEffectTime(new Date()); |
| | | boolean b = inspectionCycleService.updateById(inspectionCycle); |
| | | if (b){ |
| | | return Result.OK("编辑成功!"); |