处理流程与OA表单中的BUG
This commit is contained in:
parent
4323983092
commit
91747a19e5
@ -4,6 +4,7 @@ import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.exceptions.ParamsException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.activiti.pojo.dtos.ModelDTO;
|
||||
import ink.wgink.module.activiti.pojo.vos.ActivitiVO;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -76,7 +77,7 @@ public class ActivitiController extends DefaultBaseController {
|
||||
@ApiOperation(value = "模型列表", notes = "模型列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<Model> list() {
|
||||
public List<ModelDTO> list() {
|
||||
return activitiService.list();
|
||||
}
|
||||
|
||||
@ -87,7 +88,7 @@ public class ActivitiController extends DefaultBaseController {
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<Model>> listPage(ListPage page) {
|
||||
public SuccessResultList<List<ModelDTO>> listPage(ListPage page) {
|
||||
return activitiService.listPage(page.getPage(), page.getRows());
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
package ink.wgink.module.activiti.enums.oa;
|
||||
|
||||
/**
|
||||
* @ClassName: SelectAssigneeTypeEnum
|
||||
* @Description: 选择代理人类型
|
||||
* @Author: wanggeng
|
||||
* @Date: 2022/4/22 17:00
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public enum SelectAssigneeTypeEnum {
|
||||
CHECKBOX("checkbox", "多选"),
|
||||
RADIO("radio", "单选");
|
||||
|
||||
private String value;
|
||||
private String summary;
|
||||
|
||||
SelectAssigneeTypeEnum(String value, String summary) {
|
||||
this.value = value;
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value == null ? "" : value.trim();
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary == null ? "" : summary.trim();
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package ink.wgink.module.activiti.pojo.dtos;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName: ModelDTO
|
||||
* @Description: 模型
|
||||
* @Author: wanggeng
|
||||
* @Date: 2022/4/22 17:49
|
||||
* @Version: 1.0
|
||||
*/
|
||||
|
||||
@ApiModel
|
||||
public class ModelDTO {
|
||||
|
||||
@ApiModelProperty(name = "id", value = "主键")
|
||||
private String id;
|
||||
@ApiModelProperty(name = "name", value = "名称")
|
||||
private String name;
|
||||
@ApiModelProperty(name = "key", value = "key")
|
||||
private String key;
|
||||
@ApiModelProperty(name = "version", value = "版本")
|
||||
private Integer version;
|
||||
@ApiModelProperty(name = "deploymentId", value = "部署ID")
|
||||
private String deploymentId;
|
||||
@ApiModelProperty(name = "createTime", value = "创建时间")
|
||||
private String createTime;
|
||||
@ApiModelProperty(name = "lastUpdateTime", value = "最后更新时间")
|
||||
private String lastUpdateTime;
|
||||
|
||||
public String getId() {
|
||||
return id == null ? "" : id.trim();
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name == null ? "" : name.trim();
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key == null ? "" : key.trim();
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public Integer getVersion() {
|
||||
return version == null ? 0 : version;
|
||||
}
|
||||
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getDeploymentId() {
|
||||
return deploymentId == null ? "" : deploymentId.trim();
|
||||
}
|
||||
|
||||
public void setDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime == null ? "" : createTime.trim();
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getLastUpdateTime() {
|
||||
return lastUpdateTime == null ? "" : lastUpdateTime.trim();
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(String lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"id\":\"")
|
||||
.append(id).append('\"');
|
||||
sb.append(",\"name\":\"")
|
||||
.append(name).append('\"');
|
||||
sb.append(",\"key\":\"")
|
||||
.append(key).append('\"');
|
||||
sb.append(",\"version\":")
|
||||
.append(version);
|
||||
sb.append(",\"deploymentId\":\"")
|
||||
.append(deploymentId).append('\"');
|
||||
sb.append(",\"createTime\":\"")
|
||||
.append(createTime).append('\"');
|
||||
sb.append(",\"lastUpdateTime\":\"")
|
||||
.append(lastUpdateTime).append('\"');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package ink.wgink.module.activiti.service.activiti;
|
||||
|
||||
import ink.wgink.module.activiti.pojo.dtos.ModelDTO;
|
||||
import ink.wgink.module.activiti.pojo.vos.ActivitiVO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import org.activiti.engine.repository.Model;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@ -49,7 +49,7 @@ public interface IActivitiService {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Model> list();
|
||||
List<ModelDTO> list();
|
||||
|
||||
/**
|
||||
* 模型分页列表
|
||||
@ -58,6 +58,6 @@ public interface IActivitiService {
|
||||
* @param rows
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<Model>> listPage(int page, int rows);
|
||||
SuccessResultList<List<ModelDTO>> listPage(int page, int rows);
|
||||
|
||||
}
|
||||
|
@ -2,13 +2,11 @@ package ink.wgink.module.activiti.service.activiti.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.module.activiti.pojo.dtos.ActivitiProcdefDTO;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiModelService;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiProcdefService;
|
||||
import ink.wgink.module.activiti.service.oa.INodeAssigneeService;
|
||||
import ink.wgink.module.activiti.service.oa.INodeFieldService;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import org.activiti.engine.RepositoryService;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.repository.ProcessDefinitionQuery;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -47,7 +45,7 @@ public class ActivitiProcdefServiceImpl extends DefaultBaseService implements IA
|
||||
@Override
|
||||
public SuccessResultList<List<ActivitiProcdefDTO>> listPage(int page, int rows) {
|
||||
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
|
||||
List<ProcessDefinition> processDefinitions = processDefinitionQuery.listPage(page - 1, rows);
|
||||
List<ProcessDefinition> processDefinitions = processDefinitionQuery.orderByDeploymentId().asc().listPage(page - 1, rows);
|
||||
|
||||
List<ActivitiProcdefDTO> activitiProcdefDTOs = new ArrayList<>();
|
||||
processDefinitions.forEach(processDefinition -> {
|
||||
|
@ -5,13 +5,16 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.base.SystemException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.activiti.pojo.dtos.ModelDTO;
|
||||
import ink.wgink.module.activiti.pojo.vos.ActivitiVO;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiModelService;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiService;
|
||||
import ink.wgink.module.activiti.service.oa.INodeAssigneeService;
|
||||
import ink.wgink.module.activiti.service.oa.INodeFieldService;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.date.DateUtil;
|
||||
import org.activiti.bpmn.model.BpmnModel;
|
||||
import org.activiti.bpmn.model.FlowNode;
|
||||
import org.activiti.bpmn.model.StartEvent;
|
||||
@ -27,7 +30,9 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
@ -114,11 +119,16 @@ public class ActivitiServiceImpl extends DefaultBaseService implements IActiviti
|
||||
* @return
|
||||
*/
|
||||
private String deployProcess(Model model, BpmnModel bpmnModel) {
|
||||
Deployment deployment = repositoryService.createDeployment()
|
||||
.name(model.getName())
|
||||
.key(model.getKey())
|
||||
.addBpmnModel(model.getKey() + "." + model.getVersion() + ".bpmn20.xml", bpmnModel)
|
||||
.deploy();
|
||||
Deployment deployment;
|
||||
try {
|
||||
deployment = repositoryService.createDeployment()
|
||||
.name(model.getName())
|
||||
.key(model.getKey())
|
||||
.addBpmnModel(model.getKey() + "." + model.getVersion() + ".bpmn20.xml", bpmnModel)
|
||||
.deploy();
|
||||
} catch (Exception e) {
|
||||
throw new SystemException(e.getMessage(), e);
|
||||
}
|
||||
return deployment.getId();
|
||||
}
|
||||
|
||||
@ -136,15 +146,32 @@ public class ActivitiServiceImpl extends DefaultBaseService implements IActiviti
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Model> list() {
|
||||
return repositoryService.createModelQuery().list();
|
||||
public List<ModelDTO> list() {
|
||||
return listModelDTO(repositoryService.createModelQuery().list());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<Model>> listPage(int page, int rows) {
|
||||
public SuccessResultList<List<ModelDTO>> listPage(int page, int rows) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery();
|
||||
List<Model> models = modelQuery.listPage(page - 1, rows);
|
||||
return new SuccessResultList<>(models, page, modelQuery.count());
|
||||
List<Model> models = modelQuery.orderByLastUpdateTime().asc().listPage(page - 1, rows);
|
||||
return new SuccessResultList<>(listModelDTO(models), page, modelQuery.count());
|
||||
}
|
||||
|
||||
private List<ModelDTO> listModelDTO(List<Model> models) {
|
||||
if (models.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return models.stream().map(model -> {
|
||||
ModelDTO modelDTO = new ModelDTO();
|
||||
modelDTO.setId(model.getId());
|
||||
modelDTO.setName(model.getName());
|
||||
modelDTO.setKey(model.getKey());
|
||||
modelDTO.setVersion(model.getVersion());
|
||||
modelDTO.setDeploymentId(model.getDeploymentId());
|
||||
modelDTO.setCreateTime(DateUtil.getDateTime(model.getCreateTime()));
|
||||
modelDTO.setLastUpdateTime(DateUtil.getDateTime(model.getCreateTime()));
|
||||
return modelDTO;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -352,6 +352,11 @@ public class NodeAssigneeServiceImpl extends DefaultBaseService implements INode
|
||||
List<String> roleUserIds = roleUserBaseService.listUserIdByRoleIdsAndUserIds(Arrays.asList(roleIds.split(",")), departmentUserIds);
|
||||
return listRoleCandidateUser(roleUserIds, positionIds);
|
||||
}
|
||||
if(!StringUtils.isBlank(positionIds)) {
|
||||
LOG.debug("查询职位用户");
|
||||
List<String> positionUserIds = positionUserBaseService.listUserIdByPositionIdsAndUserIds(Arrays.asList(positionIds.split(",")), departmentUserIds);
|
||||
return listPositionCandidateUser(positionUserIds);
|
||||
}
|
||||
return listNextUserTaskAssignees(departmentUserIds);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ package ink.wgink.module.activiti.service.oa.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.module.activiti.enums.oa.assignee.NodeTypeEnum;
|
||||
import ink.wgink.module.activiti.enums.oa.SelectAssigneeTypeEnum;
|
||||
import ink.wgink.module.activiti.service.activiti.IActivitiModelService;
|
||||
import ink.wgink.module.activiti.service.oa.IOaFormReportService;
|
||||
import ink.wgink.module.form.service.report.IFormReportService;
|
||||
@ -88,7 +88,8 @@ public class OaFormReportServiceImpl extends DefaultBaseService implements IOaFo
|
||||
if (!isNextEndEvent) {
|
||||
setFormReportAssignee(selectType, assignees, params);
|
||||
}
|
||||
taskService.complete(task.getId(), params, true);
|
||||
taskService.setVariablesLocal(task.getId(), params);
|
||||
taskService.complete(task.getId(), params);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -127,7 +128,8 @@ public class OaFormReportServiceImpl extends DefaultBaseService implements IOaFo
|
||||
if (!isNextEndEvent) {
|
||||
setFormReportAssignee(selectType, assignees, params);
|
||||
}
|
||||
taskService.complete(taskId, params, true);
|
||||
taskService.setVariablesLocal(taskId, params);
|
||||
taskService.complete(taskId, params);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -138,7 +140,7 @@ public class OaFormReportServiceImpl extends DefaultBaseService implements IOaFo
|
||||
* @param formReportParams 表单参数
|
||||
*/
|
||||
private void setFormReportAssignee(String selectType, List<String> assignees, Map<String, Object> formReportParams) {
|
||||
if (StringUtils.equals(selectType, NodeTypeEnum.MULTIPLE.getValue())) {
|
||||
if (StringUtils.equals(selectType, SelectAssigneeTypeEnum.CHECKBOX.getValue())) {
|
||||
formReportParams.put(IActivitiModelService.ASSIGNEE_LIST, assignees);
|
||||
} else {
|
||||
formReportParams.put(IOaFormReportService.KEY_ASSIGNEE_USER, assignees.get(0));
|
||||
|
@ -136,7 +136,7 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
public SuccessResultList<List<OaTaskDTO>> listPageTaskOfMine(int page, int rows) {
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
TaskQuery taskQuery = taskService.createTaskQuery().taskCandidateOrAssigned(userId);
|
||||
List<Task> tasks = taskQuery.includeProcessVariables().listPage(page - 1, rows);
|
||||
List<Task> tasks = taskQuery.includeProcessVariables().orderByTaskCreateTime().desc().listPage(page - 1, rows);
|
||||
List<OaTaskDTO> oaTaskDTOs = listOaTask(tasks);
|
||||
return new SuccessResultList<>(oaTaskDTOs, page, taskQuery.count());
|
||||
}
|
||||
@ -205,7 +205,7 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
public SuccessResultList<List<OaHistoryTaskDTO>> listPageHistoryTaskOfMine(int page, int rows) {
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(userId);
|
||||
List<HistoricTaskInstance> historicTaskInstances = historicTaskInstanceQuery.includeProcessVariables().finished().listPage(page - 1, rows);
|
||||
List<HistoricTaskInstance> historicTaskInstances = historicTaskInstanceQuery.includeProcessVariables().finished().orderByHistoricTaskInstanceEndTime().desc().listPage(page - 1, rows);
|
||||
List<OaHistoryTaskDTO> oaHistoryTaskDTOs = listOaHistoryTask(historicTaskInstances);
|
||||
return new SuccessResultList<>(oaHistoryTaskDTOs, page, historicTaskInstanceQuery.count());
|
||||
}
|
||||
@ -366,6 +366,13 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
List<String> departmentIds = ArrayListUtil.listBeanStringIdValue(departmentUserDTOs, "departmentId", DepartmentUserDTO.class);
|
||||
List<DepartmentDTO> departmentDTOs = departmentBaseService.listByIds(departmentIds);
|
||||
for (OaTaskDTO oaTaskDTO : oaTaskDTOs) {
|
||||
for (UserDTO userDTO : userDTOs) {
|
||||
if (!StringUtils.equals(oaTaskDTO.getStartUserId(), userDTO.getUserId())) {
|
||||
continue;
|
||||
}
|
||||
oaTaskDTO.setStartUserName(userDTO.getUserName());
|
||||
break;
|
||||
}
|
||||
for (DepartmentUserDTO departmentUserDTO : departmentUserDTOs) {
|
||||
if (!StringUtils.equals(oaTaskDTO.getStartUserId(), departmentUserDTO.getUserId())) {
|
||||
continue;
|
||||
@ -384,7 +391,9 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
startUserDepartmentNames += departmentDTO.getDepartmentName();
|
||||
oaTaskDTO.setStartUserDepartmentIds(startUserDepartmentIds);
|
||||
oaTaskDTO.setStartUserDepartmentNames(startUserDepartmentNames);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -442,6 +451,13 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
List<String> departmentIds = ArrayListUtil.listBeanStringIdValue(departmentUserDTOs, "departmentId", DepartmentUserDTO.class);
|
||||
List<DepartmentDTO> departmentDTOs = departmentBaseService.listByIds(departmentIds);
|
||||
for (OaHistoryTaskDTO oaHistoryTaskDTO : oaHistoryTaskDTOs) {
|
||||
for (UserDTO userDTO : userDTOs) {
|
||||
if (!StringUtils.equals(oaHistoryTaskDTO.getStartUserId(), userDTO.getUserId())) {
|
||||
continue;
|
||||
}
|
||||
oaHistoryTaskDTO.setStartUserName(userDTO.getUserName());
|
||||
break;
|
||||
}
|
||||
for (DepartmentUserDTO departmentUserDTO : departmentUserDTOs) {
|
||||
if (!StringUtils.equals(oaHistoryTaskDTO.getStartUserId(), departmentUserDTO.getUserId())) {
|
||||
continue;
|
||||
@ -460,7 +476,9 @@ public class OaServiceImpl extends DefaultBaseService implements IOaService {
|
||||
startUserDepartmentNames += departmentDTO.getDepartmentName();
|
||||
oaHistoryTaskDTO.setStartUserDepartmentIds(startUserDepartmentIds);
|
||||
oaHistoryTaskDTO.setStartUserDepartmentNames(startUserDepartmentNames);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
||||
var CANDIDATES_COLLECTION = '${candidates}';
|
||||
var MULTI_INSTANCE_COLLECTION = '${assigneeList}';
|
||||
var MULTI_INSTANCE_VARIABLE = 'assignee';
|
||||
var MULTI_ASSIGNEE_USER = '${assignee}';
|
||||
var NR_OF_COMPLETED_INSTANCES = 'nrOfCompletedInstances';
|
||||
var NR_OF_INSTANCES = 'nrOfInstances';
|
||||
var ASSIGNEE_USER = '${assigneeUser}';
|
||||
@ -408,6 +409,16 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
||||
$scope.updatePropertyInModel(assigneeProperty);
|
||||
}
|
||||
|
||||
// 多实例代理人变量
|
||||
function updateMultipleAssignee() {
|
||||
assigneeProperty.value = {};
|
||||
assigneeProperty.value.assignment = {
|
||||
assignee: MULTI_ASSIGNEE_USER,
|
||||
candidateUsers: []
|
||||
}
|
||||
$scope.updatePropertyInModel(assigneeProperty);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新多实例
|
||||
*/
|
||||
@ -510,6 +521,7 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
||||
if (assignee.nodeType === 'multiple') {
|
||||
// 清空代理人选项
|
||||
clearAssigneeAndCandidate();
|
||||
updateMultipleAssignee();
|
||||
// 并行
|
||||
if (assignee.multipleType === 'parallel') {
|
||||
updateParallel();
|
||||
|
@ -111,6 +111,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{field:'createTime', width:180, title: '创建时间', fixed:'right', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(!rowData) {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field:'lastUpdateTime', width:180, title: '最后更新时间', fixed:'right', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(!rowData) {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'option', width: 80, title: '流程图', align:'center', fixed: 'right',
|
||||
templet: function(row) {
|
||||
if(!row.deploymentId) {
|
||||
|
@ -20,16 +20,9 @@
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<div class="layui-card-body" style="padding: 0">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<textarea id="formXml" name="formXml" style="display: none;"></textarea>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -74,7 +67,7 @@
|
||||
codeMirrorConfig.mode = 'application/xml';
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById('formXml'), codeMirrorConfig);
|
||||
editor.setValue(value);
|
||||
editor.setSize('100%', win.height() - 90);
|
||||
editor.setSize('100%', win.height());
|
||||
editor.on('change', function(self, changeValue) {
|
||||
$('#formXml').val(self.getValue());
|
||||
});
|
||||
|
@ -0,0 +1,58 @@
|
||||
package ink.wgink.module.file.media.controller.api.srs.rtmp;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.result.SuccessResultCode;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName: RtmpController
|
||||
* @Description: rtmp 回调
|
||||
* @Author: wanggeng
|
||||
* @Date: 2022/4/22 10:39
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "rtmp接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/rtmp")
|
||||
public class RtmpCallbackController extends DefaultBaseController {
|
||||
|
||||
@PostMapping("on-connect")
|
||||
public SuccessResultCode<Integer> onConnect() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onClose")
|
||||
public SuccessResultCode<Integer> onClose() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onPublish")
|
||||
public SuccessResultCode<Integer> onPublish() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onUnPublish")
|
||||
public SuccessResultCode<Integer> onUnPublish() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onPlay")
|
||||
public SuccessResultCode<Integer> onPlay() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onStop")
|
||||
public SuccessResultCode<Integer> onStop() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
@PostMapping("on-onDvr")
|
||||
public SuccessResultCode<Integer> onDvr() {
|
||||
return new SuccessResultCode<>(0);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package ink.wgink.module.file.media.pojo.vos.srs.rtmp;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* @ClassName: RtmpCallbackVO
|
||||
* @Description: rtmp回调参数
|
||||
* @Author: wanggeng
|
||||
* @Date: 2022/4/22 14:44
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@ApiModel
|
||||
public class RtmpCallbackVO {
|
||||
|
||||
private String action;
|
||||
private String client_id;
|
||||
private String ip;
|
||||
private String vhost;
|
||||
private String app;
|
||||
private String tcUrl;
|
||||
private String pageUrl;
|
||||
private String send_bytes;
|
||||
private String recv_bytes;
|
||||
|
||||
}
|
@ -34,6 +34,8 @@ public class FormVO {
|
||||
private String appUpdatePageCode;
|
||||
@ApiModelProperty(name = "appShowPageCode", value = "APP展示页面代码")
|
||||
private String appShowPageCode;
|
||||
@ApiModelProperty(name = "mainTitleTpl", value = "主标题模板")
|
||||
private String mainTitleTpl;
|
||||
|
||||
public String getFormCode() {
|
||||
return formCode;
|
||||
@ -146,4 +148,12 @@ public class FormVO {
|
||||
public void setAppShowPageCode(String appShowPageCode) {
|
||||
this.appShowPageCode = appShowPageCode;
|
||||
}
|
||||
|
||||
public String getMainTitleTpl() {
|
||||
return mainTitleTpl == null ? "" : mainTitleTpl.trim();
|
||||
}
|
||||
|
||||
public void setMainTitleTpl(String mainTitleTpl) {
|
||||
this.mainTitleTpl = mainTitleTpl;
|
||||
}
|
||||
}
|
||||
|
@ -92,6 +92,7 @@ public class FormDesignServiceImpl extends DefaultBaseService implements IFormDe
|
||||
formVO.setFormStatus(FormStatusEnum.ACTIVE.getValue());
|
||||
formVO.setFormVersion(version);
|
||||
formVO.setFormSourceData(JSON.toJSONString(formDesignVO.getData()));
|
||||
formVO.setMainTitleTpl(formDesignVO.getMainTitleTpl());
|
||||
|
||||
// 美化代码
|
||||
for (FormDesignVO.Field field : formDesignVO.getFields()) {
|
||||
|
@ -269,9 +269,9 @@ public class FormReportServiceImpl extends DefaultBaseService implements IFormRe
|
||||
String key = tpl.substring(2, tpl.length() - 1);
|
||||
Object valueObj = map.get(key);
|
||||
if (valueObj == null) {
|
||||
mainTitle = mainTitle.replaceAll(tpl, "");
|
||||
mainTitle = StringUtils.replace(mainTitle, tpl, "");
|
||||
} else {
|
||||
mainTitle = mainTitle.replaceAll(tpl, valueObj.toString());
|
||||
mainTitle = StringUtils.replace(mainTitle, tpl, valueObj.toString());
|
||||
}
|
||||
}
|
||||
return mainTitle;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
layui.config({
|
||||
//dir: '/res/layui/', //layui.js 所在路径(注意,如果是 script 单独引入 layui.js,无需设定该参数。),一般情况下可以无视
|
||||
version: false, //一般用于更新模块缓存,默认不开启。设为 true 即让浏览器不缓存。也可以设为一个固定的值,如:201610
|
||||
version: true, //一般用于更新模块缓存,默认不开启。设为 true 即让浏览器不缓存。也可以设为一个固定的值,如:201610
|
||||
debug: false, //用于开启调试模式,默认 false,如果设为 true,则JS模块的节点会保留在页面
|
||||
base: './form-design/modules/', //设定扩展的 layui 模块的所在目录,一般用于外部模块扩展
|
||||
}).use(['layer'],function(){
|
||||
|
@ -269,6 +269,7 @@ layui.config({
|
||||
Author: "WenG",
|
||||
formId: "id",
|
||||
mainTitleTpl: '',
|
||||
formType: 'default',
|
||||
generateId: 0,
|
||||
field: [],
|
||||
data: [],
|
||||
|
Loading…
Reference in New Issue
Block a user