| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.rmi.ServerException; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | //@AllArgsConstructor |
| | | @RequestMapping("/mdmEngineController") |
| | | @Api(value = "编码数据管理", tags = "编码数据管理") |
| | | public class MdmEngineController { |
| | |
| | | ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导入批量编辑数据 |
| | |
| | | @VciBusinessLog(operateName = "导出主题库的数据") |
| | | @PostMapping("/exportCode") |
| | | public void exportCode(CodeExportAttrDTO exportAttrDTO, HttpServletResponse response) throws IOException { |
| | | String excelName = mdmIOService.exportCode(exportAttrDTO); |
| | | try { |
| | | String excelName = mdmIOService.exportCode(exportAttrDTO); |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | |
| | | * @param baseModelDTO 数据传输对象 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("changeStatus") |
| | | @PostMapping("/changeStatus") |
| | | public R changeStatus(@RequestBody BaseModelDTO baseModelDTO) { |
| | | engineService.changeStatus(baseModelDTO); |
| | | return R.success("操作成功!"); |
| | |
| | | * @return UI相关的信息(仅包含表格) |
| | | */ |
| | | @GetMapping("/getFlowdUIInfoByClassifyOid") |
| | | public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid,String functionId,String templateId,String taskId,String modelKey){ |
| | | public MdmUIInfoVO getFlowUIInfoByClassifyOid(String codeClassifyOid,String functionId,String templateId,String taskId,String modelKey){ |
| | | return engineService.getFlowUIInfoByClassifyOid(codeClassifyOid,functionId,templateId,taskId,modelKey); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/exportGroupCodeExcel") |
| | | @VciBusinessLog(operateName = "导出集团码") |
| | | public R exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | public void exportGroupCodeExcel(String codeClassifyOid, HttpServletResponse response) throws IOException { |
| | | try { |
| | | String excelName = mdmIOService.exportGroupCodeExcel(codeClassifyOid); |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | |
| | | if(StringUtils.isBlank(msg)){ |
| | | msg = "未知错误"; |
| | | } |
| | | return R.fail(msg); |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | LocalFileUtil.writeContentToFile(msg,errorFile); |
| | | ControllerUtil.writeFileToResponse(response,errorFile); |
| | | // return R.fail(msg); |
| | | } |
| | | return R.status(true); |
| | | // return R.status(true); |
| | | } |
| | | |
| | | /*** |