| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.basesetting.machine.vo.MachineQueryVO; |
| | | import org.springblade.mdm.basesetting.machine.vo.MachineVO; |
| | | import org.springblade.mdm.basesetting.producedivision.service.QinzheFgbService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | | import org.springblade.mdm.program.service.ProgramFlowStatusQueryService; |
| | |
| | | |
| | | @PostMapping("/lock") |
| | | @Operation(summary = "锁定节点(程序包名)") |
| | | public R<Boolean> lock(@Parameter(description="程序包名节点id)")Long id) { |
| | | ncNodeService.lock(id); |
| | | public R<Boolean> lock(@Parameter(description="程序包名节点id)")Long id,@Parameter(description="锁定原因)")String remark) { |
| | | ncNodeService.lock(id,remark); |
| | | return R.<Boolean>status(true); |
| | | } |
| | | |
| | | @GetMapping("/query-lock-remark") |
| | | @Operation(summary = "查询锁定原因") |
| | | public R<String> queryLockRemark(@Parameter(description="程序包名节点id)")Long id) { |
| | | |
| | | NcNode node = ncNodeService.getById(id); |
| | | if(node.hasLocked()){ |
| | | return R.data(node.getRemark()); |
| | | }else{ |
| | | return R.data(StringUtils.EMPTY); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/lazy-list") |
| | | @Operation(summary = "懒加载列表", description = "程序目录树形结构") |
| | | public R<List<NcNodeVO>> lazyList(Long parentId) { |