|
@@ -22,6 +22,7 @@
|
|
|
#include "module_service/module_mgr.h"
|
|
|
#include "visit.h"
|
|
|
#include "his_location.h"
|
|
|
+#include "three_rates.h"
|
|
|
|
|
|
extern config_file config;
|
|
|
//一张卡一个ct的所有不同天线的信息
|
|
@@ -202,8 +203,8 @@ struct card_area
|
|
|
struct person:card_location_base, card_area
|
|
|
{
|
|
|
std::weak_ptr<monkey_person> m_monkeyPerson;
|
|
|
- person(std::string type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,int32_t level_id)
|
|
|
- :card_location_base(type,cardid,needdisplay,t,deptid,level_id)
|
|
|
+ person(std::string type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,int32_t level_id,uint32_t cid)
|
|
|
+ :card_location_base(type,cardid,needdisplay,t,deptid,level_id,cid)
|
|
|
{
|
|
|
m_message_handle.reset(new card_message_handle(this));
|
|
|
m_his_location_card.reset(new location_staff(m_id,m_type));
|
|
@@ -251,6 +252,8 @@ struct person:card_location_base, card_area
|
|
|
{
|
|
|
m_area_tool->on_point(m_id,pt,m_speed,m_type);
|
|
|
m_site_area->on_point(m_id,0,this, m_type);
|
|
|
+ card_pos cp;
|
|
|
+ three_rates::get_instance()->put(cp);
|
|
|
}
|
|
|
void reset(std::shared_ptr<monkey_person> mp)
|
|
|
{
|
|
@@ -312,8 +315,8 @@ struct car:card_location_base,card_area
|
|
|
int m_vehicle_category_id=0;
|
|
|
int m_vehicle_type_id=0;
|
|
|
car(std::string type,uint32_t cardid,uint16_t needdisplay,int16_t t,int32_t deptid,
|
|
|
- int32_t categoryid, int type_id,int32_t level_id)
|
|
|
- :card_location_base(type,cardid,needdisplay,t,deptid,level_id)
|
|
|
+ int32_t categoryid, int type_id,int32_t level_id,uint32_t cid)
|
|
|
+ :card_location_base(type,cardid,needdisplay,t,deptid,level_id,cid)
|
|
|
,m_vehicle_category_id(categoryid)
|
|
|
,m_vehicle_type_id(type_id)
|
|
|
{
|
|
@@ -494,15 +497,15 @@ void card_list::init_staffer(int32_t id)
|
|
|
DBRes.GetField( "need_display",need_display, Error );
|
|
|
|
|
|
//for now;
|
|
|
- staff_id = vsid;
|
|
|
+ //staff_id = vsid;
|
|
|
|
|
|
if(-1 == id)
|
|
|
{
|
|
|
std::shared_ptr<card_location_base> clb =
|
|
|
- std::make_shared<person>(strategy,staff_id,need_display,card_type_id,dept_id,occupation_level_id);
|
|
|
+ std::make_shared<person>(strategy,vsid,need_display,card_type_id,dept_id,occupation_level_id,staff_id);
|
|
|
uint64_t cardid = getId(staff_id,type);
|
|
|
log_info("cardId:%llu,staff_id:%d dept_id:%d,need_display:%d--c-ard:%s",
|
|
|
- cardid,staff_id,dept_id,need_display,card_id.c_str());
|
|
|
+ cardid,vsid,dept_id,need_display,card_id.c_str());
|
|
|
map.insert({cardid,clb});
|
|
|
}
|
|
|
else
|
|
@@ -521,7 +524,7 @@ void card_list::init_staffer(int32_t id)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- auto clb = std::make_shared<person>(strategy,staff_id,need_display,card_type_id,dept_id,occupation_level_id);
|
|
|
+ auto clb = std::make_shared<person>(strategy,vsid,need_display,card_type_id,dept_id,occupation_level_id,staff_id);
|
|
|
card_list::instance()->add(card_id64, clb);
|
|
|
}
|
|
|
|
|
@@ -623,15 +626,15 @@ void card_list::init_vehicle(int32_t id)
|
|
|
DBRes.GetField( "over_speed",over_speed, Error );
|
|
|
|
|
|
//for now
|
|
|
- vehicle_id = vsid;
|
|
|
+ //vehicle_id = vsid;
|
|
|
|
|
|
if(-1 == id)
|
|
|
{
|
|
|
- auto clb = std::make_shared<car>(strategy,vehicle_id,need_display,card_type_id,
|
|
|
- dept_id,vehicle_category_id, vehicle_type_id,vehicle_level_id);
|
|
|
+ auto clb = std::make_shared<car>(strategy,vsid,need_display,card_type_id,
|
|
|
+ dept_id,vehicle_category_id, vehicle_type_id,vehicle_level_id,vehicle_id);
|
|
|
uint64_t cardid = getId(vehicle_id,type);
|
|
|
log_info("cardId:%llu,vehicle_id:%d dept_id:%d,need_display:%d---cardid:%s,categoryid:%d",
|
|
|
- cardid,vehicle_id,dept_id,need_display,card_id.c_str(),vehicle_category_id);
|
|
|
+ cardid,vsid,dept_id,need_display,card_id.c_str(),vehicle_category_id);
|
|
|
map.insert({cardid,clb});
|
|
|
}
|
|
|
else
|
|
@@ -649,15 +652,15 @@ void card_list::init_vehicle(int32_t id)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- auto clb = std::make_shared<car>(strategy,id,need_display,card_type_id,dept_id,
|
|
|
- vehicle_category_id, vehicle_type_id,vehicle_level_id);
|
|
|
+ auto clb = std::make_shared<car>(strategy,vsid,need_display,card_type_id,dept_id,
|
|
|
+ vehicle_category_id, vehicle_type_id,vehicle_level_id,vehicle_id);
|
|
|
card_list::instance()->add(card_id64, clb);
|
|
|
}
|
|
|
|
|
|
log_info("基础数据 增加或修改车卡成功:卡id:%d,卡type:%d dept_id:%d,need_display:%d,categoryid:%d",
|
|
|
- id,type,dept_id,need_display,vehicle_category_id);
|
|
|
+ vsid,type,dept_id,need_display,vehicle_category_id);
|
|
|
std_debug("基础数据 增加或修改车卡成功:卡id:%d,卡type:%d dept_id:%d,need_display:%d,categoryid:%d",
|
|
|
- id,type,dept_id,need_display,vehicle_category_id);
|
|
|
+ vsid,type,dept_id,need_display,vehicle_category_id);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1116,8 +1119,8 @@ void card_list::onTimer()
|
|
|
}
|
|
|
}
|
|
|
//-----------------card_location_base..
|
|
|
-card_location_base::card_location_base(std::string type,uint32_t id,uint16_t dis,int16_t t,int32_t deptid,int32_t level_id)
|
|
|
- :card(id,dis,t,deptid,level_id)
|
|
|
+card_location_base::card_location_base(std::string type,uint32_t id,uint16_t dis,int16_t t,int32_t deptid,int32_t level_id,uint32_t cid)
|
|
|
+ :card(id,dis,t,deptid,level_id,cid)
|
|
|
{
|
|
|
select_tool_manage::instance()->create_tool(type,m_sel_tool,m_smo_tool);
|
|
|
}
|
|
@@ -1141,7 +1144,6 @@ void card_location_base::on_location(const std::vector<point>&vp,const std::vect
|
|
|
y = pt.y;
|
|
|
|
|
|
Msg m;
|
|
|
-
|
|
|
m.type=m_type;m.x=(int)x;m.y=(int)y;m.cmd=CMD_HANDLE;m.cardid=m_type<<32|m_id;
|
|
|
cardMgr::instance()->tryPut(m);
|
|
|
|