using System; using System.Collections.Generic; using System.Collections; using System.Data; using System.Text; using BP.WF.Data; using BP.En; namespace BP.LIMS { /// /// 工单 Attr /// public class ND1RptAttr : NDXRptBaseAttr { #region 基本属性 /// /// 房间号 /// public const string FangJianHao = "FangJianHao"; /// /// 故障描述 /// public const string GuZhangMiaoShu = "GuZhangMiaoShu"; /// /// 项目名称 /// public const string PrjName = "PrjName"; /// /// 期限限定 /// public const string QiXianXianDing = "QiXianXianDing"; /// /// 紧急程度 /// public const string JJCD = "JJCD"; public const string JJCDText = "JJCDText"; /// /// 图纸编号 /// public const string TuZhiBianHao = "TuZhiBianHao"; /// /// 图纸制图人 /// public const string TuZhiZhiTuRen = "TuZhiZhiTuRen"; /// /// 装配负责人 /// public const string ZhuangPeiFuZeRen = "ZhuangPeiFuZeRen"; /// /// 检测负责人 /// public const string JianCeFuZeRen = "JianCeFuZeRen"; /// /// 封装人 /// public const string FengZhuangRen = "FengZhuangRen"; /// /// 发货人 /// public const string FaHuoRen = "FaHuoRen"; #endregion } /// /// 工单 /// public class ND1Rpt : NDXRptBase { #region 属性 /// /// 请假人部门名称 /// public string TuZhiBianHao { get { return this.GetValStringByKey(ND1RptAttr.TuZhiBianHao); } set { this.SetValByKey(ND1RptAttr.TuZhiBianHao, value); } } /// /// 请假人编号 /// public string TuZhiZhiTuRen { get { return this.GetValStringByKey(ND1RptAttr.TuZhiZhiTuRen); } set { this.SetValByKey(ND1RptAttr.TuZhiZhiTuRen, value); } } /// /// 请假人名称 /// public string ZhuangPeiFuZeRen { get { return this.GetValStringByKey(ND1RptAttr.ZhuangPeiFuZeRen); } set { this.SetValByKey(ND1RptAttr.ZhuangPeiFuZeRen, value); } } /// /// 请假人部门编号 /// public int JJCD { get { return this.GetValIntByKey(ND1RptAttr.JJCD); } set { this.SetValByKey(ND1RptAttr.JJCD, value); } } /// /// 总经理意见 /// public string JJCDText { get { return this.GetValRefTextByKey(ND1RptAttr.JJCD); } } #endregion #region 构造函数 /// /// 请假 /// public ND1Rpt() { } /// /// 请假 /// /// 工作ID public ND1Rpt(Int64 workid) { this.OID = workid; this.Retrieve(); } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("ND1Rpt", "工单信息"); #region 流程的基本字段 map.AddTBIntPKOID(); map.AddTBString(ND1RptAttr.Title, null, "标题", false, true, 0, 500, 10); map.AddTBString(ND1RptAttr.BillNo, null, "工单编号", false, true, 0, 50, 10); map.AddTBString(ND1RptAttr.FangJianHao, null, "房间号", false, true, 0, 50, 10); map.AddTBString(ND1RptAttr.GuZhangMiaoShu, null, "故障描述", false, true, 0, 50, 10); // map.AddDDLSysEnum(ND1RptAttr.WFState, 0, "状态", false, true, "WFState"); //map.AddTBInt(ND1RptAttr.FID, 0, "FID", false, true); //map.AddTBInt(ND1RptAttr.FlowDaySpan, 0, "跨度", false, true); //map.AddTBInt(ND1RptAttr.FlowEndNode, 0, "结束点", false, true); //map.AddTBString(ND1RptAttr.PrjName, null, "项目名称", false, true, 0, 50, 10); //map.AddTBString(ND1RptAttr.QiXianXianDing, null, "期限限定", false, true, 0, 50, 10); //map.AddDDLSysEnum(ND1RptAttr.JJCD, 0, "紧急程度", true, true, ND1RptAttr.JJCD, "@0=低,@1=中,@2=高"); //map.AddTBString(ND1RptAttr.TuZhiBianHao, null, "图纸编号", false, true, 0, 50, 10); //map.AddTBString(ND1RptAttr.TuZhiZhiTuRen, null, "图纸制图人", false, true, 0, 50, 10); //map.AddTBString(ND1RptAttr.ZhuangPeiFuZeRen, null, "装配负责人", false, true, 0, 50, 10); //map.AddTBString(ND1RptAttr.JianCeFuZeRen, null, "检测负责人", false, true, 0, 50, 10); //map.AddTBString(ND1RptAttr.FengZhuangRen, null, "封装人", false, true, 0, 50, 10); //map.AddTBInt(ND1RptAttr.PWorkID, 0, "父流程ID", false, true); //map.AddTBString(ND1RptAttr.FaHuoRen, null, "发货人", false, true, 0, 100, 10); #endregion 流程的基本字段 this._enMap = map; return this._enMap; } } #endregion } /// /// 工单s /// public class ND1Rpts : NDXRptBases { #region 微信客户。 /// /// 让客户直接登录. /// /// /// 执行结果 public string WeiXinStartByCustomer_Init() { BP.WF.Dev2Interface.Port_Login("zhoupeng"); return "登录成功."; } /// /// 接受表单的参数. /// /// @key1=val1@key2=val2 /// 执行结果 public string WeiXinStartByCustomer_Save(string paras) { //放到对象. BP.DA.AtPara ap = new DA.AtPara(paras); Hashtable ht = ap.HisHT; //获得存储数据. ht.Add("BaoXiuRen", BP.Web.WebUser.No); ht.Add("BaoXiuRenName", BP.Web.WebUser.Name); //创建workid. Int64 workid = BP.WF.Dev2Interface.Node_CreateBlankWork("001"); //发送给客服,让客服分配任务. BP.WF.Dev2Interface.Node_SendWork("001", workid, ht, 110, null); return "流程发起成功."; } #endregion 微信客户。 #region 工程师。 /// /// 接受表单的参数. /// /// @key1=val1@key2=val2 /// 执行结果 public string WeiXinStartByWorker_Save(string paras) { //放到对象. BP.DA.AtPara ap = new DA.AtPara(paras); Hashtable ht = ap.HisHT; //获得存储数据. ht.Add("BaoXiuRen", BP.Web.WebUser.No); ht.Add("BaoXiuRenName", BP.Web.WebUser.Name); //创建workid. Int64 workid = BP.WF.Dev2Interface.Node_CreateBlankWork("001"); //求出自己的组长. string sql = "SELECT FK_Emp FROM Port_DeptEmpStation WHERE FK_Dept='" + BP.Web.WebUser.FK_Dept + "' AND FK_Station='1122'"; string leaderNo = BP.DA.DBAccess.RunSQLReturnString(sql); //发送给本部门的领导去分配工作. BP.WF.Dev2Interface.Node_SendWork("001", workid, ht, 102, leaderNo); BP.Port.Emp emp = new Port.Emp(leaderNo); return "流程发起成功,已经报审给:." + emp.Name + "。"; } #endregion 微信客户。 #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new ND1Rpt(); } } /// /// 请假s /// public ND1Rpts() { } #endregion } }