{ "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": {} }, { "Name": "封面", "DataValidationInfo": {} }, { "Name": "项目名称", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "项目代号", "DataValidationInfo": {} }, { "Name": "项目简介", "DataValidationInfo": {} }, { "Name": "项目方案", "DataValidationInfo": {} }, { "Name": "预算方案", "DataValidationInfo": {} }, { "Name": "所属客户", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "所属客户部门", "DataValidationInfo": {} }, { "Name": "管理员", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "权限", "DataValidationInfo": {} }, { "Name": "分组", "DataValidationInfo": {} }, { "Name": "预算工时", "DataValidationInfo": {} }, { "Name": "预算金额", "DataValidationInfo": {} }, { "Name": "严格模式", "DataValidationInfo": {} }, { "Name": "工时分配方式", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "开启反馈收集", "DataValidationInfo": {} }, { "Name": "开始日期", "DataValidationInfo": {} }, { "Name": "结束日期", "DataValidationInfo": {} }, { "Name": "网络资源", "DataValidationInfo": {} } ] } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目信息", "TableValue": { "TableName": "项目表", "TableValueType": 1, "BindingInfos": [ { "GUID": "a96a1a27-41ca-4fe0-9359-4bcb525d7176", "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "b8486155-4f64-4dd8-b85c-16543680907f" }, "ColumnName": "严格模式" }, { "GUID": "b5b6bed0-a125-481e-a258-0f0edd8fbe94", "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "f5e1a885-651e-497c-90ef-1e5c341bca1a" }, "ColumnName": "项目经理" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目表", "ColumnName": "ID", "GUID": "2c0631c8-c61b-431a-bdf4-13f968834089" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ID" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "4c7b4834021b431183f23672f24716e0" }, { "$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": "1" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目统计信息", "TableValue": { "TableName": "View_项目统计信息", "TableValueType": 1, "BindingInfos": [ { "GUID": "66853927-3ca9-4e53-aa1e-6db438d697dd", "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算工时", "GUID": "020613fe-5e4a-47bc-82ee-e2ede6fb5737" }, "ColumnName": "项目预算工时" }, { "GUID": "8a0247fc-a0b1-4422-9a50-f35a6b3a8594", "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总核定工时", "GUID": "152697ce-8438-42b5-8e47-92f899bbbfcf" }, "ColumnName": "总核定工时" }, { "GUID": "7937310f-a08c-4ef1-9d44-effa6068f237", "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算费用", "GUID": "b5e66ce2-c04f-45e2-9ef8-cb6f1be2534d" }, "ColumnName": "项目预算费用" }, { "GUID": "e471e91a-4313-4550-80e4-c1554be3c455", "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总成本", "GUID": "82679dce-9071-486f-9eb5-9a36171e90a2" }, "ColumnName": "总核定成本" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目ID", "GUID": "ecc83868-39ca-446f-afde-d95c38fe55d5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ID" } }, "TopCount": "1" }, "ID": "ad29d68902fd4f8c9adedd07c1339b41" }, { "$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": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目统计信息.项目预算工时" }, "compareType": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"项目总核定工时已超标,无法为您切换为严格模式!\"" } } ], "ID": "2bfe9f9c-3d33-44a8-ae36-d9a913767457" }, { "Condition": { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目统计信息.总核定成本" } }, "value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目统计信息.项目预算费用" }, "compareType": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=\"项目费用已超标,此时无法为您切换为严格模式\"" } } ], "ID": "c0006edb-4bea-4893-81a2-7fc390c96a75" } ] } ], "Comments": "如果是更新项目,且改变了严格模式,那么就要校验。超标就不允许切换", "ID": "117ac471-e667-4550-99c4-40f829747f54" } ] }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目表", "ColumnName": "ID", "GUID": "a8a27903-2609-49d7-8f9c-318870a24d2a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目名称", "GUID": "1d7359df-f80a-488e-b303-6fe4bc9540c7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目代号", "GUID": "12e7894e-e818-42da-916e-6da239ac7b0d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目代号" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目简介", "GUID": "ed4fedf0-97cf-4397-b0b7-0c747d30c449" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目简介" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目封面", "GUID": "02c361e1-40bb-4ebc-8a8d-7d3d258fda4f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=封面" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "ca2bd577-a0f5-4ee2-9ffe-0988ff829ef3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目分组", "GUID": "4ce9236a-7f32-47ea-8e70-89bfbabe063a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分组" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户", "GUID": "1bfc41d8-714b-4996-a47c-e770aedc69eb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户部门", "GUID": "91c39c63-d4cb-438e-8694-3cdc77112140" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户部门" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "公开", "GUID": "2ed99546-b4fb-46b9-83e1-280a670ded81" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=权限" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "2de689f4-3eb2-406b-a45e-a02458e0fcc7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=严格模式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划开始日期", "GUID": "197303b1-7b6a-4ba4-b284-84dffb188b88" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划完成日期", "GUID": "00f6346d-3328-43c1-8ec8-6319b86b09d5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目方案", "GUID": "76152f46-0000-4f73-be9d-4c8ae754f3d2" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "预算方案", "GUID": "54ddeb64-0d33-4c21-aef1-08425106954a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "网络资源", "GUID": "f82ccea4-28b4-4e67-8760-ca4c5a6ea439" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=网络资源" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "开启反馈收集", "GUID": "95d2286b-588a-4233-9470-f31e07142d7a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开启反馈收集" } } ] }, { "$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" } } ] } } ] }