From 9252216a5e68e1240cbf94c9df591840635f6491 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 3 Mar 2025 13:13:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Tiobon.Web.pdm | 280 +++++++++++------- .../Controllers/Ghre/Ghre_PlanController.cs | 21 ++ Tiobon.Core.Api/Tiobon.Core.xml | 8 + Tiobon.Core.Services/CommonServices.cs | 41 +++ .../Ghre/Ghre_PlanServices.cs | 79 ++++- .../Ghre/Ghre_RequestServices.cs | 5 +- Tiobon.Core/Tiobon.Core.xml | 22 ++ 7 files changed, 354 insertions(+), 102 deletions(-) diff --git a/Model/Tiobon.Web.pdm b/Model/Tiobon.Web.pdm index 849e90ae..e13521cb 100644 --- a/Model/Tiobon.Web.pdm +++ b/Model/Tiobon.Web.pdm @@ -1,5 +1,5 @@ - + @@ -51858,7 +51858,7 @@ Ghra_staff_InsureBase Ghre_Plan 1740635904 Administrator -1740636045 +1740978695 Administrator 培训计划 @@ -52090,6 +52090,86 @@ Ghra_staff_InsureBase 32 +6FCFCC7F-C626-4C6B-9EB9-16D3F1E89EC6 +状态 +Status +1740978670 +Administrator +1740978675 +Administrator +状态 +nvarchar(32) +32 + + +3C55E2C1-4AB8-4D33-A47F-4A2892A296D3 +同意人 +AgreeUserId +1740978690 +Administrator +1740978695 +Administrator +同意人 +bigint + + +F7BD8575-0EA0-432A-B902-4D15E3832C4F +同意时间 +AgreeTime +1740978690 +Administrator +1740978695 +Administrator +同意时间 +datetime + + +CC326BDB-1E8B-4D30-8B49-E3F573F1B393 +同意理由 +AgreeReason +1740978690 +Administrator +1740978695 +Administrator +同意理由 +nvarchar(2000) +2000 + + +72149770-1678-4278-BEED-0439896231E1 +拒绝人 +RefuseUserId +1740978690 +Administrator +1740978695 +Administrator +拒绝人 +bigint + + +B3135D5B-4BC5-4F06-BD4B-1A4C1192D776 +拒绝时间 +RefuseTime +1740978690 +Administrator +1740978695 +Administrator +拒绝时间 +datetime + + +1381DE3A-9CFF-4820-BAA0-F07804301D93 +拒绝理由 +RefuseReason +1740978690 +Administrator +1740978695 +Administrator +拒绝理由 +nvarchar(2000) +2000 + + C586C958-08D3-433B-A070-AC1F62621880 备注 RemarkSz @@ -52104,7 +52184,7 @@ Ghra_staff_InsureBase - + 1CB94A5D-CC16-4DD8-85CA-DB5AD371530D 默认标志 IsDefault @@ -52119,7 +52199,7 @@ Ghra_staff_InsureBase - + FB7531C3-6960-48C7-B776-E283C974F558 删除标志 IsEnable @@ -52134,7 +52214,7 @@ Ghra_staff_InsureBase - + B647564F-9813-4B21-9F69-DAF6DFED9F6E 预留字段1 Reverse1 @@ -52146,7 +52226,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 146A8246-E926-4CE4-91C2-4AA99A128772 预留字段2 Reverse2 @@ -52158,7 +52238,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + BCF32FCB-A775-4ADF-8023-843D0D12EBCA 预留字段3 Reverse3 @@ -52170,7 +52250,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 731EA6D9-3D08-4FC2-848D-45AEE2BADCD0 预留字段4 Reverse4 @@ -52182,7 +52262,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 25FA1D46-3ABD-4A23-B5F2-38D11C9A9AAE 预留字段5 Reverse5 @@ -52194,7 +52274,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 7C321E77-EEAD-4E56-B8E6-2776995AF5FD 预留字段6 Reverse6 @@ -52206,7 +52286,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 0AF59C89-205B-47EE-865A-596F9B834E2A 预留字段7 Reverse7 @@ -52218,7 +52298,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 61F0ABE3-9D64-41E4-9247-BF8F9BBE2FC4 预留字段8 Reverse8 @@ -52230,7 +52310,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + F605D27E-3306-42E1-A65A-F2CA0122FCA2 预留字段9 Reverse9 @@ -52242,7 +52322,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + E43B7DD8-6216-481C-A4D0-C374BC0B4BB2 预留字段10 Reverse10 @@ -52254,7 +52334,7 @@ Ghra_staff_InsureBase nvarchar(1000) 1000 - + 404E9E33-D5EE-4C4D-930C-D2010CC2BB5B 预留字段I1 ReverseI1 @@ -52266,7 +52346,7 @@ Ghra_staff_InsureBase 0 int - + FECFDDF0-E3D2-4EAB-AEE5-CF718274088C 预留字段I2 ReverseI2 @@ -52280,7 +52360,7 @@ Ghra_staff_InsureBase - + A02DAC9D-C207-4F4F-8991-AB032B344856 Key_1 Key_1 @@ -52294,10 +52374,10 @@ Ghra_staff_InsureBase - + - + @@ -52321,7 +52401,7 @@ Ghra_staff_InsureBase - + 7F0DCA7C-274D-48A8-B3D8-0FD7B707AFC2 1714101292 Administrator @@ -52355,7 +52435,7 @@ Ghra_staff_InsureBase - + D23C452C-4BB6-4C2A-AB2E-E8434D958A77 1714101335 Administrator @@ -52370,7 +52450,7 @@ Ghra_staff_InsureBase - + 55EBFC84-83AC-4EDF-BADD-29FA719652D1 Reference_13 Reference_13 @@ -52389,7 +52469,7 @@ Ghra_staff_InsureBase - + D4016F9D-5631-4F9E-A70D-D42133A4EBB7 1714107872 Administrator @@ -52423,7 +52503,7 @@ Ghra_staff_InsureBase - + BEBA3346-CCC6-41D9-B95B-12B8F81188BF 1714108449 Administrator @@ -52457,7 +52537,7 @@ Ghra_staff_InsureBase - + FC69BEF9-F863-4A65-903E-CB2850197526 1714109221 Administrator @@ -52491,7 +52571,7 @@ Ghra_staff_InsureBase - + ACE0AB02-0D27-4F1C-BF71-738C20DF96C2 1714120556 Administrator @@ -52525,7 +52605,7 @@ Ghra_staff_InsureBase - + B95672ED-9976-4742-9FFC-52B326620682 1715565535 Administrator @@ -52559,7 +52639,7 @@ Ghra_staff_InsureBase - + B6E89235-A6E0-460D-9228-DCA8C58EE2AD 1715570661 Administrator @@ -52593,7 +52673,7 @@ Ghra_staff_InsureBase - + 5D4938F3-7934-4F74-891C-97DC9DC47B1B 1716798640 Administrator @@ -52627,7 +52707,7 @@ Ghra_staff_InsureBase - + 179079CB-7169-4B19-A07A-A61C331F59CD 1716876897 Administrator @@ -52661,7 +52741,7 @@ Ghra_staff_InsureBase - + DD965546-2361-4301-82D7-446B823BDCFD 1717481682 Administrator @@ -52695,7 +52775,7 @@ Ghra_staff_InsureBase - + E78B14FB-C2C3-4DCA-A3B4-CA471817B9FC 1717726229 Administrator @@ -52729,7 +52809,7 @@ Ghra_staff_InsureBase - + 8C71D6B9-780B-4547-ADFD-986E619F4DCD 1719381914 Administrator @@ -52763,7 +52843,7 @@ Ghra_staff_InsureBase - + EB9D1A5A-99AB-44AD-9B1A-D45E66C0CFDE 1719468257 Administrator @@ -52797,7 +52877,7 @@ Ghra_staff_InsureBase - + ACF1454B-2C3F-40E5-ADC5-4A48787EB937 1720488320 Administrator @@ -52831,7 +52911,7 @@ Ghra_staff_InsureBase - + 55351100-6B8C-411A-838F-ADF17D7249C7 1721372650 Administrator @@ -52846,7 +52926,7 @@ Ghra_staff_InsureBase - + 465DBD55-7683-4A4B-91D3-B7019ED619F0 Reference_114 Reference_114 @@ -52865,7 +52945,7 @@ Ghra_staff_InsureBase - + CE1833FA-A783-4FAC-87BF-AA0FF8008532 1721280283 Administrator @@ -52899,7 +52979,7 @@ Ghra_staff_InsureBase - + 18F2EFF3-BD41-4F96-96C8-D8B15C7E2644 1721372603 Administrator @@ -52933,7 +53013,7 @@ Ghra_staff_InsureBase - + F7ECB7BC-BA8B-4606-B521-999C20FD5C43 1722318917 Administrator @@ -52967,7 +53047,7 @@ Ghra_staff_InsureBase - + 6764C448-6B6B-4DD7-AED9-8E74CDD1261A 1727335554 Administrator @@ -53001,7 +53081,7 @@ Ghra_staff_InsureBase - + C8D69BA0-B62F-4A3E-981C-59D5FC0C2A03 1727336760 Administrator @@ -53035,7 +53115,7 @@ Ghra_staff_InsureBase - + 09B3F4FA-149B-4BB2-8D4C-CB9E05153125 1727336895 Administrator @@ -53069,7 +53149,7 @@ Ghra_staff_InsureBase - + D0D47F43-60D2-4012-A1C6-7EE1F23B2B48 1727337857 Administrator @@ -53084,7 +53164,7 @@ Ghra_staff_InsureBase - + E261580B-7706-444D-9E7B-6A1A5968579B Reference_24 Reference_24 @@ -53103,7 +53183,7 @@ Ghra_staff_InsureBase - + A9F8F17E-368A-42BA-B603-19B2CAF61361 1728532955 Administrator @@ -53137,7 +53217,7 @@ Ghra_staff_InsureBase - + 88DE8617-23F2-4075-A9EB-3AEA05F12872 1728532977 Administrator @@ -53171,7 +53251,7 @@ Ghra_staff_InsureBase - + 36AE3FE2-B4E5-4FF7-ADD1-93D1ABD487CD 1728533087 Administrator @@ -53186,7 +53266,7 @@ Ghra_staff_InsureBase - + AB9D9DC4-987C-4E4B-9BD3-35091CDBA380 Reference_27 Reference_27 @@ -53205,7 +53285,7 @@ Ghra_staff_InsureBase - + E2D02611-09C9-42E2-AA43-22E820AF219C 1728626387 Administrator @@ -53239,7 +53319,7 @@ Ghra_staff_InsureBase - + 62F35C8E-87DA-43C4-AAE9-A47D112F8E0A 1728540045 Administrator @@ -53273,7 +53353,7 @@ Ghra_staff_InsureBase - + 3759DC14-1A7D-4121-AAE1-58CE6813A0AA 1728541044 Administrator @@ -53307,7 +53387,7 @@ Ghra_staff_InsureBase - + 1791558D-852F-437C-97F6-7F9D11EE26DB 1729662916 Administrator @@ -53341,7 +53421,7 @@ Ghra_staff_InsureBase - + 00049FDC-8297-463E-9347-A571E3AB9C9E 1729663415 Administrator @@ -53375,7 +53455,7 @@ Ghra_staff_InsureBase - + B7B6FBF6-DC05-4490-8656-A5DEAF831781 1730250294 Administrator @@ -53409,7 +53489,7 @@ Ghra_staff_InsureBase - + A0C97DD9-1C72-4A18-9FEE-EE6A9AEF21F8 1730336852 Administrator @@ -53443,7 +53523,7 @@ Ghra_staff_InsureBase - + 39FD6B5F-C473-44DF-969E-D851D388EBAE 1730340808 Administrator @@ -53477,7 +53557,7 @@ Ghra_staff_InsureBase - + C4EECAD7-F267-4702-A253-CA499692A254 1730346502 Administrator @@ -53511,7 +53591,7 @@ Ghra_staff_InsureBase - + 3EBD04DF-C924-4032-982C-CA9EF3B72E39 1731478017 Administrator @@ -53545,7 +53625,7 @@ Ghra_staff_InsureBase - + DE13B6DD-B49E-4F3E-8AF7-BEB535EE3CC6 1731478076 Administrator @@ -53579,7 +53659,7 @@ Ghra_staff_InsureBase - + 28C77E11-7423-4D63-9053-A5D40E7940AF 1731491451 Administrator @@ -53613,7 +53693,7 @@ Ghra_staff_InsureBase - + 76F5B648-63C3-466C-B313-B38E0519B3BA 1733211832 Administrator @@ -53647,7 +53727,7 @@ Ghra_staff_InsureBase - + D2B7DF8F-ACF7-4237-B814-FA662272F871 1733369860 Administrator @@ -53681,7 +53761,7 @@ Ghra_staff_InsureBase - + F4431A85-1466-4A29-9D1B-A82B70F2F5D5 1733909650 Administrator @@ -53715,7 +53795,7 @@ Ghra_staff_InsureBase - + 3C15C987-A6E8-4FAA-AFB6-1CCBC250460D 1734490374 Administrator @@ -53749,7 +53829,7 @@ Ghra_staff_InsureBase - + 9B53094C-D4A4-4269-A8F0-B03AC9CEA70F 1737080391 Administrator @@ -53764,7 +53844,7 @@ Ghra_staff_InsureBase - + C4514A46-AF20-4937-902F-A02C91F50231 Reference_44 Reference_44 @@ -53783,7 +53863,7 @@ Ghra_staff_InsureBase - + 22844E1B-552F-4914-8997-D9056E9D9574 1737085753 Administrator @@ -53817,7 +53897,7 @@ Ghra_staff_InsureBase - + 0457880B-22F4-48EC-84E0-13C055FDBA46 1737086327 Administrator @@ -53851,7 +53931,7 @@ Ghra_staff_InsureBase - + 5A235CB8-FEFB-41E2-B379-421F28BC171B 1738913762 Administrator @@ -53885,7 +53965,7 @@ Ghra_staff_InsureBase - + 1D7919EA-4B45-4026-8981-20ABBE3392A1 1738915647 Administrator @@ -53919,7 +53999,7 @@ Ghra_staff_InsureBase - + 33416204-3836-40D1-AEA9-BF78C4576311 1738915648 Administrator @@ -53953,7 +54033,7 @@ Ghra_staff_InsureBase - + F631F0DE-0C6E-4534-8868-FFB7A5CE94B9 1738916095 Administrator @@ -53987,7 +54067,7 @@ Ghra_staff_InsureBase - + F5085F08-E406-43D8-A1A8-81A9189C0250 1738916098 Administrator @@ -54002,7 +54082,7 @@ Ghra_staff_InsureBase - + 34714A40-5F9A-4B8C-90C8-33DA4909C40F Reference_51 Reference_51 @@ -54021,7 +54101,7 @@ Ghra_staff_InsureBase - + B20D9464-D8C0-404D-9C55-6A16F6CB04BB 1738977084 Administrator @@ -54043,7 +54123,7 @@ Ghra_staff_InsureBase - + A1DD77B6-E48E-4C9D-947D-D42E3C5240C2 dbo dbo @@ -54056,7 +54136,7 @@ Ghra_staff_InsureBase - + C012A467-0031-4F3C-9D9D-13408491E147 DefaultSchema 1597196432 @@ -54064,12 +54144,12 @@ Ghra_staff_InsureBase 1597196433 ttsoftxch - + - + 41D2B655-5319-49C5-9BA6-133BB8B097CA dbo dbo @@ -54081,7 +54161,7 @@ Ghra_staff_InsureBase - + 2153E033-C4DC-4F90-B2F4-3B0F44BD33D5 文本 TEXT @@ -54091,7 +54171,7 @@ Ghra_staff_InsureBase ttsoftxch text - + AC8799D0-82CA-4B70-ADAC-18D8797720A9 图片 IMAGE @@ -54101,7 +54181,7 @@ Ghra_staff_InsureBase Administrator image - + DEC04470-B84A-413E-9B2A-C265C5506182 加密 ENCRYPT_STRING @@ -54112,7 +54192,7 @@ Ghra_staff_InsureBase nvarchar(256) 256 - + 538C6297-7080-43C1-9455-AD6516B6FBB2 数字 NUMBER @@ -54124,7 +54204,7 @@ Ghra_staff_InsureBase 20 6 - + AF15A9FA-052F-43E5-9102-57F195CBCFDE 类别 TYPE @@ -54135,7 +54215,7 @@ Ghra_staff_InsureBase varchar(32) 32 - + D0936140-81BD-463E-B0ED-FE3F86828A2C 特长字符串 LONG_LONG_STRING @@ -54146,7 +54226,7 @@ Ghra_staff_InsureBase varchar(256) 256 - + 5FBDAFFC-EA04-407B-877F-58752C2E736C 金额 AMOUNT @@ -54158,7 +54238,7 @@ Ghra_staff_InsureBase 20 6 - + F461E3FD-0A64-4712-BC09-C0BA3C248E5B 描述 DESCRIPTION @@ -54169,7 +54249,7 @@ Ghra_staff_InsureBase varchar(4000) 4000 - + 703A2917-B6C4-4BC6-B2CB-6AB8E2B49D30 短字符串 SHORT_STRING @@ -54180,7 +54260,7 @@ Ghra_staff_InsureBase varchar(64) 64 - + 89A476D2-A1C0-428C-9875-26A50B7AFE1A 长字符串 LONG_STRING @@ -54202,7 +54282,7 @@ Ghra_staff_InsureBase varchar(2000) 2000 - + @@ -54216,7 +54296,7 @@ Ghra_staff_InsureBase char(1) 1 - + 82662C91-618F-4022-B9CD-1A431DC84A0A 名称 NAME @@ -54237,7 +54317,7 @@ Ghra_staff_InsureBase Administrator int - + 77F6BD58-5A9D-44F7-988C-76608A3F38B5 代码 CODE @@ -54269,7 +54349,7 @@ Ghra_staff_InsureBase varchar(32) 32 - + DA200725-BFB0-4351-9C3E-DC30C036538E STATUS STATUS @@ -54280,7 +54360,7 @@ Ghra_staff_InsureBase varchar(32) 32 - + CB2F08D6-BE17-4046-B94A-4FD00EDA9015 文件 FILE @@ -54290,7 +54370,7 @@ Ghra_staff_InsureBase feipeng image - + 7CC45A5C-15C8-4CA8-BBEB-66FE3DAB482F 字符串512 STRING_512 @@ -54303,7 +54383,7 @@ Ghra_staff_InsureBase - + B41C21E8-76E9-4031-8EF0-34743E5525C5 PUBLIC PUBLIC @@ -54312,13 +54392,13 @@ Ghra_staff_InsureBase 1597196433 ttsoftxch - - + + - + 02EF92C9-49BF-45C7-934A-23BA290D5595 Microsoft SQL Server 2008 MSSQLSRV2008 diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs index 4d25241d..045c62b7 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_PlanController.cs @@ -11,4 +11,25 @@ public class Ghre_PlanController : BaseController + /// 根据条件查询数据 + /// + /// 条件 + /// status + /// + [HttpPost, Route("QueryList/{status}")] + public async Task> QueryByStatus([FromBody] QueryBody body, string status) + { + if (status == "Active") + return await _service.QueryFilterPage(body, $"(Status ='Active' OR Status ='Wait')"); + else if (status == "Disable") + return await _service.QueryFilterPage(body, null, false); + else + return await _service.QueryFilterPage(body, $"Status ='{status}'"); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 29e9fa79..492730fe 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1194,6 +1194,14 @@ 培训计划(Controller) + + + 根据条件查询数据 + + 条件 + status + + 题目答案(Controller) diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index a0d3d028..9ec25172 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -2072,6 +2072,47 @@ public partial class CommonServices : BaseServices>, ICommon position = "left" }); break; + + case "F_TrainPlan_Temporary": + + sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName + FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId + WHERE A.UserID = {App.User.ID} + AND A.IsEnable = 1 + AND B.IsEnable = 1 + AND B.RoleNo = 'F_TrainPlanTransferToConfirmed'"; + toolbarRoles = DbAccess.QueryList(sql); + if (toolbarRoles != null && toolbarRoles.Any()) + result.JM_PageControlT1.Toolbar.Add(new Toolbar() + { + display = true, + fnKey = "TBD5YN", + fnTitle = await QueryLangValue("F_ManReqMaintenTemporary_TransferToConfirmed", param.langId, "转入待确认"), + fnType = "table", + icon = "ghr-icon-user-wait", + position = "left" + }); + break; + case "F_TrainPlan_WaitConfirm": + result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() + { + display = true, + fnKey = "TBD6YN", + fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Reject", param.langId, "拒绝"), + fnType = "table", + icon = "ess-icon-reject", + position = "left" + }); + result.JM_PageControlT1.Toolbar.Insert(0, new Toolbar() + { + display = true, + fnKey = "TBD5YN", + fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Agree", param.langId, "同意"), + fnType = "table", + icon = "ess-icon-approval", + position = "left" + }); + break; } #endregion diff --git a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs index a46b62b4..6547a7c8 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_PlanServices.cs @@ -1,4 +1,6 @@ -namespace Tiobon.Core.Services; +using static Tiobon.Core.Model.Consts; + +namespace Tiobon.Core.Services; /// /// 培训计划 (服务) @@ -81,4 +83,79 @@ public class Ghre_PlanServices : BaseServices> InsertByStatus(InsertGhre_RequestInput insertModel, string status) + { + var data = ServiceResult.OprateSuccess("新增成功", 0); + insertModel.Status = status; + var id = await Add(insertModel); + + data.Success = id > 0; + if (data.Success) + data.Data = id; + else + return ServiceResult.OprateFailed("发布成功!"); + + return data; + } + + public override async Task> QueryForm(QueryForm body) + { + var result = await base.QueryForm(body); + string trainStaffId = result.result.DT_TableDataT1[0].TrainStaffId; + if (!string.IsNullOrWhiteSpace(trainStaffId)) + result.result.DT_TableDataT1[0].TrainStaffIds = JsonHelper.JsonToObj>(trainStaffId); + else result.result.DT_TableDataT1[0].TrainStaffIds = new List(); + return result; + + } + + public async Task UpdateStatus(InsertGhre_RequestInput input, string status) + { + + HttpRequest request = UserContext.Context.Request; + var api = request.Path.ObjToString().TrimEnd('/').ToLower(); + var ip = GetUserIp(UserContext.Context); + + var entities = new List(); + foreach (var id in input.Ids) + { + if (!BaseDal.Any(id)) + continue; + + var entity = await BaseDal.QueryById(id); + + + switch (status) + { + case DIC_REQUEST_STATUS.Active: + entity.AgreeReason = input.Reason; + entity.AgreeTime = DateTime.Now; + entity.AgreeUserId = App.User.ID; + break; + case DIC_REQUEST_STATUS.Temporary: + entity.RefuseReason = input.Reason; + entity.RefuseTime = DateTime.Now; + entity.RefuseUserId = App.User.ID; + break; + } + + entity.UpdateIP = ip; + entity.UpdateProg = api; + entity.Status = status; + entities.Add(entity); + } + + var result = await BaseDal.Update(entities); + return ServiceResult.OprateSuccess("执行成功!"); + //if (status == Consts.DIC_COURSE_STATUS.RELEASED) + // return ServiceResult.OprateSuccess("发布成功!"); + //else if (status == Consts.DIC_COURSE_STATUS.DRAFT) + // return ServiceResult.OprateSuccess("已启用成功,请进入草稿箱查看!"); + //else + // return ServiceResult.OprateSuccess("停用成功!"); + + } } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs index ad033b6d..fd720cc3 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_RequestServices.cs @@ -117,6 +117,7 @@ FROM Ghre_Request A throw new Exception("培训对象数量须和需求人数保持一致!"); } } + else entity.RequestNum = 1; var id = await base.Add(entity); var sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghre_Request WHERE Id !='{id}'"; @@ -142,6 +143,7 @@ FROM Ghre_Request A throw new Exception("培训对象数量须和需求人数保持一致!"); } } + else entity.RequestNum = 1; if (entity.TrainStaffIds.IsNotEmptyOrNull()) entity.TrainStaffId = JsonHelper.ObjToJson(entity.TrainStaffIds); else entity.TrainStaffId = null; @@ -628,7 +630,8 @@ FROM Ghre_Request A inserts.Add(insert1); }); await base.Add(inserts); - }else + } + else await base.Add(insert); } diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 20ae34fc..492730fe 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1104,6 +1104,13 @@ 员工ID列表 + + + 学员导出 + + 开班ID + + 查询团体费用 @@ -1155,6 +1162,13 @@ 开班ID + + + 报名 + + 开班ID + + 开班费用(Controller) @@ -1180,6 +1194,14 @@ 培训计划(Controller) + + + 根据条件查询数据 + + 条件 + status + + 题目答案(Controller)