{ "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": { "IgnoreBlank": false } }, { "Name": "汇报人", "DataValidationInfo": { "IgnoreBlank": false } }, { "Type": 1, "ArrayParamItems": [ { "Name": "关联任务", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "类型", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "工时", "DataValidationInfo": { "IgnoreBlank": false } }, { "Name": "内容", "DataValidationInfo": { "IgnoreBlank": false } } ], "OnlySendChangedData": true, "PrimaryKeys": [ "ID" ], "Name": "汇报明细", "DataValidationInfo": {} }, { "Name": "日报内容", "DataValidationInfo": {} } ] } ], "Commands": [ { "$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.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "查重", "TableValue": { "TableName": "汇报记录表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.RelationSqlCondition, ForguncyDataAccess", "SubConditions": [ { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "153292c4-4458-4a38-ac97-01a89b05d6a3" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "c5da8913-a852-4545-9915-d6c684a51acd" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } } ] }, "NullFormulaValueQueryPolicy": 0 }, "ID": "717938b05b37453b89964aa76c0a00be" }, { "$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.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报记录表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "605c317b-6961-4b73-b0d8-79b9ea2f899c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "7616ccd1-7a40-48e1-a0f2-c10712db3125" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "内容", "GUID": "e9428f1a-c56e-40e0-9e75-261f15bd7791" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=日报内容" } } ], "ParamNameToSaveNewRowValue": "新汇报" }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报明细.AddRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "80f82886-9eca-4b4a-9c7c-df27c64604d6", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "e82cf278-17e8-427b-8e7e-3d0c12ce6a16" }, "ColumnName": "项目ID" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "9bdf7dd4-0b78-4171-ac4a-a9cb341d749b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "5e28deed642c475c8c5e3577469600ff" }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报子表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报ID", "GUID": "17336f2f-f714-4d57-b1f3-5b16a5f762cf" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=新汇报.ID" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报类型", "GUID": "cf09427d-9916-4948-a42b-6dfa9e2bdb11" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.类型" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报内容", "GUID": "c5e53095-abdc-44b4-8a71-bf58248e3e2c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.内容" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "工时", "GUID": "5ed4666b-1698-4230-9359-6f7b714be2c7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.工时" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联任务", "GUID": "5b1d3d04-ee0d-4680-860d-ec58ed8128b4" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联项目", "GUID": "a335af77-c9b7-44d5-9376-100c43922c7f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(任务信息=\"\",\"\",任务信息.项目ID)" } } ] } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "新增汇报成功" } ], "ID": "7da2cd64-c1bb-4b9b-b36b-e6fbaef0bcba" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "当前日期已有汇报,请勿重复提交。" } ], "ID": "136577ac-2213-42b7-a604-1d374b266779" } ] } ], "ID": "69cbc96f-7983-4b6e-bcb1-5730f2d0c550" }, { "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "校验", "TableValue": { "TableName": "汇报记录表", "TableValueType": 3, "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "ID", "GUID": "62d19b6d-67ee-470c-a51b-00af22ed90ce" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报ID" } }, "NullFormulaValueQueryPolicy": 0 }, "ID": "a074360e88e34de795e814cde170544a" }, { "$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", "compareType": 2 }, "CommandList": [ { "$type": "Forguncy.Model.ServerTransactionCommand, ServerDesignerCommon", "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报记录表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报记录表", "ColumnName": "ID", "GUID": "ef6692e1-676b-4bc0-a56b-2c23de4b1709" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "开始日期", "GUID": "b138985e-5591-405c-8395-f4388f10abb0" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报日期" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "汇报人", "GUID": "aee4427c-5235-475d-9d9d-151d74eaebb9" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报人" } }, { "BindingInfo": { "TableName": "汇报记录表", "ColumnName": "内容", "GUID": "ae164cbc-c6e4-4284-a6ee-9a9b05c3db49" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=日报内容" } } ], "ParamNameToSaveNewRowValue": "新汇报" }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报明细.AddRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "3316486c-32c6-4930-8a61-5c46598cc48a", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "e82cf278-17e8-427b-8e7e-3d0c12ce6a16" }, "ColumnName": "项目ID" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "9bdf7dd4-0b78-4171-ac4a-a9cb341d749b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "0cb01adf1b394e5190a3c96b1334c57c" }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报子表", "UpdateType": "add", "ShowConfirm": false, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报ID", "GUID": "14712eb6-c8ba-4bce-ab2d-0eb0445d42e1" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报ID" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报类型", "GUID": "840eb53f-3609-42ef-862f-b2b502224c32" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.类型" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报内容", "GUID": "0fbb014b-4603-46a6-90ba-ef78f1489c02" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.内容" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "工时", "GUID": "05bfd3e5-59ff-4c68-837e-46b13e76889e" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.工时" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联任务", "GUID": "f3374449-4155-4c81-898e-45033103f6d7" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联项目", "GUID": "ec003738-17f1-4fb1-aef6-19a928a5ecdb" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(任务信息=\"\",\"\",任务信息.项目ID)" } } ] } ] }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报明细.EditRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon", "ParameterName": "任务信息", "TableValue": { "TableName": "任务表", "TableValueType": 1, "BindingInfos": [ { "GUID": "9ce924b8-2c07-48f3-b14b-fcb2e39368d0", "BindingInfo": { "TableName": "任务表", "ColumnName": "项目ID", "GUID": "e82cf278-17e8-427b-8e7e-3d0c12ce6a16" }, "ColumnName": "项目ID" } ], "SqlCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "任务表", "ColumnName": "ID", "GUID": "9bdf7dd4-0b78-4171-ac4a-a9cb341d749b" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, "NullFormulaValueQueryPolicy": 0, "TopCount": "1" }, "ID": "d80713a9356d46299ef511c55edf5619" }, { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报子表", "ShowConfirm": false, "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报子表", "ColumnName": "ID", "GUID": "e0f1f512-c839-4003-b23c-3cab7e12224c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.ID" } }, "UpdateBindingValues": [ { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报类型", "GUID": "38c3e81d-1d3d-42dd-857a-87b1141d432d" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.类型" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "汇报内容", "GUID": "a881bb23-9979-4700-a053-b8e22685059f" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.内容" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "工时", "GUID": "1f8ec991-b906-48d8-9176-8f778d8b80a6" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.工时" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联任务", "GUID": "e589f2cf-36f4-4f47-b63f-76ab55db35db" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.关联任务" } }, { "BindingInfo": { "TableName": "汇报子表", "ColumnName": "关联项目", "GUID": "35ecf7f5-c956-4f2b-8170-51ff89419f76" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=IF(任务信息=\"\",\"\",任务信息.项目ID)" } } ] } ] }, { "$type": "Forguncy.Model.LoopCommand, ServerDesignerCommon", "LoopInfo": { "$type": "Forguncy.Model.CountLoopInfo, ServerDesignerCommon", "LoopCount": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=汇报明细.DeleteRows" }, "LoopItemParamName": "Item" }, "CommandList": [ { "$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon", "TableName": "汇报子表", "UpdateType": "delete", "ShowConfirm": true, "ConfirmText": "您确定要删除吗?", "RowsToUpdate": 1, "RowsToUpdateCondition": { "$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess", "ColumnBindingInfo": { "TableName": "汇报子表", "ColumnName": "ID", "GUID": "e0f1f512-c839-4003-b23c-3cab7e12224c" }, "Value": { "$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon", "SerializeProperty": "=Item.ID" } } } ] } ] }, { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "0", "Message": "编辑汇报成功" } ], "ID": "1603a168-2367-4d29-ab10-183a378593d7" }, { "CommandList": [ { "$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon", "ErrorCode": "400", "Message": "汇报记录不存在,无法为你修改!" } ], "ID": "a9412d9c-c022-46fa-be6e-6958a4987a94" } ] } ], "ID": "652ea5f5-945c-4c66-89cd-269042546c03" } ] } ] }