{"Message":"删除插件","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/新增报工"},{"State":1,"Type":40,"Name":"Plugin"},{"State":1,"Type":15,"Name":"ServerCommand/根据汇报模板生成内容"},{"State":1,"Type":15,"Name":"ServerCommand/GitCallback"},{"State":1,"Type":7,"Name":"Table/Git_事件记录"},{"State":3,"Type":15,"Name":"ServerCommand/从Gitee提取报工"},{"State":3,"Type":15,"Name":"ServerCommand/服务端命令1"}],"Version":"v1"}

This commit is contained in:
超哥
2024-06-13 23:27:08 +08:00
parent c8afe8626e
commit 4426e35084
7 changed files with 711 additions and 202 deletions

View File

@@ -87,7 +87,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "4a8c6ac8-b856-4278-b392-71f5e9c5dddf"
"GUID": "b5698686-4edb-4a65-a2e5-45ed333fadc5"
},
"Value": "签入工程"
},
@@ -95,7 +95,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "3c638757-db39-4dc0-9caf-23742f16248c"
"GUID": "fd4a5dbb-e0ad-4bf7-9322-d9adf645eb32"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -106,7 +106,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "b598c086-1359-4986-8fe2-948b3125b6e0"
"GUID": "df11c98f-3267-4f64-94db-e7770898100e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -117,7 +117,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "31dbfe89-d3ea-4d35-beeb-20f162ac2f32"
"GUID": "65e021d0-421e-4513-b77d-627a293cca44"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -128,7 +128,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "d300a046-e686-4bac-8518-8e4c91c26af3"
"GUID": "6e0426ba-e02d-4d5b-978f-02aaa78e2f1d"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -139,7 +139,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "274d0047-93b5-4cc7-911c-ea9d00dead97"
"GUID": "9a4a577a-89ff-45fe-9403-b76a61ca264e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -150,7 +150,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "a5762f11-535c-4ebf-942c-ab0c64af3b6e"
"GUID": "132e4684-4a02-4380-8595-93f2780e327a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -161,7 +161,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "4cb05733-1db1-4011-af03-503607c193b5"
"GUID": "0f80fa89-fa73-4a11-abfb-700ebd4bee12"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -172,7 +172,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "c16cdba8-0977-47ac-ab2b-96cd1e8ba5c8"
"GUID": "4b26a8fd-1245-4a97-acdd-f474f45f7cfd"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -183,7 +183,7 @@
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "1b147d14-33e9-4e3b-abab-1ccaab785b3c"
"GUID": "61b0a85a-db65-4576-9e9f-29c51865599e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
@@ -198,22 +198,208 @@
"Message": "签入已被记录"
}
],
"ID": "3ae160a6-4b21-4966-9322-d2c9fef5dae2"
"ID": "61cdb37b-e3df-4ec8-b55d-6cc16166bcbd"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "今日记录",
"TableValue": {
"TableName": "Git_事件记录",
"TableValueType": 3,
"SqlCondition": {
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "715f1edb-652c-46e3-b189-4c8bd44cf1d1"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "4410e001-f94f-43ee-8ae0-b8a789a71786"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "FGC_CreateDate",
"GUID": "1f8b096d-adc6-4715-ab1e-2919781aca6b"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=TODAY()"
}
}
]
}
},
"ID": "870440a4356a42c68a1979afdc94a1d5"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=今日记录"
}
},
"value": "0"
},
"CommandList": [
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "Git_事件记录",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件名称",
"GUID": "987654e9-a86d-4983-98c3-1d5c2b94733f"
},
"Value": "签出模块"
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "hook_id",
"GUID": "bca8da11-66d8-4365-b254-881fd7e5dcd7"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.hook_id"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "7eef9be6-a388-4e96-9b01-758d8efd041e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=SUBSTITUTE(message.Message,\"签出模块 : \",\"\")"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "空间路径",
"GUID": "69513fe0-9c5a-402a-9315-2e25e0d97ed1"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.namespace"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库名称",
"GUID": "039c74bf-f727-4425-b446-8c39180ff5a3"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库路径",
"GUID": "6b130a65-144f-449d-a106-59551eb02836"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.path"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "url",
"GUID": "b0b69598-37b2-42a0-b2a9-ae2a841bbf35"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.url"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "提交人",
"GUID": "103181f1-6b88-4a0f-acf5-3abe972d80b0"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.name"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "e5bfa05a-f1f9-4aa7-be57-adc7318bf57e"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.head_commit.committer.username"
}
},
{
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "仓库ID",
"GUID": "2da4c9d9-7976-4cb5-b058-85b95eea804c"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=钩子数据.repository.id"
}
}
]
}
],
"ID": "b183a29c-3c17-4c4c-9de2-2b5ab4a32f01"
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "忽略非签入事件"
}
],
"ID": "0852ed40-e5c5-4daa-9850-9839fef14cd9"
"ID": "a372f8cc-845f-42c5-870b-66e27f536a22"
}
]
}
],
"ID": "1244ca0a-1ac7-4a41-8b3d-0406b5e04fd9"
"ID": "0e35e22f-578c-4d58-baee-93e4256386f5"
}
]
}

View File

@@ -0,0 +1,332 @@
{
"Name": "从Gitee提取报工",
"Enabled": true,
"Triggers": [
{
"$type": "Forguncy.SaveLoad.PostRequestTriggerSaveData, ServerDesignerCommon",
"Permission": {
"PermissionData": {
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionData, Forguncy.RbacPermission.Core",
"permissionResource": {
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionResource, Forguncy.RbacPermission.Core"
},
"permissionBindings": [
{
"$type": "Forguncy.RbacPermission.Core.Impl.ServerCommand.ServerCommandPermissionBinding, Forguncy.RbacPermission.Core",
"roleNames": [
"FGC_LoginUser"
]
}
]
}
},
"Parameters": [
{
"Name": "开始日期",
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "2024-06-13"
},
{
"Name": "结束日期",
"DataValidationInfo": {
"IgnoreBlank": false
}
},
{
"Name": "用户",
"DataValidationInfo": {
"IgnoreBlank": false
},
"TestData": "Administrator"
}
],
"InvokeTriggerTestData": {
"UserName": "Administrator"
}
}
],
"Commands": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "用户",
"TableValue": {
"TableName": "用户信息视图",
"TableValueType": 1,
"BindingInfos": [
{
"GUID": "4228fb3e-a8a6-4dbb-b3cc-bce5b3011435",
"BindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "GIT用户名",
"GUID": "5879fc09-08fa-451a-a355-b26d486f8c31"
},
"ColumnName": "GIT用户名"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "用户信息视图",
"ColumnName": "用户名",
"GUID": "24bb73b2-b153-4756-85c1-7b2af8af884d"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户"
}
},
"NullFormulaValueQueryPolicy": 0,
"TopCount": "1"
},
"ID": "b4030fac6e4643919f2d70820325c4bf"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户.GIT用户名"
}
},
"value": "%Null%",
"compareType": 1
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "计算天数",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=DATEDIF(开始日期,结束日期,\"d\")"
},
"ID": "839247702b97432483704b323205cd67"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "总工时",
"ParameterValue": "0",
"ID": "73122483179048b18313028406573a8f"
},
{
"$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon",
"LoopInfo": {
"$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon",
"LoopCount": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=计算天数"
},
"LoopIndexParamName": "index",
"LoopItemParamName": "当前天数"
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "当前日期",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=开始日期+index-1"
},
"ID": "16028728d41c48a6a213d0ebd8d32b2e"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "Gitee事件",
"TableValue": {
"TableName": "Git_事件记录",
"BindingInfos": [
{
"GUID": "07b5b976-2ddd-4e1c-b61a-a27412db7d04",
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "12eed73a-37a4-4ab4-9850-53a04c017263"
},
"ColumnName": "日期"
},
{
"GUID": "0cc165a2-d802-4923-bca3-e8450105b7bd",
"BindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "事件内容",
"GUID": "c2d0070c-3266-465c-865d-90e48ee75302"
},
"ColumnName": "事件内容"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess",
"SubConditions": [
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "git用户名",
"GUID": "0057124f-d1b6-4f02-a3d8-1affcc691fed"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=用户.GIT用户名"
}
},
{
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "6f2040a7-9a8d-449f-982d-85c6c73ab517"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=当前日期"
}
}
]
},
"NullFormulaValueQueryPolicy": 0,
"OrderBySqlCondition": {
"OrderByColumns": [
{
"ColumnBindingInfo": {
"TableName": "Git_事件记录",
"ColumnName": "日期",
"GUID": "d1eb816a-334f-46ce-9738-4740009be374"
},
"Order": 0
}
]
}
},
"ID": "ee6c5b8e973045dba953f276a0654008"
},
{
"$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Gitee事件.Count"
}
},
"value": "0",
"compareType": 2
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "最小时间",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Gitee事件.0.日期"
},
"ID": "16f04d70627b4c23bd50fd5af94bc002"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "最大时间",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=GETPARAM(\"Gitee事件.\"&Gitee事件.Count-1&\".日期\")"
},
"ID": "ee7c067b599447098af7b945afb6f01b"
},
{
"$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit",
"InParamater": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=Gitee事件"
},
"Operation": 16,
"OperationParamaterAName": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=CHAR(10)"
},
"OperationParamaterBName": "事件内容",
"OutParamaterName": "事件内容拼接"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "今日工时",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=IFERROR(ROUND((最大时间-最小时间)*24,1),0)"
},
"ID": "be9fc47d15544d86a333c2072f2bde64"
},
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "总工时",
"ParameterValue": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=总工时+今日工时"
},
"ID": "ccb605ff743244d99d745fad3c9a21a0"
}
],
"ID": "99086d22-0b81-4634-9ce0-0f2f4e7b3153"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "无今日Gitee签入或签出记录",
"CustomReturns": [
{
"ReturnPropertyName": "工时"
},
{
"ReturnPropertyName": "工作内容"
}
]
}
],
"ID": "281e736c-4b4f-464a-a2d0-979f3a0072cd"
}
]
}
]
}
],
"ID": "d41dd9b6-a1b7-4d5e-a315-f5bcf5f4bd5b"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "您尚未设置Gitee信息请前往\"个人中心\"设置后再试",
"CustomReturns": [
{
"ReturnPropertyName": "工时"
},
{
"ReturnPropertyName": "工作内容"
}
]
}
],
"ID": "215c583f-1e78-4578-a6a6-720c352259dc"
}
]
}
],
"ReturnProperties": [
{
"Name": "工时"
},
{
"Name": "工作内容"
}
]
}