{ "Name": "自动生成昨日日报", "Description": "自动生成昨日工作内容,生成工作日报。", "Enabled": true, "Triggers": [ { "$type": "Forguncy.SaveLoad.InvokeTriggerSaveData, ServerDesignerCommon", "Parameters": [ { "Name": "汇报日期", "DataValidationInfo": { "IgnoreBlank": false } } ], "InvokeTriggerTestData": { "UserName": "shamus" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "工时记录表", "TableValue": { "TableName": "任务工时表", "BindingInfos": [ { "GUID": "85effe94-9cc0-4cc6-8de3-65369ca227cc", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "执行人", "GUID": "ac84e53c-b670-4f95-8beb-adbc3196a9d5" }, "ColumnName": "执行人" }, { "GUID": "4e8aea4f-1c03-4368-ae97-1daffb5fd632", "BindingInfo": { "TableName": "任务工时表", "ColumnName": "总工时", "GUID": "da21a7bc-c968-4ed6-9d88-afc16d53e40c" }, "ColumnName": "总工时" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时日期", "GUID": "1decd4bb-6a32-4411-88fe-de99e8fcb144" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务工时表", "ColumnName": "工时类型", "GUID": "55a4707a-21a1-42c5-b542-d8bd78d9388a" }, "Value": "实际" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "c41b123f9bae4926822fdc898e98478c" }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时记录表" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "汇报人", "ParameterValue": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.执行人" }, "ID": "865f6d298a044de7a819e9c59aa61bfd" }, { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "根据汇报模板生成内容", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "生成日期", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "汇报类型", "Value": "日报" }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "汇报对象", "Value": "个人" }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "对象ID" }, { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "汇报人", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "ReturnPropertiesTo": [ { "ResultPropertyName": "生成文本", "ResultTo": { "SerializeProperty": "生成汇报内容" } }, { "ResultPropertyName": "返回总工时", "ResultTo": { "SerializeProperty": "返回总工时" } } ], "RefreshAfterFinish": true, "CheckDataValidation": true }, { "$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": "=code" } }, "value": "0" }, "CommandList": [ { "$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": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "是否已有日报", "TableValue": { "TableName": "汇报记录表", "TableValueType": 1, "BindingInfos": [ { "GUID": "e815c9f8-4647-4b16-9a7c-a9856abcec31", "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "ID", "GUID": "7248b549-9806-4766-89e1-f5d49e589ddd" }, "ColumnName": "ID" } ], "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "56eddff0-36fe-4dd9-af41-999289d040ac" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "2cbb0a81-fada-4134-9c8e-991fba901746" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报类型", "GUID": "7d6310c4-6c2d-47ff-9742-434ee9c833f2" }, "Value": "日报" }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报对象", "GUID": "e6b48d0c-2b41-4b5e-9ef4-0eaa71dd1d89" }, "Value": "个人" } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "8d7816ef29014ca88d0b56228efea014" }, { "$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%" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报记录表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报类型", "GUID": "59d8febc-fd0e-44c0-ab91-4e8bee3be57f" }, "Value": "日报" }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "599ea8c4-cd37-486c-908b-b76153f8fa6f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "2b44c825-d1e2-4ea7-b02b-bd0e7b5a0930" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "内容", "GUID": "e1fd5fef-55bd-4bad-bef7-a1e8587eb1fe" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=生成汇报内容" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "总工时", "GUID": "f63f3278-817d-4d3b-85e1-ad3e572f68b6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=返回总工时" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报对象", "GUID": "52130e76-6317-4a2d-a3f3-78aa660dc017" }, "Value": "个人" }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "状态", "GUID": "540643f7-47e6-4398-a81c-cb07864014e9" }, "Value": "1" } ] } ], "ID": "f2958030-4bf0-4ebe-9fb9-1ce8192e5a1f" }, { "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报记录表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "ID", "GUID": "4f0f2548-0a72-4169-b2af-37ec269b8f80" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=是否已有日报.ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "a57546f4-0f7a-4029-b472-193e72b0da1b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "584ee468-b463-4253-aa90-7e46fa5153c2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "内容", "GUID": "92ddb7cd-2e5a-4508-9fe7-d35f54b98eeb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=生成汇报内容" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "总工时", "GUID": "a82384cf-a65e-41e4-90d8-ce2bb3334a2c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=返回总工时" } } ] } ], "ID": "b2986861-58e8-486d-a128-ad51d4e8b21b" } ] } ], "ID": "f6695547-dd52-4271-bfaa-09f4e1f12d85" } ] } ], "ID": "78de713c-52e7-48e9-ae6d-b82d70339128" } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "执行完毕" } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "日志表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "日志表", "ColumnName": "标题", "GUID": "f539568d-13de-417b-baae-5c5072cc810a" }, "Value": "单日自动生成工作日报命令" }, { "BindingInfo": { "TableName": "日志表", "ColumnName": "类型", "GUID": "a7a5ca14-21a4-4f08-ad6d-65b784e38435" }, "Value": "错误" }, { "BindingInfo": { "TableName": "日志表", "ColumnName": "内容", "GUID": "94961476-bd5b-44f5-80e4-a52a1091d1b2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }