| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | 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.ICodeRuleService; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.service.MdmIOService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeImProtRusultVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.MdmUIInfoVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.util.ControllerUtil; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | //@AllArgsConstructor |
| | | @RequestMapping("/mdmEngineController") |
| | | @Api(value = "编码数据管理", tags = "编码数据管理") |
| | | public class MdmEngineController extends BladeController { |
| | | public class MdmEngineController { |
| | | |
| | | // /** |
| | | // * 日志 |
| | | // */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | /** |
| | | * 主数据引擎服务 |
| | | */ |
| | | private final MdmEngineService engineService; |
| | | @Autowired |
| | | private MdmEngineService engineService; |
| | | /** |
| | | * 主数据导入导出服务 |
| | | */ |
| | | @Autowired |
| | | private MdmIOService mdmIOService; |
| | | |
| | | /** |
| | | * 根据分类id获取模板信息 |
| | | * @param codeClassifyOid |
| | | * @return |
| | | * 下载批量申请的导入模板 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @param response 响应对象 |
| | | * @throws IOException 抛出异常 |
| | | */ |
| | | @GetMapping("/getUsedTemplateByClassifyOid") |
| | | public R<CodeClassifyTemplateVO> getUsedTemplateByClassifyOid(String codeClassifyOid){ |
| | | CodeClassifyTemplateVO codeClassifyTemplateVO = engineService.getUsedTemplateByClassifyOid(codeClassifyOid); |
| | | return R.data(codeClassifyTemplateVO); |
| | | @GetMapping("/downloadImportExcel") |
| | | @VciBusinessLog(operateName = "下载批量申请编码的导入模板") |
| | | public void downloadImportExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | | String msg = LangBaseUtil.getErrorMsg(e); |
| | | if(StringUtils.isBlank(msg)){ |
| | | msg = "未知错误"; |
| | | } |
| | | ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | } |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 下载批量申请的导入模板 |
| | | // * @param codeClassifyOid 分类的主键 |
| | | // * @param response 响应对象 |
| | | // * @throws IOException 抛出异常 |
| | | // */ |
| | | // @GetMapping("/downloadImportExcel") |
| | | // @VciBusinessLog(operateName = "下载批量申请编码的导入模板") |
| | | // public void downloadImportExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | // String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | // try { |
| | | // ControllerUtil.writeFileToResponse(response,excelName); |
| | | // } catch (Throwable e) { |
| | | // //如果出错,把错误信息写到text |
| | | // String msg = LangBaseUtil.getErrorMsg(e); |
| | | // if(StringUtils.isBlank(msg)){ |
| | | // msg = "未知错误"; |
| | | // } |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | // } |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 批量申请编码的信息 |
| | | // * @param secDTOList 申请编码的信息,必须包含码段和分类主键的信息 |
| | | // * @param file 文件的内容 |
| | | // */ |
| | | // @VciBusinessLog(operateName = "批量申请编码的信息") |
| | | // @PostMapping("/batchImportCode") |
| | | // public R batchImportCode(String secDTOList, String codeClassifyOid, MultipartFile file, HttpServletResponse response) throws Throwable { |
| | | // CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | | // orderDTO.setCodeClassifyOid(codeClassifyOid); |
| | | // if(StringUtils.isNotBlank(secDTOList)){ |
| | | // List<CodeOrderSecDTO> secDTOS = JSONObject.parseArray(secDTOList, CodeOrderSecDTO.class); |
| | | // orderDTO.setSecDTOList(secDTOS); |
| | | // } |
| | | // String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | // File file1 = new File(excelFileName); |
| | | // try { |
| | | /** |
| | | * 批量申请编码的信息 |
| | | * @param secDTOList 申请编码的信息,必须包含码段和分类主键的信息 |
| | | * @param file 文件的内容 |
| | | */ |
| | | @VciBusinessLog(operateName = "批量申请编码的信息") |
| | | @PostMapping("/batchImportCode") |
| | | public R batchImportCode(String secDTOList, String codeClassifyOid, MultipartFile file, HttpServletResponse response) throws Throwable { |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | | orderDTO.setCodeClassifyOid(codeClassifyOid); |
| | | if(StringUtils.isNotBlank(secDTOList)){ |
| | | List<CodeOrderSecDTO> secDTOS = JSONObject.parseArray(secDTOList, CodeOrderSecDTO.class); |
| | | orderDTO.setSecDTOList(secDTOS); |
| | | } |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | try { |
| | | // file.transferTo(new File(excelFileName)); |
| | | // CodeImProtRusultVO codeImProtRusultVO = mdmIOService.batchImportCode(orderDTO,file1); |
| | | // if(StringUtils.isNotBlank(codeImProtRusultVO.getFilePath())||StringUtils.isNotBlank(codeImProtRusultVO.getRedisUuid())){ |
| | |
| | | // }else { |
| | | // return R.success("操作成功!"); |
| | | // } |
| | | // }catch (Throwable e) { |
| | | // logger.error("导入错误",e); |
| | | // String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | // LocalFileUtil.writeContentToFile( LangBaseUtil.getErrorMsg(e),errorFile); |
| | | // String uuid=ControllerUtil.putErrorFile(errorFile); |
| | | // CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO(); |
| | | // codeImProtRusultVO.setRedisUuid(""); |
| | | // codeImProtRusultVO.setFileOid(uuid); |
| | | // codeImProtRusultVO.setFilePath(errorFile); |
| | | // R result = R.fail("导入失败"); |
| | | // result.setData(codeImProtRusultVO); |
| | | //// result.setObj(codeImProtRusultVO); |
| | | // return result; |
| | | // }finally { |
| | | // file1.delete(); |
| | | // } |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 修改状态 |
| | | // * @param baseModelDTO 数据传输对象 |
| | | // * @return 执行结果 |
| | | // */ |
| | | // @PostMapping("changeStatus") |
| | | // public R changeStatus(BaseModelDTO baseModelDTO) { |
| | | // engineService.changeStatus(baseModelDTO); |
| | | // return R.success("操作成功!"); |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 申请编码保存 |
| | | // * @param orderDTO 编码申请相关的信息,需要有属性和码段相关的信息 |
| | | // * @return 执行结果 |
| | | // */ |
| | | // @PostMapping("/addSaveCode") |
| | | // @VciBusinessLog(operateName = "申请单个编码") |
| | | // public R addSaveCode(@RequestBody CodeOrderDTO orderDTO){ |
| | | // return R.success(engineService.addSaveCode(orderDTO)); |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 使用模板的主键获取表单的定义 |
| | | // * @param templateOid 模板的主键 |
| | | // * @param codeClassifyOid 使用模板的分类主键 |
| | | // * @return UI相关的信息(仅包含表单) |
| | | // */ |
| | | // @GetMapping("/getFormDefineByTemplateOid") |
| | | // public MdmUIInfoVO getFormDefineByTemplateOid(String templateOid, String codeClassifyOid){ |
| | | // return engineService.getFormDefineByTemplateOid(templateOid,codeClassifyOid); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 相似项查询 |
| | | // * @param orderDTO 编码的相关信息 |
| | | // * @return 数据列表 |
| | | // */ |
| | | // @PostMapping("/resembleQuery") |
| | | // public DataGrid<Map<String,String>> resembleQuery(@RequestBody CodeOrderDTO orderDTO){ |
| | | // return engineService.resembleQuery(orderDTO); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 修改单条主题库的数据 |
| | | // * @param orderDTO 编码申请相关的信息,不需要码段的信息 |
| | | // * @return 执行结果 |
| | | // */ |
| | | // @PutMapping("/editSaveCode") |
| | | // @VciBusinessLog(operateName = "修改编码数据") |
| | | // public R editSaveCode(@RequestBody CodeOrderDTO orderDTO){ |
| | | // engineService.editSaveCode(orderDTO); |
| | | // return R.success("修改成功!"); |
| | | // } |
| | | }catch (Throwable e) { |
| | | logger.error("导入错误",e); |
| | | String errorFile = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误.txt"; |
| | | LocalFileUtil.writeContentToFile( LangBaseUtil.getErrorMsg(e),errorFile); |
| | | String uuid=ControllerUtil.putErrorFile(errorFile); |
| | | CodeImProtRusultVO codeImProtRusultVO =new CodeImProtRusultVO(); |
| | | codeImProtRusultVO.setRedisUuid(""); |
| | | codeImProtRusultVO.setFileOid(uuid); |
| | | codeImProtRusultVO.setFilePath(errorFile); |
| | | R result = R.fail("导入失败"); |
| | | result.setData(codeImProtRusultVO); |
| | | // result.setObj(codeImProtRusultVO); |
| | | return result; |
| | | }finally { |
| | | file1.delete(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * @param baseModelDTO 数据传输对象 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("changeStatus") |
| | | public R changeStatus(BaseModelDTO baseModelDTO) { |
| | | engineService.changeStatus(baseModelDTO); |
| | | return R.success("操作成功!"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 申请编码保存 |
| | | * @param orderDTO 编码申请相关的信息,需要有属性和码段相关的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/addSaveCode") |
| | | @VciBusinessLog(operateName = "申请单个编码") |
| | | public R addSaveCode(@RequestBody CodeOrderDTO orderDTO) throws Exception { |
| | | return R.success(engineService.addSaveCode(orderDTO)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使用模板的主键获取表单的定义 |
| | | * @param templateOid 模板的主键 |
| | | * @param codeClassifyOid 使用模板的分类主键 |
| | | * @return UI相关的信息(仅包含表单) |
| | | */ |
| | | @GetMapping("/getFormDefineByTemplateOid") |
| | | public MdmUIInfoVO getFormDefineByTemplateOid(String templateOid, String codeClassifyOid){ |
| | | return engineService.getFormDefineByTemplateOid(templateOid,codeClassifyOid); |
| | | } |
| | | |
| | | /** |
| | | * 相似项查询 |
| | | * @param orderDTO 编码的相关信息 |
| | | * @return 数据列表 |
| | | */ |
| | | @PostMapping("/resembleQuery") |
| | | public DataGrid<Map<String,String>> resembleQuery(@RequestBody CodeOrderDTO orderDTO){ |
| | | return engineService.resembleQuery(orderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改单条主题库的数据 |
| | | * @param orderDTO 编码申请相关的信息,不需要码段的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PutMapping("/editSaveCode") |
| | | @VciBusinessLog(operateName = "修改编码数据") |
| | | public R editSaveCode(@RequestBody CodeOrderDTO orderDTO){ |
| | | engineService.editSaveCode(orderDTO); |
| | | return R.success("修改成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除主题库的数据 |
| | | * @param deleteBatchDTO 删除的信息,必须要有主键和分类的主键 |
| | | * @return 执行结果 |
| | | */ |
| | | @VciBusinessLog(operateName = "批量删除主题库的数据") |
| | | @DeleteMapping("/deleteCode") |
| | | public R deleteCode(@RequestBody CodeDeleteBatchDTO deleteBatchDTO){ |
| | | engineService.deleteCode(deleteBatchDTO); |
| | | return R.success("删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类和阶段的编号,获取包含的属性 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @param phase 阶段的名称 |
| | | * @return 包含的属性,请获取obj属性 |
| | | */ |
| | | @VciBusinessLog(operateName = "获取阶段的属性信息") |
| | | @GetMapping("/listPhaseAttrByClassifyOid") |
| | | public R listPhaseAttrByClassifyOid(String codeClassifyOid,String phase){ |
| | | return R.data(engineService.listPhaseAttrByClassifyOid(codeClassifyOid,phase)); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前分类所在路径上的分类属性 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @return 包含了当前分类的上级和所有层级的下级 |
| | | */ |
| | | @GetMapping("/hasSelfClassifyTree") |
| | | public List<Tree> hasSelfClassifyTree(String codeClassifyOid){ |
| | | return engineService.hasSelfClassifyTree(codeClassifyOid); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类获取对应的数据 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @param templateOid 模板的主键 |
| | | * @param queryObject 基础查询对象 |
| | | * @return 数据的信息(包含下级分类) |
| | | */ |
| | | @GetMapping("/gridTableDataByClassifyOid") |
| | | @VciBusinessLog(operateName = "查询主题库分类的数据") |
| | | public DataGrid<Map<String,String>> gridTableDataByClassifyOid(String codeClassifyOid, String templateOid, BaseQueryObject queryObject){ |
| | | //TODO后续可以定义查询模板来查询 |
| | | return engineService.gridTableDataByClassifyOid(codeClassifyOid,templateOid,queryObject.getConditionMap(),queryObject.getPageHelper()); |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 获取分类对象 |
| | | * @param redisOid |
| | | * @return |
| | | */ |
| | | @GetMapping("/gridclassifys") |
| | | public R gridclassifys(String redisOid){ |
| | | List<CodeImportTemplateVO> codeImportTemplateVOs=mdmIOService.gridclassifys(redisOid); |
| | | return R.data(codeImportTemplateVOs); |
| | | } |
| | | |
| | | /*** |
| | | * 从redis缓存里获取到导入正确的数据 |
| | | * @param codeClassifyOid |
| | | * @param redisOid |
| | | * @return |
| | | */ |
| | | @GetMapping("/gridValidata") |
| | | public DataGrid<Map<String,String>> gridValidata(String codeClassifyOid,String redisOid){ |
| | | return mdmIOService.gridDatas(codeClassifyOid,redisOid); |
| | | } |
| | | |
| | | /*** |
| | | * 从redis缓存里获取到导入正确的数据 |
| | | * @param dataOid |
| | | * @param redisOid |
| | | * @return |
| | | */ |
| | | @GetMapping("/gridRowResemble") |
| | | public DataGrid<Map<String,String>> gridRowResemble(String dataOid,String redisOid){ |
| | | return mdmIOService.gridRowResemble(dataOid,redisOid); |
| | | } |
| | | |
| | | /*** |
| | | * 从redis缓存里获取到导入具有相似项的数据 |
| | | * @param codeClassifyOid |
| | | * @param redisOid |
| | | * @return |
| | | */ |
| | | @GetMapping("/gridResemble") |
| | | public DataGrid<Map<String,String>> gridResemble(String codeClassifyOid,String redisOid){ |
| | | return mdmIOService.gridDatas(codeClassifyOid,redisOid); |
| | | } |
| | | |
| | | /** |
| | | * 批量保存流程执行页面修改的内容 |
| | | * @param orderDTOList 编码相关的信息,不需要码段的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/batchUpdateCode") |
| | | public R batchUpdateCode(@RequestBody List<CodeOrderDTO> orderDTOList){ |
| | | return engineService.batchUpdateCode(orderDTOList); |
| | | } |
| | | |
| | | /** |
| | | * 标记流程中业务数据是否通过 |
| | | * @param oid 业务数据主键 |
| | | * @param btmName 业务类型 |
| | | * @param pass 是否通过 true-通过;false-不通过 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/markPass") |
| | | public R markDataPassing(String oid,String btmName,Boolean pass){ |
| | | return engineService.markDataPassing(oid,btmName,pass); |
| | | } |
| | | |
| | | /** |
| | | * 组合规则的预览的内容 |
| | | * @param orderDTO 申请编码信息 |
| | | * @return 公式转换后的值 |
| | | */ |
| | | @PostMapping("/previewCompRule") |
| | | public R previewCompRule(@RequestBody CodeOrderDTO orderDTO){ |
| | | return R.data(engineService.previewCompRule(orderDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 分类注入的内容 |
| | | * @param orderDTO 申请编码的信息,包含分类的主键和模板的主键 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/previewClassify") |
| | | public R previewClassify(@RequestBody CodeOrderDTO orderDTO){ |
| | | VciBaseUtil.alertNotNull(orderDTO,"申请的信息",orderDTO.getCodeClassifyOid(),"分类主键",orderDTO.getTemplateOid(),"模板的主键"); |
| | | Map<String,String> classifyMap = engineService.previewClassify(orderDTO.getCodeClassifyOid(),orderDTO.getTemplateOid()); |
| | | return R.data(classifyMap); |
| | | } |
| | | |
| | | /** |
| | | * 下载错误的文件信息 |
| | | * @param uuid 唯一标识 |
| | | * @param response 响应对象 |
| | | * @throws IOException 抛出异常 |
| | | */ |
| | | @GetMapping("/downloadErrorFile") |
| | | public void downloadErrorFile(String uuid,HttpServletResponse response) throws IOException { |
| | | ControllerUtil.downloadErrorFile(response,uuid); |
| | | } |
| | | |
| | | /** |
| | | * 升版编码数据 |
| | | * @param orderDTO 编码相关的信息,不需要码段的信息 |
| | | * @return 执行结果 |
| | | */ |
| | | @VciBusinessLog(operateName = "升版编码数据") |
| | | @PostMapping("/upSaveCode") |
| | | public R upSaveCode(@RequestBody CodeOrderDTO orderDTO){ |
| | | engineService.upSaveCode(orderDTO); |
| | | return R.success("操作成功!"); |
| | | } |
| | | |
| | | /** |
| | | * 使用码段的主键获取分类的码值内容 |
| | | * @param classifySecOid 码段的主键 |
| | | * @param parentClassifyValueOid 上级分类的主键 |
| | | * @return 分类码值的内容 |
| | | */ |
| | | @GetMapping("/listCodeClassifyValueBySecOid") |
| | | public DataGrid<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; |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的主键来获取编码规则 |
| | | * @param codeClassifyOid 分类的主键 |
| | | * @return 编码规则的内容 |
| | | */ |
| | | @GetMapping("/getCodeRuleByClassifyOid") |
| | | // @VciUnCheckRight |
| | | public R<CodeRuleVO> getCodeRuleByClassifyOid(String codeClassifyOid){ |
| | | return R.data(engineService.getCodeRuleByClassifyOid(codeClassifyOid)); |
| | | } |
| | | |
| | | /** |
| | | * 使用主键获取数据 |
| | | * @param oid 数据主键 |
| | | * @param templateOid 模板的主键 |
| | | * @return 数据内容 |
| | | */ |
| | | @GetMapping("/getDataByOid") |
| | | public R<List<Map<String,String>>> getDataByOid(String oid,String templateOid){ |
| | | return engineService.getDataByOid(oid,templateOid); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类模板主键+模板流程名称获取在审批页面上左侧显示的属性 |
| | | * @param templateOid 分类模板的主键 |
| | | * @param executionId 流程执行id |
| | | * @param processUse 流程的用途 |
| | | * @return 树节点显示的名称 |
| | | */ |
| | | @GetMapping("/getFieldByProcessTemplate") |
| | | public List<String> getFieldByProcessTemplate(String templateOid,String executionId,String processUse){ |
| | | return engineService.getFieldByProcessTemplate(templateOid,executionId,processUse); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的主键获取业务数据 |
| | | * @param btmType 业务类型 |
| | | * @param queryObject 查询对象 |
| | | * @return 表格的显示对象值 |
| | | */ |
| | | @GetMapping("/getTableDataByOids") |
| | | public DataGrid<Map<String,String>> getTableDataByOids(String btmType,BaseQueryObject queryObject){ |
| | | return engineService.getTableDataByExecutionId(btmType,queryObject); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的主键获取表格的定义 |
| | | * @param codeClassifyOid 分类主键 |
| | | * @param phase 阶段的名称 |
| | | * @return UI相关的信息(仅包含表单) |
| | | */ |
| | | @GetMapping("/getTableDefineByClassifyOid") |
| | | public MdmUIInfoVO getTableDefineByClassifyOid(String codeClassifyOid,String phase){ |
| | | return engineService.getTableDefineByClassifyOid_v2(codeClassifyOid,phase); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的的编号路径,获取表单的定义 |
| | | * @param idPath 编号的路径 |
| | | * @return UI相关的信息(仅包含表单) |
| | | */ |
| | | // @VciUnCheckRight |
| | | @GetMapping("/getFormDefineByClassifyIdPath") |
| | | public MdmUIInfoVO getFormDefineByClassifyIdPath(String idPath){ |
| | | return engineService.getFormDefineByClassifyIdPath(idPath); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的主键获取表单的定义 |
| | | * @param codeClassifyOid 分类主键 |
| | | * @return UI相关的信息(仅包含表单) |
| | | */ |
| | | @GetMapping("/getFormDefineByClassifyOid") |
| | | public MdmUIInfoVO getFormDefineByClassifyOid(String codeClassifyOid){ |
| | | return engineService.getFormDefineByClassifyOid(codeClassifyOid); |
| | | } |
| | | |
| | | /** |
| | | * 根据模板的主键获取表格的定义 |
| | | * @param templateOid 模板的主键 |
| | | * @return ui相关的信息(仅包含表格) |
| | | */ |
| | | @GetMapping("/getTableDefineByTemplateOid") |
| | | public MdmUIInfoVO getTableDefineByTemplateOid(String templateOid){ |
| | | return engineService.getTableDefineByTemplateOid(templateOid); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类的编号路径,获取表格的相关定义 |
| | | * @param codeClassifyIdPath 分类的编号路径,必须是从顶层节点开始,xxx/yy/zz这样的格式 |
| | | * @param functionId 功能的编号 |
| | | * @return UI相关的信息(仅包含表格) |
| | | */ |
| | | @GetMapping("/getUIInfoByClassifyIdPath") |
| | | public MdmUIInfoVO getUIInfoByClassifyIdPath(String codeClassifyIdPath,String functionId){ |
| | | return engineService.getUIInfoByClassifyIdPath(codeClassifyIdPath,functionId); |
| | | } |
| | | |
| | | /** |
| | | * 使用分类获取表格的定义 |
| | | * @param codeClassifyOid 分类主键 |
| | | * @param functionId 功能的编号 |
| | | * @return UI相关的信息(仅包含表格) |
| | | */ |
| | | @GetMapping("/getUIInfoByClassifyOid") |
| | | public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid,String functionId){ |
| | | return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/thisistest") |
| | | @ResponseBody |
| | | public List<BaseModel> thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | // return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | } |