| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeImProtRusultVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyWrapper; |
| | | import com.vci.ubcs.common.validator.ComprehensiveFileValidator; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | private final ICodeClassifyService codeClassifyService; |
| | | |
| | | CodeClassifyMapper codeClassifyMapper; |
| | | |
| | | /** |
| | | * 文件安全检查 |
| | | */ |
| | | @Autowired |
| | | private ComprehensiveFileValidator fileValidator; |
| | | |
| | | /** |
| | | * 主题库定义表 详情 |
| | | */ |
| | |
| | | */ |
| | | @PostMapping("/importClassify") |
| | | public R importClassify(MultipartFile file) { |
| | | // 使用文件安全验证器 |
| | | ComprehensiveFileValidator.UploadValidationResult result = fileValidator.validateFile(file); |
| | | if (!result.isValid()) { |
| | | return R.fail(result.getMessage()); |
| | | } |
| | | |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | try { |
| | |
| | | CodeClassifyVO codeClassifyVO = codeClassifyService.getObjectByClsfNamePath(clsfNamePath); |
| | | return R.data(codeClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 流水依赖生成 |
| | | */ |
| | |
| | | public R flowingDependencyGen(String classifyOid) { |
| | | return codeClassifyService.flowingDependencyGen(classifyOid); |
| | | } |
| | | |
| | | } |