434 lines
18 KiB
JSON
434 lines
18 KiB
JSON
{
|
||
"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
|
||
},
|
||
"TestData": "2024-06-13"
|
||
},
|
||
{
|
||
"Name": "用户",
|
||
"DataValidationInfo": {
|
||
"IgnoreBlank": false
|
||
},
|
||
"TestData": "Administrator"
|
||
}
|
||
],
|
||
"InvokeTriggerTestData": {
|
||
"UserName": "Administrator"
|
||
}
|
||
}
|
||
],
|
||
"Commands": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "用户",
|
||
"TableValue": {
|
||
"TableName": "用户信息视图",
|
||
"TableValueType": 1,
|
||
"BindingInfos": [
|
||
{
|
||
"GUID": "8f82e754-66c0-4b46-8096-452e5b638a47",
|
||
"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": "bbf27a5a9c66482f85c63fea495e0214"
|
||
},
|
||
{
|
||
"$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": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit",
|
||
"InParamater": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=事件列表"
|
||
},
|
||
"OutParamaterName": "事件列表"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon",
|
||
"LoopInfo": {
|
||
"$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon",
|
||
"LoopCount": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=计算天数+1"
|
||
},
|
||
"LoopIndexParamName": "index",
|
||
"LoopItemParamName": "当前天数"
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "当前日期",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=开始日期+index-1"
|
||
},
|
||
"ID": "d4a5f61ea18f4cc7a24de21472568421"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "Gitee事件",
|
||
"TableValue": {
|
||
"TableName": "Git_事件记录",
|
||
"BindingInfos": [
|
||
{
|
||
"GUID": "8c52173d-d148-4903-b056-fb3b5e4271df",
|
||
"BindingInfo": {
|
||
"TableName": "Git_事件记录",
|
||
"ColumnName": "日期",
|
||
"GUID": "12eed73a-37a4-4ab4-9850-53a04c017263"
|
||
},
|
||
"ColumnName": "日期"
|
||
},
|
||
{
|
||
"GUID": "03433246-583c-4fc6-bad5-16ba014ae315",
|
||
"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": "09aaf1a2b4ed4c7ba9769efd0ffff595"
|
||
},
|
||
{
|
||
"$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": "c5dc990dffbc47e18c0f4a1db5c1381e"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "最大时间",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=GETPARAM(\"Gitee事件.\"&Gitee事件.Count-1&\".日期\")"
|
||
},
|
||
"ID": "7c19014644ba4fcfae80f801b077dbed"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "今日工时",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=IFERROR(ROUND((最大时间-最小时间)*24,1),0)"
|
||
},
|
||
"ID": "9dc82b30c38a47b98eed930ce1f0db4d"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
|
||
"ParameterName": "总工时",
|
||
"ParameterValue": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=总工时+今日工时"
|
||
},
|
||
"ID": "3cf8b482c8914dce850e9cb334ebcd33"
|
||
},
|
||
{
|
||
"$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": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit",
|
||
"OperationParamaterPairs": [
|
||
{
|
||
"Name": "内容",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=事件内容拼接"
|
||
}
|
||
}
|
||
],
|
||
"OutParamaterName": "今日数据"
|
||
},
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit",
|
||
"InParamater": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=事件列表"
|
||
},
|
||
"Operation": 4,
|
||
"OperationParamaterAName": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=今日数据"
|
||
},
|
||
"OutParamaterName": "事件列表"
|
||
}
|
||
],
|
||
"ID": "5bc82618-62a0-4ad7-81de-4a4ae40003fb"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"$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": "=事件列表.Count"
|
||
}
|
||
},
|
||
"value": "0",
|
||
"compareType": 2
|
||
},
|
||
"CommandList": [
|
||
{
|
||
"$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit",
|
||
"OperationParamaterPairs": [
|
||
{
|
||
"Name": "事件列表",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=事件列表"
|
||
}
|
||
}
|
||
],
|
||
"OutParamaterName": "数据源"
|
||
},
|
||
{
|
||
"$type": "MustachePlugin.Render, MustachePlugin",
|
||
"DataSrouce": "{{#事件列表}}\r\n{{内容}}\r\n{{/事件列表}}",
|
||
"UseCustomsDataHash": true,
|
||
"CustomsDataHash": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=数据源"
|
||
},
|
||
"SetMaxRecursionDepth": 512,
|
||
"ResultTo": "输出结果"
|
||
},
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "0",
|
||
"Message": "生成成功",
|
||
"CustomReturns": [
|
||
{
|
||
"ReturnPropertyName": "工时",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=总工时"
|
||
}
|
||
},
|
||
{
|
||
"ReturnPropertyName": "工作内容",
|
||
"Value": {
|
||
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
|
||
"SerializeProperty": "=输出结果"
|
||
}
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "0e598871-c20f-4ca0-abca-cf1feca9c43d"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "无Gitee记录",
|
||
"CustomReturns": [
|
||
{
|
||
"ReturnPropertyName": "工时"
|
||
},
|
||
{
|
||
"ReturnPropertyName": "工作内容"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "17cdfa64-1f6b-4a59-9670-949c6c3f5f2a"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "e0f0e898-5752-4cbb-a33a-6d032e73734d"
|
||
},
|
||
{
|
||
"CommandList": [
|
||
{
|
||
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
|
||
"ErrorCode": "400",
|
||
"Message": "您尚未设置Gitee信息,请前往\"个人中心\"设置后再试",
|
||
"CustomReturns": [
|
||
{
|
||
"ReturnPropertyName": "工时"
|
||
},
|
||
{
|
||
"ReturnPropertyName": "工作内容"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ID": "3b95baba-3c99-45c2-b1cb-feaed60baf11"
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"ReturnProperties": [
|
||
{
|
||
"Name": "工时"
|
||
},
|
||
{
|
||
"Name": "工作内容"
|
||
}
|
||
]
|
||
} |