|  | @@ -746,7 +746,7 @@ void CResistAlarmMng::InsertToDBByMove(string mo, string mp, time_t show_time, t
 | 
	
		
			
				|  |  |  	auto strStartTime = start_time ? CTime(start_time).Format("%Y-%m-%d %H:%M:%S") : "";
 | 
	
		
			
				|  |  |  	auto strEndTime = end_time ? CTime(end_time).Format("%Y-%m-%d %H:%M:%S") : "";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	CString sql = fmt::format("INSERT INTO {} (mo,mp,show_time,start_time,end_time,curr_val,show_val,idx,posi,[type],sunroof,mark) values ('{}', '{}', '{}', '{}','{}', {}, {}, {}, {}, {}, {}, '{}');",
 | 
	
		
			
				|  |  | +	CString sql = fmt::format("INSERT INTO {} (mo,mp,show_time,start_time,end_time,curr_val,show_val,idx,posi,type,sunroof,mark) values ('{}', '{}', '{}', '{}','{}', {}, {}, {}, {}, {}, {}, '{}');",
 | 
	
		
			
				|  |  |  		table_name, mo, mp, strShowTime, strStartTime, strEndTime, curr_val, show_val, idx, posi, type, sunroof, mark).c_str();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	if (CDBConnectPool::Instance()->DBExecuteSQL(sql) == FALSE)
 | 
	
	
		
			
				|  | @@ -1132,6 +1132,176 @@ void CResistAlarmMng::JudgeAlarm(CResistAlarmMng* pService, CONVERT_RESIST_OVER_
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +void CResistAlarmMng::JudgeAlarm(CResistAlarmMng* pService, FRICTION_OVER_LIMIT_INFO* pAlarmSet, time_t show_time, int show_val, eDaoChaPosi posi, eUpOrDownInfo eUpOrDown, void* pMoMpInfo)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	if (pAlarmSet == nullptr || pAlarmSet->enable == false) return;
 | 
	
		
			
				|  |  | +	auto pInfo = (ST_MOMP_INFO*)pMoMpInfo;
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	bool bNew = false;
 | 
	
		
			
				|  |  | +	ALARM_INFO* pAlarmInfo = nullptr;
 | 
	
		
			
				|  |  | +	bool bAlarm = false, bWarn = false; int alarm_value = show_val, alarm_refer; time_t alarm_time = show_time;
 | 
	
		
			
				|  |  | +	CTime ctAlarmTime = CTime(alarm_time / 1000);
 | 
	
		
			
				|  |  | +	eLowHigh loworhigh = eLowHigh::LH_UNKNOWN; //0:最小值  1:最大值
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		if (show_val >= pAlarmSet->up_alarm_low_limit)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			bAlarm = true;
 | 
	
		
			
				|  |  | +			alarm_refer = pAlarmSet->up_alarm_low_limit;
 | 
	
		
			
				|  |  | +			alarm_value = show_val;
 | 
	
		
			
				|  |  | +			loworhigh = eLowHigh::LH_HIGH;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		else if (show_val <= pAlarmSet->dw_alarm_high_limit)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			bAlarm = true;
 | 
	
		
			
				|  |  | +			alarm_refer = pAlarmSet->dw_alarm_high_limit;
 | 
	
		
			
				|  |  | +			alarm_value = show_val;
 | 
	
		
			
				|  |  | +			loworhigh = eLowHigh::LH_LOW;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		else if (show_val >= pAlarmSet->up_warn_low_limit)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			bWarn = true;
 | 
	
		
			
				|  |  | +			alarm_refer = pAlarmSet->up_warn_low_limit;
 | 
	
		
			
				|  |  | +			alarm_value = show_val;
 | 
	
		
			
				|  |  | +			loworhigh = eLowHigh::LH_HIGH;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		else if (show_val <= pAlarmSet->dw_warn_high_limit)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			bWarn = true;
 | 
	
		
			
				|  |  | +			alarm_refer = pAlarmSet->dw_warn_high_limit;
 | 
	
		
			
				|  |  | +			alarm_value = show_val;
 | 
	
		
			
				|  |  | +			loworhigh = eLowHigh::LH_LOW;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		if (bAlarm == false && bWarn == false)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			{
 | 
	
		
			
				|  |  | +				std::lock_guard<mutex> lock(pService->m_mtxAlarm);
 | 
	
		
			
				|  |  | +				for (auto it = pService->m_lstUnConfirmAlarm.begin(); it != pService->m_lstUnConfirmAlarm.end();)
 | 
	
		
			
				|  |  | +				{
 | 
	
		
			
				|  |  | +					auto alarm = *it;
 | 
	
		
			
				|  |  | +					if (alarm->no == 2 && alarm->type == pAlarmSet->type //预警和报警单独计算  //
 | 
	
		
			
				|  |  | +						&& alarm->posi == posi && alarm->recoveryTime.wYear < 2000
 | 
	
		
			
				|  |  | +						&& alarm->mo.compare(pInfo->mo) == 0 && alarm->mp.compare(pInfo->mp) == 0) //跟上次报警时间超过1小时,则算新报警
 | 
	
		
			
				|  |  | +					{
 | 
	
		
			
				|  |  | +						pAlarmInfo = alarm;
 | 
	
		
			
				|  |  | +						if (pAlarmInfo)
 | 
	
		
			
				|  |  | +						{
 | 
	
		
			
				|  |  | +							//恢复
 | 
	
		
			
				|  |  | +							//1. 更新数据库
 | 
	
		
			
				|  |  | +							//2. 更新内存数据
 | 
	
		
			
				|  |  | +							//3. 上送恢复消息
 | 
	
		
			
				|  |  | +							if (ctAlarmTime.GetTime() == 0) ctAlarmTime = CTime::GetCurrentTime();
 | 
	
		
			
				|  |  | +							string recovery_time = ctAlarmTime.Format("%Y-%m-%d %H:%M:%S");
 | 
	
		
			
				|  |  | +							CString sql;
 | 
	
		
			
				|  |  | +							sql.Format("UPDATE rm_alarm SET recovery_time='%s' WHERE ID = %d;", recovery_time.c_str(), pAlarmInfo->id);
 | 
	
		
			
				|  |  | +							CDBConnectPool::Instance()->DBExecuteSQL(sql);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +							if (pAlarmInfo->ack_result == 1)
 | 
	
		
			
				|  |  | +							{
 | 
	
		
			
				|  |  | +								it = pService->m_lstUnConfirmAlarm.erase(it);
 | 
	
		
			
				|  |  | +								continue;
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +							else
 | 
	
		
			
				|  |  | +							{
 | 
	
		
			
				|  |  | +								ctAlarmTime.GetAsSystemTime(alarm->recoveryTime);
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +							g_p315ClientManager->GetTcpClient()->SendAlarmData(alarm->zzjno, 2, CTime(pAlarmInfo->time).GetTime(), alarm_time / 1000,
 | 
	
		
			
				|  |  | +								pAlarmInfo->type, posi, pAlarmInfo->level, loworhigh,
 | 
	
		
			
				|  |  | +								TIEDA_ACQ_VALUE(alarm->val, TIEDA_VAL_STATE::TVS_MOVEING), TIEDA_ACQ_VALUE(alarm->refer_val, TIEDA_VAL_STATE::TVS_MOVEING), 0);
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					++it;
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			return;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		//查找是否原有的报警已存在
 | 
	
		
			
				|  |  | +		uint8_t level = 0;
 | 
	
		
			
				|  |  | +		if (bAlarm) level = 1;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			std::lock_guard<mutex> lock(pService->m_mtxAlarm);
 | 
	
		
			
				|  |  | +			for (const auto& alarm : pService->m_lstUnConfirmAlarm)
 | 
	
		
			
				|  |  | +			{
 | 
	
		
			
				|  |  | +				if (alarm->no == 2 && alarm->type == pAlarmSet->type && level == alarm->level && alarm->recoveryTime.wYear < 2000 //预警和报警单独计算
 | 
	
		
			
				|  |  | +					&& alarm->mo.compare(pInfo->mo) == 0 && alarm->mp.compare(pInfo->mp) == 0)
 | 
	
		
			
				|  |  | +				{
 | 
	
		
			
				|  |  | +					pAlarmInfo = alarm;
 | 
	
		
			
				|  |  | +					break;
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		ALARM_INFO* pNewAlarmInfo = nullptr;
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			bNew = true;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo = new ALARM_INFO;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->event_id = hjfunc_GetGUID();
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->rel_id = pAlarmInfo ? pAlarmInfo->event_id : "";
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->id = ++pService->m_nAlarmID;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->level = (bAlarm == 1);
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->mo = pInfo->mo;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->mp = pInfo->mp;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->no = 2;
 | 
	
		
			
				|  |  | +			ctAlarmTime.GetAsSystemTime(pNewAlarmInfo->time);
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->time.wMilliseconds = alarm_time % 1000;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->type = pAlarmSet->type;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->val = alarm_value;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->refer_val = alarm_refer;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->posi = posi;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->zzjno = pInfo->zzjno;
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->sunroof = CSkylightMng::GetInstance()->IsSkylight(&pNewAlarmInfo->time);
 | 
	
		
			
				|  |  | +			char szInfo[200] = { 0 };
 | 
	
		
			
				|  |  | +			sprintf_s(szInfo, sizeof(szInfo), "摩擦力稳态值%s超限,报警值为%dN, 参考值为%dN",
 | 
	
		
			
				|  |  | +				loworhigh == eLowHigh::LH_LOW ? "下" : "上", alarm_value, alarm_refer);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			pNewAlarmInfo->desc = szInfo;
 | 
	
		
			
				|  |  | +			lock_guard<mutex> lock(pService->m_mtxAlarm);
 | 
	
		
			
				|  |  | +			pService->m_lstUnConfirmAlarm.push_back(pNewAlarmInfo);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		//send
 | 
	
		
			
				|  |  | +		if (bNew) //不再推送
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			rapidjson::StringBuffer buffer;
 | 
	
		
			
				|  |  | +			auto ret = AlarmInfo2Pack(pNewAlarmInfo, buffer);
 | 
	
		
			
				|  |  | +			const char* output = buffer.GetString();
 | 
	
		
			
				|  |  | +			CAppService::Instance()->GetMgServer()->SendToAllClient(output, buffer.GetLength());
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		//主动推送315
 | 
	
		
			
				|  |  | +		if (bNew)
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			g_p315ClientManager->GetTcpClient()->SendAlarmData(pNewAlarmInfo->zzjno, 1, CTime(pNewAlarmInfo->time).GetTime(), 0xFFFFFFFF,
 | 
	
		
			
				|  |  | +				pNewAlarmInfo->type, posi, pNewAlarmInfo->level, loworhigh,
 | 
	
		
			
				|  |  | +				TIEDA_ACQ_VALUE(alarm_value, TIEDA_VAL_STATE::TVS_MOVEING), TIEDA_ACQ_VALUE(alarm_refer, TIEDA_VAL_STATE::TVS_MOVEING), 0);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		//save
 | 
	
		
			
				|  |  | +		{
 | 
	
		
			
				|  |  | +			CString sql;
 | 
	
		
			
				|  |  | +			sql.Format("INSERT INTO [rm_alarm]([ID],[mo],[mp],[no],[type],[occur_time],[level],[desc],[suggest],[val],[event_id],[rel_id],posi,loworhigh,referval,[sunroof]) "\
 | 
	
		
			
				|  |  | +				"VALUES(%d, '%s', '%s', %d, %d, '%s', %d, '%s', '%s', %d, '%s', '%s',%d,%d,%d,%d);",
 | 
	
		
			
				|  |  | +				pNewAlarmInfo->id, pNewAlarmInfo->mo.c_str(), pNewAlarmInfo->mp.c_str(), pNewAlarmInfo->no, pNewAlarmInfo->type,
 | 
	
		
			
				|  |  | +				ctAlarmTime.Format("%Y-%m-%d %H:%M:%S"), pNewAlarmInfo->level, pNewAlarmInfo->desc.c_str(), pNewAlarmInfo->suggest.c_str(), pNewAlarmInfo->val,
 | 
	
		
			
				|  |  | +				pNewAlarmInfo->event_id.c_str(), pNewAlarmInfo->rel_id.c_str(), uint8_t(pNewAlarmInfo->posi), uint8_t(pNewAlarmInfo->loworhigh), pNewAlarmInfo->refer_val,
 | 
	
		
			
				|  |  | +				pNewAlarmInfo->sunroof);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +			if (false == CDBConnectPool::Instance()->DBExecuteSQL(sql))
 | 
	
		
			
				|  |  | +				CSimpleLog::Error("执行语句失败" + sql);
 | 
	
		
			
				|  |  | +			else
 | 
	
		
			
				|  |  | +			{
 | 
	
		
			
				|  |  | +				uint8_t* pack = nullptr; int len = 0;
 | 
	
		
			
				|  |  | +				auto packno = CResistAlarmMng::GeneralNewAlarmData(pNewAlarmInfo, &pack, &len);
 | 
	
		
			
				|  |  | +				if (packno) CSuperManager::Instance()->SendPack(pack, len, packno, E_ZL_PROTOCAL::ZL_ALARM_DATA, true);
 | 
	
		
			
				|  |  | +				delete[] pack;
 | 
	
		
			
				|  |  | +				pack = nullptr;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  void CResistAlarmMng::JudgeAlarm2(CResistAlarmMng* pService, RETENSION_FORCE_DROP* pRetensionForceDropInfo, time_t show_time, int show_val, eSuoBiPosi posi, string mo, string mp, uint32_t zzjno)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |  	if (pRetensionForceDropInfo == nullptr || pRetensionForceDropInfo->enable == false) return;
 | 
	
	
		
			
				|  | @@ -1701,7 +1871,7 @@ void CResistAlarmMng::ThreadProcAlarmSet(DWORD_PTR param)
 | 
	
		
			
				|  |  |  		{
 | 
	
		
			
				|  |  |  			if (item.second == nullptr) continue;
 | 
	
		
			
				|  |  |  			if (item.second->enable == false) continue;
 | 
	
		
			
				|  |  | -			if (item.second->type != eZL_ALARMTYPE::MAX_OVER_LIMIT && item.second->type != eZL_ALARMTYPE::FRICTION_OVER_LIMIT) //这个逻辑里面只支持这两种
 | 
	
		
			
				|  |  | +			if (item.second->type != eZL_ALARMTYPE::MAX_OVER_LIMIT) //这个逻辑里面只支持这两种
 | 
	
		
			
				|  |  |  				continue;
 | 
	
		
			
				|  |  |  			if (item.second->no < 0 || item.second->no > 2) continue;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1928,6 +2098,7 @@ void CResistAlarmMng::ThreadProcAlarmSet(DWORD_PTR param)
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +				/* 2024年8月24日 放在move中判断
 | 
	
		
			
				|  |  |  				else if (item.second->type == eZL_ALARMTYPE::FRICTION_OVER_LIMIT)
 | 
	
		
			
				|  |  |  				{
 | 
	
		
			
				|  |  |  				auto pInfo = (FRICTION_OVER_LIMIT_INFO*)item.second;
 | 
	
	
		
			
				|  | @@ -2139,7 +2310,7 @@ void CResistAlarmMng::ThreadProcAlarmSet(DWORD_PTR param)
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | +				}*/
 | 
	
		
			
				|  |  |  				else
 | 
	
		
			
				|  |  |  				{
 | 
	
		
			
				|  |  |  					//其他未实现
 | 
	
	
		
			
				|  | @@ -2859,6 +3030,7 @@ void CResistAlarmMng::ThreadProcMove(DWORD_PTR param)
 | 
	
		
			
				|  |  |  				SPDLOG_INFO("扳动判断数据{}.{} map:{} 0:{} 1:{} 2:{}", mo, mp, map2.size(), mapData[0]->size(), mapData[1]->size(), mapData[2]->size());
 | 
	
		
			
				|  |  |  				list<CONVERT_RESIST> lstResit2;   //转换力数据
 | 
	
		
			
				|  |  |  				list<PASS_RESIST> lstPass;   //过车数据
 | 
	
		
			
				|  |  | +				list<FRICTION_RESIST> lstFriction; //摩擦力数据
 | 
	
		
			
				|  |  |  				std::map<time_t, int64_t> maxlock0, maxlock1;//锁闭力 前面时间戳, 后面 高4位显示值,  低4位报警值
 | 
	
		
			
				|  |  |  				std::map<time_t, int64_t>  retentionforce0, retentionforce1; //保持力 时间戳,  高4位显示值, 低4位报警值
 | 
	
		
			
				|  |  |  				mg_per_session_data::GetMaxResistNew(map2, lstResit2, mo, mp);
 | 
	
	
		
			
				|  | @@ -2881,6 +3053,42 @@ void CResistAlarmMng::ThreadProcMove(DWORD_PTR param)
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +				//摩擦力过滤
 | 
	
		
			
				|  |  | +				for (auto it = lstResit2.begin(); it != lstResit2.end();)
 | 
	
		
			
				|  |  | +				{
 | 
	
		
			
				|  |  | +					int first_value = 0, last_value = 0;
 | 
	
		
			
				|  |  | +					auto ii = map2.find(it->tmStart);
 | 
	
		
			
				|  |  | +					ASSERT(ii != map2.end());
 | 
	
		
			
				|  |  | +					first_value = ii->second.first_val;
 | 
	
		
			
				|  |  | +					ii = map2.find(it->tmEnd);
 | 
	
		
			
				|  |  | +					if (ii == map2.end())
 | 
	
		
			
				|  |  | +						ii = map2.find(it->tmEnd - 1);
 | 
	
		
			
				|  |  | +					ASSERT(ii != map2.end());
 | 
	
		
			
				|  |  | +					last_value = ii->second.end_val;
 | 
	
		
			
				|  |  | +					auto dif = abs(last_value - first_value);
 | 
	
		
			
				|  |  | +					auto strLog = fmt::format("[摩擦力判断]{}  first:{}  last:{} dif:{}",
 | 
	
		
			
				|  |  | +						CTime(it->time / 1000).Format("%Y-%m-%d %H:%M:%S"), first_value, last_value, dif);
 | 
	
		
			
				|  |  | +					if (dif > 1000)
 | 
	
		
			
				|  |  | +					{
 | 
	
		
			
				|  |  | +						SPDLOG_INFO(strLog);
 | 
	
		
			
				|  |  | +						if (it->tmEnd - it->tmStart >= 4)
 | 
	
		
			
				|  |  | +						{
 | 
	
		
			
				|  |  | +							FRICTION_RESIST info;
 | 
	
		
			
				|  |  | +							info.peak_time = it->time;
 | 
	
		
			
				|  |  | +							info.peak_val = it->val;
 | 
	
		
			
				|  |  | +							info.show_time = it->time; //暂时赋值峰值
 | 
	
		
			
				|  |  | +							info.show_val = last_value;
 | 
	
		
			
				|  |  | +							info.tmStart = it->tmStart;
 | 
	
		
			
				|  |  | +							info.tmEnd = it->tmEnd;
 | 
	
		
			
				|  |  | +							info.t = strLog;
 | 
	
		
			
				|  |  | +							info.bUpOrDown = it->bUpOrDown;
 | 
	
		
			
				|  |  | +							lstFriction.emplace_back(info);
 | 
	
		
			
				|  |  | +						}
 | 
	
		
			
				|  |  | +						it = lstResit2.erase(it);
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +					else
 | 
	
		
			
				|  |  | +						++it;
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  |  				if (lstResit2.size())
 | 
	
		
			
				|  |  |  				{
 | 
	
		
			
				|  |  |  					mg_per_session_data::GetMaxLockNew(map0, lstResit2, maxlock0, retentionforce0);
 | 
	
	
		
			
				|  | @@ -3080,6 +3288,28 @@ void CResistAlarmMng::ThreadProcMove(DWORD_PTR param)
 | 
	
		
			
				|  |  |  					//SPDLOG_INFO("扳动判断数据结束{}.{} 315 上送", mo, mp);
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +				//摩檫力逻辑
 | 
	
		
			
				|  |  | +				if (lstFriction.size())
 | 
	
		
			
				|  |  | +				{
 | 
	
		
			
				|  |  | +					pMompInfo;
 | 
	
		
			
				|  |  | +					auto pAlarmSet = (FRICTION_OVER_LIMIT_INFO*)pService->Find(mo, mp, 2, eZL_ALARMTYPE::FRICTION_OVER_LIMIT);
 | 
	
		
			
				|  |  | +					auto mg_315_server = g_p315ClientManager->GetTcpClient();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +					for (auto& it : lstFriction)
 | 
	
		
			
				|  |  | +					{
 | 
	
		
			
				|  |  | +						CResistAlarmMng::InsertToDBByMove(mo, mp, it.peak_time, it.tmStart, it.tmEnd, it.peak_val, it.bUpOrDown == eUpOrDownInfo::UOD_DOWN ? -it.show_val :it.show_val, 2,
 | 
	
		
			
				|  |  | +							(uint8_t)eDaoChaPosi::DCP_UNKNOWN, (uint8_t)ePowerName::PN_FRICTION, fmt::format("稳态值:{}", it.show_val));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +						//CMonitorObjectMng::Instance()->UpdateZZJEPOS(mo + "." + mp, DAOCHA_POSITION::MP_QUARTO); //四开
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +						JudgeAlarm(pService, pAlarmSet, it.show_time, it.show_val, eDaoChaPosi::DCP_UNKNOWN, it.bUpOrDown, (void*)pMompInfo);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +						//发送315曲线数据
 | 
	
		
			
				|  |  | +						//if (mapData[0])
 | 
	
		
			
				|  |  | +						//	mg_315_server->SendCurveData(pMompInfo->zzjno, eDaoChaPosi::DCP_UNKNOWN, 1, true, mapData, it.tmStart, it.tmEnd);
 | 
	
		
			
				|  |  | +					}
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  				delete mapData[0];
 | 
	
		
			
				|  |  |  				delete mapData[1];
 | 
	
		
			
				|  |  |  				delete mapData[2];
 |