Blame view

netcore/src/Modularity/Extend/NCC.Extend/LqYaoyjlService.cs 16.7 KB
9c60e8ba   “wangming”   ```
1
  using NCC.Common.Core.Manager;
96009bc9   hexiaodong   hxd
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  using NCC.Common.Enum;
  using NCC.Common.Extension;
  using NCC.Common.Filter;
  using NCC.Dependency;
  using NCC.DynamicApiController;
  using NCC.FriendlyException;
  using NCC.Extend.Interfaces.LqYaoyjl;
  using Mapster;
  using Microsoft.AspNetCore.Mvc;
  using SqlSugar;
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
efde7d04   “wangming”   更新多个文件,删除不再使用的CSS...
16
  using NCC.Extend.Entitys.lq_yaoyjl;
96009bc9   hexiaodong   hxd
17
18
19
20
21
22
23
24
  using NCC.Extend.Entitys.Dto.LqYaoyjl;
  using Yitter.IdGenerator;
  using NCC.Common.Helper;
  using NCC.JsonSerialization;
  using NCC.Common.Model.NPOI;
  using NCC.Common.Configuration;
  using NCC.DataEncryption;
  using NCC.ClayObject;
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
25
26
  using NCC.System.Entitys.Permission;
  using NCC.Extend.Entitys.lq_mdxx;
b5df6609   “wangming”   ```
27
  using NCC.Extend.Entitys.lq_khxx;
7606a6ad   “wangming”   fix: update produ...
28
29
  using NCC.Extend.Entitys.lq_todo;
  using NCC.Extend.Entitys.Enum;
96009bc9   hexiaodong   hxd
30
31
32
33
  
  namespace NCC.Extend.LqYaoyjl
  {
      /// <summary>
7606a6ad   “wangming”   fix: update produ...
34
      /// 沟通记录服务(原邀约记录)
96009bc9   hexiaodong   hxd
35
      /// </summary>
7606a6ad   “wangming”   fix: update produ...
36
      [ApiDescriptionSettings(Tag = "绿纤沟通记录服务", Name = "LqYaoyjl", Order = 200)]
96009bc9   hexiaodong   hxd
37
38
39
40
41
42
43
44
45
46
47
48
49
50
      [Route("api/Extend/[controller]")]
      public class LqYaoyjlService : ILqYaoyjlService, IDynamicApiController, ITransient
      {
          private readonly ISqlSugarRepository<LqYaoyjlEntity> _lqYaoyjlRepository;
          private readonly SqlSugarScope _db;
          private readonly IUserManager _userManager;
  
          /// <summary>
          /// 初始化一个<see cref="LqYaoyjlService"/>类型的新实例
          /// </summary>
          public LqYaoyjlService(
              ISqlSugarRepository<LqYaoyjlEntity> lqYaoyjlRepository,
              IUserManager userManager)
          {
41da4257   “wangming”   Refactor LqEventS...
51
              _lqYaoyjlRepository = lqYaoyjlRepository;
96009bc9   hexiaodong   hxd
52
53
54
55
              _db = _lqYaoyjlRepository.Context;
              _userManager = userManager;
          }
  
7606a6ad   “wangming”   fix: update produ...
56
          #region 沟通记录
96009bc9   hexiaodong   hxd
57
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
58
          /// 获取沟通记录
96009bc9   hexiaodong   hxd
59
60
61
62
63
64
65
66
          /// </summary>
          /// <param name="id">参数</param>
          /// <returns></returns>
          [HttpGet("{id}")]
          public async Task<dynamic> GetInfo(string id)
          {
              var entity = await _db.Queryable<LqYaoyjlEntity>().FirstAsync(p => p.Id == id);
              var output = entity.Adapt<LqYaoyjlInfoOutput>();
a79bf04d   “wangming”   feat: 沟通记录与待办、门店登...
67
              output.lxjl_voice = entity.LxjlVoice;
14cbcfd9   “wangming”   feat: 添加人次记录表和品项分类字段
68
              output.storeName = _db.Queryable<LqMdxxEntity>().Where(u => u.Id == entity.StoreId).Select(u => u.Dm).First();
96009bc9   hexiaodong   hxd
69
70
              return output;
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
71
          #endregion
96009bc9   hexiaodong   hxd
72
  
7606a6ad   “wangming”   fix: update produ...
73
          #region 沟通记录列表
96009bc9   hexiaodong   hxd
74
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
75
  		/// 获取沟通记录列表
96009bc9   hexiaodong   hxd
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
  		/// </summary>
  		/// <param name="input">请求参数</param>
  		/// <returns></returns>
          [HttpGet("")]
          public async Task<dynamic> GetList([FromQuery] LqYaoyjlListQueryInput input)
          {
              var sidx = input.sidx == null ? "id" : input.sidx;
              List<string> queryYysj = input.yysj != null ? input.yysj.Split(',').ToObeject<List<string>>() : null;
              DateTime? startYysj = queryYysj != null ? Ext.GetDateTime(queryYysj.First()) : null;
              DateTime? endYysj = queryYysj != null ? Ext.GetDateTime(queryYysj.Last()) : null;
              List<string> queryLxsj = input.lxsj != null ? input.lxsj.Split(',').ToObeject<List<string>>() : null;
              DateTime? startLxsj = queryLxsj != null ? Ext.GetDateTime(queryLxsj.First()) : null;
              DateTime? endLxsj = queryLxsj != null ? Ext.GetDateTime(queryLxsj.Last()) : null;
              var data = await _db.Queryable<LqYaoyjlEntity>()
                  .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
                  .WhereIF(!string.IsNullOrEmpty(input.yyr), p => p.Yyr.Equals(input.yyr))
                  .WhereIF(queryYysj != null, p => p.Yysj >= new DateTime(startYysj.ToDate().Year, startYysj.ToDate().Month, startYysj.ToDate().Day, 0, 0, 0))
                  .WhereIF(queryYysj != null, p => p.Yysj <= new DateTime(endYysj.ToDate().Year, endYysj.ToDate().Month, endYysj.ToDate().Day, 23, 59, 59))
                  .WhereIF(!string.IsNullOrEmpty(input.yykh), p => p.Yykh.Equals(input.yykh))
                  .WhereIF(!string.IsNullOrEmpty(input.yykhxm), p => p.Yykhxm.Contains(input.yykhxm))
                  .WhereIF(!string.IsNullOrEmpty(input.dhsfyx), p => p.Dhsfyx.Equals(input.dhsfyx))
                  .WhereIF(queryLxsj != null, p => p.Lxsj >= new DateTime(startLxsj.ToDate().Year, startLxsj.ToDate().Month, startLxsj.ToDate().Day, 0, 0, 0))
                  .WhereIF(queryLxsj != null, p => p.Lxsj <= new DateTime(endLxsj.ToDate().Year, endLxsj.ToDate().Month, endLxsj.ToDate().Day, 23, 59, 59))
                  .WhereIF(!string.IsNullOrEmpty(input.lxjl), p => p.Lxjl.Contains(input.lxjl))
6b697cd3   “wangming”   feat: 添加营销活动统计功能(...
100
                  .WhereIF(!string.IsNullOrEmpty(input.storeId), p => p.StoreId.Equals(input.storeId))
7606a6ad   “wangming”   fix: update produ...
101
102
                  .WhereIF(!string.IsNullOrEmpty(input.gtfs), p => p.Gtfs.Equals(input.gtfs))
                  .WhereIF(!string.IsNullOrEmpty(input.sfjt), p => p.Sfjt.Equals(input.sfjt))
41da4257   “wangming”   Refactor LqEventS...
103
                  .Select(it => new LqYaoyjlListOutput
96009bc9   hexiaodong   hxd
104
105
                  {
                      id = it.Id,
41da4257   “wangming”   Refactor LqEventS...
106
107
108
109
110
111
112
                      yyr = it.Yyr,
                      yysj = it.Yysj,
                      yykh = it.Yykh,
                      yykhxm = it.Yykhxm,
                      dhsfyx = it.Dhsfyx,
                      lxsj = it.Lxsj,
                      lxjl = it.Lxjl,
a79bf04d   “wangming”   feat: 沟通记录与待办、门店登...
113
                      lxjl_voice = it.LxjlVoice,
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
114
115
116
117
                      storeId = it.StoreId,
                      storeName = SqlFunc.Subqueryable<LqMdxxEntity>().Where(u => u.Id == it.StoreId).Select(u => u.Dm),
                      createTime = it.CreateTime,
                      yyrName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.Id == it.Yyr).Select(u => u.RealName),
72cec4b5   “wangming”   feat: 添加转化率统计和升单类型功能
118
                      tkbh = it.Tkbh,
7606a6ad   “wangming”   fix: update produ...
119
120
121
                      gtfs = it.Gtfs,
                      sfjt = it.Sfjt,
                      xcLxsj = it.XcLxsj,
41da4257   “wangming”   Refactor LqEventS...
122
123
                  }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
              return PageResult<LqYaoyjlListOutput>.SqlSugarPageResult(data);
96009bc9   hexiaodong   hxd
124
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
125
          #endregion
96009bc9   hexiaodong   hxd
126
  
7606a6ad   “wangming”   fix: update produ...
127
          #region 新建沟通记录
96009bc9   hexiaodong   hxd
128
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
129
          /// 新建沟通记录
96009bc9   hexiaodong   hxd
130
131
132
133
134
135
136
          /// </summary>
          /// <param name="input">参数</param>
          /// <returns></returns>
          [HttpPost("")]
          public async Task Create([FromBody] LqYaoyjlCrInput input)
          {
              var userInfo = await _userManager.GetUserInfo();
b5df6609   “wangming”   ```
137
              var ownerId = !string.IsNullOrEmpty(input.yyr) ? input.yyr : userInfo.userId;
96009bc9   hexiaodong   hxd
138
139
              var entity = input.Adapt<LqYaoyjlEntity>();
              entity.Id = YitIdHelper.NextId().ToString();
b5df6609   “wangming”   ```
140
              entity.Yyr = ownerId;
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
141
              entity.CreateTime = DateTime.Now;
b5df6609   “wangming”   ```
142
              entity.StoreId = _db.Queryable<UserEntity>().Where(u => u.Id == ownerId).Select(u => u.Mdid).First();
a79bf04d   “wangming”   feat: 沟通记录与待办、门店登...
143
              entity.LxjlVoice = string.IsNullOrWhiteSpace(input.lxjl_voice) ? null : input.lxjl_voice.Trim();
96009bc9   hexiaodong   hxd
144
145
              var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
              if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000);
7606a6ad   “wangming”   fix: update produ...
146
147
148
  
              if (input.xcLxsj.HasValue)
              {
b5df6609   “wangming”   ```
149
150
151
152
                  var customerPhone = await _db.Queryable<LqKhxxEntity>()
                      .Where(k => k.Id == input.yykh)
                      .Select(k => k.Sjh)
                      .FirstAsync() ?? "";
7606a6ad   “wangming”   fix: update produ...
153
154
155
                  var todoEntity = new LqTodoEntity
                  {
                      Id = YitIdHelper.NextId().ToString(),
b5df6609   “wangming”   ```
156
                      UserId = ownerId,
7606a6ad   “wangming”   fix: update produ...
157
158
159
160
161
162
163
164
165
166
                      StoreId = entity.StoreId,
                      Source = TodoSourceEnum.follow_up.ToString(),
                      RefId = entity.Id,
                      Title = $"跟进客户:{input.yykhxm ?? "未知"}",
                      Desc = $"上次沟通:{((input.lxjl ?? "").Length > 30 ? input.lxjl.Substring(0, 30) + "..." : input.lxjl ?? "")}",
                      Tag = "客户跟进",
                      Urgency = TodoUrgencyEnum.normal.ToString(),
                      DueTime = input.xcLxsj,
                      HandlePath = "contactDialog",
                      HandleType = TodoHandleTypeEnum.dialog.ToString(),
b5df6609   “wangming”   ```
167
                      HandleParam = $"{{\"customerId\":\"{input.yykh}\",\"customerName\":\"{input.yykhxm}\",\"customerPhone\":\"{customerPhone}\"}}",
7606a6ad   “wangming”   fix: update produ...
168
169
170
171
172
                      Status = (int)TodoStatusEnum.Pending,
                      CreateTime = DateTime.Now
                  };
                  await _db.Insertable(todoEntity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync();
              }
96009bc9   hexiaodong   hxd
173
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
174
          #endregion
96009bc9   hexiaodong   hxd
175
  
7606a6ad   “wangming”   fix: update produ...
176
          #region 沟通记录无分页列表
96009bc9   hexiaodong   hxd
177
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
178
  		/// 获取沟通记录无分页列表
96009bc9   hexiaodong   hxd
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
  		/// </summary>
  		/// <param name="input">请求参数</param>
  		/// <returns></returns>
          [NonAction]
          public async Task<dynamic> GetNoPagingList([FromQuery] LqYaoyjlListQueryInput input)
          {
              var sidx = input.sidx == null ? "id" : input.sidx;
              List<string> queryYysj = input.yysj != null ? input.yysj.Split(',').ToObeject<List<string>>() : null;
              DateTime? startYysj = queryYysj != null ? Ext.GetDateTime(queryYysj.First()) : null;
              DateTime? endYysj = queryYysj != null ? Ext.GetDateTime(queryYysj.Last()) : null;
              List<string> queryLxsj = input.lxsj != null ? input.lxsj.Split(',').ToObeject<List<string>>() : null;
              DateTime? startLxsj = queryLxsj != null ? Ext.GetDateTime(queryLxsj.First()) : null;
              DateTime? endLxsj = queryLxsj != null ? Ext.GetDateTime(queryLxsj.Last()) : null;
              var data = await _db.Queryable<LqYaoyjlEntity>()
                  .WhereIF(!string.IsNullOrEmpty(input.id), p => p.Id.Contains(input.id))
                  .WhereIF(!string.IsNullOrEmpty(input.yyr), p => p.Yyr.Equals(input.yyr))
                  .WhereIF(queryYysj != null, p => p.Yysj >= new DateTime(startYysj.ToDate().Year, startYysj.ToDate().Month, startYysj.ToDate().Day, 0, 0, 0))
                  .WhereIF(queryYysj != null, p => p.Yysj <= new DateTime(endYysj.ToDate().Year, endYysj.ToDate().Month, endYysj.ToDate().Day, 23, 59, 59))
                  .WhereIF(!string.IsNullOrEmpty(input.yykh), p => p.Yykh.Equals(input.yykh))
                  .WhereIF(!string.IsNullOrEmpty(input.yykhxm), p => p.Yykhxm.Contains(input.yykhxm))
                  .WhereIF(!string.IsNullOrEmpty(input.dhsfyx), p => p.Dhsfyx.Equals(input.dhsfyx))
                  .WhereIF(queryLxsj != null, p => p.Lxsj >= new DateTime(startLxsj.ToDate().Year, startLxsj.ToDate().Month, startLxsj.ToDate().Day, 0, 0, 0))
                  .WhereIF(queryLxsj != null, p => p.Lxsj <= new DateTime(endLxsj.ToDate().Year, endLxsj.ToDate().Month, endLxsj.ToDate().Day, 23, 59, 59))
                  .WhereIF(!string.IsNullOrEmpty(input.lxjl), p => p.Lxjl.Contains(input.lxjl))
6b697cd3   “wangming”   feat: 添加营销活动统计功能(...
203
                  .WhereIF(!string.IsNullOrEmpty(input.storeId), p => p.StoreId.Equals(input.storeId))
7606a6ad   “wangming”   fix: update produ...
204
205
                  .WhereIF(!string.IsNullOrEmpty(input.gtfs), p => p.Gtfs.Equals(input.gtfs))
                  .WhereIF(!string.IsNullOrEmpty(input.sfjt), p => p.Sfjt.Equals(input.sfjt))
41da4257   “wangming”   Refactor LqEventS...
206
                  .Select(it => new LqYaoyjlListOutput
96009bc9   hexiaodong   hxd
207
208
                  {
                      id = it.Id,
41da4257   “wangming”   Refactor LqEventS...
209
210
211
212
213
214
215
                      yyr = it.Yyr,
                      yysj = it.Yysj,
                      yykh = it.Yykh,
                      yykhxm = it.Yykhxm,
                      dhsfyx = it.Dhsfyx,
                      lxsj = it.Lxsj,
                      lxjl = it.Lxjl,
a79bf04d   “wangming”   feat: 沟通记录与待办、门店登...
216
                      lxjl_voice = it.LxjlVoice,
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
217
                      yyrName = SqlFunc.Subqueryable<UserEntity>().Where(u => u.MobilePhone == it.Yyr).Select(u => u.RealName),
72cec4b5   “wangming”   feat: 添加转化率统计和升单类型功能
218
                      tkbh = it.Tkbh,
7606a6ad   “wangming”   fix: update produ...
219
220
221
                      gtfs = it.Gtfs,
                      sfjt = it.Sfjt,
                      xcLxsj = it.XcLxsj,
41da4257   “wangming”   Refactor LqEventS...
222
223
                  }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync();
              return data;
96009bc9   hexiaodong   hxd
224
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
225
          #endregion
96009bc9   hexiaodong   hxd
226
  
7606a6ad   “wangming”   fix: update produ...
227
          #region 导出沟通记录
96009bc9   hexiaodong   hxd
228
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
229
  		/// 导出沟通记录
96009bc9   hexiaodong   hxd
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
  		/// </summary>
  		/// <param name="input">请求参数</param>
  		/// <returns></returns>
          [HttpGet("Actions/Export")]
          public async Task<dynamic> Export([FromQuery] LqYaoyjlListQueryInput input)
          {
              var userInfo = await _userManager.GetUserInfo();
              var exportData = new List<LqYaoyjlListOutput>();
              if (input.dataType == 0)
              {
                  var data = Clay.Object(await this.GetList(input));
                  exportData = data.Solidify<PageResult<LqYaoyjlListOutput>>().list;
              }
              else
              {
                  exportData = await this.GetNoPagingList(input);
              }
9c60e8ba   “wangming”   ```
247
              List<ParamsModel> paramList = "[{\"value\":\"沟通编号\",\"field\":\"id\"},{\"value\":\"沟通人\",\"field\":\"yyr\"},{\"value\":\"沟通时间\",\"field\":\"yysj\"},{\"value\":\"沟通客户\",\"field\":\"yykh\"},{\"value\":\"沟通客户姓名\",\"field\":\"yykhxm\"},{\"value\":\"电话是否有效\",\"field\":\"dhsfyx\"},{\"value\":\"联系时间\",\"field\":\"lxsj\"},{\"value\":\"联系记录\",\"field\":\"lxjl\"},{\"value\":\"联系记录语音\",\"field\":\"lxjl_voice\"},{\"value\":\"沟通方式\",\"field\":\"gtfs\"},{\"value\":\"是否接听\",\"field\":\"sfjt\"},{\"value\":\"下次联系时间\",\"field\":\"xcLxsj\"},]".ToList<ParamsModel>();
96009bc9   hexiaodong   hxd
248
              ExcelConfig excelconfig = new ExcelConfig();
7606a6ad   “wangming”   fix: update produ...
249
              excelconfig.FileName = "沟通记录.xls";
96009bc9   hexiaodong   hxd
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
              excelconfig.HeadFont = "微软雅黑";
              excelconfig.HeadPoint = 10;
              excelconfig.IsAllSizeColumn = true;
              excelconfig.ColumnModel = new List<ExcelColumnModel>();
              List<string> selectKeyList = input.selectKey.Split(',').ToList();
              foreach (var item in selectKeyList)
              {
                  var isExist = paramList.Find(p => p.field == item);
                  if (isExist != null)
                  {
                      excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value });
                  }
              }
              var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName;
              ExcelExportHelper<LqYaoyjlListOutput>.Export(exportData, excelconfig, addPath);
              var fileName = _userManager.UserId + "|" + addPath + "|xls";
              var output = new
              {
                  name = excelconfig.FileName,
                  url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC")
              };
              return output;
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
273
          #endregion
96009bc9   hexiaodong   hxd
274
  
7606a6ad   “wangming”   fix: update produ...
275
          #region 批量删除沟通记录
96009bc9   hexiaodong   hxd
276
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
277
          /// 批量删除沟通记录
96009bc9   hexiaodong   hxd
278
279
280
281
282
283
284
285
286
287
288
289
290
          /// </summary>
          /// <param name="ids">主键数组</param>
          /// <returns></returns>
          [HttpPost("batchRemove")]
          public async Task BatchRemove([FromBody] List<string> ids)
          {
              var entitys = await _db.Queryable<LqYaoyjlEntity>().In(it => it.Id, ids).ToListAsync();
              if (entitys.Count > 0)
              {
                  try
                  {
                      //开启事务
                      _db.BeginTran();
9c60e8ba   “wangming”   ```
291
                      //批量删除沟通记录
41da4257   “wangming”   Refactor LqEventS...
292
                      await _db.Deleteable<LqYaoyjlEntity>().In(d => d.Id, ids).ExecuteCommandAsync();
96009bc9   hexiaodong   hxd
293
294
295
296
297
298
299
300
301
302
303
                      //关闭事务
                      _db.CommitTran();
                  }
                  catch (Exception)
                  {
                      //回滚事务
                      _db.RollbackTran();
                      throw NCCException.Oh(ErrorCode.COM1002);
                  }
              }
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
304
          #endregion
96009bc9   hexiaodong   hxd
305
  
7606a6ad   “wangming”   fix: update produ...
306
          #region 更新沟通记录
96009bc9   hexiaodong   hxd
307
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
308
          /// 更新沟通记录
96009bc9   hexiaodong   hxd
309
310
311
312
313
314
315
316
          /// </summary>
          /// <param name="id">主键</param>
          /// <param name="input">参数</param>
          /// <returns></returns>
          [HttpPut("{id}")]
          public async Task Update(string id, [FromBody] LqYaoyjlUpInput input)
          {
              var entity = input.Adapt<LqYaoyjlEntity>();
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
317
              entity.StoreId = _db.Queryable<UserEntity>().Where(u => u.Id == input.yyr).Select(u => u.Mdid).First();
a79bf04d   “wangming”   feat: 沟通记录与待办、门店登...
318
              entity.LxjlVoice = string.IsNullOrWhiteSpace(input.lxjl_voice) ? null : input.lxjl_voice.Trim();
96009bc9   hexiaodong   hxd
319
320
321
              var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
              if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001);
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
322
          #endregion
96009bc9   hexiaodong   hxd
323
  
7606a6ad   “wangming”   fix: update produ...
324
          #region 删除沟通记录
96009bc9   hexiaodong   hxd
325
          /// <summary>
7606a6ad   “wangming”   fix: update produ...
326
          /// 删除沟通记录
96009bc9   hexiaodong   hxd
327
328
329
330
331
332
333
334
335
336
          /// </summary>
          /// <returns></returns>
          [HttpDelete("{id}")]
          public async Task Delete(string id)
          {
              var entity = await _db.Queryable<LqYaoyjlEntity>().FirstAsync(p => p.Id == id);
              _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005);
              var isOk = await _db.Deleteable<LqYaoyjlEntity>().Where(d => d.Id == id).ExecuteCommandAsync();
              if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002);
          }
7f83b333   “wangming”   重构:删除部门管理模块并修复预约记录服务
337
          #endregion
96009bc9   hexiaodong   hxd
338
339
      }
  }