| | |
| | | import com.vci.ubcs.code.mapper.CodeClassifyMapper; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | 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.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.log4j.Log4j; |
| | | import lombok.extern.log4j.Log4j2; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | @AllArgsConstructor |
| | | @RequestMapping("/codeClassify") |
| | | @Api(value = "主题库定义表", tags = "主题库定义表接口") |
| | | @Log4j2 |
| | | public class CodeClassifyController extends BladeController { |
| | | |
| | | private final ICodeClassifyService codeClassifyService; |
| | | |
| | | CodeClassifyMapper codeClassifyMapper; |
| | | |
| | | /** |
| | | * 主题库定义表 详情 |
| | | */ |
| | |
| | | */ |
| | | @GetMapping("/treeCodeClassify") |
| | | public List<Tree> treeCodeClassify(TreeQueryObject treeQueryObject) { |
| | | return codeClassifyService. treeCodeClassify(treeQueryObject); |
| | | return codeClassifyService.treeCodeClassify(treeQueryObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 主题库分类显示树 |
| | | */ |
| | | @GetMapping("/referTree") |
| | | public List<Tree> referTree(@RequestBody TreeQueryObject treeQueryObject) { |
| | | public List<Tree> referTree(TreeQueryObject treeQueryObject) { |
| | | return codeClassifyService.referTree(treeQueryObject); |
| | | } |
| | | |
| | |
| | | codeClassifyService.importClassify(file1); |
| | | return R.success("导入成功!"); |
| | | }catch (Throwable e) { |
| | | log.error("导入错误",e); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误信息.txt"; |
| | | LocalFileUtil.writeContentToFile(LangBaseUtil.getErrorMsg(e),errorFile); |
| | | //放到map里 |
| | | // R result = R.fail("导入失败"); |
| | | // result.(ControllerUtil.putErrorFile(errorFile)); |
| | | return R.data(400,errorFile,"导入失败"); |
| | | CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO(); |
| | | codeImProtRusultVO.setRedisUuid(""); |
| | | codeImProtRusultVO.setFileOid(ControllerUtil.putErrorFile(errorFile)); |
| | | codeImProtRusultVO.setFilePath(errorFile); |
| | | R r = R.fail("导入失败"); |
| | | r.setData(codeImProtRusultVO); |
| | | return r; |
| | | }finally { |
| | | file1.delete(); |
| | | } |
| | |
| | | CodeClassifyVO codeClassifyVO = codeClassifyService.getObjectByClsfNamePath(clsfNamePath); |
| | | return R.data(codeClassifyVO); |
| | | } |
| | | |
| | | /** |
| | | * 流水依赖生成 |
| | | */ |
| | | @GetMapping("/flowingDependencyGen") |
| | | public R flowingDependencyGen(String classifyOid) { |
| | | return codeClassifyService.flowingDependencyGen(classifyOid); |
| | | } |
| | | |
| | | } |