WTJLGCService.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using QWPlatform.IService;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace PMS.DBService.Product
  9. {
  10. /// <summary>
  11. /// 创建者:冉利
  12. /// 创建日期:2018/01/30
  13. /// 功能描述:问题记录过程
  14. /// </summary>
  15. public class WTJLGCService : DataServiceBase
  16. {
  17. //实例化数据库
  18. public DataServiceBase dataservice = new DataServiceBase();
  19. /// <summary>
  20. /// 获取问题记录过程
  21. /// </summary>
  22. /// <param name="iD"></param>
  23. /// <returns></returns>
  24. public DataTable GetClc(string iD)
  25. {
  26. string sql = @"select t.记录时间,t.耗时,t.id,
  27. decode(ry.性质,1,'总部',2,'渠道人员',3,'客户',4,'医院管理员',5,'卫计委管理员') as 职务,t.描述,
  28. ry.姓名 as 处理人员, ry.联系电话,
  29. (select decode(f.是否终止,0,decode(f.是否回退,0,decode(f.是否解决,0,'处理中',1,'已解决'),1,'回退'),1,'已终止')
  30. from 问题记录 f where id=t.问题id)解决状态,
  31. (select 名称 from 问题工作流程 where ID = t.当前流程id) 问题环节,
  32. decode(t.状态,1,'登记',2,'回退中',3,'已终止',4,'指派人员',5,'向上提交',6,'处理中',7,'已完成',8,'已受理',9,'取消受理',10,'撤销完成/终止',11,'验证确认',12,'变更说明') AS 处理状态,
  33. (Select Wm_Concat(fj.附件id || '|' || fj.类型) From 产品问题附件 fj Where fj.过程id = t.id) As 附件
  34. from 问题记录过程 t, 人员信息 ry where ry.ID=t.记录人id and t.问题ID=:问题ID order by t.记录时间 desc";
  35. return this.SqlBuilder.SqlText(sql).Parameters("问题ID", iD).Select();
  36. }
  37. }
  38. }