Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: @log.path@/iailab-gateway/log/${spring.application.name}.log # 日志文件名,全路径 |
| | | |
| | | knife4j: |
| | | # 聚合 Swagger 文档,参考 https://doc.xiaominfo.com/docs/action/springcloud-gateway 文档 |
| | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.number.NumberUtils; |
| | | import com.iailab.framework.datapermission.core.annotation.DataPermission; |
| | | import com.iailab.module.bpm.controller.admin.task.vo.task.*; |
| | | import com.iailab.module.bpm.convert.task.BpmTaskConvert; |
| | | import com.iailab.module.bpm.dal.dataobject.definition.BpmFormDO; |
| | |
| | | @GetMapping("todo-page") |
| | | @Operation(summary = "获取 Todo 待办任务分页") |
| | | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| | | @DataPermission(enable = false) // 关闭数据权限,避免只查看自己时,查询不到部门。 |
| | | public CommonResult<PageResult<BpmTaskRespVO>> getTaskTodoPage(@Valid BpmTaskPageReqVO pageVO) { |
| | | PageResult<Task> pageResult = taskService.getTaskTodoPage(getLoginUserId(), pageVO); |
| | | if (CollUtil.isEmpty(pageResult.getList())) { |
| | |
| | | // 拼接数据 |
| | | Map<String, ProcessInstance> processInstanceMap = processInstanceService.getProcessInstanceMap( |
| | | convertSet(pageResult.getList(), Task::getProcessInstanceId)); |
| | | // TODO 此处有bug |
| | | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( |
| | | convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); |
| | | return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap)); |
| | | PageResult<BpmTaskRespVO> bpmTaskRespVOPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap); |
| | | return success(bpmTaskRespVOPageResult); |
| | | } |
| | | |
| | | @GetMapping("done-page") |
| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.iailab.framework.common.util.number.NumberUtils; |
| | | import com.iailab.framework.datapermission.core.annotation.DataPermission; |
| | | import com.iailab.module.bpm.enums.definition.BpmBoundaryEventType; |
| | | import com.iailab.module.bpm.framework.flowable.core.enums.BpmnModelConstants; |
| | | import com.iailab.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
| | |
| | | package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.flowable.bpmn.model.FieldExtension; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.flowable.engine.delegate.JavaDelegate; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类型为 class 的 ExecutionListener 监听器示例 |
| | |
| | | |
| | | @Override |
| | | public void execute(DelegateExecution execution) { |
| | | log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), |
| | | log.info("[execute][execution({}) 执行监听器(类)被调用!变量有:{}]", execution.getId(), |
| | | execution.getCurrentFlowableListener().getFieldExtensions()); |
| | | List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); |
| | | if(ObjectUtils.isNotEmpty(fieldExtensions)) { |
| | | fieldExtensions.stream().forEach(fieldExtension -> { |
| | | System.out.println(fieldExtension.getFieldName()); |
| | | System.out.println(fieldExtension.getExpression()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.flowable.bpmn.model.FieldExtension; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.flowable.engine.delegate.JavaDelegate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类型为 delegateExpression 的 ExecutionListener 监听器示例 |
| | |
| | | |
| | | @Override |
| | | public void execute(DelegateExecution execution) { |
| | | log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), |
| | | log.info("[execute][execution({}) 执行监听器(委托表达式被调用)!变量有:{}]", execution.getId(), |
| | | execution.getCurrentFlowableListener().getFieldExtensions()); |
| | | List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); |
| | | if(ObjectUtils.isNotEmpty(fieldExtensions)) { |
| | | fieldExtensions.stream().forEach(fieldExtension -> { |
| | | System.out.println(fieldExtension.getFieldName()); |
| | | System.out.println(fieldExtension.getStringValue()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.flowable.bpmn.model.FieldExtension; |
| | | import org.flowable.engine.delegate.DelegateExecution; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 类型为 expression 的 ExecutionListener 监听器示例 |
| | |
| | | public class DemoSpringExpressionExecutionListener { |
| | | |
| | | public void execute(DelegateExecution execution) { |
| | | log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(), |
| | | log.info("[execute][execution({}) 执行监听器(spring表达式)被调用!变量有:{}]", execution.getId(), |
| | | execution.getCurrentFlowableListener().getFieldExtensions()); |
| | | List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions(); |
| | | if(ObjectUtils.isNotEmpty(fieldExtensions)) { |
| | | fieldExtensions.stream().forEach(fieldExtension -> { |
| | | System.out.println(fieldExtension.getFieldName()); |
| | | System.out.println(fieldExtension.getExpression()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void notify(DelegateTask delegateTask) { |
| | | log.info("[execute][task({}) 被调用]", delegateTask.getId()); |
| | | log.info("[execute][task({}) 任务监听器(类)被调用]", delegateTask.getId()); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.flowable.task.service.delegate.DelegateTask; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 类型为 delegateExpression 的 TaskListener 监听器示例 |
| | | * |
| | |
| | | |
| | | @Override |
| | | public void notify(DelegateTask delegateTask) { |
| | | log.info("[execute][task({}) 被调用]", delegateTask.getId()); |
| | | log.info("[execute][task({}) 任务监听器(委托表达式)被调用]", delegateTask.getId()); |
| | | Map<String, Object> variables = delegateTask.getVariables(); |
| | | System.out.println(variables.toString());; |
| | | } |
| | | |
| | | } |
| | |
| | | public class DemoSpringExpressionTaskListener { |
| | | |
| | | public void notify(DelegateTask delegateTask) { |
| | | log.info("[execute][task({}) 被调用]", delegateTask.getId()); |
| | | log.info("[execute][task({}) 任务监听器(spring表达式)被调用]", delegateTask.getId()); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.iailab.framework.common.util.number.NumberUtils; |
| | | import com.iailab.framework.common.util.object.ObjectUtils; |
| | | import com.iailab.framework.common.util.object.PageUtils; |
| | | import com.iailab.framework.datapermission.core.annotation.DataPermission; |
| | | import com.iailab.framework.web.core.util.WebFrameworkUtils; |
| | | import com.iailab.module.bpm.controller.admin.task.vo.task.*; |
| | | import com.iailab.module.bpm.convert.task.BpmTaskConvert; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | AdminUserRespDTO startUser = adminUserApi.getUser(Long.valueOf(processInstance.getStartUserId())).getCheckedData(); |
| | | messageService.sendMessageWhenTaskAssigned(BpmTaskConvert.INSTANCE.convert(processInstance, startUser, task)); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<ApiPlanItemDTO> getInfoByIds(Set<String> planIds) { |
| | | if (CollectionUtils.isEmpty(planIds)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | List<PlanItemEntity> plans = planItemService.getInfoByIds(planIds); |
| | | return ConvertUtils.sourceToTarget(plans,ApiPlanItemDTO.class); |
| | | } |
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: @log.path@/iailab-data/log/${spring.application.name}.log # 日志文件名,全路径 |
| | | level: |
| | | org: |
| | | springframework: |
| | |
| | | username: @nacos.username@ |
| | | password: @nacos.password@ |
| | | discovery: # 【配置中心】配置项 |
| | | ip: @deploy.server@ |
| | | # ip: @deploy.server@ |
| | | namespace: @profiles.active@ |
| | | group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP |
| | | metadata: |
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: D:/DLUT/IailabPlat/webapp/infra/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: @log.path@/iailab-infra/log/${spring.application.name}.log # 日志文件名,全路径 |
| | | |
| | | --- #################### 接口文档配置 #################### |
| | | |
| | |
| | | ex.printStackTrace(); |
| | | throw ex; |
| | | } catch (Exception ex) { |
| | | log.error("调用发生异常,异常信息为:{1}", ex); |
| | | // ex.printStackTrace(); |
| | | // log.error("调用发生异常,异常信息为:{0}", ex.getMessage()); |
| | | ex.printStackTrace(); |
| | | throw new ModelInvokeException(ex.getMessage()); |
| | | } |
| | | return result; |
| | |
| | | SampleDataConstructor sampleDataConstructor = sampleFactory.createSampelData(typeA); |
| | | return sampleDataConstructor.prepareSampleData(sampleInfo); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new ModelInvokeException(MessageFormat.format("{0},Name:{1}", |
| | | ModelInvokeException.errorGetModelArithParam, itemName)); |
| | | } |
| | |
| | | import com.iailab.module.data.api.point.dto.ApiPointDTO; |
| | | import com.iailab.module.data.enums.DataPointFreqEnum; |
| | | import com.iailab.module.data.enums.TimeGranularitySecEnum; |
| | | import com.iailab.module.model.mcs.pre.enums.PredGranularityEnum; |
| | | import com.iailab.module.model.mdk.common.enums.ModelParamType; |
| | | import com.iailab.module.model.mdk.sample.dto.SampleData; |
| | | import com.iailab.module.model.mdk.sample.dto.SampleInfo; |
| | |
| | | case NORMALITEM: |
| | | case MERGEITEM: |
| | | // 预测值 |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(startTime); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.add(Calendar.DAY_OF_YEAR, 1); |
| | | startTime = calendar.getTime(); |
| | | start = startTime.getTime(); |
| | | |
| | | calendar.setTime(endTime); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | endTime = calendar.getTime(); |
| | | end = endTime.getTime(); |
| | | |
| | | oneMin = 60 * 1000L; |
| | | oneMin = PredGranularityEnum.MIN1.getCode() * 1000L; |
| | | start = start - (start % oneMin) + oneMin; |
| | | end = end - (end % oneMin) + oneMin; |
| | | mins = ((end - start) / oneMin); |
| | | break; |
| | | case DATAPOINT: |
| | |
| | | break; |
| | | case NORMALITEM: |
| | | case MERGEITEM: |
| | | dateTime = calendar.getTime(); |
| | | dateTime = calculateTime(originalTime, true, columnItem.getDataLength(), 60); |
| | | break; |
| | | case IND: |
| | | dateTime = calculateTime(originalTime, true, columnItem.getDataLength(), 60); |
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: @log.path@/iailab-model/log/${spring.application.name}.log # 日志文件名,全路径 |
| | | level: |
| | | org: |
| | | springframework: |
| | |
| | | menu.setParentId(parentMenu.getId()); |
| | | tempChildren.add(parentMenu); |
| | | } else if(menu.getType().equals(MenuTypeEnum.DIR.getType())) { |
| | | // 为应用菜单二级目录前增加“/” |
| | | // 为应用菜单二级目录前增加“/” (不处理外链菜单path) |
| | | if(!menu.getPath().contains("http:") && !menu.getPath().contains("https:")) { |
| | | menu.setPath("/" + menu.getPath()); |
| | | } |
| | |
| | | List<AuthPermissionInfoRespVO.MenuVO> menuVOS = filterList(treeNodeMap.values(), node -> id.equals(node.getParentId())); |
| | | if(type == 0) { |
| | | menuVOS.stream().forEach(menuVO -> { |
| | | menuVO.setPath((parentPath + "/" + menuVO.getPath()).replace("//", "/")); |
| | | // 不处理外链菜单path |
| | | if(!menuVO.getPath().contains("http:") && !menuVO.getPath().contains("https:")) { |
| | | menuVO.setPath((parentPath + "/" + menuVO.getPath()).replace("//", "/")); |
| | | } |
| | | }); |
| | | } |
| | | return menuVOS; |
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: @log.path@/iailab-system/log/${spring.application.name}.log # 日志文件名,全路径 |
| | | |
| | | --- #################### 接口文档配置 #################### |
| | | |
| | |
| | | begin-code: 9999 # 这里配置 9999 的原因是,测试方便。 |
| | | end-code: 9999 # 这里配置 9999 的原因是,测试方便。 |
| | | |
| | | debug: false |
| | | debug: true |
| | |
| | | <nacos.metadata.version>1.0.0</nacos.metadata.version> |
| | | <log.path>D:\DLUT\iailab-plat</log.path> |
| | | <logstash.address>127.0.0.1:4560</logstash.address> |
| | | <deploy.server>192.168.56.1</deploy.server> |
| | | <deploy.server>172.16.216.132</deploy.server> |
| | | </properties> |
| | | <activation> |
| | | <!-- 默认环境 --> |
| | |
| | | <nacos.username>nacos</nacos.username> |
| | | <nacos.password>nacos</nacos.password> |
| | | <nacos.metadata.version>1.0.0</nacos.metadata.version> |
| | | <log.path>D:\iailab\logs</log.path> |
| | | <log.path>D:\iailab</log.path> |
| | | <logstash.address>127.0.0.1:4560</logstash.address> |
| | | <deploy.server>10.88.4.131</deploy.server> |
| | | </properties> |