Files
clue/ServerCommands/任务/变更任务状态.json

489 lines
24 KiB
JSON

{
"Name": "变更任务状态",
"Enabled": true,
"Triggers": [
{
"$type": "Forguncy.ServerCommands.Models.PostRequestTrigger, 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
}
},
{
"Name": "状态码",
"DataValidationInfo": {
"IgnoreBlank": false
}
}
]
}
],
"Commands": [
{
"$type": "Forguncy.Model.CatchExceptionCommand, ServerDesignerCommon",
"TryCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "任务信息",
"TableValue": {
"TableName": "任务表",
"TableValueType": 1,
"BindingInfos": [
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "项目ID",
"GUID": "417ccd27-5484-41ae-9712-c69d5b98c6fa"
},
"ColumnName": "项目ID"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "任务名称",
"GUID": "59897440-858b-44cb-aa96-6e74d4f7751c"
},
"ColumnName": "任务名称"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "任务状态",
"GUID": "8f13c1bf-e86a-4cb1-afd2-492b85d4cc08"
},
"ColumnName": "任务状态"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "任务状态",
"GUID": "59dd4107-010a-41cb-b897-a68506488492",
"RelationBinding": {
"RelatedTable": "任务状态",
"RelatedColumn": "状态码",
"DisplayColumn": "任务状态"
}
},
"ColumnName": "任务状态文本"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "执行者",
"GUID": "1feee22d-be59-401f-bf83-954a38a92dbb"
},
"ColumnName": "执行者"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "开始时间",
"GUID": "b582715f-80a4-4224-8423-f78cd0c8931e"
},
"ColumnName": "开始时间"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "结束时间",
"GUID": "4e747135-a8aa-4f79-9c50-37d6915e63c3"
},
"ColumnName": "结束时间"
},
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "任务类型",
"GUID": "832e03dc-8b1d-42c1-8053-7e14912e96b9"
},
"ColumnName": "任务类型"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "任务表",
"ColumnName": "ID",
"GUID": "135664f5-205c-4493-b3d0-5764de228e17"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
"TopCount": "1"
},
"ID": "aca960b8f6fa4b4ba9f94d2990702543"
},
{
"$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": "%Null%",
"compareType": 1
},
"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": "=状态码"
}
},
"value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.任务状态"
},
"compareType": 1
},
"CommandList": [
{
"$type": "Forguncy.Model.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "新任务状态",
"TableValue": {
"TableName": "任务状态",
"OnlyGetValue": true,
"TableValueType": 0,
"BindingInfos": [
{
"BindingInfo": {
"TableName": "任务状态",
"ColumnName": "任务状态",
"GUID": "263a2a05-e711-4f5c-90ac-5114c2367ddc"
},
"ColumnName": "任务状态"
}
],
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "任务状态",
"ColumnName": "状态码",
"GUID": "726e05d0-450e-4d21-9fc3-9bd5c6975e85"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=状态码"
}
}
},
"ID": "d13f627dec7147d68c48a6324b2316ff"
},
{
"$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.Commands.SetParameterCommand, ServerDesignerCommon",
"ParameterName": "任务工时",
"TableValue": {
"TableName": "任务工时表",
"TableValueType": 3,
"SqlCondition": {
"$type": "ForguncyDataAccess.GeneralCESqlCondition, ForguncyDataAccess",
"ColumnBindingInfo": {
"TableName": "任务工时表",
"ColumnName": "任务ID",
"GUID": "aeafd224-f511-481e-8355-8d0f79ac733a"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
"NullFormulaValueQueryPolicy": 0
},
"ID": "ff207234ca244312adfeb7866e96d51c"
},
{
"$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.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"该任务已报工,无法切换至\"&任务信息.任务状态文本&\"状态\""
}
}
],
"ID": "d2dc029c-1158-4eb6-9840-d0941f0f0802"
}
]
}
],
"ID": "69504d3b-5071-49f7-8ee4-1ce0686b49b4"
},
{
"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.ConditionCommand, ServerDesignerCommon",
"ConditionAndCommandPairList": [
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.执行者"
}
},
"value": "%Null%"
},
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "任务执行者不能为空"
}
],
"ID": "3a3e1ca4-7b44-49f6-a725-980444eefdba"
}
]
}
],
"ID": "e4bfc3f7-a597-4aec-b117-942450d019f5"
},
{
"Condition": {
"$type": "Forguncy.Model.IfCondition, ServerDesignerCommon",
"param": {
"$type": "Forguncy.Model.IfConditionServerSiteParam, ServerDesignerCommon",
"ParamObject": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=状态码"
}
},
"value": "2"
},
"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": "=任务信息.执行者"
}
},
"value": "%Null%"
},
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "400",
"Message": "任务执行者不能为空"
}
],
"ID": "16ea04e5-64f8-49ac-b831-cc583cddcd83"
}
]
}
],
"ID": "51122708-5488-4f2b-8758-80955ecaabf0"
}
]
},
{
"$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": "8cd30f24-ad8d-43c1-9342-2c7f001d137f"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务ID"
}
},
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "任务表",
"ColumnName": "任务状态",
"GUID": "b6b9fc50-b337-45f0-9d44-6a04a85738ec"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=状态码"
}
}
]
},
{
"$type": "Forguncy.Model.UpdateDataTableCommand, ServerDesignerCommon",
"TableName": "项目动态",
"UpdateType": "add",
"ShowConfirm": false,
"UpdateBindingValues": [
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "项目ID",
"GUID": "82e1c9b2-262a-4b83-b739-bebfd46ad1ed"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=任务信息.项目ID"
}
},
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "项目动态",
"GUID": "73537d3b-79a9-4417-85a4-b0497bd91cdf"
},
"Value": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=\"任务[\"&任务信息.任务名称&\"]从\"&任务信息.任务状态文本&\"状态变更为\"&新任务状态"
}
},
{
"BindingInfo": {
"TableName": "项目动态",
"ColumnName": "执行人",
"GUID": "29bbefd3-fbee-46d3-916c-2ef8e1642935"
},
"Value": "%CurrentUser%"
}
]
}
]
},
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "操作成功"
}
],
"ID": "1d2abb19-40c8-48c5-8817-c9e5f56cafa5"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": "0",
"Message": "操作成功"
}
],
"ID": "595ddc94-840e-4327-aa97-52ae28da4da0"
}
]
}
],
"ID": "65ee5a64-9f54-4c08-8091-ccf5f2e4f471"
},
{
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon"
}
],
"ID": "22104fdf-f46c-42f6-8386-4727f7895d1b"
}
]
}
]
},
"CatchCommandPart": {
"CommandList": [
{
"$type": "Forguncy.Model.ReturnCommand, ServerDesignerCommon",
"ErrorCode": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionCode"
},
"Message": {
"$type": "Forguncy.Model.FormulaReferObject, ServerDesignerCommon",
"SerializeProperty": "=ExceptionMessage"
}
}
]
}
}
]
}