{ "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": { "IgnoreBlank": false } }, { "Name": "所属客户部门", "DataValidationInfo": {} }, { "Name": "管理员", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "权限", "DataValidationInfo": {} }, { "Name": "分组", "DataValidationInfo": {} }, { "Name": "预算工时", "DataValidationInfo": {} }, { "Name": "预算金额", "DataValidationInfo": {} }, { "Name": "严格模式", "DataValidationInfo": {} }, { "Name": "开始日期", "DataValidationInfo": {} }, { "Name": "结束日期", "DataValidationInfo": {} }, { "Name": "网络资源", "DataValidationInfo": {} } ] } ], "Commands": [ { "$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon", "TryCommandPart": { "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": "=ID" } }, "value": "%Null%" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "项目表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目名称", "GUID": "ef0e4ec0-928a-49e5-91d9-61e589f88a04" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目简介", "GUID": "c9af7fbc-55b1-458c-b1bb-763e93249d15" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目简介" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目封面", "GUID": "fb266358-306f-4013-b841-8eb15eb1f48c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=封面" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "4cb21c47-2cfe-428a-a8d5-166ae38442b8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目分组", "GUID": "ee1ae52d-ae7b-476d-9f08-e66536ebe41a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分组" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户", "GUID": "62edfb2d-5190-4a43-8ef6-c37803a2d7b6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户部门", "GUID": "1e0c4ad6-5a27-4a01-af04-efd87cce4947" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户部门" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算工时", "GUID": "6a1d7802-541a-491a-9e87-b30f89df806b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算工时" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算费用", "GUID": "a3a6f341-39ae-4e0d-b20e-fbc72d63bb14" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算金额" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "公开", "GUID": "e9c8eb47-b755-45b8-821f-24c2e9267ee6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=权限" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "abb3e010-e177-4084-b1cf-06cd47c68597" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=严格模式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目方案", "GUID": "dfd81bc0-7073-42a1-9140-764a433e0d39" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "预算方案", "GUID": "60f76b0c-f634-4da3-9dd3-26ce4a2190ee" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划开始日期", "GUID": "cc96c852-ceb0-4b0f-898b-a0c1bb039ce5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划完成日期", "GUID": "3b2794a7-71a5-436a-963d-5705384fbf0c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "网络资源", "GUID": "8980bc8f-b53e-4f6f-bc9b-a25d0a287a16" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=网络资源" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目状态", "GUID": "d5f7864f-45a7-4dc0-81b2-ea97f601a910" }, "Value": "0" }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "删除", "GUID": "ef734baf-623a-46bf-9bcd-6fd324f9f96f" }, "Value": "0" } ], "ParamNameToSaveNewRowValue": "新项目" }, { "$type": "Forguncy.Model.ProcessStartCommand, ServerDesignerCommon", "ProcessDefinitionResourceName": "立项流程", "ProcessInstanceName": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称&\"立项审批\"" }, "SelectedTable": "项目表", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "项目表", "ColumnName": "ID", "GUID": "2aeae676-f1b4-4bfd-bfa9-12ec0f173380" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=新项目.ID" } }, "Initiator": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" }, "ReturnResultName": "发起流程结果" }, { "$type": "Forguncy.Model.ConditionCommand, ServerDesignerCommon", "ConditionAndCommandPairList": [ { "Condition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=发起流程结果" } }, "value": "%Null%", "compareType": 1 }, { "$type": "Forguncy.Model.IfCondition, ServerDesignerCommon", "param": { "$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon", "ParamObject": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=发起流程结果.ID" } }, "value": "%Null%", "compareType": 1 } ] }, "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "项目创建成功,请等待审批" } ], "ID": "5da18cfa-fe9f-4b69-8560-34c4e38c9ffa" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目已创建,但未能发起审批,请手动发起审批流程!" } ], "ID": "abbcae99-7de8-4c14-badf-451f9addc149" } ] } ], "ID": "f16c4805-04cc-4ee7-b3e7-ba0bb654be09" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "项目信息", "TableValue": { "TableName": "项目表", "TableValueType": 1, "BindingInfos": [ { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "b8486155-4f64-4dd8-b85c-16543680907f" }, "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": "284902c03cb74c7993b7d8dbf2fce968" }, { "$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": [ { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算工时", "GUID": "020613fe-5e4a-47bc-82ee-e2ede6fb5737" }, "ColumnName": "项目预算工时" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "总实际工时", "GUID": "5a3c8588-de2e-4e88-8116-09021dc36bd8" }, "ColumnName": "总实际工时" }, { "BindingInfo": { "TableName": "View_项目统计信息", "ColumnName": "项目预算费用", "GUID": "b5e66ce2-c04f-45e2-9ef8-cb6f1be2534d" }, "ColumnName": "项目预算费用" }, { "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": "a14bc416e4cb49b0916ce2ea17bd826b" }, { "$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": "a0b87cac-38f9-481a-b077-675313d0cb9d" }, { "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": "825c977c-5a23-4561-8c5f-9467fe75f0ff" } ] } ], "Comments": "如果是更新项目,且改变了工时核定方式、严格模式,那么就要校验。超标就不允许切换", "ID": "321ec68e-d70e-496f-9acc-38e7498e3f53" } ] }, { "$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": "b06dba3d-143f-407d-a74b-0ef61b3a0d92" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目简介", "GUID": "74c9a369-2553-48d1-8e5d-033e66efa060" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目简介" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目封面", "GUID": "7cd155ae-96fb-4029-a790-d59e22da86ad" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=封面" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "028ebc72-432b-40e9-b633-4cb96797a966" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目分组", "GUID": "fb812d0b-1ac5-4751-929b-d1fc999c1a10" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分组" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户", "GUID": "7464e2eb-0483-4273-97f0-941fb76313b1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户部门", "GUID": "48ffd769-0d1d-430c-a36d-322292b6310a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户部门" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "公开", "GUID": "d21de492-11d7-4212-911d-2d2d9d7012b6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=权限" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "92f5ea47-300f-497a-b262-d39274a80b9e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=严格模式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划开始日期", "GUID": "99c71307-f344-43db-8c96-901f1e206cde" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划完成日期", "GUID": "f0219dd8-d4b6-4f44-ba9d-49229fa8fe04" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目方案", "GUID": "632f7f59-8a54-4717-a90c-a9afb93b293b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "预算方案", "GUID": "600e9c82-d6f3-46f9-8500-a72d432ffa5a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "网络资源", "GUID": "261e6801-fcfa-44a8-bb2c-0d446ac89cc0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=网络资源" } } ] } ], "ID": "d44b64d0-862b-47df-a944-dd600e22bc5a" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }