{ "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.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": "ba72531e-8ec1-4115-921b-38f6ad4682c8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目代号", "GUID": "613931f4-1ab8-4ebc-9a9a-95b677831372" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目代号" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目简介", "GUID": "55013b16-f1b9-4113-b52d-c49df71de85c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目简介" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目封面", "GUID": "2ab74ca7-97b9-4c55-984d-fed79eed8153" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=封面" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "561506d4-fe09-4599-a4c1-171d41191c5b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目分组", "GUID": "2cd80a9d-45bc-4b0b-8bd2-85173e2d7efd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分组" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户", "GUID": "87669180-329d-4d2a-83aa-b6eae07b238b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户部门", "GUID": "8de2537a-93f9-48b8-aa57-69c811ed82ff" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户部门" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算工时", "GUID": "bcc0607f-5383-47e5-9806-587a1a341eeb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算工时" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目预算费用", "GUID": "9e58b2f0-b85a-47ee-8641-5852d34a0cbc" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算金额" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "公开", "GUID": "9d26b8b4-02c9-4f1d-be06-3c23a34fab81" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=权限" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "cb9075a1-d21c-4940-b874-bd6c251468a6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=严格模式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "工时分配方式", "GUID": "0e931ad2-e31d-407e-97de-594507248c77" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=工时分配方式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "开启反馈收集", "GUID": "131d0359-f60b-49bd-8d44-f0f5398e678b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开启反馈收集" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目方案", "GUID": "96442123-f90c-438e-bf3a-9e6b7d803c01" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "预算方案", "GUID": "4d6f5555-82e0-4e9a-9641-bce447592ea5" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划开始日期", "GUID": "103e4e2c-ce74-426d-92e1-65c0eb911bec" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划完成日期", "GUID": "16baa626-9327-49ea-b64a-9277154b4f9a" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "网络资源", "GUID": "5c0daef8-96d5-4947-89ce-58d10d5d40d8" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=网络资源" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目状态", "GUID": "d64f6e6f-c605-4e27-9c0b-0ea67a1fcf7c" }, "Value": "0" }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "删除", "GUID": "74e09ef5-2402-4d9c-aed1-9a75481d7e14" }, "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": "d4db5b4e-16f1-44d8-b0ae-d59b3c1af93e" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "项目已创建,但未能发起审批,请手动发起审批流程!" } ], "ID": "62c77793-4ab7-46dc-bb67-4180c2327945" } ] } ], "ID": "b21ee447-0431-455d-8ab2-bc13039d2728" }, { "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": "c36b29c9-9957-42df-9690-9f208641bdbd" }, { "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": "5426b27b-6ef9-4f1b-8da5-c19ae061359b" } ] } ], "Comments": "如果是更新项目,且改变了工时核定方式、严格模式,那么就要校验。超标就不允许切换", "ID": "efd0d865-3277-431b-897a-1ff2245522bc" } ] }, { "$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": "72f3cbd1-4112-4d43-82f2-efaaa83f6835" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目名称" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目代号", "GUID": "608cf5fc-c310-458c-a19b-e5bf256fdabd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目代号" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目简介", "GUID": "ddaac69a-e94f-4345-ab8d-0250b8f16a25" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目简介" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目封面", "GUID": "4397866f-cced-4246-aa29-628132a9c6e3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=封面" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目经理", "GUID": "592e09cf-4c9f-4deb-aaf9-eeeda98ef011" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=管理员" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目分组", "GUID": "a34ae1e6-d69c-4eaa-80d1-d52164df08dc" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=分组" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户", "GUID": "3eeb977b-42b0-4fd1-b420-9af88f8b9898" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "所属客户部门", "GUID": "2f6ed00a-a7d4-4058-b164-c26a2ad9a674" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=所属客户部门" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "公开", "GUID": "c54fce59-e10a-4b22-8b46-5922c3e39975" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=权限" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "严格模式", "GUID": "7cde26d9-3ede-40a6-906d-3729243fae8b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=严格模式" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划开始日期", "GUID": "3671ddb1-49d1-4e7d-be2f-5af02876e6dd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开始日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "计划完成日期", "GUID": "a0f92d5f-21d4-4a39-8602-375ffb118f0d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=结束日期" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "项目方案", "GUID": "dc7c3287-73d9-4705-ac47-4a28d37f2c22" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=项目方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "预算方案", "GUID": "9059092a-39e7-4e23-af6b-e6bc2ba3964f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=预算方案" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "网络资源", "GUID": "0081bad7-8e04-4a41-8c91-1a1e12bcddbd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=网络资源" } }, { "BindingInfo": { "TableName": "项目表", "ColumnName": "开启反馈收集", "GUID": "287ed753-de9c-4c7d-a5d5-95d3793b4b4b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=开启反馈收集" } } ] } ], "ID": "2e094e9c-e390-4588-9a0e-c119915e5d64" } ] } ] }, "CatchCommandPart": { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionCode" }, "Message": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=ExceptionMessage" } } ] } } ] }