Initialize LBJ Receiver project with basic structure and configuration files

This commit is contained in:
Nedifinita
2025-05-18 17:59:08 +08:00
commit 6ebfdb73bc
66 changed files with 6461 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
LBJ_Console

6
.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="21" />
</component>
</project>

10
.idea/deploymentTargetSelector.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

20
.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="CHOOSE_PER_TEST" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@@ -0,0 +1,47 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
</profile>
</component>

6
.idea/kotlinc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="2.0.0" />
</component>
</project>

10
.idea/migrations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

9
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,9 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

17
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

674
LICENSE Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
LBJ_Console is an Android app designed to receive and display LBJ (Locomotive Bell Jingling) messages via BLE from the SX1276_Receive_LBJ device.
Copyright (C) 2025 undef-i
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
LBJ_Console Copyright (C) 2025 undef-i
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
# LBJ_Console
LBJ_Console is an Android app designed to receive and display LBJ (Locomotive Bell Jingling) messages via BLE from the [SX1276_Receive_LBJ](https://github.com/undef-i/SX1276_Receive_LBJ) device.
# License
This project is licensed under the GNU General Public License v3.0 (GPLv3). This license ensures that the software remains free and open source, requiring that any modifications or derivative works must also be released under the same license terms.

1
app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

65
app/build.gradle.kts Normal file
View File

@@ -0,0 +1,65 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = "receiver.lbj"
compileSdk = 35
defaultConfig {
applicationId = "receiver.lbj"
minSdk = 29
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation("org.json:json:20231013")
implementation("androidx.compose.material:material-icons-extended:1.5.4")
implementation("org.osmdroid:osmdroid-android:6.1.16")
implementation("org.osmdroid:osmdroid-mapsforge:6.1.16")
}

21
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,20 @@
package receiver.lbj
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("receiver.lbj", appContext.packageName)
}
}

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.LBJReceiver"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.LBJReceiver">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View File

@@ -0,0 +1,430 @@
6G,51,90,西安铁路局 宝鸡电力机务段,,
6K,1,85,郑州铁路局 洛阳机务段,,
8G,1,1,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,2,2,中国铁道博物馆,,
8G,3,75,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,76,76,太原铁路局 太原机务段北场,,
8G,77,96,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,97,97,太原铁路局 榆次机务折返段,,
8G,98,100,太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段,,
8K,1,1,北京铁路局 丰台机务段,,
8K,2,7,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,8,8,中国铁道博物馆,*科技号,
8K,9,17,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,18,18,*北京铁路局 丰台机务段,,
8K,19,23,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,24,24,太原铁路局 湖东机务段 大同西运用车间,,
8K,25,64,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,65,65,天津铁道职业技术学院,,
8K,66,71,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,72,72,北京铁路局 丰台机务段,,
8K,73,90,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,91,91,太原铁路局 太原机务段北场 机车展场,,
8K,92,100,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
DJ1,1,1,中国铁道科学研究院 环形铁道,,
DJ1,2,2,株洲西门子牵引设备有限公司,,
DJ1,3,3,西安铁路局 宝鸡机务段 秦岭附加队 ,,
DJ2,1,1,郑州铁路局 郑州机务段京武快车队,奥星,
DJ2,2,3,郑州铁路局 郑州机务段,奥星,
HXD1D,1,15,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,16,16,上海铁路局集团有限公司 杭州机务段,,
HXD1D,17,17,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,18,18,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,19,19,上海铁路局集团有限公司 杭州机务段,,
HXD1D,20,20,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,21,21,上海铁路局集团有限公司 杭州机务段,,
HXD1D,22,24,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,25,25,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,26,26,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,27,27,上海铁路局集团有限公司 杭州机务段,,
HXD1D,28,28,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,29,34,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,35,35,上海铁路局集团有限公司 杭州机务段,,
HXD1D,36,38,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,39,39,中国铁路济南局集团有限公司 济南机务段,,
HXD1D,40,50,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,51,75,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,76,105,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,106,137,上海铁路局集团有限公司 上海机务段,,
HXD1D,138,168,上海铁路局集团有限公司 杭州机务段,,
HXD1D,169,175,上海铁路局集团有限公司 上海机务段,,
HXD1D,176,185,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,186,187,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,188,188,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,189,190,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,191,232,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,233,233,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,234,237,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,238,257,广州铁路(集团)公司 广州机务段,,
HXD1D,258,270,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,271,275,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,276,279,上海铁路局集团有限公司 上海机务段,,
HXD1D,280,289,上海铁路局集团有限公司 徐州机务段,,
HXD1D,290,291,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,292,293,南昌铁路局集团有限公司 鹰潭机务段,,
HXD1D,294,295,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,296,300,广州铁路(集团)公司 广州机务段,,
HXD1D,301,310,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,311,320,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,321,340,青藏铁路集团有限公司 西宁机务段,,
HXD1D,341,362,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,363,382,广州铁路(集团)公司 广州机务段,,
HXD1D,383,392,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,393,405,上海铁路局集团有限公司 上海机务段,,
HXD1D,406,415,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,416,430,广州铁路(集团)公司 长沙机务段,,
HXD1D,431,440,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,441,445,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,446,450,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,451,460,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,461,470,广州铁路(集团)公司 广州机务段,,
HXD1D,471,478,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,479,483,上海铁路局集团有限公司 上海机务段,,
HXD1D,484,488,上海铁路局集团有限公司 杭州机务段,,
HXD1D,489,490,上海铁路局集团有限公司 杭州机务段,,
HXD1D,491,510,郑州铁路局集团有限公司 郑州机务段,,
HXD1D,511,512,上海铁路局集团有限公司 徐州机务段,,
HXD1D,513,515,上海铁路局集团有限公司 上海机务段,,
HXD1D,516,520,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,521,534,广州铁路(集团)公司 广州机务段,,
HXD1D,522,522,广州铁路职业技术学院,,
HXD1D,535,544,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,545,551,上海铁路局集团有限公司 上海机务段,,
HXD1D,552,554,上海铁路局集团有限公司 杭州机务段,,
HXD1D,555,559,郑州铁路局集团有限公司 郑州机务段,,
HXD1D,560,564,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,565,570,广州铁路(集团)公司 广州机务段,,
HXD1D,571,585,南昌铁路局集团有限公司 南昌机务段,,
HXD1D,586,595,上海铁路局集团有限公司 杭州机务段,,
HXD1D,596,613,兰州铁路局集团有限公司 兰州西机务段,,
HXD1D,614,623,广州铁路(集团)公司 广州机务段,,
HXD1D,624,633,上海铁路局集团有限公司 上海机务段,,
HXD1D,634,636,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,637,644,郑州铁路局集团有限公司 郑州机务段,,
HXD1D,645,660,郑州铁路局集团有限公司 郑州机务段,,
HXD1D,661,668,武汉铁路局集团有限公司 武昌南机务段,,
HXD1D,669,673,乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段,,
HXD1D,674,678,郑州铁路局集团有限公司 郑州机务段,,
HXD1D,679,682,上海铁路局集团有限公司 上海机务段,,
HXD1D,683,683,上海铁路局集团有限公司 徐州机务段,,
HXD1D,684,684,上海铁路局集团有限公司 徐州机务段,,
HXD1D,685,689,青藏铁路集团有限公司 格尔木机务段,,
HXD1D,1898,1898,上海铁路局集团有限公司 上海机务段,周恩来号,
HXD1D-J,1,3,青藏铁路集团有限公司 拉萨动车运用所,,
HXD1D-J,1001,1009,昆明铁路局集团有限公司 昆明动车运用所,,
HXD1D-J,1010,1013,青藏铁路集团有限公司 格尔木机务段,,
HXD1D-J,1014,1019,成都铁路局集团有限公司 成都动车运用所,,
HXD1D-J,1020,1027,昆明铁路局集团有限公司 昆明动车运用所,,
HXD3C,446,446,广州铁路(集团)公司 广州机务段,,
HXD3C,805,809,广州铁路(集团)公司 ,,
HXD3C,810,819,中国铁路南宁局集团有限公司,,
HXD3C,820,829,中国铁路武汉局集团有限公司,,
HXD3C,896,925,中国铁路沈阳局集团有限公司,,
HXD3C,926,930,中国铁路南宁局集团有限公司,,
HXD3C,931,945,中国铁路北京局集团有限公司,,
HXD3C,946,955,中国铁路济南局集团有限公司,,
HXD3C,956,965,中国铁路郑州局集团有限公司,,
HXD3C,966,974,中国铁路济南局集团有限公司,,
HXD3D,1,10,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,11,25,西安铁路局集团有限公司 西安机务段,,
HXD3D,26,34,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,35,35,兰州铁路局集团有限公司 迎水桥机务段,雷锋号,
HXD3D,36,38,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,39,39,济南铁路局集团有限公司 济南机务段,共青团号,
HXD3D,40,40,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,41,50,西安铁路局集团有限公司 西安机务段,,
HXD3D,51,70,北京铁路局集团有限公司 北京机务段,,
HXD3D,71,90,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,91,115,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,116,135,昆明铁路局集团有限公司 昆明机务段,,
HXD3D,136,145,北京铁路局集团有限公司 北京机务段,,
HXD3D,146,150,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,151,155,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,156,160,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,161,165,北京铁路局集团有限公司 北京机务段,,
HXD3D,166,170,西安铁路局集团有限公司 西安机务段,,
HXD3D,171,180,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,181,190,济南铁路局集团有限公司 济南机务段,,
HXD3D,191,245,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,246,255,北京铁路局集团有限公司 北京机务段,,
HXD3D,256,265,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,266,290,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,291,300,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,301,310,济南铁路局集团有限公司 济南机务段,,
HXD3D,310,315,昆明铁路局集团有限公司 昆明机务段,,
HXD3D,316,320,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,321,322,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,323,325,北京铁路局集团有限公司 北京机务段,,
HXD3D,326,333,西安铁路局集团有限公司 西安机务段,,
HXD3D,334,340,西安铁路局集团有限公司 安康机务段,,
HXD3D,341,345,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,346,346,成都铁路局集团有限公司 重庆机务段,,
HXD3D,351,351,成都铁路局集团有限公司 重庆机务段,,
HXD3D,356,365,西安铁路局集团有限公司 安康机务段,,
HXD3D,366,369,北京铁路局集团有限公司 北京机务段,,
HXD3D,370,382,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,383,392,昆明铁路局集团有限公司 昆明机务段,,
HXD3D,393,397,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,398,402,西安铁路局集团有限公司 西安机务段,,
HXD3D,403,417,西安铁路局集团有限公司 西安机务段,,
HXD3D,418,419,哈尔滨铁路局集团有限公司 牡丹江机务段,,
HXD3D,420,424,北京铁路局集团有限公司 北京机务段,,
HXD3D,425,429,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,430,433,哈尔滨铁路局集团有限公司 牡丹江机务段,,
HXD3D,434,443,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,444,449,济南铁路局集团有限公司 济南机务段,,
HXD3D,450,464,西安铁路局集团有限公司 西安机务段,,
HXD3D,465,468,济南铁路局集团有限公司 济南机务段,,
HXD3D,469,473,济南铁路局集团有限公司 济南机务段,,
HXD3D,474,479,昆明铁路局集团有限公司 昆明机务段,,
HXD3D,480,484,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,485,489,西安铁路局集团有限公司 西安机务段,,
HXD3D,490,499,北京铁路局集团有限公司 北京机务段,,
HXD3D,500,503,哈尔滨铁路局集团有限公司 牡丹江机务段,,
HXD3D,504,514,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,515,515,成都铁路局集团有限公司 重庆机务段,,
HXD3D,516,518,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,519,528,西安铁路局集团有限公司 西安机务段,,
HXD3D,529,538,北京铁路局集团有限公司 北京机务段,,
HXD3D,539,541,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,542,553,西安铁路局集团有限公司 西安机务段,,
HXD3D,554,563,济南铁路局集团有限公司 济南机务段,,
HXD3D,564,568,昆明铁路局集团有限公司 昆明机务段,,
HXD3D,569,573,成都铁路局集团有限公司 重庆机务段,,
HXD3D,574,583,济南铁路局集团有限公司 济南机务段,,
HXD3D,584,584,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,585,609,哈尔滨铁路局集团有限公司 三棵树机务段,,
HXD3D,610,611,北京铁路局集团有限公司 北京机务段,,
HXD3D,612,621,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,622,626,南昌铁路局集团有限公司 南昌机务段,,
HXD3D,627,629,哈尔滨铁路局集团有限公司 三棵树机务段,,
HXD3D,630,630,哈尔滨铁路局集团有限公司 哈尔滨机务段,,
HXD3D,631,631,西安铁路局集团有限公司 西安机务段,第五代“钢人铁马号”,
HXD3D,632,653,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,654,673,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,674,681,沈阳铁路局集团有限公司 沈阳机务段,,
HXD3D,682,688,兰州铁路局集团有限公司 兰州西机务段,,
HXD3D,1886,1886,哈尔滨铁路局集团有限公司 哈尔滨机务段,第五代“朱德号”,
HXD3D,1893,1893,北京铁路局集团有限公司 丰台机务段,第六代“毛泽东号”,
HXD3D,1921,1921,沈阳铁路局集团有限公司 沈阳机务段,共产党员号,
HXD3D,7001,7002,广西沿海铁路股份有限公司 南宁南机务运用段,,
HXD3D,7003,7003,吉林铁道职业技术学院,,
HXD3D,8001,8025,沈阳铁路局集团有限公司 沈阳机务段,,大同
HXD3D,8026,8028,太原铁路局集团有限公司 太原南机务段,,大同
东方红2,1,50,,,资阳
东风,1201,1830,,,大连、成都
东风,2001,2094,,,戚墅堰
东风11,1,459,,,戚墅堰
东风12,8001,8001,吉林铁道职业技术学院,,
东风2,3201,3348,,,戚墅堰
东风21,1,5,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,6,6,中国铁路昆明局集团有限公司 昆明机务段,状元号,
东风21,7,7,中国铁路昆明局集团有限公司 昆明机务段,亲年号,
东风21,8,8,中国铁路昆明局集团有限公司 昆明机务段,建水古城,
东风21,9,100,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,101,101,中国铁路昆明局集团有限公司 昆明机务段,异龙号,
东风21,102,102,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,1001,1002,云南钢铁厂,,
东风2Z,3251,3251,*齐齐哈尔铁路局 加格达奇机务段,,
东风3,3243,3243,中车共享城机车公园,,
东风4,3247,3247,中车成都轨道交通产业园,,
东风4B,1001,1999,,,大连
东风4B,1963,1963,*北京铁路局 丰台机务段,,
东风4B,2101,2685,,,大连
东风4B,2104,2104,*上海铁路局 蚌埠机务段,,
东风4B,2376,2376,*南昌铁路局 鹰潭机务段,,
东风4B,3101,3999,,,资阳
东风4B,3214,3214,*浙江金温铁道开发有限公司 温州机务段,,
东风4B,3249,3249,*西安铁路局 西安机务段,,
东风4B,3390,3390,*成都铁路局 重庆机务段,,
东风4B,3593,3593,*广州铁路(集团)公司 株洲机务段,,
东风4B,6001,6587,,,大同
东风4B,6530,6530,*南宁铁路局 南宁机务段,,
东风4B,7001,7363,,,大连
东风4B,7364,7365,,,四方
东风4B,7366,7796,,,大连
东风4B,7701,7732,,,戚墅堰改
东风4B,9001,9702,,,资阳
东风4B,9167,9167,*南昌铁路局 向塘机务段,,
东风4B,9531,9531,*新长铁路公司,,
东风4C,1,10,,,大同
东风4C,11,11,北京铁路局 丰台段,青年文明号,
东风4C,12,40,,,大同
东风4C,2001,2006,,,四方
东风4C,4001,4465,,,大连
东风4C,4466,4466,四方机车车辆厂,,四方
东风4C,5001,5273,,,资阳
东风4C,5274,5275,三茂铁路公司 三水机务段,东风4CK,
东风4C,5276,5335,,,资阳
东风4D,7001,7021,中国铁路南宁局集团有限公司,,
东风5,1,1,中国铁路北京局集团有限公司 北京车辆段,,
东风5,1974,1975,中国铁路兰州局集团有限公司 兰州西机务段,,唐山
东风5,1976,2082,,,唐山
东风5,2083,2083,中国石油兰州石化公司,,唐山
东风5,3279,3279,云南铁路博物馆,,
东风6,1,2,*沈阳铁路局 大连机务段,,
东风6,3,3,沈阳铁路陈列馆,,
东风6,4,4,*沈阳铁路局 大连机务段,,
东风7,174,174,太原机务段北场,,
东风7B,3006,3006,中国铁道博物馆,,
东风7B,3015,3015,王坪村铁路公园,,
东风7B,6001,6072,*北京铁路局 邯郸机务段;郑州铁路局 新乡机务段,调车,
东风7D,1,1,中国铁道博物馆,,
东风7D,3001,3001,中国铁道博物馆,,
东风7E,1,1,郑州铁路局 新乡机务段,,
东风7E,2,2,郑州铁路局 郑州机务段,,
东风7G,9001,9004,呼和浩特铁路局 集宁机务段 赛汗塔拉分段,,
东风8,1,1,中国铁道博物馆,,
东风9,1,2,中国铁路广州局集团有限公司广州机务段,,
韶山1,8,8,中国铁道博物馆,,
韶山1,156,156,郑州世纪欢乐园,,
韶山1,160,160,北京铁路电气化学校,,
韶山1,227,227,兰州铁路局 兰州西机务段,,
韶山1,254,254,北京铁路局 丰台机务段 储备厂,,
韶山1,307,307,太原铁路局 榆次机务折返段,,
韶山1,309,309,太原铁路局 太原机务段北场,,
韶山1,321,321,武汉铁路职业技术学院,,
韶山1,681,681,中国铁道博物馆,,
韶山1,695,695,沈阳铁路陈列馆,,
韶山1,762,762,广州铁路(集团)公司 娄底运用车间储备厂,,
韶山1,818,818,西南交通大学 机车博物园,,
韶山1,821,821,韶关机务实训基地,,
韶山1,826,826,韶关机务实训基地,,
韶山3,454,454,成都铁路局 贵阳机务段,先锋号,
韶山3,524,524,武汉铁路局 江岸机务段,青年号,
韶山3,4160,4160,广西沿海铁路公司 南宁南机务运用段,共青团号,
韶山3,4178,4178,广西沿海铁路公司 南宁南机务运用段,共青团号,
韶山3,4235,4235,成都铁路局 重庆机务段,青年文明号,
韶山3,4258,4258,成都铁路局 重庆机务段,党员先锋号,
韶山3,5080,5080,广铁机车博物馆,,
韶山3,6005,6005,湖南交通工程学院,,
韶山3,8050,8050,武汉四美塘铁路遗址公园,,
韶山3B,16,16,西安铁路局 安康机务段,青年文明号,
韶山3B,5001,5001,成都铁路局 贵阳机务段,*先锋力神,
韶山3B,5035,5035,兰州铁路局 迎水桥机务段,雷锋号 (曾),
韶山3B,5038,5038,兰州铁路局 迎水桥机务段,青年文明号,
韶山3B,5151,5151,成都铁路局 西昌机务段,扶贫先锋号,
韶山3B,5162,5162,昆明铁路局 昆明机务段,五四青年号,
韶山3B,5235,5235,成都铁路局 西昌机务段,*共青团号,
韶山3C,1,1,贵阳机务段,,
韶山4,6,6,中国铁道博物馆,,
韶山4,10,10,成都铁路局 西昌机务段,,
韶山4,50,50,郑州铁路局 新乡机务段,先锋号,
韶山4,63,63,太原铁路局 太原机务段,,
韶山4,204,204,郑州铁路局 新乡机务段,先锋号,
韶山4,448,448,沈阳铁路局 苏家屯机务段,先锋号,
韶山4,574,574,中铁三局集团,先锋号,
韶山4,743,743,哈尔滨铁路局 哈尔滨机务段,青年文明号,
韶山4,855,855,西安铁路局 新丰镇机务段,,
韶山4,911,911,中铁三局集团,青年文明号,
韶山4,2006,2006,吉林铁道职业技术学院,,
韶山4B,19,19,神朔铁路公司 神木北机务段,青年号,
韶山4B,89,89,神朔铁路公司 神木北机务段,青年文明号,
韶山4B,90,90,神朔铁路公司 神木北机务段,青年文明号,
韶山4B,257,257,包神铁路公司 东胜机务段,党员先锋号,
韶山4G,159,1177,,,株洲
韶山4G,168,168,中国铁道博物馆,,
韶山4G,171,171,哈尔滨铁路局 牡丹江机务段,,
韶山4G,179,179,太原铁路局 湖东机务段,,
韶山4G,466,466,石家庄铁道大学,,
韶山4G,1089,1089,*呼和浩特铁路局 包头西机务段,,
韶山4G,1886,1886,哈尔滨铁路局 哈尔滨机务段,*朱德号,株洲
韶山4G,3001,3002,,,资阳
韶山4G,6001,6001,中国铁道博物馆,,
韶山4G,6001,6001,中国铁道博物馆,,大同
韶山4G,7001,7110,,,大连
韶山4G,7121,7243,,,大连
韶山5,1,1,中国铁道博物馆,,
韶山5,2,2,郑州世纪欢乐园 ,,
韶山6,1,1,郑州铁路司机学校,,
韶山6,2,2,中国铁道博物馆,,
韶山6B,1011,1011,西安铁路局 西安机务段,*青年文明号,
韶山6B,1026,1026,韶关机务实训基地,,
韶山6B,1088,1088,武汉铁路局 襄阳机务段,*民兵号,
韶山6B,1111,1111,武汉铁路局 襄阳机务段,*先锋号,
韶山6B,6001,6001,韶关机务实训基地,,
韶山6B,6002,6002,广州铁路博物馆,,
韶山7,1,79,南宁铁路局集团有限公司 柳州机务段,,
韶山7,76,76,南宁铁路局集团有限公司 南宁机务段,*五四红旗号,
韶山7,80,84,南宁铁路局集团有限公司 柳州机务段,,
韶山7,85,111,南宁铁路局集团有限公司 柳州机务段,,
韶山7,8112,8113,山西孝柳铁路有限责任公司,,
韶山7B,1,1,*南宁铁路局集团有限公司 南宁机务段,,
韶山7B,2,2,中国铁路南宁局集团有限公司 柳州机务段,,
韶山7D,1,58,西安铁路局集团有限公司 西安机务段,,
韶山7D,631,631,西安铁路局集团有限公司 西安机务段,*钢人铁马号,
韶山7E,1,140,,,大同
韶山7E,6001,6002,昆明铁路局,,大同
韶山7E,7001,7004,,,大连
韶山8,1,1,中国铁路广州局集团有限公司 广州机务段,,
韶山8,2,2,中国铁路广州局集团有限公司 广州机务段,,
韶山8,3,4,中国铁路上海局集团有限公司 上海机务段,,
韶山8,5,5,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,9,9,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,11,11,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,12,12,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,15,16,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,17,17,中国铁路上海局集团有限公司 上海机务段,,
韶山8,20,20,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,24,25,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,27,27,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,29,32,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,33,35,中国铁路上海局集团有限公司 上海机务段,,
韶山8,36,36,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,38,38,中国铁路上海局集团有限公司 上海机务段,,
韶山8,39,39,中国铁路上海局集团有限公司 上海机务段,国祥号,
韶山8,40,40,中国铁路上海局集团有限公司 上海机务段,,
韶山8,41,41,中国铁路北京局集团有限公司 北京机务段,,
韶山8,43,43,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,44,44,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,45,45,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,48,48,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,49,49,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,50,50,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,51,51,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,52,52,中国铁路上海局集团有限公司 上海机务段,,
韶山8,55,55,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,56,57,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,64,64,中国铁路广州局集团有限公司 广州机务段,,
韶山8,72,72,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,73,73,中国铁路北京局集团有限公司 北京机务段,,
韶山8,74,74,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,81,81,中国铁路北京局集团有限公司 北京机务段,,
韶山8,83,84,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,85,85,中国铁路北京局集团有限公司 北京机务段,,
韶山8,88,103,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,104,104,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,109,111,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,114,116,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,118,119,中国铁路北京局集团有限公司 北京机务段,,
韶山8,121,126,中国铁路北京局集团有限公司 北京机务段,,
韶山8,127,128,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,130,130,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,131,131,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,132,132,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,133,133,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,134,134,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,136,136,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,141,141,中国铁路广州局集团有限公司 广州机务段,,
韶山8,144,144,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,148,148,中国铁路广州局集团有限公司 广州机务段,,
韶山8,156,156,中国铁路广州局集团有限公司 广州机务段,,
韶山8,163,163,中国铁路广州局集团有限公司 广州机务段,,
韶山8,166,166,中国铁路广州局集团有限公司 广州机务段,新世纪金龙号,
韶山8,171,171,中国铁路上海局集团有限公司 上海机务段,,
韶山8,172,172,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,173,173,中国铁路广州局集团有限公司 广州机务段,,
韶山8,181,181,中国铁路广州局集团有限公司 广州机务段,,
韶山8,186,186,中国铁路广州局集团有限公司 广州机务段,,
韶山8,191,191,中国铁路广州局集团有限公司 广州机务段,,
韶山8,192,192,中国铁路广州局集团有限公司 广州机务段,,
韶山8,197,197,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,200,204,中国铁路上海局集团有限公司 上海机务段,,
韶山8,205,205,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,214,214,中国铁路郑州局集团有限公司 郑州机务段,,
韶山9,1,3,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,,
韶山9,5,29,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,,
韶山9,30,30,沈阳铁路局 通辽机务段,,
韶山9,31,37,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,,
韶山9,38,38,沈阳铁路局 通辽机务段,,
韶山9,39,43,沈阳铁路局 沈阳机务段;上海铁路局 上海机务段,,
1 6G 51 90 西安铁路局 宝鸡电力机务段
2 6K 1 85 郑州铁路局 洛阳机务段
3 8G 1 1 太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段
4 8G 2 2 中国铁道博物馆
5 8G 3 75 太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段
6 8G 76 76 太原铁路局 太原机务段北场
7 8G 77 96 太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段
8 8G 97 97 太原铁路局 榆次机务折返段
9 8G 98 100 太原铁路局 太原北机务段、侯马机务段、石家庄电力机务段
10 8K 1 1 北京铁路局 丰台机务段
11 8K 2 7 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
12 8K 8 8 中国铁道博物馆 *科技号
13 8K 9 17 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
14 8K 18 18 *北京铁路局 丰台机务段
15 8K 19 23 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
16 8K 24 24 太原铁路局 湖东机务段 大同西运用车间
17 8K 25 64 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
18 8K 65 65 天津铁道职业技术学院
19 8K 66 71 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
20 8K 72 72 北京铁路局 丰台机务段
21 8K 73 90 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
22 8K 91 91 太原铁路局 太原机务段北场 机车展场
23 8K 92 100 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
24 DJ1 1 1 中国铁道科学研究院 环形铁道
25 DJ1 2 2 株洲西门子牵引设备有限公司
26 DJ1 3 3 西安铁路局 宝鸡机务段 秦岭附加队
27 DJ2 1 1 郑州铁路局 郑州机务段京武快车队 奥星
28 DJ2 2 3 郑州铁路局 郑州机务段 奥星
29 HXD1D 1 15 武汉铁路局集团有限公司 武昌南机务段
30 HXD1D 16 16 上海铁路局集团有限公司 杭州机务段
31 HXD1D 17 17 南昌铁路局集团有限公司 南昌机务段
32 HXD1D 18 18 南昌铁路局集团有限公司 鹰潭机务段
33 HXD1D 19 19 上海铁路局集团有限公司 杭州机务段
34 HXD1D 20 20 南昌铁路局集团有限公司 南昌机务段
35 HXD1D 21 21 上海铁路局集团有限公司 杭州机务段
36 HXD1D 22 24 南昌铁路局集团有限公司 南昌机务段
37 HXD1D 25 25 南昌铁路局集团有限公司 鹰潭机务段
38 HXD1D 26 26 南昌铁路局集团有限公司 南昌机务段
39 HXD1D 27 27 上海铁路局集团有限公司 杭州机务段
40 HXD1D 28 28 南昌铁路局集团有限公司 鹰潭机务段
41 HXD1D 29 34 南昌铁路局集团有限公司 南昌机务段
42 HXD1D 35 35 上海铁路局集团有限公司 杭州机务段
43 HXD1D 36 38 兰州铁路局集团有限公司 兰州西机务段
44 HXD1D 39 39 中国铁路济南局集团有限公司 济南机务段
45 HXD1D 40 50 兰州铁路局集团有限公司 兰州西机务段
46 HXD1D 51 75 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
47 HXD1D 76 105 兰州铁路局集团有限公司 兰州西机务段
48 HXD1D 106 137 上海铁路局集团有限公司 上海机务段
49 HXD1D 138 168 上海铁路局集团有限公司 杭州机务段
50 HXD1D 169 175 上海铁路局集团有限公司 上海机务段
51 HXD1D 176 185 武汉铁路局集团有限公司 武昌南机务段
52 HXD1D 186 187 南昌铁路局集团有限公司 鹰潭机务段
53 HXD1D 188 188 南昌铁路局集团有限公司 南昌机务段
54 HXD1D 189 190 南昌铁路局集团有限公司 鹰潭机务段
55 HXD1D 191 232 南昌铁路局集团有限公司 南昌机务段
56 HXD1D 233 233 南昌铁路局集团有限公司 鹰潭机务段
57 HXD1D 234 237 南昌铁路局集团有限公司 南昌机务段
58 HXD1D 238 257 广州铁路(集团)公司 广州机务段
59 HXD1D 258 270 武汉铁路局集团有限公司 武昌南机务段
60 HXD1D 271 275 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
61 HXD1D 276 279 上海铁路局集团有限公司 上海机务段
62 HXD1D 280 289 上海铁路局集团有限公司 徐州机务段
63 HXD1D 290 291 南昌铁路局集团有限公司 南昌机务段
64 HXD1D 292 293 南昌铁路局集团有限公司 鹰潭机务段
65 HXD1D 294 295 南昌铁路局集团有限公司 南昌机务段
66 HXD1D 296 300 广州铁路(集团)公司 广州机务段
67 HXD1D 301 310 武汉铁路局集团有限公司 武昌南机务段
68 HXD1D 311 320 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
69 HXD1D 321 340 青藏铁路集团有限公司 西宁机务段
70 HXD1D 341 362 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
71 HXD1D 363 382 广州铁路(集团)公司 广州机务段
72 HXD1D 383 392 南昌铁路局集团有限公司 南昌机务段
73 HXD1D 393 405 上海铁路局集团有限公司 上海机务段
74 HXD1D 406 415 兰州铁路局集团有限公司 兰州西机务段
75 HXD1D 416 430 广州铁路(集团)公司 长沙机务段
76 HXD1D 431 440 南昌铁路局集团有限公司 南昌机务段
77 HXD1D 441 445 南昌铁路局集团有限公司 南昌机务段
78 HXD1D 446 450 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
79 HXD1D 451 460 武汉铁路局集团有限公司 武昌南机务段
80 HXD1D 461 470 广州铁路(集团)公司 广州机务段
81 HXD1D 471 478 兰州铁路局集团有限公司 兰州西机务段
82 HXD1D 479 483 上海铁路局集团有限公司 上海机务段
83 HXD1D 484 488 上海铁路局集团有限公司 杭州机务段
84 HXD1D 489 490 上海铁路局集团有限公司 杭州机务段
85 HXD1D 491 510 郑州铁路局集团有限公司 郑州机务段
86 HXD1D 511 512 上海铁路局集团有限公司 徐州机务段
87 HXD1D 513 515 上海铁路局集团有限公司 上海机务段
88 HXD1D 516 520 南昌铁路局集团有限公司 南昌机务段
89 HXD1D 521 534 广州铁路(集团)公司 广州机务段
90 HXD1D 522 522 广州铁路职业技术学院
91 HXD1D 535 544 南昌铁路局集团有限公司 南昌机务段
92 HXD1D 545 551 上海铁路局集团有限公司 上海机务段
93 HXD1D 552 554 上海铁路局集团有限公司 杭州机务段
94 HXD1D 555 559 郑州铁路局集团有限公司 郑州机务段
95 HXD1D 560 564 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
96 HXD1D 565 570 广州铁路(集团)公司 广州机务段
97 HXD1D 571 585 南昌铁路局集团有限公司 南昌机务段
98 HXD1D 586 595 上海铁路局集团有限公司 杭州机务段
99 HXD1D 596 613 兰州铁路局集团有限公司 兰州西机务段
100 HXD1D 614 623 广州铁路(集团)公司 广州机务段
101 HXD1D 624 633 上海铁路局集团有限公司 上海机务段
102 HXD1D 634 636 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
103 HXD1D 637 644 郑州铁路局集团有限公司 郑州机务段
104 HXD1D 645 660 郑州铁路局集团有限公司 郑州机务段
105 HXD1D 661 668 武汉铁路局集团有限公司 武昌南机务段
106 HXD1D 669 673 乌鲁木齐铁路局集团有限公司 乌鲁木齐机务段
107 HXD1D 674 678 郑州铁路局集团有限公司 郑州机务段
108 HXD1D 679 682 上海铁路局集团有限公司 上海机务段
109 HXD1D 683 683 上海铁路局集团有限公司 徐州机务段
110 HXD1D 684 684 上海铁路局集团有限公司 徐州机务段
111 HXD1D 685 689 青藏铁路集团有限公司 格尔木机务段
112 HXD1D 1898 1898 上海铁路局集团有限公司 上海机务段 周恩来号
113 HXD1D-J 1 3 青藏铁路集团有限公司 拉萨动车运用所
114 HXD1D-J 1001 1009 昆明铁路局集团有限公司 昆明动车运用所
115 HXD1D-J 1010 1013 青藏铁路集团有限公司 格尔木机务段
116 HXD1D-J 1014 1019 成都铁路局集团有限公司 成都动车运用所
117 HXD1D-J 1020 1027 昆明铁路局集团有限公司 昆明动车运用所
118 HXD3C 446 446 广州铁路(集团)公司 广州机务段
119 HXD3C 805 809 广州铁路(集团)公司
120 HXD3C 810 819 中国铁路南宁局集团有限公司
121 HXD3C 820 829 中国铁路武汉局集团有限公司
122 HXD3C 896 925 中国铁路沈阳局集团有限公司
123 HXD3C 926 930 中国铁路南宁局集团有限公司
124 HXD3C 931 945 中国铁路北京局集团有限公司
125 HXD3C 946 955 中国铁路济南局集团有限公司
126 HXD3C 956 965 中国铁路郑州局集团有限公司
127 HXD3C 966 974 中国铁路济南局集团有限公司
128 HXD3D 1 10 沈阳铁路局集团有限公司 沈阳机务段
129 HXD3D 11 25 西安铁路局集团有限公司 西安机务段
130 HXD3D 26 34 兰州铁路局集团有限公司 兰州西机务段
131 HXD3D 35 35 兰州铁路局集团有限公司 迎水桥机务段 雷锋号
132 HXD3D 36 38 兰州铁路局集团有限公司 兰州西机务段
133 HXD3D 39 39 济南铁路局集团有限公司 济南机务段 共青团号
134 HXD3D 40 40 兰州铁路局集团有限公司 兰州西机务段
135 HXD3D 41 50 西安铁路局集团有限公司 西安机务段
136 HXD3D 51 70 北京铁路局集团有限公司 北京机务段
137 HXD3D 71 90 南昌铁路局集团有限公司 南昌机务段
138 HXD3D 91 115 兰州铁路局集团有限公司 兰州西机务段
139 HXD3D 116 135 昆明铁路局集团有限公司 昆明机务段
140 HXD3D 136 145 北京铁路局集团有限公司 北京机务段
141 HXD3D 146 150 呼和浩特铁路局集团有限公司 集宁机务段
142 HXD3D 151 155 沈阳铁路局集团有限公司 沈阳机务段
143 HXD3D 156 160 南昌铁路局集团有限公司 南昌机务段
144 HXD3D 161 165 北京铁路局集团有限公司 北京机务段
145 HXD3D 166 170 西安铁路局集团有限公司 西安机务段
146 HXD3D 171 180 兰州铁路局集团有限公司 兰州西机务段
147 HXD3D 181 190 济南铁路局集团有限公司 济南机务段
148 HXD3D 191 245 沈阳铁路局集团有限公司 沈阳机务段
149 HXD3D 246 255 北京铁路局集团有限公司 北京机务段
150 HXD3D 256 265 呼和浩特铁路局集团有限公司 集宁机务段
151 HXD3D 266 290 兰州铁路局集团有限公司 兰州西机务段
152 HXD3D 291 300 沈阳铁路局集团有限公司 沈阳机务段
153 HXD3D 301 310 济南铁路局集团有限公司 济南机务段
154 HXD3D 310 315 昆明铁路局集团有限公司 昆明机务段
155 HXD3D 316 320 南昌铁路局集团有限公司 南昌机务段
156 HXD3D 321 322 呼和浩特铁路局集团有限公司 集宁机务段
157 HXD3D 323 325 北京铁路局集团有限公司 北京机务段
158 HXD3D 326 333 西安铁路局集团有限公司 西安机务段
159 HXD3D 334 340 西安铁路局集团有限公司 安康机务段
160 HXD3D 341 345 沈阳铁路局集团有限公司 沈阳机务段
161 HXD3D 346 346 成都铁路局集团有限公司 重庆机务段
162 HXD3D 351 351 成都铁路局集团有限公司 重庆机务段
163 HXD3D 356 365 西安铁路局集团有限公司 安康机务段
164 HXD3D 366 369 北京铁路局集团有限公司 北京机务段
165 HXD3D 370 382 呼和浩特铁路局集团有限公司 集宁机务段
166 HXD3D 383 392 昆明铁路局集团有限公司 昆明机务段
167 HXD3D 393 397 兰州铁路局集团有限公司 兰州西机务段
168 HXD3D 398 402 西安铁路局集团有限公司 西安机务段
169 HXD3D 403 417 西安铁路局集团有限公司 西安机务段
170 HXD3D 418 419 哈尔滨铁路局集团有限公司 牡丹江机务段
171 HXD3D 420 424 北京铁路局集团有限公司 北京机务段
172 HXD3D 425 429 呼和浩特铁路局集团有限公司 集宁机务段
173 HXD3D 430 433 哈尔滨铁路局集团有限公司 牡丹江机务段
174 HXD3D 434 443 南昌铁路局集团有限公司 南昌机务段
175 HXD3D 444 449 济南铁路局集团有限公司 济南机务段
176 HXD3D 450 464 西安铁路局集团有限公司 西安机务段
177 HXD3D 465 468 济南铁路局集团有限公司 济南机务段
178 HXD3D 469 473 济南铁路局集团有限公司 济南机务段
179 HXD3D 474 479 昆明铁路局集团有限公司 昆明机务段
180 HXD3D 480 484 南昌铁路局集团有限公司 南昌机务段
181 HXD3D 485 489 西安铁路局集团有限公司 西安机务段
182 HXD3D 490 499 北京铁路局集团有限公司 北京机务段
183 HXD3D 500 503 哈尔滨铁路局集团有限公司 牡丹江机务段
184 HXD3D 504 514 沈阳铁路局集团有限公司 沈阳机务段
185 HXD3D 515 515 成都铁路局集团有限公司 重庆机务段
186 HXD3D 516 518 沈阳铁路局集团有限公司 沈阳机务段
187 HXD3D 519 528 西安铁路局集团有限公司 西安机务段
188 HXD3D 529 538 北京铁路局集团有限公司 北京机务段
189 HXD3D 539 541 呼和浩特铁路局集团有限公司 集宁机务段
190 HXD3D 542 553 西安铁路局集团有限公司 西安机务段
191 HXD3D 554 563 济南铁路局集团有限公司 济南机务段
192 HXD3D 564 568 昆明铁路局集团有限公司 昆明机务段
193 HXD3D 569 573 成都铁路局集团有限公司 重庆机务段
194 HXD3D 574 583 济南铁路局集团有限公司 济南机务段
195 HXD3D 584 584 沈阳铁路局集团有限公司 沈阳机务段
196 HXD3D 585 609 哈尔滨铁路局集团有限公司 三棵树机务段
197 HXD3D 610 611 北京铁路局集团有限公司 北京机务段
198 HXD3D 612 621 南昌铁路局集团有限公司 南昌机务段
199 HXD3D 622 626 南昌铁路局集团有限公司 南昌机务段
200 HXD3D 627 629 哈尔滨铁路局集团有限公司 三棵树机务段
201 HXD3D 630 630 哈尔滨铁路局集团有限公司 哈尔滨机务段
202 HXD3D 631 631 西安铁路局集团有限公司 西安机务段 第五代“钢人铁马号”
203 HXD3D 632 653 沈阳铁路局集团有限公司 沈阳机务段
204 HXD3D 654 673 沈阳铁路局集团有限公司 沈阳机务段
205 HXD3D 674 681 沈阳铁路局集团有限公司 沈阳机务段
206 HXD3D 682 688 兰州铁路局集团有限公司 兰州西机务段
207 HXD3D 1886 1886 哈尔滨铁路局集团有限公司 哈尔滨机务段 第五代“朱德号”
208 HXD3D 1893 1893 北京铁路局集团有限公司 丰台机务段 第六代“毛泽东号”
209 HXD3D 1921 1921 沈阳铁路局集团有限公司 沈阳机务段 共产党员号
210 HXD3D 7001 7002 广西沿海铁路股份有限公司 南宁南机务运用段
211 HXD3D 7003 7003 吉林铁道职业技术学院
212 HXD3D 8001 8025 沈阳铁路局集团有限公司 沈阳机务段 大同
213 HXD3D 8026 8028 太原铁路局集团有限公司 太原南机务段 大同
214 东方红2 1 50 资阳
215 东风 1201 1830 大连、成都
216 东风 2001 2094 戚墅堰
217 东风11 1 459 戚墅堰
218 东风12 8001 8001 吉林铁道职业技术学院
219 东风2 3201 3348 戚墅堰
220 东风21 1 5 中国铁路昆明局集团有限公司 昆明机务段
221 东风21 6 6 中国铁路昆明局集团有限公司 昆明机务段 状元号
222 东风21 7 7 中国铁路昆明局集团有限公司 昆明机务段 亲年号
223 东风21 8 8 中国铁路昆明局集团有限公司 昆明机务段 建水古城
224 东风21 9 100 中国铁路昆明局集团有限公司 昆明机务段
225 东风21 101 101 中国铁路昆明局集团有限公司 昆明机务段 异龙号
226 东风21 102 102 中国铁路昆明局集团有限公司 昆明机务段
227 东风21 1001 1002 云南钢铁厂
228 东风2Z 3251 3251 *齐齐哈尔铁路局 加格达奇机务段
229 东风3 3243 3243 中车共享城机车公园
230 东风4 3247 3247 中车成都轨道交通产业园
231 东风4B 1001 1999 大连
232 东风4B 1963 1963 *北京铁路局 丰台机务段
233 东风4B 2101 2685 大连
234 东风4B 2104 2104 *上海铁路局 蚌埠机务段
235 东风4B 2376 2376 *南昌铁路局 鹰潭机务段
236 东风4B 3101 3999 资阳
237 东风4B 3214 3214 *浙江金温铁道开发有限公司 温州机务段
238 东风4B 3249 3249 *西安铁路局 西安机务段
239 东风4B 3390 3390 *成都铁路局 重庆机务段
240 东风4B 3593 3593 *广州铁路(集团)公司 株洲机务段
241 东风4B 6001 6587 大同
242 东风4B 6530 6530 *南宁铁路局 南宁机务段
243 东风4B 7001 7363 大连
244 东风4B 7364 7365 四方
245 东风4B 7366 7796 大连
246 东风4B 7701 7732 戚墅堰改
247 东风4B 9001 9702 资阳
248 东风4B 9167 9167 *南昌铁路局 向塘机务段
249 东风4B 9531 9531 *新长铁路公司
250 东风4C 1 10 大同
251 东风4C 11 11 北京铁路局 丰台段 青年文明号
252 东风4C 12 40 大同
253 东风4C 2001 2006 四方
254 东风4C 4001 4465 大连
255 东风4C 4466 4466 四方机车车辆厂 四方
256 东风4C 5001 5273 资阳
257 东风4C 5274 5275 三茂铁路公司 三水机务段 东风4CK
258 东风4C 5276 5335 资阳
259 东风4D 7001 7021 中国铁路南宁局集团有限公司
260 东风5 1 1 中国铁路北京局集团有限公司 北京车辆段
261 东风5 1974 1975 中国铁路兰州局集团有限公司 兰州西机务段 唐山
262 东风5 1976 2082 唐山
263 东风5 2083 2083 中国石油兰州石化公司 唐山
264 东风5 3279 3279 云南铁路博物馆
265 东风6 1 2 *沈阳铁路局 大连机务段
266 东风6 3 3 沈阳铁路陈列馆
267 东风6 4 4 *沈阳铁路局 大连机务段
268 东风7 174 174 太原机务段北场
269 东风7B 3006 3006 中国铁道博物馆
270 东风7B 3015 3015 王坪村铁路公园
271 东风7B 6001 6072 *北京铁路局 邯郸机务段;郑州铁路局 新乡机务段 调车
272 东风7D 1 1 中国铁道博物馆
273 东风7D 3001 3001 中国铁道博物馆
274 东风7E 1 1 郑州铁路局 新乡机务段
275 东风7E 2 2 郑州铁路局 郑州机务段
276 东风7G 9001 9004 呼和浩特铁路局 集宁机务段 赛汗塔拉分段
277 东风8 1 1 中国铁道博物馆
278 东风9 1 2 中国铁路广州局集团有限公司广州机务段
279 韶山1 8 8 中国铁道博物馆
280 韶山1 156 156 郑州世纪欢乐园
281 韶山1 160 160 北京铁路电气化学校
282 韶山1 227 227 兰州铁路局 兰州西机务段
283 韶山1 254 254 北京铁路局 丰台机务段 储备厂
284 韶山1 307 307 太原铁路局 榆次机务折返段
285 韶山1 309 309 太原铁路局 太原机务段北场
286 韶山1 321 321 武汉铁路职业技术学院
287 韶山1 681 681 中国铁道博物馆
288 韶山1 695 695 沈阳铁路陈列馆
289 韶山1 762 762 广州铁路(集团)公司 娄底运用车间储备厂
290 韶山1 818 818 西南交通大学 机车博物园
291 韶山1 821 821 韶关机务实训基地
292 韶山1 826 826 韶关机务实训基地
293 韶山3 454 454 成都铁路局 贵阳机务段 先锋号
294 韶山3 524 524 武汉铁路局 江岸机务段 青年号
295 韶山3 4160 4160 广西沿海铁路公司 南宁南机务运用段 共青团号
296 韶山3 4178 4178 广西沿海铁路公司 南宁南机务运用段 共青团号
297 韶山3 4235 4235 成都铁路局 重庆机务段 青年文明号
298 韶山3 4258 4258 成都铁路局 重庆机务段 党员先锋号
299 韶山3 5080 5080 广铁机车博物馆
300 韶山3 6005 6005 湖南交通工程学院
301 韶山3 8050 8050 武汉四美塘铁路遗址公园
302 韶山3B 16 16 西安铁路局 安康机务段 青年文明号
303 韶山3B 5001 5001 成都铁路局 贵阳机务段 *先锋力神
304 韶山3B 5035 5035 兰州铁路局 迎水桥机务段 雷锋号 (曾)
305 韶山3B 5038 5038 兰州铁路局 迎水桥机务段 青年文明号
306 韶山3B 5151 5151 成都铁路局 西昌机务段 扶贫先锋号
307 韶山3B 5162 5162 昆明铁路局 昆明机务段 五四青年号
308 韶山3B 5235 5235 成都铁路局 西昌机务段 *共青团号
309 韶山3C 1 1 贵阳机务段
310 韶山4 6 6 中国铁道博物馆
311 韶山4 10 10 成都铁路局 西昌机务段
312 韶山4 50 50 郑州铁路局 新乡机务段 先锋号
313 韶山4 63 63 太原铁路局 太原机务段
314 韶山4 204 204 郑州铁路局 新乡机务段 先锋号
315 韶山4 448 448 沈阳铁路局 苏家屯机务段 先锋号
316 韶山4 574 574 中铁三局集团 先锋号
317 韶山4 743 743 哈尔滨铁路局 哈尔滨机务段 青年文明号
318 韶山4 855 855 西安铁路局 新丰镇机务段
319 韶山4 911 911 中铁三局集团 青年文明号
320 韶山4 2006 2006 吉林铁道职业技术学院
321 韶山4B 19 19 神朔铁路公司 神木北机务段 青年号
322 韶山4B 89 89 神朔铁路公司 神木北机务段 青年文明号
323 韶山4B 90 90 神朔铁路公司 神木北机务段 青年文明号
324 韶山4B 257 257 包神铁路公司 东胜机务段 党员先锋号
325 韶山4G 159 1177 株洲
326 韶山4G 168 168 中国铁道博物馆
327 韶山4G 171 171 哈尔滨铁路局 牡丹江机务段
328 韶山4G 179 179 太原铁路局 湖东机务段
329 韶山4G 466 466 石家庄铁道大学
330 韶山4G 1089 1089 *呼和浩特铁路局 包头西机务段
331 韶山4G 1886 1886 哈尔滨铁路局 哈尔滨机务段 *朱德号 株洲
332 韶山4G 3001 3002 资阳
333 韶山4G 6001 6001 中国铁道博物馆
334 韶山4G 6001 6001 中国铁道博物馆 大同
335 韶山4G 7001 7110 大连
336 韶山4G 7121 7243 大连
337 韶山5 1 1 中国铁道博物馆
338 韶山5 2 2 郑州世纪欢乐园
339 韶山6 1 1 郑州铁路司机学校
340 韶山6 2 2 中国铁道博物馆
341 韶山6B 1011 1011 西安铁路局 西安机务段 *青年文明号
342 韶山6B 1026 1026 韶关机务实训基地
343 韶山6B 1088 1088 武汉铁路局 襄阳机务段 *民兵号
344 韶山6B 1111 1111 武汉铁路局 襄阳机务段 *先锋号
345 韶山6B 6001 6001 韶关机务实训基地
346 韶山6B 6002 6002 广州铁路博物馆
347 韶山7 1 79 南宁铁路局集团有限公司 柳州机务段
348 韶山7 76 76 南宁铁路局集团有限公司 南宁机务段 *五四红旗号
349 韶山7 80 84 南宁铁路局集团有限公司 柳州机务段
350 韶山7 85 111 南宁铁路局集团有限公司 柳州机务段
351 韶山7 8112 8113 山西孝柳铁路有限责任公司
352 韶山7B 1 1 *南宁铁路局集团有限公司 南宁机务段
353 韶山7B 2 2 中国铁路南宁局集团有限公司 柳州机务段
354 韶山7D 1 58 西安铁路局集团有限公司 西安机务段
355 韶山7D 631 631 西安铁路局集团有限公司 西安机务段 *钢人铁马号
356 韶山7E 1 140 大同
357 韶山7E 6001 6002 昆明铁路局 大同
358 韶山7E 7001 7004 大连
359 韶山8 1 1 中国铁路广州局集团有限公司 广州机务段
360 韶山8 2 2 中国铁路广州局集团有限公司 广州机务段
361 韶山8 3 4 中国铁路上海局集团有限公司 上海机务段
362 韶山8 5 5 中国铁路郑州局集团有限公司 郑州机务段
363 韶山8 9 9 中国铁路郑州局集团有限公司 郑州机务段
364 韶山8 11 11 中国铁路郑州局集团有限公司 郑州机务段
365 韶山8 12 12 中国铁路郑州局集团有限公司 郑州机务段
366 韶山8 15 16 中国铁路郑州局集团有限公司 郑州机务段
367 韶山8 17 17 中国铁路上海局集团有限公司 上海机务段
368 韶山8 20 20 中国铁路郑州局集团有限公司 郑州机务段
369 韶山8 24 25 中国铁路郑州局集团有限公司 郑州机务段
370 韶山8 27 27 中国铁路郑州局集团有限公司 郑州机务段
371 韶山8 29 32 中国铁路郑州局集团有限公司 郑州机务段
372 韶山8 33 35 中国铁路上海局集团有限公司 上海机务段
373 韶山8 36 36 中国铁路郑州局集团有限公司 郑州机务段
374 韶山8 38 38 中国铁路上海局集团有限公司 上海机务段
375 韶山8 39 39 中国铁路上海局集团有限公司 上海机务段 国祥号
376 韶山8 40 40 中国铁路上海局集团有限公司 上海机务段
377 韶山8 41 41 中国铁路北京局集团有限公司 北京机务段
378 韶山8 43 43 中国铁路郑州局集团有限公司 郑州机务段
379 韶山8 44 44 中国铁路北京局集团有限公司 邯郸机务段
380 韶山8 45 45 中国铁路郑州局集团有限公司 郑州机务段
381 韶山8 48 48 中国铁路北京局集团有限公司 邯郸机务段
382 韶山8 49 49 中国铁路南昌局集团有限公司 南昌机务段
383 韶山8 50 50 中国铁路南昌局集团有限公司 南昌机务段
384 韶山8 51 51 中国铁路北京局集团有限公司 邯郸机务段
385 韶山8 52 52 中国铁路上海局集团有限公司 上海机务段
386 韶山8 55 55 中国铁路南昌局集团有限公司 南昌机务段
387 韶山8 56 57 中国铁路北京局集团有限公司 邯郸机务段
388 韶山8 64 64 中国铁路广州局集团有限公司 广州机务段
389 韶山8 72 72 中国铁路北京局集团有限公司 邯郸机务段
390 韶山8 73 73 中国铁路北京局集团有限公司 北京机务段
391 韶山8 74 74 中国铁路北京局集团有限公司 邯郸机务段
392 韶山8 81 81 中国铁路北京局集团有限公司 北京机务段
393 韶山8 83 84 中国铁路郑州局集团有限公司 郑州机务段
394 韶山8 85 85 中国铁路北京局集团有限公司 北京机务段
395 韶山8 88 103 中国铁路郑州局集团有限公司 郑州机务段
396 韶山8 104 104 中国铁路北京局集团有限公司 邯郸机务段
397 韶山8 109 111 中国铁路南昌局集团有限公司 南昌机务段
398 韶山8 114 116 中国铁路南昌局集团有限公司 南昌机务段
399 韶山8 118 119 中国铁路北京局集团有限公司 北京机务段
400 韶山8 121 126 中国铁路北京局集团有限公司 北京机务段
401 韶山8 127 128 中国铁路郑州局集团有限公司 郑州机务段
402 韶山8 130 130 中国铁路南昌局集团有限公司 南昌机务段
403 韶山8 131 131 中国铁路广州局集团有限公司 长沙机务段
404 韶山8 132 132 中国铁路广州局集团有限公司 长沙机务段
405 韶山8 133 133 中国铁路广州局集团有限公司 长沙机务段
406 韶山8 134 134 中国铁路广州局集团有限公司 长沙机务段
407 韶山8 136 136 中国铁路广州局集团有限公司 长沙机务段
408 韶山8 141 141 中国铁路广州局集团有限公司 广州机务段
409 韶山8 144 144 中国铁路广州局集团有限公司 长沙机务段
410 韶山8 148 148 中国铁路广州局集团有限公司 广州机务段
411 韶山8 156 156 中国铁路广州局集团有限公司 广州机务段
412 韶山8 163 163 中国铁路广州局集团有限公司 广州机务段
413 韶山8 166 166 中国铁路广州局集团有限公司 广州机务段 新世纪金龙号
414 韶山8 171 171 中国铁路上海局集团有限公司 上海机务段
415 韶山8 172 172 中国铁路郑州局集团有限公司 郑州机务段
416 韶山8 173 173 中国铁路广州局集团有限公司 广州机务段
417 韶山8 181 181 中国铁路广州局集团有限公司 广州机务段
418 韶山8 186 186 中国铁路广州局集团有限公司 广州机务段
419 韶山8 191 191 中国铁路广州局集团有限公司 广州机务段
420 韶山8 192 192 中国铁路广州局集团有限公司 广州机务段
421 韶山8 197 197 中国铁路郑州局集团有限公司 郑州机务段
422 韶山8 200 204 中国铁路上海局集团有限公司 上海机务段
423 韶山8 205 205 中国铁路广州局集团有限公司 长沙机务段
424 韶山8 214 214 中国铁路郑州局集团有限公司 郑州机务段
425 韶山9 1 3 沈阳铁路局 沈阳机务段;上海铁路局 上海机务段
426 韶山9 5 29 沈阳铁路局 沈阳机务段;上海铁路局 上海机务段
427 韶山9 30 30 沈阳铁路局 通辽机务段
428 韶山9 31 37 沈阳铁路局 沈阳机务段;上海铁路局 上海机务段
429 韶山9 38 38 沈阳铁路局 通辽机务段
430 韶山9 39 43 沈阳铁路局 沈阳机务段;上海铁路局 上海机务段

View File

@@ -0,0 +1,489 @@
package receiver.lbj
import android.annotation.SuppressLint
import android.bluetooth.*
import android.content.Context
import android.os.Handler
import android.os.Looper
import android.util.Log
import java.nio.charset.StandardCharsets
import org.json.JSONObject
import java.util.*
class BLEClient(private val context: Context) : BluetoothGattCallback(),
BluetoothAdapter.LeScanCallback {
companion object {
const val TAG = "LBJ_BT"
const val SCAN_PERIOD = 10000L
val SERVICE_UUID = UUID.fromString("0000ffe0-0000-1000-8000-00805f9b34fb")
val CHAR_UUID = UUID.fromString("0000ffe1-0000-1000-8000-00805f9b34fb")
const val CMD_GET_STATUS = "STATUS"
const val RESP_STATUS = "STATUS:"
const val RESP_ERROR = "ERROR:"
}
private var bluetoothGatt: BluetoothGatt? = null
private var deviceAddress: String? = null
private var isConnected = false
private var isScanning = false
private var statusCallback: ((String) -> Unit)? = null
private var scanCallback: ((BluetoothDevice) -> Unit)? = null
private var connectionStateCallback: ((Boolean) -> Unit)? = null
private var trainInfoCallback: ((JSONObject) -> Unit)? = null
private var handler = Handler(Looper.getMainLooper())
private var targetDeviceName: String? = null
fun setTrainInfoCallback(callback: (JSONObject) -> Unit) {
trainInfoCallback = callback
}
@SuppressLint("MissingPermission")
fun scanDevices(targetDeviceName: String? = null, callback: (BluetoothDevice) -> Unit) {
try {
scanCallback = callback
this.targetDeviceName = targetDeviceName
val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() ?: run {
Log.e(TAG, "Bluetooth adapter unavailable")
return
}
if (!bluetoothAdapter.isEnabled) {
Log.e(TAG, "Bluetooth adapter disabled")
return
}
handler.postDelayed({
stopScan()
}, SCAN_PERIOD)
isScanning = true
Log.d(TAG, "Starting BLE scan target=${targetDeviceName ?: "Any"}")
bluetoothAdapter.startLeScan(this)
} catch (e: SecurityException) {
Log.e(TAG, "Scan security error: ${e.message}")
} catch (e: Exception) {
Log.e(TAG, "BLE scan failed: ${e.message}")
}
}
@SuppressLint("MissingPermission")
fun stopScan() {
if (isScanning) {
val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
bluetoothAdapter.stopLeScan(this)
isScanning = false
}
}
override fun onLeScan(device: BluetoothDevice, rssi: Int, scanRecord: ByteArray) {
val deviceName = device.name
if (targetDeviceName != null) {
if (deviceName == null || !deviceName.equals(targetDeviceName, ignoreCase = true)) {
return
}
}
scanCallback?.invoke(device)
}
@SuppressLint("MissingPermission")
fun connect(address: String, onConnectionStateChange: ((Boolean) -> Unit)? = null): Boolean {
if (address.isBlank()) {
Log.e(TAG, "Connection failed empty address")
handler.post { onConnectionStateChange?.invoke(false) }
return false
}
try {
val bluetoothAdapter = BluetoothAdapter.getDefaultAdapter() ?: run {
Log.e(TAG, "Bluetooth adapter unavailable")
handler.post { onConnectionStateChange?.invoke(false) }
return false
}
bluetoothGatt?.close()
bluetoothGatt = null
val device = bluetoothAdapter.getRemoteDevice(address)
deviceAddress = address
connectionStateCallback = onConnectionStateChange
bluetoothGatt = device.connectGatt(context, false, this, BluetoothDevice.TRANSPORT_LE)
Log.d(TAG, "Connecting to address=$address")
handler.postDelayed({
if (!isConnected && deviceAddress == address) {
Log.e(TAG, "Connection timeout reconnecting")
bluetoothGatt?.close()
bluetoothGatt =
device.connectGatt(context, false, this, BluetoothDevice.TRANSPORT_LE)
}
}, 10000)
return true
} catch (e: Exception) {
Log.e(TAG, "Connection failed: ${e.message}")
handler.post { onConnectionStateChange?.invoke(false) }
return false
}
}
fun isConnected(): Boolean {
return isConnected
}
@SuppressLint("MissingPermission")
fun disconnect() {
bluetoothGatt?.disconnect()
}
@SuppressLint("MissingPermission")
fun getStatus(callback: (String) -> Unit) {
statusCallback = callback
bluetoothGatt?.let { gatt ->
val service = gatt.getService(SERVICE_UUID)
if (service != null) {
val characteristic = service.getCharacteristic(CHAR_UUID)
if (characteristic != null) {
characteristic.value = CMD_GET_STATUS.toByteArray()
gatt.writeCharacteristic(characteristic)
} else {
Log.e(TAG, "Characteristic not found")
statusCallback?.invoke("ERROR: Characteristic not found")
}
} else {
Log.e(TAG, "Service not found")
statusCallback?.invoke("ERROR: Service not found")
}
}
}
override fun onServicesDiscovered(gatt: BluetoothGatt, status: Int) {
super.onServicesDiscovered(gatt, status)
if (status == BluetoothGatt.GATT_SUCCESS) {
Log.i(TAG, "Discovered GATT services")
requestMtu(gatt)
} else {
Log.w(TAG, "Service discovery failed status=$status")
handler.post {
connectionStateCallback?.invoke(false)
}
}
}
@SuppressLint("MissingPermission")
private fun requestMtu(gatt: BluetoothGatt) {
try {
Log.d(TAG, "Requesting MTU size=512")
gatt.requestMtu(512)
} catch (e: Exception) {
Log.e(TAG, "MTU request failed: ${e.message}")
enableNotification()
}
}
override fun onMtuChanged(gatt: BluetoothGatt, mtu: Int, status: Int) {
super.onMtuChanged(gatt, mtu, status)
if (status == BluetoothGatt.GATT_SUCCESS) {
Log.d(TAG, "MTU set to $mtu")
} else {
Log.w(TAG, "MTU change failed status=$status")
}
enableNotification()
}
override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int) {
super.onConnectionStateChange(gatt, status, newState)
if (status != BluetoothGatt.GATT_SUCCESS) {
Log.e(TAG, "Connection error status=$status")
isConnected = false
if (status == 133 || status == 8) {
Log.e(TAG, "GATT error closing connection")
try {
gatt.close()
bluetoothGatt = null
deviceAddress?.let { address ->
handler.postDelayed({
Log.d(TAG, "Reconnecting to device")
val device =
BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address)
bluetoothGatt = device.connectGatt(
context,
false,
this,
BluetoothDevice.TRANSPORT_LE
)
}, 2000)
}
} catch (e: Exception) {
Log.e(TAG, "Reconnect error: ${e.message}")
}
}
handler.post { connectionStateCallback?.invoke(false) }
return
}
when (newState) {
BluetoothProfile.STATE_CONNECTED -> {
isConnected = true
Log.i(TAG, "Connected to GATT server")
handler.post { connectionStateCallback?.invoke(true) }
handler.postDelayed({
try {
gatt.discoverServices()
} catch (e: Exception) {
Log.e(TAG, "Service discovery failed: ${e.message}")
}
}, 500)
}
BluetoothProfile.STATE_DISCONNECTED -> {
isConnected = false
Log.i(TAG, "Disconnected from GATT server")
handler.post { connectionStateCallback?.invoke(false) }
if (!deviceAddress.isNullOrBlank()) {
handler.postDelayed({
Log.d(TAG, "Reconnecting after disconnect")
connect(deviceAddress!!, connectionStateCallback)
}, 3000)
}
}
}
}
private val dataBuffer = StringBuilder()
private val maxBufferSize = 1024 * 1024
private var lastDataTime = 0L
override fun onCharacteristicChanged(
gatt: BluetoothGatt,
characteristic: BluetoothGattCharacteristic
) {
super.onCharacteristicChanged(gatt, characteristic)
val newData = characteristic.value?.let {
String(it, StandardCharsets.UTF_8)
} ?: return
Log.d(TAG, "Received data len=${newData.length} preview=${newData.take(50)}")
dataBuffer.append(newData)
checkAndProcessCompleteJson()
}
private fun checkAndProcessCompleteJson() {
val bufferContent = dataBuffer.toString()
val currentTime = System.currentTimeMillis()
if (lastDataTime > 0 && currentTime - lastDataTime > 5000) {
Log.w(TAG, "Data timeout ${(currentTime - lastDataTime) / 1000}s")
}
Log.d(TAG, "Buffer size=${dataBuffer.length} bytes")
tryExtractJson(bufferContent)
lastDataTime = currentTime
}
private fun tryExtractJson(bufferContent: String) {
val openBracesCount = bufferContent.count { it == '{' }
val closeBracesCount = bufferContent.count { it == '}' }
if (openBracesCount > 0 && openBracesCount == closeBracesCount) {
Log.d(TAG, "Found JSON braces=${openBracesCount}")
val firstOpenBrace = bufferContent.indexOf('{')
val lastCloseBrace = bufferContent.lastIndexOf('}')
if (firstOpenBrace >= 0 && lastCloseBrace > firstOpenBrace) {
val possibleJson = bufferContent.substring(firstOpenBrace, lastCloseBrace + 1)
if (processJsonString(possibleJson)) {
dataBuffer.delete(0, lastCloseBrace + 1)
return
}
}
}
val firstOpenBrace = bufferContent.indexOf('{')
if (firstOpenBrace >= 0) {
var openCount = 0
var closeCount = 0
var currentEnd = -1
for (i in firstOpenBrace until bufferContent.length) {
if (bufferContent[i] == '{') {
openCount++
} else if (bufferContent[i] == '}') {
closeCount++
if (openCount == closeCount) {
currentEnd = i
break
}
}
}
if (currentEnd > firstOpenBrace) {
val possibleJson = bufferContent.substring(firstOpenBrace, currentEnd + 1)
Log.d(TAG, "Parsing JSON=${possibleJson.take(30)}...")
if (processJsonString(possibleJson)) {
dataBuffer.delete(0, currentEnd + 1)
return
}
}
}
if (dataBuffer.length > 1000) {
Log.w(TAG, "Large buffer ${dataBuffer.length} bytes")
val lastJsonStart = dataBuffer.lastIndexOf("{")
if (lastJsonStart > 0) {
dataBuffer.delete(0, lastJsonStart)
Log.d(TAG, "Kept JSON buffer=${dataBuffer.length} bytes")
} else {
dataBuffer.delete(0, dataBuffer.length / 2)
Log.d(TAG, "Cleared buffer size=${dataBuffer.length}")
}
}
}
private fun processJsonString(jsonStr: String): Boolean {
try {
val jsonObject = JSONObject(jsonStr)
Log.d(TAG, "Parsed JSON len=${jsonStr.length} preview=${jsonStr.take(50)}")
handler.post {
statusCallback?.invoke(jsonStr)
if (jsonObject.has("train")) {
Log.d(TAG, "Found train data")
trainInfoCallback?.invoke(jsonObject)
}
}
return true
} catch (e: Exception) {
Log.d(TAG, "JSON parse failed: ${e.message}")
return false
}
}
@SuppressLint("MissingPermission")
private fun enableNotification() {
bluetoothGatt?.let { gatt ->
try {
val service = gatt.getService(SERVICE_UUID)
if (service != null) {
val characteristic = service.getCharacteristic(CHAR_UUID)
if (characteristic != null) {
val result = gatt.setCharacteristicNotification(characteristic, true)
Log.d(TAG, "Notification set result=$result")
try {
val descriptor = characteristic.getDescriptor(
UUID.fromString("00002902-0000-1000-8000-00805f9b34fb")
)
if (descriptor != null) {
descriptor.value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE
val writeResult = gatt.writeDescriptor(descriptor)
Log.d(TAG, "Descriptor write result=$writeResult")
} else {
Log.e(TAG, "Descriptor not found")
requestDataAfterDelay()
}
} catch (e: Exception) {
Log.e(TAG, "Descriptor write error: ${e.message}")
requestDataAfterDelay()
}
} else {
Log.e(TAG, "Characteristic not found")
requestDataAfterDelay()
}
} else {
Log.e(TAG, "Service not found")
requestDataAfterDelay()
}
} catch (e: Exception) {
Log.e(TAG, "Notification setup error: ${e.message}")
requestDataAfterDelay()
}
}
}
private fun requestDataAfterDelay() {
handler.postDelayed({
statusCallback?.let { callback ->
getStatus(callback)
}
}, 1000)
}
}

View File

@@ -0,0 +1,637 @@
package receiver.lbj
import android.Manifest
import android.bluetooth.BluetoothAdapter
import android.bluetooth.BluetoothDevice
import android.content.Context
import android.content.Intent
import java.io.File
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.material.icons.filled.LocationOn
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.content.FileProvider
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import org.json.JSONObject
import org.osmdroid.config.Configuration
import receiver.lbj.model.TrainRecord
import receiver.lbj.model.TrainRecordManager
import receiver.lbj.ui.screens.HistoryScreen
import receiver.lbj.ui.screens.MapScreen
import receiver.lbj.ui.screens.SettingsScreen
import receiver.lbj.ui.screens.MapScreen
import receiver.lbj.ui.theme.LBJReceiverTheme
import receiver.lbj.util.LocoInfoUtil
import java.util.*
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.viewModelScope
import android.bluetooth.le.ScanCallback
import android.bluetooth.le.ScanResult
class MainActivity : ComponentActivity() {
private val TAG = "MainActivity"
private val bleClient by lazy { BLEClient(this) }
private val trainRecordManager by lazy { TrainRecordManager(this) }
private val locoInfoUtil by lazy { LocoInfoUtil(this) }
private var deviceStatus by mutableStateOf("未连接")
private var deviceAddress by mutableStateOf("")
private var isScanning by mutableStateOf(false)
private var foundDevices by mutableStateOf(listOf<BluetoothDevice>())
private var scanResults = mutableListOf<ScanResult>()
private var currentTab by mutableStateOf(0)
private var showConnectionDialog by mutableStateOf(false)
private var lastUpdateTime by mutableStateOf<Date?>(null)
private var latestRecord by mutableStateOf<TrainRecord?>(null)
private var recentRecords by mutableStateOf<List<TrainRecord>>(emptyList())
private var filterTrain by mutableStateOf("")
private var filterRoute by mutableStateOf("")
private var filterDirection by mutableStateOf("全部")
private var settingsDeviceName by mutableStateOf("LBJReceiver")
private var temporaryStatusMessage by mutableStateOf<String?>(null)
private var targetDeviceName = "LBJReceiver"
private val requestPermissions = registerForActivityResult(
ActivityResultContracts.RequestMultiplePermissions()
) { permissions ->
val bluetoothPermissionsGranted = permissions.filter { it.key.contains("BLUETOOTH") }.all { it.value }
val locationPermissionsGranted = permissions.filter { it.key.contains("LOCATION") }.all { it.value }
if (bluetoothPermissionsGranted && locationPermissionsGranted) {
Log.d(TAG, "Permissions granted")
startScan()
} else {
Log.e(TAG, "Missing permissions: $permissions")
deviceStatus = "需要蓝牙和位置权限"
}
}
private val scanCallback = object : ScanCallback() {
override fun onScanResult(callbackType: Int, result: ScanResult) {
val device = result.device
val deviceName = device.name ?: "未知设备"
val deviceAddress = device.address
Log.d(TAG, "Found device name=$deviceName address=$deviceAddress")
val existingDevice = scanResults.find { it.device.address == deviceAddress }
if (existingDevice == null) {
scanResults.add(result)
updateDeviceList()
if (deviceName == targetDeviceName) {
Log.d(TAG, "Found target=$targetDeviceName, connecting")
bleClient.stopScan()
connectToDevice(device)
showConnectionDialog = false
}
}
}
override fun onScanFailed(errorCode: Int) {
Log.e(TAG, "BLE scan failed code=$errorCode")
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
requestPermissions.launch(arrayOf(
Manifest.permission.BLUETOOTH,
Manifest.permission.BLUETOOTH_ADMIN,
Manifest.permission.BLUETOOTH_CONNECT,
Manifest.permission.BLUETOOTH_SCAN,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE
))
bleClient.setTrainInfoCallback { jsonData ->
handleTrainInfo(jsonData)
}
lifecycleScope.launch {
try {
locoInfoUtil.loadLocoData()
Log.d(TAG, "Loaded locomotive data")
} catch (e: Exception) {
Log.e(TAG, "Load locomotive data failed", e)
}
}
try {
val osmCacheDir = File(cacheDir, "osm").apply { mkdirs() }
val tileCache = File(osmCacheDir, "tiles").apply { mkdirs() }
Configuration.getInstance().apply {
userAgentValue = packageName
load(this@MainActivity, getSharedPreferences("osmdroid", Context.MODE_PRIVATE))
osmdroidBasePath = osmCacheDir
osmdroidTileCache = tileCache
expirationOverrideDuration = 86400000L * 7
tileDownloadThreads = 2
tileFileSystemThreads = 2
setUserAgentValue("LBJReceiver/1.0")
}
Log.d(TAG, "OSM cache configured")
} catch (e: Exception) {
Log.e(TAG, "OSM cache config failed", e)
}
enableEdgeToEdge()
setContent {
LBJReceiverTheme {
val scope = rememberCoroutineScope()
Surface(modifier = Modifier.fillMaxSize()) {
MainContent(
deviceStatus = deviceStatus,
isConnected = bleClient.isConnected(),
isScanning = isScanning,
currentTab = currentTab,
onTabChange = { tab -> currentTab = tab },
onConnectClick = { showConnectionDialog = true },
latestRecord = latestRecord,
recentRecords = recentRecords,
lastUpdateTime = lastUpdateTime,
temporaryStatusMessage = temporaryStatusMessage,
onRecordClick = { record ->
Log.d(TAG, "Record clicked train=${record.train}")
},
onClearMonitorLog = {
recentRecords = emptyList()
temporaryStatusMessage = null
},
allRecords = if (trainRecordManager.getFilteredRecords().isNotEmpty())
trainRecordManager.getFilteredRecords() else trainRecordManager.getAllRecords(),
recordCount = trainRecordManager.getRecordCount(),
filterTrain = filterTrain,
filterRoute = filterRoute,
filterDirection = filterDirection,
onFilterChange = { train, route, direction ->
filterTrain = train
filterRoute = route
filterDirection = direction
trainRecordManager.setFilter(train, route, direction)
},
onClearFilter = {
filterTrain = ""
filterRoute = ""
filterDirection = "全部"
trainRecordManager.clearFilter()
},
onClearRecords = {
scope.launch {
trainRecordManager.clearRecords()
recentRecords = emptyList()
latestRecord = null
temporaryStatusMessage = null
}
},
onExportRecords = {
scope.launch {
exportRecordsToCSV()
}
},
onDeleteRecords = { records ->
scope.launch {
val deletedCount = trainRecordManager.deleteRecords(records)
if (deletedCount > 0) {
Toast.makeText(
this@MainActivity,
"已删除 $deletedCount 条记录",
Toast.LENGTH_SHORT
).show()
if (records.contains(latestRecord)) {
latestRecord = null
}
}
}
},
deviceName = settingsDeviceName,
onDeviceNameChange = { newName -> settingsDeviceName = newName },
onApplySettings = {
Toast.makeText(this, "设备名称 '${settingsDeviceName}' 已保存,下次连接时生效", Toast.LENGTH_LONG).show()
Log.d(TAG, "Applied settings deviceName=${settingsDeviceName}")
},
locoInfoUtil = locoInfoUtil
)
}
}
}
}
private fun connectToDevice(device: BluetoothDevice) {
deviceStatus = "正在连接..."
Log.d(TAG, "Connecting to device name=${device.name ?: "Unknown"} address=${device.address}")
bleClient.connect(device.address) { connected ->
if (connected) {
deviceStatus = "已连接"
Log.d(TAG, "Connected to device name=${device.name ?: "Unknown"}")
} else {
deviceStatus = "连接失败或已断开连接"
Log.e(TAG, "Connection failed name=${device.name ?: "Unknown"}")
}
}
deviceAddress = device.address
stopScan()
}
private fun handleTrainInfo(jsonData: JSONObject) {
Log.d(TAG, "Received train data=${jsonData.toString().take(50)}...")
runOnUiThread {
try {
val isTestData = jsonData.optBoolean("test_flag", false)
lastUpdateTime = Date()
if (isTestData) {
Log.i(TAG, "Received keep-alive signal")
forceUiRefresh()
} else {
temporaryStatusMessage = null
val record = trainRecordManager.addRecord(jsonData)
Log.d(TAG, "Added record train=${record.train} direction=${record.direction}")
latestRecord = record
val newList = mutableListOf<TrainRecord>()
newList.add(record)
newList.addAll(recentRecords.filterNot { it.train == record.train && it.time == record.time })
recentRecords = newList.take(10)
Log.d(TAG, "Updated UI train=${record.train}")
forceUiRefresh()
}
} catch (e: Exception) {
Log.e(TAG, "Train data error: ${e.message}")
e.printStackTrace()
temporaryStatusMessage = null
forceUiRefresh()
}
}
}
private fun forceUiRefresh() {
Log.d(TAG, "Refreshing UI train=${latestRecord?.train}")
}
private fun exportRecordsToCSV() {
val records = trainRecordManager.getFilteredRecords()
val file = trainRecordManager.exportToCsv(records)
if (file != null) {
try {
val uri = FileProvider.getUriForFile(
this,
"${applicationContext.packageName}.provider",
file
)
val intent = Intent(Intent.ACTION_SEND)
intent.type = "text/csv"
intent.putExtra(Intent.EXTRA_STREAM, uri)
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
startActivity(Intent.createChooser(intent, "分享CSV文件"))
} catch (e: Exception) {
Log.e(TAG, "CSV export failed: ${e.message}")
Toast.makeText(this, "导出失败: ${e.message}", Toast.LENGTH_SHORT).show()
}
} else {
Toast.makeText(this, "导出CSV文件失败", Toast.LENGTH_SHORT).show()
}
}
private fun updateTemporaryStatusMessage(message: String) {
temporaryStatusMessage = message
Handler(Looper.getMainLooper()).postDelayed({
if (temporaryStatusMessage == message) {
temporaryStatusMessage = null
}
}, 3000)
}
private fun startScan() {
isScanning = true
foundDevices = emptyList()
val targetDeviceName = settingsDeviceName.ifBlank { null }
Log.d(TAG, "Starting BLE scan target=${targetDeviceName ?: "Any"}")
bleClient.scanDevices(targetDeviceName) { device ->
if (!foundDevices.any { it.address == device.address }) {
Log.d(TAG, "Found device name=${device.name ?: "Unknown"} address=${device.address}")
foundDevices = foundDevices + device
if (targetDeviceName != null && device.name == targetDeviceName) {
Log.d(TAG, "Found target=$targetDeviceName, connecting")
stopScan()
connectToDevice(device)
} else if (!foundDevices.any { it.address == device.address }) {
showConnectionDialog = true
}
}
}
}
private fun stopScan() {
isScanning = false
bleClient.stopScan()
Log.d(TAG, "Stopped BLE scan")
}
private fun updateDeviceList() {
foundDevices = scanResults.map { it.device }
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MainContent(
deviceStatus: String,
isConnected: Boolean,
isScanning: Boolean,
currentTab: Int,
onTabChange: (Int) -> Unit,
onConnectClick: () -> Unit,
latestRecord: TrainRecord?,
recentRecords: List<TrainRecord>,
lastUpdateTime: Date?,
temporaryStatusMessage: String? = null,
onRecordClick: (TrainRecord) -> Unit,
onClearMonitorLog: () -> Unit,
allRecords: List<TrainRecord>,
recordCount: Int,
filterTrain: String,
filterRoute: String,
filterDirection: String,
onFilterChange: (String, String, String) -> Unit,
onClearFilter: () -> Unit,
onClearRecords: () -> Unit,
onExportRecords: () -> Unit,
onDeleteRecords: (List<TrainRecord>) -> Unit,
deviceName: String,
onDeviceNameChange: (String) -> Unit,
onApplySettings: () -> Unit,
locoInfoUtil: LocoInfoUtil
) {
val statusColor = if (isConnected) Color(0xFF4CAF50) else Color(0xFFFF5722)
val timeSinceLastUpdate = remember { mutableStateOf<String?>(null) }
LaunchedEffect(key1 = lastUpdateTime) {
if (lastUpdateTime != null) {
while (true) {
val now = Date()
val diffInSec = (now.time - lastUpdateTime.time) / 1000
timeSinceLastUpdate.value = when {
diffInSec < 60 -> "${diffInSec}秒前"
diffInSec < 3600 -> "${diffInSec / 60}分钟前"
else -> "${diffInSec / 3600}小时前"
}
delay(1000)
}
} else {
timeSinceLastUpdate.value = null
}
}
Scaffold(
topBar = {
TopAppBar(
title = { Text("LBJReceiver") },
actions = {
timeSinceLastUpdate.value?.let { time ->
Text(
text = time,
modifier = Modifier.padding(end = 8.dp),
style = MaterialTheme.typography.bodySmall
)
}
Box(
modifier = Modifier
.size(10.dp)
.background(
color = statusColor,
shape = CircleShape
)
)
Spacer(modifier = Modifier.width(8.dp))
IconButton(onClick = onConnectClick) {
Icon(
imageVector = Icons.Default.Bluetooth,
contentDescription = "连接蓝牙设备"
)
}
}
)
},
bottomBar = {
NavigationBar {
NavigationBarItem(
selected = currentTab == 0,
onClick = { onTabChange(0) },
icon = { Icon(Icons.Filled.DirectionsRailway, "记录") },
label = { Text("列车记录") }
)
NavigationBarItem(
selected = currentTab == 3,
onClick = { onTabChange(3) },
icon = { Icon(Icons.Filled.LocationOn, "地图") },
label = { Text("位置地图") }
)
NavigationBarItem(
selected = currentTab == 2,
onClick = { onTabChange(2) },
icon = { Icon(Icons.Filled.Settings, "设置") },
label = { Text("设置") }
)
}
}
) { paddingValues ->
Box(
modifier = Modifier
.fillMaxSize()
.padding(paddingValues)
) {
when (currentTab) {
0 -> HistoryScreen(
records = allRecords,
latestRecord = latestRecord,
lastUpdateTime = lastUpdateTime,
temporaryStatusMessage = temporaryStatusMessage,
locoInfoUtil = locoInfoUtil,
onClearRecords = onClearRecords,
onExportRecords = onExportRecords,
onRecordClick = onRecordClick,
onClearLog = onClearMonitorLog,
onDeleteRecords = onDeleteRecords
)
2 -> SettingsScreen(
deviceName = deviceName,
onDeviceNameChange = onDeviceNameChange,
onApplySettings = onApplySettings,
)
3 -> MapScreen(
records = if (allRecords.isNotEmpty()) allRecords else recentRecords,
onCenterMap = {}
)
}
}
}
}
@Composable
fun ConnectionDialog(
isScanning: Boolean,
devices: List<BluetoothDevice>,
onDismiss: () -> Unit,
onScan: () -> Unit,
onConnect: (BluetoothDevice) -> Unit
) {
AlertDialog(
onDismissRequest = onDismiss,
title = { Text("连接设备") },
text = {
Column(modifier = Modifier.fillMaxWidth()) {
Button(
onClick = onScan,
modifier = Modifier.fillMaxWidth()
) {
Text(if (isScanning) "停止扫描" else "扫描设备")
}
Spacer(modifier = Modifier.height(8.dp))
if (isScanning) {
LinearProgressIndicator(modifier = Modifier.fillMaxWidth())
Spacer(modifier = Modifier.height(8.dp))
}
if (devices.isEmpty()) {
Text("未找到设备")
} else {
Column {
devices.forEach { device ->
Card(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
.clickable { onConnect(device) }
) {
Column(
modifier = Modifier.padding(8.dp)
) {
Text(
text = device.name ?: "未知设备",
fontWeight = FontWeight.Bold
)
Text(
text = device.address,
style = MaterialTheme.typography.bodySmall
)
}
}
}
}
}
}
},
confirmButton = {
TextButton(onClick = onDismiss) {
Text("取消")
}
}
)
}
fun Date.toSimpleFormat(): String {
val sdf = java.text.SimpleDateFormat("HH:mm:ss", Locale.getDefault())
return sdf.format(this)
}

View File

@@ -0,0 +1,152 @@
package receiver.lbj.model
import android.util.Log
import org.json.JSONObject
import java.text.SimpleDateFormat
import java.util.*
import org.osmdroid.util.GeoPoint
import receiver.lbj.util.LocationUtils
class TrainRecord(jsonData: JSONObject? = null) {
companion object {
const val TAG = "TrainRecord"
}
var timestamp: Date = Date()
var train: String = ""
var direction: Int = 0
var speed: String = ""
var position: String = ""
var time: String = ""
var loco: String = ""
var locoType: String = ""
var lbjClass: String = ""
var route: String = ""
var positionInfo: String = ""
var rssi: Double = 0.0
private var _coordinates: GeoPoint? = null
init {
jsonData?.let {
try {
if (jsonData.has("timestamp")) {
timestamp = Date(jsonData.getLong("timestamp"))
}
updateFromJson(it)
} catch (e: Exception) {
Log.e(TAG, "Failed to initialize TrainRecord from JSON: ${e.message}")
}
}
}
fun updateFromJson(jsonData: JSONObject) {
try {
Log.d(TAG, "Parsing JSON: ${jsonData.toString().take(100)}...")
train = jsonData.optString("train", "")
direction = jsonData.optInt("dir", 0)
speed = jsonData.optString("speed", "")
position = jsonData.optString("pos", "")
time = jsonData.optString("time", "")
loco = jsonData.optString("loco", "")
locoType = jsonData.optString("loco_type", "")
lbjClass = jsonData.optString("lbj_class", "")
route = jsonData.optString("route", "")
positionInfo = jsonData.optString("position_info", "")
rssi = jsonData.optDouble("rssi", 0.0)
_coordinates = null
Log.d(TAG, "Successfully parsed: train=$train, dir=$direction, speed=$speed")
} catch (e: Exception) {
Log.e(TAG, "JSON parse error: ${e.message}", e)
try { train = jsonData.optString("train", "") } catch (e: Exception) { }
try { direction = jsonData.optInt("dir", 0) } catch (e: Exception) { }
try { speed = jsonData.optString("speed", "") } catch (e: Exception) { }
try { position = jsonData.optString("pos", "") } catch (e: Exception) { }
try { time = jsonData.optString("time", "") } catch (e: Exception) { }
Log.d(TAG, "Attempting field-level parse: train=$train, dir=$direction")
}
}
fun getCoordinates(): GeoPoint? {
if (_coordinates != null) {
return _coordinates
}
_coordinates = LocationUtils.parsePositionInfo(positionInfo)
return _coordinates
}
private fun isValidValue(value: String): Boolean {
val trimmed = value.trim()
return trimmed.isNotEmpty() &&
trimmed != "NUL" &&
trimmed != "<NUL>" &&
trimmed != "NA" &&
trimmed != "<NA>" &&
!trimmed.all { it == '*' }
}
fun toMap(): Map<String, String> {
val directionText = when (direction) {
1 -> "下行"
3 -> "上行"
else -> "未知"
}
val trainDisplay = if (isValidValue(lbjClass) && isValidValue(train)) {
"${lbjClass.trim()}${train.trim()}"
} else if (isValidValue(lbjClass)) {
lbjClass.trim()
} else if (isValidValue(train)) {
train.trim()
} else ""
val map = mutableMapOf<String, String>()
if (trainDisplay.isNotEmpty()) map["train"] = trainDisplay
if (directionText != "未知") map["direction"] = directionText
if (isValidValue(speed)) map["speed"] = "速度: ${speed.trim()} km/h"
if (isValidValue(position)) map["position"] = "位置: ${position.trim()} km"
if (isValidValue(time)) map["time"] = "列车时间: ${time.trim()}"
if (isValidValue(loco)) map["loco"] = "机车号: ${loco.trim()}"
if (isValidValue(locoType)) map["loco_type"] = "型号: ${locoType.trim()}"
if (isValidValue(route)) map["route"] = "线路: ${route.trim()}"
if (isValidValue(positionInfo) && !positionInfo.trim().matches(Regex(".*(<NUL>|\\s)*.*"))) {
map["position_info"] = "位置信息: ${positionInfo.trim()}"
}
if (rssi != 0.0) map["rssi"] = "信号强度: $rssi dBm"
return map
}
fun toJSON(): JSONObject {
val json = JSONObject()
json.put("timestamp", timestamp.time)
json.put("train", train)
json.put("dir", direction)
json.put("speed", speed)
json.put("pos", position)
json.put("time", time)
json.put("loco", loco)
json.put("loco_type", locoType)
json.put("lbj_class", lbjClass)
json.put("route", route)
json.put("position_info", positionInfo)
json.put("rssi", rssi)
return json
}
}

View File

@@ -0,0 +1,216 @@
package receiver.lbj.model
import android.content.Context
import android.content.SharedPreferences
import android.os.Environment
import android.util.Log
import org.json.JSONArray
import org.json.JSONObject
import java.io.File
import java.io.FileWriter
import java.text.SimpleDateFormat
import java.util.*
import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.atomic.AtomicInteger
class TrainRecordManager(private val context: Context) {
companion object {
const val TAG = "TrainRecordManager"
const val MAX_RECORDS = 1000
private const val PREFS_NAME = "train_records"
private const val KEY_RECORDS = "records"
}
private val trainRecords = CopyOnWriteArrayList<TrainRecord>()
private val recordCount = AtomicInteger(0)
private val prefs: SharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
init {
loadRecords()
}
private var filterTrain: String = ""
private var filterRoute: String = ""
private var filterDirection: String = "全部"
fun addRecord(jsonData: JSONObject): TrainRecord {
val record = TrainRecord(jsonData)
trainRecords.add(0, record)
while (trainRecords.size > MAX_RECORDS) {
trainRecords.removeAt(trainRecords.size - 1)
}
recordCount.incrementAndGet()
saveRecords()
return record
}
fun getAllRecords(): List<TrainRecord> {
return trainRecords
}
fun getFilteredRecords(): List<TrainRecord> {
if (filterTrain.isEmpty() && filterRoute.isEmpty() && filterDirection == "全部") {
return trainRecords
}
return trainRecords.filter { record ->
matchFilter(record)
}
}
private fun matchFilter(record: TrainRecord): Boolean {
if (filterTrain.isNotEmpty() && !record.train.contains(filterTrain)) {
return false
}
if (filterRoute.isNotEmpty() && !record.route.contains(filterRoute)) {
return false
}
if (filterDirection != "全部") {
val dirText = when (record.direction) {
1 -> "下行"
3 -> "上行"
else -> "未知"
}
if (dirText != filterDirection) {
return false
}
}
return true
}
fun setFilter(train: String, route: String, direction: String) {
filterTrain = train
filterRoute = route
filterDirection = direction
}
fun clearFilter() {
filterTrain = ""
filterRoute = ""
filterDirection = "全部"
}
fun clearRecords() {
trainRecords.clear()
recordCount.set(0)
saveRecords()
}
fun deleteRecord(record: TrainRecord): Boolean {
val result = trainRecords.remove(record)
if (result) {
recordCount.decrementAndGet()
saveRecords()
}
return result
}
fun deleteRecords(records: List<TrainRecord>): Int {
var deletedCount = 0
records.forEach { record ->
if (trainRecords.remove(record)) {
deletedCount++
}
}
if (deletedCount > 0) {
recordCount.addAndGet(-deletedCount)
saveRecords()
}
return deletedCount
}
private fun saveRecords() {
try {
val jsonArray = JSONArray()
for (record in trainRecords) {
jsonArray.put(record.toJSON())
}
prefs.edit().putString(KEY_RECORDS, jsonArray.toString()).apply()
Log.d(TAG, "Saved ${trainRecords.size} records")
} catch (e: Exception) {
Log.e(TAG, "Failed to save records: ${e.message}")
}
}
private fun loadRecords() {
try {
val jsonStr = prefs.getString(KEY_RECORDS, "[]")
val jsonArray = JSONArray(jsonStr)
trainRecords.clear()
for (i in 0 until jsonArray.length()) {
val jsonObject = jsonArray.getJSONObject(i)
trainRecords.add(TrainRecord(jsonObject))
}
recordCount.set(trainRecords.size)
Log.d(TAG, "Loaded ${trainRecords.size} records")
} catch (e: Exception) {
Log.e(TAG, "Failed to load records: ${e.message}")
}
}
fun exportToCsv(records: List<TrainRecord>): File? {
try {
val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
val fileName = "train_records_$timeStamp.csv"
val downloadsDir = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)
val file = File(downloadsDir, fileName)
FileWriter(file).use { writer ->
writer.append("时间戳,列车号,列车类型,方向,速度,位置,时间,机车号,机车类型,路线,位置信息,信号强度\n")
for (record in records) {
val map = record.toMap()
writer.append(map["timestamp"]).append(",")
writer.append(map["train"]).append(",")
writer.append(map["lbj_class"]).append(",")
writer.append(map["direction"]).append(",")
writer.append(map["speed"]?.replace(" km/h", "") ?: "").append(",")
writer.append(map["position"]?.replace(" km", "") ?: "").append(",")
writer.append(map["time"]).append(",")
writer.append(map["loco"]).append(",")
writer.append(map["loco_type"]).append(",")
writer.append(map["route"]).append(",")
writer.append(map["position_info"]).append(",")
writer.append(map["rssi"]?.replace(" dBm", "") ?: "").append("\n")
}
}
return file
} catch (e: Exception) {
Log.e(TAG, "Error exporting to CSV: ${e.message}")
return null
}
}
fun getRecordCount(): Int {
return recordCount.get()
}
}

View File

@@ -0,0 +1,172 @@
package receiver.lbj.ui.components
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import org.osmdroid.tileprovider.tilesource.TileSourceFactory
import org.osmdroid.views.MapView
import org.osmdroid.views.overlay.Marker
import receiver.lbj.model.TrainRecord
@Composable
fun TrainDetailDialog(
trainRecord: TrainRecord,
onDismiss: () -> Unit
) {
val recordMap = trainRecord.toMap()
val coordinates = remember { trainRecord.getCoordinates() }
Dialog(
onDismissRequest = onDismiss,
properties = DialogProperties(
dismissOnBackPress = true,
dismissOnClickOutside = true
)
) {
Card(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 8.dp)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
.verticalScroll(rememberScrollState())
) {
Text(
text = "列车详情",
style = MaterialTheme.typography.titleLarge,
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(bottom = 16.dp)
)
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
DetailItem("列车号", recordMap["train"] ?: "--")
DetailItem("方向", recordMap["direction"] ?: "未知")
}
Divider(modifier = Modifier.padding(vertical = 8.dp))
DetailItem("接收时间", recordMap["timestamp"] ?: "--")
DetailItem("列车时间", recordMap["time"] ?: "--")
Divider(modifier = Modifier.padding(vertical = 8.dp))
DetailItem("速度", recordMap["speed"] ?: "--")
DetailItem("位置", recordMap["position"] ?: "--")
DetailItem("位置信息", recordMap["position_info"] ?: "--")
Divider(modifier = Modifier.padding(vertical = 8.dp))
DetailItem("机车号", recordMap["loco"] ?: "--")
DetailItem("机车类型", recordMap["loco_type"] ?: "--")
DetailItem("列车类型", recordMap["lbj_class"] ?: "--")
Divider(modifier = Modifier.padding(vertical = 8.dp))
DetailItem("路线", recordMap["route"] ?: "--")
DetailItem("信号强度", recordMap["rssi"] ?: "--")
if (coordinates != null) {
Divider(modifier = Modifier.padding(vertical = 8.dp))
DetailItem(
label = "经纬度",
value = "纬度: ${coordinates.latitude}, 经度: ${coordinates.longitude}"
)
Spacer(modifier = Modifier.height(8.dp))
Box(
modifier = Modifier
.fillMaxWidth()
.height(200.dp)
.padding(vertical = 8.dp),
contentAlignment = Alignment.Center
) {
AndroidView(
factory = { context ->
MapView(context).apply {
setTileSource(TileSourceFactory.MAPNIK)
setMultiTouchControls(true)
controller.setZoom(15.0)
controller.setCenter(coordinates)
val marker = Marker(this)
marker.position = coordinates
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM)
marker.title = recordMap["train"] ?: "列车"
overlays.add(marker)
}
},
update = { mapView ->
mapView.controller.setCenter(coordinates)
mapView.invalidate()
}
)
}
}
Spacer(modifier = Modifier.height(16.dp))
Button(
onClick = onDismiss,
modifier = Modifier
.fillMaxWidth()
.padding(top = 8.dp)
) {
Text("关闭")
}
}
}
}
}
@Composable
private fun DetailItem(
label: String,
value: String,
modifier: Modifier = Modifier
) {
Column(
modifier = modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
) {
Text(
text = label,
style = MaterialTheme.typography.labelMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Text(
text = value,
style = MaterialTheme.typography.bodyLarge
)
}
}

View File

@@ -0,0 +1,141 @@
package receiver.lbj.ui.components
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.material3.HorizontalDivider
import receiver.lbj.model.TrainRecord
@Composable
fun TrainInfoCard(
trainRecord: TrainRecord,
modifier: Modifier = Modifier
) {
val recordMap = trainRecord.toMap()
Card(
modifier = modifier
.fillMaxWidth()
.padding(vertical = 4.dp, horizontal = 6.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(10.dp)
) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Row(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = recordMap["train"]?.toString() ?: "",
fontWeight = FontWeight.Bold,
fontSize = 16.sp
)
Spacer(modifier = Modifier.width(4.dp))
val directionStr = recordMap["direction"]?.toString() ?: ""
val directionColor = when(directionStr) {
"上行" -> MaterialTheme.colorScheme.primary
"下行" -> MaterialTheme.colorScheme.secondary
else -> MaterialTheme.colorScheme.onSurface
}
Surface(
shape = RoundedCornerShape(4.dp),
color = directionColor.copy(alpha = 0.1f),
modifier = Modifier.padding(horizontal = 2.dp)
) {
Text(
text = directionStr,
modifier = Modifier.padding(horizontal = 4.dp, vertical = 2.dp),
fontSize = 12.sp,
color = directionColor
)
}
}
Text(
text = recordMap["timestamp"]?.toString()?.split(" ")?.getOrNull(1) ?: "",
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Spacer(modifier = Modifier.height(4.dp))
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
text = "速度: ${recordMap["speed"] ?: ""}",
fontSize = 14.sp,
fontWeight = FontWeight.Medium
)
Text(
text = "位置: ${recordMap["position"] ?: ""}",
fontSize = 14.sp,
fontWeight = FontWeight.Medium
)
}
Spacer(modifier = Modifier.height(4.dp))
HorizontalDivider(thickness = 0.5.dp)
Spacer(modifier = Modifier.height(4.dp))
Row(
modifier = Modifier.fillMaxWidth()
) {
Column(modifier = Modifier.weight(1f)) {
CompactInfoItem(label = "机车号", value = recordMap["loco"]?.toString() ?: "")
CompactInfoItem(label = "线路", value = recordMap["route"]?.toString() ?: "")
}
Column(modifier = Modifier.weight(1f)) {
CompactInfoItem(label = "类型", value = recordMap["lbj_class"]?.toString() ?: "")
CompactInfoItem(label = "信号", value = recordMap["rssi"]?.toString() ?: "")
}
}
}
}
}
@Composable
private fun CompactInfoItem(
label: String,
value: String,
modifier: Modifier = Modifier
) {
Row(
modifier = modifier
.fillMaxWidth()
.padding(vertical = 2.dp)
) {
Text(
text = "$label: ",
fontWeight = FontWeight.Medium,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Text(
text = value,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}

View File

@@ -0,0 +1,339 @@
package receiver.lbj.ui.components
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material.icons.filled.FilterList
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.*
import androidx.compose.material3.TopAppBarDefaults.topAppBarColors
import androidx.compose.runtime.*
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import receiver.lbj.model.TrainRecord
import java.text.SimpleDateFormat
import java.util.*
@Composable
fun TrainRecordsList(
records: List<TrainRecord>,
onRecordClick: (TrainRecord) -> Unit,
modifier: Modifier = Modifier
) {
Box(
modifier = modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
if (records.isEmpty()) {
Text(
text = "暂无历史记录",
modifier = Modifier.padding(16.dp),
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
} else {
LazyColumn(
modifier = Modifier.fillMaxSize(),
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp)
) {
items(records) { record ->
Card(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 2.dp)
.clickable { onRecordClick(record) },
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Column {
Row(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = record.train,
fontWeight = FontWeight.Bold,
fontSize = 15.sp
)
Spacer(modifier = Modifier.width(4.dp))
val directionText = when (record.direction) {
1 -> "下行"
3 -> "上行"
else -> "未知"
}
val directionColor = when(record.direction) {
1 -> MaterialTheme.colorScheme.secondary
3 -> MaterialTheme.colorScheme.primary
else -> MaterialTheme.colorScheme.onSurface
}
Surface(
color = directionColor.copy(alpha = 0.1f),
shape = MaterialTheme.shapes.small
) {
Text(
text = directionText,
modifier = Modifier.padding(horizontal = 4.dp, vertical = 1.dp),
fontSize = 11.sp,
color = directionColor
)
}
}
Spacer(modifier = Modifier.height(2.dp))
Text(
text = "位置: ${record.position} km",
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Column(
horizontalAlignment = Alignment.End
) {
Text(
text = "${record.speed} km/h",
fontWeight = FontWeight.Medium,
fontSize = 14.sp
)
Spacer(modifier = Modifier.height(2.dp))
val timeStr = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(record.timestamp)
Text(
text = timeStr,
fontSize = 11.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}
}
}
}
}
}
@Composable
fun TrainRecordsListWithToolbar(
records: List<TrainRecord>,
onRecordClick: (TrainRecord) -> Unit,
onFilterClick: () -> Unit,
onExportClick: () -> Unit,
onClearClick: () -> Unit,
onDeleteRecords: (List<TrainRecord>) -> Unit,
modifier: Modifier = Modifier
) {
var selectedRecords by remember { mutableStateOf<MutableSet<TrainRecord>>(mutableSetOf()) }
var selectionMode by remember { mutableStateOf(false) }
Column(modifier = modifier.fillMaxSize()) {
@OptIn(ExperimentalMaterial3Api::class)
Surface(
modifier = Modifier.fillMaxWidth(),
color = MaterialTheme.colorScheme.surface,
tonalElevation = 3.dp,
shadowElevation = 3.dp
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = if (selectionMode) "已选择 ${selectedRecords.size}" else "历史记录 (${records.size})",
style = MaterialTheme.typography.titleMedium
)
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
if (selectionMode) {
TextButton(
onClick = {
if (selectedRecords.isNotEmpty()) {
onDeleteRecords(selectedRecords.toList())
}
selectionMode = false
selectedRecords = mutableSetOf()
},
colors = ButtonDefaults.textButtonColors(
contentColor = MaterialTheme.colorScheme.error
)
) {
Text("删除")
}
TextButton(onClick = {
selectionMode = false
selectedRecords = mutableSetOf()
}) {
Text("取消")
}
} else {
IconButton(onClick = onFilterClick) {
Icon(
imageVector = Icons.Default.FilterList,
contentDescription = "筛选"
)
}
IconButton(onClick = onExportClick) {
Icon(
imageVector = Icons.Default.Share,
contentDescription = "导出"
)
}
}
}
}
}
LazyColumn(
modifier = Modifier.weight(1f),
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 8.dp),
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
items(records.chunked(2)) { rowRecords ->
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 4.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp)
) {
rowRecords.forEach { record ->
val isSelected = selectedRecords.contains(record)
Card(
modifier = Modifier
.weight(1f)
.clickable {
if (selectionMode) {
if (isSelected) {
selectedRecords.remove(record)
} else {
selectedRecords.add(record)
}
if (selectedRecords.isEmpty()) {
selectionMode = false
}
} else {
onRecordClick(record)
}
}
.padding(vertical = 2.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Column(modifier = Modifier.weight(1f)) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.fillMaxWidth()
) {
if (selectionMode) {
Checkbox(
checked = isSelected,
onCheckedChange = { checked ->
if (checked) {
selectedRecords.add(record)
} else {
selectedRecords.remove(record)
}
if (selectedRecords.isEmpty()) {
selectionMode = false
}
},
modifier = Modifier.padding(end = 8.dp)
)
}
Text(
text = record.train,
fontWeight = FontWeight.Bold,
fontSize = 15.sp,
modifier = Modifier.weight(1f)
)
if (!selectionMode) {
IconButton(
onClick = {
selectionMode = true
selectedRecords = mutableSetOf(record)
},
modifier = Modifier.size(32.dp)
) {
Icon(
imageVector = Icons.Default.Clear,
contentDescription = "删除",
modifier = Modifier.size(16.dp),
tint = MaterialTheme.colorScheme.error
)
}
}
}
if (record.speed.isNotEmpty() || record.position.isNotEmpty()) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
if (record.speed.isNotEmpty()) {
Text(
text = "${record.speed} km/h",
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
if (record.position.isNotEmpty()) {
Text(
text = "${record.position} km",
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}
val timeStr = SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(record.timestamp)
Text(
text = timeStr,
fontSize = 11.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,565 @@
package receiver.lbj.ui.screens
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.material.icons.filled.FilterList
import androidx.compose.material.icons.filled.SignalCellular4Bar
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.input.pointer.positionChange
import androidx.compose.ui.geometry.Offset
import androidx.compose.foundation.gestures.detectTransformGestures
import androidx.compose.ui.input.pointer.util.VelocityTracker
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.viewinterop.AndroidView
import kotlinx.coroutines.delay
import org.osmdroid.tileprovider.MapTileProviderBasic
import org.osmdroid.tileprovider.tilesource.TileSourceFactory
import org.osmdroid.tileprovider.tilesource.XYTileSource
import org.osmdroid.views.MapView
import org.osmdroid.views.overlay.Marker
import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay
import org.osmdroid.views.overlay.TilesOverlay
import receiver.lbj.model.TrainRecord
import receiver.lbj.util.LocoInfoUtil
import java.text.SimpleDateFormat
import java.util.*
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
@Composable
fun HistoryScreen(
records: List<TrainRecord>,
latestRecord: TrainRecord?,
lastUpdateTime: Date?,
temporaryStatusMessage: String? = null,
locoInfoUtil: LocoInfoUtil? = null,
onClearRecords: () -> Unit = {},
onExportRecords: () -> Unit = {},
onRecordClick: (TrainRecord) -> Unit = {},
onClearLog: () -> Unit = {},
onDeleteRecords: (List<TrainRecord>) -> Unit = {}
) {
val refreshKey = latestRecord?.timestamp?.time ?: 0
var isInEditMode by remember { mutableStateOf(false) }
val selectedRecords = remember { mutableStateListOf<TrainRecord>() }
val expandedStates = remember { mutableStateMapOf<String, Boolean>() }
val timeSinceLastUpdate = remember { mutableStateOf<String?>(null) }
LaunchedEffect(key1 = lastUpdateTime) {
if (lastUpdateTime != null) {
while (true) {
val now = Date()
val diffInSec = (now.time - lastUpdateTime.time) / 1000
timeSinceLastUpdate.value = when {
diffInSec < 60 -> "${diffInSec}秒前"
diffInSec < 3600 -> "${diffInSec / 60}分钟前"
else -> "${diffInSec / 3600}小时前"
}
delay(1000)
}
}
}
val filteredRecords = remember(records, refreshKey) {
records
}
fun exitEditMode() {
isInEditMode = false
selectedRecords.clear()
}
LaunchedEffect(selectedRecords.size) {
if (selectedRecords.isEmpty() && isInEditMode) {
exitEditMode()
}
}
Box(modifier = Modifier.fillMaxSize()) {
Column(modifier = Modifier.fillMaxSize()) {
Box(
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
.weight(1.0f)
) {
if (filteredRecords.isEmpty()) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Text(
"暂无列车信息",
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.outline
)
if (lastUpdateTime != null) {
Spacer(modifier = Modifier.height(8.dp))
Text(
"上次接收数据: ${
SimpleDateFormat(
"HH:mm:ss",
Locale.getDefault()
).format(lastUpdateTime)
}",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f)
)
}
}
}
} else {
LazyColumn(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
items(filteredRecords) { record ->
val isSelected = selectedRecords.contains(record)
val cardColor = when {
isSelected -> MaterialTheme.colorScheme.primaryContainer
else -> MaterialTheme.colorScheme.surface
}
Card(
modifier = Modifier.fillMaxWidth(),
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
colors = CardDefaults.cardColors(
containerColor = cardColor
),
shape = RoundedCornerShape(8.dp)
) {
Box(
modifier = Modifier
.fillMaxWidth()
.combinedClickable(
onClick = {
if (isInEditMode) {
if (isSelected) {
selectedRecords.remove(record)
} else {
selectedRecords.add(record)
}
} else {
val id = record.timestamp.time.toString()
expandedStates[id] =
!(expandedStates[id] ?: false)
if (record == latestRecord) {
onRecordClick(record)
}
}
},
onLongClick = {
if (!isInEditMode) {
isInEditMode = true
selectedRecords.clear()
selectedRecords.add(record)
}
},
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(bounded = true)
)
) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
) {
val recordMap = record.toMap()
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
val trainDisplay =
recordMap["train"]?.toString() ?: "未知列车"
val formattedInfo = when {
record.locoType.isNotEmpty() && record.loco.isNotEmpty() -> {
val shortLoco = if (record.loco.length > 5) {
record.loco.takeLast(5)
} else {
record.loco
}
"${record.locoType}-${shortLoco}"
}
record.locoType.isNotEmpty() -> record.locoType
record.loco.isNotEmpty() -> record.loco
else -> ""
}
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp)
) {
Text(
text = trainDisplay,
fontWeight = FontWeight.Bold,
fontSize = 20.sp,
color = MaterialTheme.colorScheme.primary
)
val directionText = when (record.direction) {
1 -> ""
3 -> ""
else -> ""
}
if (directionText.isNotEmpty()) {
Surface(
shape = RoundedCornerShape(2.dp),
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.size(20.dp)
) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(
text = directionText,
fontSize = 12.sp,
fontWeight = FontWeight.Bold,
color = MaterialTheme.colorScheme.surface,
maxLines = 1,
modifier = Modifier.offset(y = (-2).dp)
)
}
}
}
if (formattedInfo.isNotEmpty() && formattedInfo != "<NUL>") {
Text(
text = formattedInfo,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
Text(
text = "${record.rssi} dBm",
fontSize = 10.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Spacer(modifier = Modifier.height(4.dp))
if (recordMap.containsKey("time")) {
recordMap["time"]?.split("\n")?.forEach { timeLine ->
Text(
text = timeLine,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
Spacer(modifier = Modifier.height(8.dp))
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
val routeStr = record.route.trim()
val isValidRoute =
routeStr.isNotEmpty() && !routeStr.all { it == '*' }
val position = record.position.trim()
val isValidPosition = position.isNotEmpty() &&
!position.all { it == '-' || it == '.' } &&
position != "<NUL>"
if (isValidRoute || isValidPosition) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.height(24.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp)
) {
if (isValidRoute) {
Text(
text = "$routeStr",
fontSize = 16.sp,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.alignByBaseline()
)
}
if (isValidPosition) {
Text(
text = "${position}K",
fontSize = 16.sp,
color = MaterialTheme.colorScheme.onSurface,
modifier = Modifier.alignByBaseline()
)
}
}
}
val speed = record.speed.trim()
val isValidSpeed = speed.isNotEmpty() &&
!speed.all { it == '*' || it == '-' } &&
speed != "NUL" &&
speed != "<NUL>"
if (isValidSpeed) {
Text(
text = "${speed} km/h",
fontSize = 16.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}
if (locoInfoUtil != null && record.locoType.isNotEmpty() && record.loco.isNotEmpty()) {
val locoInfoText = locoInfoUtil.getLocoInfoDisplay(
record.locoType,
record.loco
)
if (locoInfoText != null) {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = locoInfoText,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}
val recordId = record.timestamp.time.toString()
if (expandedStates[recordId] == true) {
val coordinates = remember { record.getCoordinates() }
if (coordinates != null) {
Spacer(modifier = Modifier.height(8.dp))
}
if (coordinates != null) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(220.dp)
.padding(vertical = 4.dp)
.clip(RoundedCornerShape(8.dp)),
contentAlignment = Alignment.Center
) {
AndroidView(
modifier = Modifier.clickable(
indication = null,
interactionSource = remember { MutableInteractionSource() }
) {},
factory = { context ->
MapView(context).apply {
setTileSource(TileSourceFactory.MAPNIK)
setMultiTouchControls(true)
zoomController.setVisibility(org.osmdroid.views.CustomZoomButtonsController.Visibility.NEVER)
isHorizontalMapRepetitionEnabled =
false
isVerticalMapRepetitionEnabled =
false
setHasTransientState(true)
setOnTouchListener { v, event ->
v.parent?.requestDisallowInterceptTouchEvent(
true
)
false
}
controller.setZoom(10.0)
controller.setCenter(coordinates)
this.isTilesScaledToDpi = true
this.setUseDataConnection(true)
try {
val railwayTileSource =
XYTileSource(
"OpenRailwayMap",
8, 16,
256,
".png",
arrayOf(
"https://a.tiles.openrailwaymap.org/standard/",
"https://b.tiles.openrailwaymap.org/standard/",
"https://c.tiles.openrailwaymap.org/standard/"
),
"© OpenRailwayMap contributors, © OpenStreetMap contributors"
)
val railwayProvider =
MapTileProviderBasic(context)
railwayProvider.tileSource =
railwayTileSource
val railwayOverlay =
TilesOverlay(
railwayProvider,
context
)
railwayOverlay.loadingBackgroundColor =
android.graphics.Color.TRANSPARENT
railwayOverlay.loadingLineColor =
android.graphics.Color.TRANSPARENT
overlays.add(railwayOverlay)
} catch (e: Exception) {
e.printStackTrace()
}
try {
val locationProvider =
GpsMyLocationProvider(
context
).apply {
locationUpdateMinDistance =
10f
locationUpdateMinTime =
1000
}
MyLocationNewOverlay(
locationProvider,
this
).apply {
enableMyLocation()
}.also { overlays.add(it) }
} catch (e: Exception) {
e.printStackTrace()
}
val marker = Marker(this)
marker.position = coordinates
val latStr = String.format(
"%.4f",
coordinates.latitude
)
val lonStr = String.format(
"%.4f",
coordinates.longitude
)
val coordStr =
"${latStr}°N, ${lonStr}°E"
marker.title =
recordMap["train"]?.toString()
?: "列车"
marker.snippet = coordStr
marker.setInfoWindowAnchor(
Marker.ANCHOR_CENTER,
0f
)
overlays.add(marker)
marker.showInfoWindow()
}
},
update = { mapView ->
mapView.invalidate()
}
)
}
}
if (recordMap.containsKey("position_info")) {
Spacer(modifier = Modifier.height(8.dp))
Text(
text = recordMap["position_info"] ?: "",
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}
}
}
}
}
}
}
}
}
}
if (isInEditMode) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.TopCenter
) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(56.dp)
.background(MaterialTheme.colorScheme.primary)
) {
Row(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
IconButton(onClick = { exitEditMode() }) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = "取消",
tint = MaterialTheme.colorScheme.onPrimary
)
}
Text(
"已选择 ${selectedRecords.size} 条记录",
color = MaterialTheme.colorScheme.onPrimary
)
}
IconButton(
onClick = {
if (selectedRecords.isNotEmpty()) {
onDeleteRecords(selectedRecords.toList())
exitEditMode()
}
}
) {
Icon(
imageVector = Icons.Default.Delete,
contentDescription = "删除所选记录",
tint = MaterialTheme.colorScheme.onPrimary
)
}
}
}
}
}
}

View File

@@ -0,0 +1,559 @@
package receiver.lbj.ui.screens
import android.Manifest
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.graphics.PorterDuff
import android.graphics.PorterDuffColorFilter
import android.location.Location
import android.location.LocationListener
import android.util.Log
import android.location.LocationManager
import android.view.View
import android.view.ViewGroup
import androidx.compose.foundation.layout.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.MyLocation
import androidx.compose.material.icons.filled.Layers
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.viewinterop.AndroidView
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import kotlinx.coroutines.launch
import org.osmdroid.config.Configuration
import org.osmdroid.tileprovider.MapTileProviderBasic
import org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase
import org.osmdroid.tileprovider.tilesource.TileSourceFactory
import org.osmdroid.tileprovider.tilesource.XYTileSource
import org.osmdroid.util.GeoPoint
import org.osmdroid.views.MapView
import org.osmdroid.views.overlay.*
import org.osmdroid.views.overlay.compass.CompassOverlay
import org.osmdroid.views.overlay.compass.InternalCompassOrientationProvider
import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay
import receiver.lbj.model.TrainRecord
import java.io.File
import java.util.*
@Composable
fun MapScreen(
records: List<TrainRecord>,
onCenterMap: () -> Unit = {},
onLocationError: (String) -> Unit = {}
) {
val context = LocalContext.current
val lifecycleOwner = LocalLifecycleOwner.current
val coroutineScope = rememberCoroutineScope()
LaunchedEffect(Unit) {
try {
val osmCacheDir = File(context.cacheDir, "osm").apply { mkdirs() }
val tileCache = File(osmCacheDir, "tiles").apply { mkdirs() }
Configuration.getInstance().apply {
userAgentValue = context.packageName
load(context, context.getSharedPreferences("osmdroid", Context.MODE_PRIVATE))
osmdroidBasePath = osmCacheDir
osmdroidTileCache = tileCache
expirationOverrideDuration = 86400000L
gpsWaitTime = 0L
tileDownloadThreads = 2
tileFileSystemThreads = 2
}
} catch (e: Exception) {
e.printStackTrace()
onLocationError("地图初始化失败:${e.localizedMessage}")
}
}
val validRecords = records.filter { it.getCoordinates() != null }
val defaultPosition = GeoPoint(39.0851, 117.2015)
var isMapInitialized by remember { mutableStateOf(false) }
val mapViewRef = remember { mutableStateOf<MapView?>(null) }
val railwayOverlayRef = remember { mutableStateOf<TilesOverlay?>(null) }
val myLocationOverlayRef = remember { mutableStateOf<MyLocationNewOverlay?>(null) }
var currentLocation by remember { mutableStateOf<GeoPoint?>(null) }
var showDetailDialog by remember { mutableStateOf(false) }
var selectedRecord by remember { mutableStateOf<TrainRecord?>(null) }
var dialogPosition by remember { mutableStateOf<GeoPoint?>(null) }
var railwayLayerVisible by remember { mutableStateOf(true) }
DisposableEffect(lifecycleOwner) {
val observer = LifecycleEventObserver { _, event ->
try {
when (event) {
Lifecycle.Event.ON_RESUME -> {
mapViewRef.value?.onResume()
myLocationOverlayRef.value?.enableMyLocation()
}
Lifecycle.Event.ON_PAUSE -> {
mapViewRef.value?.onPause()
myLocationOverlayRef.value?.disableMyLocation()
}
Lifecycle.Event.ON_DESTROY -> {
mapViewRef.value?.onDetach()
}
else -> {}
}
} catch (e: Exception) {
e.printStackTrace()
}
}
lifecycleOwner.lifecycle.addObserver(observer)
onDispose {
try {
lifecycleOwner.lifecycle.removeObserver(observer)
myLocationOverlayRef.value?.disableMyLocation()
mapViewRef.value?.onDetach()
} catch (e: Exception) {
e.printStackTrace()
}
}
}
fun updateMarkers() {
val mapView = mapViewRef.value ?: return
mapView.overlays.removeAll { it is Marker }
validRecords.forEach { record ->
record.getCoordinates()?.let { point ->
val marker = Marker(mapView).apply {
position = point
setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM)
val recordMap = record.toMap()
title = recordMap["train"]?.toString() ?: "列车"
val latStr = String.format("%.4f", point.latitude)
val lonStr = String.format("%.4f", point.longitude)
val coordStr = "${latStr}°N, ${lonStr}°E"
snippet = coordStr
setInfoWindowAnchor(Marker.ANCHOR_CENTER, 0f)
setOnMarkerClickListener { clickedMarker, _ ->
selectedRecord = record
dialogPosition = point
showDetailDialog = true
true
}
}
mapView.overlays.add(marker)
marker.showInfoWindow()
}
}
mapView.invalidate()
if (!isMapInitialized && validRecords.isNotEmpty()) {
validRecords.firstOrNull()?.getCoordinates()?.let { point ->
mapView.controller.setZoom(12.0)
mapView.controller.setCenter(point)
isMapInitialized = true
}
}
}
fun updateRailwayLayerVisibility(visible: Boolean) {
railwayOverlayRef.value?.let { overlay ->
overlay.isEnabled = visible
if (!visible) {
val transparentFilter = PorterDuffColorFilter(
Color.argb(0, 255, 255, 255),
PorterDuff.Mode.SRC_IN
)
overlay.setColorFilter(transparentFilter)
} else {
overlay.setColorFilter(null)
}
mapViewRef.value?.invalidate()
Log.d("MapScreen", "OpenRailwayMap layer ${if (visible) "shown" else "hidden"}")
}
}
Box(modifier = Modifier.fillMaxSize()) {
AndroidView(
factory = { ctx ->
try {
MapView(ctx).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
setTileSource(TileSourceFactory.MAPNIK)
setMultiTouchControls(true)
zoomController.setVisibility(org.osmdroid.views.CustomZoomButtonsController.Visibility.NEVER)
isTilesScaledToDpi = true
setUseDataConnection(true)
minZoomLevel = 4.0
maxZoomLevel = 18.0
try {
val provider = MapTileProviderBasic(ctx)
provider.tileSource = TileSourceFactory.MAPNIK
val tileOverlay = TilesOverlay(provider, ctx)
tileOverlay.loadingBackgroundColor = Color.TRANSPARENT
tileOverlay.loadingLineColor = Color.TRANSPARENT
overlays.add(tileOverlay)
} catch (e: Exception) {
e.printStackTrace()
}
try {
val railwayTileSource = XYTileSource(
"OpenRailwayMap",
8, 16,
256,
".png",
arrayOf(
"https://a.tiles.openrailwaymap.org/standard/",
"https://b.tiles.openrailwaymap.org/standard/",
"https://c.tiles.openrailwaymap.org/standard/"
),
"© OpenRailwayMap contributors, © OpenStreetMap contributors"
)
val railwayProvider = MapTileProviderBasic(ctx)
railwayProvider.tileSource = railwayTileSource
val railwayOverlay = TilesOverlay(railwayProvider, ctx)
val railwayColorFilter = PorterDuffColorFilter(
Color.rgb(0, 51, 153),
PorterDuff.Mode.MULTIPLY
)
railwayOverlay.setColorFilter(railwayColorFilter)
railwayOverlay.loadingBackgroundColor = Color.TRANSPARENT
railwayOverlay.loadingLineColor = Color.TRANSPARENT
overlays.add(railwayOverlay)
railwayOverlayRef.value = railwayOverlay
Log.d("MapScreen", "OpenRailwayMap layer loaded")
} catch (e: Exception) {
e.printStackTrace()
Log.e("MapScreen", "Failed to load OpenRailwayMap layer: ${e.message}")
}
controller.setZoom(10.0)
try {
val locationProvider = GpsMyLocationProvider(ctx).apply {
locationUpdateMinDistance = 10f
locationUpdateMinTime = 1000
}
val myLocationOverlay = MyLocationNewOverlay(locationProvider, this).apply {
enableMyLocation()
runOnFirstFix {
try {
myLocation?.let { location ->
currentLocation = GeoPoint(location.latitude, location.longitude)
if (!isMapInitialized) {
controller.animateTo(location)
isMapInitialized = true
}
} ?: run {
if (!isMapInitialized) {
controller.animateTo(defaultPosition)
}
}
} catch (e: Exception) {
e.printStackTrace()
if (!isMapInitialized) {
controller.animateTo(defaultPosition)
}
}
}
}
overlays.add(myLocationOverlay)
myLocationOverlayRef.value = myLocationOverlay
ScaleBarOverlay(this).apply {
setCentred(false)
setScaleBarOffset(5, ctx.resources.displayMetrics.heightPixels - 50)
setTextSize(10.0f)
setEnableAdjustLength(true)
setAlignBottom(true)
setLineWidth(2.0f)
}.also { overlays.add(it) }
} catch (e: Exception) {
e.printStackTrace()
onLocationError("地图组件初始化失败:${e.localizedMessage}")
}
mapViewRef.value = this
}
} catch (e: Exception) {
e.printStackTrace()
onLocationError("地图创建失败:${e.localizedMessage}")
MapView(ctx).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
}
}
},
modifier = Modifier.fillMaxSize(),
update = { mapView ->
coroutineScope.launch {
updateMarkers()
updateRailwayLayerVisibility(railwayLayerVisible)
}
}
)
if (!isMapInitialized) {
CircularProgressIndicator(
modifier = Modifier
.size(24.dp)
.align(Alignment.Center),
strokeWidth = 2.dp
)
}
Column(
modifier = Modifier
.align(Alignment.TopEnd)
.padding(8.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
FloatingActionButton(
onClick = {
myLocationOverlayRef.value?.let { overlay ->
overlay.enableFollowLocation()
overlay.enableMyLocation()
overlay.myLocation?.let { location ->
mapViewRef.value?.controller?.animateTo(location)
}
}
},
modifier = Modifier.size(40.dp),
containerColor = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f),
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
) {
Icon(
imageVector = Icons.Filled.MyLocation,
contentDescription = "定位",
modifier = Modifier.size(20.dp)
)
}
FloatingActionButton(
onClick = {
railwayLayerVisible = !railwayLayerVisible
updateRailwayLayerVisibility(railwayLayerVisible)
},
modifier = Modifier.size(40.dp),
containerColor = if (railwayLayerVisible)
MaterialTheme.colorScheme.primary.copy(alpha = 0.9f)
else
MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f),
contentColor = if (railwayLayerVisible)
MaterialTheme.colorScheme.onPrimary
else
MaterialTheme.colorScheme.onPrimaryContainer
) {
Icon(
imageVector = Icons.Filled.Layers,
contentDescription = "铁路图层",
modifier = Modifier.size(20.dp)
)
}
FloatingActionButton(
onClick = {
mapViewRef.value?.let { mapView ->
if (validRecords.isNotEmpty()) {
validRecords.firstOrNull()?.getCoordinates()?.let { point ->
mapView.controller.animateTo(point)
mapView.controller.setZoom(12.0)
}
} else {
mapView.controller.animateTo(defaultPosition)
mapView.controller.setZoom(10.0)
}
}
onCenterMap()
},
modifier = Modifier.size(40.dp),
containerColor = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f),
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
) {
Icon(
imageVector = Icons.Filled.Refresh,
contentDescription = "居中地图",
modifier = Modifier.size(20.dp)
)
}
}
Surface(
modifier = Modifier
.align(Alignment.TopStart)
.padding(8.dp)
.height(32.dp),
color = MaterialTheme.colorScheme.primaryContainer.copy(alpha = 0.9f),
shape = MaterialTheme.shapes.small
) {
Text(
text = "${validRecords.size}条记录",
modifier = Modifier.padding(horizontal = 12.dp, vertical = 6.dp),
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onPrimaryContainer
)
}
if (showDetailDialog && selectedRecord != null) {
TrainMarkerDialog(
record = selectedRecord!!,
position = dialogPosition,
onDismiss = { showDetailDialog = false }
)
}
}
}
fun Context.getCompactMarkerDrawable(color: Int): Drawable {
val drawable = this.resources.getDrawable(android.R.drawable.ic_menu_mylocation, this.theme)
drawable.setTint(color)
return drawable
}
private fun Int.directionText(): String = when (this) {
1 -> ""
3 -> ""
else -> "?"
}
@Composable
private fun TrainMarkerDialog(
record: TrainRecord,
position: GeoPoint?,
onDismiss: () -> Unit
) {
AlertDialog(
onDismissRequest = onDismiss,
title = {
val recordMap = record.toMap()
Row(verticalAlignment = Alignment.CenterVertically) {
Text(text = recordMap["train"]?.toString() ?: "列车", style = MaterialTheme.typography.titleLarge)
recordMap["direction"]?.let { direction ->
Spacer(modifier = Modifier.width(8.dp))
Text(
text = direction,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
},
text = {
Column {
record.toMap().forEach { (key, value) ->
if (key != "train" && key != "direction") {
Text(
text = value,
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.padding(vertical = 2.dp)
)
}
}
position?.let {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = "坐标: ${String.format("%.6f", it.latitude)}, ${String.format("%.6f", it.longitude)}",
style = MaterialTheme.typography.bodyMedium
)
}
}
},
confirmButton = {
TextButton(onClick = onDismiss) {
Text("确定")
}
}
)
}

View File

@@ -0,0 +1,252 @@
package receiver.lbj.ui.screens
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.delay
import receiver.lbj.model.TrainRecord
import receiver.lbj.ui.components.TrainDetailDialog
import java.text.SimpleDateFormat
import java.util.*
@Composable
fun MonitorScreen(
latestRecord: TrainRecord?,
recentRecords: List<TrainRecord>,
lastUpdateTime: Date?,
temporaryStatusMessage: String? = null,
onRecordClick: (TrainRecord) -> Unit,
onClearLog: () -> Unit
) {
var showDetailDialog by remember { mutableStateOf(false) }
var selectedRecord by remember { mutableStateOf<TrainRecord?>(null) }
val timeSinceLastUpdate = remember { mutableStateOf<String?>(null) }
LaunchedEffect(key1 = lastUpdateTime) {
if (lastUpdateTime != null) {
while (true) {
val now = Date()
val diffInSec = (now.time - lastUpdateTime.time) / 1000
timeSinceLastUpdate.value = when {
diffInSec < 60 -> "${diffInSec}秒前"
diffInSec < 3600 -> "${diffInSec / 60}分钟前"
else -> "${diffInSec / 3600}小时前"
}
delay(1000)
}
}
}
Box(modifier = Modifier.fillMaxSize().padding(16.dp)) {
Card(modifier = Modifier.fillMaxSize()) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(20.dp)
) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End,
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = timeSinceLastUpdate.value ?: "暂无数据",
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Spacer(modifier = Modifier.height(16.dp))
Box(
modifier = Modifier
.fillMaxWidth()
.weight(1f)
) {
if (latestRecord != null) {
Column(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp)
.clickable {
selectedRecord = latestRecord
showDetailDialog = true
onRecordClick(latestRecord)
}
) {
val recordMap = latestRecord.toMap()
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(
text = recordMap["train"]?.toString() ?: "",
fontWeight = FontWeight.Bold,
fontSize = 20.sp,
color = MaterialTheme.colorScheme.primary
)
Text(
text = recordMap["direction"]?.toString() ?: "",
fontWeight = FontWeight.Bold,
fontSize = 16.sp,
color = when(recordMap["direction"]?.toString()) {
"上行" -> MaterialTheme.colorScheme.primary
"下行" -> MaterialTheme.colorScheme.secondary
else -> MaterialTheme.colorScheme.onSurface
}
)
}
Spacer(modifier = Modifier.height(6.dp))
if (recordMap.containsKey("time")) {
recordMap["time"]?.split("\n")?.forEach { timeLine ->
Text(
text = timeLine,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(4.dp))
}
}
HorizontalDivider(thickness = 0.5.dp)
Spacer(modifier = Modifier.height(8.dp))
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) {
recordMap["speed"]?.let { speed ->
Text(
text = speed,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
recordMap["position"]?.let { position ->
Text(
text = position,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}
Spacer(modifier = Modifier.height(8.dp))
Row(
modifier = Modifier.fillMaxWidth()
) {
Column(modifier = Modifier.fillMaxWidth()) {
recordMap.forEach { (key, value) ->
when (key) {
"timestamp", "train", "direction", "time", "speed", "position", "position_info" -> {}
else -> {
Text(
text = value,
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
Spacer(modifier = Modifier.height(4.dp))
}
}
}
if (recordMap.containsKey("position_info")) {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = recordMap["position_info"] ?: "",
fontSize = 14.sp,
color = MaterialTheme.colorScheme.onSurface
)
}
}
}
}
} else {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Text(
"暂无列车信息",
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.outline
)
if (lastUpdateTime != null) {
Spacer(modifier = Modifier.height(8.dp))
Text(
"上次接收数据: ${SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(lastUpdateTime)}",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f)
)
}
}
}
}
}
}
}
}
if (showDetailDialog && selectedRecord != null) {
TrainDetailDialog(
trainRecord = selectedRecord!!,
onDismiss = { showDetailDialog = false }
)
}
}
@Composable
private fun InfoItem(
label: String,
value: String,
fontSize: TextUnit = 14.sp
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 2.dp)
) {
Text(
text = "$label: ",
fontWeight = FontWeight.Medium,
fontSize = fontSize,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Text(
text = value,
fontSize = fontSize,
color = MaterialTheme.colorScheme.onSurface
)
}
}

View File

@@ -0,0 +1,38 @@
package receiver.lbj.ui.screens
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SettingsScreen(
deviceName: String,
onDeviceNameChange: (String) -> Unit,
onApplySettings: () -> Unit
) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
Text("设置", style = MaterialTheme.typography.headlineMedium)
OutlinedTextField(
value = deviceName,
onValueChange = onDeviceNameChange,
label = { Text("蓝牙设备名称") },
modifier = Modifier.fillMaxWidth()
)
Button(onClick = onApplySettings, modifier = Modifier.fillMaxWidth()) {
Text("应用设备名称")
}
}
}

View File

@@ -0,0 +1,11 @@
package receiver.lbj.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)

View File

@@ -0,0 +1,50 @@
package receiver.lbj.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80
)
private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40
)
@Composable
fun LBJReceiverTheme(
darkTheme: Boolean = true,
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content
)
}

View File

@@ -0,0 +1,19 @@
package receiver.lbj.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
val Typography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp
)
)

View File

@@ -0,0 +1,70 @@
package receiver.lbj.util
import android.util.Log
import org.osmdroid.util.GeoPoint
import kotlin.math.abs
object LocationUtils {
private const val TAG = "LocationUtils"
fun parsePositionInfo(positionInfo: String): GeoPoint? {
try {
if (positionInfo.isEmpty() || positionInfo == "--") {
return null
}
Log.d(TAG, "Parsing position info=$positionInfo")
val parts = positionInfo.split(" ")
if (parts.size != 2) {
Log.e(TAG, "Invalid position format=$positionInfo")
return null
}
val latitude = convertDmsToDecimal(parts[0])
val longitude = convertDmsToDecimal(parts[1])
if (latitude != null && longitude != null) {
Log.d(TAG, "Parsed coordinates lat=$latitude lon=$longitude")
return GeoPoint(latitude, longitude)
}
return null
} catch (e: Exception) {
Log.e(TAG, "Position parse error: ${e.message}", e)
return null
}
}
private fun convertDmsToDecimal(dmsString: String): Double? {
try {
val degreeIndex = dmsString.indexOf('°')
if (degreeIndex == -1) {
return null
}
val degrees = dmsString.substring(0, degreeIndex).toDouble()
val minuteEndIndex = dmsString.indexOf('')
if (minuteEndIndex == -1) {
return degrees
}
val minutes = dmsString.substring(degreeIndex + 1, minuteEndIndex).toDouble()
val decimalDegrees = degrees + (minutes / 60.0)
return decimalDegrees
} catch (e: Exception) {
Log.e(TAG, "转换DMS到十进制度出错: ${e.message}", e)
return null
}
}
}

View File

@@ -0,0 +1,117 @@
package receiver.lbj.util
import android.content.Context
import android.util.Log
import java.io.BufferedReader
import java.io.InputStreamReader
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
class LocoInfoUtil(private val context: Context) {
data class LocoInfo(
val model: String,
val start: Int,
val end: Int,
val owner: String,
val alias: String = "",
val manufacturer: String = ""
)
private var locoData: List<LocoInfo> = emptyList()
suspend fun loadLocoData() = withContext(Dispatchers.IO) {
try {
val inputStream = context.assets.open("loco_info.csv")
val reader = BufferedReader(InputStreamReader(inputStream))
val data = mutableListOf<LocoInfo>()
reader.lineSequence().forEach { line ->
val fields = line.split(",").map { it.trim() }
if (fields.size >= 4) {
try {
val model = fields[0]
val start = fields[1].toInt()
val end = fields[2].toInt()
val owner = fields[3]
val alias = if (fields.size > 4) fields[4] else ""
val manufacturer = if (fields.size > 5) fields[5] else ""
data.add(LocoInfo(model, start, end, owner, alias, manufacturer))
} catch (e: Exception) {
Log.e("LocoInfoUtil", "CSV parse error line=$line", e)
}
}
}
reader.close()
locoData = data
Log.d("LocoInfoUtil", "Loaded records=${data.size}")
} catch (e: Exception) {
Log.e("LocoInfoUtil", "Load CSV failed", e)
locoData = emptyList()
}
}
suspend fun refreshData() {
loadLocoData()
}
fun findLocoInfo(model: String, number: String): LocoInfo? {
if (model.isEmpty() || number.isEmpty()) {
Log.d("LocoInfoUtil", "Query failed empty model/number")
return null
}
try {
val cleanNumber = number.trim().replace("-", "").replace(" ", "")
val num = if (cleanNumber.length > 4) {
cleanNumber.takeLast(4).toInt()
} else {
cleanNumber.toInt()
}
locoData.forEach { info ->
if (info.model == model) {
val inRange = num in info.start..info.end
Log.d("LocoInfoUtil", "Checking model=${info.model} range=${info.start}-${info.end} num=$num match=$inRange")
if (inRange) {
Log.d("LocoInfoUtil", "Matched owner=${info.owner} alias=${info.alias}")
}
}
}
return locoData.find { info ->
info.model == model && num in info.start..info.end
}
} catch (e: Exception) {
Log.e("LocoInfoUtil", "Query failed model=$model number=$number", e)
return null
}
}
fun getLocoInfoDisplay(model: String, number: String): String? {
val info = findLocoInfo(model, number) ?: return null
val sb = StringBuilder()
sb.append(info.owner)
if (info.alias.isNotEmpty()) {
sb.append(" - ${info.alias}")
}
if (info.manufacturer.isNotEmpty()) {
sb.append(" - ${info.manufacturer}")
}
return sb.toString()
}
}

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,590 @@
6G,51,90,西安铁路局 宝鸡电力机务段,,
6K,1,85,中国铁路郑州局集团有限公司 洛阳机务段,,
8G,1,1,中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,2,2,中国铁道博物馆,,
8G,3,75,中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,76,76,中国铁路太原局集团有限公司 太原机务段北场,,
8G,77,96,中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段,,
8G,97,97,中国铁路太原局集团有限公司 榆次机务折返段,,
8G,98,100,中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段,,
8K,1,1,中国铁路北京局集团有限公司 丰台机务段,,
8K,2,7,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,8,8,中国铁道博物馆,*科技号,
8K,9,17,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,18,18,*北京铁路局 丰台机务段,,
8K,19,23,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,24,24,中国铁路太原局集团有限公司 湖东机务段 大同西运用车间,,
8K,25,64,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,65,65,天津铁道职业技术学院,,
8K,66,71,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,72,72,中国铁路北京局集团有限公司 丰台机务段,,
8K,73,90,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
8K,91,91,中国铁路太原局集团有限公司 太原机务段北场 机车展场,,
8K,92,100,*北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段,,
CR400AF,21,21,中国铁路北京局集团有限公司 朝阳动车运用所,CR400AF-G,
CR400AF,207,208,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,1001,1002,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,1003,1003,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1004,1004,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,1005,1005,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1006,1006,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,1007,1009,中国铁路广州局集团有限公司 潮州动车运用所,,
CR400AF,1010,1010,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,1011,1014,中国铁路广州局集团有限公司 潮州动车运用所,,
CR400AF,1015,1020,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,1021,1021,中国铁路广州局集团有限公司 潮州动车运用所,,
CR400AF,1022,1025,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,1026,1027,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1028,1029,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,1030,1030,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1031,1031,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,1032,1032,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1033,1033,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,1034,1038,中国铁路广州局集团有限公司 广州南动车运用所,CR400AF-A,
CR400AF,1039,1039,中国铁路广州局集团有限公司 潮州动车运用所,,
CR400AF,1040,1040,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,2002,2002,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2004,2004,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2005,2005,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2006,2007,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2008,2008,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2009,2010,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2011,2011,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2012,2012,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2013,2013,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2014,2016,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2017,2017,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2023,2023,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2024,2024,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2025,2025,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2026,2028,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2030,2030,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2031,2032,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2033,2033,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2034,2034,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2035,2038,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2040,2046,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2047,2048,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2049,2049,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2051,2051,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2053,2055,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2057,2057,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2058,2058,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2060,2062,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2064,2064,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2065,2066,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2067,2068,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2069,2069,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2070,2070,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2071,2071,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2072,2072,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2073,2073,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2074,2076,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2077,2079,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2080,2084,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2085,2085,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2086,2086,中国铁路济南局集团有限公司 青岛动车运用所,,
CR400AF,2087,2087,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2088,2090,中国铁路济南局集团有限公司 青岛动车运用所,,
CR400AF,2091,2094,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2095,2097,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2098,2098,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2099,2100,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2102,2102,中国铁路济南局集团有限公司 济南东动车运用所,CR400AF-A,
CR400AF,2103,2104,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2105,2105,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2106,2106,中国铁路广州局集团有限公司 长沙动车运用所,CR400AF-A,
CR400AF,2107,2115,中国铁路济南局集团有限公司 济南东动车运用所,CR400AF-A,
CR400AF,2116,2123,中国铁路北京局集团有限公司 北京南动车运用所,CR400AF-B,
CR400AF,2124,2124,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2125,2125,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2126,2127,中国铁路武汉局集团有限公司 汉口动车运用所,,
CR400AF,2128,2128,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2130,2131,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2133,2133,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2134,2134,中国铁路济南局集团有限公司 青岛动车运用所,,
CR400AF,2135,2135,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2136,2138,中国铁路济南局集团有限公司 青岛动车运用所,,
CR400AF,2139,2139,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2140,2140,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2141,2141,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2142,2144,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2145,2146,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2148,2150,中国铁路武汉局集团有限公司 汉口动车运用所,,
CR400AF,2151,2151,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2152,2153,中国铁路武汉局集团有限公司 汉口动车运用所,,
CR400AF,2154,2156,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2159,2159,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2160,2161,中国铁路武汉局集团有限公司 汉口动车运用所,,
CR400AF,2162,2163,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2164,2164,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2171,2172,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2173,2173,中国铁路武汉局集团有限公司 汉口动车运用所,,
CR400AF,2174,2177,中国铁路武汉局集团有限公司 武汉动车运用所,,
CR400AF,2178,2178,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2179,2179,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2180,2180,中国铁路北京局集团有限公司 雄安动车运用所,,
CR400AF,2181,2182,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2183,2187,中国铁路北京局集团有限公司 北京南动车运用所,,
CR400AF,2190,2192,中国铁路武汉局集团有限公司 武汉动车运用所,CR400AF-A,
CR400AF,2193,2193,中国铁路济南局集团有限公司 济南东动车运用所,CR400AF-A,
CR400AF,2194,2195,中国铁路广州局集团有限公司 深圳动车运用所,CR400AF-A,
CR400AF,2196,2200,中国铁路武汉局集团有限公司 武汉动车运用所,CR400AF-A,
CR400AF,2201,2205,中国铁路济南局集团有限公司 济南东动车运用所,CR400AF-A,
CR400AF,2206,2210,中国铁路北京局集团有限公司 北京南动车运用所,CR400AF-B,
CR400AF,2211,2212,中国铁路济南局集团有限公司 济南东动车运用所,CR400AF-A,
CR400AF,2213,2213,中国铁路北京局集团有限公司 北京西动车运用所,,
CR400AF,2215,2217,中国铁路北京局集团有限公司 朝阳动车运用所,CR400AF-G,
CR400AF,2222,2225,中国铁路上海局集团有限公司 上海南动车运用所,,
CR400AF,2226,2226,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,2227,2227,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2228,2228,中国铁路广州局集团有限公司 广州南动车运用所,,
CR400AF,2229,2229,中国铁路广州局集团有限公司 长沙动车运用所,,
CR400AF,2230,2231,中国铁路济南局集团有限公司 济南东动车运用所,,
CR400AF,2232,2235,中国铁路上海局集团有限公司 上海南动车运用所,,
CR400AF,2236,2236,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2237,2243,中国铁路上海局集团有限公司 上海南动车运用所,,
CR400AF,2244,2248,中国铁路成都局集团有限公司 重庆西动车运用所,,
CR400AF,2254,2256,中国铁路成都局集团有限公司 重庆西动车运用所,,
DJ1,1,1,中国铁道科学研究院 环形铁道,,
DJ1,2,2,株洲西门子牵引设备有限公司,,
DJ1,3,3,西安铁路局 宝鸡机务段 秦岭附加队 ,,
DJ2,1,1,中国铁路郑州局集团有限公司 郑州机务段京武快车队,奥星,
DJ2,2,3,中国铁路郑州局集团有限公司 郑州机务段,奥星,
HXD1D,1,15,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,16,16,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,17,17,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,18,18,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,19,19,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,20,20,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,21,21,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,22,24,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,25,25,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,26,26,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,27,27,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,28,28,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,29,34,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,35,35,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,36,38,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,39,39,中国铁路济南局集团有限公司 济南机务段,,
HXD1D,40,50,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,51,75,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,76,105,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,106,137,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,138,168,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,169,175,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,176,185,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,186,187,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,188,188,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,189,190,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,191,232,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,233,233,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,234,237,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,238,257,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,258,270,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,271,275,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,276,279,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,280,289,中国铁路上海局集团有限公司 徐州机务段,,
HXD1D,290,291,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,292,293,中国铁路南昌局集团有限公司 鹰潭机务段,,
HXD1D,294,295,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,296,300,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,301,310,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,311,320,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,321,340,中国铁路青藏集团有限公司 西宁机务段,,
HXD1D,341,362,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,363,382,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,383,392,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,393,405,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,406,415,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,416,430,中国铁路广州局集团有限公司 长沙机务段,,
HXD1D,431,440,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,441,445,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,446,450,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,451,460,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,461,470,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,471,478,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,479,483,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,484,488,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,489,490,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,491,510,中国铁路郑州局集团有限公司 郑州机务段,,
HXD1D,511,512,中国铁路上海局集团有限公司 徐州机务段,,
HXD1D,513,515,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,516,520,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,521,534,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,522,522,广州铁路职业技术学院,,
HXD1D,535,544,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,545,551,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,552,554,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,555,559,中国铁路郑州局集团有限公司 郑州机务段,,
HXD1D,560,564,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,565,570,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,571,585,中国铁路南昌局集团有限公司 南昌机务段,,
HXD1D,586,595,中国铁路上海局集团有限公司 杭州机务段,,
HXD1D,596,613,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD1D,614,623,中国铁路广州局集团有限公司 广州机务段,,
HXD1D,624,633,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,634,636,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,637,644,中国铁路郑州局集团有限公司 郑州机务段,,
HXD1D,645,660,中国铁路郑州局集团有限公司 郑州机务段,,
HXD1D,661,668,中国铁路武汉局集团有限公司 武昌南机务段,,
HXD1D,669,673,中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段,,
HXD1D,674,678,中国铁路郑州局集团有限公司 郑州机务段,,
HXD1D,679,682,中国铁路上海局集团有限公司 上海机务段,,
HXD1D,683,683,中国铁路上海局集团有限公司 徐州机务段,,
HXD1D,684,684,中国铁路上海局集团有限公司 徐州机务段,,
HXD1D,685,689,中国铁路青藏集团有限公司 格尔木机务段,,
HXD1D,1898,1898,中国铁路上海局集团有限公司 上海机务段,周恩来号,
HXD1D-J,1,3,中国铁路青藏集团有限公司 拉萨动车运用所,,
HXD1D-J,1001,1009,中国铁路昆明局集团有限公司 昆明动车运用所,,
HXD1D-J,1010,1013,中国铁路青藏集团有限公司 格尔木机务段,,
HXD1D-J,1014,1019,中国铁路成都局集团有限公司 成都动车运用所,,
HXD1D-J,1020,1027,中国铁路昆明局集团有限公司 昆明动车运用所,,
HXD3C,1,9,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,10,10,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,11,15,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,16,20,中国铁路武汉局集团有限公司 江岸机务段(襄阳机务段支配),,
HXD3C,21,25,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3C,26,30,中国铁路郑州局集团有限公司 郑州机务段,,
HXD3C,31,35,中国铁路上海局集团有限公司 宁东机务段(上海机务段支配),,
HXD3C,36,41,中国铁路武汉局集团有限公司 江岸机务段(武南机务段支配),,
HXD3C,42,45,中国铁路武汉局集团有限公司 江岸机务段(襄阳机务段支配),,
HXD3C,46,55,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3C,56,60,中国铁路郑州局集团有限公司 郑州机务段,,
HXD3C,61,61,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,62,62,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,63,63,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,64,70,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,71,85,中国铁路武汉局集团有限公司 江岸机务段,,
HXD3C,86,95,中国铁路郑州局集团有限公司 郑州机务段,,
HXD3C,96,100,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,101,110,中国铁路武汉局集团有限公司 江岸机务段,,
HXD3C,111,120,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,121,125,中国铁路上海局集团有限公司 宁东机务段(上海机务段支配),,
HXD3C,126,130,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3C,131,135,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,136,140,中国铁路郑州局集团有限公司 郑州机务段,,
HXD3C,141,165,中国铁路武汉局集团有限公司 江岸机务段,,
HXD3C,166,180,中国铁路成都局集团有限公司 重庆机务段,,
HXD3C,181,182,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,183,190,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,191,195,中国铁路济南局集团有限公司 济南机务段,,
HXD3C,198,200,中国铁路上海局集团有限公司 宁东机务段,,
HXD3C,201,220,中国铁路武汉局集团有限公司 江岸机务段,,
HXD3C,221,225,中国铁路上海局集团有限公司 宁东机务段,,
HXD3C,226,229,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3C,238,238,中国铁路广州局集团有限公司 株洲机务段,,
HXD3C,271,300,中国铁路上海局集团有限公司 宁东机务段,,
HXD3C,446,446,中国铁路广州局集团有限公司 广州机务段,,
HXD3C,805,809,中国铁路广州局集团有限公司 ,,
HXD3C,810,819,中国铁路南宁局集团有限公司,,
HXD3C,820,829,中国铁路武汉局集团有限公司,,
HXD3C,896,925,中国铁路沈阳局集团有限公司,,
HXD3C,926,930,中国铁路南宁局集团有限公司,,
HXD3C,931,945,中国铁路北京局集团有限公司,,
HXD3C,946,955,中国铁路济南局集团有限公司,,
HXD3C,956,965,中国铁路郑州局集团有限公司,,
HXD3C,966,974,中国铁路济南局集团有限公司,,
HXD3D,1,10,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,11,25,西安铁路局集团有限公司 西安机务段,,
HXD3D,26,34,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,35,35,中国铁路兰州局集团有限公司 迎水桥机务段,雷锋号,
HXD3D,36,38,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,39,39,中国铁路济南局集团有限公司 济南机务段,共青团号,
HXD3D,40,40,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,41,50,西安铁路局集团有限公司 西安机务段,,
HXD3D,51,70,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,71,90,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,91,115,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,116,135,中国铁路昆明局集团有限公司 昆明机务段,,
HXD3D,136,145,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,146,150,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,151,155,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,156,160,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,161,165,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,166,170,西安铁路局集团有限公司 西安机务段,,
HXD3D,171,180,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,181,190,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,191,245,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,246,255,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,256,265,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,266,290,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,291,300,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,301,310,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,310,315,中国铁路昆明局集团有限公司 昆明机务段,,
HXD3D,316,320,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,321,322,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,323,325,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,326,333,西安铁路局集团有限公司 西安机务段,,
HXD3D,334,340,西安铁路局集团有限公司 安康机务段,,
HXD3D,341,345,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,346,346,中国铁路成都局集团有限公司 重庆机务段,,
HXD3D,351,351,中国铁路成都局集团有限公司 重庆机务段,,
HXD3D,356,365,西安铁路局集团有限公司 安康机务段,,
HXD3D,366,369,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,370,382,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,383,392,中国铁路昆明局集团有限公司 昆明机务段,,
HXD3D,393,397,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,398,402,西安铁路局集团有限公司 西安机务段,,
HXD3D,403,417,西安铁路局集团有限公司 西安机务段,,
HXD3D,418,419,中国铁路哈尔滨局集团有限公司 牡丹江机务段,,
HXD3D,420,424,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,425,429,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,430,433,中国铁路哈尔滨局集团有限公司 牡丹江机务段,,
HXD3D,434,443,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,444,449,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,450,464,西安铁路局集团有限公司 西安机务段,,
HXD3D,465,468,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,469,473,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,474,479,中国铁路昆明局集团有限公司 昆明机务段,,
HXD3D,480,484,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,485,489,西安铁路局集团有限公司 西安机务段,,
HXD3D,490,499,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,500,503,中国铁路哈尔滨局集团有限公司 牡丹江机务段,,
HXD3D,504,514,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,515,515,中国铁路成都局集团有限公司 重庆机务段,,
HXD3D,516,518,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,519,528,西安铁路局集团有限公司 西安机务段,,
HXD3D,529,538,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,539,541,呼和浩特铁路局集团有限公司 集宁机务段,,
HXD3D,542,553,西安铁路局集团有限公司 西安机务段,,
HXD3D,554,563,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,564,568,中国铁路昆明局集团有限公司 昆明机务段,,
HXD3D,569,573,中国铁路成都局集团有限公司 重庆机务段,,
HXD3D,574,583,中国铁路济南局集团有限公司 济南机务段,,
HXD3D,584,584,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,585,609,中国铁路哈尔滨局集团有限公司 三棵树机务段,,
HXD3D,610,611,中国铁路北京局集团有限公司 北京机务段,,
HXD3D,612,621,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,622,626,中国铁路南昌局集团有限公司 南昌机务段,,
HXD3D,627,629,中国铁路哈尔滨局集团有限公司 三棵树机务段,,
HXD3D,630,630,中国铁路哈尔滨局集团有限公司 哈尔滨机务段,,
HXD3D,631,631,西安铁路局集团有限公司 西安机务段,第五代“钢人铁马号”,
HXD3D,632,653,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,654,673,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,674,681,中国铁路沈阳局集团有限公司 沈阳机务段,,
HXD3D,682,688,中国铁路兰州局集团有限公司 兰州西机务段,,
HXD3D,1886,1886,中国铁路哈尔滨局集团有限公司 哈尔滨机务段,第五代“朱德号”,
HXD3D,1893,1893,中国铁路北京局集团有限公司 丰台机务段,第六代“毛泽东号”,
HXD3D,1921,1921,中国铁路沈阳局集团有限公司 沈阳机务段,共产党员号,
HXD3D,7001,7002,广西沿海铁路股份有限公司 南宁南机务运用段,,
HXD3D,7003,7003,吉林铁道职业技术学院,,
HXD3D,8001,8025,中国铁路沈阳局集团有限公司 沈阳机务段,,大同
HXD3D,8026,8028,中国铁路太原局集团有限公司 太原南机务段,,大同
东方红2,1,50,,,资阳
东风,1201,1830,,,大连、成都
东风,2001,2094,,,戚墅堰
东风11,1,459,,,戚墅堰
东风12,8001,8001,吉林铁道职业技术学院,,
东风2,3201,3348,,,戚墅堰
东风21,1,5,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,6,6,中国铁路昆明局集团有限公司 昆明机务段,状元号,
东风21,7,7,中国铁路昆明局集团有限公司 昆明机务段,亲年号,
东风21,8,8,中国铁路昆明局集团有限公司 昆明机务段,建水古城,
东风21,9,100,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,101,101,中国铁路昆明局集团有限公司 昆明机务段,异龙号,
东风21,102,102,中国铁路昆明局集团有限公司 昆明机务段,,
东风21,1001,1002,云南钢铁厂,,
东风2Z,3251,3251,*齐齐哈尔铁路局 加格达奇机务段,,
东风3,3243,3243,中车共享城机车公园,,
东风4,3247,3247,中车成都轨道交通产业园,,
东风4B,1001,1999,,,大连
东风4B,1963,1963,*北京铁路局 丰台机务段,,
东风4B,2101,2685,,,大连
东风4B,2104,2104,*上海铁路局 蚌埠机务段,,
东风4B,2376,2376,*南昌铁路局 鹰潭机务段,,
东风4B,3101,3999,,,资阳
东风4B,3214,3214,*浙江金温铁道开发有限公司 温州机务段,,
东风4B,3249,3249,*西安铁路局 西安机务段,,
东风4B,3390,3390,*成都铁路局 重庆机务段,,
东风4B,3593,3593,*中国铁路广州局集团有限公司 株洲机务段,,
东风4B,6001,6587,,,大同
东风4B,6530,6530,*南宁铁路局 南宁机务段,,
东风4B,7001,7363,,,大连
东风4B,7364,7365,,,四方
东风4B,7366,7796,,,大连
东风4B,7701,7732,,,戚墅堰改
东风4B,9001,9702,,,资阳
东风4B,9167,9167,*南昌铁路局 向塘机务段,,
东风4B,9531,9531,*新长铁路公司,,
东风4C,1,10,,,大同
东风4C,11,11,中国铁路北京局集团有限公司 丰台段,青年文明号,
东风4C,12,40,,,大同
东风4C,2001,2006,,,四方
东风4C,4001,4465,,,大连
东风4C,4466,4466,四方机车车辆厂,,四方
东风4C,5001,5273,,,资阳
东风4C,5274,5275,三茂铁路公司 三水机务段,东风4CK,
东风4C,5276,5335,,,资阳
东风4D,7001,7021,中国铁路南宁局集团有限公司,,
东风5,1,1,中国铁路北京局集团有限公司 北京车辆段,,
东风5,1974,1975,中国铁路兰州局集团有限公司 兰州西机务段,,唐山
东风5,1976,2082,,,唐山
东风5,2083,2083,中国石油兰州石化公司,,唐山
东风5,3279,3279,云南铁路博物馆,,
东风6,1,2,*沈阳铁路局 大连机务段,,
东风6,3,3,沈阳铁路陈列馆,,
东风6,4,4,*沈阳铁路局 大连机务段,,
东风7,174,174,中国铁路太原局集团有限公司 太原机务段北场,,
东风7B,3006,3006,中国铁道博物馆,,
东风7B,3015,3015,王坪村铁路公园,,
东风7B,6001,6072,*北京铁路局 邯郸机务段;郑州铁路局 新乡机务段,调车,
东风7D,1,1,中国铁道博物馆,,
东风7D,3001,3001,中国铁道博物馆,,
东风7E,1,1,中国铁路郑州局集团有限公司 新乡机务段,,
东风7E,2,2,中国铁路郑州局集团有限公司 郑州机务段,,
东风7G,9001,9004,呼和浩特铁路局 集宁机务段 赛汗塔拉分段,,
东风8,1,1,中国铁道博物馆,,
东风9,1,2,中国铁路广州局集团有限公司广州机务段,,
韶山1,8,8,中国铁道博物馆,,
韶山1,156,156,郑州世纪欢乐园,,
韶山1,160,160,北京铁路电气化学校,,
韶山1,227,227,中国铁路兰州局集团有限公司 兰州西机务段,,
韶山1,254,254,中国铁路北京局集团有限公司 丰台机务段 储备厂,,
韶山1,307,307,中国铁路太原局集团有限公司 榆次机务折返段,,
韶山1,309,309,中国铁路太原局集团有限公司 太原机务段北场,,
韶山1,321,321,武汉铁路职业技术学院,,
韶山1,681,681,中国铁道博物馆,,
韶山1,695,695,沈阳铁路陈列馆,,
韶山1,762,762,中国铁路广州局集团有限公司 娄底运用车间储备厂,,
韶山1,818,818,西南交通大学 机车博物园,,
韶山1,821,821,韶关机务实训基地,,
韶山1,826,826,韶关机务实训基地,,
韶山3,454,454,中国铁路成都局集团有限公司 贵阳机务段,先锋号,
韶山3,524,524,中国铁路武汉局集团有限公司 江岸机务段,青年号,
韶山3,4160,4160,广西沿海铁路公司 南宁南机务运用段,共青团号,
韶山3,4178,4178,广西沿海铁路公司 南宁南机务运用段,共青团号,
韶山3,4235,4235,中国铁路成都局集团有限公司 重庆机务段,青年文明号,
韶山3,4258,4258,中国铁路成都局集团有限公司 重庆机务段,党员先锋号,
韶山3,5080,5080,广州铁路博物馆,,
韶山3,6005,6005,湖南交通工程学院,,
韶山3,8050,8050,武汉四美塘铁路遗址公园,,
韶山3B,16,16,西安铁路局 安康机务段,青年文明号,
韶山3B,5001,5001,中国铁路成都局集团有限公司 贵阳机务段,*先锋力神,
韶山3B,5035,5035,中国铁路兰州局集团有限公司 迎水桥机务段,雷锋号 (曾),
韶山3B,5038,5038,中国铁路兰州局集团有限公司 迎水桥机务段,青年文明号,
韶山3B,5151,5151,中国铁路成都局集团有限公司 西昌机务段,扶贫先锋号,
韶山3B,5162,5162,中国铁路昆明局集团有限公司 昆明机务段,五四青年号,
韶山3B,5235,5235,中国铁路成都局集团有限公司 西昌机务段,*共青团号,
韶山3C,1,1,中国铁路成都局集团有限公司 贵阳机务段,,
韶山4,6,6,中国铁道博物馆,,
韶山4,10,10,中国铁路成都局集团有限公司 西昌机务段,,
韶山4,50,50,中国铁路郑州局集团有限公司 新乡机务段,先锋号,
韶山4,63,63,中国铁路太原局集团有限公司 太原机务段,,
韶山4,204,204,中国铁路郑州局集团有限公司 新乡机务段,先锋号,
韶山4,448,448,中国铁路沈阳局集团有限公司 苏家屯机务段,先锋号,
韶山4,574,574,中铁三局集团,先锋号,
韶山4,743,743,中国铁路哈尔滨局集团有限公司 哈尔滨机务段,青年文明号,
韶山4,855,855,西安铁路局 新丰镇机务段,,
韶山4,911,911,中铁三局集团,青年文明号,
韶山4,2006,2006,吉林铁道职业技术学院,,
韶山4B,19,19,神朔铁路公司 神木北机务段,青年号,
韶山4B,89,89,神朔铁路公司 神木北机务段,青年文明号,
韶山4B,90,90,神朔铁路公司 神木北机务段,青年文明号,
韶山4B,257,257,包神铁路公司 东胜机务段,党员先锋号,
韶山4G,159,1177,,,株洲
韶山4G,168,168,中国铁道博物馆,,
韶山4G,171,171,中国铁路哈尔滨局集团有限公司 牡丹江机务段,,
韶山4G,179,179,中国铁路太原局集团有限公司 湖东机务段,,
韶山4G,466,466,石家庄铁道大学,,
韶山4G,1089,1089,*呼和浩特铁路局 包头西机务段,,
韶山4G,1886,1886,中国铁路哈尔滨局集团有限公司 哈尔滨机务段,*朱德号,株洲
韶山4G,3001,3002,,,资阳
韶山4G,6001,6001,中国铁道博物馆,,
韶山4G,6001,6001,中国铁道博物馆,,大同
韶山4G,7001,7110,,,大连
韶山4G,7121,7243,,,大连
韶山5,1,1,中国铁道博物馆,,
韶山5,2,2,郑州世纪欢乐园 ,,
韶山6,1,1,郑州铁路司机学校,,
韶山6,2,2,中国铁道博物馆,,
韶山6B,1011,1011,西安铁路局 西安机务段,*青年文明号,
韶山6B,1026,1026,韶关机务实训基地,,
韶山6B,1088,1088,中国铁路武汉局集团有限公司 襄阳机务段,*民兵号,
韶山6B,1111,1111,中国铁路武汉局集团有限公司 襄阳机务段,*先锋号,
韶山6B,6001,6001,韶关机务实训基地,,
韶山6B,6002,6002,广州铁路博物馆,,
韶山7,1,79,中国铁路南宁局集团有限公司 柳州机务段,,
韶山7,76,76,中国铁路南宁局集团有限公司 南宁机务段,*五四红旗号,
韶山7,80,84,中国铁路南宁局集团有限公司 柳州机务段,,
韶山7,85,111,中国铁路南宁局集团有限公司 柳州机务段,,
韶山7,8112,8113,山西孝柳铁路有限责任公司,,
韶山7B,1,1,*南宁铁路局集团有限公司 南宁机务段,,
韶山7B,2,2,中国铁路南宁局集团有限公司 柳州机务段,,
韶山7D,1,58,西安铁路局集团有限公司 西安机务段,,
韶山7D,631,631,西安铁路局集团有限公司 西安机务段,*钢人铁马号,
韶山7E,1,140,,,大同
韶山7E,6001,6002,中国铁路昆明局集团有限公司,,大同
韶山7E,7001,7004,,,大连
韶山8,1,1,中国铁路广州局集团有限公司 广州机务段,,
韶山8,2,2,中国铁路广州局集团有限公司 广州机务段,,
韶山8,3,4,中国铁路上海局集团有限公司 上海机务段,,
韶山8,5,5,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,9,9,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,11,11,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,12,12,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,15,16,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,17,17,中国铁路上海局集团有限公司 上海机务段,,
韶山8,20,20,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,24,25,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,27,27,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,29,32,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,33,35,中国铁路上海局集团有限公司 上海机务段,,
韶山8,36,36,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,38,38,中国铁路上海局集团有限公司 上海机务段,,
韶山8,39,39,中国铁路上海局集团有限公司 上海机务段,国祥号,
韶山8,40,40,中国铁路上海局集团有限公司 上海机务段,,
韶山8,41,41,中国铁路北京局集团有限公司 北京机务段,,
韶山8,43,43,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,44,44,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,45,45,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,48,48,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,49,49,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,50,50,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,51,51,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,52,52,中国铁路上海局集团有限公司 上海机务段,,
韶山8,55,55,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,56,57,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,64,64,中国铁路广州局集团有限公司 广州机务段,,
韶山8,72,72,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,73,73,中国铁路北京局集团有限公司 北京机务段,,
韶山8,74,74,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,81,81,中国铁路北京局集团有限公司 北京机务段,,
韶山8,83,84,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,85,85,中国铁路北京局集团有限公司 北京机务段,,
韶山8,88,103,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,104,104,中国铁路北京局集团有限公司 邯郸机务段,,
韶山8,109,111,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,114,116,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,118,119,中国铁路北京局集团有限公司 北京机务段,,
韶山8,121,126,中国铁路北京局集团有限公司 北京机务段,,
韶山8,127,128,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,130,130,中国铁路南昌局集团有限公司 南昌机务段,,
韶山8,131,131,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,132,132,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,133,133,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,134,134,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,136,136,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,141,141,中国铁路广州局集团有限公司 广州机务段,,
韶山8,144,144,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,148,148,中国铁路广州局集团有限公司 广州机务段,,
韶山8,156,156,中国铁路广州局集团有限公司 广州机务段,,
韶山8,163,163,中国铁路广州局集团有限公司 广州机务段,,
韶山8,166,166,中国铁路广州局集团有限公司 广州机务段,新世纪金龙号,
韶山8,171,171,中国铁路上海局集团有限公司 上海机务段,,
韶山8,172,172,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,173,173,中国铁路广州局集团有限公司 广州机务段,,
韶山8,181,181,中国铁路广州局集团有限公司 广州机务段,,
韶山8,186,186,中国铁路广州局集团有限公司 广州机务段,,
韶山8,191,191,中国铁路广州局集团有限公司 广州机务段,,
韶山8,192,192,中国铁路广州局集团有限公司 广州机务段,,
韶山8,197,197,中国铁路郑州局集团有限公司 郑州机务段,,
韶山8,200,204,中国铁路上海局集团有限公司 上海机务段,,
韶山8,205,205,中国铁路广州局集团有限公司 长沙机务段,,
韶山8,214,214,中国铁路郑州局集团有限公司 郑州机务段,,
韶山9,1,3,中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段,,
韶山9,5,29,中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段,,
韶山9,30,30,中国铁路沈阳局集团有限公司 通辽机务段,,
韶山9,31,37,中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段,,
韶山9,38,38,中国铁路沈阳局集团有限公司 通辽机务段,,
韶山9,39,43,中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段,,
1 6G 51 90 西安铁路局 宝鸡电力机务段
2 6K 1 85 中国铁路郑州局集团有限公司 洛阳机务段
3 8G 1 1 中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段
4 8G 2 2 中国铁道博物馆
5 8G 3 75 中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段
6 8G 76 76 中国铁路太原局集团有限公司 太原机务段北场
7 8G 77 96 中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段
8 8G 97 97 中国铁路太原局集团有限公司 榆次机务折返段
9 8G 98 100 中国铁路太原局集团有限公司 太原北机务段、侯马机务段、石家庄电力机务段
10 8K 1 1 中国铁路北京局集团有限公司 丰台机务段
11 8K 2 7 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
12 8K 8 8 中国铁道博物馆 *科技号
13 8K 9 17 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
14 8K 18 18 *北京铁路局 丰台机务段
15 8K 19 23 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
16 8K 24 24 中国铁路太原局集团有限公司 湖东机务段 大同西运用车间
17 8K 25 64 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
18 8K 65 65 天津铁道职业技术学院
19 8K 66 71 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
20 8K 72 72 中国铁路北京局集团有限公司 丰台机务段
21 8K 73 90 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
22 8K 91 91 中国铁路太原局集团有限公司 太原机务段北场 机车展场
23 8K 92 100 *北京铁路局 丰台西段、丰台段;太原铁路局 大同西段、湖东段
24 CR400AF 21 21 中国铁路北京局集团有限公司 朝阳动车运用所 CR400AF-G
25 CR400AF 207 208 中国铁路北京局集团有限公司 北京西动车运用所
26 CR400AF 1001 1002 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
27 CR400AF 1003 1003 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
28 CR400AF 1004 1004 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
29 CR400AF 1005 1005 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
30 CR400AF 1006 1006 中国铁路广州局集团有限公司 广州南动车运用所
31 CR400AF 1007 1009 中国铁路广州局集团有限公司 潮州动车运用所
32 CR400AF 1010 1010 中国铁路广州局集团有限公司 广州南动车运用所
33 CR400AF 1011 1014 中国铁路广州局集团有限公司 潮州动车运用所
34 CR400AF 1015 1020 中国铁路广州局集团有限公司 广州南动车运用所
35 CR400AF 1021 1021 中国铁路广州局集团有限公司 潮州动车运用所
36 CR400AF 1022 1025 中国铁路广州局集团有限公司 广州南动车运用所
37 CR400AF 1026 1027 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
38 CR400AF 1028 1029 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
39 CR400AF 1030 1030 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
40 CR400AF 1031 1031 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
41 CR400AF 1032 1032 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
42 CR400AF 1033 1033 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
43 CR400AF 1034 1038 中国铁路广州局集团有限公司 广州南动车运用所 CR400AF-A
44 CR400AF 1039 1039 中国铁路广州局集团有限公司 潮州动车运用所
45 CR400AF 1040 1040 中国铁路广州局集团有限公司 广州南动车运用所
46 CR400AF 2002 2002 中国铁路北京局集团有限公司 北京西动车运用所
47 CR400AF 2004 2004 中国铁路北京局集团有限公司 北京西动车运用所
48 CR400AF 2005 2005 中国铁路成都局集团有限公司 重庆西动车运用所
49 CR400AF 2006 2007 中国铁路北京局集团有限公司 北京西动车运用所
50 CR400AF 2008 2008 中国铁路北京局集团有限公司 雄安动车运用所
51 CR400AF 2009 2010 中国铁路北京局集团有限公司 北京西动车运用所
52 CR400AF 2011 2011 中国铁路广州局集团有限公司 长沙动车运用所
53 CR400AF 2012 2012 中国铁路北京局集团有限公司 北京西动车运用所
54 CR400AF 2013 2013 中国铁路成都局集团有限公司 重庆西动车运用所
55 CR400AF 2014 2016 中国铁路北京局集团有限公司 北京西动车运用所
56 CR400AF 2017 2017 中国铁路广州局集团有限公司 长沙动车运用所
57 CR400AF 2023 2023 中国铁路北京局集团有限公司 北京西动车运用所
58 CR400AF 2024 2024 中国铁路广州局集团有限公司 长沙动车运用所
59 CR400AF 2025 2025 中国铁路成都局集团有限公司 重庆西动车运用所
60 CR400AF 2026 2028 中国铁路广州局集团有限公司 长沙动车运用所
61 CR400AF 2030 2030 中国铁路北京局集团有限公司 雄安动车运用所
62 CR400AF 2031 2032 中国铁路成都局集团有限公司 重庆西动车运用所
63 CR400AF 2033 2033 中国铁路北京局集团有限公司 雄安动车运用所
64 CR400AF 2034 2034 中国铁路北京局集团有限公司 北京西动车运用所
65 CR400AF 2035 2038 中国铁路广州局集团有限公司 长沙动车运用所
66 CR400AF 2040 2046 中国铁路广州局集团有限公司 长沙动车运用所
67 CR400AF 2047 2048 中国铁路北京局集团有限公司 北京西动车运用所
68 CR400AF 2049 2049 中国铁路成都局集团有限公司 重庆西动车运用所
69 CR400AF 2051 2051 中国铁路广州局集团有限公司 长沙动车运用所
70 CR400AF 2053 2055 中国铁路广州局集团有限公司 长沙动车运用所
71 CR400AF 2057 2057 中国铁路广州局集团有限公司 长沙动车运用所
72 CR400AF 2058 2058 中国铁路北京局集团有限公司 雄安动车运用所
73 CR400AF 2060 2062 中国铁路广州局集团有限公司 长沙动车运用所
74 CR400AF 2064 2064 中国铁路广州局集团有限公司 长沙动车运用所
75 CR400AF 2065 2066 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
76 CR400AF 2067 2068 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
77 CR400AF 2069 2069 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
78 CR400AF 2070 2070 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
79 CR400AF 2071 2071 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
80 CR400AF 2072 2072 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
81 CR400AF 2073 2073 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
82 CR400AF 2074 2076 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
83 CR400AF 2077 2079 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
84 CR400AF 2080 2084 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
85 CR400AF 2085 2085 中国铁路济南局集团有限公司 济南东动车运用所
86 CR400AF 2086 2086 中国铁路济南局集团有限公司 青岛动车运用所
87 CR400AF 2087 2087 中国铁路济南局集团有限公司 济南东动车运用所
88 CR400AF 2088 2090 中国铁路济南局集团有限公司 青岛动车运用所
89 CR400AF 2091 2094 中国铁路济南局集团有限公司 济南东动车运用所
90 CR400AF 2095 2097 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
91 CR400AF 2098 2098 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
92 CR400AF 2099 2100 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
93 CR400AF 2102 2102 中国铁路济南局集团有限公司 济南东动车运用所 CR400AF-A
94 CR400AF 2103 2104 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
95 CR400AF 2105 2105 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
96 CR400AF 2106 2106 中国铁路广州局集团有限公司 长沙动车运用所 CR400AF-A
97 CR400AF 2107 2115 中国铁路济南局集团有限公司 济南东动车运用所 CR400AF-A
98 CR400AF 2116 2123 中国铁路北京局集团有限公司 北京南动车运用所 CR400AF-B
99 CR400AF 2124 2124 中国铁路武汉局集团有限公司 武汉动车运用所
100 CR400AF 2125 2125 中国铁路武汉局集团有限公司 武汉动车运用所
101 CR400AF 2126 2127 中国铁路武汉局集团有限公司 汉口动车运用所
102 CR400AF 2128 2128 中国铁路武汉局集团有限公司 武汉动车运用所
103 CR400AF 2130 2131 中国铁路广州局集团有限公司 长沙动车运用所
104 CR400AF 2133 2133 中国铁路广州局集团有限公司 长沙动车运用所
105 CR400AF 2134 2134 中国铁路济南局集团有限公司 青岛动车运用所
106 CR400AF 2135 2135 中国铁路成都局集团有限公司 重庆西动车运用所
107 CR400AF 2136 2138 中国铁路济南局集团有限公司 青岛动车运用所
108 CR400AF 2139 2139 中国铁路济南局集团有限公司 济南东动车运用所
109 CR400AF 2140 2140 中国铁路成都局集团有限公司 重庆西动车运用所
110 CR400AF 2141 2141 中国铁路济南局集团有限公司 济南东动车运用所
111 CR400AF 2142 2144 中国铁路北京局集团有限公司 北京西动车运用所
112 CR400AF 2145 2146 中国铁路北京局集团有限公司 雄安动车运用所
113 CR400AF 2148 2150 中国铁路武汉局集团有限公司 汉口动车运用所
114 CR400AF 2151 2151 中国铁路武汉局集团有限公司 武汉动车运用所
115 CR400AF 2152 2153 中国铁路武汉局集团有限公司 汉口动车运用所
116 CR400AF 2154 2156 中国铁路武汉局集团有限公司 武汉动车运用所
117 CR400AF 2159 2159 中国铁路武汉局集团有限公司 武汉动车运用所
118 CR400AF 2160 2161 中国铁路武汉局集团有限公司 汉口动车运用所
119 CR400AF 2162 2163 中国铁路济南局集团有限公司 济南东动车运用所
120 CR400AF 2164 2164 中国铁路武汉局集团有限公司 武汉动车运用所
121 CR400AF 2171 2172 中国铁路武汉局集团有限公司 武汉动车运用所
122 CR400AF 2173 2173 中国铁路武汉局集团有限公司 汉口动车运用所
123 CR400AF 2174 2177 中国铁路武汉局集团有限公司 武汉动车运用所
124 CR400AF 2178 2178 中国铁路北京局集团有限公司 雄安动车运用所
125 CR400AF 2179 2179 中国铁路北京局集团有限公司 北京西动车运用所
126 CR400AF 2180 2180 中国铁路北京局集团有限公司 雄安动车运用所
127 CR400AF 2181 2182 中国铁路北京局集团有限公司 北京西动车运用所
128 CR400AF 2183 2187 中国铁路北京局集团有限公司 北京南动车运用所
129 CR400AF 2190 2192 中国铁路武汉局集团有限公司 武汉动车运用所 CR400AF-A
130 CR400AF 2193 2193 中国铁路济南局集团有限公司 济南东动车运用所 CR400AF-A
131 CR400AF 2194 2195 中国铁路广州局集团有限公司 深圳动车运用所 CR400AF-A
132 CR400AF 2196 2200 中国铁路武汉局集团有限公司 武汉动车运用所 CR400AF-A
133 CR400AF 2201 2205 中国铁路济南局集团有限公司 济南东动车运用所 CR400AF-A
134 CR400AF 2206 2210 中国铁路北京局集团有限公司 北京南动车运用所 CR400AF-B
135 CR400AF 2211 2212 中国铁路济南局集团有限公司 济南东动车运用所 CR400AF-A
136 CR400AF 2213 2213 中国铁路北京局集团有限公司 北京西动车运用所
137 CR400AF 2215 2217 中国铁路北京局集团有限公司 朝阳动车运用所 CR400AF-G
138 CR400AF 2222 2225 中国铁路上海局集团有限公司 上海南动车运用所
139 CR400AF 2226 2226 中国铁路广州局集团有限公司 广州南动车运用所
140 CR400AF 2227 2227 中国铁路广州局集团有限公司 长沙动车运用所
141 CR400AF 2228 2228 中国铁路广州局集团有限公司 广州南动车运用所
142 CR400AF 2229 2229 中国铁路广州局集团有限公司 长沙动车运用所
143 CR400AF 2230 2231 中国铁路济南局集团有限公司 济南东动车运用所
144 CR400AF 2232 2235 中国铁路上海局集团有限公司 上海南动车运用所
145 CR400AF 2236 2236 中国铁路成都局集团有限公司 重庆西动车运用所
146 CR400AF 2237 2243 中国铁路上海局集团有限公司 上海南动车运用所
147 CR400AF 2244 2248 中国铁路成都局集团有限公司 重庆西动车运用所
148 CR400AF 2254 2256 中国铁路成都局集团有限公司 重庆西动车运用所
149 DJ1 1 1 中国铁道科学研究院 环形铁道
150 DJ1 2 2 株洲西门子牵引设备有限公司
151 DJ1 3 3 西安铁路局 宝鸡机务段 秦岭附加队
152 DJ2 1 1 中国铁路郑州局集团有限公司 郑州机务段京武快车队 奥星
153 DJ2 2 3 中国铁路郑州局集团有限公司 郑州机务段 奥星
154 HXD1D 1 15 中国铁路武汉局集团有限公司 武昌南机务段
155 HXD1D 16 16 中国铁路上海局集团有限公司 杭州机务段
156 HXD1D 17 17 中国铁路南昌局集团有限公司 南昌机务段
157 HXD1D 18 18 中国铁路南昌局集团有限公司 鹰潭机务段
158 HXD1D 19 19 中国铁路上海局集团有限公司 杭州机务段
159 HXD1D 20 20 中国铁路南昌局集团有限公司 南昌机务段
160 HXD1D 21 21 中国铁路上海局集团有限公司 杭州机务段
161 HXD1D 22 24 中国铁路南昌局集团有限公司 南昌机务段
162 HXD1D 25 25 中国铁路南昌局集团有限公司 鹰潭机务段
163 HXD1D 26 26 中国铁路南昌局集团有限公司 南昌机务段
164 HXD1D 27 27 中国铁路上海局集团有限公司 杭州机务段
165 HXD1D 28 28 中国铁路南昌局集团有限公司 鹰潭机务段
166 HXD1D 29 34 中国铁路南昌局集团有限公司 南昌机务段
167 HXD1D 35 35 中国铁路上海局集团有限公司 杭州机务段
168 HXD1D 36 38 中国铁路兰州局集团有限公司 兰州西机务段
169 HXD1D 39 39 中国铁路济南局集团有限公司 济南机务段
170 HXD1D 40 50 中国铁路兰州局集团有限公司 兰州西机务段
171 HXD1D 51 75 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
172 HXD1D 76 105 中国铁路兰州局集团有限公司 兰州西机务段
173 HXD1D 106 137 中国铁路上海局集团有限公司 上海机务段
174 HXD1D 138 168 中国铁路上海局集团有限公司 杭州机务段
175 HXD1D 169 175 中国铁路上海局集团有限公司 上海机务段
176 HXD1D 176 185 中国铁路武汉局集团有限公司 武昌南机务段
177 HXD1D 186 187 中国铁路南昌局集团有限公司 鹰潭机务段
178 HXD1D 188 188 中国铁路南昌局集团有限公司 南昌机务段
179 HXD1D 189 190 中国铁路南昌局集团有限公司 鹰潭机务段
180 HXD1D 191 232 中国铁路南昌局集团有限公司 南昌机务段
181 HXD1D 233 233 中国铁路南昌局集团有限公司 鹰潭机务段
182 HXD1D 234 237 中国铁路南昌局集团有限公司 南昌机务段
183 HXD1D 238 257 中国铁路广州局集团有限公司 广州机务段
184 HXD1D 258 270 中国铁路武汉局集团有限公司 武昌南机务段
185 HXD1D 271 275 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
186 HXD1D 276 279 中国铁路上海局集团有限公司 上海机务段
187 HXD1D 280 289 中国铁路上海局集团有限公司 徐州机务段
188 HXD1D 290 291 中国铁路南昌局集团有限公司 南昌机务段
189 HXD1D 292 293 中国铁路南昌局集团有限公司 鹰潭机务段
190 HXD1D 294 295 中国铁路南昌局集团有限公司 南昌机务段
191 HXD1D 296 300 中国铁路广州局集团有限公司 广州机务段
192 HXD1D 301 310 中国铁路武汉局集团有限公司 武昌南机务段
193 HXD1D 311 320 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
194 HXD1D 321 340 中国铁路青藏集团有限公司 西宁机务段
195 HXD1D 341 362 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
196 HXD1D 363 382 中国铁路广州局集团有限公司 广州机务段
197 HXD1D 383 392 中国铁路南昌局集团有限公司 南昌机务段
198 HXD1D 393 405 中国铁路上海局集团有限公司 上海机务段
199 HXD1D 406 415 中国铁路兰州局集团有限公司 兰州西机务段
200 HXD1D 416 430 中国铁路广州局集团有限公司 长沙机务段
201 HXD1D 431 440 中国铁路南昌局集团有限公司 南昌机务段
202 HXD1D 441 445 中国铁路南昌局集团有限公司 南昌机务段
203 HXD1D 446 450 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
204 HXD1D 451 460 中国铁路武汉局集团有限公司 武昌南机务段
205 HXD1D 461 470 中国铁路广州局集团有限公司 广州机务段
206 HXD1D 471 478 中国铁路兰州局集团有限公司 兰州西机务段
207 HXD1D 479 483 中国铁路上海局集团有限公司 上海机务段
208 HXD1D 484 488 中国铁路上海局集团有限公司 杭州机务段
209 HXD1D 489 490 中国铁路上海局集团有限公司 杭州机务段
210 HXD1D 491 510 中国铁路郑州局集团有限公司 郑州机务段
211 HXD1D 511 512 中国铁路上海局集团有限公司 徐州机务段
212 HXD1D 513 515 中国铁路上海局集团有限公司 上海机务段
213 HXD1D 516 520 中国铁路南昌局集团有限公司 南昌机务段
214 HXD1D 521 534 中国铁路广州局集团有限公司 广州机务段
215 HXD1D 522 522 广州铁路职业技术学院
216 HXD1D 535 544 中国铁路南昌局集团有限公司 南昌机务段
217 HXD1D 545 551 中国铁路上海局集团有限公司 上海机务段
218 HXD1D 552 554 中国铁路上海局集团有限公司 杭州机务段
219 HXD1D 555 559 中国铁路郑州局集团有限公司 郑州机务段
220 HXD1D 560 564 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
221 HXD1D 565 570 中国铁路广州局集团有限公司 广州机务段
222 HXD1D 571 585 中国铁路南昌局集团有限公司 南昌机务段
223 HXD1D 586 595 中国铁路上海局集团有限公司 杭州机务段
224 HXD1D 596 613 中国铁路兰州局集团有限公司 兰州西机务段
225 HXD1D 614 623 中国铁路广州局集团有限公司 广州机务段
226 HXD1D 624 633 中国铁路上海局集团有限公司 上海机务段
227 HXD1D 634 636 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
228 HXD1D 637 644 中国铁路郑州局集团有限公司 郑州机务段
229 HXD1D 645 660 中国铁路郑州局集团有限公司 郑州机务段
230 HXD1D 661 668 中国铁路武汉局集团有限公司 武昌南机务段
231 HXD1D 669 673 中国铁路乌鲁木齐局集团有限公司 乌鲁木齐机务段
232 HXD1D 674 678 中国铁路郑州局集团有限公司 郑州机务段
233 HXD1D 679 682 中国铁路上海局集团有限公司 上海机务段
234 HXD1D 683 683 中国铁路上海局集团有限公司 徐州机务段
235 HXD1D 684 684 中国铁路上海局集团有限公司 徐州机务段
236 HXD1D 685 689 中国铁路青藏集团有限公司 格尔木机务段
237 HXD1D 1898 1898 中国铁路上海局集团有限公司 上海机务段 周恩来号
238 HXD1D-J 1 3 中国铁路青藏集团有限公司 拉萨动车运用所
239 HXD1D-J 1001 1009 中国铁路昆明局集团有限公司 昆明动车运用所
240 HXD1D-J 1010 1013 中国铁路青藏集团有限公司 格尔木机务段
241 HXD1D-J 1014 1019 中国铁路成都局集团有限公司 成都动车运用所
242 HXD1D-J 1020 1027 中国铁路昆明局集团有限公司 昆明动车运用所
243 HXD3C 1 9 中国铁路沈阳局集团有限公司 沈阳机务段
244 HXD3C 10 10 中国铁路沈阳局集团有限公司 沈阳机务段
245 HXD3C 11 15 中国铁路济南局集团有限公司 济南机务段
246 HXD3C 16 20 中国铁路武汉局集团有限公司 江岸机务段(襄阳机务段支配)
247 HXD3C 21 25 中国铁路南昌局集团有限公司 南昌机务段
248 HXD3C 26 30 中国铁路郑州局集团有限公司 郑州机务段
249 HXD3C 31 35 中国铁路上海局集团有限公司 宁东机务段(上海机务段支配)
250 HXD3C 36 41 中国铁路武汉局集团有限公司 江岸机务段(武南机务段支配)
251 HXD3C 42 45 中国铁路武汉局集团有限公司 江岸机务段(襄阳机务段支配)
252 HXD3C 46 55 中国铁路南昌局集团有限公司 南昌机务段
253 HXD3C 56 60 中国铁路郑州局集团有限公司 郑州机务段
254 HXD3C 61 61 中国铁路沈阳局集团有限公司 沈阳机务段
255 HXD3C 62 62 中国铁路济南局集团有限公司 济南机务段
256 HXD3C 63 63 中国铁路沈阳局集团有限公司 沈阳机务段
257 HXD3C 64 70 中国铁路济南局集团有限公司 济南机务段
258 HXD3C 71 85 中国铁路武汉局集团有限公司 江岸机务段
259 HXD3C 86 95 中国铁路郑州局集团有限公司 郑州机务段
260 HXD3C 96 100 中国铁路济南局集团有限公司 济南机务段
261 HXD3C 101 110 中国铁路武汉局集团有限公司 江岸机务段
262 HXD3C 111 120 中国铁路沈阳局集团有限公司 沈阳机务段
263 HXD3C 121 125 中国铁路上海局集团有限公司 宁东机务段(上海机务段支配)
264 HXD3C 126 130 中国铁路南昌局集团有限公司 南昌机务段
265 HXD3C 131 135 中国铁路济南局集团有限公司 济南机务段
266 HXD3C 136 140 中国铁路郑州局集团有限公司 郑州机务段
267 HXD3C 141 165 中国铁路武汉局集团有限公司 江岸机务段
268 HXD3C 166 180 中国铁路成都局集团有限公司 重庆机务段
269 HXD3C 181 182 中国铁路济南局集团有限公司 济南机务段
270 HXD3C 183 190 中国铁路沈阳局集团有限公司 沈阳机务段
271 HXD3C 191 195 中国铁路济南局集团有限公司 济南机务段
272 HXD3C 198 200 中国铁路上海局集团有限公司 宁东机务段
273 HXD3C 201 220 中国铁路武汉局集团有限公司 江岸机务段
274 HXD3C 221 225 中国铁路上海局集团有限公司 宁东机务段
275 HXD3C 226 229 中国铁路沈阳局集团有限公司 沈阳机务段
276 HXD3C 238 238 中国铁路广州局集团有限公司 株洲机务段
277 HXD3C 271 300 中国铁路上海局集团有限公司 宁东机务段
278 HXD3C 446 446 中国铁路广州局集团有限公司 广州机务段
279 HXD3C 805 809 中国铁路广州局集团有限公司
280 HXD3C 810 819 中国铁路南宁局集团有限公司
281 HXD3C 820 829 中国铁路武汉局集团有限公司
282 HXD3C 896 925 中国铁路沈阳局集团有限公司
283 HXD3C 926 930 中国铁路南宁局集团有限公司
284 HXD3C 931 945 中国铁路北京局集团有限公司
285 HXD3C 946 955 中国铁路济南局集团有限公司
286 HXD3C 956 965 中国铁路郑州局集团有限公司
287 HXD3C 966 974 中国铁路济南局集团有限公司
288 HXD3D 1 10 中国铁路沈阳局集团有限公司 沈阳机务段
289 HXD3D 11 25 西安铁路局集团有限公司 西安机务段
290 HXD3D 26 34 中国铁路兰州局集团有限公司 兰州西机务段
291 HXD3D 35 35 中国铁路兰州局集团有限公司 迎水桥机务段 雷锋号
292 HXD3D 36 38 中国铁路兰州局集团有限公司 兰州西机务段
293 HXD3D 39 39 中国铁路济南局集团有限公司 济南机务段 共青团号
294 HXD3D 40 40 中国铁路兰州局集团有限公司 兰州西机务段
295 HXD3D 41 50 西安铁路局集团有限公司 西安机务段
296 HXD3D 51 70 中国铁路北京局集团有限公司 北京机务段
297 HXD3D 71 90 中国铁路南昌局集团有限公司 南昌机务段
298 HXD3D 91 115 中国铁路兰州局集团有限公司 兰州西机务段
299 HXD3D 116 135 中国铁路昆明局集团有限公司 昆明机务段
300 HXD3D 136 145 中国铁路北京局集团有限公司 北京机务段
301 HXD3D 146 150 呼和浩特铁路局集团有限公司 集宁机务段
302 HXD3D 151 155 中国铁路沈阳局集团有限公司 沈阳机务段
303 HXD3D 156 160 中国铁路南昌局集团有限公司 南昌机务段
304 HXD3D 161 165 中国铁路北京局集团有限公司 北京机务段
305 HXD3D 166 170 西安铁路局集团有限公司 西安机务段
306 HXD3D 171 180 中国铁路兰州局集团有限公司 兰州西机务段
307 HXD3D 181 190 中国铁路济南局集团有限公司 济南机务段
308 HXD3D 191 245 中国铁路沈阳局集团有限公司 沈阳机务段
309 HXD3D 246 255 中国铁路北京局集团有限公司 北京机务段
310 HXD3D 256 265 呼和浩特铁路局集团有限公司 集宁机务段
311 HXD3D 266 290 中国铁路兰州局集团有限公司 兰州西机务段
312 HXD3D 291 300 中国铁路沈阳局集团有限公司 沈阳机务段
313 HXD3D 301 310 中国铁路济南局集团有限公司 济南机务段
314 HXD3D 310 315 中国铁路昆明局集团有限公司 昆明机务段
315 HXD3D 316 320 中国铁路南昌局集团有限公司 南昌机务段
316 HXD3D 321 322 呼和浩特铁路局集团有限公司 集宁机务段
317 HXD3D 323 325 中国铁路北京局集团有限公司 北京机务段
318 HXD3D 326 333 西安铁路局集团有限公司 西安机务段
319 HXD3D 334 340 西安铁路局集团有限公司 安康机务段
320 HXD3D 341 345 中国铁路沈阳局集团有限公司 沈阳机务段
321 HXD3D 346 346 中国铁路成都局集团有限公司 重庆机务段
322 HXD3D 351 351 中国铁路成都局集团有限公司 重庆机务段
323 HXD3D 356 365 西安铁路局集团有限公司 安康机务段
324 HXD3D 366 369 中国铁路北京局集团有限公司 北京机务段
325 HXD3D 370 382 呼和浩特铁路局集团有限公司 集宁机务段
326 HXD3D 383 392 中国铁路昆明局集团有限公司 昆明机务段
327 HXD3D 393 397 中国铁路兰州局集团有限公司 兰州西机务段
328 HXD3D 398 402 西安铁路局集团有限公司 西安机务段
329 HXD3D 403 417 西安铁路局集团有限公司 西安机务段
330 HXD3D 418 419 中国铁路哈尔滨局集团有限公司 牡丹江机务段
331 HXD3D 420 424 中国铁路北京局集团有限公司 北京机务段
332 HXD3D 425 429 呼和浩特铁路局集团有限公司 集宁机务段
333 HXD3D 430 433 中国铁路哈尔滨局集团有限公司 牡丹江机务段
334 HXD3D 434 443 中国铁路南昌局集团有限公司 南昌机务段
335 HXD3D 444 449 中国铁路济南局集团有限公司 济南机务段
336 HXD3D 450 464 西安铁路局集团有限公司 西安机务段
337 HXD3D 465 468 中国铁路济南局集团有限公司 济南机务段
338 HXD3D 469 473 中国铁路济南局集团有限公司 济南机务段
339 HXD3D 474 479 中国铁路昆明局集团有限公司 昆明机务段
340 HXD3D 480 484 中国铁路南昌局集团有限公司 南昌机务段
341 HXD3D 485 489 西安铁路局集团有限公司 西安机务段
342 HXD3D 490 499 中国铁路北京局集团有限公司 北京机务段
343 HXD3D 500 503 中国铁路哈尔滨局集团有限公司 牡丹江机务段
344 HXD3D 504 514 中国铁路沈阳局集团有限公司 沈阳机务段
345 HXD3D 515 515 中国铁路成都局集团有限公司 重庆机务段
346 HXD3D 516 518 中国铁路沈阳局集团有限公司 沈阳机务段
347 HXD3D 519 528 西安铁路局集团有限公司 西安机务段
348 HXD3D 529 538 中国铁路北京局集团有限公司 北京机务段
349 HXD3D 539 541 呼和浩特铁路局集团有限公司 集宁机务段
350 HXD3D 542 553 西安铁路局集团有限公司 西安机务段
351 HXD3D 554 563 中国铁路济南局集团有限公司 济南机务段
352 HXD3D 564 568 中国铁路昆明局集团有限公司 昆明机务段
353 HXD3D 569 573 中国铁路成都局集团有限公司 重庆机务段
354 HXD3D 574 583 中国铁路济南局集团有限公司 济南机务段
355 HXD3D 584 584 中国铁路沈阳局集团有限公司 沈阳机务段
356 HXD3D 585 609 中国铁路哈尔滨局集团有限公司 三棵树机务段
357 HXD3D 610 611 中国铁路北京局集团有限公司 北京机务段
358 HXD3D 612 621 中国铁路南昌局集团有限公司 南昌机务段
359 HXD3D 622 626 中国铁路南昌局集团有限公司 南昌机务段
360 HXD3D 627 629 中国铁路哈尔滨局集团有限公司 三棵树机务段
361 HXD3D 630 630 中国铁路哈尔滨局集团有限公司 哈尔滨机务段
362 HXD3D 631 631 西安铁路局集团有限公司 西安机务段 第五代“钢人铁马号”
363 HXD3D 632 653 中国铁路沈阳局集团有限公司 沈阳机务段
364 HXD3D 654 673 中国铁路沈阳局集团有限公司 沈阳机务段
365 HXD3D 674 681 中国铁路沈阳局集团有限公司 沈阳机务段
366 HXD3D 682 688 中国铁路兰州局集团有限公司 兰州西机务段
367 HXD3D 1886 1886 中国铁路哈尔滨局集团有限公司 哈尔滨机务段 第五代“朱德号”
368 HXD3D 1893 1893 中国铁路北京局集团有限公司 丰台机务段 第六代“毛泽东号”
369 HXD3D 1921 1921 中国铁路沈阳局集团有限公司 沈阳机务段 共产党员号
370 HXD3D 7001 7002 广西沿海铁路股份有限公司 南宁南机务运用段
371 HXD3D 7003 7003 吉林铁道职业技术学院
372 HXD3D 8001 8025 中国铁路沈阳局集团有限公司 沈阳机务段 大同
373 HXD3D 8026 8028 中国铁路太原局集团有限公司 太原南机务段 大同
374 东方红2 1 50 资阳
375 东风 1201 1830 大连、成都
376 东风 2001 2094 戚墅堰
377 东风11 1 459 戚墅堰
378 东风12 8001 8001 吉林铁道职业技术学院
379 东风2 3201 3348 戚墅堰
380 东风21 1 5 中国铁路昆明局集团有限公司 昆明机务段
381 东风21 6 6 中国铁路昆明局集团有限公司 昆明机务段 状元号
382 东风21 7 7 中国铁路昆明局集团有限公司 昆明机务段 亲年号
383 东风21 8 8 中国铁路昆明局集团有限公司 昆明机务段 建水古城
384 东风21 9 100 中国铁路昆明局集团有限公司 昆明机务段
385 东风21 101 101 中国铁路昆明局集团有限公司 昆明机务段 异龙号
386 东风21 102 102 中国铁路昆明局集团有限公司 昆明机务段
387 东风21 1001 1002 云南钢铁厂
388 东风2Z 3251 3251 *齐齐哈尔铁路局 加格达奇机务段
389 东风3 3243 3243 中车共享城机车公园
390 东风4 3247 3247 中车成都轨道交通产业园
391 东风4B 1001 1999 大连
392 东风4B 1963 1963 *北京铁路局 丰台机务段
393 东风4B 2101 2685 大连
394 东风4B 2104 2104 *上海铁路局 蚌埠机务段
395 东风4B 2376 2376 *南昌铁路局 鹰潭机务段
396 东风4B 3101 3999 资阳
397 东风4B 3214 3214 *浙江金温铁道开发有限公司 温州机务段
398 东风4B 3249 3249 *西安铁路局 西安机务段
399 东风4B 3390 3390 *成都铁路局 重庆机务段
400 东风4B 3593 3593 *中国铁路广州局集团有限公司 株洲机务段
401 东风4B 6001 6587 大同
402 东风4B 6530 6530 *南宁铁路局 南宁机务段
403 东风4B 7001 7363 大连
404 东风4B 7364 7365 四方
405 东风4B 7366 7796 大连
406 东风4B 7701 7732 戚墅堰改
407 东风4B 9001 9702 资阳
408 东风4B 9167 9167 *南昌铁路局 向塘机务段
409 东风4B 9531 9531 *新长铁路公司
410 东风4C 1 10 大同
411 东风4C 11 11 中国铁路北京局集团有限公司 丰台段 青年文明号
412 东风4C 12 40 大同
413 东风4C 2001 2006 四方
414 东风4C 4001 4465 大连
415 东风4C 4466 4466 四方机车车辆厂 四方
416 东风4C 5001 5273 资阳
417 东风4C 5274 5275 三茂铁路公司 三水机务段 东风4CK
418 东风4C 5276 5335 资阳
419 东风4D 7001 7021 中国铁路南宁局集团有限公司
420 东风5 1 1 中国铁路北京局集团有限公司 北京车辆段
421 东风5 1974 1975 中国铁路兰州局集团有限公司 兰州西机务段 唐山
422 东风5 1976 2082 唐山
423 东风5 2083 2083 中国石油兰州石化公司 唐山
424 东风5 3279 3279 云南铁路博物馆
425 东风6 1 2 *沈阳铁路局 大连机务段
426 东风6 3 3 沈阳铁路陈列馆
427 东风6 4 4 *沈阳铁路局 大连机务段
428 东风7 174 174 中国铁路太原局集团有限公司 太原机务段北场
429 东风7B 3006 3006 中国铁道博物馆
430 东风7B 3015 3015 王坪村铁路公园
431 东风7B 6001 6072 *北京铁路局 邯郸机务段;郑州铁路局 新乡机务段 调车
432 东风7D 1 1 中国铁道博物馆
433 东风7D 3001 3001 中国铁道博物馆
434 东风7E 1 1 中国铁路郑州局集团有限公司 新乡机务段
435 东风7E 2 2 中国铁路郑州局集团有限公司 郑州机务段
436 东风7G 9001 9004 呼和浩特铁路局 集宁机务段 赛汗塔拉分段
437 东风8 1 1 中国铁道博物馆
438 东风9 1 2 中国铁路广州局集团有限公司广州机务段
439 韶山1 8 8 中国铁道博物馆
440 韶山1 156 156 郑州世纪欢乐园
441 韶山1 160 160 北京铁路电气化学校
442 韶山1 227 227 中国铁路兰州局集团有限公司 兰州西机务段
443 韶山1 254 254 中国铁路北京局集团有限公司 丰台机务段 储备厂
444 韶山1 307 307 中国铁路太原局集团有限公司 榆次机务折返段
445 韶山1 309 309 中国铁路太原局集团有限公司 太原机务段北场
446 韶山1 321 321 武汉铁路职业技术学院
447 韶山1 681 681 中国铁道博物馆
448 韶山1 695 695 沈阳铁路陈列馆
449 韶山1 762 762 中国铁路广州局集团有限公司 娄底运用车间储备厂
450 韶山1 818 818 西南交通大学 机车博物园
451 韶山1 821 821 韶关机务实训基地
452 韶山1 826 826 韶关机务实训基地
453 韶山3 454 454 中国铁路成都局集团有限公司 贵阳机务段 先锋号
454 韶山3 524 524 中国铁路武汉局集团有限公司 江岸机务段 青年号
455 韶山3 4160 4160 广西沿海铁路公司 南宁南机务运用段 共青团号
456 韶山3 4178 4178 广西沿海铁路公司 南宁南机务运用段 共青团号
457 韶山3 4235 4235 中国铁路成都局集团有限公司 重庆机务段 青年文明号
458 韶山3 4258 4258 中国铁路成都局集团有限公司 重庆机务段 党员先锋号
459 韶山3 5080 5080 广州铁路博物馆
460 韶山3 6005 6005 湖南交通工程学院
461 韶山3 8050 8050 武汉四美塘铁路遗址公园
462 韶山3B 16 16 西安铁路局 安康机务段 青年文明号
463 韶山3B 5001 5001 中国铁路成都局集团有限公司 贵阳机务段 *先锋力神
464 韶山3B 5035 5035 中国铁路兰州局集团有限公司 迎水桥机务段 雷锋号 (曾)
465 韶山3B 5038 5038 中国铁路兰州局集团有限公司 迎水桥机务段 青年文明号
466 韶山3B 5151 5151 中国铁路成都局集团有限公司 西昌机务段 扶贫先锋号
467 韶山3B 5162 5162 中国铁路昆明局集团有限公司 昆明机务段 五四青年号
468 韶山3B 5235 5235 中国铁路成都局集团有限公司 西昌机务段 *共青团号
469 韶山3C 1 1 中国铁路成都局集团有限公司 贵阳机务段
470 韶山4 6 6 中国铁道博物馆
471 韶山4 10 10 中国铁路成都局集团有限公司 西昌机务段
472 韶山4 50 50 中国铁路郑州局集团有限公司 新乡机务段 先锋号
473 韶山4 63 63 中国铁路太原局集团有限公司 太原机务段
474 韶山4 204 204 中国铁路郑州局集团有限公司 新乡机务段 先锋号
475 韶山4 448 448 中国铁路沈阳局集团有限公司 苏家屯机务段 先锋号
476 韶山4 574 574 中铁三局集团 先锋号
477 韶山4 743 743 中国铁路哈尔滨局集团有限公司 哈尔滨机务段 青年文明号
478 韶山4 855 855 西安铁路局 新丰镇机务段
479 韶山4 911 911 中铁三局集团 青年文明号
480 韶山4 2006 2006 吉林铁道职业技术学院
481 韶山4B 19 19 神朔铁路公司 神木北机务段 青年号
482 韶山4B 89 89 神朔铁路公司 神木北机务段 青年文明号
483 韶山4B 90 90 神朔铁路公司 神木北机务段 青年文明号
484 韶山4B 257 257 包神铁路公司 东胜机务段 党员先锋号
485 韶山4G 159 1177 株洲
486 韶山4G 168 168 中国铁道博物馆
487 韶山4G 171 171 中国铁路哈尔滨局集团有限公司 牡丹江机务段
488 韶山4G 179 179 中国铁路太原局集团有限公司 湖东机务段
489 韶山4G 466 466 石家庄铁道大学
490 韶山4G 1089 1089 *呼和浩特铁路局 包头西机务段
491 韶山4G 1886 1886 中国铁路哈尔滨局集团有限公司 哈尔滨机务段 *朱德号 株洲
492 韶山4G 3001 3002 资阳
493 韶山4G 6001 6001 中国铁道博物馆
494 韶山4G 6001 6001 中国铁道博物馆 大同
495 韶山4G 7001 7110 大连
496 韶山4G 7121 7243 大连
497 韶山5 1 1 中国铁道博物馆
498 韶山5 2 2 郑州世纪欢乐园
499 韶山6 1 1 郑州铁路司机学校
500 韶山6 2 2 中国铁道博物馆
501 韶山6B 1011 1011 西安铁路局 西安机务段 *青年文明号
502 韶山6B 1026 1026 韶关机务实训基地
503 韶山6B 1088 1088 中国铁路武汉局集团有限公司 襄阳机务段 *民兵号
504 韶山6B 1111 1111 中国铁路武汉局集团有限公司 襄阳机务段 *先锋号
505 韶山6B 6001 6001 韶关机务实训基地
506 韶山6B 6002 6002 广州铁路博物馆
507 韶山7 1 79 中国铁路南宁局集团有限公司 柳州机务段
508 韶山7 76 76 中国铁路南宁局集团有限公司 南宁机务段 *五四红旗号
509 韶山7 80 84 中国铁路南宁局集团有限公司 柳州机务段
510 韶山7 85 111 中国铁路南宁局集团有限公司 柳州机务段
511 韶山7 8112 8113 山西孝柳铁路有限责任公司
512 韶山7B 1 1 *南宁铁路局集团有限公司 南宁机务段
513 韶山7B 2 2 中国铁路南宁局集团有限公司 柳州机务段
514 韶山7D 1 58 西安铁路局集团有限公司 西安机务段
515 韶山7D 631 631 西安铁路局集团有限公司 西安机务段 *钢人铁马号
516 韶山7E 1 140 大同
517 韶山7E 6001 6002 中国铁路昆明局集团有限公司 大同
518 韶山7E 7001 7004 大连
519 韶山8 1 1 中国铁路广州局集团有限公司 广州机务段
520 韶山8 2 2 中国铁路广州局集团有限公司 广州机务段
521 韶山8 3 4 中国铁路上海局集团有限公司 上海机务段
522 韶山8 5 5 中国铁路郑州局集团有限公司 郑州机务段
523 韶山8 9 9 中国铁路郑州局集团有限公司 郑州机务段
524 韶山8 11 11 中国铁路郑州局集团有限公司 郑州机务段
525 韶山8 12 12 中国铁路郑州局集团有限公司 郑州机务段
526 韶山8 15 16 中国铁路郑州局集团有限公司 郑州机务段
527 韶山8 17 17 中国铁路上海局集团有限公司 上海机务段
528 韶山8 20 20 中国铁路郑州局集团有限公司 郑州机务段
529 韶山8 24 25 中国铁路郑州局集团有限公司 郑州机务段
530 韶山8 27 27 中国铁路郑州局集团有限公司 郑州机务段
531 韶山8 29 32 中国铁路郑州局集团有限公司 郑州机务段
532 韶山8 33 35 中国铁路上海局集团有限公司 上海机务段
533 韶山8 36 36 中国铁路郑州局集团有限公司 郑州机务段
534 韶山8 38 38 中国铁路上海局集团有限公司 上海机务段
535 韶山8 39 39 中国铁路上海局集团有限公司 上海机务段 国祥号
536 韶山8 40 40 中国铁路上海局集团有限公司 上海机务段
537 韶山8 41 41 中国铁路北京局集团有限公司 北京机务段
538 韶山8 43 43 中国铁路郑州局集团有限公司 郑州机务段
539 韶山8 44 44 中国铁路北京局集团有限公司 邯郸机务段
540 韶山8 45 45 中国铁路郑州局集团有限公司 郑州机务段
541 韶山8 48 48 中国铁路北京局集团有限公司 邯郸机务段
542 韶山8 49 49 中国铁路南昌局集团有限公司 南昌机务段
543 韶山8 50 50 中国铁路南昌局集团有限公司 南昌机务段
544 韶山8 51 51 中国铁路北京局集团有限公司 邯郸机务段
545 韶山8 52 52 中国铁路上海局集团有限公司 上海机务段
546 韶山8 55 55 中国铁路南昌局集团有限公司 南昌机务段
547 韶山8 56 57 中国铁路北京局集团有限公司 邯郸机务段
548 韶山8 64 64 中国铁路广州局集团有限公司 广州机务段
549 韶山8 72 72 中国铁路北京局集团有限公司 邯郸机务段
550 韶山8 73 73 中国铁路北京局集团有限公司 北京机务段
551 韶山8 74 74 中国铁路北京局集团有限公司 邯郸机务段
552 韶山8 81 81 中国铁路北京局集团有限公司 北京机务段
553 韶山8 83 84 中国铁路郑州局集团有限公司 郑州机务段
554 韶山8 85 85 中国铁路北京局集团有限公司 北京机务段
555 韶山8 88 103 中国铁路郑州局集团有限公司 郑州机务段
556 韶山8 104 104 中国铁路北京局集团有限公司 邯郸机务段
557 韶山8 109 111 中国铁路南昌局集团有限公司 南昌机务段
558 韶山8 114 116 中国铁路南昌局集团有限公司 南昌机务段
559 韶山8 118 119 中国铁路北京局集团有限公司 北京机务段
560 韶山8 121 126 中国铁路北京局集团有限公司 北京机务段
561 韶山8 127 128 中国铁路郑州局集团有限公司 郑州机务段
562 韶山8 130 130 中国铁路南昌局集团有限公司 南昌机务段
563 韶山8 131 131 中国铁路广州局集团有限公司 长沙机务段
564 韶山8 132 132 中国铁路广州局集团有限公司 长沙机务段
565 韶山8 133 133 中国铁路广州局集团有限公司 长沙机务段
566 韶山8 134 134 中国铁路广州局集团有限公司 长沙机务段
567 韶山8 136 136 中国铁路广州局集团有限公司 长沙机务段
568 韶山8 141 141 中国铁路广州局集团有限公司 广州机务段
569 韶山8 144 144 中国铁路广州局集团有限公司 长沙机务段
570 韶山8 148 148 中国铁路广州局集团有限公司 广州机务段
571 韶山8 156 156 中国铁路广州局集团有限公司 广州机务段
572 韶山8 163 163 中国铁路广州局集团有限公司 广州机务段
573 韶山8 166 166 中国铁路广州局集团有限公司 广州机务段 新世纪金龙号
574 韶山8 171 171 中国铁路上海局集团有限公司 上海机务段
575 韶山8 172 172 中国铁路郑州局集团有限公司 郑州机务段
576 韶山8 173 173 中国铁路广州局集团有限公司 广州机务段
577 韶山8 181 181 中国铁路广州局集团有限公司 广州机务段
578 韶山8 186 186 中国铁路广州局集团有限公司 广州机务段
579 韶山8 191 191 中国铁路广州局集团有限公司 广州机务段
580 韶山8 192 192 中国铁路广州局集团有限公司 广州机务段
581 韶山8 197 197 中国铁路郑州局集团有限公司 郑州机务段
582 韶山8 200 204 中国铁路上海局集团有限公司 上海机务段
583 韶山8 205 205 中国铁路广州局集团有限公司 长沙机务段
584 韶山8 214 214 中国铁路郑州局集团有限公司 郑州机务段
585 韶山9 1 3 中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段
586 韶山9 5 29 中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段
587 韶山9 30 30 中国铁路沈阳局集团有限公司 通辽机务段
588 韶山9 31 37 中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段
589 韶山9 38 38 中国铁路沈阳局集团有限公司 通辽机务段
590 韶山9 39 43 中国铁路沈阳局集团有限公司 沈阳机务段;中国铁路上海局集团有限公司 上海机务段

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">LBJ Receiver</string>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.LBJReceiver" parent="android:Theme.Material.Light.NoActionBar" />
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
</full-backup-content>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
</cloud-backup>
</data-extraction-rules>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-files-path name="external_files" path="." />
<external-files-path name="downloads" path="Download/" />
</paths>

View File

@@ -0,0 +1,13 @@
package receiver.lbj
import org.junit.Test
import org.junit.Assert.*
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

6
build.gradle.kts Normal file
View File

@@ -0,0 +1,6 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}

23
gradle.properties Normal file
View File

@@ -0,0 +1,23 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true

32
gradle/libs.versions.toml Normal file
View File

@@ -0,0 +1,32 @@
[versions]
agp = "8.7.2"
kotlin = "2.0.0"
coreKtx = "1.16.0"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
lifecycleRuntimeKtx = "2.9.0"
activityCompose = "1.10.1"
composeBom = "2024.04.01"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Mon May 12 22:56:18 GMT+08:00 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

185
gradlew vendored Normal file
View File

@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

89
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

24
settings.gradle.kts Normal file
View File

@@ -0,0 +1,24 @@
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "LBJ Receiver"
include(":app")