| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.flow.core.feign.IMDMIFlowAttrClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | |
| | | @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); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("changeStatus") |
| | | public R changeStatus(BaseModelDTO baseModelDTO) { |
| | | public R changeStatus(@RequestBody BaseModelDTO baseModelDTO) { |
| | | engineService.changeStatus(baseModelDTO); |
| | | return R.success("操作成功!"); |
| | | } |
| | |
| | | * @return 分类码值的内容 |
| | | */ |
| | | @GetMapping("/listCodeClassifyValueBySecOid") |
| | | public DataGrid<CodeClassifyValueVO> listCodeClassifyValueBySecOid(String classifySecOid, String parentClassifyValueOid){ |
| | | public IPage<CodeClassifyValueVO> listCodeClassifyValueBySecOid(String classifySecOid, String parentClassifyValueOid){ |
| | | List<CodeClassifyValueVO> valueVOS = engineService.listCodeClassifyValueBySecOid(classifySecOid, parentClassifyValueOid); |
| | | DataGrid<CodeClassifyValueVO> dataGrid = new DataGrid<>(); |
| | | dataGrid.setData(valueVOS); |
| | | dataGrid.setTotal(valueVOS==null?0:valueVOS.size()); |
| | | return dataGrid; |
| | | IPage<CodeClassifyValueVO> valueVOIPage = new Page<>(); |
| | | valueVOIPage.setRecords(valueVOS); |
| | | valueVOIPage.setTotal(valueVOS==null?0:valueVOS.size()); |
| | | return valueVOIPage; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 编码规则的内容 |
| | | */ |
| | | @GetMapping("/getCodeRuleByClassifyOid") |
| | | // @VciUnCheckRight |
| | | // @VciUnCheckRight |
| | | public R<CodeRuleVO> getCodeRuleByClassifyOid(String codeClassifyOid){ |
| | | return R.data(engineService.getCodeRuleByClassifyOid(codeClassifyOid)); |
| | | } |
| | |
| | | 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 |