{ "Name": "Base根据汇报模板生成内容", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon", "Parameters": [ { "Name": "生成日期", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "2024/6/13" }, { "Name": "汇报类型", "DataValidationInfo": {}, "TestData": "日报" }, { "Name": "汇报对象", "DataValidationInfo": {} }, { "Name": "对象ID", "DataValidationInfo": {} }, { "Name": "汇报人", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "shamus" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "CollectionOperationKit.ServerSideArrayOp, CollectionOperationKit", "OutParamaterName": "汇报列表" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "处理汇报日期", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=TEXT(生成日期,\"yyyy-MM-dd\")" }, "ID": "4ace18ec3a9544668738b0790a291a54" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "总工时", "TableValue": { "TableName": "任务工时表", "TableValueType": 1, "BindingInfos": [ { "GUID": "373b5db3-9019-4c86-8b5d-b749601675b1", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "46a18c6e-820c-44e3-9b0e-78348a51130d" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "4b3d5f6f-19ec-4644-bc88-01914025be5c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "d0d914d3-0167-477a-a9ee-1b7549dd00b0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=生成日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "117f7a1f-f51f-4722-ac8d-5b04732bc1b3" }, "Value": "实际" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "46450718969a4aeea8c451b6a387a2bd" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "最近报工项目", "TableValue": { "TableName": "任务工时表", "BindingInfos": [ { "GUID": "f53e666c-6927-4991-a7d0-035e05e98a09", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "9fe63173-5128-4215-acc4-6709548766a8" }, "ColumnName": "项目ID" }, { "GUID": "302831ef-9cf8-4e69-a894-384b2ccbc7bd", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "eb8227d3-06cb-489a-b20e-0ea5a64755ec", "RelationBinding": { "RelatedTable": "项目表", "RelatedColumn": "ID", "DisplayColumn": "项目名称" } }, "ColumnName": "项目名称" }, { "GUID": "482ba89c-88c1-4834-a01d-dc6e61793310", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "46a18c6e-820c-44e3-9b0e-78348a51130d" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "4b3d5f6f-19ec-4644-bc88-01914025be5c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "d0d914d3-0167-477a-a9ee-1b7549dd00b0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=生成日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "117f7a1f-f51f-4722-ac8d-5b04732bc1b3" }, "Value": "实际" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "f172e7641ed8478d9abbae743aa187ed" }, { "$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": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=最近报工项目" }, "LoopItemParamName": "当前项目" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目报工信息", "TableValue": { "TableName": "任务工时表", "BindingInfos": [ { "GUID": "144a3c98-8ec5-456e-9882-a098061c5ee5", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "0a31eb22-29b7-4138-a6a0-98d920d0f715" }, "ColumnName": "工作内容" }, { "GUID": "fd802a36-a4e1-4bf5-9c68-d4578e543755", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "工时", "GUID": "78e5b879-a641-4c7b-a93f-a6385990e96e" }, "ColumnName": "工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "4b3d5f6f-19ec-4644-bc88-01914025be5c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "d0d914d3-0167-477a-a9ee-1b7549dd00b0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=生成日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "项目ID", "GUID": "d5d3e143-4db7-495f-973a-a6686207b7f3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前项目.项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "CompareType": 1, "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "执行内容", "GUID": "65c531dc-6b4c-4568-8153-a0ac38c3ec10" }, "Value": "%Null%" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "4e4e013022224189aaf5893ea887e547" }, { "$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit", "OperationParamaterPairs": [ { "Name": "项目名称", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=当前项目.项目名称" } }, { "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": "汇报列表" } ] }, { "$type": "CollectionOperationKit.ServerSideObjectOp, CollectionOperationKit", "OperationParamaterPairs": [ { "Name": "汇报列表", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报列表" } } ], "OutParamaterName": "数据源" }, { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查找模板", "TableValue": { "TableName": "汇报模板对应表", "TableValueType": 1, "BindingInfos": [ { "GUID": "17a3700d-7479-4b5c-929f-9c13fddc1c87", "BindingInfo": { "TableName": "汇报模板对应表", "ColumnName": "模板ID", "GUID": "c7ff5824-2d67-4b0f-9b8f-e01ec06a8511", "RelationBinding": { "RelatedTable": "汇报模板", "RelatedColumn": "ID", "DisplayColumn": "模板内容" } }, "ColumnName": "模板内容" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报模板对应表", "ColumnName": "汇报对象", "GUID": "86547761-1198-4fa9-90b9-ad99af9b3dc9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报对象" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报模板对应表", "ColumnName": "汇报类型", "GUID": "d831036f-9c97-4988-b548-4c7b25b5fc29" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报类型" } } ] }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "0c9432276f3e430fb8411d6a7e49f502" }, { "$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": "%Null%", "compareType": 1 }, "CommandList": [ { "$type": "MustachePlugin.Render, MustachePlugin", "DataSrouce": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=查找模板.模板内容" }, "UseCustomsDataHash": true, "CustomsDataHash": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=数据源" }, "SetMaxRecursionDepth": 10, "ResultTo": "输出结果" }, { "$type": "Summernotetools.ReplaceTemplateParameters, Summernotetools", "HtmlContent": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=输出结果" }, "ReplaceRules": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"\"" }, "ReturnText": true, "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": "=纯文本" } }, { "ReturnPropertyName": "返回总工时", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=总工时.总工时" } } ] } ], "ID": "d99a69b2-dada-466b-9438-7beb198fbf7e" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "未找到模板", "CustomReturns": [ { "ReturnPropertyName": "日报内容" }, { "ReturnPropertyName": "日报文本" }, { "ReturnPropertyName": "返回总工时" } ] } ], "ID": "d4f5036c-26c9-483f-b70c-fb1600445b4a" } ] } ], "ID": "dcf8e352-1cda-4ca6-8be2-fade4ad579b9" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=处理汇报日期&\"无报工内容!\"" }, "CustomReturns": [ { "ReturnPropertyName": "日报内容" }, { "ReturnPropertyName": "日报文本" }, { "ReturnPropertyName": "返回总工时" } ] } ], "ID": "30cd4c35-14a0-4ee1-8a41-0861c1ba52b8" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" }, "CustomReturns": [ { "ReturnPropertyName": "日报内容" }, { "ReturnPropertyName": "日报文本" }, { "ReturnPropertyName": "返回总工时" } ] } ] } } ], "ReturnProperties": [ { "Name": "日报内容" }, { "Name": "日报文本" }, { "Name": "返回总工时" } ] }