Exemplo n.º 1
0
        //处理不平衡度问题
        private void DealPH(PJ_11byqdydl rowData)
        {
            //负荷不平衡率大于15%走负荷调整子流程,(配变负荷调整记录表每一行走一遍负荷调整子流程)

           

            decimal max = (rowData.a > rowData.b ? rowData.a : rowData.b) > rowData.c ? (rowData.a > rowData.b ? rowData.a : rowData.b) : rowData.c;
            decimal min = (rowData.a < rowData.b ? rowData.a : rowData.b) < rowData.c ? (rowData.a < rowData.b ? rowData.a : rowData.b) : rowData.c;
            decimal per = 0;
            if (max > 0)
            {
                per = (max - min) * 100 / max;
            }
            rowData.bphd = (double)Math.Round(per, 1);

            PS_tqbyq byq = MainHelper.PlatformSqlMap.GetOneByKey<PS_tqbyq>(rowData.byqID);
            
            decimal dl = (rowData.a + rowData.b + rowData.c) / 3;

            // 最大负荷电流低于配变二次额定电流60%或最大负荷电流超过配变额定电流10%
            if (dl < byq.byqCurrentTwo * 0.6M || dl > byq.byqCurrentTwo*0.1M)
            {
                rowData.by1 = "1";
            }
            else
            {
                rowData.by1 = "0";
            }

            
        }
Exemplo n.º 2
0
 void gridViewOperation_AfterAdd(PJ_11byqdydl obj)
 {
     RefreshData(" where OrgCode='" + ParentID + "'  and byqID='" + PSObj.byqID + "'  order by id desc");
 }
Exemplo n.º 3
0
 /// <summary>
 /// 新建对象设置Key值
 /// </summary>
 /// <param name="newobj"></param>
 void gridViewOperation_CreatingObjectEvent(PJ_11byqdydl newobj)
 {
    
     if (PSObj == null || parentID == null)
     {
         return;
     }
     newobj.byqID = PSObj.byqID;
     newobj.OrgCode = parentID;
     newobj.OrgName = parentObj.OrgName;
     newobj.CreateDate = DateTime.Now;
     Ebada.Core.UserBase m_UserBase = MainHelper.ValidateLogin();
     newobj.CreateMan = m_UserBase.RealName;
     newobj.clrq = DateTime.Now;
 }