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