mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
feat: #IBYEGX 增加URL表单
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
|
* @Author: yubaolee <yubaolee@163.com> | ahfu~ <954478625@qq.com>
|
||||||
* @Date: 2024-12-13 16:55:17
|
* @Date: 2024-12-13 16:55:17
|
||||||
* @Description: 工作流实例表操作
|
* @Description: 工作流实例表操作
|
||||||
* @LastEditTime: 2025-03-08 13:59:47
|
* @LastEditTime: 2025-04-04 23:30:39
|
||||||
* Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved.
|
* Copyright (c) 2024 by yubaolee | ahfu~ , All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -70,17 +70,20 @@ namespace OpenAuth.App
|
|||||||
|
|
||||||
addFlowInstanceReq.SchemeContent = scheme.SchemeContent;
|
addFlowInstanceReq.SchemeContent = scheme.SchemeContent;
|
||||||
|
|
||||||
var form = _formApp.FindSingle(scheme.FrmId);
|
FormResp form = null;
|
||||||
if (form == null)
|
if (scheme.FrmType != Define.FORM_TYPE_URL)
|
||||||
{
|
{
|
||||||
throw new Exception("该流程模板对应的表单已不存在,请重新设计流程");
|
form = _formApp.FindSingle(scheme.FrmId);
|
||||||
|
if (form == null)
|
||||||
|
{
|
||||||
|
throw new Exception("该流程模板对应的表单已不存在,请重新设计流程");
|
||||||
|
}
|
||||||
|
addFlowInstanceReq.FrmContentData = form.ContentData;
|
||||||
|
addFlowInstanceReq.FrmContentParse = form.ContentParse;
|
||||||
|
addFlowInstanceReq.FrmType = form.FrmType;
|
||||||
|
addFlowInstanceReq.FrmId = form.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
addFlowInstanceReq.FrmContentData = form.ContentData;
|
|
||||||
addFlowInstanceReq.FrmContentParse = form.ContentParse;
|
|
||||||
addFlowInstanceReq.FrmType = form.FrmType;
|
|
||||||
addFlowInstanceReq.FrmId = form.Id;
|
|
||||||
|
|
||||||
var flowInstance = addFlowInstanceReq.MapTo<FlowInstance>();
|
var flowInstance = addFlowInstanceReq.MapTo<FlowInstance>();
|
||||||
|
|
||||||
//创建运行实例
|
//创建运行实例
|
||||||
@@ -119,7 +122,7 @@ namespace OpenAuth.App
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flowInstance.FrmType == 1) //如果是开发者自定义的表单
|
if (flowInstance.FrmType == Define.FORM_TYPE_DEVELOP) //如果是开发者自定义的表单
|
||||||
{
|
{
|
||||||
var t = Type.GetType("OpenAuth.App." + flowInstance.DbName + "App");
|
var t = Type.GetType("OpenAuth.App." + flowInstance.DbName + "App");
|
||||||
ICustomerForm icf = (ICustomerForm)_serviceProvider.GetService(t);
|
ICustomerForm icf = (ICustomerForm)_serviceProvider.GetService(t);
|
||||||
@@ -134,7 +137,7 @@ namespace OpenAuth.App
|
|||||||
}
|
}
|
||||||
|
|
||||||
//如果工作流配置的表单配置有对应的数据库
|
//如果工作流配置的表单配置有对应的数据库
|
||||||
if (!string.IsNullOrEmpty(form.DbName))
|
if (form != null && !string.IsNullOrEmpty(form.DbName))
|
||||||
{
|
{
|
||||||
var dbcolumns = _dbExtension.GetDbTableStructure(form.DbName);
|
var dbcolumns = _dbExtension.GetDbTableStructure(form.DbName);
|
||||||
var json = JsonHelper.Instance.Deserialize<JObject>(addFlowInstanceReq.FrmData);
|
var json = JsonHelper.Instance.Deserialize<JObject>(addFlowInstanceReq.FrmData);
|
||||||
@@ -662,7 +665,7 @@ namespace OpenAuth.App
|
|||||||
FROM `SysUser`
|
FROM `SysUser`
|
||||||
WHERE fi.MakerList like concat('%', Id, '%') ) ";
|
WHERE fi.MakerList like concat('%', Id, '%') ) ";
|
||||||
//sqlserver的行转列需要特殊处理
|
//sqlserver的行转列需要特殊处理
|
||||||
if(SugarClient.CurrentConnectionConfig.DbType == DbType.SqlServer)
|
if (SugarClient.CurrentConnectionConfig.DbType == DbType.SqlServer)
|
||||||
{
|
{
|
||||||
groupConcatSql = $@" STUFF((
|
groupConcatSql = $@" STUFF((
|
||||||
SELECT ',' + Account
|
SELECT ',' + Account
|
||||||
|
Reference in New Issue
Block a user