{ "Name": "同步项目成员", "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": "项目ID", "DataValidationInfo": { "IgnoreBlank": false }, "TestData": "1" } ], "InvokeTriggerTestData": { "UserName": "Administrator" } } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "成员列表", "TableValue": { "TableName": "任务成员表", "BindingInfos": [ { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "参与人", "GUID": "46de6571-6826-4235-976f-a5064c56a1d7" }, "ColumnName": "参与人" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "岗位ID", "GUID": "dc37147b-37ae-447e-be34-44aa79248cd9" }, "ColumnName": "岗位ID" }, { "BindingInfo": { "TableName": "任务成员表", "ColumnName": "任务时薪", "GUID": "ffd017c3-0213-434a-850a-17e468a25351" }, "ColumnName": "任务时薪" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务成员表", "ColumnName": "任务ID", "GUID": "2cc2c0aa-d496-4ba1-9489-9340529dba7f", "RelationBinding": { "RelatedTable": "任务表", "RelatedColumn": "ID", "DisplayColumn": "项目ID" } }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } } }, "ID": "80ede1174f0e44d08c2ac38bacb1505f" }, { "$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": "是否存在", "TableValue": { "TableName": "项目成员表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目ID", "GUID": "7d33c794-4447-4038-84d0-215ede69a00c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "958cdb07-86e0-45cc-90f5-f10ddc68fc3f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.参与人" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "7d2ab957b8a0418499611a4a9ae72922" }, { "$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": "项目成员表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目ID", "GUID": "423a454c-0ebe-4cde-82cb-47c6bf6e7e42" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } }, { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "项目成员", "GUID": "d6fe68a3-6354-472d-abab-fd66735bb628" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.参与人" } }, { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "岗位ID", "GUID": "24cb4c61-d136-428a-bbd8-9be528a51b1e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.岗位ID" } }, { "BindingInfo": { "TableName": "项目成员表", "ColumnName": "默认时薪", "GUID": "f539a7b6-27fd-43f6-9422-9e200ee0734b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.任务时薪" } } ] } ], "ID": "7e56221d-aa8f-44e0-9ddf-6bd5c68ee53a" } ] } ], "Comments": "查找任务成员表里的成员" } ] }, { "$type": "Forguncy.Model.RequestServerCommand, ServerDesignerCommon", "ServerCommandName": "同步项目参与人字段", "Parameters": [ { "$type": "Forguncy.Model.RequestServerCommandObjectParam, ServerDesignerCommon", "ParamName": "项目ID", "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目ID" } } ], "ResultErrorCodeTo": { "SerializeProperty": "code" }, "ResultMessageTo": { "SerializeProperty": "msg" }, "RefreshAfterFinish": true, "CheckDataValidation": true }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "同步完成" } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }