| | |
| | | package com.qianwen.smartman.modules.dnc.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import java.util.List; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.List; |
| | | import javax.validation.Valid; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.core.boot.ctrl.BladeController; |
| | | import com.qianwen.core.mp.support.Query; |
| | | import com.qianwen.core.scanner.modular.annotation.DeleteResource; |
| | |
| | | import com.qianwen.core.secure.annotation.PreAuth; |
| | | import com.qianwen.core.tool.api.R; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.cache.RegionCache; |
| | | import com.qianwen.smartman.modules.dnc.convert.DncFactoryFileConvert; |
| | | import com.qianwen.smartman.modules.dnc.entity.DncFactoryFile; |
| | | import com.qianwen.smartman.modules.dnc.service.IDncFactoryFileService; |
| | |
| | | import com.qianwen.smartman.modules.dnc.vo.FactoryFileVO; |
| | | import com.qianwen.smartman.modules.dnc.vo.FileHistoryVO; |
| | | import com.qianwen.smartman.modules.dnc.vo.FileVersionSwitchVO; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | |
| | | @Api(value = "工厂文件管理", tags = {"工厂文件管理"}) |
| | | @ApiResource({"blade-dnc/dnc-factory-file"}) |
| | |
| | | public class DncFactoryFileController extends BladeController { |
| | | private IDncFactoryFileService dncFactoryFileService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | switch (z) { |
| | | case false: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getId(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | |
| | | public DncFactoryFileController(final IDncFactoryFileService dncFactoryFileService) { |
| | | this.dncFactoryFileService = dncFactoryFileService; |
| | | } |
| | |
| | | return R.status(false); |
| | | } |
| | | List<Long> delIds = Func.toLongList(ids); |
| | | List<DncFactoryFile> list = this.dncFactoryFileService.list(Wrappers.<DncFactoryFile>lambdaQuery().in(DncFactoryFile::getId, delIds)); |
| | | /* |
| | | List<DncFactoryFile> list = this.dncFactoryFileService.list((Wrapper) Wrappers.lambdaQuery().in((v0) -> { |
| | | return v0.getId(); |
| | | }, delIds)); |
| | | }, delIds));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | list.forEach(file -> { |
| | | this.dncFactoryFileService.writeFileLog(file); |