首页 > 酒水资讯 > 酒水新闻

字体转换非主流,字体转换器在线转换宋体

酒易淘 酒水新闻 2022-08-23 09:08:39

品牌名称:酱香白酒加盟 所属行业:酒水 > 白酒

基本投资:10~50万元 投资热度:

加盟意向:1634 门店数量:534家

索要资料 查看详情

  

  /**张居正(音译)Id号,范仲淹(音译)* @ param processinstanceid * @ param * @ param usecustomcolor true 3330云娥与云娥(是杨茂清,哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟),默认值:黄绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿(大哥.)* @ return */public void getflow img by instance id(string processinstanceid,HttpServletResponse,boolean usecustomcolor){ try { if(org。springframeworkutil。字符串实用程序。isempty(processinstanceid)){ log。错误(“processinstance id为空”);返回;} //范希洛范希洛historicalacpprocessinstance historicalacpprocessinstance=history service .createhistoricacprocessinstance查询().processInstanceId .single result();//范希洛范希洛,阿叔呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀呀listshipactivityinstance historicalactivityinstances=history service .createhistoriactivityinstance查询().processInstanceId .orderbyhistoricalactivityinstanceid().desc .list();//伊万诺维奇伊万诺维奇伊万诺维奇伊万诺维奇身份号你好liststring highlightidavitiids=new ArrayList();int index=1:for { if(usecustomcolor){//云娥与云娥if(index===historic ativity stances。size())){//哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟哟突出显示activitids。添加(historiactivityid。getactivityid()' # ');} else { //奉子曰highlightidactivitiids。补充(历史性立场。getactivityid());} } else { //黄绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿绿highlightidactivitiids。补充(历史性立场。getactivityid());}索引;}流程图生成器流程图生成器=nullif (useCustomColor) { //云娥同云娥同云娥同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月同月processdiagramgenerator=new customprocessdiagramgenerator();} else { //我的天啊,我的天啊,我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊!我的天啊processdiagramgenerator=new defaultprocessdiagramgenerator();} Bpmn   

Model bpmnModel = repositoryService .getBpmnModel(historicProcessInstance.getProcessDefinitionId()); // 高亮流程已发生流转的线id集合 List<String> highLightedFlowIds = getHighLightedFlows(bpmnModel, historicActivityInstances); // 使用默认配置获得流程图表生成器,并生成追踪图片字符流 InputStream imageStream = processDiagramGenerator.generateDiagram(bpmnModel, highLightedActivitiIds, highLightedFlowIds, "宋体", "宋体", "宋体"); // 输出图片内容 Integer byteSize = 1024; byte<> b = new byte; int len; while ((len = imageStream.read(b, 0, byteSize)) != -1) { response.getOutputStream().write(b, 0, len); } } catch (Exception e) { log.error("processInstanceId" + processInstanceId + "生成流程图失败,原因:" + e.getMessage(), e); } }/** * 获取已经流转的线 * * @param bpmnModel * @param historicActivityInstances * @return */ private static List<String> getHighLightedFlows(BpmnModel bpmnModel, List<HistoricActivityInstance> historicActivityInstances) { // 流转线ID集合 List<String> flowIdList = new ArrayList<String>(); // 全部活动实例 List<FlowNode> historicFlowNodeList = new LinkedList<FlowNode>(); // 已完成的历史活动节点 List<HistoricActivityInstance> finishedActivityInstanceList = new LinkedList<HistoricActivityInstance>(); for (HistoricActivityInstance historicActivityInstance : historicActivityInstances) { historicFlowNodeList.add((FlowNode) bpmnModel.getMainProcess().getFlowElement(historicActivityInstance.getActivityId(), true)); if (historicActivityInstance.getEndTime() != null) { finishedActivityInstanceList.add(historicActivityInstance); } } // 遍历已完成的活动实例,从每个实例的outgoingFlows中找到已执行的 FlowNode currentFlowNode = null; for (HistoricActivityInstance currentActivityInstance : finishedActivityInstanceList) { // 获得当前活动对应的节点信息及outgoingFlows信息 currentFlowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(currentActivityInstance.getActivityId(), true); List<SequenceFlow> sequenceFlowList = currentFlowNode.getOutgoingFlows(); /** * 遍历outgoingFlows并找到已已流转的 * 满足如下条件认为已已流转: * 1.当前节点是并行网关或包含网关,则通过outgoingFlows能够在历史活动中找到的全部节点均为已流转 * 2.当前节点是以上两种类型之外的,通过outgoingFlows查找到的时间最近的流转节点视为有效流转 */ FlowNode targetFlowNode = null; if ("parallelGateway".equals(currentActivityInstance.getActivityType()) || "inclusiveGateway".equals(currentActivityInstance.getActivityType())) { // 遍历历史活动节点,找到匹配Flow目标节点的 for (SequenceFlow sequenceFlow : sequenceFlowList) { targetFlowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(sequenceFlow.getTargetRef(), true); if (historicFlowNodeList.contains(targetFlowNode) && (sequenceFlowList.size() > 1 || Objects.nonNull(currentActivityInstance.getEndTime()))) { flowIdList.add(sequenceFlow.getId()); } } } else { // 遍历历史活动节点,找到匹配Flow目标节点的 for (SequenceFlow sequenceFlow : sequenceFlowList) { for (HistoricActivityInstance historicActivityInstance : historicActivityInstances) { if (historicActivityInstance.getActivityId().equals(sequenceFlow.getTargetRef())) { if(Objects.nonNull(currentActivityInstance.getEndTime()) && Objects.nonNull(historicActivityInstance.getStartTime())){ String endTime = DateUtil.format(currentActivityInstance.getEndTime(), "yyyy-MM-dd HH:mm:ss"); String startTime = DateUtil.format(historicActivityInstance.getStartTime(), "yyyy-MM-dd HH:mm:ss"); if(startTime.equals(endTime)){ flowIdList.add(sequenceFlow.getId()); } } } } } } } return flowIdList; }显示效果如下:

  


  

免费咨询
免费获取加盟资料