Browse Source

20240131, apply

huli 1 year ago
parent
commit
7d1c9ba469

+ 2 - 2
plc调度节点/dispatch/dispatch_command.cpp

@@ -2720,7 +2720,7 @@ Error_manager Dispatch_command::update_parkspace_clear_apply_car_number(std::str
 	char update_space_sql[DB_SQL_SIZE];
 	memset(update_space_sql, 0, DB_SQL_SIZE);
 	//int t_statu = 2; //车位状态, 0空闲, 1预约, 2占有, 3锁定, 6入口, 7出口, 10故障
-	sprintf(update_space_sql, "update space set car_number = null, primary_key = null, statu = %d, space_info = null, measure_buffer = null where car_number = '%s' and statu=5 ",
+	sprintf(update_space_sql, "update space set car_number = null, primary_key = null, statu = %d, space_info = null, measure_buffer = null, apply_end_time = null where car_number = '%s' and statu=5 ",
 			statu,
 			apply_car_number.c_str());
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_update(update_space_sql);
@@ -2733,7 +2733,7 @@ Error_manager Dispatch_command::update_parkspace_clear_apply_end_time(std::strin
 	char update_space_sql[DB_SQL_SIZE];
 	memset(update_space_sql, 0, DB_SQL_SIZE);
 	//int t_statu = 2; //车位状态, 0空闲, 1预约, 2占有, 3锁定, 6入口, 7出口, 10故障
-	sprintf(update_space_sql, "update space set car_number = null, primary_key = null, statu = %d, space_info = null, measure_buffer = null where apply_end_time < '%s' and statu=5 ",
+	sprintf(update_space_sql, "update space set car_number = null, primary_key = null, statu = %d, space_info = null, measure_buffer = null, apply_end_time = null where apply_end_time < '%s' and statu=5 ",
 			statu,
 			apply_end_time.c_str());
 	Error_manager ec = Database_controller::get_instance_pointer()->sql_update(update_space_sql);

+ 35 - 26
plc调度节点/dispatch/dispatch_manager.cpp

@@ -548,38 +548,47 @@ Error_manager Dispatch_manager::execute_rabbitmq_message_new(Rabbitmq_message* p
 			//need
 			LOG(INFO) << " t_apply_table =  " << t_apply_table.DebugString() << " --- " << this;
 
-			//sdfsdfsdfsdf
-
-			int t_height_level = 0;
-			int t_wheel_base_level = 0;
-			t_error = m_dispatch_command.query_record_for_level(t_apply_table.car_number(), t_height_level,
-																t_wheel_base_level);
-			if (t_height_level == 0)
-			{
-				t_height_level = 2;
-			}
-			if (t_wheel_base_level == 0)
+			//新增预约车位
+			if ( t_apply_table.operation_type() == 0 )
 			{
-				t_wheel_base_level = 9;
-			}
+			    //查询历史记录,获取轴距和车高
+				int t_height_level = 0;
+				int t_wheel_base_level = 0;
+				t_error = m_dispatch_command.query_record_for_level(t_apply_table.car_number(), t_height_level,
+																	t_wheel_base_level);
+				if (t_height_level == 0)
+				{
+					t_height_level = 2;
+				}
+				if (t_wheel_base_level == 0)
+				{
+					t_wheel_base_level = 9;
+				}
 
 
-			Dispatch_command::Dispatch_space_info t_dispatch_space_info;
-			//20230709, 存车指令入队前,要查重.
-			t_error = m_dispatch_command.check_dispatch_space_for_car_number_by_apply(t_apply_table.car_number());
-			if (t_error != Error_code::SUCCESS)//没查到就走正常的存车流程
-			{
-				//查询空闲车位最优解,    存车指令 根据调度指令最优解 获取 空闲车位最优解
-				t_error = m_dispatch_command.query_dispatch_space_optimal_ex(t_height_level,
-																			 t_wheel_base_level,
-																			 t_dispatch_space_info);
+				Dispatch_command::Dispatch_space_info t_dispatch_space_info;
+				//20230709, 存车指令入队前,要查重.
+				t_error = m_dispatch_command.check_dispatch_space_for_car_number_by_apply(t_apply_table.car_number());
+				if (t_error != Error_code::SUCCESS)//没查到就走正常的存车流程
+				{
+					//查询空闲车位最优解,    存车指令 根据调度指令最优解 获取 空闲车位最优解
+					t_error = m_dispatch_command.query_dispatch_space_optimal_ex(t_height_level,
+																				 t_wheel_base_level,
+																				 t_dispatch_space_info);
 
-				//更新 车位状态, 根据车位ID 写入车牌号即可//更新 车位状态,  存车排队预约车位
-				m_dispatch_command.update_parkspace_write_car_number(t_apply_table, t_dispatch_space_info, 5);
+					//更新 车位状态, 根据车位ID 写入车牌号即可//更新 车位状态,  存车排队预约车位
+					m_dispatch_command.update_parkspace_write_car_number(t_apply_table, t_dispatch_space_info, 5);
+				}
+				else
+				{
+					LOG(INFO) << " apply repeat xx = " << t_error.to_string() << this;
+				}
 			}
-			else
+			//取消预约车位
+			else if ( t_apply_table.operation_type() == 1 )
 			{
-				LOG(INFO) << " apply repeat xx = " << t_error.to_string() << this;
+				//删除车牌预约信息,按车牌
+				m_dispatch_command.update_parkspace_clear_apply_car_number(t_apply_table.car_number(), 0);
 			}
 		}
 		System_communication::get_instance_references().ack_msg(p_msg);

+ 110 - 70
plc调度节点/message/message.pb.cc

@@ -425,6 +425,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _weak_field_map_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::apply_table, car_number_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::apply_table, apply_end_time_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::apply_table, operation_type_),
   ~0u,  // no _has_bits_
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::pick_table, _internal_metadata_),
   ~0u,  // no _extensions_
@@ -529,15 +530,15 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROT
   { 38, -1, sizeof(::plate_number_info)},
   { 50, -1, sizeof(::park_table)},
   { 67, -1, sizeof(::apply_table)},
-  { 74, -1, sizeof(::pick_table)},
-  { 90, -1, sizeof(::out_mcpu_statu)},
-  { 97, -1, sizeof(::in_mcpu_statu)},
-  { 106, -1, sizeof(::measure_buffer)},
-  { 114, -1, sizeof(::dispatch_plc_passway_status)},
-  { 128, -1, sizeof(::dispatch_node_statu)},
-  { 147, -1, sizeof(::terminal_node_statu)},
-  { 155, -1, sizeof(::Clamp_lidar_info)},
-  { 164, -1, sizeof(::Clamp_lidar_buffer)},
+  { 75, -1, sizeof(::pick_table)},
+  { 91, -1, sizeof(::out_mcpu_statu)},
+  { 98, -1, sizeof(::in_mcpu_statu)},
+  { 107, -1, sizeof(::measure_buffer)},
+  { 115, -1, sizeof(::dispatch_plc_passway_status)},
+  { 129, -1, sizeof(::dispatch_node_statu)},
+  { 148, -1, sizeof(::terminal_node_statu)},
+  { 156, -1, sizeof(::Clamp_lidar_info)},
+  { 165, -1, sizeof(::Clamp_lidar_buffer)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -606,70 +607,70 @@ void AddDescriptorsImpl() {
       ".\n\025actually_measure_info\030\t \001(\0132\017.measure"
       "_buffer\022,\n\023actually_space_info\030\n \001(\0132\017.p"
       "arkspace_info\022\021\n\timport_id\030\013 \001(\005\022+\n\017car_"
-      "number_info\030\014 \001(\0132\022.plate_number_info\"9\n"
+      "number_info\030\014 \001(\0132\022.plate_number_info\"Q\n"
       "\013apply_table\022\022\n\ncar_number\030\001 \001(\t\022\026\n\016appl"
-      "y_end_time\030\002 \001(\t\"\273\002\n\npick_table\022\033\n\005statu"
-      "\030\001 \001(\0132\014.table_statu\022\020\n\010queue_id\030\002 \001(\005\022\022"
-      "\n\ncar_number\030\003 \001(\t\022\017\n\007unit_id\030\004 \001(\005\022\023\n\013t"
-      "erminal_id\030\005 \001(\005\022\023\n\013primary_key\030\006 \001(\t\022,\n"
-      "\023actually_space_info\030\007 \001(\0132\017.parkspace_i"
-      "nfo\022.\n\025actually_measure_info\030\010 \001(\0132\017.mea"
-      "sure_buffer\022\021\n\texport_id\030\t \001(\005\022\021\n\tis_lea"
-      "ved\030\n \001(\010\022+\n\017car_number_info\030\013 \001(\0132\022.pla"
-      "te_number_info\"<\n\016out_mcpu_statu\022\022\n\ndoor"
-      "_statu\030\001 \001(\005\022\026\n\016outside_safety\030\002 \001(\005\"X\n\r"
-      "in_mcpu_statu\022\022\n\ndoor_statu\030\001 \001(\005\022\017\n\007bac"
-      "k_io\030\002 \001(\005\022\021\n\tis_occupy\030\003 \001(\005\022\017\n\007heighth"
-      "\030\004 \001(\005\"\251\001\n\016measure_buffer\0222\n\033measure_inf"
-      "o_to_plc_forward\030\001 \001(\0132\r.measure_info\0222\n"
-      "\033measure_info_to_plc_reverse\030\002 \001(\0132\r.mea"
-      "sure_info\022/\n\030measure_info_to_terminal\030\003 "
-      "\001(\0132\r.measure_info\"\376\001\n\033dispatch_plc_pass"
-      "way_status\022\022\n\ncar_height\030\001 \001(\005\022\033\n\023outsid"
-      "e_door_status\030\002 \001(\005\022\032\n\022inside_door_statu"
-      "s\030\003 \001(\005\022\030\n\020comb_body_status\030\004 \001(\005\022\033\n\023tur"
-      "nplate_angle_min\030\005 \001(\002\022\033\n\023turnplate_angl"
-      "e_max\030\006 \001(\002\022\020\n\010sensor_1\030\007 \001(\005\022\020\n\010sensor_"
-      "2\030\010 \001(\005\022\032\n\022plc_passway_enable\030\t \001(\005\"\321\003\n\023"
-      "dispatch_node_statu\022\034\n\005statu\030\001 \001(\0162\r.Car"
-      "rierStatu\022\027\n\017idle_stop_floor\030\002 \001(\005\022&\n\021ru"
-      "nning_pack_info\030\003 \001(\0132\013.park_table\022&\n\021ru"
-      "nning_pick_info\030\004 \001(\0132\013.pick_table\022\017\n\007un"
-      "it_id\030\005 \001(\005\022\025\n\rplc_heartbeat\030\006 \001(\005\022\027\n\017pl"
-      "c_mode_status\030\007 \001(\005\022\032\n\022plc_passway_statu"
-      "s\030\010 \001(\005\022\032\n\022plc_carrier_status\030\t \001(\005\022\032\n\022p"
-      "lc_inlet_1_status\030\n \001(\005\022\032\n\022plc_inlet_2_s"
-      "tatus\030\013 \001(\005\022\033\n\023plc_outlet_3_status\030\014 \001(\005"
-      "\022\033\n\023plc_outlet_4_status\030\r \001(\005\022H\n\"dispatc"
-      "h_plc_passway_status_vector\030\016 \003(\0132\034.disp"
-      "atch_plc_passway_status\"Q\n\023terminal_node"
-      "_statu\022\023\n\013terminal_id\030\001 \001(\005\022\021\n\timport_id"
-      "\030\002 \001(\005\022\022\n\ncar_number\030\003 \001(\t\"j\n\020Clamp_lida"
-      "r_info\022\026\n\016has_wheel_flag\030\001 \001(\005\022\022\n\ndistan"
-      "ce_y\030\002 \001(\002\022\022\n\ndistance_x\030\003 \001(\002\022\026\n\016has_cl"
-      "amp_flag\030\004 \001(\005\"H\n\022Clamp_lidar_buffer\0222\n\027"
-      "clamp_lidar_info_vector\030\001 \003(\0132\021.Clamp_li"
-      "dar_info*\241\002\n\014Range_status\022\021\n\rRange_corre"
-      "ct\020\000\022\017\n\013Range_front\020\001\022\016\n\nRange_back\020\002\022\016\n"
-      "\nRange_left\020\004\022\017\n\013Range_right\020\010\022\020\n\014Range_"
-      "bottom\020\020\022\r\n\tRange_top\020 \022\023\n\017Range_car_wid"
-      "th\020@\022\030\n\023Range_car_wheelbase\020\200\001\022\033\n\026Range_"
-      "angle_anti_clock\020\200\002\022\026\n\021Range_angle_clock"
-      "\020\200\004\022 \n\033Range_steering_wheel_nozero\020\200\010\022\025\n"
-      "\020Range_car_moving\020\200\020*\254\001\n\014MeasureStatu\022\016\n"
-      "\nMeasure_OK\020\000\022\030\n\024Measure_Empty_Clouds\020\001\022"
-      "\024\n\020Measure_Failture\020\002\022\022\n\016Measure_Border\020"
-      "\003\022\033\n\027Measure_Terminal_Border\020\004\022\024\n\020Lidar_"
-      "Disconnect\020\005\022\025\n\021Measure_Statu_Max\020\006*=\n\005S"
-      "TATU\022\013\n\007eNormal\020\000\022\014\n\010eWarning\020\001\022\n\n\006eErro"
-      "r\020\002\022\r\n\teCritical\020\003*_\n\022Table_process_mode"
-      "\022\022\n\016PROCESS_NORMAL\020\000\022\034\n\030PROCESS_ONLY_TO_"
-      "DISPATCH\020\001\022\027\n\023PROCESS_ONLY_TO_PAY\020\002*0\n\014C"
-      "arrierStatu\022\t\n\005eIdle\020\000\022\t\n\005eBusy\020\001\022\n\n\006eFa"
-      "ult\020\002b\006proto3"
+      "y_end_time\030\002 \001(\t\022\026\n\016operation_type\030\003 \001(\005"
+      "\"\273\002\n\npick_table\022\033\n\005statu\030\001 \001(\0132\014.table_s"
+      "tatu\022\020\n\010queue_id\030\002 \001(\005\022\022\n\ncar_number\030\003 \001"
+      "(\t\022\017\n\007unit_id\030\004 \001(\005\022\023\n\013terminal_id\030\005 \001(\005"
+      "\022\023\n\013primary_key\030\006 \001(\t\022,\n\023actually_space_"
+      "info\030\007 \001(\0132\017.parkspace_info\022.\n\025actually_"
+      "measure_info\030\010 \001(\0132\017.measure_buffer\022\021\n\te"
+      "xport_id\030\t \001(\005\022\021\n\tis_leaved\030\n \001(\010\022+\n\017car"
+      "_number_info\030\013 \001(\0132\022.plate_number_info\"<"
+      "\n\016out_mcpu_statu\022\022\n\ndoor_statu\030\001 \001(\005\022\026\n\016"
+      "outside_safety\030\002 \001(\005\"X\n\rin_mcpu_statu\022\022\n"
+      "\ndoor_statu\030\001 \001(\005\022\017\n\007back_io\030\002 \001(\005\022\021\n\tis"
+      "_occupy\030\003 \001(\005\022\017\n\007heighth\030\004 \001(\005\"\251\001\n\016measu"
+      "re_buffer\0222\n\033measure_info_to_plc_forward"
+      "\030\001 \001(\0132\r.measure_info\0222\n\033measure_info_to"
+      "_plc_reverse\030\002 \001(\0132\r.measure_info\022/\n\030mea"
+      "sure_info_to_terminal\030\003 \001(\0132\r.measure_in"
+      "fo\"\376\001\n\033dispatch_plc_passway_status\022\022\n\nca"
+      "r_height\030\001 \001(\005\022\033\n\023outside_door_status\030\002 "
+      "\001(\005\022\032\n\022inside_door_status\030\003 \001(\005\022\030\n\020comb_"
+      "body_status\030\004 \001(\005\022\033\n\023turnplate_angle_min"
+      "\030\005 \001(\002\022\033\n\023turnplate_angle_max\030\006 \001(\002\022\020\n\010s"
+      "ensor_1\030\007 \001(\005\022\020\n\010sensor_2\030\010 \001(\005\022\032\n\022plc_p"
+      "assway_enable\030\t \001(\005\"\321\003\n\023dispatch_node_st"
+      "atu\022\034\n\005statu\030\001 \001(\0162\r.CarrierStatu\022\027\n\017idl"
+      "e_stop_floor\030\002 \001(\005\022&\n\021running_pack_info\030"
+      "\003 \001(\0132\013.park_table\022&\n\021running_pick_info\030"
+      "\004 \001(\0132\013.pick_table\022\017\n\007unit_id\030\005 \001(\005\022\025\n\rp"
+      "lc_heartbeat\030\006 \001(\005\022\027\n\017plc_mode_status\030\007 "
+      "\001(\005\022\032\n\022plc_passway_status\030\010 \001(\005\022\032\n\022plc_c"
+      "arrier_status\030\t \001(\005\022\032\n\022plc_inlet_1_statu"
+      "s\030\n \001(\005\022\032\n\022plc_inlet_2_status\030\013 \001(\005\022\033\n\023p"
+      "lc_outlet_3_status\030\014 \001(\005\022\033\n\023plc_outlet_4"
+      "_status\030\r \001(\005\022H\n\"dispatch_plc_passway_st"
+      "atus_vector\030\016 \003(\0132\034.dispatch_plc_passway"
+      "_status\"Q\n\023terminal_node_statu\022\023\n\013termin"
+      "al_id\030\001 \001(\005\022\021\n\timport_id\030\002 \001(\005\022\022\n\ncar_nu"
+      "mber\030\003 \001(\t\"j\n\020Clamp_lidar_info\022\026\n\016has_wh"
+      "eel_flag\030\001 \001(\005\022\022\n\ndistance_y\030\002 \001(\002\022\022\n\ndi"
+      "stance_x\030\003 \001(\002\022\026\n\016has_clamp_flag\030\004 \001(\005\"H"
+      "\n\022Clamp_lidar_buffer\0222\n\027clamp_lidar_info"
+      "_vector\030\001 \003(\0132\021.Clamp_lidar_info*\241\002\n\014Ran"
+      "ge_status\022\021\n\rRange_correct\020\000\022\017\n\013Range_fr"
+      "ont\020\001\022\016\n\nRange_back\020\002\022\016\n\nRange_left\020\004\022\017\n"
+      "\013Range_right\020\010\022\020\n\014Range_bottom\020\020\022\r\n\tRang"
+      "e_top\020 \022\023\n\017Range_car_width\020@\022\030\n\023Range_ca"
+      "r_wheelbase\020\200\001\022\033\n\026Range_angle_anti_clock"
+      "\020\200\002\022\026\n\021Range_angle_clock\020\200\004\022 \n\033Range_ste"
+      "ering_wheel_nozero\020\200\010\022\025\n\020Range_car_movin"
+      "g\020\200\020*\254\001\n\014MeasureStatu\022\016\n\nMeasure_OK\020\000\022\030\n"
+      "\024Measure_Empty_Clouds\020\001\022\024\n\020Measure_Failt"
+      "ure\020\002\022\022\n\016Measure_Border\020\003\022\033\n\027Measure_Ter"
+      "minal_Border\020\004\022\024\n\020Lidar_Disconnect\020\005\022\025\n\021"
+      "Measure_Statu_Max\020\006*=\n\005STATU\022\013\n\007eNormal\020"
+      "\000\022\014\n\010eWarning\020\001\022\n\n\006eError\020\002\022\r\n\teCritical"
+      "\020\003*_\n\022Table_process_mode\022\022\n\016PROCESS_NORM"
+      "AL\020\000\022\034\n\030PROCESS_ONLY_TO_DISPATCH\020\001\022\027\n\023PR"
+      "OCESS_ONLY_TO_PAY\020\002*0\n\014CarrierStatu\022\t\n\005e"
+      "Idle\020\000\022\t\n\005eBusy\020\001\022\n\n\006eFault\020\002b\006proto3"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 3493);
+      descriptor, 3517);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "message.proto", &protobuf_RegisterTypes);
 }
@@ -3516,6 +3517,7 @@ void apply_table::InitAsDefaultInstance() {
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
 const int apply_table::kCarNumberFieldNumber;
 const int apply_table::kApplyEndTimeFieldNumber;
+const int apply_table::kOperationTypeFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 apply_table::apply_table()
@@ -3537,12 +3539,14 @@ apply_table::apply_table(const apply_table& from)
   if (from.apply_end_time().size() > 0) {
     apply_end_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.apply_end_time_);
   }
+  operation_type_ = from.operation_type_;
   // @@protoc_insertion_point(copy_constructor:apply_table)
 }
 
 void apply_table::SharedCtor() {
   car_number_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   apply_end_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  operation_type_ = 0;
 }
 
 apply_table::~apply_table() {
@@ -3577,6 +3581,7 @@ void apply_table::Clear() {
 
   car_number_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   apply_end_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  operation_type_ = 0;
   _internal_metadata_.Clear();
 }
 
@@ -3622,6 +3627,20 @@ bool apply_table::MergePartialFromCodedStream(
         break;
       }
 
+      // int32 operation_type = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
+                 input, &operation_type_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
       default: {
       handle_unusual:
         if (tag == 0) {
@@ -3668,6 +3687,11 @@ void apply_table::SerializeWithCachedSizes(
       2, this->apply_end_time(), output);
   }
 
+  // int32 operation_type = 3;
+  if (this->operation_type() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->operation_type(), output);
+  }
+
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
@@ -3704,6 +3728,11 @@ void apply_table::SerializeWithCachedSizes(
         2, this->apply_end_time(), target);
   }
 
+  // int32 operation_type = 3;
+  if (this->operation_type() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->operation_type(), target);
+  }
+
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
@@ -3735,6 +3764,13 @@ size_t apply_table::ByteSizeLong() const {
         this->apply_end_time());
   }
 
+  // int32 operation_type = 3;
+  if (this->operation_type() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::Int32Size(
+        this->operation_type());
+  }
+
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -3770,6 +3806,9 @@ void apply_table::MergeFrom(const apply_table& from) {
 
     apply_end_time_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.apply_end_time_);
   }
+  if (from.operation_type() != 0) {
+    set_operation_type(from.operation_type());
+  }
 }
 
 void apply_table::CopyFrom(const ::google::protobuf::Message& from) {
@@ -3800,6 +3839,7 @@ void apply_table::InternalSwap(apply_table* other) {
     GetArenaNoVirtual());
   apply_end_time_.Swap(&other->apply_end_time_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
     GetArenaNoVirtual());
+  swap(operation_type_, other->operation_type_);
   _internal_metadata_.Swap(&other->_internal_metadata_);
 }
 

+ 21 - 0
plc调度节点/message/message.pb.h

@@ -1235,12 +1235,19 @@ class apply_table : public ::google::protobuf::Message /* @@protoc_insertion_poi
   ::std::string* release_apply_end_time();
   void set_allocated_apply_end_time(::std::string* apply_end_time);
 
+  // int32 operation_type = 3;
+  void clear_operation_type();
+  static const int kOperationTypeFieldNumber = 3;
+  ::google::protobuf::int32 operation_type() const;
+  void set_operation_type(::google::protobuf::int32 value);
+
   // @@protoc_insertion_point(class_scope:apply_table)
  private:
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
   ::google::protobuf::internal::ArenaStringPtr car_number_;
   ::google::protobuf::internal::ArenaStringPtr apply_end_time_;
+  ::google::protobuf::int32 operation_type_;
   mutable ::google::protobuf::internal::CachedSize _cached_size_;
   friend struct ::protobuf_message_2eproto::TableStruct;
 };
@@ -3871,6 +3878,20 @@ inline void apply_table::set_allocated_apply_end_time(::std::string* apply_end_t
   // @@protoc_insertion_point(field_set_allocated:apply_table.apply_end_time)
 }
 
+// int32 operation_type = 3;
+inline void apply_table::clear_operation_type() {
+  operation_type_ = 0;
+}
+inline ::google::protobuf::int32 apply_table::operation_type() const {
+  // @@protoc_insertion_point(field_get:apply_table.operation_type)
+  return operation_type_;
+}
+inline void apply_table::set_operation_type(::google::protobuf::int32 value) {
+  
+  operation_type_ = value;
+  // @@protoc_insertion_point(field_set:apply_table.operation_type)
+}
+
 // -------------------------------------------------------------------
 
 // pick_table