mirror of https://gitee.com/jeecg/jeecg.git
parent
07998acf94
commit
c211a10f79
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.6.0_02"/>
|
||||
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>jeecg-framework</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.maven.ide.eclipse.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.maven.ide.eclipse.maven2Nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
@ -1,7 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/main/resources/dbconfig.properties=UTF-8
|
||||
encoding//src/main/resources/sysConfig.properties=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
@ -1,8 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
@ -1,4 +0,0 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="jeecg-framework">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
||||
<property name="context-root" value="jeecg-framework"/>
|
||||
<property name="java-output-path" value="/jeecg-framework/target/classes"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.5"/>
|
||||
<installed facet="jst.web" version="2.3"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
@ -1 +0,0 @@
|
||||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
@ -1 +0,0 @@
|
||||
Window
|
@ -1,2 +0,0 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<http://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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
@ -1,821 +0,0 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>jeecg</artifactId>
|
||||
<version>3.4.3-GA</version>
|
||||
<packaging>war</packaging>
|
||||
<properties>
|
||||
<!-- 主要依赖库的版本定义 -->
|
||||
<spring.version>3.1.1.RELEASE</spring.version>
|
||||
<hibernate.version>4.1.0.Final</hibernate.version>
|
||||
|
||||
<!-- 工作流 -->
|
||||
<activiti.version>5.11</activiti.version>
|
||||
<mybatis.version>3.1.1</mybatis.version>
|
||||
|
||||
<!-- 辅助依赖包 -->
|
||||
<cglib.version>2.2</cglib.version>
|
||||
<aspectj.version>1.6.9</aspectj.version>
|
||||
<jodd.version>3.3.7</jodd.version>
|
||||
<javassist.version>3.15.0-GA</javassist.version>
|
||||
<ant.version>1.6.5</ant.version>
|
||||
<spring-jpa.versoin>2.0.8</spring-jpa.versoin>
|
||||
<mybatis-spring.version>1.1.1</mybatis-spring.version>
|
||||
|
||||
<!-- 工具包 -->
|
||||
<jackson.version>1.8.4</jackson.version>
|
||||
<jackson2.version>2.1.2</jackson2.version>
|
||||
<json-lib.version>2.1</json-lib.version>
|
||||
<fastjson-lib.version>1.1.37</fastjson-lib.version>
|
||||
<dom4j.version>1.6.1</dom4j.version>
|
||||
<slf4j.version>1.6.1</slf4j.version>
|
||||
<log4j.version>1.2.16</log4j.version>
|
||||
<classmate.version>0.5.4</classmate.version>
|
||||
<commons-beanutils.version>1.7.0</commons-beanutils.version>
|
||||
<commons-collections.version>3.2.1</commons-collections.version>
|
||||
<commons-chain.version>1.2</commons-chain.version>
|
||||
<commons-codec.version>1.3</commons-codec.version>
|
||||
<commons-digester.version>2.0</commons-digester.version>
|
||||
<commons-io.version>1.3.2</commons-io.version>
|
||||
<commons-fileupload.version>1.2.1</commons-fileupload.version>
|
||||
<commons-lang.version>2.6</commons-lang.version>
|
||||
<commons-lang3.version>3.1</commons-lang3.version>
|
||||
<commons-logging.version>1.0.4</commons-logging.version>
|
||||
<commons-logging-api.version>1.1</commons-logging-api.version>
|
||||
<commons-validator.version>1.3.1</commons-validator.version>
|
||||
<commons-email.version>1.2</commons-email.version>
|
||||
<ehcache.version>2.4.3</ehcache.version>
|
||||
<freemarker.version>2.3.19</freemarker.version>
|
||||
<hamcrest.version>1.3</hamcrest.version>
|
||||
<hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
|
||||
<poi.version>3.9</poi.version>
|
||||
<antlr.version>3.3</antlr.version>
|
||||
<juh.version>3.2.1</juh.version>
|
||||
<unoil.version>3.2.1</unoil.version>
|
||||
<xwork-core.version>2.1.6</xwork-core.version>
|
||||
<jurt.version>3.2.1</jurt.version>
|
||||
<jacksonframework.version>1.84</jacksonframework.version>
|
||||
|
||||
<!-- 数据库组件包 -->
|
||||
<commons-pool.version>1.6</commons-pool.version>
|
||||
<commons-dbcp.version>1.4</commons-dbcp.version>
|
||||
<druid.version>0.2.9</druid.version>
|
||||
<!-- oracle -->
|
||||
<ojdbc.version>10.2.0.1.0</ojdbc.version>
|
||||
<!-- mysql -->
|
||||
<mysql.version>5.1.27</mysql.version>
|
||||
<!-- sqlserver2005 -->
|
||||
<sqlserver.version>1.0.0</sqlserver.version>
|
||||
<!-- h2 -->
|
||||
<h2.version>1.3.170</h2.version>
|
||||
<!-- jtds for mssql/db2 -->
|
||||
<jtds.version>1.2.4</jtds.version>
|
||||
<!-- postgresql -->
|
||||
<postgresql.version>9.1-903.jdbc4</postgresql.version>
|
||||
|
||||
<!-- 测试依赖包 -->
|
||||
<junit.version>4.7</junit.version>
|
||||
<mockito.version>1.9.5</mockito.version>
|
||||
<powermock.version>1.5</powermock.version>
|
||||
<selenium.version>2.28.0</selenium.version>
|
||||
<jetty.version>7.6.8.v20121106</jetty.version>
|
||||
<poi-ooxml-schemas.version>3.9</poi-ooxml-schemas.version>
|
||||
<poi-ooxml.version>3.9</poi-ooxml.version>
|
||||
<poi-scratchpad.version>3.9</poi-scratchpad.version>
|
||||
<!-- Plugin的属性定义 -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<jdk.version>1.6</jdk.version>
|
||||
<codegenerate.version>3.4.3</codegenerate.version>
|
||||
<minidao.version>1.3.3</minidao.version>
|
||||
<CKFinder.version>2.4</CKFinder.version>
|
||||
<jodconverter.version>3.0-beta-4</jodconverter.version>
|
||||
<pinyin4j.version>2.5.0</pinyin4j.version>
|
||||
<ojdbc14.version>10.2.0.4.0</ojdbc14.version>
|
||||
<org.quartz.version>1.6.2</org.quartz.version>
|
||||
<activation.version>1.1.1</activation.version>
|
||||
<aopalliance.version>1.0</aopalliance.version>
|
||||
<xstream.version>1.4.4</xstream.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>http://repo.maven.apache.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spy</id>
|
||||
<name>Spy Repository</name>
|
||||
<url>http://files.couchbase.com/maven2/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>xerces</id>
|
||||
<name>xerces</name>
|
||||
<url>https://xerces.apache.org/xerces2-j/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>proxool</id>
|
||||
<name>proxool</name>
|
||||
<url>http://proxool.cvs.sourceforge.net/viewvc/proxool/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>oschinaMavenThirdparty</id>
|
||||
<name>oschinaMavenThirdparty</name>
|
||||
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>osc</id>
|
||||
<name>oschina</name>
|
||||
<url>http://maven.oschina.net/content/groups/public/</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- activation -->
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>${activation.version}</version>
|
||||
</dependency>
|
||||
<!-- aopalliance -->
|
||||
<dependency>
|
||||
<groupId>aopalliance</groupId>
|
||||
<artifactId>aopalliance</artifactId>
|
||||
<version>${aopalliance.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义的依赖包 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>codegenerate</artifactId>
|
||||
<version>${codegenerate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>minidao</artifactId>
|
||||
<version>${minidao.version}</version>
|
||||
</dependency>
|
||||
<!-- ckfinder -->
|
||||
<dependency>
|
||||
<groupId>com.ckfinder</groupId>
|
||||
<artifactId>CKFinder-updateByAlexander</artifactId>
|
||||
<version>${CKFinder.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ckfinder</groupId>
|
||||
<artifactId>CKFinderPlugin-FileEditor</artifactId>
|
||||
<version>${CKFinder.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ckfinder</groupId>
|
||||
<artifactId>CKFinderPlugin-ImageResize</artifactId>
|
||||
<version>${CKFinder.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ckfinder</groupId>
|
||||
<artifactId>CKFinderPlugin-Watermark</artifactId>
|
||||
<version>${CKFinder.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.coobird</groupId>
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss</groupId>
|
||||
<artifactId>jboss-vfs</artifactId>
|
||||
<version>3.1.0.Final</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.artofsolving</groupId>
|
||||
<artifactId>jodconverter</artifactId>
|
||||
<version>${jodconverter.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>pinyin4j</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>${pinyin4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc14</artifactId>
|
||||
<version>${ojdbc14.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgresql.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.springsource</groupId>
|
||||
<artifactId>org.quartz</artifactId>
|
||||
<version>${org.quartz.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.transaction</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<!-- SPRING 依赖包 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-expression</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<!-- SPRING end -->
|
||||
|
||||
<!-- hibernate -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>4.2.3.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-ehcache</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-proxool</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.common</groupId>
|
||||
<artifactId>hibernate-commons-annotations</artifactId>
|
||||
<version>4.0.2.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.javax.persistence</groupId>
|
||||
<artifactId>hibernate-jpa-2.0-api</artifactId>
|
||||
<version>1.0.1.Final</version>
|
||||
</dependency>
|
||||
<!-- poi -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi-ooxml.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>${poi-ooxml-schemas.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
<version>${poi-scratchpad.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- anltr -->
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr</artifactId>
|
||||
<version>${antlr.version}</version>
|
||||
</dependency>
|
||||
<!-- spring orm -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--工作流依赖包 -->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-engine</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-spring</artifactId>
|
||||
<version>${activiti.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>${mybatis-spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 数据库相关依赖包 -->
|
||||
<dependency>
|
||||
<groupId>commons-pool</groupId>
|
||||
<artifactId>commons-pool</artifactId>
|
||||
<version>${commons-pool.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>${commons-dbcp.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>jdbc2005</artifactId>
|
||||
<version>${sqlserver.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jtds</groupId>
|
||||
<artifactId>jtds</artifactId>
|
||||
<version>${jtds.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- WEB begin -->
|
||||
<!-- spring mvc -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- web依赖包 -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<!-- WEB end -->
|
||||
|
||||
<!-- 辅助依赖包 -->
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-nodep</artifactId>
|
||||
<version>${cglib.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>${aspectj.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${aspectj.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jodd</groupId>
|
||||
<artifactId>jodd</artifactId>
|
||||
<version>${jodd.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>${javassist.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>${ant.version}</version>
|
||||
</dependency>
|
||||
<!-- 工具包 -->
|
||||
<!-- JSON begin -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-core-asl</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>jackson</artifactId>
|
||||
<version>${jacksonframework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>${json-lib.version}</version>
|
||||
<classifier>jdk15</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson-lib.version}</version>
|
||||
</dependency>
|
||||
<!-- JSON end -->
|
||||
<!-- dom4j -->
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>${dom4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!-- log4j -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<!-- classmate -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml</groupId>
|
||||
<artifactId>classmate</artifactId>
|
||||
<version>${classmate.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- commons-beanutils -->
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- commons-collections -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-chain -->
|
||||
<dependency>
|
||||
<groupId>commons-chain</groupId>
|
||||
<artifactId>commons-chain</artifactId>
|
||||
<version>${commons-chain.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-codec -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-digester -->
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
<version>${commons-digester.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-fileupload -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons-fileupload.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-lang -->
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>${commons-lang.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-email -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>${commons-email.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-logging -->
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>${commons-logging.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging-api</artifactId>
|
||||
<version>${commons-logging-api.version}</version>
|
||||
</dependency>
|
||||
<!-- commons-validator -->
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>${commons-validator.version}</version>
|
||||
</dependency>
|
||||
<!-- ehcache -->
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-core</artifactId>
|
||||
<version>${ehcache.version}</version>
|
||||
</dependency>
|
||||
<!-- freemarker -->
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>${freemarker.version}</version>
|
||||
</dependency>
|
||||
<!-- hamcrest -->
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<version>${hamcrest.version}</version>
|
||||
</dependency>
|
||||
<!-- JSR303 Bean Validator -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator-annotation-processor</artifactId>
|
||||
<version>${hibernate-validator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.openoffice</groupId>
|
||||
<artifactId>juh</artifactId>
|
||||
<version>${juh.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.opensymphony</groupId>
|
||||
<artifactId>xwork-core</artifactId>
|
||||
<version>${xwork-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openoffice</groupId>
|
||||
<artifactId>jurt</artifactId>
|
||||
<version>${jurt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openoffice</groupId>
|
||||
<artifactId>unoil</artifactId>
|
||||
<version>${unoil.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TEST begin -->
|
||||
<!-- junit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- jacob -->
|
||||
<dependency>
|
||||
<groupId>org.jeecg</groupId>
|
||||
<artifactId>jacob</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- h2 -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--proxool -->
|
||||
<dependency>
|
||||
<groupId>com.cloudhopper.proxool</groupId>
|
||||
<artifactId>proxool</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cloudhopper.proxool</groupId>
|
||||
<artifactId>proxool-cglib</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
<!-- highchart 图片导出 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>batik-all</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework</groupId>
|
||||
<artifactId>fop</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.7.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis-ext</artifactId>
|
||||
<version>1.3.04</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.3.04</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>xmlgraphics-commons</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
<!-- Xml数据导出导入 -->
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>${xstream.version}</version>
|
||||
</dependency>
|
||||
<!-- json 工具类-->
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.2.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<organization>
|
||||
<name>JEECG微云开发平台</name>
|
||||
<url>www.jeecg.org</url>
|
||||
</organization>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>tomcat-maven-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<configuration>
|
||||
<path>/jeecg</path>
|
||||
<port>8080</port>
|
||||
<uriEncoding>UTF-8</uriEncoding>
|
||||
<url>http://localhost:8080/manager/html</url>
|
||||
<server>tomcat6</server>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>jeecg</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.sql</include>
|
||||
<include>**/*.ftl</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>src/test/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
<include>**/*.sql</include>
|
||||
<include>**/*.ftl</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
</testResources>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -1,26 +0,0 @@
|
||||
package org.jeecgframework.core.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target( { ElementType.METHOD })
|
||||
@Documented
|
||||
public @interface Ehcache {
|
||||
// 缓存名称,默认为空
|
||||
String cacheName() default "";
|
||||
|
||||
// 增加缓存还是删除缓存,默认为增加缓存
|
||||
boolean addOrdel() default true;
|
||||
|
||||
//临时缓存还是永久缓存,默认为永久缓存
|
||||
boolean eternal() default true;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package org.jeecgframework.core.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JeecgEntityTitle {
|
||||
String name();
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package org.jeecgframework.core.annotation.config;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
/**
|
||||
* 菜单注释标签
|
||||
* 系统启动自动加载菜单配置
|
||||
* Class级别
|
||||
* @author 张代浩
|
||||
*/
|
||||
public @interface AutoMenu {
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
* @return
|
||||
*/
|
||||
public String name();
|
||||
/**
|
||||
* 等级
|
||||
* @return
|
||||
*/
|
||||
public String level() default "0";
|
||||
/**
|
||||
* 菜单地址
|
||||
* @return
|
||||
*/
|
||||
public String url();
|
||||
|
||||
/**
|
||||
* 图标
|
||||
* @return
|
||||
*/
|
||||
public String icon() default "402880e740ec1fd70140ec2064ec0002";
|
||||
/**
|
||||
* 顺序
|
||||
* @return
|
||||
*/
|
||||
public int order() default 0;
|
||||
}
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
package org.jeecgframework.core.annotation.config;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
/**
|
||||
* 菜单操作按钮注释标签
|
||||
* 系统启动自动加载菜单对应的操作权限
|
||||
* Method级别
|
||||
* @author 张代浩
|
||||
*/
|
||||
public @interface AutoMenuOperation {
|
||||
|
||||
/**
|
||||
* 操作名称
|
||||
* @return
|
||||
*/
|
||||
public String name();
|
||||
/**
|
||||
* 操作码
|
||||
* @return
|
||||
*/
|
||||
public String code();
|
||||
|
||||
/**
|
||||
* 操作码类型
|
||||
* @return
|
||||
*/
|
||||
public MenuCodeType codeType() default MenuCodeType.TAG;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
* @return
|
||||
*/
|
||||
public String icon() default "";
|
||||
/**
|
||||
* 状态
|
||||
* @return
|
||||
*/
|
||||
public int status() default 0;
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
package org.jeecgframework.core.annotation.config;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public enum MenuCodeType {
|
||||
TAG, //采用Jeecg tag标签
|
||||
ID, //采用控件ID方式
|
||||
CSS //采用Css样式方式
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package org.jeecgframework.core.annotation.query;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 前台的查询时间空间的格式
|
||||
* @author JueYue
|
||||
* @date 2014年1月17日
|
||||
* @version 1.0
|
||||
*/
|
||||
@Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface QueryTimeFormat {
|
||||
|
||||
public String format();
|
||||
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package org.jeecgframework.core.common.dao;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
||||
import org.jeecgframework.web.system.pojo.base.TSUser;
|
||||
|
||||
import org.jeecgframework.core.common.model.common.UploadFile;
|
||||
import org.jeecgframework.core.common.model.json.ComboTree;
|
||||
import org.jeecgframework.core.common.model.json.ImportFile;
|
||||
import org.jeecgframework.core.common.model.json.TreeGrid;
|
||||
import org.jeecgframework.core.extend.template.Template;
|
||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||
import org.jeecgframework.tag.vo.easyui.TreeGridModel;
|
||||
|
||||
public interface ICommonDao extends IGenericBaseCommonDao{
|
||||
|
||||
|
||||
/**
|
||||
* admin账户密码初始化
|
||||
* @param user
|
||||
*/
|
||||
public void pwdInit(TSUser user,String newPwd);
|
||||
/**
|
||||
* 检查用户是否存在
|
||||
* */
|
||||
public TSUser getUserByUserIdAndUserNameExits(TSUser user);
|
||||
public String getUserRole(TSUser user);
|
||||
/**
|
||||
* 文件上传
|
||||
* @param request
|
||||
*/
|
||||
public <T> T uploadFile(UploadFile uploadFile);
|
||||
/**
|
||||
* 文件上传或预览
|
||||
* @param uploadFile
|
||||
* @return
|
||||
*/
|
||||
public HttpServletResponse viewOrDownloadFile(UploadFile uploadFile);
|
||||
|
||||
public Map<Object,Object> getDataSourceMap(Template template);
|
||||
/**
|
||||
* 生成XML文件
|
||||
* @param fileName XML全路径
|
||||
*/
|
||||
public HttpServletResponse createXml(ImportFile importFile);
|
||||
/**
|
||||
* 解析XML文件
|
||||
* @param fileName XML全路径
|
||||
*/
|
||||
public void parserXml(String fileName);
|
||||
public List<ComboTree> comTree(List<TSDepart> all,ComboTree comboTree);
|
||||
/**
|
||||
* 根据模型生成JSON
|
||||
* @param all 全部对象
|
||||
* @param in 已拥有的对象
|
||||
* @param comboBox 模型
|
||||
* @return
|
||||
*/
|
||||
public List<ComboTree> ComboTree(List all,ComboTreeModel comboTreeModel,List in);
|
||||
public List<TreeGrid> treegrid(List all,TreeGridModel treeGridModel);
|
||||
}
|
||||
|
@ -1,603 +0,0 @@
|
||||
package org.jeecgframework.core.common.dao.impl;
|
||||
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
||||
import org.jeecgframework.web.system.pojo.base.TSOperation;
|
||||
import org.jeecgframework.web.system.pojo.base.TSRoleFunction;
|
||||
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
|
||||
import org.jeecgframework.web.system.pojo.base.TSUser;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
import org.dom4j.io.XMLWriter;
|
||||
import org.hibernate.Query;
|
||||
import org.jeecgframework.core.common.dao.ICommonDao;
|
||||
import org.jeecgframework.core.common.dao.IGenericBaseCommonDao;
|
||||
import org.jeecgframework.core.common.model.common.UploadFile;
|
||||
import org.jeecgframework.core.common.model.json.ComboTree;
|
||||
import org.jeecgframework.core.common.model.json.ImportFile;
|
||||
import org.jeecgframework.core.common.model.json.TreeGrid;
|
||||
import org.jeecgframework.core.extend.swftools.SwfToolsUtil;
|
||||
import org.jeecgframework.core.extend.template.DataSourceMap;
|
||||
import org.jeecgframework.core.extend.template.Template;
|
||||
import org.jeecgframework.core.util.DataUtils;
|
||||
import org.jeecgframework.core.util.FileUtils;
|
||||
import org.jeecgframework.core.util.GenericsUtils;
|
||||
import org.jeecgframework.core.util.PasswordUtil;
|
||||
import org.jeecgframework.core.util.PinyinUtil;
|
||||
import org.jeecgframework.core.util.ReflectHelper;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import org.jeecgframework.core.util.StreamUtils;
|
||||
import org.jeecgframework.core.util.StringUtil;
|
||||
import org.jeecgframework.core.util.oConvertUtils;
|
||||
import org.jeecgframework.tag.core.easyui.TagUtil;
|
||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||
import org.jeecgframework.tag.vo.easyui.TreeGridModel;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
/**
|
||||
* 公共扩展方法
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
@Repository
|
||||
public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGenericBaseCommonDao {
|
||||
|
||||
/**
|
||||
* 检查用户是否存在
|
||||
* */
|
||||
public TSUser getUserByUserIdAndUserNameExits(TSUser user) {
|
||||
String password = PasswordUtil.encrypt(user.getUserName(), user.getPassword(), PasswordUtil.getStaticSalt());
|
||||
String query = "from TSUser u where u.userName = :username and u.password=:passowrd";
|
||||
Query queryObject = getSession().createQuery(query);
|
||||
queryObject.setParameter("username", user.getUserName());
|
||||
queryObject.setParameter("passowrd", password);
|
||||
List<TSUser> users = queryObject.list();
|
||||
if (users != null && users.size() > 0) {
|
||||
return users.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* admin账户初始化
|
||||
*/
|
||||
public void pwdInit(TSUser user,String newPwd){
|
||||
String query ="from TSUser u where u.userName = :username ";
|
||||
Query queryObject = getSession().createQuery(query);
|
||||
queryObject.setParameter("username", user.getUserName());
|
||||
List<TSUser> users = queryObject.list();
|
||||
if(null != users && users.size() > 0){
|
||||
user = users.get(0);
|
||||
String pwd = PasswordUtil.encrypt(user.getUserName(), newPwd, PasswordUtil.getStaticSalt());
|
||||
user.setPassword(pwd);
|
||||
save(user);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getUserRole(TSUser user) {
|
||||
String userRole = "";
|
||||
List<TSRoleUser> sRoleUser = findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
|
||||
for (TSRoleUser tsRoleUser : sRoleUser) {
|
||||
userRole += tsRoleUser.getTSRole().getRoleCode() + ",";
|
||||
}
|
||||
return userRole;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*
|
||||
* @param request
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object uploadFile(UploadFile uploadFile) {
|
||||
Object object = uploadFile.getObject();
|
||||
if(uploadFile.getFileKey()!=null)
|
||||
{
|
||||
updateEntitie(object);
|
||||
}
|
||||
else {
|
||||
try {
|
||||
uploadFile.getMultipartRequest().setCharacterEncoding("UTF-8");
|
||||
MultipartHttpServletRequest multipartRequest = uploadFile.getMultipartRequest();
|
||||
ReflectHelper reflectHelper = new ReflectHelper(uploadFile.getObject());
|
||||
String uploadbasepath = uploadFile.getBasePath();// 文件上传根目录
|
||||
if (uploadbasepath == null) {
|
||||
uploadbasepath = ResourceUtil.getConfigByName("uploadpath");
|
||||
}
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
// 文件数据库保存路径
|
||||
String path = uploadbasepath + "/";// 文件保存在硬盘的相对路径
|
||||
String realPath = uploadFile.getMultipartRequest().getSession().getServletContext().getRealPath("/") + "/" + path;// 文件的硬盘真实路径
|
||||
File file = new File(realPath);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();// 创建根目录
|
||||
}
|
||||
if (uploadFile.getCusPath() != null) {
|
||||
realPath += uploadFile.getCusPath() + "/";
|
||||
path += uploadFile.getCusPath() + "/";
|
||||
file = new File(realPath);
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();// 创建文件自定义子目录
|
||||
}
|
||||
}
|
||||
else {
|
||||
realPath += DataUtils.getDataString(DataUtils.yyyyMMdd) + "/";
|
||||
path += DataUtils.getDataString(DataUtils.yyyyMMdd) + "/";
|
||||
file = new File(realPath);
|
||||
if (!file.exists()) {
|
||||
file.mkdir();// 创建文件时间子目录
|
||||
}
|
||||
}
|
||||
String entityName = uploadFile.getObject().getClass().getSimpleName();
|
||||
// 设置文件上传路径
|
||||
if (entityName.equals("TSTemplate")) {
|
||||
realPath = uploadFile.getMultipartRequest().getSession().getServletContext().getRealPath("/") + ResourceUtil.getConfigByName("templatepath") + "/";
|
||||
path = ResourceUtil.getConfigByName("templatepath") + "/";
|
||||
} else if (entityName.equals("TSIcon")) {
|
||||
realPath = uploadFile.getMultipartRequest().getSession().getServletContext().getRealPath("/") + uploadFile.getCusPath() + "/";
|
||||
path = uploadFile.getCusPath() + "/";
|
||||
}
|
||||
String fileName = "";
|
||||
String swfName = "";
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile mf = entity.getValue();// 获取上传文件对象
|
||||
fileName = mf.getOriginalFilename();// 获取文件名
|
||||
swfName = PinyinUtil.getPinYinHeadChar(oConvertUtils.replaceBlank(FileUtils.getFilePrefix(fileName)));// 取文件名首字母作为SWF文件名
|
||||
String extend = FileUtils.getExtend(fileName);// 获取文件扩展名
|
||||
String myfilename="";
|
||||
String noextfilename="";//不带扩展名
|
||||
if(uploadFile.isRename())
|
||||
{
|
||||
|
||||
noextfilename=DataUtils.getDataString(DataUtils.yyyymmddhhmmss)+StringUtil.random(8);//自定义文件名称
|
||||
myfilename=noextfilename+"."+extend;//自定义文件名称
|
||||
}
|
||||
else {
|
||||
myfilename=fileName;
|
||||
}
|
||||
|
||||
String savePath = realPath + myfilename;// 文件保存全路径
|
||||
String fileprefixName = FileUtils.getFilePrefix(fileName);
|
||||
if (uploadFile.getTitleField() != null) {
|
||||
reflectHelper.setMethodValue(uploadFile.getTitleField(), fileprefixName);// 动态调用set方法给文件对象标题赋值
|
||||
}
|
||||
if (uploadFile.getExtend() != null) {
|
||||
// 动态调用 set方法给文件对象内容赋值
|
||||
reflectHelper.setMethodValue(uploadFile.getExtend(), extend);
|
||||
}
|
||||
if (uploadFile.getByteField() != null) {
|
||||
// 二进制文件保存在数据库中
|
||||
reflectHelper.setMethodValue(uploadFile.getByteField(), StreamUtils.InputStreamTOByte(mf.getInputStream()));
|
||||
}
|
||||
File savefile = new File(savePath);
|
||||
if (uploadFile.getRealPath() != null) {
|
||||
// 设置文件数据库的物理路径
|
||||
reflectHelper.setMethodValue(uploadFile.getRealPath(), path + myfilename);
|
||||
}
|
||||
saveOrUpdate(object);
|
||||
// 文件拷贝到指定硬盘目录
|
||||
FileCopyUtils.copy(mf.getBytes(), savefile);
|
||||
// if (uploadFile.getSwfpath() != null) {
|
||||
// // 转SWF
|
||||
// reflectHelper.setMethodValue(uploadFile.getSwfpath(), path + swfName + ".swf");
|
||||
// SwfToolsUtil.convert2SWF(savePath);
|
||||
// }
|
||||
// FileCopyUtils.copy(mf.getBytes(), savefile);
|
||||
if (uploadFile.getSwfpath() != null) {
|
||||
// 转SWF
|
||||
reflectHelper.setMethodValue(uploadFile.getSwfpath(), path + FileUtils.getFilePrefix(myfilename) + ".swf");
|
||||
SwfToolsUtil.convert2SWF(savePath);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件下载或预览
|
||||
*
|
||||
* @param request
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public HttpServletResponse viewOrDownloadFile(UploadFile uploadFile) {
|
||||
uploadFile.getResponse().setContentType("UTF-8");
|
||||
uploadFile.getResponse().setCharacterEncoding("UTF-8");
|
||||
InputStream bis = null;
|
||||
BufferedOutputStream bos = null;
|
||||
HttpServletResponse response = uploadFile.getResponse();
|
||||
HttpServletRequest request = uploadFile.getRequest();
|
||||
String ctxPath = request.getSession().getServletContext().getRealPath("/");
|
||||
String downLoadPath = "";
|
||||
long fileLength = 0;
|
||||
if (uploadFile.getRealPath() != null&&uploadFile.getContent() == null) {
|
||||
downLoadPath = ctxPath + uploadFile.getRealPath();
|
||||
fileLength = new File(downLoadPath).length();
|
||||
try {
|
||||
bis = new BufferedInputStream(new FileInputStream(downLoadPath));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
if (uploadFile.getContent() != null)
|
||||
bis = new ByteArrayInputStream(uploadFile.getContent());
|
||||
fileLength = uploadFile.getContent().length;
|
||||
}
|
||||
try {
|
||||
if (!uploadFile.isView() && uploadFile.getExtend() != null) {
|
||||
if (uploadFile.getExtend().equals("text")) {
|
||||
response.setContentType("text/plain;");
|
||||
} else if (uploadFile.getExtend().equals("doc")) {
|
||||
response.setContentType("application/msword;");
|
||||
} else if (uploadFile.getExtend().equals("xls")) {
|
||||
response.setContentType("application/ms-excel;");
|
||||
} else if (uploadFile.getExtend().equals("pdf")) {
|
||||
response.setContentType("application/pdf;");
|
||||
} else if (uploadFile.getExtend().equals("jpg") || uploadFile.getExtend().equals("jpeg")) {
|
||||
response.setContentType("image/jpeg;");
|
||||
} else {
|
||||
response.setContentType("application/x-msdownload;");
|
||||
}
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + new String((uploadFile.getTitleField() + "." + uploadFile.getExtend()).getBytes("GBK"), "ISO8859-1"));
|
||||
response.setHeader("Content-Length", String.valueOf(fileLength));
|
||||
}
|
||||
bos = new BufferedOutputStream(response.getOutputStream());
|
||||
byte[] buff = new byte[2048];
|
||||
int bytesRead;
|
||||
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
|
||||
bos.write(buff, 0, bytesRead);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (bis != null) {
|
||||
bis.close();
|
||||
}
|
||||
if (bos != null) {
|
||||
bos.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
public Map<Object, Object> getDataSourceMap(Template template) {
|
||||
return DataSourceMap.getDataSourceMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成XML importFile 导出xml工具类
|
||||
*/
|
||||
public HttpServletResponse createXml(ImportFile importFile) {
|
||||
HttpServletResponse response = importFile.getResponse();
|
||||
HttpServletRequest request = importFile.getRequest();
|
||||
try {
|
||||
// 创建document对象
|
||||
Document document = DocumentHelper.createDocument();
|
||||
document.setXMLEncoding("UTF-8");
|
||||
// 创建根节点
|
||||
String rootname = importFile.getEntityName() + "s";
|
||||
Element rElement = document.addElement(rootname);
|
||||
Class entityClass = importFile.getEntityClass();
|
||||
String[] fields = importFile.getField().split(",");
|
||||
// 得到导出对象的集合
|
||||
List objList = loadAll(entityClass);
|
||||
Class classType = entityClass.getClass();
|
||||
for (Object t : objList) {
|
||||
Element childElement = rElement.addElement(importFile.getEntityName());
|
||||
for (int i = 0; i < fields.length; i++) {
|
||||
String fieldName = fields[i];
|
||||
// 第一为实体的主键
|
||||
if (i == 0) {
|
||||
childElement.addAttribute(fieldName, String.valueOf(TagUtil.fieldNametoValues(fieldName, t)));
|
||||
} else {
|
||||
Element name = childElement.addElement(fieldName);
|
||||
name.setText(String.valueOf(TagUtil.fieldNametoValues(fieldName, t)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
String ctxPath = request.getSession().getServletContext().getRealPath("");
|
||||
File fileWriter = new File(ctxPath + "/" + importFile.getFileName());
|
||||
XMLWriter xmlWriter = new XMLWriter(new FileOutputStream(fileWriter));
|
||||
|
||||
xmlWriter.write(document);
|
||||
xmlWriter.close();
|
||||
// 下载生成的XML文件
|
||||
UploadFile uploadFile = new UploadFile(request, response);
|
||||
uploadFile.setRealPath(importFile.getFileName());
|
||||
uploadFile.setTitleField(importFile.getFileName());
|
||||
uploadFile.setExtend("bak");
|
||||
viewOrDownloadFile(uploadFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析XML文件将数据导入数据库中
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void parserXml(String fileName) {
|
||||
try {
|
||||
File inputXml = new File(fileName);
|
||||
Class entityClass;
|
||||
// 读取文件
|
||||
SAXReader saxReader = new SAXReader();
|
||||
Document document = saxReader.read(inputXml);
|
||||
Element employees = document.getRootElement();
|
||||
// 遍历根节点下的子节点
|
||||
for (Iterator i = employees.elementIterator(); i.hasNext();) {
|
||||
Element employee = (Element) i.next();
|
||||
// 有实体名反射得到实体类
|
||||
entityClass = GenericsUtils.getEntityClass(employee.getName());
|
||||
// 得到实体属性
|
||||
Field[] fields = TagUtil.getFiled(entityClass);
|
||||
// 得到实体的ID
|
||||
String id = employee.attributeValue(fields[0].getName());
|
||||
// 判断实体是否已存在
|
||||
Object obj1 = getEntity(entityClass, id);
|
||||
// 实体不存在new个实体
|
||||
if (obj1 == null) {
|
||||
obj1 = entityClass.newInstance();
|
||||
}
|
||||
// 根据反射给实体属性赋值
|
||||
for (Iterator j = employee.elementIterator(); j.hasNext();) {
|
||||
Element node = (Element) j.next();
|
||||
for (int k = 0; k < fields.length; k++) {
|
||||
if (node.getName().equals(fields[k].getName())) {
|
||||
String fieldName = fields[k].getName();
|
||||
String stringLetter = fieldName.substring(0, 1).toUpperCase();
|
||||
String setName = "set" + stringLetter + fieldName.substring(1);
|
||||
Method setMethod = entityClass.getMethod(setName, new Class[] { fields[k].getType() });
|
||||
String type = TagUtil.getColumnType(fieldName, fields);
|
||||
if (type.equals("int")) {
|
||||
setMethod.invoke(obj1, new Integer(node.getText()));
|
||||
} else if (type.equals("string")) {
|
||||
setMethod.invoke(obj1, node.getText().toString());
|
||||
} else if (type.equals("short")) {
|
||||
setMethod.invoke(obj1, new Short(node.getText()));
|
||||
} else if (type.equals("double")) {
|
||||
setMethod.invoke(obj1, new Double(node.getText()));
|
||||
} else if (type.equals("Timestamp")) {
|
||||
setMethod.invoke(obj1, new Timestamp(DataUtils.str2Date(node.getText(), DataUtils.datetimeFormat).getTime()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj1 != null) {
|
||||
saveOrUpdate(obj1);
|
||||
} else {
|
||||
save(obj1);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据模型生成JSON
|
||||
*
|
||||
* @param all
|
||||
* 全部对象
|
||||
* @param in
|
||||
* 已拥有的对象
|
||||
* @param comboBox
|
||||
* 模型
|
||||
* @return
|
||||
*/
|
||||
public List<ComboTree> comTree(List<TSDepart> all, ComboTree comboTree) {
|
||||
List<ComboTree> trees = new ArrayList<ComboTree>();
|
||||
for (TSDepart depart : all) {
|
||||
trees.add(tree(depart, true));
|
||||
}
|
||||
return trees;
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public ComboTree tree(TSDepart depart, boolean recursive) {
|
||||
ComboTree tree = new ComboTree();
|
||||
tree.setId(oConvertUtils.getString(depart.getId()));
|
||||
tree.setText(depart.getDepartname());
|
||||
List<TSDepart> departsList = findByProperty(TSDepart.class, "TSPDepart.id", depart.getId());
|
||||
if (departsList != null && departsList.size() > 0) {
|
||||
tree.setState("closed");
|
||||
tree.setChecked(false);
|
||||
if (recursive) {// 递归查询子节点
|
||||
List<TSDepart> departList = new ArrayList<TSDepart>(departsList);
|
||||
//Collections.sort(departList, new SetListSort());// 排序
|
||||
List<ComboTree> children = new ArrayList<ComboTree>();
|
||||
for (TSDepart d : departList) {
|
||||
ComboTree t = tree(d, true);
|
||||
children.add(t);
|
||||
}
|
||||
tree.setChildren(children);
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据模型生成ComboTree JSON
|
||||
*
|
||||
* @param all全部对象
|
||||
* @param in已拥有的对象
|
||||
* @param comboTreeModel模型
|
||||
* @return
|
||||
*/
|
||||
public List<ComboTree> ComboTree(List all, ComboTreeModel comboTreeModel, List in) {
|
||||
List<ComboTree> trees = new ArrayList<ComboTree>();
|
||||
for (Object obj : all) {
|
||||
trees.add(comboTree(obj, comboTreeModel, in, false));
|
||||
}
|
||||
return trees;
|
||||
|
||||
}
|
||||
|
||||
// 构建ComboTree
|
||||
private ComboTree comboTree(Object obj, ComboTreeModel comboTreeModel, List in, boolean recursive) {
|
||||
ComboTree tree = new ComboTree();
|
||||
Map<String, Object> attributes = new HashMap<String, Object>();
|
||||
ReflectHelper reflectHelper = new ReflectHelper(obj);
|
||||
String id = oConvertUtils.getString(reflectHelper.getMethodValue(comboTreeModel.getIdField()));
|
||||
tree.setId(id);
|
||||
tree.setText(oConvertUtils.getString(reflectHelper.getMethodValue(comboTreeModel.getTextField())));
|
||||
if (comboTreeModel.getSrcField() != null) {
|
||||
attributes.put("href", oConvertUtils.getString(reflectHelper.getMethodValue(comboTreeModel.getSrcField())));
|
||||
tree.setAttributes(attributes);
|
||||
}
|
||||
if (in == null) {
|
||||
} else {
|
||||
if (in.size() > 0) {
|
||||
for (Object inobj : in) {
|
||||
ReflectHelper reflectHelper2 = new ReflectHelper(inobj);
|
||||
String inId = oConvertUtils.getString(reflectHelper2.getMethodValue(comboTreeModel.getIdField()));
|
||||
if (inId == id) {
|
||||
tree.setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List tsFunctions = (List) reflectHelper.getMethodValue(comboTreeModel.getChildField());
|
||||
if (tsFunctions != null && tsFunctions.size() > 0) {
|
||||
tree.setState("closed");
|
||||
tree.setChecked(false);
|
||||
/*
|
||||
* if (recursive) {// 递归查询子节点 List<TSFunction> functionList = new ArrayList<TSFunction>(tsFunctions); Collections.sort(functionList, new SetListSort());// 排序 List<ComboTree> children = new ArrayList<ComboTree>(); for (TSFunction f : functionList) { ComboTree t = comboTree(f,comboTreeModel,in, true); children.add(t); } tree.setChildren(children); }
|
||||
*/
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
/**
|
||||
* 构建树形数据表
|
||||
*/
|
||||
public List<TreeGrid> treegrid(List all, TreeGridModel treeGridModel) {
|
||||
List<TreeGrid> treegrid = new ArrayList<TreeGrid>();
|
||||
for (Object obj : all) {
|
||||
ReflectHelper reflectHelper = new ReflectHelper(obj);
|
||||
TreeGrid tg = new TreeGrid();
|
||||
String id = oConvertUtils.getString(reflectHelper.getMethodValue(treeGridModel.getIdField()));
|
||||
String src = oConvertUtils.getString(reflectHelper.getMethodValue(treeGridModel.getSrc()));
|
||||
String text = oConvertUtils.getString(reflectHelper.getMethodValue(treeGridModel.getTextField()));
|
||||
if(StringUtils.isNotEmpty(treeGridModel.getOrder())){
|
||||
String order = oConvertUtils.getString(reflectHelper.getMethodValue(treeGridModel.getOrder()));
|
||||
tg.setOrder(order);
|
||||
}
|
||||
tg.setId(id);
|
||||
if (treeGridModel.getIcon() != null) {
|
||||
String iconpath = TagUtil.fieldNametoValues(treeGridModel.getIcon(), obj).toString();
|
||||
if (iconpath != null) {
|
||||
tg.setCode(iconpath);
|
||||
} else {
|
||||
tg.setCode("");
|
||||
}
|
||||
}
|
||||
tg.setSrc(src);
|
||||
tg.setText(text);
|
||||
if (treeGridModel.getParentId() != null) {
|
||||
Object pid = TagUtil.fieldNametoValues(treeGridModel.getParentId(), obj);
|
||||
if (pid != null) {
|
||||
tg.setParentId(pid.toString());
|
||||
} else {
|
||||
tg.setParentId("");
|
||||
}
|
||||
}
|
||||
if (treeGridModel.getParentText() != null) {
|
||||
Object ptext = TagUtil.fieldNametoValues(treeGridModel.getTextField(), obj);
|
||||
if (ptext != null) {
|
||||
tg.setParentText(ptext.toString());
|
||||
} else {
|
||||
tg.setParentText("");
|
||||
}
|
||||
|
||||
}
|
||||
List childList = (List) reflectHelper.getMethodValue(treeGridModel.getChildList());
|
||||
|
||||
if (childList != null && childList.size() > 0) {
|
||||
tg.setState("closed");
|
||||
}
|
||||
if (treeGridModel.getRoleid() != null) {
|
||||
String[] opStrings = {};
|
||||
List<TSRoleFunction> roleFunctions = findByProperty(TSRoleFunction.class, "TSFunction.id", id);
|
||||
|
||||
if (roleFunctions.size() > 0) {
|
||||
for (TSRoleFunction tRoleFunction : roleFunctions) {
|
||||
TSRoleFunction roleFunction = tRoleFunction;
|
||||
if (roleFunction.getTSRole().getId().toString().equals(treeGridModel.getRoleid())) {
|
||||
String bbString = roleFunction.getOperation();
|
||||
if (bbString != null) {
|
||||
opStrings = bbString.split(",");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<TSOperation> operateions = findByProperty(TSOperation.class, "TSFunction.id", id);
|
||||
StringBuffer attributes = new StringBuffer();
|
||||
if (operateions.size() > 0) {
|
||||
for (TSOperation tOperation : operateions) {
|
||||
if (opStrings.length < 1) {
|
||||
attributes.append("<input type=checkbox name=operatons value=" + tOperation.getId() + "_" + id + ">" + tOperation.getOperationname());
|
||||
} else {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("<input type=checkbox name=operatons");
|
||||
for (int i = 0; i < opStrings.length; i++) {
|
||||
if (opStrings[i].equals(tOperation.getId().toString())) {
|
||||
sb.append(" checked=checked");
|
||||
}
|
||||
}
|
||||
sb.append(" value=" + tOperation.getId() + "_" + id + ">" + tOperation.getOperationname());
|
||||
attributes.append(sb.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
tg.setOperations(attributes.toString());
|
||||
}
|
||||
|
||||
treegrid.add(tg);
|
||||
}
|
||||
return treegrid;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package org.jeecgframework.core.common.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
@MappedSuperclass
|
||||
public abstract class IdEntity {
|
||||
private String id;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "paymentableGenerator")
|
||||
@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
|
||||
@Column(name ="ID",nullable=false,length=32)
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package org.jeecgframework.core.common.exception;
|
||||
|
||||
public class BusinessException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public BusinessException(String message){
|
||||
super(message);
|
||||
}
|
||||
|
||||
public BusinessException(Throwable cause)
|
||||
{
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public BusinessException(String message,Throwable cause)
|
||||
{
|
||||
super(message,cause);
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package org.jeecgframework.core.common.exception;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.common.model.json.AjaxJson;
|
||||
import org.jeecgframework.core.util.ExceptionUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* spring mvc异常捕获类
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class MyExceptionHandler implements HandlerExceptionResolver {
|
||||
|
||||
private static final Logger logger = Logger
|
||||
.getLogger(MyExceptionHandler.class);
|
||||
|
||||
public ModelAndView resolveException(HttpServletRequest request,
|
||||
HttpServletResponse response, Object handler, Exception ex) {
|
||||
String exceptionMessage = ExceptionUtil.getExceptionMessage(ex);
|
||||
logger.error(exceptionMessage);
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("exceptionMessage", exceptionMessage);
|
||||
model.put("ex", ex);
|
||||
return new ModelAndView("common/error", model);
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class DB2Dialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private static String getRowNumber(String sql)
|
||||
{
|
||||
StringBuffer rownumber = new StringBuffer(50).append("rownumber() over(");
|
||||
int orderByIndex = sql.toLowerCase().indexOf("order by");
|
||||
if ((orderByIndex > 0) && (!hasDistinct(sql)))
|
||||
{
|
||||
rownumber.append(sql.substring(orderByIndex));
|
||||
}
|
||||
rownumber.append(") as rownumber_,");
|
||||
return rownumber.toString();
|
||||
}
|
||||
|
||||
private static boolean hasDistinct(String sql)
|
||||
{
|
||||
return sql.toLowerCase().indexOf("select distinct") >= 0;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
int startOfSelect = sql.toLowerCase().indexOf("select");
|
||||
StringBuffer pagingSelect = new StringBuffer(sql.length() + 100).append(sql.substring(0, startOfSelect)).append("select * from ( select ").append(getRowNumber(sql));
|
||||
|
||||
if (hasDistinct(sql))
|
||||
{
|
||||
pagingSelect.append(" row_.* from ( ").append(sql.substring(startOfSelect)).append(" ) as row_");
|
||||
}
|
||||
else
|
||||
{
|
||||
pagingSelect.append(sql.substring(startOfSelect + 6));
|
||||
}
|
||||
pagingSelect.append(" ) as temp_ where rownumber_ ");
|
||||
|
||||
if (offset > 0)
|
||||
{
|
||||
String endString = offsetPlaceholder + "+" + limitPlaceholder;
|
||||
pagingSelect.append("between " + offsetPlaceholder + "+1 and " + endString);
|
||||
}
|
||||
else
|
||||
{
|
||||
pagingSelect.append("<= " + limitPlaceholder);
|
||||
}
|
||||
return pagingSelect.toString();
|
||||
}
|
||||
|
||||
public String getCountSql(String sql)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class DerbyDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
throw new UnsupportedOperationException("paged queries not supported");
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
public class Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return supportsLimit();
|
||||
}
|
||||
|
||||
public String getCountSql(String sql)
|
||||
{
|
||||
String tmp = "select count(1) amount from (" + sql + ") a";
|
||||
return tmp;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, int limit)
|
||||
{
|
||||
return getLimitString(sql, offset, Integer.toString(offset), limit, Integer.toString(limit));
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
throw new UnsupportedOperationException("paged queries not supported");
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
|
||||
public class DialectFactoryBean implements FactoryBean<Dialect> {
|
||||
public static final String ORACLE = "oracle";
|
||||
public static final String MYSQL = "mysql";
|
||||
public static final String SQLSERVER = "sqlserver";
|
||||
public static final String DB2 = "db2";
|
||||
public static final String POSTGRES = "postgres";
|
||||
private Dialect dialect;
|
||||
private String dbType = "mysql";
|
||||
|
||||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
public Dialect getObject() throws Exception {
|
||||
if (this.dbType.equals("oracle")) {
|
||||
this.dialect = new OracleDialect();
|
||||
} else if (this.dbType.equals("sqlserver")) {
|
||||
this.dialect = new SQLServer2005Dialect();
|
||||
} else if (this.dbType.equals("db2")) {
|
||||
this.dialect = new DB2Dialect();
|
||||
} else if (this.dbType.equals("mysql")) {
|
||||
this.dialect = new MySQLDialect();
|
||||
} else if (this.dbType.equals("postgres")) {
|
||||
this.dialect = new PostgreSQLDialect();
|
||||
} else {
|
||||
throw new Exception("没有设置合适的数据库类型");
|
||||
}
|
||||
return this.dialect;
|
||||
}
|
||||
|
||||
public Class<?> getObjectType() {
|
||||
return Dialect.class;
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class H2Dialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
return new StringBuffer(sql.length() + 40).append(sql).append(" limit " + limitPlaceholder).toString();
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class HSQLDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
boolean hasOffset = offset > 0;
|
||||
return new StringBuffer(sql.length() + 10).append(sql).insert(sql.toLowerCase().indexOf("select") + 6, " top " + limitPlaceholder).toString();
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
import org.hibernate.dialect.PostgreSQLDialect;
|
||||
|
||||
public class MyPostgreSQLDialect extends PostgreSQLDialect {
|
||||
|
||||
|
||||
public boolean useInputStreamToInsertBlob() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class MySQLDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
if (offset > 0)
|
||||
{
|
||||
return sql + " limit " + offsetPlaceholder + "," + limitPlaceholder;
|
||||
}
|
||||
|
||||
return sql + " limit " + limitPlaceholder;
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class OracleDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
sql = sql.trim();
|
||||
boolean isForUpdate = false;
|
||||
if (sql.toLowerCase().endsWith(" for update"))
|
||||
{
|
||||
sql = sql.substring(0, sql.length() - 11);
|
||||
isForUpdate = true;
|
||||
}
|
||||
StringBuffer pagingSelect = new StringBuffer(sql.length() + 100);
|
||||
if (offset > 0)
|
||||
{
|
||||
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
|
||||
}
|
||||
else
|
||||
{
|
||||
pagingSelect.append("select * from ( ");
|
||||
}
|
||||
pagingSelect.append(sql);
|
||||
if (offset > 0)
|
||||
{
|
||||
String endString = offsetPlaceholder + "+" + limitPlaceholder;
|
||||
pagingSelect.append(" ) row_ ) where rownum_ <= " + endString + " and rownum_ > " + offsetPlaceholder);
|
||||
}
|
||||
else
|
||||
{
|
||||
pagingSelect.append(" ) where rownum <= " + limitPlaceholder);
|
||||
}
|
||||
if (isForUpdate)
|
||||
{
|
||||
pagingSelect.append(" for update");
|
||||
}
|
||||
return pagingSelect.toString();
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class PostgreSQLDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
return new StringBuffer(sql.length() + 20).append(sql).append(" limit " + limitPlaceholder).toString();
|
||||
}
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class SQLServer2005Dialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getLimitString(String querySqlString, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
int start = offset + 1;
|
||||
StringBuffer pagingBuilder = new StringBuffer();
|
||||
String orderby = getOrderByPart(querySqlString);
|
||||
String distinctStr = "";
|
||||
String loweredString = querySqlString.toLowerCase();
|
||||
String sqlPartString = querySqlString;
|
||||
if (loweredString.trim().startsWith("select"))
|
||||
{
|
||||
int index = 6;
|
||||
if (loweredString.startsWith("select distinct"))
|
||||
{
|
||||
distinctStr = "DISTINCT ";
|
||||
index = 15;
|
||||
}
|
||||
sqlPartString = sqlPartString.substring(index);
|
||||
}
|
||||
pagingBuilder.append(sqlPartString);
|
||||
|
||||
if ((orderby == null) || (orderby.length() == 0))
|
||||
{
|
||||
orderby = "ORDER BY CURRENT_TIMESTAMP";
|
||||
}
|
||||
StringBuffer result = new StringBuffer();
|
||||
result.append("WITH query AS (SELECT ").append(distinctStr).append("TOP 100 PERCENT ").append(" ROW_NUMBER() OVER (").append(orderby).append(") as __row_number__, ").append(pagingBuilder).append(") SELECT * FROM query WHERE __row_number__ BETWEEN ").append(start).append(" AND ").append(offset + limit).append(" ORDER BY __row_number__");
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
static String getOrderByPart(String sql)
|
||||
{
|
||||
String loweredString = sql.toLowerCase();
|
||||
int orderByIndex = loweredString.indexOf("order by");
|
||||
if (orderByIndex != -1)
|
||||
{
|
||||
return sql.substring(orderByIndex);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class SQLServerDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static int getAfterSelectInsertPoint(String sql)
|
||||
{
|
||||
int selectIndex = sql.toLowerCase().indexOf("select");
|
||||
int selectDistinctIndex = sql.toLowerCase().indexOf("select distinct");
|
||||
return selectIndex + (selectDistinctIndex == selectIndex ? 15 : 6);
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, int limit)
|
||||
{
|
||||
return getLimitString(sql, offset, null, limit, null);
|
||||
}
|
||||
|
||||
public String getLimitString(String querySelect, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
if (offset > 0)
|
||||
{
|
||||
throw new UnsupportedOperationException("sql server has no offset");
|
||||
}
|
||||
|
||||
return new StringBuffer(querySelect.length() + 8).append(querySelect).insert(getAfterSelectInsertPoint(querySelect), " top " + limit).toString();
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.dialect;
|
||||
|
||||
|
||||
public class SybaseDialect extends Dialect
|
||||
{
|
||||
public boolean supportsLimit()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean supportsLimitOffset()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder)
|
||||
{
|
||||
throw new UnsupportedOperationException("paged queries not supported");
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.qbc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ognl.Ognl;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.transform.ResultTransformer;
|
||||
|
||||
import com.opensymphony.xwork2.ognl.OgnlUtil;
|
||||
import com.opensymphony.xwork2.util.reflection.ReflectionContextState;
|
||||
|
||||
/**
|
||||
* 此版本运行在xwork-core-2.1.6.jar
|
||||
* 支持属性为自定义对象的结果集转换的部份属性查询
|
||||
* 2009-3-30
|
||||
* @author 苍鹰
|
||||
*/
|
||||
public class AliasToBean implements ResultTransformer {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final OgnlUtil ognlUntil = new OgnlUtil();
|
||||
private static final Map<String,Boolean> context = new HashMap<String,Boolean>(1);
|
||||
static{
|
||||
context.put(ReflectionContextState.CREATE_NULL_OBJECTS, true);
|
||||
}
|
||||
|
||||
/** POJO的class */
|
||||
private final Class<?> resultClass;
|
||||
|
||||
public AliasToBean(Class<?> pojoClass) {
|
||||
if(pojoClass==null) throw new IllegalArgumentException("resultClass cannot be null");
|
||||
this.resultClass = pojoClass;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
public List transformList(List collection) {
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结果集转换
|
||||
* 2009-4-7
|
||||
* @author 苍鹰
|
||||
* @param tuple 属性值集合
|
||||
* @param aliases 属性名集合
|
||||
* @return 单个POJO实例--查询结果
|
||||
*/
|
||||
|
||||
public Object transformTuple(Object[] tuple, String[] aliases) {
|
||||
try {
|
||||
Object root = resultClass.newInstance();
|
||||
for (int i = 0; i < aliases.length; i++) {
|
||||
if(aliases[i]!=null && !aliases[i].equals(""))
|
||||
{
|
||||
Ognl.setValue(ognlUntil.compile(aliases[i]), context, root, tuple[i]);
|
||||
}
|
||||
}
|
||||
return root;
|
||||
} catch (Exception e) {
|
||||
throw new HibernateException(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.qbc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.hibernate.criterion.Criterion;
|
||||
/**
|
||||
* @ClassName: CriterionList
|
||||
* @Description: TODO(查询条件集合)
|
||||
* @author jeecg
|
||||
* @date 2012-10-25 上午09:32:20
|
||||
*
|
||||
*/
|
||||
public class CriterionList extends ArrayList<Object> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public final Criterion getParas(final int index) {
|
||||
return (Criterion) super.get(index);
|
||||
}
|
||||
|
||||
public final void addPara(final int index, final Criterion p) {
|
||||
super.add(index, p);
|
||||
}
|
||||
|
||||
public final void addPara(final Criterion p) {
|
||||
super.add(p);
|
||||
}
|
||||
|
||||
public final int indexofPara(final Criterion p) {
|
||||
return super.indexOf(p);
|
||||
}
|
||||
|
||||
public final void removePara(final int index) {
|
||||
super.remove(index);
|
||||
}
|
||||
}
|
@ -1,154 +0,0 @@
|
||||
package org.jeecgframework.core.common.hibernate.qbc;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hibernate.type.Type;
|
||||
import org.jeecgframework.core.common.model.json.DataGrid;
|
||||
|
||||
public class HqlQuery {
|
||||
private int curPage =1;
|
||||
private int pageSize = 10;
|
||||
private String myaction;
|
||||
private String myform;
|
||||
private String queryString;
|
||||
private Object[] param;
|
||||
private Type[] types;
|
||||
private Map<String, Object> map;
|
||||
private DataGrid dataGrid;
|
||||
private String field="";//查询需要显示的字段
|
||||
private Class class1;
|
||||
private List results;// 结果集
|
||||
private int total;
|
||||
public List getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
public void setResults(List rsults) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Class getClass1() {
|
||||
return class1;
|
||||
}
|
||||
|
||||
public void setClass1(Class class1) {
|
||||
this.class1 = class1;
|
||||
}
|
||||
public DataGrid getDataGrid() {
|
||||
return dataGrid;
|
||||
}
|
||||
|
||||
public void setDataGrid(DataGrid dataGrid) {
|
||||
this.dataGrid = dataGrid;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public Map<String, Object> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void setMap(Map<String, Object> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public HqlQuery(String queryString, Object[] param, Map<String, Object> map) {
|
||||
this.queryString = queryString;
|
||||
this.param = param;
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public HqlQuery(String queryString, Map<String, Object> map) {
|
||||
this.queryString = queryString;
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public HqlQuery(String myaction) {
|
||||
this.myaction = myaction;
|
||||
}
|
||||
|
||||
public Object[] getParam() {
|
||||
return param;
|
||||
}
|
||||
|
||||
public HqlQuery(String myaction, String queryString, Object[] param, Type[] types) {
|
||||
this.myaction = myaction;
|
||||
this.queryString = queryString;
|
||||
this.param = param;
|
||||
this.types = types;
|
||||
}
|
||||
public HqlQuery(Class class1,String hqlString,DataGrid dataGrid) {
|
||||
this.dataGrid=dataGrid;
|
||||
this.queryString=hqlString;
|
||||
this.pageSize=dataGrid.getRows();
|
||||
this.field=dataGrid.getField();
|
||||
this.class1=class1;
|
||||
}
|
||||
|
||||
public void setParam(Object[] param) {
|
||||
this.param = param;
|
||||
}
|
||||
public int getCurPage() {
|
||||
return curPage;
|
||||
}
|
||||
|
||||
public void setCurPage(int curPage) {
|
||||
this.curPage = curPage;
|
||||
}
|
||||
|
||||
public String getMyaction() {
|
||||
return myaction;
|
||||
}
|
||||
|
||||
public void setMyaction(String myaction) {
|
||||
this.myaction = myaction;
|
||||
}
|
||||
|
||||
public String getMyform() {
|
||||
return myform;
|
||||
}
|
||||
|
||||
public void setMyform(String myform) {
|
||||
this.myform = myform;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getQueryString() {
|
||||
return queryString;
|
||||
}
|
||||
|
||||
public void setQueryString(String queryString) {
|
||||
this.queryString = queryString;
|
||||
}
|
||||
|
||||
public Type[] getTypes() {
|
||||
return types;
|
||||
}
|
||||
|
||||
public void setTypes(Type[] types) {
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
/**
|
||||
*
|
||||
* @author Hank
|
||||
* 修改于2014-01-25 添加List<T> 注入查询到的表数据 修改class1-->tableEntityClass
|
||||
* @param <T>
|
||||
*/
|
||||
public class DBTable<T> implements Serializable {
|
||||
|
||||
public String tableName;
|
||||
public String entityName;
|
||||
public String tableTitle;
|
||||
public Class<T> tableEntityClass;
|
||||
public List<T> tableData;
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
public String getEntityName() {
|
||||
return entityName;
|
||||
}
|
||||
public void setEntityName(String entityName) {
|
||||
this.entityName = entityName;
|
||||
}
|
||||
public String getTableTitle() {
|
||||
return tableTitle;
|
||||
}
|
||||
public void setTableTitle(String tableTitle) {
|
||||
this.tableTitle = tableTitle;
|
||||
}
|
||||
public Class<T> getClass1() {
|
||||
return tableEntityClass;
|
||||
}
|
||||
public void setClass1(Class<T> class1) {
|
||||
this.tableEntityClass = class1;
|
||||
}
|
||||
public List<T> getTableData() {
|
||||
return tableData;
|
||||
}
|
||||
public void setTableData(List<T> tableData) {
|
||||
this.tableData = tableData;
|
||||
}
|
||||
|
||||
}
|
@ -1,211 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.common;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecgframework.core.util.StringUtil;
|
||||
import org.jeecgframework.core.util.oConvertUtils;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
|
||||
/**
|
||||
* 上传下载模型类
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class UploadFile {
|
||||
private String byteField = "attachmentcontent";// 二进制文件内容保存到数据库的对应实体类字段
|
||||
private String titleField = "attachmenttitle";// 文件名(标题)保存到数据库的对应实体类字段
|
||||
private String basePath = "upload";// 文件保存目录根路径
|
||||
private String realPath = "realpath";// 文件保存在硬盘的全路径对应实体字段
|
||||
private String extend = "extend";// 扩展名
|
||||
private boolean view = false;// 是否是预览
|
||||
private boolean rename =true;// 是否重命名
|
||||
private String swfpath;// 转换SWF
|
||||
private String cusPath;// 文件物理路径自定义子目录
|
||||
private byte[] content;// 预览或下载时传入的文件二进制内容
|
||||
private Object object;// 文件对应实体对象
|
||||
private String fileKey;// 上传文件ID
|
||||
private MultipartHttpServletRequest multipartRequest;
|
||||
private HttpServletRequest request;
|
||||
private HttpServletResponse response;
|
||||
|
||||
/**
|
||||
* @param response
|
||||
* the response to set
|
||||
*/
|
||||
public void setResponse(HttpServletResponse response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public UploadFile(HttpServletRequest request, Object object) {
|
||||
String fileKey = oConvertUtils.getString(request.getParameter("fileKey"));// 文件ID
|
||||
if (StringUtil.isNotEmpty(fileKey)) {
|
||||
this.fileKey = fileKey;
|
||||
this.request = request;
|
||||
} else {
|
||||
this.multipartRequest = (MultipartHttpServletRequest) request;
|
||||
}
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
public UploadFile(HttpServletRequest request) {
|
||||
this.multipartRequest = (MultipartHttpServletRequest) request;
|
||||
|
||||
}
|
||||
|
||||
public UploadFile(HttpServletRequest request, HttpServletResponse response) {
|
||||
this.request = request;
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public UploadFile() {
|
||||
|
||||
}
|
||||
|
||||
public String getSwfpath() {
|
||||
return swfpath;
|
||||
}
|
||||
|
||||
public void setSwfpath(String swfpath) {
|
||||
this.swfpath = swfpath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the realPath
|
||||
*/
|
||||
public String getRealPath() {
|
||||
return realPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param realPath
|
||||
* the realPath to set
|
||||
*/
|
||||
public void setRealPath(String realPath) {
|
||||
this.realPath = realPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the response
|
||||
*/
|
||||
public HttpServletResponse getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the request
|
||||
*/
|
||||
public HttpServletRequest getRequest() {
|
||||
return request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param request
|
||||
* the request to set
|
||||
*/
|
||||
public void setRequest(HttpServletRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the multipartRequest
|
||||
*/
|
||||
public MultipartHttpServletRequest getMultipartRequest() {
|
||||
return multipartRequest;
|
||||
}
|
||||
|
||||
public String get(String name) {
|
||||
return getMultipartRequest().getParameter(name);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param multipartRequest
|
||||
* the multipartRequest to set
|
||||
*/
|
||||
public void setMultipartRequest(MultipartHttpServletRequest multipartRequest) {
|
||||
this.multipartRequest = multipartRequest;
|
||||
}
|
||||
|
||||
public Object getObject() {
|
||||
return object;
|
||||
}
|
||||
|
||||
public String getBasePath() {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public void setBasePath(String basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
|
||||
public void setObject(Object object) {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
public String getByteField() {
|
||||
return byteField;
|
||||
}
|
||||
|
||||
public void setByteField(String byteField) {
|
||||
this.byteField = byteField;
|
||||
}
|
||||
|
||||
public String getTitleField() {
|
||||
return titleField;
|
||||
}
|
||||
|
||||
public void setTitleField(String titleField) {
|
||||
this.titleField = titleField;
|
||||
}
|
||||
|
||||
public String getCusPath() {
|
||||
return cusPath;
|
||||
}
|
||||
|
||||
public void setCusPath(String cusPath) {
|
||||
this.cusPath = cusPath;
|
||||
}
|
||||
|
||||
public String getExtend() {
|
||||
return extend;
|
||||
}
|
||||
|
||||
public void setExtend(String extend) {
|
||||
this.extend = extend;
|
||||
}
|
||||
|
||||
public boolean isView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
public void setView(boolean view) {
|
||||
this.view = view;
|
||||
}
|
||||
|
||||
public byte[] getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(byte[] content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getFileKey() {
|
||||
return fileKey;
|
||||
}
|
||||
|
||||
public void setFileKey(String fileKey) {
|
||||
this.fileKey = fileKey;
|
||||
}
|
||||
public boolean isRename() {
|
||||
return rename;
|
||||
}
|
||||
|
||||
public void setRename(boolean rename) {
|
||||
this.rename = rename;
|
||||
}
|
||||
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* $.ajax后需要接受的JSON
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class AjaxJson {
|
||||
|
||||
private boolean success = true;// 是否成功
|
||||
private String msg = "操作成功";// 提示信息
|
||||
private Object obj = null;// 其他信息
|
||||
private Map<String, Object> attributes;// 其他参数
|
||||
public Map<String, Object> getAttributes() {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
public void setAttributes(Map<String, Object> attributes) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Object getObj() {
|
||||
return obj;
|
||||
}
|
||||
|
||||
public void setObj(Object obj) {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
public String getJsonStr(){
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("success", this.isSuccess());
|
||||
obj.put("msg", this.getMsg());
|
||||
obj.put("obj", this.obj);
|
||||
obj.put("attributes", this.attributes);
|
||||
return obj.toJSONString();
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class ComboTree implements java.io.Serializable {
|
||||
|
||||
private String id;
|
||||
private String text;// 树节点名称
|
||||
private String iconCls;// 前面的小图标样式
|
||||
private Boolean checked = false;// 是否勾选状态
|
||||
private Map<String, Object> attributes;// 其他参数
|
||||
private List<ComboTree> children;// 子节点
|
||||
private String state = "open";// 是否展开(open,closed)
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Boolean getChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(Boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAttributes() {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
public void setAttributes(Map<String, Object> attributes) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
public List<ComboTree> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<ComboTree> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getIconCls() {
|
||||
return iconCls;
|
||||
}
|
||||
|
||||
public void setIconCls(String iconCls) {
|
||||
this.iconCls = iconCls;
|
||||
}
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.jeecgframework.core.util.ContextHolderUtils;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import org.jeecgframework.tag.vo.datatable.SortDirection;
|
||||
|
||||
|
||||
/**
|
||||
* easyui的datagrid向后台传递参数使用的model
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class DataGrid {
|
||||
|
||||
private int page = 1;// 当前页
|
||||
private int rows = 10;// 每页显示记录数
|
||||
private String sort = null;// 排序字段名
|
||||
private SortDirection order = SortDirection.asc;// 按什么排序(asc,desc)
|
||||
private String field;//字段
|
||||
private String treefield;//树形数据表文本字段
|
||||
private List results;// 结果集
|
||||
private int total;//总记录数
|
||||
private String footer;//合计列
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public List getResults() {
|
||||
return results;
|
||||
}
|
||||
|
||||
public void setResults(List results) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getRows() {
|
||||
if(ContextHolderUtils.getRequest()!=null&&ResourceUtil.getParameter("rows")!=null){
|
||||
return rows;
|
||||
}
|
||||
return 10000;
|
||||
}
|
||||
|
||||
public void setRows(int rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public SortDirection getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(SortDirection order) {
|
||||
this.order = order;
|
||||
}
|
||||
public String getTreefield() {
|
||||
return treefield;
|
||||
}
|
||||
|
||||
public void setTreefield(String treefield) {
|
||||
this.treefield = treefield;
|
||||
}
|
||||
|
||||
public String getFooter() {
|
||||
return footer;
|
||||
}
|
||||
|
||||
public void setFooter(String footer) {
|
||||
this.footer = footer;
|
||||
}
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 统计报表模型
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class Highchart {
|
||||
private String name;
|
||||
private String type;//类型
|
||||
private List data;//数据
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public List getData() {
|
||||
return data;
|
||||
}
|
||||
public void setData(List data) {
|
||||
this.data = data;
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
/**
|
||||
* 上传下载模型类
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class ImportFile {
|
||||
private Object object;// 导出实体对象
|
||||
private String fileName;// 文件保存在硬盘的全路径对应实体字段
|
||||
private String entityName;//导出实体名
|
||||
private String field;
|
||||
private Class entityClass;
|
||||
private MultipartHttpServletRequest multipartRequest;
|
||||
private HttpServletRequest request;
|
||||
private HttpServletResponse response;
|
||||
public Object getObject() {
|
||||
return object;
|
||||
}
|
||||
public void setObject(Object object) {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
public Class getEntityClass() {
|
||||
return entityClass;
|
||||
}
|
||||
public void setEntityClass(Class entityClass) {
|
||||
this.entityClass = entityClass;
|
||||
}
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
public String getEntityName() {
|
||||
return entityName;
|
||||
}
|
||||
public void setEntityName(String entityName) {
|
||||
this.entityName = entityName;
|
||||
}
|
||||
public MultipartHttpServletRequest getMultipartRequest() {
|
||||
return multipartRequest;
|
||||
}
|
||||
public void setMultipartRequest(MultipartHttpServletRequest multipartRequest) {
|
||||
this.multipartRequest = multipartRequest;
|
||||
}
|
||||
public HttpServletRequest getRequest() {
|
||||
return request;
|
||||
}
|
||||
public void setRequest(HttpServletRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
public HttpServletResponse getResponse() {
|
||||
return response;
|
||||
}
|
||||
public void setResponse(HttpServletResponse response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public ImportFile(HttpServletRequest request, HttpServletResponse response) {
|
||||
this.request = request;
|
||||
this.response = response;
|
||||
}
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
||||
/**
|
||||
* @author pengjin
|
||||
* @version 2.1
|
||||
* @since 2.1
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface LogAnnotation {
|
||||
String operateModelNm();
|
||||
String operateFuncNm();
|
||||
String operateDescribe();
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
@JsonIgnoreProperties(value = { "hibernateLazyInitializer" })
|
||||
public class ProjectDeclare {
|
||||
|
||||
private Integer detialid;//明细编号
|
||||
private Integer declareid;//申报编号
|
||||
private String constructionunit;//建设单位
|
||||
private String projectname;//项目名称
|
||||
private String statusid;//状态
|
||||
private String buildingno;//栋号
|
||||
private Double undergroundconstructionarea;//地下建筑面积
|
||||
private String geom;
|
||||
public Integer getDetialid() {
|
||||
return detialid;
|
||||
}
|
||||
public void setDetialid(Integer detialid) {
|
||||
this.detialid = detialid;
|
||||
}
|
||||
public Integer getDeclareid() {
|
||||
return declareid;
|
||||
}
|
||||
public void setDeclareid(Integer declareid) {
|
||||
this.declareid = declareid;
|
||||
}
|
||||
public String getConstructionunit() {
|
||||
return constructionunit;
|
||||
}
|
||||
public void setConstructionunit(String constructionunit) {
|
||||
this.constructionunit = constructionunit;
|
||||
}
|
||||
public String getProjectname() {
|
||||
return projectname;
|
||||
}
|
||||
public void setProjectname(String projectname) {
|
||||
this.projectname = projectname;
|
||||
}
|
||||
public String getStatusid() {
|
||||
return statusid;
|
||||
}
|
||||
public void setStatusid(String statusid) {
|
||||
this.statusid = statusid;
|
||||
}
|
||||
public String getBuildingno() {
|
||||
return buildingno;
|
||||
}
|
||||
public void setBuildingno(String buildingno) {
|
||||
this.buildingno = buildingno;
|
||||
}
|
||||
public Double getUndergroundconstructionarea() {
|
||||
return undergroundconstructionarea;
|
||||
}
|
||||
public void setUndergroundconstructionarea(Double undergroundconstructionarea) {
|
||||
this.undergroundconstructionarea = undergroundconstructionarea;
|
||||
}
|
||||
public String getGeom() {
|
||||
return geom;
|
||||
}
|
||||
public void setGeom(String geom) {
|
||||
this.geom = geom;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
@JsonIgnoreProperties(value = { "hibernateLazyInitializer" })
|
||||
public class ProjectInfo {
|
||||
|
||||
private Integer gid;//
|
||||
private String name;//名称(项目)
|
||||
private String geom;
|
||||
public Integer getGid() {
|
||||
return gid;
|
||||
}
|
||||
public void setGid(Integer gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getGeom() {
|
||||
return geom;
|
||||
}
|
||||
public void setGeom(String geom) {
|
||||
this.geom = geom;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,87 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class TreeGrid implements java.io.Serializable {
|
||||
private String id;
|
||||
private String text;
|
||||
private String parentId;
|
||||
private String parentText;
|
||||
private String code;
|
||||
private String src;
|
||||
private String note;
|
||||
private Map<String,String> attributes;// 其他参数
|
||||
private String operations;// 其他参数
|
||||
private String state = "open";// 是否展开(open,closed)
|
||||
private String order;//排序
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
public String getOperations() {
|
||||
return operations;
|
||||
}
|
||||
public void setOperations(String operations) {
|
||||
this.operations = operations;
|
||||
}
|
||||
public Map<String, String> getAttributes() {
|
||||
return attributes;
|
||||
}
|
||||
public void setAttributes(Map<String, String> attributes) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
public String getParentText() {
|
||||
return parentText;
|
||||
}
|
||||
public void setParentText(String parentText) {
|
||||
this.parentText = parentText;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getSrc() {
|
||||
return src;
|
||||
}
|
||||
public void setSrc(String src) {
|
||||
this.src = src;
|
||||
}
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package org.jeecgframework.core.common.model.json;
|
||||
|
||||
|
||||
/**
|
||||
* $.ajax后需要接受的JSON
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class ValidForm {
|
||||
|
||||
private String status ="y";// 是否成功
|
||||
private String info = "验证通过";//提示信息
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
}
|
@ -1,358 +0,0 @@
|
||||
package org.jeecgframework.core.common.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.criterion.DetachedCriteria;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.HqlQuery;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.PageList;
|
||||
import org.jeecgframework.core.common.model.common.DBTable;
|
||||
import org.jeecgframework.core.common.model.common.UploadFile;
|
||||
import org.jeecgframework.core.common.model.json.ComboTree;
|
||||
import org.jeecgframework.core.common.model.json.DataGridReturn;
|
||||
import org.jeecgframework.core.common.model.json.ImportFile;
|
||||
import org.jeecgframework.core.common.model.json.TreeGrid;
|
||||
import org.jeecgframework.tag.vo.datatable.DataTableReturn;
|
||||
import org.jeecgframework.tag.vo.easyui.Autocomplete;
|
||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||
import org.jeecgframework.tag.vo.easyui.TreeGridModel;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
public interface CommonService {
|
||||
/**
|
||||
* 获取所有数据库表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<DBTable> getAllDbTableName();
|
||||
|
||||
public Integer getAllDbTableSize();
|
||||
|
||||
public <T> Serializable save(T entity);
|
||||
|
||||
public <T> void saveOrUpdate(T entity);
|
||||
|
||||
public <T> void delete(T entity);
|
||||
|
||||
public <T> void batchSave(List<T> entitys);
|
||||
|
||||
/**
|
||||
* 根据实体名称和主键获取实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityName
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public <T> T get(Class<T> class1, Serializable id);
|
||||
|
||||
/**
|
||||
* 根据实体名称和主键获取实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityName
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public <T> T getEntity(Class entityName, Serializable id);
|
||||
|
||||
/**
|
||||
* 根据实体名称和字段名称和字段值获取唯一记录
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityClass
|
||||
* @param propertyName
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public <T> T findUniqueByProperty(Class<T> entityClass,
|
||||
String propertyName, Object value);
|
||||
|
||||
/**
|
||||
* 按属性查找对象列表.
|
||||
*/
|
||||
public <T> List<T> findByProperty(Class<T> entityClass,
|
||||
String propertyName, Object value);
|
||||
|
||||
/**
|
||||
* 加载全部实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityClass
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> loadAll(final Class<T> entityClass);
|
||||
|
||||
/**
|
||||
* 删除实体主键删除
|
||||
*
|
||||
* @param <T>
|
||||
* @param entities
|
||||
*/
|
||||
public <T> void deleteEntityById(Class entityName, Serializable id);
|
||||
|
||||
/**
|
||||
* 删除实体集合
|
||||
*
|
||||
* @param <T>
|
||||
* @param entities
|
||||
*/
|
||||
public <T> void deleteAllEntitie(Collection<T> entities);
|
||||
|
||||
/**
|
||||
* 更新指定的实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param pojo
|
||||
*/
|
||||
public <T> void updateEntitie(T pojo);
|
||||
|
||||
/**
|
||||
* 通过hql 查询语句查找对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findByQueryString(String hql);
|
||||
|
||||
/**
|
||||
* 根据sql更新
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public int updateBySqlString(String sql);
|
||||
|
||||
/**
|
||||
* 根据sql查找List
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findListbySql(String query);
|
||||
|
||||
/**
|
||||
* 通过属性称获取实体带排序
|
||||
*
|
||||
* @param <T>
|
||||
* @param clas
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findByPropertyisOrder(Class<T> entityClass,
|
||||
String propertyName, Object value, boolean isAsc);
|
||||
|
||||
public <T> List<T> getList(Class clas);
|
||||
|
||||
public <T> T singleResult(String hql);
|
||||
|
||||
/**
|
||||
*
|
||||
* cq方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageList(final CriteriaQuery cq, final boolean isOffset);
|
||||
|
||||
/**
|
||||
* 返回DataTableReturn模型
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public DataTableReturn getDataTableReturn(final CriteriaQuery cq,
|
||||
final boolean isOffset);
|
||||
|
||||
/**
|
||||
* 返回easyui datagrid模型
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public DataGridReturn getDataGridReturn(final CriteriaQuery cq,
|
||||
final boolean isOffset);
|
||||
|
||||
/**
|
||||
*
|
||||
* hqlQuery方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageList(final HqlQuery hqlQuery,
|
||||
final boolean needParameter);
|
||||
|
||||
/**
|
||||
*
|
||||
* sqlQuery方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageListBySql(final HqlQuery hqlQuery,
|
||||
final boolean isToEntity);
|
||||
|
||||
public Session getSession();
|
||||
|
||||
public List findByExample(final String entityName,
|
||||
final Object exampleEntity);
|
||||
|
||||
/**
|
||||
* 通过cq获取全部实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param cq
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> getListByCriteriaQuery(final CriteriaQuery cq,
|
||||
Boolean ispage);
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
public <T> T uploadFile(UploadFile uploadFile);
|
||||
|
||||
public HttpServletResponse viewOrDownloadFile(UploadFile uploadFile);
|
||||
|
||||
/**
|
||||
* 生成XML文件
|
||||
*
|
||||
* @param fileName
|
||||
* XML全路径
|
||||
*/
|
||||
public HttpServletResponse createXml(ImportFile importFile);
|
||||
|
||||
/**
|
||||
* 解析XML文件
|
||||
*
|
||||
* @param fileName
|
||||
* XML全路径
|
||||
*/
|
||||
public void parserXml(String fileName);
|
||||
|
||||
public List<ComboTree> comTree(List<TSDepart> all, ComboTree comboTree);
|
||||
|
||||
/**
|
||||
* 根据模型生成JSON
|
||||
*
|
||||
* @param all
|
||||
* 全部对象
|
||||
* @param in
|
||||
* 已拥有的对象
|
||||
* @param comboBox
|
||||
* 模型
|
||||
* @return
|
||||
*/
|
||||
public List<ComboTree> ComboTree(List all, ComboTreeModel comboTreeModel,
|
||||
List in);
|
||||
|
||||
/**
|
||||
* 构建树形数据表
|
||||
*
|
||||
* @param all
|
||||
* @param treeGridModel
|
||||
* @return
|
||||
*/
|
||||
public List<TreeGrid> treegrid(List all, TreeGridModel treeGridModel);
|
||||
|
||||
/**
|
||||
* 获取自动完成列表
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> getAutoList(Autocomplete autocomplete);
|
||||
|
||||
/**
|
||||
* 执行SQL
|
||||
*/
|
||||
public Integer executeSql(String sql, List<Object> param);
|
||||
|
||||
/**
|
||||
* 执行SQL
|
||||
*/
|
||||
public Integer executeSql(String sql, Object... param);
|
||||
|
||||
/**
|
||||
* 执行SQL 使用:name占位符
|
||||
*/
|
||||
public Integer executeSql(String sql, Map<String, Object> param);
|
||||
/**
|
||||
* 执行SQL 使用:name占位符,并返回执行后的主键值
|
||||
*/
|
||||
public Object executeSqlReturnKey(String sql, Map<String, Object> param);
|
||||
/**
|
||||
* 通过JDBC查找对象集合 使用指定的检索标准检索数据返回数据
|
||||
*/
|
||||
public List<Map<String, Object>> findForJdbc(String sql, Object... objs);
|
||||
|
||||
/**
|
||||
* 通过JDBC查找对象集合 使用指定的检索标准检索数据返回数据
|
||||
*/
|
||||
public Map<String, Object> findOneForJdbc(String sql, Object... objs);
|
||||
|
||||
/**
|
||||
* 通过JDBC查找对象集合,带分页 使用指定的检索标准检索数据并分页返回数据
|
||||
*/
|
||||
public List<Map<String, Object>> findForJdbc(String sql, int page, int rows);
|
||||
|
||||
/**
|
||||
* 通过JDBC查找对象集合,带分页 使用指定的检索标准检索数据并分页返回数据
|
||||
*/
|
||||
public <T> List<T> findObjForJdbc(String sql, int page, int rows,
|
||||
Class<T> clazz);
|
||||
|
||||
/**
|
||||
* 使用指定的检索标准检索数据并分页返回数据-采用预处理方式
|
||||
*
|
||||
* @param criteria
|
||||
* @param firstResult
|
||||
* @param maxResults
|
||||
* @return
|
||||
* @throws DataAccessException
|
||||
*/
|
||||
public List<Map<String, Object>> findForJdbcParam(String sql, int page,
|
||||
int rows, Object... objs);
|
||||
|
||||
/**
|
||||
* 使用指定的检索标准检索数据并分页返回数据For JDBC
|
||||
*/
|
||||
public Long getCountForJdbc(String sql);
|
||||
|
||||
/**
|
||||
* 使用指定的检索标准检索数据并分页返回数据For JDBC-采用预处理方式
|
||||
*
|
||||
*/
|
||||
public Long getCountForJdbcParam(String sql, Object[] objs);
|
||||
|
||||
/**
|
||||
* 通过hql 查询语句查找对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findHql(String hql, Object... param);
|
||||
|
||||
public <T> List<T> pageList(DetachedCriteria dc, int firstResult,
|
||||
int maxResult);
|
||||
|
||||
public <T> List<T> findByDetached(DetachedCriteria dc);
|
||||
}
|
@ -1,460 +0,0 @@
|
||||
package org.jeecgframework.core.common.service.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jeecgframework.web.system.pojo.base.TSDepart;
|
||||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.criterion.DetachedCriteria;
|
||||
import org.jeecgframework.core.common.dao.ICommonDao;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.HqlQuery;
|
||||
import org.jeecgframework.core.common.hibernate.qbc.PageList;
|
||||
import org.jeecgframework.core.common.model.common.DBTable;
|
||||
import org.jeecgframework.core.common.model.common.UploadFile;
|
||||
import org.jeecgframework.core.common.model.json.ComboTree;
|
||||
import org.jeecgframework.core.common.model.json.DataGridReturn;
|
||||
import org.jeecgframework.core.common.model.json.ImportFile;
|
||||
import org.jeecgframework.core.common.model.json.TreeGrid;
|
||||
import org.jeecgframework.core.common.service.CommonService;
|
||||
import org.jeecgframework.tag.vo.datatable.DataTableReturn;
|
||||
import org.jeecgframework.tag.vo.easyui.Autocomplete;
|
||||
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
|
||||
import org.jeecgframework.tag.vo.easyui.TreeGridModel;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service("commonService")
|
||||
@Transactional
|
||||
public class CommonServiceImpl implements CommonService {
|
||||
public ICommonDao commonDao = null;
|
||||
|
||||
/**
|
||||
* 获取所有数据库表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<DBTable> getAllDbTableName() {
|
||||
return commonDao.getAllDbTableName();
|
||||
}
|
||||
|
||||
public Integer getAllDbTableSize() {
|
||||
return commonDao.getAllDbTableSize();
|
||||
}
|
||||
|
||||
@Resource
|
||||
public void setCommonDao(ICommonDao commonDao) {
|
||||
this.commonDao = commonDao;
|
||||
}
|
||||
|
||||
|
||||
public <T> Serializable save(T entity) {
|
||||
return commonDao.save(entity);
|
||||
}
|
||||
|
||||
|
||||
public <T> void saveOrUpdate(T entity) {
|
||||
commonDao.saveOrUpdate(entity);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public <T> void delete(T entity) {
|
||||
commonDao.delete(entity);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实体集合
|
||||
*
|
||||
* @param <T>
|
||||
* @param entities
|
||||
*/
|
||||
public <T> void deleteAllEntitie(Collection<T> entities) {
|
||||
commonDao.deleteAllEntitie(entities);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实体名获取对象
|
||||
*/
|
||||
public <T> T get(Class<T> class1, Serializable id) {
|
||||
return commonDao.get(class1, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实体名返回全部对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param hql
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> getList(Class clas) {
|
||||
return commonDao.loadAll(clas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实体名获取对象
|
||||
*/
|
||||
public <T> T getEntity(Class entityName, Serializable id) {
|
||||
return commonDao.getEntity(entityName, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实体名称和字段名称和字段值获取唯一记录
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityClass
|
||||
* @param propertyName
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public <T> T findUniqueByProperty(Class<T> entityClass,
|
||||
String propertyName, Object value) {
|
||||
return commonDao.findUniqueByProperty(entityClass, propertyName, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按属性查找对象列表.
|
||||
*/
|
||||
public <T> List<T> findByProperty(Class<T> entityClass,
|
||||
String propertyName, Object value) {
|
||||
|
||||
return commonDao.findByProperty(entityClass, propertyName, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载全部实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param entityClass
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> loadAll(final Class<T> entityClass) {
|
||||
return commonDao.loadAll(entityClass);
|
||||
}
|
||||
|
||||
public <T> T singleResult(String hql) {
|
||||
return commonDao.singleResult(hql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实体主键ID删除对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param entities
|
||||
*/
|
||||
public <T> void deleteEntityById(Class entityName, Serializable id) {
|
||||
commonDao.deleteEntityById(entityName, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新指定的实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param pojo
|
||||
*/
|
||||
public <T> void updateEntitie(T pojo) {
|
||||
commonDao.updateEntitie(pojo);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过hql 查询语句查找对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findByQueryString(String hql) {
|
||||
return commonDao.findByQueryString(hql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据sql更新
|
||||
*
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public int updateBySqlString(String sql) {
|
||||
return commonDao.updateBySqlString(sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据sql查找List
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findListbySql(String query) {
|
||||
return commonDao.findListbySql(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过属性称获取实体带排序
|
||||
*
|
||||
* @param <T>
|
||||
* @param clas
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findByPropertyisOrder(Class<T> entityClass,
|
||||
String propertyName, Object value, boolean isAsc) {
|
||||
return commonDao.findByPropertyisOrder(entityClass, propertyName,
|
||||
value, isAsc);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* cq方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageList(final CriteriaQuery cq, final boolean isOffset) {
|
||||
return commonDao.getPageList(cq, isOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回DataTableReturn模型
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public DataTableReturn getDataTableReturn(final CriteriaQuery cq,
|
||||
final boolean isOffset) {
|
||||
return commonDao.getDataTableReturn(cq, isOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回easyui datagrid模型
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public DataGridReturn getDataGridReturn(final CriteriaQuery cq,
|
||||
final boolean isOffset) {
|
||||
return commonDao.getDataGridReturn(cq, isOffset);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* hqlQuery方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageList(final HqlQuery hqlQuery,
|
||||
final boolean needParameter) {
|
||||
return commonDao.getPageList(hqlQuery, needParameter);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* sqlQuery方式分页
|
||||
*
|
||||
* @param cq
|
||||
* @param isOffset
|
||||
* @return
|
||||
*/
|
||||
public PageList getPageListBySql(final HqlQuery hqlQuery,
|
||||
final boolean isToEntity) {
|
||||
return commonDao.getPageListBySql(hqlQuery, isToEntity);
|
||||
}
|
||||
|
||||
public Session getSession()
|
||||
|
||||
{
|
||||
return commonDao.getSession();
|
||||
}
|
||||
|
||||
public List findByExample(final String entityName,
|
||||
final Object exampleEntity) {
|
||||
return commonDao.findByExample(entityName, exampleEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过cq获取全部实体
|
||||
*
|
||||
* @param <T>
|
||||
* @param cq
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> getListByCriteriaQuery(final CriteriaQuery cq,
|
||||
Boolean ispage) {
|
||||
return commonDao.getListByCriteriaQuery(cq, ispage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
public <T> T uploadFile(UploadFile uploadFile) {
|
||||
return commonDao.uploadFile(uploadFile);
|
||||
}
|
||||
|
||||
public HttpServletResponse viewOrDownloadFile(UploadFile uploadFile)
|
||||
|
||||
{
|
||||
return commonDao.viewOrDownloadFile(uploadFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成XML文件
|
||||
*
|
||||
* @param fileName
|
||||
* XML全路径
|
||||
* @return
|
||||
*/
|
||||
public HttpServletResponse createXml(ImportFile importFile) {
|
||||
return commonDao.createXml(importFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析XML文件
|
||||
*
|
||||
* @param fileName
|
||||
* XML全路径
|
||||
*/
|
||||
public void parserXml(String fileName) {
|
||||
commonDao.parserXml(fileName);
|
||||
}
|
||||
|
||||
public List<ComboTree> comTree(List<TSDepart> all, ComboTree comboTree) {
|
||||
return commonDao.comTree(all, comboTree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据模型生成JSON
|
||||
*
|
||||
* @param all
|
||||
* 全部对象
|
||||
* @param in
|
||||
* 已拥有的对象
|
||||
* @param comboBox
|
||||
* 模型
|
||||
* @return
|
||||
*/
|
||||
public List<ComboTree> ComboTree(List all, ComboTreeModel comboTreeModel,
|
||||
List in) {
|
||||
return commonDao.ComboTree(all, comboTreeModel, in);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建树形数据表
|
||||
*/
|
||||
public List<TreeGrid> treegrid(List all, TreeGridModel treeGridModel) {
|
||||
return commonDao.treegrid(all, treeGridModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动完成列表
|
||||
*
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> getAutoList(Autocomplete autocomplete) {
|
||||
StringBuffer sb = new StringBuffer("");
|
||||
for (String searchField : autocomplete.getSearchField().split(",")) {
|
||||
sb.append(" or " + searchField + " like '%"
|
||||
+ autocomplete.getTrem() + "%' ");
|
||||
}
|
||||
String hql = "from " + autocomplete.getEntityName() + " where 1!=1 "
|
||||
+ sb.toString();
|
||||
return commonDao.getSession().createQuery(hql)
|
||||
.setFirstResult(autocomplete.getCurPage() - 1)
|
||||
.setMaxResults(autocomplete.getMaxRows()).list();
|
||||
}
|
||||
|
||||
|
||||
public Integer executeSql(String sql, List<Object> param) {
|
||||
return commonDao.executeSql(sql, param);
|
||||
}
|
||||
|
||||
|
||||
public Integer executeSql(String sql, Object... param) {
|
||||
return commonDao.executeSql(sql, param);
|
||||
}
|
||||
|
||||
|
||||
public Integer executeSql(String sql, Map<String, Object> param) {
|
||||
return commonDao.executeSql(sql, param);
|
||||
}
|
||||
|
||||
public Object executeSqlReturnKey(String sql, Map<String, Object> param) {
|
||||
return commonDao.executeSqlReturnKey(sql, param);
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> findForJdbc(String sql, int page, int rows) {
|
||||
return commonDao.findForJdbc(sql, page, rows);
|
||||
}
|
||||
|
||||
|
||||
public List<Map<String, Object>> findForJdbc(String sql, Object... objs) {
|
||||
return commonDao.findForJdbc(sql, objs);
|
||||
}
|
||||
|
||||
|
||||
public List<Map<String, Object>> findForJdbcParam(String sql, int page,
|
||||
int rows, Object... objs) {
|
||||
return commonDao.findForJdbcParam(sql, page, rows, objs);
|
||||
}
|
||||
|
||||
|
||||
public <T> List<T> findObjForJdbc(String sql, int page, int rows,
|
||||
Class<T> clazz) {
|
||||
return commonDao.findObjForJdbc(sql, page, rows, clazz);
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> findOneForJdbc(String sql, Object... objs) {
|
||||
return commonDao.findOneForJdbc(sql, objs);
|
||||
}
|
||||
|
||||
|
||||
public Long getCountForJdbc(String sql) {
|
||||
return commonDao.getCountForJdbc(sql);
|
||||
}
|
||||
|
||||
|
||||
public Long getCountForJdbcParam(String sql, Object[] objs) {
|
||||
return commonDao.getCountForJdbc(sql);
|
||||
}
|
||||
|
||||
|
||||
public <T> void batchSave(List<T> entitys) {
|
||||
this.commonDao.batchSave(entitys);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过hql 查询语句查找对象
|
||||
*
|
||||
* @param <T>
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findHql(String hql, Object... param) {
|
||||
return this.commonDao.findHql(hql, param);
|
||||
}
|
||||
|
||||
public <T> List<T> pageList(DetachedCriteria dc, int firstResult,
|
||||
int maxResult) {
|
||||
return this.commonDao.pageList(dc, firstResult, maxResult);
|
||||
}
|
||||
|
||||
public <T> List<T> findByDetached(DetachedCriteria dc) {
|
||||
return this.commonDao.findByDetached(dc);
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
package org.jeecgframework.core.extend.datasource;
|
||||
|
||||
public enum DataSourceType {
|
||||
dataSource_jeecg,dataSource_enter,dataSource4,mapdataSource
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
|
||||
/**
|
||||
* 解析拼装
|
||||
*
|
||||
* @author JueYue
|
||||
* @date 2014年1月17日
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface IHqlParse {
|
||||
/**
|
||||
* 单值组装
|
||||
*
|
||||
* @date 2014年1月17日
|
||||
* @param name
|
||||
* @param value
|
||||
*/
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value);
|
||||
|
||||
/**
|
||||
* 范围组装
|
||||
*
|
||||
* @date 2014年1月17日
|
||||
* @param name
|
||||
* @param value
|
||||
* @param beginValue
|
||||
* @param endValue
|
||||
*/
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue);
|
||||
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class BigDecimalParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name,
|
||||
beginValue.contains(".") ? BigDecimal
|
||||
.valueOf(Double.parseDouble(beginValue))
|
||||
: BigDecimal.valueOf(Long
|
||||
.parseLong(beginValue)));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name,
|
||||
beginValue.contains(".") ? BigDecimal
|
||||
.valueOf(Double.parseDouble(endValue))
|
||||
: BigDecimal.valueOf(Long
|
||||
.parseLong(endValue)));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value)) {
|
||||
cq.eq(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class DoubleParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name, Double.parseDouble(beginValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name, Double.parseDouble(endValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value)) {
|
||||
cq.eq(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class FloatParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name, Float.parseFloat(beginValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name, Float.parseFloat(endValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value)) {
|
||||
cq.eq(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
/**
|
||||
* Integer解析拼装起
|
||||
*
|
||||
* @author JueYue
|
||||
* @date 2014年1月17日
|
||||
* @version 1.0
|
||||
*/
|
||||
public class IntegerParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name, Integer.parseInt(beginValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name, Integer.parseInt(endValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class LongParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name, Long.parseLong(beginValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name, Long.parseLong(endValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value)) {
|
||||
cq.eq(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class ShortParseImpl implements IHqlParse {
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
if (HqlGenerateUtil.isNotEmpty(value))
|
||||
cq.eq(name, value);
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
if (HqlGenerateUtil.isNotEmpty(beginValue)) {
|
||||
cq.ge(name, Short.parseShort(beginValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(endValue)) {
|
||||
cq.le(name, Short.parseShort(endValue));
|
||||
}
|
||||
if (HqlGenerateUtil.isNotEmpty(value)) {
|
||||
cq.eq(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
package org.jeecgframework.core.extend.hqlsearch.parse.impl;
|
||||
|
||||
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
|
||||
import org.jeecgframework.core.extend.hqlsearch.parse.IHqlParse;
|
||||
|
||||
public class StringParseImpl implements IHqlParse {
|
||||
|
||||
private static final String SUFFIX_COMMA = ",";
|
||||
private static final String SUFFIX_KG = " ";
|
||||
/** 模糊查询符号 */
|
||||
private static final String SUFFIX_ASTERISK = "*";
|
||||
private static final String SUFFIX_ASTERISK_VAGUE = "%";
|
||||
/** 不等于查询符号 */
|
||||
private static final String SUFFIX_NOT_EQUAL = "!";
|
||||
private static final String SUFFIX_NOT_EQUAL_NULL = "!NULL";
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value) {
|
||||
String searchValue = null;
|
||||
if (value != null && (searchValue = value.toString().trim()) != "") {
|
||||
// [1].In 多个条件查询{逗号隔开参数}
|
||||
if (searchValue.indexOf(SUFFIX_COMMA) >= 0) {
|
||||
// 页面输入查询条件,情况(取消字段的默认条件)
|
||||
if (searchValue.indexOf(SUFFIX_KG) >= 0) {
|
||||
String val = searchValue.substring(searchValue
|
||||
.indexOf(SUFFIX_KG));
|
||||
cq.eq(name, val);
|
||||
} else {
|
||||
String[] vs = searchValue.split(SUFFIX_COMMA);
|
||||
cq.in(name, vs);
|
||||
}
|
||||
}
|
||||
// [2].模糊查询{带有* 星号的参数}
|
||||
else if (searchValue.indexOf(SUFFIX_ASTERISK) >= 0) {
|
||||
cq.like(name, searchValue.replace(SUFFIX_ASTERISK,
|
||||
SUFFIX_ASTERISK_VAGUE));
|
||||
}
|
||||
// [3].不匹配查询{等于!叹号}
|
||||
// (1).不为空字符串
|
||||
else if (searchValue.equals(SUFFIX_NOT_EQUAL)) {
|
||||
cq.isNotNull(name);
|
||||
}
|
||||
// (2).不为NULL
|
||||
else if (searchValue.toUpperCase().equals(SUFFIX_NOT_EQUAL_NULL)) {
|
||||
cq.isNotNull(name);
|
||||
}
|
||||
// (3).正常不匹配
|
||||
else if (searchValue.indexOf(SUFFIX_NOT_EQUAL) >= 0) {
|
||||
cq.notEq(name, searchValue.replace(SUFFIX_NOT_EQUAL, ""));
|
||||
}
|
||||
// [4].全匹配查询{没有特殊符号的参数}
|
||||
else {
|
||||
cq.eq(name, searchValue);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void addCriteria(CriteriaQuery cq, String name, Object value,
|
||||
String beginValue, String endValue) {
|
||||
addCriteria(cq,name,value);
|
||||
}
|
||||
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.jeecgframework.core.util.ContextHolderUtils;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 常量类
|
||||
*/
|
||||
public class ConStant {
|
||||
/**OpenOffice安装根目录*/
|
||||
public static final String OFFICE_HOME;
|
||||
static{
|
||||
OFFICE_HOME = ResourceUtil.getSessionattachmenttitle("office_home");
|
||||
}
|
||||
/**文件上传保存根目录*/
|
||||
public static final String UPLOAD_BASE_DIR = "upload";
|
||||
/**文件转换工具根目录*/
|
||||
public static final String SWFTOOLS_BASE_DIR = "swftools";
|
||||
/**PDF-SWF*/
|
||||
public static final String SWFTOOLS_PDF2SWF_PATH ="pdf2swf.exe";
|
||||
/**GIF-SWF*/
|
||||
public static final String SWFTOOLS_GIF2SWF_PATH ="gif2swf.exe";
|
||||
/**PNG-SWF*/
|
||||
public static final String SWFTOOLS_PNG2SWF_PATH ="png2swf.exe";
|
||||
/**JPEG-SWF*/
|
||||
public static final String SWFTOOLS_JPEG2SWF_PATH ="jpeg2swf.exe";
|
||||
/**WAV-SWF*/
|
||||
public static final String SWFTOOLS_WAV2SWF_PATH = "wav2swf.exe";
|
||||
/**PDF合并*/
|
||||
public static final String SWFTOOLS_PDFCOMBINE_PATH ="swfcombine.exe";
|
||||
/**SWF文件后缀*/
|
||||
public static final String SWF_STUFFIX = "swf";
|
||||
public static String SWFTOOLS_HOME="";
|
||||
/**
|
||||
* 根据扩展名获取转换工具
|
||||
* @param extend
|
||||
* @return
|
||||
*/
|
||||
public static String getSWFToolsPath(String extend)
|
||||
{
|
||||
HttpServletRequest request=ContextHolderUtils.getRequest();
|
||||
SWFTOOLS_HOME=request.getSession().getServletContext().getRealPath("/") + SWFTOOLS_BASE_DIR + "/";
|
||||
if(extend.equals("pdf"))
|
||||
{
|
||||
SWFTOOLS_HOME+=SWFTOOLS_PDF2SWF_PATH;
|
||||
}
|
||||
if(extend.equals("gif"))
|
||||
{
|
||||
SWFTOOLS_HOME+=SWFTOOLS_GIF2SWF_PATH;
|
||||
}
|
||||
if(extend.equals("png"))
|
||||
{
|
||||
SWFTOOLS_HOME+=SWFTOOLS_PNG2SWF_PATH;
|
||||
}
|
||||
if(extend.equals("jpeg"))
|
||||
{
|
||||
SWFTOOLS_HOME+=SWFTOOLS_JPEG2SWF_PATH;
|
||||
}
|
||||
if(extend.equals("wav"))
|
||||
{
|
||||
SWFTOOLS_HOME+=SWFTOOLS_WAV2SWF_PATH;
|
||||
}
|
||||
return SWFTOOLS_HOME;
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
import org.jeecgframework.core.util.FileUtils;
|
||||
public class DocConverter {
|
||||
|
||||
private PDFConverter pdfConverter;
|
||||
private SWFConverter swfConverter;
|
||||
|
||||
|
||||
public DocConverter(PDFConverter pdfConverter, SWFConverter swfConverter) {
|
||||
super();
|
||||
this.pdfConverter = pdfConverter;
|
||||
this.swfConverter = swfConverter;
|
||||
}
|
||||
|
||||
|
||||
public void convert(String inputFile,String swfFile,String extend){
|
||||
this.pdfConverter.convert2PDF(inputFile,extend);
|
||||
String pdfFile = FileUtils.getFilePrefix(inputFile)+".pdf";
|
||||
this.swfConverter.convert2SWF(pdfFile, swfFile);
|
||||
}
|
||||
|
||||
public void convert(String inputFile,String extend){
|
||||
this.pdfConverter.convert2PDF(inputFile,extend);
|
||||
String pdfFile = FileUtils.getFilePrefix2(inputFile)+".pdf";
|
||||
extend=FileUtils.getExtend(pdfFile);
|
||||
this.swfConverter.convert2SWF(pdfFile,extend);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
|
||||
/**
|
||||
* PDF文档转换接口
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public interface PDFConverter {
|
||||
public void convert2PDF(String inputFile,String pdfFile,String extend);
|
||||
public void convert2PDF(String inputFile,String extend);
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
|
||||
public interface SWFConverter {
|
||||
public void convert2SWF(String inputFile,String swfFile,String extend);
|
||||
public void convert2SWF(String inputFile,String extend);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
public class StreamGobbler extends Thread {
|
||||
|
||||
InputStream is;
|
||||
String type;
|
||||
|
||||
public StreamGobbler(InputStream is, String type) {
|
||||
this.is = is;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
InputStreamReader isr = new InputStreamReader(is);
|
||||
BufferedReader br = new BufferedReader(isr);
|
||||
String line = null;
|
||||
while ((line = br.readLine()) != null) {
|
||||
if (type.equals("Error")) {
|
||||
org.jeecgframework.core.util.LogUtil.info("Error :" + line);
|
||||
} else {
|
||||
org.jeecgframework.core.util.LogUtil.info("文件转换:" + line);
|
||||
}
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
package org.jeecgframework.core.extend.swftools;
|
||||
|
||||
import org.jeecgframework.core.util.FileUtils;
|
||||
/**
|
||||
* 文件转换调用接口
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class SwfToolsUtil {
|
||||
public static void convert2SWF(String inputFile) {
|
||||
|
||||
String extend=FileUtils.getExtend(inputFile);
|
||||
PDFConverter pdfConverter = new OpenOfficePDFConverter();
|
||||
SWFConverter swfConverter = new SWFToolsSWFConverter();
|
||||
if(extend.equals("pdf"))
|
||||
{
|
||||
swfConverter.convert2SWF(inputFile,extend);
|
||||
}
|
||||
if(extend.equals("doc")||extend.equals("docx")||extend.equals("xls")||extend.equals("pptx")||extend.equals("xlsx")||extend.equals("ppt")||extend.equals("txt")||extend.equals("odt"))
|
||||
{
|
||||
DocConverter converter = new DocConverter(pdfConverter,swfConverter);
|
||||
converter.convert(inputFile,extend);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package org.jeecgframework.core.extend.template;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class DataSourceMap {
|
||||
private static Map<Object,Object> dsm;
|
||||
|
||||
static{
|
||||
InputStream is=Thread.currentThread().getContextClassLoader().getResourceAsStream("dataSourceMap.properties");
|
||||
Properties p=new Properties();
|
||||
try {
|
||||
p.load(is);
|
||||
dsm=(HashMap<Object,Object>) new HashMap<Object,Object>();
|
||||
Set ps=p.entrySet();
|
||||
for (Iterator iterator = ps.iterator(); iterator.hasNext();) {
|
||||
Map.Entry<Object, Object> entry = (Map.Entry<Object, Object>) iterator.next();
|
||||
dsm.put(entry.getKey().toString(), entry.getValue()==null?"":entry.getValue().toString().trim());
|
||||
}
|
||||
is.close();//关闭
|
||||
is=null;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public static Map<Object,Object> getDataSourceMap() {
|
||||
Map<Object,Object> datadsm=new HashMap<Object,Object>();
|
||||
datadsm.putAll(dsm);
|
||||
return datadsm;
|
||||
}
|
||||
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
package org.jeecgframework.core.extend.template;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Template {
|
||||
public HashMap<String, String> teprems = null;
|
||||
public String templatecCode;
|
||||
public String parameterName;
|
||||
public String parameterValue;
|
||||
public String parameterTagName;
|
||||
public String parameterTagValue;
|
||||
public Object templatecObject;
|
||||
public String templatePath;
|
||||
public Class templateClass;
|
||||
public Map<String, String> dataSourceMap;
|
||||
public List dataSet;
|
||||
|
||||
public List getDataSet() {
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
public void setDataSet(List dataSet) {
|
||||
this.dataSet = dataSet;
|
||||
}
|
||||
|
||||
public String getTemplatePath() {
|
||||
return templatePath;
|
||||
}
|
||||
|
||||
public void setTemplatePath(String templatePath) {
|
||||
this.templatePath = templatePath;
|
||||
}
|
||||
|
||||
public Map<String, String> getDataSourceMap() {
|
||||
return dataSourceMap;
|
||||
}
|
||||
|
||||
public void setDataSourceMap(Map<String, String> dataSourceMap) {
|
||||
this.dataSourceMap = dataSourceMap;
|
||||
}
|
||||
|
||||
public String getParameterName() {
|
||||
return parameterName;
|
||||
}
|
||||
|
||||
public Class getTemplateClass() {
|
||||
return templateClass;
|
||||
}
|
||||
|
||||
public void setTemplateClass(Class templateClass) {
|
||||
this.templateClass = templateClass;
|
||||
}
|
||||
|
||||
public void setParameterName(String parameterName) {
|
||||
this.parameterName = parameterName;
|
||||
}
|
||||
|
||||
public String getParameterTagName() {
|
||||
return parameterTagName;
|
||||
}
|
||||
|
||||
public void setParameterTagName(String parameterTagName) {
|
||||
this.parameterTagName = parameterTagName;
|
||||
}
|
||||
|
||||
public String getParameterTagValue() {
|
||||
return parameterTagValue;
|
||||
}
|
||||
|
||||
public void setParameterTagValue(String parameterTagValue) {
|
||||
this.parameterTagValue = parameterTagValue;
|
||||
}
|
||||
|
||||
public String getParameterValue() {
|
||||
return parameterValue;
|
||||
}
|
||||
|
||||
public void setParameterValue(String parameterValue) {
|
||||
this.parameterValue = parameterValue;
|
||||
}
|
||||
|
||||
public Object getTemplatecObject() {
|
||||
return templatecObject;
|
||||
}
|
||||
|
||||
public void setTemplatecObject(Object templatecObject) {
|
||||
this.templatecObject = templatecObject;
|
||||
}
|
||||
|
||||
public String getTemplatecCode() {
|
||||
return templatecCode;
|
||||
}
|
||||
|
||||
public void setTemplatecCode(String templatecCode) {
|
||||
this.templatecCode = templatecCode;
|
||||
}
|
||||
|
||||
public HashMap<String, String> getTeprems() {
|
||||
return teprems;
|
||||
}
|
||||
|
||||
public void setTeprems(HashMap<String, String> teprems) {
|
||||
this.teprems = teprems;
|
||||
}
|
||||
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.jeecgframework.web.system.manager.ClientManager;
|
||||
import org.jeecgframework.web.system.pojo.base.Client;
|
||||
import org.jeecgframework.web.system.service.SystemService;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jeecgframework.core.util.ContextHolderUtils;
|
||||
import org.jeecgframework.core.util.ResourceUtil;
|
||||
import org.jeecgframework.core.util.oConvertUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.view.RedirectView;
|
||||
|
||||
|
||||
/**
|
||||
* 权限拦截器
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class AuthInterceptor implements HandlerInterceptor {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(AuthInterceptor.class);
|
||||
private SystemService systemService;
|
||||
private List<String> excludeUrls;
|
||||
|
||||
public List<String> getExcludeUrls() {
|
||||
return excludeUrls;
|
||||
}
|
||||
|
||||
public void setExcludeUrls(List<String> excludeUrls) {
|
||||
this.excludeUrls = excludeUrls;
|
||||
}
|
||||
|
||||
public SystemService getSystemService() {
|
||||
return systemService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setSystemService(SystemService systemService) {
|
||||
this.systemService = systemService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在controller后拦截
|
||||
*/
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object object, Exception exception) throws Exception {
|
||||
}
|
||||
|
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object object, ModelAndView modelAndView) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 在controller前拦截
|
||||
*/
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
||||
String requestPath = ResourceUtil.getRequestPath(request);// 用户访问的资源地址
|
||||
HttpSession session = ContextHolderUtils.getSession();
|
||||
Client client = ClientManager.getInstance().getClient(session.getId());
|
||||
if(client == null){
|
||||
client = ClientManager.getInstance().getClient(
|
||||
request.getParameter("sessionId"));
|
||||
}
|
||||
if (excludeUrls.contains(requestPath)) {
|
||||
return true;
|
||||
} else {
|
||||
if (client != null && client.getUser()!=null ) {
|
||||
if(!hasMenuAuth(request)){
|
||||
response.sendRedirect("loginController.do?noAuth");
|
||||
//request.getRequestDispatcher("webpage/common/noAuth.jsp").forward(request, response);
|
||||
return false;
|
||||
}
|
||||
String functionId=oConvertUtils.getString(request.getParameter("clickFunctionId"));
|
||||
if(!oConvertUtils.isEmpty(functionId)){
|
||||
Set<String> operationCodes = systemService.getOperationCodesByUserIdAndFunctionId(client.getUser().getId(), functionId);
|
||||
request.setAttribute("operationCodes", operationCodes);
|
||||
|
||||
}
|
||||
if(!oConvertUtils.isEmpty(functionId)){
|
||||
List<String> allOperation=this.systemService.findListbySql("SELECT operationcode FROM t_s_operation WHERE functionid='"+functionId+"'");
|
||||
|
||||
List<String> newall = new ArrayList<String>();
|
||||
if(allOperation.size()>0){
|
||||
for(String s:allOperation){
|
||||
s=s.replaceAll(" ", "");
|
||||
newall.add(s);
|
||||
}
|
||||
String hasOperSql="SELECT operation FROM t_s_role_function fun, t_s_role_user role WHERE " +
|
||||
"fun.functionid='"+functionId+"' AND fun.operation!='' AND fun.roleid=role.roleid AND role.userid='"+client.getUser().getId()+"' ";
|
||||
List<String> hasOperList = this.systemService.findListbySql(hasOperSql);
|
||||
for(String strs:hasOperList){
|
||||
for(String s:strs.split(",")){
|
||||
s=s.replaceAll(" ", "");
|
||||
newall.remove(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
request.setAttribute("noauto_operationCodes", newall);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
//forword(request);
|
||||
forward(request, response);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private boolean hasMenuAuth(HttpServletRequest request){
|
||||
String requestPath = ResourceUtil.getRequestPath(request);// 用户访问的资源地址
|
||||
String funcid=oConvertUtils.getString(request.getParameter("clickFunctionId"));
|
||||
|
||||
if(requestPath.indexOf("loginController.do")!=-1||funcid.length()==0){
|
||||
return true;
|
||||
}
|
||||
String userid = ClientManager.getInstance().getClient(
|
||||
ContextHolderUtils.getSession().getId()).getUser().getId();
|
||||
//requestPath=requestPath.substring(0, requestPath.indexOf("?")+1);
|
||||
String sql = "SELECT DISTINCT f.id FROM t_s_function f,t_s_role_function rf,t_s_role_user ru " +
|
||||
" WHERE f.id=rf.functionid AND rf.roleid=ru.roleid AND " +
|
||||
"ru.userid='"+userid+"' AND f.functionurl like '"+requestPath+"%'";
|
||||
List list = this.systemService.findListbySql(sql);
|
||||
if(list.size()==0){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 转发
|
||||
*
|
||||
* @param user
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "forword")
|
||||
public ModelAndView forword(HttpServletRequest request) {
|
||||
return new ModelAndView(new RedirectView("loginController.do?login"));
|
||||
}
|
||||
|
||||
private void forward(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
request.getRequestDispatcher("webpage/login/timeout.jsp").forward(request, response);
|
||||
}
|
||||
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class DateConvertEditor extends PropertyEditorSupport {
|
||||
private SimpleDateFormat datetimeFormat = new SimpleDateFormat(
|
||||
"yyyy-MM-dd HH:mm:ss");
|
||||
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
public void setAsText(String text) throws IllegalArgumentException {
|
||||
if (StringUtils.hasText(text)) {
|
||||
try {
|
||||
if (text.indexOf(":") == -1 && text.length() == 10) {
|
||||
setValue(this.dateFormat.parse(text));
|
||||
} else if (text.indexOf(":") > 0 && text.length() == 19) {
|
||||
setValue(this.datetimeFormat.parse(text));
|
||||
} else if (text.indexOf(":") > 0 && text.length() == 21) {
|
||||
text = text.replace(".0", "");
|
||||
setValue(this.datetimeFormat.parse(text));
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"Could not parse date, date format is error ");
|
||||
}
|
||||
} catch (ParseException ex) {
|
||||
IllegalArgumentException iae = new IllegalArgumentException(
|
||||
"Could not parse date: " + ex.getMessage());
|
||||
iae.initCause(ex);
|
||||
throw iae;
|
||||
}
|
||||
} else {
|
||||
setValue(null);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* 字符集拦截器
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
public class EncodingInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* 在controller后拦截
|
||||
*/
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object object, Exception exception) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object object, ModelAndView modelAndView) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 在controller前拦截
|
||||
*/
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.jeecgframework.core.common.model.json.LogAnnotation;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 张代浩
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
@Aspect
|
||||
public class LogInterceptor {
|
||||
@Before("execution(* com.renfang.controller.*.*(..))")
|
||||
public void beforeMethod(JoinPoint joinPoint) throws Exception {
|
||||
String temp = joinPoint.getStaticPart().toShortString();
|
||||
String longTemp = joinPoint.getStaticPart().toLongString();
|
||||
joinPoint.getStaticPart().toString();
|
||||
String classType = joinPoint.getTarget().getClass().getName();
|
||||
String methodName = temp.substring(10, temp.length() - 1);
|
||||
Class<?> className = Class.forName(classType);
|
||||
Class[] args = new Class[joinPoint.getArgs().length];
|
||||
String[] sArgs = (longTemp.substring(longTemp.lastIndexOf("(") + 1,
|
||||
longTemp.length() - 2)).split(",");
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (sArgs[i].endsWith("String[]")) {
|
||||
args[i] = Array.newInstance(Class.forName("java.lang.String"),
|
||||
1).getClass();
|
||||
} else if (sArgs[i].endsWith("Long[]")) {
|
||||
args[i] = Array.newInstance(Class.forName("java.lang.Long"), 1)
|
||||
.getClass();
|
||||
} else if (sArgs[i].indexOf(".") == -1) {
|
||||
if (sArgs[i].equals("int")) {
|
||||
args[i] = int.class;
|
||||
} else if (sArgs[i].equals("char")) {
|
||||
args[i] = char.class;
|
||||
} else if (sArgs[i].equals("float")) {
|
||||
args[i] = float.class;
|
||||
} else if (sArgs[i].equals("long")) {
|
||||
args[i] = long.class;
|
||||
}
|
||||
} else {
|
||||
args[i] = Class.forName(sArgs[i]);
|
||||
}
|
||||
}
|
||||
Method method = className.getMethod(
|
||||
methodName.substring(methodName.indexOf(".") + 1,
|
||||
methodName.indexOf("(")), args);
|
||||
if (method.isAnnotationPresent(LogAnnotation.class)) {
|
||||
LogAnnotation logAnnotation = method
|
||||
.getAnnotation(LogAnnotation.class);
|
||||
String operateModelNm = logAnnotation.operateModelNm();
|
||||
String operateDescribe = logAnnotation.operateDescribe();
|
||||
String operateFuncNm = logAnnotation.operateFuncNm();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package org.jeecgframework.core.interceptors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.support.WebBindingInitializer;
|
||||
import org.springframework.web.context.request.WebRequest;
|
||||
|
||||
public class MyWebBinding implements WebBindingInitializer {
|
||||
|
||||
public void initBinder(WebDataBinder binder, WebRequest request) {
|
||||
// 1. 使用spring自带的CustomDateEditor
|
||||
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// binder.registerCustomEditor(Date.class, new
|
||||
// CustomDateEditor(dateFormat, true));
|
||||
//2. 自定义的PropertyEditorSupport
|
||||
binder.registerCustomEditor(Date.class, new DateConvertEditor());
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue