| | |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.code.applyjtcodeservice.vo.BaseModelVO; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | import com.vci.ubcs.code.dto.CodeExportAttrDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderSecDTO; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.service.MdmIOService; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.flow.core.dto.FlowStatusDTO; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | |
| | | @Api(value = "编码数据管理", tags = "编码数据管理") |
| | | public class MdmEngineController { |
| | | |
| | | // /** |
| | | // * 日志 |
| | | // */ |
| | | /** |
| | | * 日志 |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | /** |
| | | * 主数据引擎服务 |
| | |
| | | */ |
| | | @Autowired |
| | | private MdmIOService mdmIOService; |
| | | |
| | | |
| | | /** |
| | | * 下载批量申请的导入模板 |
| | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 导出主题库的数据 |
| | | * @param exportAttrDTO 导出的相关配置 |
| | | */ |
| | | @VciBusinessLog(operateName = "导出主题库的数据") |
| | | @PostMapping("/exportCode") |
| | | public void exportCode(CodeExportAttrDTO exportAttrDTO, HttpServletResponse response) throws IOException { |
| | | String excelName = mdmIOService.exportCode(exportAttrDTO); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | | String msg = LangBaseUtil.getErrorMsg(e); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | LocalFileUtil.writeContentToFile(msg,errorFile); |
| | | ControllerUtil.writeFileToResponse(response,errorFile); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | codeImProtRusultVO.setFilePath(errorFile); |
| | | R r = R.fail("导入失败"); |
| | | r.setData(codeImProtRusultVO); |
| | | |
| | | |
| | | return r; |
| | | }finally { |
| | | file1.delete(); |
| | |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("changeStatus") |
| | | public R changeStatus(BaseModelDTO baseModelDTO) { |
| | | public R changeStatus(@RequestBody BaseModelDTO baseModelDTO) { |
| | | engineService.changeStatus(baseModelDTO); |
| | | return R.success("操作成功!"); |
| | | } |
| | |
| | | return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类获取表格的定义 |
| | | * @param codeClassifyOid 分类主键 |
| | | * @param functionId 功能的编号 |
| | | * @return UI相关的信息(仅包含表格) |
| | | */ |
| | | @GetMapping("/getFlowdUIInfoByClassifyOid") |
| | | public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid,String functionId,String templateId,String taskId,String modelKey){ |
| | | return engineService.getFlowUIInfoByClassifyOid(codeClassifyOid,functionId,templateId,taskId,modelKey); |
| | | } |
| | | |
| | | @GetMapping("/thisistest") |
| | | @ResponseBody |
| | |
| | | * @param referConfigVO 参照的配置信息 |
| | | * @return 执行的结果 |
| | | */ |
| | | @GetMapping("/defaultReferDataGrid") |
| | | public IPage<BaseModel> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){ |
| | | @RequestMapping(value = "/defaultReferDataGrid",method = {RequestMethod.POST, RequestMethod.GET}) |
| | | public IPage<BaseModelVO> defaultReferDataGrid(UIFormReferVO referConfigVO, BaseQueryObject baseQueryObject){ |
| | | return engineService.referDataGrid(referConfigVO,baseQueryObject); |
| | | } |
| | | |
| | |
| | | return engineService.referTree(referConfigVO,queryObject); |
| | | } |
| | | |
| | | /** |
| | | * 流程中变更状态的简易接口 |
| | | * @param flowDTO 流程中携带的body |
| | | * @return |
| | | */ |
| | | @PostMapping("/processChangeStatus") |
| | | public R processChangeStatus(@RequestBody FlowStatusDTO flowDTO){ |
| | | return engineService.processChangeStatus(flowDTO); |
| | | } |
| | | } |