Compare commits
	
		
			No commits in common. "dd6125c95c752312a46c72e8cb1283291b5188ba" and "3b9ce88b1eeea6210421445d2ff8bcc188007cad" have entirely different histories.
		
	
	
		
			dd6125c95c
			...
			3b9ce88b1e
		
	
		
							
								
								
									
										4
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | *.js linguist-language=Java | ||||||
|  | *.css linguist-language=Java | ||||||
|  | *.html linguist-language=Java | ||||||
|  | *.vue linguist-language=Java | ||||||
							
								
								
									
										10
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | ## ide | ||||||
|  | **/.idea | ||||||
|  | *.iml | ||||||
|  | 
 | ||||||
|  | ## backend | ||||||
|  | **/target | ||||||
|  | **/logs | ||||||
|  | 
 | ||||||
|  | ## front | ||||||
|  | **/*.lock | ||||||
							
								
								
									
										674
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										674
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,674 @@ | |||||||
|  |                     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>. | ||||||
							
								
								
									
										90
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										90
									
								
								README.md
									
									
									
									
									
								
							| @ -1,2 +1,90 @@ | |||||||
| # openerp | # 项目总述 | ||||||
|  | * 很多人说管伊佳ERP(原名:华夏ERP,英文名:jshERP)是目前人气领先的国产ERP系统 | ||||||
|  | * 虽然目前只有进销存+财务+生产的功能,但后面将会推出ERP的全部功能,有兴趣请帮点一下 **Star** 哦 | ||||||
|  | * **官网地址:http://www.gyjerp.com  商务或技术交流,请联系QQ:752718920 微信:shenhua861584** | ||||||
|  | * 官方抖音号:604725414 关注满1000人,直播写开源代码,大家抓紧关注 | ||||||
| 
 | 
 | ||||||
|  | # 网络版介绍 | ||||||
|  | * 推荐使用网络版(198元1年)淘宝链接:https://item.taobao.com/item.htm?id=674169489573 | ||||||
|  | * 平台地址:http://cloud.gyjerp.com 欢迎大家注册租户进行使用 | ||||||
|  | * 网络版手机端请扫描下方二维码 | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | # 定制和插件 | ||||||
|  | * 如有ERP私人定制需求,请将需求整理成文档,发给邮箱: **752718920@qq.com** ,我会及时回复哒 | ||||||
|  | * 如需更多功能,欢迎购买作者小店的插件 https://shop104070207.taobao.com/ 谢谢支持 | ||||||
|  | 
 | ||||||
|  | # 开发初衷 | ||||||
|  | * 管伊佳ERP立志为中小企业提供开源好用的ERP软件,降低企业的信息化成本 | ||||||
|  | * 个人开发者也可以使用管伊佳ERP进行二次开发,加快完成开发任务 | ||||||
|  | * 初学JAVA的小伙伴可以下载源代码来进行学习交流 | ||||||
|  | 
 | ||||||
|  | # 技术框架 | ||||||
|  | * 核心框架:SpringBoot 2.0.0 | ||||||
|  | * 持久层框架:Mybatis 1.3.2 | ||||||
|  | * 日志管理:SLF4J 1.7 | ||||||
|  | * 前端框架:Vue 2.7.16 | ||||||
|  | * UI框架: Ant-Design-Vue 1.5.2 | ||||||
|  | * 模板框架: Jeecg-Boot 2.2.0 | ||||||
|  | * 项目管理框架: Maven 3.2.3 | ||||||
|  | 
 | ||||||
|  | # 开发环境 | ||||||
|  | 建议开发者使用以下环境,可以避免版本带来的问题 | ||||||
|  | * IDE: IntelliJ IDEA 2019.2+和JetBrains WebStorm 2019.3+ | ||||||
|  | * DB: Mysql 5.7.33 | ||||||
|  | * JDK: JDK 1.8 | ||||||
|  | * Node: Node 20.17.0 | ||||||
|  | * Maven: Maven 3.2.3+ | ||||||
|  | * Redis: 6.2.1 | ||||||
|  | * Nginx: 1.12.2  | ||||||
|  | 
 | ||||||
|  | # 服务器环境 | ||||||
|  | * 数据库:Mysql5.7.33 | ||||||
|  | * JAVA平台:JRE1.8 | ||||||
|  | * Redis库:redis6.2.1 | ||||||
|  | * Nginx代理:nginx1.12.2 | ||||||
|  | * 操作系统:Windows、Linux等 | ||||||
|  | 
 | ||||||
|  | # 配套资料 | ||||||
|  | * 需要用户手册请访问这里 https://www.gyjerp.com/doc/archive/user-manual.html | ||||||
|  | * 需要接口文档请查看这里 https://www.gyjerp.com/doc/archive/apidoc.html | ||||||
|  | * 喜欢视频教程可以看这里 https://space.bilibili.com/540003552/channel/series  | ||||||
|  | * 为方便大家搭建运行环境,分享了下载地址 https://pan.baidu.com/s/1jlild9uyGdQ7H2yaMx76zw  提取码:814g | ||||||
|  | * 不会打包的小伙伴,请下载此打包后的文件 https://share.weiyun.com/NDJNLhry 密码:vd3aig | ||||||
|  | * 不会部署的小伙伴,请参考部署教程 https://www.gyjerp.com/doc/archive/deploy.html | ||||||
|  | * 部署后登录系统的默认租户账号:jsh,默认超管账户:admin,默认密码均为:123456 | ||||||
|  | 
 | ||||||
|  | # 开源说明 | ||||||
|  | * 本系统100%开源,遵守GPL-3.0协议 | ||||||
|  | * 支持全球73种语言,在登录后右上角“界面设置”页面进行切换 | ||||||
|  | 
 | ||||||
|  | # 系统美图 | ||||||
|  | * 首页 | ||||||
|  |  | ||||||
|  | * 零售管理 | ||||||
|  |  | ||||||
|  | * 采购管理 | ||||||
|  |  | ||||||
|  | * 销售管理 | ||||||
|  |  | ||||||
|  | * 仓库管理 | ||||||
|  |  | ||||||
|  | * 财务管理 | ||||||
|  |  | ||||||
|  | * 报表查询 | ||||||
|  |  | ||||||
|  | * 商品管理 | ||||||
|  |  | ||||||
|  | * 基本资料 | ||||||
|  |  | ||||||
|  | * 系统管理 | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | # 如何支持 | ||||||
|  | * 开源不易,坚持更难!如果您觉得管伊佳ERP不错,不用请作者喝咖啡。 | ||||||
|  | * 您可以将我们的云平台地址:https://cloud.gyjerp.com 发给您的家人或朋友,只要是开店的、办厂的、做批发的都可以用得上。 | ||||||
|  | * 您可以到我们自营的拼多多商城进行支持:https://mobile.pinduoduo.com/mall_page.html?mall_id=375313371 | ||||||
|  | * 以上将是对我们开源最大的支持!在此表示感谢! | ||||||
							
								
								
									
										4
									
								
								jshERP-boot/.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								jshERP-boot/.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | *.js linguist-language=Java | ||||||
|  | *.css linguist-language=Java | ||||||
|  | *.html linguist-language=Java | ||||||
|  | *.sh text eol=lf | ||||||
							
								
								
									
										21
									
								
								jshERP-boot/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								jshERP-boot/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | *.class | ||||||
|  | 
 | ||||||
|  | # Mobile Tools for Java (J2ME) | ||||||
|  | .mtj.tmp/ | ||||||
|  | 
 | ||||||
|  | *.iml | ||||||
|  | # Package Files # | ||||||
|  | *.jar | ||||||
|  | *.war | ||||||
|  | *.ear | ||||||
|  | *.zip | ||||||
|  | *.log | ||||||
|  | 
 | ||||||
|  | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||||||
|  | hs_err_pid* | ||||||
|  | 
 | ||||||
|  | .idea | ||||||
|  | /target | ||||||
|  | 
 | ||||||
|  | **/*.iml | ||||||
|  | 
 | ||||||
							
								
								
									
										133
									
								
								jshERP-boot/dist/jshERP/bin/run-manage.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								jshERP-boot/dist/jshERP/bin/run-manage.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,133 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | SERVER_NAME=jshERP | ||||||
|  | readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))} | ||||||
|  | #readonly JAVA_HOME="" | ||||||
|  | readonly CONFIG_HOME="$APP_HOME/config/" | ||||||
|  | readonly LIB_HOME="$APP_HOME/lib" | ||||||
|  | readonly LOGS_HOME="$APP_HOME/logs" | ||||||
|  | readonly PID_FILE="$LOGS_HOME/application.pid" | ||||||
|  | readonly APP_MAIN_CLASS="jshERP.jar" | ||||||
|  | readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml" | ||||||
|  | readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true" | ||||||
|  | readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN" | ||||||
|  | readonly JAVA="java" | ||||||
|  | PID=0 | ||||||
|  | if [ ! -x "$LOGS_HOME" ] | ||||||
|  | then | ||||||
|  |   mkdir $LOGS_HOME | ||||||
|  | fi | ||||||
|  | chmod +x -R "$JAVA_HOME/bin/" | ||||||
|  | functions="/etc/functions.sh" | ||||||
|  | if test -f $functions ; then | ||||||
|  |   . $functions | ||||||
|  | else | ||||||
|  |   success() | ||||||
|  |   { | ||||||
|  |     echo " SUCCESS! $@" | ||||||
|  |   } | ||||||
|  |   failure() | ||||||
|  |   { | ||||||
|  |     echo " ERROR! $@" | ||||||
|  |   } | ||||||
|  |   warning() | ||||||
|  |   { | ||||||
|  |     echo "WARNING! $@" | ||||||
|  |   } | ||||||
|  | fi | ||||||
|  | function checkpid() { | ||||||
|  |    PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}') | ||||||
|  |     if [[ -n "$PID" ]] | ||||||
|  |     then | ||||||
|  |       return 0 | ||||||
|  |     else | ||||||
|  |       return 1 | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  | function start() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]] | ||||||
|  |    then | ||||||
|  |       warning "[$APP_MAIN_CLASS]: already started! (PID=$PID)" | ||||||
|  |    else | ||||||
|  |       echo -n "[$APP_MAIN_CLASS]: Starting ..." | ||||||
|  |       JAVA_CMD="nohup $JAVA $JAVA_OPTS -jar $LIB_HOME/$APP_MAIN_CLASS > /dev/null 2>&1 &" | ||||||
|  |       # echo "Exec cmmand : $JAVA_CMD" | ||||||
|  |       sh -c "$JAVA_CMD" | ||||||
|  |       sleep 3 | ||||||
|  |       checkpid | ||||||
|  |       if [[ $? -eq 0 ]] | ||||||
|  |       then | ||||||
|  |          success "(PID=$PID) " | ||||||
|  |       else | ||||||
|  |          failure " " | ||||||
|  |       fi | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function stop() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]]; | ||||||
|  |    then | ||||||
|  |       echo -n "[$APP_MAIN_CLASS]: Shutting down ...(PID=$PID) " | ||||||
|  |       kill -9 $PID | ||||||
|  |       if [[ $? -eq 0 ]]; | ||||||
|  |       then | ||||||
|  | 	     echo 0 > $PID_FILE | ||||||
|  |          success " " | ||||||
|  |       else | ||||||
|  |          failure " " | ||||||
|  |       fi | ||||||
|  |    else | ||||||
|  |       warning "[$APP_MAIN_CLASS]: is not running ..." | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function status() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]] | ||||||
|  |    then | ||||||
|  |       success "[$APP_MAIN_CLASS]: is running! (PID=$PID)" | ||||||
|  |       return 0 | ||||||
|  |    else | ||||||
|  |       failure "[$APP_MAIN_CLASS]: is not running" | ||||||
|  |       return 1 | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function info() { | ||||||
|  |    echo "System Information:" | ||||||
|  |    echo  | ||||||
|  |    echo "****************************" | ||||||
|  |    echo `head -n 1 /etc/issue` | ||||||
|  |    echo `uname -a` | ||||||
|  |    echo | ||||||
|  |    echo "JAVA_HOME=$JAVA_HOME" | ||||||
|  |    echo  | ||||||
|  |    echo "JAVA Environment Information:" | ||||||
|  |    echo `$JAVA -version` | ||||||
|  |    echo | ||||||
|  |    echo "APP_HOME=$APP_HOME" | ||||||
|  |    echo "APP_MAIN_CLASS=$APP_MAIN_CLASS" | ||||||
|  |    echo  | ||||||
|  |    echo "****************************" | ||||||
|  | } | ||||||
|  | case "$1" in | ||||||
|  |    'start') | ||||||
|  |       start | ||||||
|  |       ;; | ||||||
|  |    'stop') | ||||||
|  |      stop | ||||||
|  |      ;; | ||||||
|  |    'restart') | ||||||
|  |      stop | ||||||
|  |      start | ||||||
|  |      ;; | ||||||
|  |    'status') | ||||||
|  |      status | ||||||
|  |      ;; | ||||||
|  |    'info') | ||||||
|  |      info | ||||||
|  |      ;; | ||||||
|  |     *) | ||||||
|  |      echo "Usage: $0 {help|start|stop|restart|status|info}" | ||||||
|  |      ;; | ||||||
|  | esac | ||||||
|  | exit 0 | ||||||
							
								
								
									
										37
									
								
								jshERP-boot/dist/jshERP/config/application.properties
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								jshERP-boot/dist/jshERP/config/application.properties
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,37 @@ | |||||||
|  | server.port=9999 | ||||||
|  | #登录超时-秒 | ||||||
|  | server.servlet.session.timeout=36000 | ||||||
|  | #服务路径 | ||||||
|  | server.servlet.context-path=/jshERP-boot | ||||||
|  | #数据库连接 | ||||||
|  | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/jsh_erp?useUnicode=true&characterEncoding=utf8&useCursorFetch=true&defaultFetchSize=500&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false | ||||||
|  | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver | ||||||
|  | spring.datasource.username=root | ||||||
|  | spring.datasource.password=AWS2025aws! | ||||||
|  | #mybatis-plus配置 | ||||||
|  | mybatis-plus.mapper-locations=classpath:./mapper_xml/*.xml | ||||||
|  | # Redis | ||||||
|  | spring.redis.host=127.0.0.1 | ||||||
|  | spring.redis.port=6379 | ||||||
|  | spring.redis.password= | ||||||
|  | #租户对应的角色id | ||||||
|  | manage.roleId=10 | ||||||
|  | #租户允许创建的用户数 | ||||||
|  | tenant.userNumLimit=1000000 | ||||||
|  | #租户允许试用的天数 | ||||||
|  | tenant.tryDayLimit=3000 | ||||||
|  | #插件配置 | ||||||
|  | plugin.runMode=prod | ||||||
|  | plugin.pluginPath=plugins | ||||||
|  | plugin.pluginConfigFilePath=pluginConfig | ||||||
|  | #文件上传方式 1-本机 2-oss | ||||||
|  | file.uploadType=1 | ||||||
|  | #文件上传根目录 | ||||||
|  | file.path=/opt/jshERP/upload | ||||||
|  | #文件上传临时路径 | ||||||
|  | server.tomcat.basedir=/opt/tmp/tomcat | ||||||
|  | #文件上传限制(byte) | ||||||
|  | spring.servlet.multipart.max-file-size=10485760 | ||||||
|  | spring.servlet.multipart.max-request-size=10485760  | ||||||
|  | #bpm接口地址 | ||||||
|  | awspaas.bpm.url=http://127.0.0.1:8088/api | ||||||
							
								
								
									
										34
									
								
								jshERP-boot/dist/jshERP/config/logback-spring.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								jshERP-boot/dist/jshERP/config/logback-spring.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | <configuration> | ||||||
|  |     <property name="LOG_FILE" value="${logs.home}/jshERP"/> | ||||||
|  |     <property name="LOG_PATTERN" value="%d{yyyy/MM/dd-HH:mm:ss} %-5level [%thread] %logger - %msg%n"/> | ||||||
|  | 
 | ||||||
|  |     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||||||
|  |         <encoder> | ||||||
|  |             <pattern>${LOG_PATTERN}</pattern> | ||||||
|  |         </encoder> | ||||||
|  |     </appender> | ||||||
|  | 
 | ||||||
|  |     <appender name="TIME_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||||||
|  |         <file>${LOG_FILE}.log</file> | ||||||
|  |         <encoder> | ||||||
|  |             <pattern>${LOG_PATTERN}</pattern> | ||||||
|  |         </encoder> | ||||||
|  |         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||||||
|  |             <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||||||
|  |             <maxHistory>10</maxHistory> | ||||||
|  |             <totalSizeCap>1GB</totalSizeCap> | ||||||
|  |             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||||||
|  |                 <maxFileSize>100MB</maxFileSize> | ||||||
|  |             </timeBasedFileNamingAndTriggeringPolicy> | ||||||
|  |         </rollingPolicy> | ||||||
|  |     </appender> | ||||||
|  | 
 | ||||||
|  |     <root level="ERROR"> | ||||||
|  |         <appender-ref ref="CONSOLE"/> | ||||||
|  |         <appender-ref ref="TIME_FILE"/> | ||||||
|  |     </root> | ||||||
|  |     <logger name="com.jsh" additivity="false" level="DEBUG"> | ||||||
|  |         <appender-ref ref="CONSOLE"/> | ||||||
|  |         <appender-ref ref="TIME_FILE"/> | ||||||
|  |     </logger> | ||||||
|  | </configuration> | ||||||
							
								
								
									
										977
									
								
								jshERP-boot/dist/jshERP/docs/jsh_erp.sql
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										977
									
								
								jshERP-boot/dist/jshERP/docs/jsh_erp.sql
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,977 @@ | |||||||
|  | /* | ||||||
|  | Navicat MySQL Data Transfer | ||||||
|  | 
 | ||||||
|  | Source Server         : 127.0.0.1 | ||||||
|  | Source Server Version : 50704 | ||||||
|  | Source Host           : 127.0.0.1:3306 | ||||||
|  | Source Database       : jsh_erp | ||||||
|  | 
 | ||||||
|  | Target Server Type    : MYSQL | ||||||
|  | Target Server Version : 50704 | ||||||
|  | File Encoding         : 65001 | ||||||
|  | 
 | ||||||
|  | Date: 2025-03-25 23:43:27 | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | SET FOREIGN_KEY_CHECKS=0; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account`; | ||||||
|  | CREATE TABLE `jsh_account` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `serial_no` varchar(50) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `initial_amount` decimal(24,6) DEFAULT NULL COMMENT '期初金额', | ||||||
|  |   `current_amount` decimal(24,6) DEFAULT NULL COMMENT '当前余额', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `is_default` bit(1) DEFAULT NULL COMMENT '是否默认', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='账户信息'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_account` VALUES ('17', '账户1', 'zzz111', '100.000000', '829.000000', 'aabb', '', null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_account` VALUES ('18', '账户2', '1234131324', '200.000000', '-1681.000000', 'bbbb', '', null, '\0', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account_head | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account_head`; | ||||||
|  | CREATE TABLE `jsh_account_head` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)', | ||||||
|  |   `organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)', | ||||||
|  |   `hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)', | ||||||
|  |   `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额', | ||||||
|  |   `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)', | ||||||
|  |   `bill_no` varchar(50) DEFAULT NULL COMMENT '单据编号', | ||||||
|  |   `bill_time` datetime DEFAULT NULL COMMENT '单据日期', | ||||||
|  |   `remark` varchar(1000) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `file_name` varchar(500) DEFAULT NULL COMMENT '附件名称', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、9审核中', | ||||||
|  |   `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK9F4C0D8DB610FC06` (`organ_id`), | ||||||
|  |   KEY `FK9F4C0D8DAAE50527` (`account_id`), | ||||||
|  |   KEY `FK9F4C0D8DC4170B37` (`hands_person_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COMMENT='财务主表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account_head | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account_item`; | ||||||
|  | CREATE TABLE `jsh_account_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `header_id` bigint(20) NOT NULL COMMENT '表头Id', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户Id', | ||||||
|  |   `in_out_item_id` bigint(20) DEFAULT NULL COMMENT '收支项目Id', | ||||||
|  |   `bill_id` bigint(20) DEFAULT NULL COMMENT '单据id', | ||||||
|  |   `need_debt` decimal(24,6) DEFAULT NULL COMMENT '应收欠款', | ||||||
|  |   `finish_debt` decimal(24,6) DEFAULT NULL COMMENT '已收欠款', | ||||||
|  |   `each_amount` decimal(24,6) DEFAULT NULL COMMENT '单项金额', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '单据备注', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK9F4CBAC0AAE50527` (`account_id`), | ||||||
|  |   KEY `FK9F4CBAC0C5FE6007` (`header_id`), | ||||||
|  |   KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COMMENT='财务子表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account_item | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot`; | ||||||
|  | CREATE TABLE `jsh_depot` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(20) DEFAULT NULL COMMENT '仓库名称', | ||||||
|  |   `address` varchar(50) DEFAULT NULL COMMENT '仓库地址', | ||||||
|  |   `warehousing` decimal(24,6) DEFAULT NULL COMMENT '仓储费', | ||||||
|  |   `truckage` decimal(24,6) DEFAULT NULL COMMENT '搬运费', | ||||||
|  |   `type` int(10) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '描述', | ||||||
|  |   `principal` bigint(20) DEFAULT NULL COMMENT '负责人', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   `is_default` bit(1) DEFAULT NULL COMMENT '是否默认', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='仓库表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('14', '仓库1', 'dizhi', '12.000000', '12.000000', '0', '1', '描述', '131', '', '63', '0', ''); | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('15', '仓库2', '地址100', '555.000000', '666.000000', '0', '2', 'dfdf', '131', '', '63', '0', '\0'); | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('17', '仓库3', '123123', '123.000000', '123.000000', '0', '3', '123', '131', '', '63', '0', '\0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot_head | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot_head`; | ||||||
|  | CREATE TABLE `jsh_depot_head` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)', | ||||||
|  |   `sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类', | ||||||
|  |   `default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号', | ||||||
|  |   `number` varchar(50) DEFAULT NULL COMMENT '票据号', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `oper_time` datetime DEFAULT NULL COMMENT '出入库时间', | ||||||
|  |   `organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户id', | ||||||
|  |   `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)', | ||||||
|  |   `back_amount` decimal(24,6) DEFAULT NULL COMMENT '找零金额', | ||||||
|  |   `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', | ||||||
|  |   `pay_type` varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)', | ||||||
|  |   `bill_type` varchar(50) DEFAULT NULL COMMENT '单据类型', | ||||||
|  |   `remark` varchar(1000) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `file_name` varchar(1000) DEFAULT NULL COMMENT '附件名称', | ||||||
|  |   `sales_man` varchar(50) DEFAULT NULL COMMENT '销售员(可以多个)', | ||||||
|  |   `account_id_list` varchar(50) DEFAULT NULL COMMENT '多账户ID列表', | ||||||
|  |   `account_money_list` varchar(200) DEFAULT NULL COMMENT '多账户金额列表', | ||||||
|  |   `discount` decimal(24,6) DEFAULT NULL COMMENT '优惠率', | ||||||
|  |   `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额', | ||||||
|  |   `discount_last_money` decimal(24,6) DEFAULT NULL COMMENT '优惠后金额', | ||||||
|  |   `other_money` decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计', | ||||||
|  |   `deposit` decimal(24,6) DEFAULT NULL COMMENT '订金', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中', | ||||||
|  |   `purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购', | ||||||
|  |   `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', | ||||||
|  |   `link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号', | ||||||
|  |   `link_apply` varchar(50) DEFAULT NULL COMMENT '关联请购单', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK2A80F214B610FC06` (`organ_id`), | ||||||
|  |   KEY `FK2A80F214AAE50527` (`account_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=277 DEFAULT CHARSET=utf8 COMMENT='单据主表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot_head | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot_item`; | ||||||
|  | CREATE TABLE `jsh_depot_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `header_id` bigint(20) NOT NULL COMMENT '表头Id', | ||||||
|  |   `material_id` bigint(20) NOT NULL COMMENT '商品Id', | ||||||
|  |   `material_extend_id` bigint(20) DEFAULT NULL COMMENT '商品扩展id', | ||||||
|  |   `material_unit` varchar(20) DEFAULT NULL COMMENT '商品单位', | ||||||
|  |   `sku` varchar(50) DEFAULT NULL COMMENT '多属性', | ||||||
|  |   `oper_number` decimal(24,6) DEFAULT NULL COMMENT '数量', | ||||||
|  |   `basic_number` decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶', | ||||||
|  |   `unit_price` decimal(24,6) DEFAULT NULL COMMENT '单价', | ||||||
|  |   `purchase_unit_price` decimal(24,6) DEFAULT NULL COMMENT '采购单价', | ||||||
|  |   `tax_unit_price` decimal(24,6) DEFAULT NULL COMMENT '含税单价', | ||||||
|  |   `all_price` decimal(24,6) DEFAULT NULL COMMENT '金额', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库ID', | ||||||
|  |   `another_depot_id` bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id', | ||||||
|  |   `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率', | ||||||
|  |   `tax_money` decimal(24,6) DEFAULT NULL COMMENT '税额', | ||||||
|  |   `tax_last_money` decimal(24,6) DEFAULT NULL COMMENT '价税合计', | ||||||
|  |   `material_type` varchar(20) DEFAULT NULL COMMENT '商品类型', | ||||||
|  |   `sn_list` varchar(2000) DEFAULT NULL COMMENT '序列号列表', | ||||||
|  |   `batch_number` varchar(100) DEFAULT NULL COMMENT '批号', | ||||||
|  |   `expiration_date` datetime DEFAULT NULL COMMENT '有效日期', | ||||||
|  |   `link_id` bigint(20) DEFAULT NULL COMMENT '关联明细id', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK2A819F475D61CCF7` (`material_id`), | ||||||
|  |   KEY `FK2A819F474BB6190E` (`header_id`), | ||||||
|  |   KEY `FK2A819F479485B3F5` (`depot_id`), | ||||||
|  |   KEY `FK2A819F47729F5392` (`another_depot_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=334 DEFAULT CHARSET=utf8 COMMENT='单据子表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot_item | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_function | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_function`; | ||||||
|  | CREATE TABLE `jsh_function` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `number` varchar(50) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `parent_number` varchar(50) DEFAULT NULL COMMENT '上级编号', | ||||||
|  |   `url` varchar(100) DEFAULT NULL COMMENT '链接', | ||||||
|  |   `component` varchar(100) DEFAULT NULL COMMENT '组件', | ||||||
|  |   `state` bit(1) DEFAULT NULL COMMENT '收缩', | ||||||
|  |   `sort` varchar(50) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `push_btn` varchar(50) DEFAULT NULL COMMENT '功能按钮', | ||||||
|  |   `icon` varchar(50) DEFAULT NULL COMMENT '图标', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   UNIQUE KEY `url` (`url`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8 COMMENT='功能模块表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_function | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '/system', '/layouts/TabLayout', '', '0910', '', '电脑版', '', 'setting', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/system/role', '/system/RoleList', '\0', '0130', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/system/user', '/system/UserList', '\0', '0140', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/system/log', '/system/LogList', '\0', '0160', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/system/function', '/system/FunctionList', '\0', '0166', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', '\0', '0167', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '/material', '/layouts/TabLayout', '\0', '0620', '', '电脑版', null, 'shopping', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/material/material_category', '/material/MaterialCategoryList', '\0', '0230', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/material/material', '/material/MaterialList', '\0', '0240', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '/systemA', '/layouts/TabLayout', '\0', '0750', '', '电脑版', null, 'appstore', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/system/vendor', '/system/VendorList', '\0', '0260', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/system/depot', '/system/DepotList', '\0', '0270', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/system/person', '/system/PersonList', '\0', '0284', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '/bill', '/layouts/TabLayout', '\0', '0330', '', '电脑版', '', 'retweet', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/bill/purchase_in', '/bill/PurchaseInList', '\0', '0340', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '/billB', '/layouts/TabLayout', '\0', '0390', '', '电脑版', '', 'shopping-cart', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/bill/allocation_out', '/bill/AllocationOutList', '\0', '0807', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/bill/sale_out', '/bill/SaleOutList', '\0', '0394', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '/financial', '/layouts/TabLayout', '\0', '0450', '', '电脑版', '', 'money-collect', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('59', '030101', '进销存统计', '0301', '/report/in_out_stock_report', '/report/InOutStockReport', '\0', '0658', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/system/in_out_item', '/system/InOutItemList', '\0', '0282', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/system/account', '/system/AccountList', '\0', '0283', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/financial/item_in', '/financial/ItemInList', '\0', '0465', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '/report', '/layouts/TabLayout', '\0', '0570', '', '电脑版', null, 'pie-chart', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/bill/purchase_back', '/bill/PurchaseBackList', '\0', '0345', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/bill/sale_back', '/bill/SaleBackList', '\0', '0396', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/bill/other_in', '/bill/OtherInList', '\0', '0803', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/bill/other_out', '/bill/OtherOutList', '\0', '0805', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/financial/item_out', '/financial/ItemOutList', '\0', '0470', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/financial/money_in', '/financial/MoneyInList', '\0', '0475', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/financial/money_out', '/financial/MoneyOutList', '\0', '0480', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/financial/giro', '/financial/GiroList', '\0', '0490', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/report/account_report', '/report/AccountReport', '\0', '0610', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('208', '030103', '采购统计', '0301', '/report/buy_in_report', '/report/BuyInReport', '\0', '0620', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/report/sale_out_report', '/report/SaleOutReport', '\0', '0630', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/bill/retail_out', '/bill/RetailOutList', '\0', '0405', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/bill/retail_back', '/bill/RetailBackList', '\0', '0407', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/financial/advance_in', '/financial/AdvanceInList', '\0', '0495', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/system/customer', '/system/CustomerList', '\0', '0262', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/system/member', '/system/MemberList', '\0', '0263', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('220', '010103', '多单位', '0101', '/system/unit', '/system/UnitList', '\0', '0245', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '/billC', '/layouts/TabLayout', '\0', '0101', '', '电脑版', '', 'gift', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/report/in_detail', '/report/InDetail', '\0', '0640', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/report/out_detail', '/report/OutDetail', '\0', '0645', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/report/in_material_count', '/report/InMaterialCount', '\0', '0650', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/report/out_material_count', '/report/OutMaterialCount', '\0', '0655', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/bill/assemble', '/bill/AssembleList', '\0', '0809', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/bill/disassemble', '/bill/DisassembleList', '\0', '0811', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/system/system_config', '/system/SystemConfigList', '\0', '0164', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/report/customer_account', '/report/CustomerAccount', '\0', '0660', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/material/material_property', '/material/MaterialPropertyList', '\0', '0165', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/report/vendor_account', '/report/VendorAccount', '\0', '0665', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '/billD', '/layouts/TabLayout', '\0', '0420', '', '电脑版', '', 'hdd', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/bill/purchase_order', '/bill/PurchaseOrderList', '\0', '0335', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/bill/sale_order', '/bill/SaleOrderList', '\0', '0392', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/system/organization', '/system/OrganizationList', '', '0150', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/report/stock_warning_report', '/report/StockWarningReport', '\0', '0670', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('258', '000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('259', '030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', '\0', '0615', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('261', '050203', '请购单', '0502', '/bill/purchase_apply', '/bill/PurchaseApplyList', '\0', '0330', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_in_out_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_in_out_item`; | ||||||
|  | CREATE TABLE `jsh_in_out_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='收支项目'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_in_out_item | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('21', '快递费', '支出', '', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('22', '房租收入', '收入', '', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('23', '利息收入', '收入', '收入', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_log | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_log`; | ||||||
|  | CREATE TABLE `jsh_log` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', | ||||||
|  |   `operation` varchar(500) DEFAULT NULL COMMENT '操作模块名称', | ||||||
|  |   `client_ip` varchar(200) DEFAULT NULL COMMENT '客户端IP', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `status` tinyint(4) DEFAULT NULL COMMENT '操作状态 0==成功,1==失败', | ||||||
|  |   `content` varchar(5000) DEFAULT NULL COMMENT '详情', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FKF2696AA13E226853` (`user_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=7605 DEFAULT CHARSET=utf8 COMMENT='操作日志'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_log | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material`; | ||||||
|  | CREATE TABLE `jsh_material` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id', | ||||||
|  |   `name` varchar(100) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `mfrs` varchar(50) DEFAULT NULL COMMENT '制造商', | ||||||
|  |   `model` varchar(100) DEFAULT NULL COMMENT '型号', | ||||||
|  |   `standard` varchar(100) DEFAULT NULL COMMENT '规格', | ||||||
|  |   `brand` varchar(100) DEFAULT NULL COMMENT '品牌', | ||||||
|  |   `mnemonic` varchar(100) DEFAULT NULL COMMENT '助记码', | ||||||
|  |   `color` varchar(50) DEFAULT NULL COMMENT '颜色', | ||||||
|  |   `unit` varchar(50) DEFAULT NULL COMMENT '单位-单个', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `img_name` varchar(1000) DEFAULT NULL COMMENT '图片名称', | ||||||
|  |   `unit_id` bigint(20) DEFAULT NULL COMMENT '单位Id', | ||||||
|  |   `expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数', | ||||||
|  |   `weight` decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用  1-启用', | ||||||
|  |   `other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1', | ||||||
|  |   `other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2', | ||||||
|  |   `other_field3` varchar(50) DEFAULT NULL COMMENT '自定义3', | ||||||
|  |   `enable_serial_number` varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是', | ||||||
|  |   `enable_batch_number` varchar(1) DEFAULT '0' COMMENT '是否开启批号,0否,1是', | ||||||
|  |   `position` varchar(100) DEFAULT NULL COMMENT '仓位货架', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK675951272AB6672C` (`category_id`), | ||||||
|  |   KEY `UnitId` (`unit_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=620 DEFAULT CHARSET=utf8 COMMENT='产品表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', 'sp1', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', 'sp2', '', null, null, '', '只', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', 'sp3', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', 'sp8', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', 'sp17', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', 'xlh123', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '1', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', '', 'test1', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', 'weqwe', '300ml', null, null, '红色', '个', 'aaaabbbbb', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, null, null, '件', null, '', null, null, null, '', null, null, null, '0', '0', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_attribute | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_attribute`; | ||||||
|  | CREATE TABLE `jsh_material_attribute` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT, | ||||||
|  |   `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名', | ||||||
|  |   `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_attribute | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('1', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('2', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('3', '自定义1', '小米|华为', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('4', '自定义2', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('5', '自定义3', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_category | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_category`; | ||||||
|  | CREATE TABLE `jsh_material_category` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `category_level` smallint(6) DEFAULT NULL COMMENT '等级', | ||||||
|  |   `parent_id` bigint(20) DEFAULT NULL COMMENT '上级id', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '显示顺序', | ||||||
|  |   `serial_no` varchar(100) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `remark` varchar(1024) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK3EE7F725237A77D8` (`parent_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='产品类型表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_category | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_category` VALUES ('17', '目录1', null, null, '11', 'wae12', 'eee', '2019-04-10 22:18:12', '2021-02-17 15:11:35', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_category` VALUES ('21', '目录2', null, '17', '22', 'ada112', 'ddd', '2020-07-20 23:08:44', '2020-07-20 23:08:44', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_current_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_current_stock`; | ||||||
|  | CREATE TABLE `jsh_material_current_stock` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `current_number` decimal(24,6) DEFAULT NULL COMMENT '当前库存数量', | ||||||
|  |   `current_unit_price` decimal(24,6) DEFAULT NULL COMMENT '当前单价', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品当前库存'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_current_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_extend | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_extend`; | ||||||
|  | CREATE TABLE `jsh_material_extend` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '商品id', | ||||||
|  |   `bar_code` varchar(50) DEFAULT NULL COMMENT '商品条码', | ||||||
|  |   `commodity_unit` varchar(50) DEFAULT NULL COMMENT '商品单位', | ||||||
|  |   `sku` varchar(50) DEFAULT NULL COMMENT '多属性', | ||||||
|  |   `purchase_decimal` decimal(24,6) DEFAULT NULL COMMENT '采购价格', | ||||||
|  |   `commodity_decimal` decimal(24,6) DEFAULT NULL COMMENT '零售价格', | ||||||
|  |   `wholesale_decimal` decimal(24,6) DEFAULT NULL COMMENT '销售价格', | ||||||
|  |   `low_decimal` decimal(24,6) DEFAULT NULL COMMENT '最低售价', | ||||||
|  |   `default_flag` varchar(1) DEFAULT '1' COMMENT '是否为默认单位,1是,0否', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建日期', | ||||||
|  |   `create_serial` varchar(50) DEFAULT NULL COMMENT '创建人编码', | ||||||
|  |   `update_serial` varchar(50) DEFAULT NULL COMMENT '更新人编码', | ||||||
|  |   `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间戳', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品价格扩展'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_extend | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('1', '587', '1000', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-02-20 23:22:03', 'jsh', 'jsh', '1595263657135', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', null, '11.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:44:57', 'jsh', 'jsh', '1595265439418', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('3', '569', '1002', '只', null, '10.000000', '15.000000', '15.000000', '13.000000', '1', '2020-02-20 23:45:15', 'jsh', 'jsh', '1582213514731', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('4', '570', '1003', '个', null, '8.000000', '15.000000', '14.000000', '13.000000', '1', '2020-02-20 23:45:37', 'jsh', 'jsh', '1587657604430', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('5', '577', '1004', '个', null, '10.000000', '20.000000', '20.000000', '20.000000', '1', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596494', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('6', '577', '1005', '箱', null, '120.000000', '240.000000', '240.000000', '240.000000', '0', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596497', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('7', '579', '1006', '个', null, '20.000000', '30.000000', '30.000000', '30.000000', '1', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270458', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('8', '579', '1007', '箱', null, '240.000000', '360.000000', '360.000000', '360.000000', '0', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270466', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('9', '586', '1008', '个', null, '12.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:47:23', 'jsh', 'jsh', '1595254981896', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('10', '588', '1009', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-07-21 00:58:15', 'jsh', 'jsh', '1614699799073', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('36', '619', '1014', '件', '橙色,M', '12.000000', '15.000000', '14.000000', null, '1', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220316', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('37', '619', '1015', '件', '橙色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220327', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('38', '619', '1016', '件', '绿色,M', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220336', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('39', '619', '1017', '件', '绿色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220346', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_initial_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_initial_stock`; | ||||||
|  | CREATE TABLE `jsh_material_initial_stock` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量', | ||||||
|  |   `low_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最低库存数量', | ||||||
|  |   `high_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最高库存数量', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品初始库存'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_initial_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_property | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_property`; | ||||||
|  | CREATE TABLE `jsh_material_property` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `native_name` varchar(50) DEFAULT NULL COMMENT '原始名称', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '是否启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `another_name` varchar(50) DEFAULT NULL COMMENT '别名', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品扩展字段表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_property | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_msg | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_msg`; | ||||||
|  | CREATE TABLE `jsh_msg` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `msg_title` varchar(100) DEFAULT NULL COMMENT '消息标题', | ||||||
|  |   `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '消息类型', | ||||||
|  |   `user_id` bigint(20) DEFAULT NULL COMMENT '接收人id', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='消息表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_msg | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '63', '2', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_organization | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_organization`; | ||||||
|  | CREATE TABLE `jsh_organization` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号', | ||||||
|  |   `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称', | ||||||
|  |   `parent_id` bigint(20) DEFAULT NULL COMMENT '父机构id', | ||||||
|  |   `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='机构表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_organization | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('12', '001', '测试机构', null, '2', 'aaaa2', '2019-12-28 12:13:01', '2019-12-28 12:13:01', '63', '0'); | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('13', 'jg1', '机构1', '12', '3', '', '2020-07-21 00:09:57', '2020-07-21 00:10:22', '63', '0'); | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('14', '12', '机构2', '13', '4', '', '2020-07-21 22:45:42', '2021-02-15 22:18:30', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_orga_user_rel | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_orga_user_rel`; | ||||||
|  | CREATE TABLE `jsh_orga_user_rel` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `orga_id` bigint(20) NOT NULL COMMENT '机构id', | ||||||
|  |   `user_id` bigint(20) NOT NULL COMMENT '用户id', | ||||||
|  |   `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序', | ||||||
|  |   `delete_flag` char(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '创建人', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `updater` bigint(20) DEFAULT NULL COMMENT '更新人', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_orga_user_rel | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2021-03-18 22:33:19', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '15', '0', '2020-09-13 18:42:45', '63', '2021-03-19 00:11:40', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('12', '13', '135', '9', '0', '2021-03-18 22:24:25', '63', '2021-03-19 00:09:23', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('13', '13', '134', '1', '0', '2021-03-18 22:31:39', '63', '2021-03-18 23:59:55', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('14', '22', '133', '22', '0', '2021-03-18 22:31:44', '63', '2021-03-18 22:32:04', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('15', '12', '144', null, '0', '2021-03-19 00:00:40', '63', '2021-03-19 00:08:07', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('16', '12', '145', null, '0', '2021-03-19 00:03:44', '63', '2021-03-19 00:03:44', '63', '63'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_person | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_person`; | ||||||
|  | CREATE TABLE `jsh_person` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '姓名', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='经手人表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_person | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_person` VALUES ('14', '销售员', '小李', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('15', '仓管员', '小军', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('16', '财务员', '小夏', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('17', '财务员', '小曹', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_platform_config | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_platform_config`; | ||||||
|  | CREATE TABLE `jsh_platform_config` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT, | ||||||
|  |   `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词', | ||||||
|  |   `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称', | ||||||
|  |   `platform_value` varchar(200) DEFAULT NULL COMMENT '值', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='平台参数'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_platform_config | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '管伊佳ERP'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('3', 'platform_url', '官方网站', 'http://www.gyjerp.com/'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('5', 'bill_print_url', '三联打印地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('6', 'pay_fee_url', '租户续费地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('7', 'register_flag', '注册启用标记', '1'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('9', 'send_workflow_url', '发起流程地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('10', 'weixinUrl', '微信url', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('11', 'weixinAppid', '微信appid', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('12', 'weixinSecret', '微信secret', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('13', 'aliOss_endpoint', '阿里OSS-endpoint', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('14', 'aliOss_accessKeyId', '阿里OSS-accessKeyId', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('15', 'aliOss_accessKeySecret', '阿里OSS-accessKeySecret', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('16', 'aliOss_bucketName', '阿里OSS-bucketName', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('17', 'aliOss_linkUrl', '阿里OSS-linkUrl', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('18', 'bill_excel_url', '单据Excel地址', ''); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_role | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_role`; | ||||||
|  | CREATE TABLE `jsh_role` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `price_limit` varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价', | ||||||
|  |   `value` varchar(200) DEFAULT NULL COMMENT '值', | ||||||
|  |   `description` varchar(100) DEFAULT NULL COMMENT '描述', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='角色表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_role | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_role` VALUES ('4', '管理员', '全部数据', null, null, null, '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('10', '租户', '全部数据', null, null, '', '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('16', '销售经理', '全部数据', null, null, 'ddd', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('17', '销售代表', '个人数据', null, null, 'rrr', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_sequence | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_sequence`; | ||||||
|  | CREATE TABLE `jsh_sequence` ( | ||||||
|  |   `seq_name` varchar(50) NOT NULL COMMENT '序列名称', | ||||||
|  |   `min_value` bigint(20) NOT NULL COMMENT '最小值', | ||||||
|  |   `max_value` bigint(20) NOT NULL COMMENT '最大值', | ||||||
|  |   `current_val` bigint(20) NOT NULL COMMENT '当前值', | ||||||
|  |   `increment_val` int(11) NOT NULL DEFAULT '1' COMMENT '增长步数', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   PRIMARY KEY (`seq_name`) | ||||||
|  | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='单据编号表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_sequence | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '672', '1', '单据编号sequence'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_serial_number | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_serial_number`; | ||||||
|  | CREATE TABLE `jsh_serial_number` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品表id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `serial_number` varchar(64) DEFAULT NULL COMMENT '序列号', | ||||||
|  |   `is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出', | ||||||
|  |   `in_price` decimal(24,6) DEFAULT NULL COMMENT '入库单价', | ||||||
|  |   `remark` varchar(1024) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '创建人', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `updater` bigint(20) DEFAULT NULL COMMENT '更新人', | ||||||
|  |   `in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号', | ||||||
|  |   `out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_serial_number | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_supplier | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_supplier`; | ||||||
|  | CREATE TABLE `jsh_supplier` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `supplier` varchar(255) NOT NULL COMMENT '供应商名称', | ||||||
|  |   `contacts` varchar(100) DEFAULT NULL COMMENT '联系人', | ||||||
|  |   `phone_num` varchar(30) DEFAULT NULL COMMENT '联系电话', | ||||||
|  |   `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', | ||||||
|  |   `description` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `isystem` tinyint(4) DEFAULT NULL COMMENT '是否系统自带 0==系统 1==非系统', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `advance_in` decimal(24,6) DEFAULT '0.000000' COMMENT '预收款', | ||||||
|  |   `begin_need_get` decimal(24,6) DEFAULT NULL COMMENT '期初应收', | ||||||
|  |   `begin_need_pay` decimal(24,6) DEFAULT NULL COMMENT '期初应付', | ||||||
|  |   `all_need_get` decimal(24,6) DEFAULT NULL COMMENT '累计应收', | ||||||
|  |   `all_need_pay` decimal(24,6) DEFAULT NULL COMMENT '累计应付', | ||||||
|  |   `fax` varchar(30) DEFAULT NULL COMMENT '传真', | ||||||
|  |   `telephone` varchar(30) DEFAULT NULL COMMENT '手机', | ||||||
|  |   `address` varchar(100) DEFAULT NULL COMMENT '地址', | ||||||
|  |   `tax_num` varchar(50) DEFAULT NULL COMMENT '纳税人识别号', | ||||||
|  |   `bank_name` varchar(50) DEFAULT NULL COMMENT '开户行', | ||||||
|  |   `account_number` varchar(50) DEFAULT NULL COMMENT '账号', | ||||||
|  |   `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COMMENT='供应商/客户信息表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_supplier | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('57', '供应商1', '小军', '12345678', '', '', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '4.000000', '', '15000000000', '地址1', '', '', '', '12.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('58', '客户1', '小李', '12345678', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '-100.000000', null, '', '', '', '', '', '', '12.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('59', '客户2', '小陈', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('60', '12312666', '小曹', '', '', '', null, '会员', '', '970.000000', '0.000000', '0.000000', null, null, '', '13000000000', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('68', '供应商3', '晓丽', '12345678', '', 'fasdfadf', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '-35.000000', '', '13000000000', 'aaaa', '1341324', '', '', '13.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('71', '客户3', '小周', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('74', '供应商5', '小季', '77779999', '', '', null, '供应商', '', '0.000000', '0.000000', '5.000000', '0.000000', '5.000000', '', '15806283912', '', '', '', '', '3.000000', null, '63', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_system_config | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_system_config`; | ||||||
|  | CREATE TABLE `jsh_system_config` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `company_name` varchar(50) DEFAULT NULL COMMENT '公司名称', | ||||||
|  |   `company_contacts` varchar(20) DEFAULT NULL COMMENT '公司联系人', | ||||||
|  |   `company_address` varchar(50) DEFAULT NULL COMMENT '公司地址', | ||||||
|  |   `company_tel` varchar(20) DEFAULT NULL COMMENT '公司电话', | ||||||
|  |   `company_fax` varchar(20) DEFAULT NULL COMMENT '公司传真', | ||||||
|  |   `company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编', | ||||||
|  |   `sale_agreement` varchar(500) DEFAULT NULL COMMENT '销售协议', | ||||||
|  |   `depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用', | ||||||
|  |   `customer_flag` varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用', | ||||||
|  |   `minus_stock_flag` varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用', | ||||||
|  |   `purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用', | ||||||
|  |   `multi_level_approval_flag` varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用', | ||||||
|  |   `multi_bill_type` varchar(200) DEFAULT NULL COMMENT '流程类型,可多选', | ||||||
|  |   `force_approval_flag` varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用', | ||||||
|  |   `update_unit_price_flag` varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用', | ||||||
|  |   `over_link_bill_flag` varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用', | ||||||
|  |   `in_out_manage_flag` varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用', | ||||||
|  |   `multi_account_flag` varchar(1) DEFAULT '0' COMMENT '多账户启用标记,0未启用,1启用', | ||||||
|  |   `move_avg_price_flag` varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记,0未启用,1启用', | ||||||
|  |   `audit_print_flag` varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统参数'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_system_config | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '0', '0', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_tenant | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_tenant`; | ||||||
|  | CREATE TABLE `jsh_tenant` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id', | ||||||
|  |   `login_name` varchar(255) DEFAULT NULL COMMENT '登录名', | ||||||
|  |   `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制', | ||||||
|  |   `type` varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户', | ||||||
|  |   `enabled` bit(1) DEFAULT b'1' COMMENT '启用 0-禁用  1-启用', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `expire_time` datetime DEFAULT NULL COMMENT '到期时间', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='租户'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_tenant | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '2000', '1', '', '2021-02-17 23:19:17', '2099-02-17 23:19:17', null, '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_unit | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_unit`; | ||||||
|  | CREATE TABLE `jsh_unit` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称,支持多单位', | ||||||
|  |   `basic_unit` varchar(50) DEFAULT NULL COMMENT '基础单位', | ||||||
|  |   `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位', | ||||||
|  |   `other_unit_two` varchar(50) DEFAULT NULL COMMENT '副单位2', | ||||||
|  |   `other_unit_three` varchar(50) DEFAULT NULL COMMENT '副单位3', | ||||||
|  |   `ratio` decimal(24,3) DEFAULT NULL COMMENT '比例', | ||||||
|  |   `ratio_two` decimal(24,3) DEFAULT NULL COMMENT '比例2', | ||||||
|  |   `ratio_three` decimal(24,3) DEFAULT NULL COMMENT '比例3', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='多单位表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_unit | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12.000', null, null, '', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_user | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_user`; | ||||||
|  | CREATE TABLE `jsh_user` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `username` varchar(255) NOT NULL COMMENT '用户姓名--例如张三', | ||||||
|  |   `login_name` varchar(255) NOT NULL COMMENT '登录用户名', | ||||||
|  |   `password` varchar(50) DEFAULT NULL COMMENT '登陆密码', | ||||||
|  |   `leader_flag` varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是', | ||||||
|  |   `position` varchar(200) DEFAULT NULL COMMENT '职位', | ||||||
|  |   `department` varchar(255) DEFAULT NULL COMMENT '所属部门', | ||||||
|  |   `email` varchar(100) DEFAULT NULL COMMENT '电子邮箱', | ||||||
|  |   `phonenum` varchar(100) DEFAULT NULL COMMENT '手机号码', | ||||||
|  |   `ismanager` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否为管理者 0==管理者 1==员工', | ||||||
|  |   `isystem` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否系统自带数据 ', | ||||||
|  |   `status` tinyint(4) DEFAULT '0' COMMENT '状态,0正常,2封禁', | ||||||
|  |   `description` varchar(500) DEFAULT NULL COMMENT '用户描述信息', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `weixin_open_id` varchar(100) DEFAULT NULL COMMENT '微信绑定', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 COMMENT='用户表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_user | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_user` VALUES ('63', '测试用户', 'jsh', 'e10adc3949ba59abbe56e057f20f883e', '0', '主管', null, '666666@qq.com', '1123123123132', '1', '1', '0', '', null, null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user` VALUES ('120', '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '0', null, null, null, null, '1', '0', '0', null, null, null, '0', '0'); | ||||||
|  | INSERT INTO `jsh_user` VALUES ('131', 'test123', 'test123', 'e10adc3949ba59abbe56e057f20f883e', '0', '总监', null, '7777777@qq.com', '', '1', '0', '0', '', null, null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_user_business | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_user_business`; | ||||||
|  | CREATE TABLE `jsh_user_business` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类别', | ||||||
|  |   `key_id` varchar(50) DEFAULT NULL COMMENT '主id', | ||||||
|  |   `value` varchar(10000) DEFAULT NULL COMMENT '值', | ||||||
|  |   `btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_user_business | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][225][211][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][258][261][32]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":16,\"btnStr\":\"1\"},{\"funId\":18,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":245,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,2,7,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,7,2,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,7,2,3\"},{\"funId\":206,\"btnStr\":\"1,2,7,3\"},{\"funId\":212,\"btnStr\":\"1,7,2,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('6', 'RoleFunctions', '5', '[22][23][25][26][194][195][31][33][200][201][41][199][202]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('7', 'RoleFunctions', '6', '[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"33\",\"btnStr\":\"4\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('10', 'RoleFunctions', '8', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('11', 'RoleFunctions', '9', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('12', 'UserRole', '1', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('13', 'UserRole', '2', '[6][7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('14', 'UserDepot', '2', '[1][2][6][7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('15', 'UserDepot', '1', '[1][2][5][6][7][10][12][14][15][17]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('16', 'UserRole', '63', '[10]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('18', 'UserDepot', '63', '[14][15]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('19', 'UserDepot', '5', '[6][45][46][50]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('20', 'UserRole', '5', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('21', 'UserRole', '64', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('22', 'UserDepot', '64', '[1]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('23', 'UserRole', '65', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('24', 'UserDepot', '65', '[1]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('25', 'UserCustomer', '64', '[5][2]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('26', 'UserCustomer', '65', '[6]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('27', 'UserCustomer', '63', '[58]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][225][211][261][32][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][14][243][15][234][236]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,7,2,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,2,7,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,2,7,3\"},{\"funId\":206,\"btnStr\":\"1,7,2,3\"},{\"funId\":212,\"btnStr\":\"1,2,7,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('37', 'UserCustomer', '117', '[52]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('38', 'UserRole', '120', '[4]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('41', 'RoleFunctions', '12', '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('48', 'RoleFunctions', '13', '[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('51', 'UserRole', '74', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('52', 'UserDepot', '121', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('54', 'UserDepot', '115', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('56', 'UserCustomer', '115', '[56]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('57', 'UserCustomer', '121', '[56]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212]', '[{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '63', '0'); | ||||||
							
								
								
									
										1653
									
								
								jshERP-boot/dist/jshERP/docs/数据库更新记录-首次安装请勿使用.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1653
									
								
								jshERP-boot/dist/jshERP/docs/数据库更新记录-首次安装请勿使用.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								jshERP-boot/dist/jshERP/docs/管伊佳ERP数据库设计汇总.xlsx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								jshERP-boot/dist/jshERP/docs/管伊佳ERP数据库设计汇总.xlsx
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										1
									
								
								jshERP-boot/dist/jshERP/restart.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/dist/jshERP/restart.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh restart | ||||||
							
								
								
									
										6
									
								
								jshERP-boot/dist/jshERP/start.bat
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								jshERP-boot/dist/jshERP/start.bat
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | @echo off | ||||||
|  | 
 | ||||||
|  | title jshERP | ||||||
|  | 
 | ||||||
|  | java -Xms1000m -Xmx2000m -jar .\lib\jshERP.jar | ||||||
|  | pause over | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/dist/jshERP/start.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/dist/jshERP/start.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh start | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/dist/jshERP/status.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/dist/jshERP/status.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh status | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/dist/jshERP/stop.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/dist/jshERP/stop.sh
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh stop | ||||||
							
								
								
									
										977
									
								
								jshERP-boot/docs/jsh_erp.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										977
									
								
								jshERP-boot/docs/jsh_erp.sql
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,977 @@ | |||||||
|  | /* | ||||||
|  | Navicat MySQL Data Transfer | ||||||
|  | 
 | ||||||
|  | Source Server         : 127.0.0.1 | ||||||
|  | Source Server Version : 50704 | ||||||
|  | Source Host           : 127.0.0.1:3306 | ||||||
|  | Source Database       : jsh_erp | ||||||
|  | 
 | ||||||
|  | Target Server Type    : MYSQL | ||||||
|  | Target Server Version : 50704 | ||||||
|  | File Encoding         : 65001 | ||||||
|  | 
 | ||||||
|  | Date: 2025-03-25 23:43:27 | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | SET FOREIGN_KEY_CHECKS=0; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account`; | ||||||
|  | CREATE TABLE `jsh_account` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `serial_no` varchar(50) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `initial_amount` decimal(24,6) DEFAULT NULL COMMENT '期初金额', | ||||||
|  |   `current_amount` decimal(24,6) DEFAULT NULL COMMENT '当前余额', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `is_default` bit(1) DEFAULT NULL COMMENT '是否默认', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='账户信息'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_account` VALUES ('17', '账户1', 'zzz111', '100.000000', '829.000000', 'aabb', '', null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_account` VALUES ('18', '账户2', '1234131324', '200.000000', '-1681.000000', 'bbbb', '', null, '\0', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account_head | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account_head`; | ||||||
|  | CREATE TABLE `jsh_account_head` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)', | ||||||
|  |   `organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)', | ||||||
|  |   `hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)', | ||||||
|  |   `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额', | ||||||
|  |   `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)', | ||||||
|  |   `bill_no` varchar(50) DEFAULT NULL COMMENT '单据编号', | ||||||
|  |   `bill_time` datetime DEFAULT NULL COMMENT '单据日期', | ||||||
|  |   `remark` varchar(1000) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `file_name` varchar(500) DEFAULT NULL COMMENT '附件名称', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、9审核中', | ||||||
|  |   `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK9F4C0D8DB610FC06` (`organ_id`), | ||||||
|  |   KEY `FK9F4C0D8DAAE50527` (`account_id`), | ||||||
|  |   KEY `FK9F4C0D8DC4170B37` (`hands_person_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COMMENT='财务主表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account_head | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_account_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_account_item`; | ||||||
|  | CREATE TABLE `jsh_account_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `header_id` bigint(20) NOT NULL COMMENT '表头Id', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户Id', | ||||||
|  |   `in_out_item_id` bigint(20) DEFAULT NULL COMMENT '收支项目Id', | ||||||
|  |   `bill_id` bigint(20) DEFAULT NULL COMMENT '单据id', | ||||||
|  |   `need_debt` decimal(24,6) DEFAULT NULL COMMENT '应收欠款', | ||||||
|  |   `finish_debt` decimal(24,6) DEFAULT NULL COMMENT '已收欠款', | ||||||
|  |   `each_amount` decimal(24,6) DEFAULT NULL COMMENT '单项金额', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '单据备注', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK9F4CBAC0AAE50527` (`account_id`), | ||||||
|  |   KEY `FK9F4CBAC0C5FE6007` (`header_id`), | ||||||
|  |   KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COMMENT='财务子表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_account_item | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot`; | ||||||
|  | CREATE TABLE `jsh_depot` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(20) DEFAULT NULL COMMENT '仓库名称', | ||||||
|  |   `address` varchar(50) DEFAULT NULL COMMENT '仓库地址', | ||||||
|  |   `warehousing` decimal(24,6) DEFAULT NULL COMMENT '仓储费', | ||||||
|  |   `truckage` decimal(24,6) DEFAULT NULL COMMENT '搬运费', | ||||||
|  |   `type` int(10) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '描述', | ||||||
|  |   `principal` bigint(20) DEFAULT NULL COMMENT '负责人', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   `is_default` bit(1) DEFAULT NULL COMMENT '是否默认', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='仓库表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('14', '仓库1', 'dizhi', '12.000000', '12.000000', '0', '1', '描述', '131', '', '63', '0', ''); | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('15', '仓库2', '地址100', '555.000000', '666.000000', '0', '2', 'dfdf', '131', '', '63', '0', '\0'); | ||||||
|  | INSERT INTO `jsh_depot` VALUES ('17', '仓库3', '123123', '123.000000', '123.000000', '0', '3', '123', '131', '', '63', '0', '\0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot_head | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot_head`; | ||||||
|  | CREATE TABLE `jsh_depot_head` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)', | ||||||
|  |   `sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类', | ||||||
|  |   `default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号', | ||||||
|  |   `number` varchar(50) DEFAULT NULL COMMENT '票据号', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `oper_time` datetime DEFAULT NULL COMMENT '出入库时间', | ||||||
|  |   `organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `account_id` bigint(20) DEFAULT NULL COMMENT '账户id', | ||||||
|  |   `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)', | ||||||
|  |   `back_amount` decimal(24,6) DEFAULT NULL COMMENT '找零金额', | ||||||
|  |   `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额', | ||||||
|  |   `pay_type` varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)', | ||||||
|  |   `bill_type` varchar(50) DEFAULT NULL COMMENT '单据类型', | ||||||
|  |   `remark` varchar(1000) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `file_name` varchar(1000) DEFAULT NULL COMMENT '附件名称', | ||||||
|  |   `sales_man` varchar(50) DEFAULT NULL COMMENT '销售员(可以多个)', | ||||||
|  |   `account_id_list` varchar(50) DEFAULT NULL COMMENT '多账户ID列表', | ||||||
|  |   `account_money_list` varchar(200) DEFAULT NULL COMMENT '多账户金额列表', | ||||||
|  |   `discount` decimal(24,6) DEFAULT NULL COMMENT '优惠率', | ||||||
|  |   `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额', | ||||||
|  |   `discount_last_money` decimal(24,6) DEFAULT NULL COMMENT '优惠后金额', | ||||||
|  |   `other_money` decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计', | ||||||
|  |   `deposit` decimal(24,6) DEFAULT NULL COMMENT '订金', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中', | ||||||
|  |   `purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购', | ||||||
|  |   `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机', | ||||||
|  |   `link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号', | ||||||
|  |   `link_apply` varchar(50) DEFAULT NULL COMMENT '关联请购单', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK2A80F214B610FC06` (`organ_id`), | ||||||
|  |   KEY `FK2A80F214AAE50527` (`account_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=277 DEFAULT CHARSET=utf8 COMMENT='单据主表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot_head | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_depot_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_depot_item`; | ||||||
|  | CREATE TABLE `jsh_depot_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `header_id` bigint(20) NOT NULL COMMENT '表头Id', | ||||||
|  |   `material_id` bigint(20) NOT NULL COMMENT '商品Id', | ||||||
|  |   `material_extend_id` bigint(20) DEFAULT NULL COMMENT '商品扩展id', | ||||||
|  |   `material_unit` varchar(20) DEFAULT NULL COMMENT '商品单位', | ||||||
|  |   `sku` varchar(50) DEFAULT NULL COMMENT '多属性', | ||||||
|  |   `oper_number` decimal(24,6) DEFAULT NULL COMMENT '数量', | ||||||
|  |   `basic_number` decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶', | ||||||
|  |   `unit_price` decimal(24,6) DEFAULT NULL COMMENT '单价', | ||||||
|  |   `purchase_unit_price` decimal(24,6) DEFAULT NULL COMMENT '采购单价', | ||||||
|  |   `tax_unit_price` decimal(24,6) DEFAULT NULL COMMENT '含税单价', | ||||||
|  |   `all_price` decimal(24,6) DEFAULT NULL COMMENT '金额', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库ID', | ||||||
|  |   `another_depot_id` bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id', | ||||||
|  |   `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率', | ||||||
|  |   `tax_money` decimal(24,6) DEFAULT NULL COMMENT '税额', | ||||||
|  |   `tax_last_money` decimal(24,6) DEFAULT NULL COMMENT '价税合计', | ||||||
|  |   `material_type` varchar(20) DEFAULT NULL COMMENT '商品类型', | ||||||
|  |   `sn_list` varchar(2000) DEFAULT NULL COMMENT '序列号列表', | ||||||
|  |   `batch_number` varchar(100) DEFAULT NULL COMMENT '批号', | ||||||
|  |   `expiration_date` datetime DEFAULT NULL COMMENT '有效日期', | ||||||
|  |   `link_id` bigint(20) DEFAULT NULL COMMENT '关联明细id', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK2A819F475D61CCF7` (`material_id`), | ||||||
|  |   KEY `FK2A819F474BB6190E` (`header_id`), | ||||||
|  |   KEY `FK2A819F479485B3F5` (`depot_id`), | ||||||
|  |   KEY `FK2A819F47729F5392` (`another_depot_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=334 DEFAULT CHARSET=utf8 COMMENT='单据子表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_depot_item | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_function | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_function`; | ||||||
|  | CREATE TABLE `jsh_function` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `number` varchar(50) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `parent_number` varchar(50) DEFAULT NULL COMMENT '上级编号', | ||||||
|  |   `url` varchar(100) DEFAULT NULL COMMENT '链接', | ||||||
|  |   `component` varchar(100) DEFAULT NULL COMMENT '组件', | ||||||
|  |   `state` bit(1) DEFAULT NULL COMMENT '收缩', | ||||||
|  |   `sort` varchar(50) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `push_btn` varchar(50) DEFAULT NULL COMMENT '功能按钮', | ||||||
|  |   `icon` varchar(50) DEFAULT NULL COMMENT '图标', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   UNIQUE KEY `url` (`url`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8 COMMENT='功能模块表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_function | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '/system', '/layouts/TabLayout', '', '0910', '', '电脑版', '', 'setting', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/system/role', '/system/RoleList', '\0', '0130', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/system/user', '/system/UserList', '\0', '0140', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/system/log', '/system/LogList', '\0', '0160', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/system/function', '/system/FunctionList', '\0', '0166', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', '\0', '0167', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '/material', '/layouts/TabLayout', '\0', '0620', '', '电脑版', null, 'shopping', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/material/material_category', '/material/MaterialCategoryList', '\0', '0230', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/material/material', '/material/MaterialList', '\0', '0240', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '/systemA', '/layouts/TabLayout', '\0', '0750', '', '电脑版', null, 'appstore', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/system/vendor', '/system/VendorList', '\0', '0260', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/system/depot', '/system/DepotList', '\0', '0270', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/system/person', '/system/PersonList', '\0', '0284', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '/bill', '/layouts/TabLayout', '\0', '0330', '', '电脑版', '', 'retweet', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/bill/purchase_in', '/bill/PurchaseInList', '\0', '0340', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '/billB', '/layouts/TabLayout', '\0', '0390', '', '电脑版', '', 'shopping-cart', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/bill/allocation_out', '/bill/AllocationOutList', '\0', '0807', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/bill/sale_out', '/bill/SaleOutList', '\0', '0394', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '/financial', '/layouts/TabLayout', '\0', '0450', '', '电脑版', '', 'money-collect', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('59', '030101', '进销存统计', '0301', '/report/in_out_stock_report', '/report/InOutStockReport', '\0', '0658', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/system/in_out_item', '/system/InOutItemList', '\0', '0282', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/system/account', '/system/AccountList', '\0', '0283', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/financial/item_in', '/financial/ItemInList', '\0', '0465', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '/report', '/layouts/TabLayout', '\0', '0570', '', '电脑版', null, 'pie-chart', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/bill/purchase_back', '/bill/PurchaseBackList', '\0', '0345', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/bill/sale_back', '/bill/SaleBackList', '\0', '0396', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/bill/other_in', '/bill/OtherInList', '\0', '0803', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/bill/other_out', '/bill/OtherOutList', '\0', '0805', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/financial/item_out', '/financial/ItemOutList', '\0', '0470', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/financial/money_in', '/financial/MoneyInList', '\0', '0475', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/financial/money_out', '/financial/MoneyOutList', '\0', '0480', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/financial/giro', '/financial/GiroList', '\0', '0490', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/report/account_report', '/report/AccountReport', '\0', '0610', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('208', '030103', '采购统计', '0301', '/report/buy_in_report', '/report/BuyInReport', '\0', '0620', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/report/sale_out_report', '/report/SaleOutReport', '\0', '0630', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/bill/retail_out', '/bill/RetailOutList', '\0', '0405', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/bill/retail_back', '/bill/RetailBackList', '\0', '0407', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/financial/advance_in', '/financial/AdvanceInList', '\0', '0495', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/system/customer', '/system/CustomerList', '\0', '0262', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/system/member', '/system/MemberList', '\0', '0263', '', '电脑版', '1,3', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('220', '010103', '多单位', '0101', '/system/unit', '/system/UnitList', '\0', '0245', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '/billC', '/layouts/TabLayout', '\0', '0101', '', '电脑版', '', 'gift', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/report/in_detail', '/report/InDetail', '\0', '0640', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/report/out_detail', '/report/OutDetail', '\0', '0645', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/report/in_material_count', '/report/InMaterialCount', '\0', '0650', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/report/out_material_count', '/report/OutMaterialCount', '\0', '0655', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/bill/assemble', '/bill/AssembleList', '\0', '0809', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/bill/disassemble', '/bill/DisassembleList', '\0', '0811', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/system/system_config', '/system/SystemConfigList', '\0', '0164', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/report/customer_account', '/report/CustomerAccount', '\0', '0660', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/material/material_property', '/material/MaterialPropertyList', '\0', '0165', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/report/vendor_account', '/report/VendorAccount', '\0', '0665', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '/billD', '/layouts/TabLayout', '\0', '0420', '', '电脑版', '', 'hdd', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/bill/purchase_order', '/bill/PurchaseOrderList', '\0', '0335', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/bill/sale_order', '/bill/SaleOrderList', '\0', '0392', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/system/organization', '/system/OrganizationList', '', '0150', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/report/stock_warning_report', '/report/StockWarningReport', '\0', '0670', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('258', '000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('259', '030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', '\0', '0615', '', '电脑版', '', 'profile', '0'); | ||||||
|  | INSERT INTO `jsh_function` VALUES ('261', '050203', '请购单', '0502', '/bill/purchase_apply', '/bill/PurchaseApplyList', '\0', '0330', '', '电脑版', '1,2,3,7', 'profile', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_in_out_item | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_in_out_item`; | ||||||
|  | CREATE TABLE `jsh_in_out_item` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `remark` varchar(100) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='收支项目'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_in_out_item | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('21', '快递费', '支出', '', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('22', '房租收入', '收入', '', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_in_out_item` VALUES ('23', '利息收入', '收入', '收入', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_log | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_log`; | ||||||
|  | CREATE TABLE `jsh_log` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', | ||||||
|  |   `operation` varchar(500) DEFAULT NULL COMMENT '操作模块名称', | ||||||
|  |   `client_ip` varchar(200) DEFAULT NULL COMMENT '客户端IP', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `status` tinyint(4) DEFAULT NULL COMMENT '操作状态 0==成功,1==失败', | ||||||
|  |   `content` varchar(5000) DEFAULT NULL COMMENT '详情', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FKF2696AA13E226853` (`user_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=7605 DEFAULT CHARSET=utf8 COMMENT='操作日志'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_log | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material`; | ||||||
|  | CREATE TABLE `jsh_material` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id', | ||||||
|  |   `name` varchar(100) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `mfrs` varchar(50) DEFAULT NULL COMMENT '制造商', | ||||||
|  |   `model` varchar(100) DEFAULT NULL COMMENT '型号', | ||||||
|  |   `standard` varchar(100) DEFAULT NULL COMMENT '规格', | ||||||
|  |   `brand` varchar(100) DEFAULT NULL COMMENT '品牌', | ||||||
|  |   `mnemonic` varchar(100) DEFAULT NULL COMMENT '助记码', | ||||||
|  |   `color` varchar(50) DEFAULT NULL COMMENT '颜色', | ||||||
|  |   `unit` varchar(50) DEFAULT NULL COMMENT '单位-单个', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `img_name` varchar(1000) DEFAULT NULL COMMENT '图片名称', | ||||||
|  |   `unit_id` bigint(20) DEFAULT NULL COMMENT '单位Id', | ||||||
|  |   `expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数', | ||||||
|  |   `weight` decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用  1-启用', | ||||||
|  |   `other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1', | ||||||
|  |   `other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2', | ||||||
|  |   `other_field3` varchar(50) DEFAULT NULL COMMENT '自定义3', | ||||||
|  |   `enable_serial_number` varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是', | ||||||
|  |   `enable_batch_number` varchar(1) DEFAULT '0' COMMENT '是否开启批号,0否,1是', | ||||||
|  |   `position` varchar(100) DEFAULT NULL COMMENT '仓位货架', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK675951272AB6672C` (`category_id`), | ||||||
|  |   KEY `UnitId` (`unit_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=620 DEFAULT CHARSET=utf8 COMMENT='产品表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', 'sp1', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', 'sp2', '', null, null, '', '只', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', 'sp3', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', 'sp8', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', 'sp17', '', null, null, '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', 'xlh123', '', null, null, '', '个', '', null, null, null, null, '', '', '', '', '1', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', '', 'test1', null, null, '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', 'weqwe', '300ml', null, null, '红色', '个', 'aaaabbbbb', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, null, null, '件', null, '', null, null, null, '', null, null, null, '0', '0', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_attribute | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_attribute`; | ||||||
|  | CREATE TABLE `jsh_material_attribute` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT, | ||||||
|  |   `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名', | ||||||
|  |   `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_attribute | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('1', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('2', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('3', '自定义1', '小米|华为', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('4', '自定义2', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_attribute` VALUES ('5', '自定义3', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_category | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_category`; | ||||||
|  | CREATE TABLE `jsh_material_category` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `category_level` smallint(6) DEFAULT NULL COMMENT '等级', | ||||||
|  |   `parent_id` bigint(20) DEFAULT NULL COMMENT '上级id', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '显示顺序', | ||||||
|  |   `serial_no` varchar(100) DEFAULT NULL COMMENT '编号', | ||||||
|  |   `remark` varchar(1024) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`), | ||||||
|  |   KEY `FK3EE7F725237A77D8` (`parent_id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='产品类型表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_category | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_category` VALUES ('17', '目录1', null, null, '11', 'wae12', 'eee', '2019-04-10 22:18:12', '2021-02-17 15:11:35', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_category` VALUES ('21', '目录2', null, '17', '22', 'ada112', 'ddd', '2020-07-20 23:08:44', '2020-07-20 23:08:44', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_current_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_current_stock`; | ||||||
|  | CREATE TABLE `jsh_material_current_stock` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `current_number` decimal(24,6) DEFAULT NULL COMMENT '当前库存数量', | ||||||
|  |   `current_unit_price` decimal(24,6) DEFAULT NULL COMMENT '当前单价', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品当前库存'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_current_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_extend | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_extend`; | ||||||
|  | CREATE TABLE `jsh_material_extend` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '商品id', | ||||||
|  |   `bar_code` varchar(50) DEFAULT NULL COMMENT '商品条码', | ||||||
|  |   `commodity_unit` varchar(50) DEFAULT NULL COMMENT '商品单位', | ||||||
|  |   `sku` varchar(50) DEFAULT NULL COMMENT '多属性', | ||||||
|  |   `purchase_decimal` decimal(24,6) DEFAULT NULL COMMENT '采购价格', | ||||||
|  |   `commodity_decimal` decimal(24,6) DEFAULT NULL COMMENT '零售价格', | ||||||
|  |   `wholesale_decimal` decimal(24,6) DEFAULT NULL COMMENT '销售价格', | ||||||
|  |   `low_decimal` decimal(24,6) DEFAULT NULL COMMENT '最低售价', | ||||||
|  |   `default_flag` varchar(1) DEFAULT '1' COMMENT '是否为默认单位,1是,0否', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建日期', | ||||||
|  |   `create_serial` varchar(50) DEFAULT NULL COMMENT '创建人编码', | ||||||
|  |   `update_serial` varchar(50) DEFAULT NULL COMMENT '更新人编码', | ||||||
|  |   `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间戳', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品价格扩展'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_extend | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('1', '587', '1000', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-02-20 23:22:03', 'jsh', 'jsh', '1595263657135', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', null, '11.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:44:57', 'jsh', 'jsh', '1595265439418', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('3', '569', '1002', '只', null, '10.000000', '15.000000', '15.000000', '13.000000', '1', '2020-02-20 23:45:15', 'jsh', 'jsh', '1582213514731', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('4', '570', '1003', '个', null, '8.000000', '15.000000', '14.000000', '13.000000', '1', '2020-02-20 23:45:37', 'jsh', 'jsh', '1587657604430', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('5', '577', '1004', '个', null, '10.000000', '20.000000', '20.000000', '20.000000', '1', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596494', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('6', '577', '1005', '箱', null, '120.000000', '240.000000', '240.000000', '240.000000', '0', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596497', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('7', '579', '1006', '个', null, '20.000000', '30.000000', '30.000000', '30.000000', '1', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270458', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('8', '579', '1007', '箱', null, '240.000000', '360.000000', '360.000000', '360.000000', '0', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270466', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('9', '586', '1008', '个', null, '12.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:47:23', 'jsh', 'jsh', '1595254981896', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('10', '588', '1009', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-07-21 00:58:15', 'jsh', 'jsh', '1614699799073', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('36', '619', '1014', '件', '橙色,M', '12.000000', '15.000000', '14.000000', null, '1', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220316', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('37', '619', '1015', '件', '橙色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220327', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('38', '619', '1016', '件', '绿色,M', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220336', '63', '0'); | ||||||
|  | INSERT INTO `jsh_material_extend` VALUES ('39', '619', '1017', '件', '绿色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220346', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_initial_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_initial_stock`; | ||||||
|  | CREATE TABLE `jsh_material_initial_stock` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量', | ||||||
|  |   `low_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最低库存数量', | ||||||
|  |   `high_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最高库存数量', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品初始库存'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_initial_stock | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_material_property | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_material_property`; | ||||||
|  | CREATE TABLE `jsh_material_property` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `native_name` varchar(50) DEFAULT NULL COMMENT '原始名称', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '是否启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `another_name` varchar(50) DEFAULT NULL COMMENT '别名', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品扩展字段表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_material_property | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_msg | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_msg`; | ||||||
|  | CREATE TABLE `jsh_msg` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `msg_title` varchar(100) DEFAULT NULL COMMENT '消息标题', | ||||||
|  |   `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '消息类型', | ||||||
|  |   `user_id` bigint(20) DEFAULT NULL COMMENT '接收人id', | ||||||
|  |   `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='消息表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_msg | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '63', '2', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_organization | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_organization`; | ||||||
|  | CREATE TABLE `jsh_organization` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号', | ||||||
|  |   `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称', | ||||||
|  |   `parent_id` bigint(20) DEFAULT NULL COMMENT '父机构id', | ||||||
|  |   `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='机构表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_organization | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('12', '001', '测试机构', null, '2', 'aaaa2', '2019-12-28 12:13:01', '2019-12-28 12:13:01', '63', '0'); | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('13', 'jg1', '机构1', '12', '3', '', '2020-07-21 00:09:57', '2020-07-21 00:10:22', '63', '0'); | ||||||
|  | INSERT INTO `jsh_organization` VALUES ('14', '12', '机构2', '13', '4', '', '2020-07-21 22:45:42', '2021-02-15 22:18:30', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_orga_user_rel | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_orga_user_rel`; | ||||||
|  | CREATE TABLE `jsh_orga_user_rel` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `orga_id` bigint(20) NOT NULL COMMENT '机构id', | ||||||
|  |   `user_id` bigint(20) NOT NULL COMMENT '用户id', | ||||||
|  |   `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序', | ||||||
|  |   `delete_flag` char(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '创建人', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `updater` bigint(20) DEFAULT NULL COMMENT '更新人', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_orga_user_rel | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2021-03-18 22:33:19', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '15', '0', '2020-09-13 18:42:45', '63', '2021-03-19 00:11:40', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('12', '13', '135', '9', '0', '2021-03-18 22:24:25', '63', '2021-03-19 00:09:23', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('13', '13', '134', '1', '0', '2021-03-18 22:31:39', '63', '2021-03-18 23:59:55', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('14', '22', '133', '22', '0', '2021-03-18 22:31:44', '63', '2021-03-18 22:32:04', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('15', '12', '144', null, '0', '2021-03-19 00:00:40', '63', '2021-03-19 00:08:07', '63', '63'); | ||||||
|  | INSERT INTO `jsh_orga_user_rel` VALUES ('16', '12', '145', null, '0', '2021-03-19 00:03:44', '63', '2021-03-19 00:03:44', '63', '63'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_person | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_person`; | ||||||
|  | CREATE TABLE `jsh_person` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '姓名', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='经手人表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_person | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_person` VALUES ('14', '销售员', '小李', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('15', '仓管员', '小军', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('16', '财务员', '小夏', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_person` VALUES ('17', '财务员', '小曹', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_platform_config | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_platform_config`; | ||||||
|  | CREATE TABLE `jsh_platform_config` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT, | ||||||
|  |   `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词', | ||||||
|  |   `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称', | ||||||
|  |   `platform_value` varchar(200) DEFAULT NULL COMMENT '值', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='平台参数'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_platform_config | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '管伊佳ERP'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('3', 'platform_url', '官方网站', 'http://www.gyjerp.com/'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('5', 'bill_print_url', '三联打印地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('6', 'pay_fee_url', '租户续费地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('7', 'register_flag', '注册启用标记', '1'); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('9', 'send_workflow_url', '发起流程地址', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('10', 'weixinUrl', '微信url', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('11', 'weixinAppid', '微信appid', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('12', 'weixinSecret', '微信secret', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('13', 'aliOss_endpoint', '阿里OSS-endpoint', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('14', 'aliOss_accessKeyId', '阿里OSS-accessKeyId', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('15', 'aliOss_accessKeySecret', '阿里OSS-accessKeySecret', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('16', 'aliOss_bucketName', '阿里OSS-bucketName', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('17', 'aliOss_linkUrl', '阿里OSS-linkUrl', ''); | ||||||
|  | INSERT INTO `jsh_platform_config` VALUES ('18', 'bill_excel_url', '单据Excel地址', ''); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_role | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_role`; | ||||||
|  | CREATE TABLE `jsh_role` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `price_limit` varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价', | ||||||
|  |   `value` varchar(200) DEFAULT NULL COMMENT '值', | ||||||
|  |   `description` varchar(100) DEFAULT NULL COMMENT '描述', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='角色表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_role | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_role` VALUES ('4', '管理员', '全部数据', null, null, null, '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('10', '租户', '全部数据', null, null, '', '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('16', '销售经理', '全部数据', null, null, 'ddd', '', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_role` VALUES ('17', '销售代表', '个人数据', null, null, 'rrr', '', null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_sequence | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_sequence`; | ||||||
|  | CREATE TABLE `jsh_sequence` ( | ||||||
|  |   `seq_name` varchar(50) NOT NULL COMMENT '序列名称', | ||||||
|  |   `min_value` bigint(20) NOT NULL COMMENT '最小值', | ||||||
|  |   `max_value` bigint(20) NOT NULL COMMENT '最大值', | ||||||
|  |   `current_val` bigint(20) NOT NULL COMMENT '当前值', | ||||||
|  |   `increment_val` int(11) NOT NULL DEFAULT '1' COMMENT '增长步数', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   PRIMARY KEY (`seq_name`) | ||||||
|  | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='单据编号表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_sequence | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '672', '1', '单据编号sequence'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_serial_number | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_serial_number`; | ||||||
|  | CREATE TABLE `jsh_serial_number` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `material_id` bigint(20) DEFAULT NULL COMMENT '产品表id', | ||||||
|  |   `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id', | ||||||
|  |   `serial_number` varchar(64) DEFAULT NULL COMMENT '序列号', | ||||||
|  |   `is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出', | ||||||
|  |   `in_price` decimal(24,6) DEFAULT NULL COMMENT '入库单价', | ||||||
|  |   `remark` varchar(1024) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '创建人', | ||||||
|  |   `update_time` datetime DEFAULT NULL COMMENT '更新时间', | ||||||
|  |   `updater` bigint(20) DEFAULT NULL COMMENT '更新人', | ||||||
|  |   `in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号', | ||||||
|  |   `out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_serial_number | ||||||
|  | -- ---------------------------- | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_supplier | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_supplier`; | ||||||
|  | CREATE TABLE `jsh_supplier` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `supplier` varchar(255) NOT NULL COMMENT '供应商名称', | ||||||
|  |   `contacts` varchar(100) DEFAULT NULL COMMENT '联系人', | ||||||
|  |   `phone_num` varchar(30) DEFAULT NULL COMMENT '联系电话', | ||||||
|  |   `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', | ||||||
|  |   `description` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `isystem` tinyint(4) DEFAULT NULL COMMENT '是否系统自带 0==系统 1==非系统', | ||||||
|  |   `type` varchar(20) DEFAULT NULL COMMENT '类型', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `advance_in` decimal(24,6) DEFAULT '0.000000' COMMENT '预收款', | ||||||
|  |   `begin_need_get` decimal(24,6) DEFAULT NULL COMMENT '期初应收', | ||||||
|  |   `begin_need_pay` decimal(24,6) DEFAULT NULL COMMENT '期初应付', | ||||||
|  |   `all_need_get` decimal(24,6) DEFAULT NULL COMMENT '累计应收', | ||||||
|  |   `all_need_pay` decimal(24,6) DEFAULT NULL COMMENT '累计应付', | ||||||
|  |   `fax` varchar(30) DEFAULT NULL COMMENT '传真', | ||||||
|  |   `telephone` varchar(30) DEFAULT NULL COMMENT '手机', | ||||||
|  |   `address` varchar(100) DEFAULT NULL COMMENT '地址', | ||||||
|  |   `tax_num` varchar(50) DEFAULT NULL COMMENT '纳税人识别号', | ||||||
|  |   `bank_name` varchar(50) DEFAULT NULL COMMENT '开户行', | ||||||
|  |   `account_number` varchar(50) DEFAULT NULL COMMENT '账号', | ||||||
|  |   `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率', | ||||||
|  |   `sort` varchar(10) DEFAULT NULL COMMENT '排序', | ||||||
|  |   `creator` bigint(20) DEFAULT NULL COMMENT '操作员', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COMMENT='供应商/客户信息表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_supplier | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('57', '供应商1', '小军', '12345678', '', '', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '4.000000', '', '15000000000', '地址1', '', '', '', '12.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('58', '客户1', '小李', '12345678', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '-100.000000', null, '', '', '', '', '', '', '12.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('59', '客户2', '小陈', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('60', '12312666', '小曹', '', '', '', null, '会员', '', '970.000000', '0.000000', '0.000000', null, null, '', '13000000000', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('68', '供应商3', '晓丽', '12345678', '', 'fasdfadf', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '-35.000000', '', '13000000000', 'aaaa', '1341324', '', '', '13.000000', null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('71', '客户3', '小周', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0'); | ||||||
|  | INSERT INTO `jsh_supplier` VALUES ('74', '供应商5', '小季', '77779999', '', '', null, '供应商', '', '0.000000', '0.000000', '5.000000', '0.000000', '5.000000', '', '15806283912', '', '', '', '', '3.000000', null, '63', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_system_config | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_system_config`; | ||||||
|  | CREATE TABLE `jsh_system_config` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `company_name` varchar(50) DEFAULT NULL COMMENT '公司名称', | ||||||
|  |   `company_contacts` varchar(20) DEFAULT NULL COMMENT '公司联系人', | ||||||
|  |   `company_address` varchar(50) DEFAULT NULL COMMENT '公司地址', | ||||||
|  |   `company_tel` varchar(20) DEFAULT NULL COMMENT '公司电话', | ||||||
|  |   `company_fax` varchar(20) DEFAULT NULL COMMENT '公司传真', | ||||||
|  |   `company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编', | ||||||
|  |   `sale_agreement` varchar(500) DEFAULT NULL COMMENT '销售协议', | ||||||
|  |   `depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用', | ||||||
|  |   `customer_flag` varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用', | ||||||
|  |   `minus_stock_flag` varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用', | ||||||
|  |   `purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用', | ||||||
|  |   `multi_level_approval_flag` varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用', | ||||||
|  |   `multi_bill_type` varchar(200) DEFAULT NULL COMMENT '流程类型,可多选', | ||||||
|  |   `force_approval_flag` varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用', | ||||||
|  |   `update_unit_price_flag` varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用', | ||||||
|  |   `over_link_bill_flag` varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用', | ||||||
|  |   `in_out_manage_flag` varchar(1) DEFAULT '0' COMMENT '出入库管理启用标记,0未启用,1启用', | ||||||
|  |   `multi_account_flag` varchar(1) DEFAULT '0' COMMENT '多账户启用标记,0未启用,1启用', | ||||||
|  |   `move_avg_price_flag` varchar(1) DEFAULT '0' COMMENT '移动平均价启用标记,0未启用,1启用', | ||||||
|  |   `audit_print_flag` varchar(1) DEFAULT '0' COMMENT '先审核后打印启用标记,0未启用,1启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统参数'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_system_config | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '0', '0', '0', '0', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_tenant | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_tenant`; | ||||||
|  | CREATE TABLE `jsh_tenant` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id', | ||||||
|  |   `login_name` varchar(255) DEFAULT NULL COMMENT '登录名', | ||||||
|  |   `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制', | ||||||
|  |   `type` varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户', | ||||||
|  |   `enabled` bit(1) DEFAULT b'1' COMMENT '启用 0-禁用  1-启用', | ||||||
|  |   `create_time` datetime DEFAULT NULL COMMENT '创建时间', | ||||||
|  |   `expire_time` datetime DEFAULT NULL COMMENT '到期时间', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='租户'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_tenant | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '2000', '1', '', '2021-02-17 23:19:17', '2099-02-17 23:19:17', null, '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_unit | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_unit`; | ||||||
|  | CREATE TABLE `jsh_unit` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `name` varchar(50) DEFAULT NULL COMMENT '名称,支持多单位', | ||||||
|  |   `basic_unit` varchar(50) DEFAULT NULL COMMENT '基础单位', | ||||||
|  |   `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位', | ||||||
|  |   `other_unit_two` varchar(50) DEFAULT NULL COMMENT '副单位2', | ||||||
|  |   `other_unit_three` varchar(50) DEFAULT NULL COMMENT '副单位3', | ||||||
|  |   `ratio` decimal(24,3) DEFAULT NULL COMMENT '比例', | ||||||
|  |   `ratio_two` decimal(24,3) DEFAULT NULL COMMENT '比例2', | ||||||
|  |   `ratio_three` decimal(24,3) DEFAULT NULL COMMENT '比例3', | ||||||
|  |   `enabled` bit(1) DEFAULT NULL COMMENT '启用', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='多单位表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_unit | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8.000', null, null, '', '63', '0'); | ||||||
|  | INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12.000', null, null, '', '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_user | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_user`; | ||||||
|  | CREATE TABLE `jsh_user` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `username` varchar(255) NOT NULL COMMENT '用户姓名--例如张三', | ||||||
|  |   `login_name` varchar(255) NOT NULL COMMENT '登录用户名', | ||||||
|  |   `password` varchar(50) DEFAULT NULL COMMENT '登陆密码', | ||||||
|  |   `leader_flag` varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是', | ||||||
|  |   `position` varchar(200) DEFAULT NULL COMMENT '职位', | ||||||
|  |   `department` varchar(255) DEFAULT NULL COMMENT '所属部门', | ||||||
|  |   `email` varchar(100) DEFAULT NULL COMMENT '电子邮箱', | ||||||
|  |   `phonenum` varchar(100) DEFAULT NULL COMMENT '手机号码', | ||||||
|  |   `ismanager` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否为管理者 0==管理者 1==员工', | ||||||
|  |   `isystem` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否系统自带数据 ', | ||||||
|  |   `status` tinyint(4) DEFAULT '0' COMMENT '状态,0正常,2封禁', | ||||||
|  |   `description` varchar(500) DEFAULT NULL COMMENT '用户描述信息', | ||||||
|  |   `remark` varchar(500) DEFAULT NULL COMMENT '备注', | ||||||
|  |   `weixin_open_id` varchar(100) DEFAULT NULL COMMENT '微信绑定', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 COMMENT='用户表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_user | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_user` VALUES ('63', '测试用户', 'jsh', 'e10adc3949ba59abbe56e057f20f883e', '0', '主管', null, '666666@qq.com', '1123123123132', '1', '1', '0', '', null, null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user` VALUES ('120', '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '0', null, null, null, null, '1', '0', '0', null, null, null, '0', '0'); | ||||||
|  | INSERT INTO `jsh_user` VALUES ('131', 'test123', 'test123', 'e10adc3949ba59abbe56e057f20f883e', '0', '总监', null, '7777777@qq.com', '', '1', '0', '0', '', null, null, '63', '0'); | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Table structure for jsh_user_business | ||||||
|  | -- ---------------------------- | ||||||
|  | DROP TABLE IF EXISTS `jsh_user_business`; | ||||||
|  | CREATE TABLE `jsh_user_business` ( | ||||||
|  |   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', | ||||||
|  |   `type` varchar(50) DEFAULT NULL COMMENT '类别', | ||||||
|  |   `key_id` varchar(50) DEFAULT NULL COMMENT '主id', | ||||||
|  |   `value` varchar(10000) DEFAULT NULL COMMENT '值', | ||||||
|  |   `btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限', | ||||||
|  |   `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', | ||||||
|  |   `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', | ||||||
|  |   PRIMARY KEY (`id`) | ||||||
|  | ) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表'; | ||||||
|  | 
 | ||||||
|  | -- ---------------------------- | ||||||
|  | -- Records of jsh_user_business | ||||||
|  | -- ---------------------------- | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][225][211][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][258][261][32]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":16,\"btnStr\":\"1\"},{\"funId\":18,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":245,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,2,7,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,7,2,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,7,2,3\"},{\"funId\":206,\"btnStr\":\"1,2,7,3\"},{\"funId\":212,\"btnStr\":\"1,7,2,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('6', 'RoleFunctions', '5', '[22][23][25][26][194][195][31][33][200][201][41][199][202]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('7', 'RoleFunctions', '6', '[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"33\",\"btnStr\":\"4\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('10', 'RoleFunctions', '8', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('11', 'RoleFunctions', '9', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('12', 'UserRole', '1', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('13', 'UserRole', '2', '[6][7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('14', 'UserDepot', '2', '[1][2][6][7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('15', 'UserDepot', '1', '[1][2][5][6][7][10][12][14][15][17]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('16', 'UserRole', '63', '[10]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('18', 'UserDepot', '63', '[14][15]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('19', 'UserDepot', '5', '[6][45][46][50]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('20', 'UserRole', '5', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('21', 'UserRole', '64', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('22', 'UserDepot', '64', '[1]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('23', 'UserRole', '65', '[5]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('24', 'UserDepot', '65', '[1]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('25', 'UserCustomer', '64', '[5][2]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('26', 'UserCustomer', '65', '[6]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('27', 'UserCustomer', '63', '[58]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][225][211][261][32][241][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][198][207][259][208][209][226][227][248][228][229][59][235][237][244][22][21][23][220][247][25][24][217][218][26][194][195][31][13][14][243][15][234][236]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1,3\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1,3\"},{\"funId\":217,\"btnStr\":\"1,3\"},{\"funId\":218,\"btnStr\":\"1,3\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":261,\"btnStr\":\"1,2,7,3\"},{\"funId\":241,\"btnStr\":\"1,2,7,3\"},{\"funId\":33,\"btnStr\":\"1,2,7,3\"},{\"funId\":199,\"btnStr\":\"1,7,2,3\"},{\"funId\":242,\"btnStr\":\"1,2,7,3\"},{\"funId\":41,\"btnStr\":\"1,2,7,3\"},{\"funId\":200,\"btnStr\":\"1,2,7,3\"},{\"funId\":210,\"btnStr\":\"1,2,7,3\"},{\"funId\":211,\"btnStr\":\"1,2,7,3\"},{\"funId\":197,\"btnStr\":\"1,2,7,3\"},{\"funId\":203,\"btnStr\":\"1,7,2,3\"},{\"funId\":204,\"btnStr\":\"1,7,2,3\"},{\"funId\":205,\"btnStr\":\"1,2,7,3\"},{\"funId\":206,\"btnStr\":\"1,7,2,3\"},{\"funId\":212,\"btnStr\":\"1,2,7,3\"},{\"funId\":201,\"btnStr\":\"1,2,7,3\"},{\"funId\":202,\"btnStr\":\"1,2,7,3\"},{\"funId\":40,\"btnStr\":\"1,2,7,3\"},{\"funId\":232,\"btnStr\":\"1,2,7,3\"},{\"funId\":233,\"btnStr\":\"1,2,7,3\"}]', null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('37', 'UserCustomer', '117', '[52]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('38', 'UserRole', '120', '[4]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('41', 'RoleFunctions', '12', '', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('48', 'RoleFunctions', '13', '[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('51', 'UserRole', '74', '[10]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('52', 'UserDepot', '121', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('54', 'UserDepot', '115', '[13]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('56', 'UserCustomer', '115', '[56]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('57', 'UserCustomer', '121', '[56]', null, null, '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '63', '0'); | ||||||
|  | INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212]', '[{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '63', '0'); | ||||||
							
								
								
									
										1653
									
								
								jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1653
									
								
								jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								jshERP-boot/docs/管伊佳ERP数据库设计汇总.xlsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								jshERP-boot/docs/管伊佳ERP数据库设计汇总.xlsx
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										216
									
								
								jshERP-boot/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										216
									
								
								jshERP-boot/pom.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,216 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <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/xsd/maven-4.0.0.xsd"> | ||||||
|  | 	<modelVersion>4.0.0</modelVersion> | ||||||
|  | 	<groupId>com.jsh</groupId> | ||||||
|  | 	<artifactId>jshERP-boot</artifactId> | ||||||
|  | 	<version>3.5-SNAPSHOT</version> | ||||||
|  | 	<packaging>jar</packaging> | ||||||
|  | 
 | ||||||
|  | 	<name>jshERP-boot</name> | ||||||
|  | 	<description>管伊佳ERP</description> | ||||||
|  | 
 | ||||||
|  | 	<parent> | ||||||
|  | 		<groupId>org.springframework.boot</groupId> | ||||||
|  | 		<artifactId>spring-boot-starter-parent</artifactId> | ||||||
|  | 		<version>2.0.0.RELEASE</version> | ||||||
|  | 	</parent> | ||||||
|  | 
 | ||||||
|  | 	<properties> | ||||||
|  | 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||||
|  | 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||||||
|  | 		<java.version>1.8</java.version> | ||||||
|  | 	</properties> | ||||||
|  | 
 | ||||||
|  | 	<dependencies> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.gitee.starblues</groupId> | ||||||
|  | 			<artifactId>springboot-plugin-framework</artifactId> | ||||||
|  | 			<version>2.2.1-RELEASE</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.gitee.starblues</groupId> | ||||||
|  | 			<artifactId>springboot-plugin-framework-extension-mybatis</artifactId> | ||||||
|  | 			<version>2.2.1-RELEASE</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.springframework.boot</groupId> | ||||||
|  | 			<artifactId>spring-boot-starter-web</artifactId> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.springframework.boot</groupId> | ||||||
|  | 			<artifactId>spring-boot-starter-test</artifactId> | ||||||
|  | 			<scope>test</scope> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.alibaba</groupId> | ||||||
|  | 			<artifactId>fastjson</artifactId> | ||||||
|  | 			<version>1.2.83</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>mysql</groupId> | ||||||
|  | 			<artifactId>mysql-connector-java</artifactId> | ||||||
|  | 			<version>8.0.21</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<!--http--> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.apache.httpcomponents</groupId> | ||||||
|  | 			<artifactId>httpclient</artifactId> | ||||||
|  | 			<version>4.5.2</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>net.sourceforge.jexcelapi</groupId> | ||||||
|  | 			<artifactId>jxl</artifactId> | ||||||
|  | 			<version>2.6.12</version> | ||||||
|  | 		</dependency> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 		<!-- OkHttpClient 核心依赖 --> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.squareup.okhttp3</groupId> | ||||||
|  | 			<artifactId>okhttp</artifactId> | ||||||
|  | 			<version>4.12.0</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.jetbrains.kotlin</groupId> | ||||||
|  | 			<artifactId>kotlin-stdlib</artifactId> | ||||||
|  | 			<version>1.8.21</version> <!-- 使用最新稳定版 --> | ||||||
|  | 		</dependency> | ||||||
|  | 		<!-- lombok --> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.projectlombok</groupId> | ||||||
|  | 			<artifactId>lombok</artifactId> | ||||||
|  | 			<version>1.18.12</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<!-- 日志 --> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.apache.logging.log4j</groupId> | ||||||
|  | 			<artifactId>log4j-to-slf4j</artifactId> | ||||||
|  | 			<version>2.15.0</version> | ||||||
|  | 			<scope>compile</scope> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.slf4j</groupId> | ||||||
|  | 			<artifactId>jul-to-slf4j</artifactId> | ||||||
|  | 			<version>1.7.25</version> | ||||||
|  | 			<scope>compile</scope> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.baomidou</groupId> | ||||||
|  | 			<artifactId>mybatis-plus-boot-starter</artifactId> | ||||||
|  | 			<version>3.0.7.1</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.springframework.boot</groupId> | ||||||
|  | 			<artifactId>spring-boot-starter-redis</artifactId> | ||||||
|  | 			<version>1.4.1.RELEASE</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>io.springfox</groupId> | ||||||
|  | 			<artifactId>springfox-swagger2</artifactId> | ||||||
|  | 			<version>2.7.0</version> | ||||||
|  | 			<scope>compile</scope> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.github.xiaoymin</groupId> | ||||||
|  | 			<artifactId>swagger-bootstrap-ui</artifactId> | ||||||
|  | 			<version>1.6</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.aliyun.oss</groupId> | ||||||
|  | 			<artifactId>aliyun-sdk-oss</artifactId> | ||||||
|  | 			<version>3.10.1</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.itextpdf</groupId> | ||||||
|  | 			<artifactId>itextpdf</artifactId> | ||||||
|  | 			<version>5.5.13.1</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>org.apache.commons</groupId> | ||||||
|  | 			<artifactId>commons-io</artifactId> | ||||||
|  | 			<version>1.3.2</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.belerweb</groupId> | ||||||
|  | 			<artifactId>pinyin4j</artifactId> | ||||||
|  | 			<version>2.5.1</version> | ||||||
|  | 		</dependency> | ||||||
|  | 		<dependency> | ||||||
|  | 			<groupId>com.github.pagehelper</groupId> | ||||||
|  | 			<artifactId>pagehelper-spring-boot-starter</artifactId> | ||||||
|  | 			<version>1.2.13</version> | ||||||
|  | 		</dependency> | ||||||
|  | 	</dependencies> | ||||||
|  | 
 | ||||||
|  | 	<build> | ||||||
|  | 		<finalName>jshERP</finalName> | ||||||
|  | 		<plugins> | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.springframework.boot</groupId> | ||||||
|  | 				<artifactId>spring-boot-maven-plugin</artifactId> | ||||||
|  | 				<version>2.0.3.RELEASE</version> | ||||||
|  | 				<executions> | ||||||
|  | 					<execution> | ||||||
|  | 						<id>build-info</id> | ||||||
|  | 						<phase>generate-sources</phase> | ||||||
|  | 						<goals> | ||||||
|  | 							<goal>build-info</goal> | ||||||
|  | 						</goals> | ||||||
|  | 					</execution> | ||||||
|  | 					<execution> | ||||||
|  | 						<id>repackage</id> | ||||||
|  | 						<phase>package</phase> | ||||||
|  | 						<goals> | ||||||
|  | 							<goal>repackage</goal> | ||||||
|  | 						</goals> | ||||||
|  | 						<configuration> | ||||||
|  | 							<mainClass>com.jsh.erp.ErpApplication</mainClass> | ||||||
|  | 							<layout>JAR</layout> | ||||||
|  | 						</configuration> | ||||||
|  | 					</execution> | ||||||
|  | 				</executions> | ||||||
|  | 			</plugin> | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.apache.maven.plugins</groupId> | ||||||
|  | 				<artifactId>maven-assembly-plugin</artifactId> | ||||||
|  | 				<version>2.5.1</version> | ||||||
|  | 				<executions> | ||||||
|  | 					<execution> | ||||||
|  | 						<id>make-zip</id> | ||||||
|  | 						<phase>package</phase> | ||||||
|  | 						<goals> | ||||||
|  | 							<goal>single</goal> | ||||||
|  | 						</goals> | ||||||
|  | 						<configuration> | ||||||
|  | 							<descriptors> | ||||||
|  | 								<descriptor>src/main/assembly/assembly.xml</descriptor> | ||||||
|  | 							</descriptors> | ||||||
|  | 							<outputDirectory>./dist</outputDirectory> | ||||||
|  | 						</configuration> | ||||||
|  | 					</execution> | ||||||
|  | 				</executions> | ||||||
|  | 			</plugin> | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.mybatis.generator</groupId> | ||||||
|  | 				<artifactId>mybatis-generator-maven-plugin</artifactId> | ||||||
|  | 				<version>1.4.0</version> | ||||||
|  | 				<configuration> | ||||||
|  | 					<configurationFile>${basedir}/src/test/resources/generatorConfig.xml</configurationFile> | ||||||
|  | 					<verbose>true</verbose> | ||||||
|  | 					<overwrite>true</overwrite> | ||||||
|  | 				</configuration> | ||||||
|  | 			</plugin> | ||||||
|  | 			<plugin> | ||||||
|  | 				<groupId>org.apache.maven.plugins</groupId> | ||||||
|  | 				<artifactId>maven-compiler-plugin</artifactId> | ||||||
|  | 				<version>3.7.0</version> | ||||||
|  | 				<configuration> | ||||||
|  | 					<source>1.8</source> | ||||||
|  | 					<target>1.8</target> | ||||||
|  | 					<skip>true</skip> | ||||||
|  | 				</configuration> | ||||||
|  | 			</plugin> | ||||||
|  | 		</plugins> | ||||||
|  | 	</build> | ||||||
|  | </project> | ||||||
							
								
								
									
										66
									
								
								jshERP-boot/src/main/assembly/assembly.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								jshERP-boot/src/main/assembly/assembly.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,66 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <assembly | ||||||
|  |         xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | ||||||
|  |         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||
|  |         xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 | ||||||
|  |         http://maven.apache.org/xsd/assembly-1.1.0.xsd "> | ||||||
|  | 
 | ||||||
|  |     <id>bin</id> | ||||||
|  | 
 | ||||||
|  |     <formats> | ||||||
|  |         <format>zip</format> | ||||||
|  |     </formats> | ||||||
|  | 
 | ||||||
|  |     <includeBaseDirectory>true</includeBaseDirectory> | ||||||
|  | 
 | ||||||
|  |     <fileSets> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>${project.basedir}/target</directory> | ||||||
|  |             <includes> | ||||||
|  |                 <include>*.jar</include> | ||||||
|  |             </includes> | ||||||
|  |             <outputDirectory>/lib</outputDirectory> | ||||||
|  |         </fileSet> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>${project.basedir}/src/main/resources</directory> | ||||||
|  |             <includes> | ||||||
|  |                 <include>*.properties</include> | ||||||
|  |                 <include>*.yml</include> | ||||||
|  |                 <include>*.yaml</include> | ||||||
|  |                 <include>*.xml</include> | ||||||
|  |             </includes> | ||||||
|  |             <outputDirectory>/config</outputDirectory> | ||||||
|  |         </fileSet> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>${project.basedir}/src/main/bin</directory> | ||||||
|  |             <outputDirectory>/bin</outputDirectory> | ||||||
|  |             <includes> | ||||||
|  |                 <include>run-manage.sh</include> | ||||||
|  |             </includes> | ||||||
|  |             <lineEnding>lf</lineEnding> | ||||||
|  |         </fileSet> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>${project.basedir}/src/main/bin/</directory> | ||||||
|  |             <outputDirectory>/</outputDirectory> | ||||||
|  |             <includes> | ||||||
|  |                 <include>start.bat</include> | ||||||
|  |                 <include>restart.sh</include> | ||||||
|  |                 <include>start.sh</include> | ||||||
|  |                 <include>stop.sh</include> | ||||||
|  |                 <include>status.sh</include> | ||||||
|  |             </includes> | ||||||
|  |         </fileSet> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>docs</directory> | ||||||
|  |             <outputDirectory>/docs</outputDirectory> | ||||||
|  |         </fileSet> | ||||||
|  |         <fileSet> | ||||||
|  |             <directory>${project.basedir}</directory> | ||||||
|  |             <includes> | ||||||
|  |                 <include>*.md</include> | ||||||
|  |                 <include>*.txt</include> | ||||||
|  |             </includes> | ||||||
|  |             <outputDirectory>/</outputDirectory> | ||||||
|  |         </fileSet> | ||||||
|  |     </fileSets> | ||||||
|  | </assembly> | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/src/main/bin/restart.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/src/main/bin/restart.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh restart | ||||||
							
								
								
									
										133
									
								
								jshERP-boot/src/main/bin/run-manage.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								jshERP-boot/src/main/bin/run-manage.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,133 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | SERVER_NAME=jshERP | ||||||
|  | readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))} | ||||||
|  | #readonly JAVA_HOME="" | ||||||
|  | readonly CONFIG_HOME="$APP_HOME/config/" | ||||||
|  | readonly LIB_HOME="$APP_HOME/lib" | ||||||
|  | readonly LOGS_HOME="$APP_HOME/logs" | ||||||
|  | readonly PID_FILE="$LOGS_HOME/application.pid" | ||||||
|  | readonly APP_MAIN_CLASS="jshERP.jar" | ||||||
|  | readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml" | ||||||
|  | readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true" | ||||||
|  | readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN" | ||||||
|  | readonly JAVA="java" | ||||||
|  | PID=0 | ||||||
|  | if [ ! -x "$LOGS_HOME" ] | ||||||
|  | then | ||||||
|  |   mkdir $LOGS_HOME | ||||||
|  | fi | ||||||
|  | chmod +x -R "$JAVA_HOME/bin/" | ||||||
|  | functions="/etc/functions.sh" | ||||||
|  | if test -f $functions ; then | ||||||
|  |   . $functions | ||||||
|  | else | ||||||
|  |   success() | ||||||
|  |   { | ||||||
|  |     echo " SUCCESS! $@" | ||||||
|  |   } | ||||||
|  |   failure() | ||||||
|  |   { | ||||||
|  |     echo " ERROR! $@" | ||||||
|  |   } | ||||||
|  |   warning() | ||||||
|  |   { | ||||||
|  |     echo "WARNING! $@" | ||||||
|  |   } | ||||||
|  | fi | ||||||
|  | function checkpid() { | ||||||
|  |    PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}') | ||||||
|  |     if [[ -n "$PID" ]] | ||||||
|  |     then | ||||||
|  |       return 0 | ||||||
|  |     else | ||||||
|  |       return 1 | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  | function start() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]] | ||||||
|  |    then | ||||||
|  |       warning "[$APP_MAIN_CLASS]: already started! (PID=$PID)" | ||||||
|  |    else | ||||||
|  |       echo -n "[$APP_MAIN_CLASS]: Starting ..." | ||||||
|  |       JAVA_CMD="nohup $JAVA $JAVA_OPTS -jar $LIB_HOME/$APP_MAIN_CLASS > /dev/null 2>&1 &" | ||||||
|  |       # echo "Exec cmmand : $JAVA_CMD" | ||||||
|  |       sh -c "$JAVA_CMD" | ||||||
|  |       sleep 3 | ||||||
|  |       checkpid | ||||||
|  |       if [[ $? -eq 0 ]] | ||||||
|  |       then | ||||||
|  |          success "(PID=$PID) " | ||||||
|  |       else | ||||||
|  |          failure " " | ||||||
|  |       fi | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function stop() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]]; | ||||||
|  |    then | ||||||
|  |       echo -n "[$APP_MAIN_CLASS]: Shutting down ...(PID=$PID) " | ||||||
|  |       kill -9 $PID | ||||||
|  |       if [[ $? -eq 0 ]]; | ||||||
|  |       then | ||||||
|  | 	     echo 0 > $PID_FILE | ||||||
|  |          success " " | ||||||
|  |       else | ||||||
|  |          failure " " | ||||||
|  |       fi | ||||||
|  |    else | ||||||
|  |       warning "[$APP_MAIN_CLASS]: is not running ..." | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function status() { | ||||||
|  |    checkpid | ||||||
|  |    if [[ $? -eq 0 ]] | ||||||
|  |    then | ||||||
|  |       success "[$APP_MAIN_CLASS]: is running! (PID=$PID)" | ||||||
|  |       return 0 | ||||||
|  |    else | ||||||
|  |       failure "[$APP_MAIN_CLASS]: is not running" | ||||||
|  |       return 1 | ||||||
|  |    fi | ||||||
|  | } | ||||||
|  | function info() { | ||||||
|  |    echo "System Information:" | ||||||
|  |    echo  | ||||||
|  |    echo "****************************" | ||||||
|  |    echo `head -n 1 /etc/issue` | ||||||
|  |    echo `uname -a` | ||||||
|  |    echo | ||||||
|  |    echo "JAVA_HOME=$JAVA_HOME" | ||||||
|  |    echo  | ||||||
|  |    echo "JAVA Environment Information:" | ||||||
|  |    echo `$JAVA -version` | ||||||
|  |    echo | ||||||
|  |    echo "APP_HOME=$APP_HOME" | ||||||
|  |    echo "APP_MAIN_CLASS=$APP_MAIN_CLASS" | ||||||
|  |    echo  | ||||||
|  |    echo "****************************" | ||||||
|  | } | ||||||
|  | case "$1" in | ||||||
|  |    'start') | ||||||
|  |       start | ||||||
|  |       ;; | ||||||
|  |    'stop') | ||||||
|  |      stop | ||||||
|  |      ;; | ||||||
|  |    'restart') | ||||||
|  |      stop | ||||||
|  |      start | ||||||
|  |      ;; | ||||||
|  |    'status') | ||||||
|  |      status | ||||||
|  |      ;; | ||||||
|  |    'info') | ||||||
|  |      info | ||||||
|  |      ;; | ||||||
|  |     *) | ||||||
|  |      echo "Usage: $0 {help|start|stop|restart|status|info}" | ||||||
|  |      ;; | ||||||
|  | esac | ||||||
|  | exit 0 | ||||||
							
								
								
									
										6
									
								
								jshERP-boot/src/main/bin/start.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								jshERP-boot/src/main/bin/start.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | @echo off | ||||||
|  | 
 | ||||||
|  | title jshERP | ||||||
|  | 
 | ||||||
|  | java -Xms1000m -Xmx2000m -jar .\lib\jshERP.jar | ||||||
|  | pause over | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/src/main/bin/start.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/src/main/bin/start.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh start | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/src/main/bin/status.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/src/main/bin/status.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh status | ||||||
							
								
								
									
										1
									
								
								jshERP-boot/src/main/bin/stop.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jshERP-boot/src/main/bin/stop.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ./bin/run-manage.sh stop | ||||||
							
								
								
									
										28
									
								
								jshERP-boot/src/main/java/com/jsh/erp/ErpApplication.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								jshERP-boot/src/main/java/com/jsh/erp/ErpApplication.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,28 @@ | |||||||
|  | package com.jsh.erp; | ||||||
|  | 
 | ||||||
|  | import com.jsh.erp.utils.ComputerInfo; | ||||||
|  | import org.mybatis.spring.annotation.MapperScan; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.boot.SpringApplication; | ||||||
|  | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||||
|  | import org.springframework.boot.web.servlet.ServletComponentScan; | ||||||
|  | import org.springframework.context.ConfigurableApplicationContext; | ||||||
|  | import org.springframework.core.env.Environment; | ||||||
|  | import org.springframework.scheduling.annotation.EnableScheduling; | ||||||
|  | 
 | ||||||
|  | import java.io.IOException; | ||||||
|  | 
 | ||||||
|  | @SpringBootApplication | ||||||
|  | @MapperScan("com.jsh.erp.datasource.mappers") | ||||||
|  | @ServletComponentScan | ||||||
|  | @EnableScheduling | ||||||
|  | public class ErpApplication{ | ||||||
|  |     public static void main(String[] args) throws IOException { | ||||||
|  |         ConfigurableApplicationContext context = SpringApplication.run(ErpApplication.class, args); | ||||||
|  |         Environment environment = context.getBean(Environment.class); | ||||||
|  |         System.out.println("启动成功,后端服务API地址:http://" + ComputerInfo.getIpAddr() + ":" | ||||||
|  |                 + environment.getProperty("server.port") + "/jshERP-boot/doc.html"); | ||||||
|  |         System.out.println("您还需启动前端服务,启动命令:yarn run serve 或 npm run serve,测试用户:jsh,密码:123456"); | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										228
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/AjaxResult.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										228
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/AjaxResult.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,228 @@ | |||||||
|  | package com.jsh.erp.base; | ||||||
|  | 
 | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | 
 | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.Objects; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 操作消息提醒 | ||||||
|  |  * | ||||||
|  |  * @author ji-sheng-hua | ||||||
|  |  */ | ||||||
|  | public class AjaxResult extends HashMap<String, Object> | ||||||
|  | { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     /** 状态码 */ | ||||||
|  |     public static final String CODE_TAG = "code"; | ||||||
|  | 
 | ||||||
|  |     /** 返回内容 */ | ||||||
|  |     public static final String MSG_TAG = "msg"; | ||||||
|  | 
 | ||||||
|  |     /** 数据对象 */ | ||||||
|  |     public static final String DATA_TAG = "data"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 状态类型 | ||||||
|  |      */ | ||||||
|  |     public enum Type | ||||||
|  |     { | ||||||
|  |         /** 成功 */ | ||||||
|  |         SUCCESS(0), | ||||||
|  |         /** 警告 */ | ||||||
|  |         WARN(301), | ||||||
|  |         /** 错误 */ | ||||||
|  |         ERROR(500); | ||||||
|  |         private final int value; | ||||||
|  | 
 | ||||||
|  |         Type(int value) | ||||||
|  |         { | ||||||
|  |             this.value = value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public int value() | ||||||
|  |         { | ||||||
|  |             return this.value; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult() | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 初始化一个新创建的 AjaxResult 对象 | ||||||
|  |      * | ||||||
|  |      * @param type 状态类型 | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult(Type type, String msg) | ||||||
|  |     { | ||||||
|  |         super.put(CODE_TAG, type.value); | ||||||
|  |         super.put(MSG_TAG, msg); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 初始化一个新创建的 AjaxResult 对象 | ||||||
|  |      * | ||||||
|  |      * @param type 状态类型 | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @param data 数据对象 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult(Type type, String msg, Object data) | ||||||
|  |     { | ||||||
|  |         super.put(CODE_TAG, type.value); | ||||||
|  |         super.put(MSG_TAG, msg); | ||||||
|  |         if (StringUtil.isNotNull(data)) | ||||||
|  |         { | ||||||
|  |             super.put(DATA_TAG, data); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功消息 | ||||||
|  |      * | ||||||
|  |      * @return 成功消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult success() | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success("操作成功"); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功数据 | ||||||
|  |      * | ||||||
|  |      * @return 成功消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult success(Object data) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success("操作成功", data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @return 成功消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult success(String msg) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success(msg, null); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @param data 数据对象 | ||||||
|  |      * @return 成功消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult success(String msg, Object data) | ||||||
|  |     { | ||||||
|  |         return new AjaxResult(Type.SUCCESS, msg, data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回警告消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @return 警告消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult warn(String msg) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.warn(msg, null); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回警告消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @param data 数据对象 | ||||||
|  |      * @return 警告消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult warn(String msg, Object data) | ||||||
|  |     { | ||||||
|  |         return new AjaxResult(Type.WARN, msg, data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回错误消息 | ||||||
|  |      * | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult error() | ||||||
|  |     { | ||||||
|  |         return AjaxResult.error("操作失败"); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回错误消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @return 警告消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult error(String msg) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.error(msg, null); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回错误消息 | ||||||
|  |      * | ||||||
|  |      * @param msg 返回内容 | ||||||
|  |      * @param data 数据对象 | ||||||
|  |      * @return 警告消息 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult error(String msg, Object data) | ||||||
|  |     { | ||||||
|  |         return new AjaxResult(Type.ERROR, msg, data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 是否为成功消息 | ||||||
|  |      * | ||||||
|  |      * @return 结果 | ||||||
|  |      */ | ||||||
|  |     public boolean isSuccess() | ||||||
|  |     { | ||||||
|  |         return Objects.equals(Type.SUCCESS.value, this.get(CODE_TAG)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 是否为警告消息 | ||||||
|  |      * | ||||||
|  |      * @return 结果 | ||||||
|  |      */ | ||||||
|  |     public boolean isWarn() | ||||||
|  |     { | ||||||
|  |         return Objects.equals(Type.WARN.value, this.get(CODE_TAG)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 是否为错误消息 | ||||||
|  |      * | ||||||
|  |      * @return 结果 | ||||||
|  |      */ | ||||||
|  |     public boolean isError() | ||||||
|  |     { | ||||||
|  |         return Objects.equals(Type.ERROR.value, this.get(CODE_TAG)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 方便链式调用 | ||||||
|  |      * | ||||||
|  |      * @param key 键 | ||||||
|  |      * @param value 值 | ||||||
|  |      * @return 数据对象 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public AjaxResult put(String key, Object value) | ||||||
|  |     { | ||||||
|  |         super.put(key, value); | ||||||
|  |         return this; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										158
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/BaseController.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/BaseController.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,158 @@ | |||||||
|  | package com.jsh.erp.base; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.StringUtils; | ||||||
|  | import com.github.pagehelper.PageHelper; | ||||||
|  | import com.github.pagehelper.PageInfo; | ||||||
|  | import com.jsh.erp.utils.PageUtils; | ||||||
|  | import com.jsh.erp.utils.ServletUtils; | ||||||
|  | import com.jsh.erp.utils.SqlUtil; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | 
 | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import javax.servlet.http.HttpSession; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * web层通用数据处理 | ||||||
|  |  *  | ||||||
|  |  * @author ji-sheng-hua | ||||||
|  |  */ | ||||||
|  | public class BaseController | ||||||
|  | { | ||||||
|  |     protected final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 设置请求分页数据 | ||||||
|  |      */ | ||||||
|  |     protected void startPage() | ||||||
|  |     { | ||||||
|  |         PageUtils.startPage(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 设置请求排序数据 | ||||||
|  |      */ | ||||||
|  |     protected void startOrderBy() | ||||||
|  |     { | ||||||
|  |         PageDomain pageDomain = TableSupport.buildPageRequest(); | ||||||
|  |         if (StringUtils.isNotEmpty(pageDomain.getOrderBy())) | ||||||
|  |         { | ||||||
|  |             String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); | ||||||
|  |             PageHelper.orderBy(orderBy); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 清理分页的线程变量 | ||||||
|  |      */ | ||||||
|  |     protected void clearPage() | ||||||
|  |     { | ||||||
|  |         PageUtils.clearPage(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取request | ||||||
|  |      */ | ||||||
|  |     public HttpServletRequest getRequest() | ||||||
|  |     { | ||||||
|  |         return ServletUtils.getRequest(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取response | ||||||
|  |      */ | ||||||
|  |     public HttpServletResponse getResponse() | ||||||
|  |     { | ||||||
|  |         return ServletUtils.getResponse(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取session | ||||||
|  |      */ | ||||||
|  |     public HttpSession getSession() | ||||||
|  |     { | ||||||
|  |         return getRequest().getSession(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 响应请求分页数据 | ||||||
|  |      */ | ||||||
|  |     @SuppressWarnings({ "rawtypes", "unchecked" }) | ||||||
|  |     protected TableDataInfo getDataTable(List<?> list) | ||||||
|  |     { | ||||||
|  |         Map<String, Object> data = new HashMap<>(); | ||||||
|  |         TableDataInfo rspData = new TableDataInfo(); | ||||||
|  |         rspData.setCode(200); | ||||||
|  |         data.put("rows", list); | ||||||
|  |         data.put("total", new PageInfo(list).getTotal()); | ||||||
|  |         rspData.setData(data); | ||||||
|  |         return rspData; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 响应返回结果 | ||||||
|  |      *  | ||||||
|  |      * @param rows 影响行数 | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     protected AjaxResult toAjax(int rows) | ||||||
|  |     { | ||||||
|  |         return rows > 0 ? success() : error(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 响应返回结果 | ||||||
|  |      *  | ||||||
|  |      * @param result 结果 | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     protected AjaxResult toAjax(boolean result) | ||||||
|  |     { | ||||||
|  |         return result ? success() : error(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult success() | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回失败消息 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult error() | ||||||
|  |     { | ||||||
|  |         return AjaxResult.error(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功消息 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult success(String message) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success(message); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回成功数据 | ||||||
|  |      */ | ||||||
|  |     public static AjaxResult success(Object data) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.success("操作成功", data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 返回失败消息 | ||||||
|  |      */ | ||||||
|  |     public AjaxResult error(String message) | ||||||
|  |     { | ||||||
|  |         return AjaxResult.error(message); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
							
								
								
									
										87
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/PageDomain.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/PageDomain.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,87 @@ | |||||||
|  | package com.jsh.erp.base; | ||||||
|  | 
 | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 分页数据 | ||||||
|  |  *  | ||||||
|  |  * @author ji-sheng-hua | ||||||
|  |  */ | ||||||
|  | public class PageDomain | ||||||
|  | { | ||||||
|  |     /** 当前记录起始索引 */ | ||||||
|  |     private Integer currentPage; | ||||||
|  | 
 | ||||||
|  |     /** 每页显示记录数 */ | ||||||
|  |     private Integer pageSize; | ||||||
|  | 
 | ||||||
|  |     /** 排序列 */ | ||||||
|  |     private String orderByColumn; | ||||||
|  | 
 | ||||||
|  |     /** 排序的方向desc或者asc */ | ||||||
|  |     private String isAsc = "asc"; | ||||||
|  | 
 | ||||||
|  |     /** 分页参数合理化 */ | ||||||
|  |     private Boolean reasonable = true; | ||||||
|  | 
 | ||||||
|  |     public String getOrderBy() | ||||||
|  |     { | ||||||
|  |         if (StringUtil.isEmpty(orderByColumn)) | ||||||
|  |         { | ||||||
|  |             return ""; | ||||||
|  |         } | ||||||
|  |         return StringUtil.toUnderScoreCase(orderByColumn) + " " + isAsc; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Integer getCurrentPage() { | ||||||
|  |         return currentPage; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCurrentPage(Integer currentPage) { | ||||||
|  |         this.currentPage = currentPage; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Integer getPageSize() | ||||||
|  |     { | ||||||
|  |         return pageSize; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPageSize(Integer pageSize) | ||||||
|  |     { | ||||||
|  |         this.pageSize = pageSize; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByColumn() | ||||||
|  |     { | ||||||
|  |         return orderByColumn; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByColumn(String orderByColumn) | ||||||
|  |     { | ||||||
|  |         this.orderByColumn = orderByColumn; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getIsAsc() | ||||||
|  |     { | ||||||
|  |         return isAsc; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setIsAsc(String isAsc) | ||||||
|  |     { | ||||||
|  |         this.isAsc = isAsc; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getReasonable() | ||||||
|  |     { | ||||||
|  |         if (StringUtil.isNull(reasonable)) | ||||||
|  |         { | ||||||
|  |             return Boolean.TRUE; | ||||||
|  |         } | ||||||
|  |         return reasonable; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setReasonable(Boolean reasonable) | ||||||
|  |     { | ||||||
|  |         this.reasonable = reasonable; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,44 @@ | |||||||
|  | package com.jsh.erp.base; | ||||||
|  | 
 | ||||||
|  | import java.io.Serializable; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 表格分页数据对象 | ||||||
|  |  *  | ||||||
|  |  * @author ji-sheng-hua | ||||||
|  |  */ | ||||||
|  | public class TableDataInfo implements Serializable | ||||||
|  | { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     /** 消息状态码 */ | ||||||
|  |     private int code; | ||||||
|  | 
 | ||||||
|  |     /** 消息状态码 */ | ||||||
|  |     private Object data; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 表格数据对象 | ||||||
|  |      */ | ||||||
|  |     public TableDataInfo() | ||||||
|  |     { | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public int getCode() | ||||||
|  |     { | ||||||
|  |         return code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCode(int code) | ||||||
|  |     { | ||||||
|  |         this.code = code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Object getData() { | ||||||
|  |         return data; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setData(Object data) { | ||||||
|  |         this.data = data; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										56
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/TableSupport.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								jshERP-boot/src/main/java/com/jsh/erp/base/TableSupport.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,56 @@ | |||||||
|  | package com.jsh.erp.base; | ||||||
|  | 
 | ||||||
|  | import com.jsh.erp.utils.Convert; | ||||||
|  | import com.jsh.erp.utils.ServletUtils; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 表格数据处理 | ||||||
|  |  *  | ||||||
|  |  * @author ji-sheng-hua | ||||||
|  |  */ | ||||||
|  | public class TableSupport | ||||||
|  | { | ||||||
|  |     /** | ||||||
|  |      * 当前记录起始索引 | ||||||
|  |      */ | ||||||
|  |     public static final String CURRENT_PAGE = "currentPage"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 每页显示记录数 | ||||||
|  |      */ | ||||||
|  |     public static final String PAGE_SIZE = "pageSize"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 排序列 | ||||||
|  |      */ | ||||||
|  |     public static final String ORDER_BY_COLUMN = "orderByColumn"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 排序的方向 "desc" 或者 "asc". | ||||||
|  |      */ | ||||||
|  |     public static final String IS_ASC = "isAsc"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 分页参数合理化 | ||||||
|  |      */ | ||||||
|  |     public static final String REASONABLE = "reasonable"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 封装分页对象 | ||||||
|  |      */ | ||||||
|  |     public static PageDomain getPageDomain() | ||||||
|  |     { | ||||||
|  |         PageDomain pageDomain = new PageDomain(); | ||||||
|  |         pageDomain.setCurrentPage(Convert.toInt(ServletUtils.getParameter(CURRENT_PAGE), 1)); | ||||||
|  |         pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10)); | ||||||
|  |         pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN)); | ||||||
|  |         pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC)); | ||||||
|  |         pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE)); | ||||||
|  |         return pageDomain; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static PageDomain buildPageRequest() | ||||||
|  |     { | ||||||
|  |         return getPageDomain(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | package com.jsh.erp.config; | ||||||
|  | 
 | ||||||
|  | import com.gitee.starblues.extension.mybatis.SpringBootMybatisExtension; | ||||||
|  | import com.gitee.starblues.integration.application.AutoPluginApplication; | ||||||
|  | import com.gitee.starblues.integration.application.PluginApplication; | ||||||
|  | import org.springframework.context.annotation.Bean; | ||||||
|  | import org.springframework.context.annotation.Configuration; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @Author: jishenghua | ||||||
|  |  * @Version: 1.0 | ||||||
|  |  * @Create Date Time: 2019-05-30 15:53 | ||||||
|  |  * @Update Date Time: | ||||||
|  |  * @see | ||||||
|  |  */ | ||||||
|  | @Configuration | ||||||
|  | public class PluginBeanConfig { | ||||||
|  |     @Bean | ||||||
|  |     public PluginApplication pluginApplication(){ | ||||||
|  |         PluginApplication pluginApplication = new AutoPluginApplication(); | ||||||
|  |         pluginApplication.addExtension(new SpringBootMybatisExtension()); | ||||||
|  |         return pluginApplication; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,104 @@ | |||||||
|  | package com.jsh.erp.config; | ||||||
|  | 
 | ||||||
|  | import com.gitee.starblues.integration.DefaultIntegrationConfiguration; | ||||||
|  | import org.pf4j.RuntimeMode; | ||||||
|  | import org.springframework.beans.factory.annotation.Value; | ||||||
|  | import org.springframework.boot.context.properties.ConfigurationProperties; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @Description: | ||||||
|  |  * @Author: jishenghua | ||||||
|  |  * @Version: 1.0 | ||||||
|  |  * @Create Date Time: 2019-05-25 12:36 | ||||||
|  |  * @Update Date Time: | ||||||
|  |  * @see | ||||||
|  |  */ | ||||||
|  | @Component | ||||||
|  | @ConfigurationProperties(prefix = "plugin") | ||||||
|  | public class PluginConfiguration extends DefaultIntegrationConfiguration { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 运行模式 | ||||||
|  |      *  开发环境: development、dev | ||||||
|  |      *  生产/部署 环境: deployment、prod | ||||||
|  |      */ | ||||||
|  |     @Value("${runMode:dev}") | ||||||
|  |     private String runMode; | ||||||
|  | 
 | ||||||
|  |     @Value("${pluginPath:plugins}") | ||||||
|  |     private String pluginPath; | ||||||
|  | 
 | ||||||
|  |     @Value("${pluginConfigFilePath:pluginConfigs}") | ||||||
|  |     private String pluginConfigFilePath; | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public RuntimeMode environment() { | ||||||
|  |         return RuntimeMode.byName(runMode); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String pluginPath() { | ||||||
|  |         return pluginPath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String pluginConfigFilePath() { | ||||||
|  |         return pluginConfigFilePath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String uploadTempPath() { | ||||||
|  |         return "temp"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String backupPath() { | ||||||
|  |         return "backupPlugin"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String pluginRestControllerPathPrefix() { | ||||||
|  |         return "/api/plugin"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public boolean enablePluginIdRestControllerPathPrefix() { | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRunMode() { | ||||||
|  |         return runMode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRunMode(String runMode) { | ||||||
|  |         this.runMode = runMode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     public String getPluginPath() { | ||||||
|  |         return pluginPath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPluginPath(String pluginPath) { | ||||||
|  |         this.pluginPath = pluginPath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPluginConfigFilePath() { | ||||||
|  |         return pluginConfigFilePath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPluginConfigFilePath(String pluginConfigFilePath) { | ||||||
|  |         this.pluginConfigFilePath = pluginConfigFilePath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public String toString() { | ||||||
|  |         return "PluginArgConfiguration{" + | ||||||
|  |                 "runMode='" + runMode + '\'' + | ||||||
|  |                 ", pluginPath='" + pluginPath + '\'' + | ||||||
|  |                 ", pluginConfigFilePath='" + pluginConfigFilePath + '\'' + | ||||||
|  |                 '}'; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,44 @@ | |||||||
|  | package com.jsh.erp.config; | ||||||
|  | 
 | ||||||
|  | import org.springframework.context.annotation.Bean; | ||||||
|  | import org.springframework.context.annotation.Configuration; | ||||||
|  | import springfox.documentation.builders.ApiInfoBuilder; | ||||||
|  | import springfox.documentation.builders.PathSelectors; | ||||||
|  | import springfox.documentation.builders.RequestHandlerSelectors; | ||||||
|  | import springfox.documentation.service.ApiInfo; | ||||||
|  | import springfox.documentation.service.Contact; | ||||||
|  | import springfox.documentation.spi.DocumentationType; | ||||||
|  | import springfox.documentation.spring.web.plugins.Docket; | ||||||
|  | import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 插件集成配置 | ||||||
|  |  * | ||||||
|  |  * @author jishenghua | ||||||
|  |  * @version 1.0 | ||||||
|  |  */ | ||||||
|  | @Configuration | ||||||
|  | @EnableSwagger2 | ||||||
|  | public class Swagger2Config { | ||||||
|  | 
 | ||||||
|  |     @Bean | ||||||
|  |     public Docket createRestApi() { | ||||||
|  |         return new Docket(DocumentationType.SWAGGER_2) | ||||||
|  |                 .apiInfo(this.apiInfo()) | ||||||
|  |                 .select() | ||||||
|  |                 .apis(RequestHandlerSelectors.any()) | ||||||
|  |                 .paths(PathSelectors.any()) | ||||||
|  |                 .build(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     private ApiInfo apiInfo() { | ||||||
|  |         return new ApiInfoBuilder() | ||||||
|  |                 .title("管伊佳ERP Restful Api") | ||||||
|  |                 .description("管伊佳ERP接口描述") | ||||||
|  |                 .termsOfServiceUrl("http://127.0.0.1") | ||||||
|  |                 .contact(new Contact("jishenghua", "", "")) | ||||||
|  |                 .version("3.0") | ||||||
|  |                 .build(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
							
								
								
									
										117
									
								
								jshERP-boot/src/main/java/com/jsh/erp/config/TenantConfig.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								jshERP-boot/src/main/java/com/jsh/erp/config/TenantConfig.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,117 @@ | |||||||
|  | package com.jsh.erp.config; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.core.parser.ISqlParser; | ||||||
|  | import com.baomidou.mybatisplus.core.parser.ISqlParserFilter; | ||||||
|  | import com.baomidou.mybatisplus.core.parser.SqlParserHelper; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.tenant.TenantHandler; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.tenant.TenantSqlParser; | ||||||
|  | import com.jsh.erp.utils.Tools; | ||||||
|  | import net.sf.jsqlparser.expression.Expression; | ||||||
|  | import net.sf.jsqlparser.expression.LongValue; | ||||||
|  | import org.apache.ibatis.mapping.MappedStatement; | ||||||
|  | import org.apache.ibatis.reflection.MetaObject; | ||||||
|  | import org.mybatis.spring.mapper.MapperScannerConfigurer; | ||||||
|  | import org.springframework.context.annotation.Bean; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | 
 | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | @Service | ||||||
|  | public class TenantConfig { | ||||||
|  | 
 | ||||||
|  |     @Bean | ||||||
|  |     public PaginationInterceptor paginationInterceptor(HttpServletRequest request) { | ||||||
|  |         PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); | ||||||
|  |         List<ISqlParser> sqlParserList = new ArrayList<>(); | ||||||
|  |         TenantSqlParser tenantSqlParser = new TenantSqlParser(); | ||||||
|  |         tenantSqlParser.setTenantHandler(new TenantHandler() { | ||||||
|  |             @Override | ||||||
|  |             public Expression getTenantId() { | ||||||
|  |                 String token = request.getHeader("X-Access-Token"); | ||||||
|  |                 Long tenantId = Tools.getTenantIdByToken(token); | ||||||
|  |                 if (tenantId!=0L) { | ||||||
|  |                     return new LongValue(tenantId); | ||||||
|  |                 } else { | ||||||
|  |                     //超管 | ||||||
|  |                     return null; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             @Override | ||||||
|  |             public String getTenantIdColumn() { | ||||||
|  |                 return "tenant_id"; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             @Override | ||||||
|  |             public boolean doTableFilter(String tableName) { | ||||||
|  |                 //获取开启状态 | ||||||
|  |                 Boolean res = true; | ||||||
|  |                 String token = request.getHeader("X-Access-Token"); | ||||||
|  |                 Long tenantId = Tools.getTenantIdByToken(token); | ||||||
|  |                 if (tenantId!=0L) { | ||||||
|  |                     // 这里可以判断是否过滤表 | ||||||
|  |                     if ("jsh_sequence".equals(tableName) || "jsh_function".equals(tableName) | ||||||
|  |                             || "jsh_platform_config".equals(tableName) || "jsh_tenant".equals(tableName)) { | ||||||
|  |                         res = true; | ||||||
|  |                     } else { | ||||||
|  |                         res = false; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 return res; | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         sqlParserList.add(tenantSqlParser); | ||||||
|  |         paginationInterceptor.setSqlParserList(sqlParserList); | ||||||
|  |         paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() { | ||||||
|  |             @Override | ||||||
|  |             public boolean doFilter(MetaObject metaObject) { | ||||||
|  |                 MappedStatement ms = SqlParserHelper.getMappedStatement(metaObject); | ||||||
|  |                 // 过滤自定义查询此时无租户信息约束出现 | ||||||
|  |                 if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserByWeixinOpenId".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.updateUserWithWeixinOpenId".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserListByUserNameOrLoginName".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.disableUserByLimit".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.RoleMapperEx.getRoleWithoutTenant".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.LogMapperEx.insertLogWithUserId".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } else if ("com.jsh.erp.datasource.mappers.UserBusinessMapperEx.getBasicDataByKeyIdAndType".equals(ms.getId())) { | ||||||
|  |                     return true; | ||||||
|  |                 } | ||||||
|  |                 return false; | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |         return paginationInterceptor; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 相当于顶部的: | ||||||
|  |      * {@code @MapperScan("com.jsh.erp.datasource.mappers*")} | ||||||
|  |      * 这里可以扩展,比如使用配置文件来配置扫描Mapper的路径 | ||||||
|  |      */ | ||||||
|  |     @Bean | ||||||
|  |     public MapperScannerConfigurer mapperScannerConfigurer() { | ||||||
|  |         MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer(); | ||||||
|  |         scannerConfigurer.setBasePackage("com.jsh.erp.datasource.mappers*"); | ||||||
|  |         return scannerConfigurer; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 性能分析拦截器,不建议生产使用 | ||||||
|  |      */ | ||||||
|  | //    @Bean | ||||||
|  | //    public PerformanceInterceptor performanceInterceptor(){ | ||||||
|  | //        return new PerformanceInterceptor(); | ||||||
|  | //    } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,230 @@ | |||||||
|  | package com.jsh.erp.constants; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @ClassName:BusinessConstants | ||||||
|  |  * @Description 业务字典类 | ||||||
|  |  * @Author qiankunpingtai | ||||||
|  |  * @Date 2019-3-6 17:58 | ||||||
|  |  * @Version 1.0 | ||||||
|  |  **/ | ||||||
|  | public class BusinessConstants { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 默认的日期格式 | ||||||
|  |      */ | ||||||
|  |     public static final String DEFAULT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; | ||||||
|  |     /** | ||||||
|  |      * 一天的初始时间 | ||||||
|  |      */ | ||||||
|  |     public static final String DAY_FIRST_TIME = " 00:00:00"; | ||||||
|  |     /** | ||||||
|  |      * 一天的结束时间 | ||||||
|  |      */ | ||||||
|  |     public static final String DAY_LAST_TIME = " 23:59:59"; | ||||||
|  |     /** | ||||||
|  |      * 默认的分页起始页页码 | ||||||
|  |      */ | ||||||
|  |     public static final Integer DEFAULT_PAGINATION_PAGE_NUMBER = 1; | ||||||
|  |     /** | ||||||
|  |      * 无数据时列表返回的默认数据条数 | ||||||
|  |      */ | ||||||
|  |     public static final Long DEFAULT_LIST_NULL_NUMBER = 0L; | ||||||
|  |     /** | ||||||
|  |      * 默认的分页条数 | ||||||
|  |      */ | ||||||
|  |     public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10; | ||||||
|  |     /** | ||||||
|  |      * 单据主表出入库类型 type 入库 出库 其它 | ||||||
|  |      * depothead | ||||||
|  |      * */ | ||||||
|  |     public static final String DEPOTHEAD_TYPE_IN = "入库"; | ||||||
|  |     public static final String DEPOTHEAD_TYPE_OUT = "出库"; | ||||||
|  |     public static final String DEPOTHEAD_TYPE_OTHER = "其它"; | ||||||
|  |     /** | ||||||
|  |      * 付款类型 payType //现付/预付款 | ||||||
|  |      * */ | ||||||
|  |     public static final String PAY_TYPE_PREPAID = "预付款"; | ||||||
|  |     public static final String PAY_TYPE_BY_CASH = "现付"; | ||||||
|  |     /** | ||||||
|  |      * 删除标记 deleteFlag  '0'未删除 '1'已删除 | ||||||
|  |      * */ | ||||||
|  |     public static final String DELETE_FLAG_DELETED = "1"; | ||||||
|  |     public static final String DELETE_FLAG_EXISTS = "0"; | ||||||
|  |     /** | ||||||
|  |      * 是否卖出 isSell  '0'未卖出 '1'已卖出 | ||||||
|  |      * */ | ||||||
|  |     public static final String IS_SELL_SELLED = "1"; | ||||||
|  |     public static final String IS_SELL_HOLD = "0"; | ||||||
|  |     /** | ||||||
|  |      * 商品是否开启序列号标识enableSerialNumber  '0'未启用 '1'启用 | ||||||
|  |      * */ | ||||||
|  |     public static final String ENABLE_SERIAL_NUMBER_ENABLED = "1"; | ||||||
|  |     public static final String ENABLE_SERIAL_NUMBER_NOT_ENABLED = "0"; | ||||||
|  |     /** | ||||||
|  |      * 商品是否开启批号标识enableBatchNumber  '0'未启用 '1'启用 | ||||||
|  |      * */ | ||||||
|  |     public static final String ENABLE_BATCH_NUMBER_ENABLED = "1"; | ||||||
|  |     public static final String ENABLE_BATCH_NUMBER_NOT_ENABLED = "0"; | ||||||
|  |     /** | ||||||
|  |      * 单据状态 billsStatus '0'未审核 '1'审核 '2'完成采购|销售 '3'部分采购|销售 | ||||||
|  |      * */ | ||||||
|  |     public static final String BILLS_STATUS_UN_AUDIT = "0"; | ||||||
|  |     public static final String BILLS_STATUS_AUDIT = "1"; | ||||||
|  |     public static final String BILLS_STATUS_SKIPED = "2"; | ||||||
|  |     public static final String BILLS_STATUS_SKIPING = "3"; | ||||||
|  |     /** | ||||||
|  |      * 单据-采购状态 purchaseStatus '0'未采购、'2'完成采购、'3'部分采购 | ||||||
|  |      * */ | ||||||
|  |     public static final String PURCHASE_STATUS_UN_AUDIT = "0"; | ||||||
|  |     public static final String PURCHASE_STATUS_SKIPED = "2"; | ||||||
|  |     public static final String PURCHASE_STATUS_SKIPING = "3"; | ||||||
|  |     /** | ||||||
|  |      * 出入库分类 | ||||||
|  |      * 请购单、采购、采购退货、其它、零售、销售、调拨、盘点复盘等 | ||||||
|  |      * */ | ||||||
|  |     public static final String SUB_TYPE_PURCHASE_APPLY = "请购单"; | ||||||
|  |     public static final String SUB_TYPE_PURCHASE_ORDER = "采购订单"; | ||||||
|  |     public static final String SUB_TYPE_PURCHASE = "采购"; | ||||||
|  |     public static final String SUB_TYPE_PURCHASE_RETURN = "采购退货"; | ||||||
|  |     public static final String SUB_TYPE_OTHER = "其它"; | ||||||
|  |     public static final String SUB_TYPE_RETAIL = "零售"; | ||||||
|  |     public static final String SUB_TYPE_RETAIL_RETURN = "零售退货"; | ||||||
|  |     public static final String SUB_TYPE_SALES_ORDER = "销售订单"; | ||||||
|  |     public static final String SUB_TYPE_SALES = "销售"; | ||||||
|  |     public static final String SUB_TYPE_SALES_RETURN = "销售退货"; | ||||||
|  |     public static final String SUB_TYPE_TRANSFER = "调拨"; | ||||||
|  |     public static final String SUB_TYPE_CHECK_ENTER = "盘点录入"; | ||||||
|  |     public static final String SUB_TYPE_REPLAY = "盘点复盘"; | ||||||
|  |     public static final String SUB_TYPE_ASSEMBLE = "组装单"; | ||||||
|  |     public static final String SUB_TYPE_DISASSEMBLE = "拆卸单"; | ||||||
|  |     /** | ||||||
|  |      * 生产类型分类 | ||||||
|  |      * 生产入库 | ||||||
|  |      * */ | ||||||
|  |     public static final String BILL_TYPE_PRODUCE_IN = "生产入库"; | ||||||
|  |     /** | ||||||
|  |      * 财务单据分类 | ||||||
|  |      * 收款、付款、转账 | ||||||
|  |      * */ | ||||||
|  |     public static final String TYPE_MONEY_IN = "收款"; | ||||||
|  |     public static final String TYPE_MONEY_OUT = "付款"; | ||||||
|  |     public static final String TYPE_GIRO = "转账"; | ||||||
|  |     /** | ||||||
|  |      * 批量插入sql时最大的数据条数 | ||||||
|  |      * */ | ||||||
|  |     public static final int BATCH_INSERT_MAX_NUMBER = 500; | ||||||
|  |     /** | ||||||
|  |      * sequence名称 | ||||||
|  |      * */ | ||||||
|  |     //sequence返回字符串的最小长度 | ||||||
|  |     public static final Long SEQ_TO_STRING_MIN_LENGTH = 10000000000L; | ||||||
|  |     //sequence长度小于基准长度时前追加基础值 | ||||||
|  |     public static final String SEQ_TO_STRING_LESS_INSERT = "0"; | ||||||
|  |     //单据编号 | ||||||
|  |     public static final String DEPOT_NUMBER_SEQ = "depot_number_seq"; | ||||||
|  |     /** | ||||||
|  |      * 商品类别根目录id | ||||||
|  |      * */ | ||||||
|  |     /** | ||||||
|  |      * create by: qiankunpingtai | ||||||
|  |      * create time: 2019/3/14 11:41 | ||||||
|  |      * description: | ||||||
|  |      * 为了使用户可以自己建初始目录,设定根目录的父级目录id为-1 | ||||||
|  |      * | ||||||
|  |      */ | ||||||
|  |     public static final Long MATERIAL_CATEGORY_ROOT_PARENT_ID = -1L; | ||||||
|  |     /** | ||||||
|  |      * 商品类别状态 | ||||||
|  |      * 0系统默认,1启用,2删除 | ||||||
|  |      * */ | ||||||
|  |     public static final String MATERIAL_CATEGORY_STATUS_DEFAULT = "0"; | ||||||
|  |     public static final String MATERIAL_CATEGORY_STATUS_ENABLE = "1"; | ||||||
|  |     public static final String MATERIAL_CATEGORY_STATUS_DELETE = "2"; | ||||||
|  |     /** | ||||||
|  |      * 机构状态 | ||||||
|  |      *  1未营业、2正常营业、3暂停营业、4终止营业,5已除名 | ||||||
|  |      * */ | ||||||
|  |     public static final String ORGANIZATION_STCD_NOT_OPEN = "1"; | ||||||
|  |     public static final String ORGANIZATION_STCD_OPEN = "2"; | ||||||
|  |     public static final String ORGANIZATION_STCD_BUSINESS_SUSPENDED = "3"; | ||||||
|  |     public static final String ORGANIZATION_STCD_BUSINESS_TERMINATED = "4"; | ||||||
|  |     public static final String ORGANIZATION_STCD_REMOVED = "5"; | ||||||
|  |     /** | ||||||
|  |      * 根机构父级编号 | ||||||
|  |      * 根机父级构编号默认为-1 | ||||||
|  |      * */ | ||||||
|  |     public static final String ORGANIZATION_ROOT_PARENT_NO = "-1"; | ||||||
|  |     /** | ||||||
|  |      * 新增用户默认密码 | ||||||
|  |      * */ | ||||||
|  |     public static final String USER_DEFAULT_PASSWORD = "123456"; | ||||||
|  |     /** | ||||||
|  |      * 用户是否系统自带 | ||||||
|  |      * 0、非系统自带,1系统自带 | ||||||
|  |      * */ | ||||||
|  |     public static final byte USER_NOT_SYSTEM = 0; | ||||||
|  |     public static final byte USER_IS_SYSTEM = 1; | ||||||
|  |     /** | ||||||
|  |      * 用户是否为管理者 | ||||||
|  |      * 0、管理者,1员工 | ||||||
|  |      * */ | ||||||
|  |     public static final byte USER_IS_MANAGER = 0; | ||||||
|  |     public static final byte USER_NOT_MANAGER = 1; | ||||||
|  |     /** | ||||||
|  |      * 用户状态 | ||||||
|  |      * 0:正常,2封禁 | ||||||
|  |      * */ | ||||||
|  |     public static final byte USER_STATUS_NORMAL = 0; | ||||||
|  |     public static final byte USER_STATUS_BANNED = 2; | ||||||
|  |     /** | ||||||
|  |      * 日志操作 | ||||||
|  |      * 新增、修改、删除、登录、导入 | ||||||
|  |      * */ | ||||||
|  |     public static final String LOG_OPERATION_TYPE_ADD = "新增"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_BATCH_ADD = "批量新增"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_EDIT = "修改"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_DELETE = "删除"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_LOGIN = "登录"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_IMPORT = "导入"; | ||||||
|  |     public static final String LOG_OPERATION_TYPE_ENABLED = "更新状态"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 数据数量单位 | ||||||
|  |      * 条 | ||||||
|  |      * */ | ||||||
|  |     public static final String LOG_DATA_UNIT = "条"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 删除类型 | ||||||
|  |      * 1正常删除 | ||||||
|  |      * 2强制删除 | ||||||
|  |      * */ | ||||||
|  |     public static final String DELETE_TYPE_NORMAL = "1"; | ||||||
|  |     public static final String DELETE_TYPE_FORCE = "2"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 默认管理员账号 | ||||||
|  |      */ | ||||||
|  |     public static final String DEFAULT_MANAGER = "admin"; | ||||||
|  | 
 | ||||||
|  |     public static final String ROLE_TYPE_PRIVATE = "个人数据"; | ||||||
|  | 
 | ||||||
|  |     public static final String ROLE_TYPE_THIS_ORG = "本机构数据"; | ||||||
|  | 
 | ||||||
|  |     public static final String ROLE_TYPE_PUBLIC = "全部数据"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * redis相关 | ||||||
|  |      * */ | ||||||
|  |     //session的生命周期,秒 | ||||||
|  |     public static final Long MAX_SESSION_IN_SECONDS=60*60*24*3L; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 验证码 redis key | ||||||
|  |      */ | ||||||
|  |     public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; | ||||||
|  |     /** | ||||||
|  |      * 验证码有效期(分钟) | ||||||
|  |      */ | ||||||
|  |     public static final Integer CAPTCHA_EXPIRATION = 2; | ||||||
|  | } | ||||||
| @ -0,0 +1,581 @@ | |||||||
|  | package com.jsh.erp.constants; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | 
 | ||||||
|  | public class ExceptionConstants { | ||||||
|  |     /** | ||||||
|  |      * code 格式 type+五位数字,例如3500000 | ||||||
|  |      * ResourceInfo(value = "inOutItem", type = 35) | ||||||
|  |      * | ||||||
|  |      * */ | ||||||
|  | 
 | ||||||
|  |     public static final String GLOBAL_RETURNS_CODE = "code"; | ||||||
|  |     public static final String GLOBAL_RETURNS_MESSAGE = "msg"; | ||||||
|  |     public static final String GLOBAL_RETURNS_DATA = "data"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 正常返回/操作成功 | ||||||
|  |      **/ | ||||||
|  |     public static final int SERVICE_SUCCESS_CODE = 200; | ||||||
|  |     public static final String SERVICE_SUCCESS_MSG = "操作成功"; | ||||||
|  |     /** | ||||||
|  |      * 数据查询异常 | ||||||
|  |      */ | ||||||
|  |     public static final int DATA_READ_FAIL_CODE = 300; | ||||||
|  |     public static final String DATA_READ_FAIL_MSG = "数据查询异常"; | ||||||
|  |     /** | ||||||
|  |      * 数据写入异常 | ||||||
|  |      */ | ||||||
|  |     public static final int DATA_WRITE_FAIL_CODE = 301; | ||||||
|  |     public static final String DATA_WRITE_FAIL_MSG = "数据写入异常"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 系统运行时未知错误 | ||||||
|  |      **/ | ||||||
|  |     public static final int SERVICE_SYSTEM_ERROR_CODE = 500; | ||||||
|  |     public static final String SERVICE_SYSTEM_ERROR_MSG = "未知异常"; | ||||||
|  |     /** | ||||||
|  |      * 检测到存在依赖数据,是否强制删除? | ||||||
|  |      **/ | ||||||
|  |     public static final int DELETE_FORCE_CONFIRM_CODE = 601; | ||||||
|  |     public static final String DELETE_FORCE_CONFIRM_MSG = "检测到存在依赖数据,不能删除!"; | ||||||
|  |     /** | ||||||
|  |      * 用户信息 | ||||||
|  |      * type = 5 | ||||||
|  |      * */ | ||||||
|  |     //添加用户信息失败 | ||||||
|  |     public static final int USER_ADD_FAILED_CODE = 500000; | ||||||
|  |     public static final String USER_ADD_FAILED_MSG = "添加用户信息失败"; | ||||||
|  |     //删除用户信息失败 | ||||||
|  |     public static final int USER_DELETE_FAILED_CODE = 500001; | ||||||
|  |     public static final String USER_DELETE_FAILED_MSG = "删除用户信息失败"; | ||||||
|  |     //修改用户信息失败 | ||||||
|  |     public static final int USER_EDIT_FAILED_CODE = 500002; | ||||||
|  |     public static final String USER_EDIT_FAILED_MSG = "修改用户信息失败"; | ||||||
|  |     //登录名已存在 | ||||||
|  |     public static final int USER_LOGIN_NAME_ALREADY_EXISTS_CODE = 500003; | ||||||
|  |     public static final String USER_LOGIN_NAME_ALREADY_EXISTS_MSG = "登录名在本系统已存在"; | ||||||
|  |     //用户录入数量超出限制 | ||||||
|  |     public static final int USER_OVER_LIMIT_FAILED_CODE = 500004; | ||||||
|  |     public static final String USER_OVER_LIMIT_FAILED_MSG = "用户录入数量超出限制,请联系平台管理员"; | ||||||
|  |     //此用户名限制使用 | ||||||
|  |     public static final int USER_NAME_LIMIT_USE_CODE = 500005; | ||||||
|  |     public static final String USER_NAME_LIMIT_USE_MSG = "此用户名限制使用"; | ||||||
|  |     //启用的用户数量超出限制 | ||||||
|  |     public static final int USER_ENABLE_OVER_LIMIT_FAILED_CODE = 500006; | ||||||
|  |     public static final String USER_ENABLE_OVER_LIMIT_FAILED_MSG = "启用的用户数量超出限制,请联系平台管理员"; | ||||||
|  |     //租户不能被删除 | ||||||
|  |     public static final int USER_LIMIT_TENANT_DELETE_CODE = 500008; | ||||||
|  |     public static final String USER_LIMIT_TENANT_DELETE_MSG = "抱歉,租户不能被删除"; | ||||||
|  |     //当前机构已经存在经理 | ||||||
|  |     public static final int USER_LEADER_IS_EXIST_CODE = 500009; | ||||||
|  |     public static final String USER_LEADER_IS_EXIST_MSG = "抱歉,当前机构已经存在经理"; | ||||||
|  |     //验证码错误 | ||||||
|  |     public static final int USER_JCAPTCHA_ERROR_CODE = 500010; | ||||||
|  |     public static final String USER_JCAPTCHA_ERROR_MSG = "验证码错误"; | ||||||
|  |     //验证码已失效 | ||||||
|  |     public static final int USER_JCAPTCHA_EXPIRE_CODE = 500011; | ||||||
|  |     public static final String USER_JCAPTCHA_EXPIRE_MSG = "验证码已失效"; | ||||||
|  |     //验证码不能为空 | ||||||
|  |     public static final int USER_JCAPTCHA_EMPTY_CODE = 500012; | ||||||
|  |     public static final String USER_JCAPTCHA_EMPTY_MSG = "验证码不能为空"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 角色信息 | ||||||
|  |      * type = 10 | ||||||
|  |      * */ | ||||||
|  |     //添加角色信息失败 | ||||||
|  |     public static final int ROLE_ADD_FAILED_CODE = 1000000; | ||||||
|  |     public static final String ROLE_ADD_FAILED_MSG = "添加角色信息失败"; | ||||||
|  |     //删除角色信息失败 | ||||||
|  |     public static final int ROLE_DELETE_FAILED_CODE = 1000001; | ||||||
|  |     public static final String ROLE_DELETE_FAILED_MSG = "删除角色信息失败"; | ||||||
|  |     //修改角色信息失败 | ||||||
|  |     public static final int ROLE_EDIT_FAILED_CODE = 1000002; | ||||||
|  |     public static final String ROLE_EDIT_FAILED_MSG = "修改角色信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 应用信息 | ||||||
|  |      * type = 15 | ||||||
|  |      * */ | ||||||
|  |     //添加角色信息失败 | ||||||
|  |     public static final int APP_ADD_FAILED_CODE = 1500000; | ||||||
|  |     public static final String APP_ADD_FAILED_MSG = "添加应用信息失败"; | ||||||
|  |     //删除角色信息失败 | ||||||
|  |     public static final int APP_DELETE_FAILED_CODE = 1500001; | ||||||
|  |     public static final String APP_DELETE_FAILED_MSG = "删除应用信息失败"; | ||||||
|  |     //修改角色信息失败 | ||||||
|  |     public static final int APP_EDIT_FAILED_CODE = 1500002; | ||||||
|  |     public static final String APP_EDIT_FAILED_MSG = "修改应用信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  仓库信息 | ||||||
|  |      * type = 20 | ||||||
|  |      * */ | ||||||
|  |     //添加仓库信息失败 | ||||||
|  |     public static final int DEPOT_ADD_FAILED_CODE = 2000000; | ||||||
|  |     public static final String DEPOT_ADD_FAILED_MSG = "添加仓库信息失败"; | ||||||
|  |     //删除仓库信息失败 | ||||||
|  |     public static final int DEPOT_DELETE_FAILED_CODE = 2000001; | ||||||
|  |     public static final String DEPOT_DELETE_FAILED_MSG = "删除仓库信息失败"; | ||||||
|  |     //修改仓库信息失败 | ||||||
|  |     public static final int DEPOT_EDIT_FAILED_CODE = 2000002; | ||||||
|  |     public static final String DEPOT_EDIT_FAILED_MSG = "修改仓库信息失败"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 功能模块信息 | ||||||
|  |      * type = 30 | ||||||
|  |      * */ | ||||||
|  |     //添加角色信息失败 | ||||||
|  |     public static final int FUNCTIONS_ADD_FAILED_CODE = 3000000; | ||||||
|  |     public static final String FUNCTIONS_ADD_FAILED_MSG = "添加功能模块信息失败"; | ||||||
|  |     //删除角色信息失败 | ||||||
|  |     public static final int FUNCTIONS_DELETE_FAILED_CODE = 3000001; | ||||||
|  |     public static final String FUNCTIONS_DELETE_FAILED_MSG = "删除功能模块信息失败"; | ||||||
|  |     //修改角色信息失败 | ||||||
|  |     public static final int FUNCTIONS_EDIT_FAILED_CODE = 3000002; | ||||||
|  |     public static final String FUNCTIONS_EDIT_FAILED_MSG = "修改功能模块信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 收支项目信息 | ||||||
|  |      * type = 35 | ||||||
|  |      * */ | ||||||
|  |     //添加收支项目信息失败 | ||||||
|  |     public static final int IN_OUT_ITEM_ADD_FAILED_CODE = 3500000; | ||||||
|  |     public static final String IN_OUT_ITEM_ADD_FAILED_MSG = "添加收支项目信息失败"; | ||||||
|  |     //删除收支项目信息失败 | ||||||
|  |     public static final int IN_OUT_ITEM_DELETE_FAILED_CODE = 3500001; | ||||||
|  |     public static final String IN_OUT_ITEM_DELETE_FAILED_MSG = "删除收支项目信息失败"; | ||||||
|  |     //修改收支项目信息失败 | ||||||
|  |     public static final int IN_OUT_ITEM_EDIT_FAILED_CODE = 3500002; | ||||||
|  |     public static final String IN_OUT_ITEM_EDIT_FAILED_MSG = "修改收支项目信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  多单位信息 | ||||||
|  |      * type = 40 | ||||||
|  |      * */ | ||||||
|  |     //添加多单位信息失败 | ||||||
|  |     public static final int UNIT_ADD_FAILED_CODE = 4000000; | ||||||
|  |     public static final String UNIT_ADD_FAILED_MSG = "添加多单位信息失败"; | ||||||
|  |     //删除多单位信息失败 | ||||||
|  |     public static final int UNIT_DELETE_FAILED_CODE = 4000001; | ||||||
|  |     public static final String UNIT_DELETE_FAILED_MSG = "删除多单位信息失败"; | ||||||
|  |     //修改多单位信息失败 | ||||||
|  |     public static final int UNIT_EDIT_FAILED_CODE = 4000002; | ||||||
|  |     public static final String UNIT_EDIT_FAILED_MSG = "修改多单位信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  经手人信息 | ||||||
|  |      * type = 45 | ||||||
|  |      * */ | ||||||
|  |     //添加经手人信息失败 | ||||||
|  |     public static final int PERSON_ADD_FAILED_CODE = 4500000; | ||||||
|  |     public static final String PERSON_ADD_FAILED_MSG = "添加经手人信息失败"; | ||||||
|  |     //删除经手人信息失败 | ||||||
|  |     public static final int PERSON_DELETE_FAILED_CODE = 4500001; | ||||||
|  |     public static final String PERSON_DELETE_FAILED_MSG = "删除经手人信息失败"; | ||||||
|  |     //修改经手人信息失败 | ||||||
|  |     public static final int PERSON_EDIT_FAILED_CODE = 4500002; | ||||||
|  |     public static final String PERSON_EDIT_FAILED_MSG = "修改经手人信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 用户角色模块关系信息 | ||||||
|  |      * type = 50 | ||||||
|  |      * */ | ||||||
|  |     //添加用户角色模块关系信息失败 | ||||||
|  |     public static final int USER_BUSINESS_ADD_FAILED_CODE = 5000000; | ||||||
|  |     public static final String USER_BUSINESS_ADD_FAILED_MSG = "添加用户角色模块关系信息失败"; | ||||||
|  |     //删除用户角色模块关系信息失败 | ||||||
|  |     public static final int USER_BUSINESS_DELETE_FAILED_CODE = 5000001; | ||||||
|  |     public static final String USER_BUSINESS_DELETE_FAILED_MSG = "删除用户角色模块关系信息失败"; | ||||||
|  |     //修改用户角色模块关系信息失败 | ||||||
|  |     public static final int USER_BUSINESS_EDIT_FAILED_CODE = 5000002; | ||||||
|  |     public static final String USER_BUSINESS_EDIT_FAILED_MSG = "修改用户角色模块关系信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  系统参数信息 | ||||||
|  |      * type = 55 | ||||||
|  |      * */ | ||||||
|  |     //添加系统参数信息失败 | ||||||
|  |     public static final int SYSTEM_CONFIG_ADD_FAILED_CODE = 5500000; | ||||||
|  |     public static final String SYSTEM_CONFIG_ADD_FAILED_MSG = "添加系统参数信息失败"; | ||||||
|  |     //删除系统参数信息失败 | ||||||
|  |     public static final int SYSTEM_CONFIG_DELETE_FAILED_CODE = 5500001; | ||||||
|  |     public static final String SYSTEM_CONFIG_DELETE_FAILED_MSG = "删除系统参数信息失败"; | ||||||
|  |     //修改系统参数信息失败 | ||||||
|  |     public static final int SYSTEM_CONFIG_EDIT_FAILED_CODE = 5500002; | ||||||
|  |     public static final String SYSTEM_CONFIG_EDIT_FAILED_MSG = "修改系统参数信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 商品扩展信息 | ||||||
|  |      * type = 60 | ||||||
|  |      * */ | ||||||
|  |     //添加商品扩展信息失败 | ||||||
|  |     public static final int MATERIAL_PROPERTY_ADD_FAILED_CODE = 6000000; | ||||||
|  |     public static final String MATERIAL_PROPERTY_ADD_FAILED_MSG = "添加商品扩展信息失败"; | ||||||
|  |     //删除商品扩展信息失败 | ||||||
|  |     public static final int MATERIAL_PROPERTY_DELETE_FAILED_CODE = 6000001; | ||||||
|  |     public static final String MATERIAL_PROPERTY_DELETE_FAILED_MSG = "删除商品扩展信息失败"; | ||||||
|  |     //修改商品扩展信息失败 | ||||||
|  |     public static final int MATERIAL_PROPERTY_EDIT_FAILED_CODE = 6000002; | ||||||
|  |     public static final String MATERIAL_PROPERTY_EDIT_FAILED_MSG = "修改商品扩展信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  账户信息 | ||||||
|  |      * type = 65 | ||||||
|  |      * */ | ||||||
|  |     //添加账户信息失败 | ||||||
|  |     public static final int ACCOUNT_ADD_FAILED_CODE = 6500000; | ||||||
|  |     public static final String ACCOUNT_ADD_FAILED_MSG = "添加账户信息失败"; | ||||||
|  |     //删除账户信息失败 | ||||||
|  |     public static final int ACCOUNT_DELETE_FAILED_CODE = 6500001; | ||||||
|  |     public static final String ACCOUNT_DELETE_FAILED_MSG = "删除账户信息失败"; | ||||||
|  |     //修改账户信息失败 | ||||||
|  |     public static final int ACCOUNT_EDIT_FAILED_CODE = 6500002; | ||||||
|  |     public static final String ACCOUNT_EDIT_FAILED_MSG = "修改账户信息失败"; | ||||||
|  |     /** | ||||||
|  |      *  供应商信息 | ||||||
|  |      * type = 70 | ||||||
|  |      * */ | ||||||
|  |     //添加供应商信息失败 | ||||||
|  |     public static final int SUPPLIER_ADD_FAILED_CODE = 7000000; | ||||||
|  |     public static final String SUPPLIER_ADD_FAILED_MSG = "添加供应商信息失败"; | ||||||
|  |     //删除供应商信息失败 | ||||||
|  |     public static final int SUPPLIER_DELETE_FAILED_CODE = 7000001; | ||||||
|  |     public static final String SUPPLIER_DELETE_FAILED_MSG = "删除供应商信息失败"; | ||||||
|  |     //修改供应商信息失败 | ||||||
|  |     public static final int SUPPLIER_EDIT_FAILED_CODE = 7000002; | ||||||
|  |     public static final String SUPPLIER_EDIT_FAILED_MSG = "修改供应商信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 商品类别信息 | ||||||
|  |      * type = 75 | ||||||
|  |      * */ | ||||||
|  |     //添加商品类别信息失败 | ||||||
|  |     public static final int MATERIAL_CATEGORY_ADD_FAILED_CODE = 7500000; | ||||||
|  |     public static final String MATERIAL_CATEGORY_ADD_FAILED_MSG = "添加商品类别信息失败"; | ||||||
|  |     //删除商品类别信息失败 | ||||||
|  |     public static final int MATERIAL_CATEGORY_DELETE_FAILED_CODE = 7500001; | ||||||
|  |     public static final String MATERIAL_CATEGORY_DELETE_FAILED_MSG = "删除商品类别信息失败"; | ||||||
|  |     //修改商品类别信息失败 | ||||||
|  |     public static final int MATERIAL_CATEGORY_EDIT_FAILED_CODE = 7500002; | ||||||
|  |     public static final String MATERIAL_CATEGORY_EDIT_FAILED_MSG = "修改商品类别信息失败"; | ||||||
|  |     //商品类别编号已存在 | ||||||
|  |     public static final int MATERIAL_CATEGORY_SERIAL_ALREADY_EXISTS_CODE = 7500003; | ||||||
|  |     public static final String MATERIAL_CATEGORY_SERIAL_ALREADY_EXISTS_MSG = "商品类别编号已存在"; | ||||||
|  |     //根类别不支持修改 | ||||||
|  |     public static final int MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_EDIT_CODE = 7500004; | ||||||
|  |     public static final String MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_EDIT_MSG = "根类别不支持修改"; | ||||||
|  |     //根类别不支持删除 | ||||||
|  |     public static final int MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_DELETE_CODE = 7500005; | ||||||
|  |     public static final String MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_DELETE_MSG = "根类别不支持删除"; | ||||||
|  |     //该类别存在下级不允许删除 | ||||||
|  |     public static final int MATERIAL_CATEGORY_CHILD_NOT_SUPPORT_DELETE_CODE = 7500006; | ||||||
|  |     public static final String MATERIAL_CATEGORY_CHILD_NOT_SUPPORT_DELETE_MSG = "该类别存在下级不允许删除"; | ||||||
|  |     /** | ||||||
|  |      * 商品信息 | ||||||
|  |      * type = 80 | ||||||
|  |      * */ | ||||||
|  |     //商品信息不存在 | ||||||
|  |     public static final int MATERIAL_NOT_EXISTS_CODE = 8000000; | ||||||
|  |     public static final String MATERIAL_NOT_EXISTS_MSG = "商品信息不存在"; | ||||||
|  |     //商品信息不唯一 | ||||||
|  |     public static final int MATERIAL_NOT_ONLY_CODE = 8000001; | ||||||
|  |     public static final String MATERIAL_NOT_ONLY_MSG = "商品信息不唯一"; | ||||||
|  |     //该商品未开启序列号 | ||||||
|  |     public static final int MATERIAL_NOT_ENABLE_SERIAL_NUMBER_CODE = 8000002; | ||||||
|  |     public static final String MATERIAL_NOT_ENABLE_SERIAL_NUMBER_MSG = "该商品未开启序列号功能"; | ||||||
|  |     //商品的序列号不能为空 | ||||||
|  |     public static final int MATERIAL_SERIAL_NUMBERE_EMPTY_CODE = 8000003; | ||||||
|  |     public static final String MATERIAL_SERIAL_NUMBERE_EMPTY_MSG = "抱歉,商品条码:%s的序列号不能为空"; | ||||||
|  |     //商品库存不足 | ||||||
|  |     public static final int MATERIAL_STOCK_NOT_ENOUGH_CODE = 8000004; | ||||||
|  |     public static final String MATERIAL_STOCK_NOT_ENOUGH_MSG = "商品:%s库存不足"; | ||||||
|  |     //商品条码重复 | ||||||
|  |     public static final int MATERIAL_BARCODE_EXISTS_CODE = 8000005; | ||||||
|  |     public static final String MATERIAL_BARCODE_EXISTS_MSG = "商品条码:%s重复"; | ||||||
|  |     //商品-单位匹配不上 | ||||||
|  |     public static final int MATERIAL_UNIT_MATE_CODE = 8000006; | ||||||
|  |     public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上,请完善多单位信息!"; | ||||||
|  |     //商品条码长度应该为4到40位 | ||||||
|  |     public static final int MATERIAL_BARCODE_LENGTH_ERROR_CODE = 8000007; | ||||||
|  |     public static final String MATERIAL_BARCODE_LENGTH_ERROR_MSG = "商品条码:%s的长度应该为4到40位"; | ||||||
|  |     //序列号和批号只能有一项 | ||||||
|  |     public static final int MATERIAL_ENABLE_MUST_ONE_CODE = 8000008; | ||||||
|  |     public static final String MATERIAL_ENABLE_MUST_ONE_MSG = "抱歉,商品条码:%s的序列号和批号不能同时填1"; | ||||||
|  |     //抱歉,文件扩展名必须为xls | ||||||
|  |     public static final int MATERIAL_EXTENSION_ERROR_CODE = 8000009; | ||||||
|  |     public static final String MATERIAL_EXTENSION_ERROR_MSG = "抱歉,文件扩展名必须为xls"; | ||||||
|  |     //名称为空 | ||||||
|  |     public static final int MATERIAL_NAME_EMPTY_CODE = 8000010; | ||||||
|  |     public static final String MATERIAL_NAME_EMPTY_MSG = "第%s行名称为空"; | ||||||
|  |     //基本单位为空 | ||||||
|  |     public static final int MATERIAL_UNIT_EMPTY_CODE = 8000011; | ||||||
|  |     public static final String MATERIAL_UNIT_EMPTY_MSG = "第%s行基本单位为空"; | ||||||
|  |     //状态格式错误 | ||||||
|  |     public static final int MATERIAL_ENABLED_ERROR_CODE = 8000012; | ||||||
|  |     public static final String MATERIAL_ENABLED_ERROR_MSG = "第%s行状态格式错误"; | ||||||
|  |     //单次导入超出1000条 | ||||||
|  |     public static final int MATERIAL_IMPORT_OVER_LIMIT_CODE = 8000013; | ||||||
|  |     public static final String MATERIAL_IMPORT_OVER_LIMIT_MSG = "抱歉,单次导入不能超出1000条"; | ||||||
|  |     //基础重量格式错误 | ||||||
|  |     public static final int MATERIAL_WEIGHT_NOT_DECIMAL_CODE = 8000014; | ||||||
|  |     public static final String MATERIAL_WEIGHT_NOT_DECIMAL_MSG = "第%s行基础重量格式错误"; | ||||||
|  |     //保质期格式错误 | ||||||
|  |     public static final int MATERIAL_EXPIRY_NUM_NOT_INTEGER_CODE = 8000015; | ||||||
|  |     public static final String MATERIAL_EXPIRY_NUM_NOT_INTEGER_MSG = "第%s行保质期格式错误"; | ||||||
|  |     //比例格式错误 | ||||||
|  |     public static final int MATERIAL_RATIO_NOT_INTEGER_CODE = 8000016; | ||||||
|  |     public static final String MATERIAL_RATIO_NOT_INTEGER_MSG = "第%s行比例格式错误"; | ||||||
|  |     //组装拆卸单不能选择批号或序列号商品 | ||||||
|  |     public static final int MATERIAL_ASSEMBLE_SELECT_ERROR_CODE = 80000017; | ||||||
|  |     public static final String MATERIAL_ASSEMBLE_SELECT_ERROR_MSG = "抱歉,组装拆卸单不能选择批号或序列号商品:%s"; | ||||||
|  |     //调拨单不能选择批号或序列号商品 | ||||||
|  |     public static final int MATERIAL_TRANSFER_SELECT_ERROR_CODE = 80000018; | ||||||
|  |     public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s,建议走其它入库和出库单"; | ||||||
|  |     //盘点业务不能选择批号或序列号商品 | ||||||
|  |     public static final int MATERIAL_STOCK_CHECK_ERROR_CODE = 80000019; | ||||||
|  |     public static final String MATERIAL_STOCK_CHECK_ERROR_MSG = "抱歉,盘点业务不能选择批号或序列号商品:%s,建议走其它入库和出库单"; | ||||||
|  |     //EXCEL中存在重复的商品 | ||||||
|  |     public static final int MATERIAL_EXCEL_IMPORT_EXIST_CODE = 80000020; | ||||||
|  |     public static final String MATERIAL_EXCEL_IMPORT_EXIST_MSG = "抱歉,EXCEL中存在重复的商品,具体信息为:%s"; | ||||||
|  |     //EXCEL中存在重复的条码 | ||||||
|  |     public static final int MATERIAL_EXCEL_IMPORT_BARCODE_EXIST_CODE = 80000021; | ||||||
|  |     public static final String MATERIAL_EXCEL_IMPORT_BARCODE_EXIST_MSG = "抱歉,EXCEL中存在重复的条码,具体条码为:%s"; | ||||||
|  |     //名称长度超出 | ||||||
|  |     public static final int MATERIAL_NAME_OVER_CODE = 8000022; | ||||||
|  |     public static final String MATERIAL_NAME_OVER_MSG = "第%s行名称长度超出100个字符"; | ||||||
|  |     //规格长度超出 | ||||||
|  |     public static final int MATERIAL_STANDARD_OVER_CODE = 8000023; | ||||||
|  |     public static final String MATERIAL_STANDARD_OVER_MSG = "第%s行规格长度超出100个字符"; | ||||||
|  |     //型号长度超出 | ||||||
|  |     public static final int MATERIAL_MODEL_OVER_CODE = 8000024; | ||||||
|  |     public static final String MATERIAL_MODEL_OVER_MSG = "第%s行型号长度超出100个字符"; | ||||||
|  |     //多属性商品不能输入库存,建议进行盘点录入 | ||||||
|  |     public static final int MATERIAL_SKU_BEGIN_STOCK_FAILED_CODE = 8000025; | ||||||
|  |     public static final String MATERIAL_SKU_BEGIN_STOCK_FAILED_MSG = "多属性商品%s不能输入库存,建议进行盘点录入"; | ||||||
|  |     //商品条码不存在,请重新选择 | ||||||
|  |     public static final int MATERIAL_BARCODE_IS_NOT_EXIST_CODE = 8000026; | ||||||
|  |     public static final String MATERIAL_BARCODE_IS_NOT_EXIST_MSG = "商品条码%s不存在,请重新选择"; | ||||||
|  |     //基本条码为空 | ||||||
|  |     public static final int MATERIAL_BARCODE_EMPTY_CODE = 8000027; | ||||||
|  |     public static final String MATERIAL_BARCODE_EMPTY_MSG = "第%s行基本条码为空"; | ||||||
|  |     //EXCEL中有副条码在系统中已存在(除自身商品之外) | ||||||
|  |     public static final int MATERIAL_EXCEL_IMPORT_MANY_BARCODE_EXIST_CODE = 80000028; | ||||||
|  |     public static final String MATERIAL_EXCEL_IMPORT_MANY_BARCODE_EXIST_MSG = "抱歉,EXCEL中有副条码在系统中已存在,具体副条码为:%s"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      *  单据信息 | ||||||
|  |      * type = 85 | ||||||
|  |      * */ | ||||||
|  |     //添加单据信息失败 | ||||||
|  |     public static final int DEPOT_HEAD_ADD_FAILED_CODE = 8500000; | ||||||
|  |     public static final String DEPOT_HEAD_ADD_FAILED_MSG = "添加单据信息失败"; | ||||||
|  |     //删除单据信息失败 | ||||||
|  |     public static final int DEPOT_HEAD_DELETE_FAILED_CODE = 8500001; | ||||||
|  |     public static final String DEPOT_HEAD_DELETE_FAILED_MSG = "删除单据信息失败"; | ||||||
|  |     //修改单据信息失败 | ||||||
|  |     public static final int DEPOT_HEAD_EDIT_FAILED_CODE = 8500002; | ||||||
|  |     public static final String DEPOT_HEAD_EDIT_FAILED_MSG = "修改单据信息失败"; | ||||||
|  |     //单据录入-仓库不能为空 | ||||||
|  |     public static final int DEPOT_HEAD_DEPOT_FAILED_CODE = 8500004; | ||||||
|  |     public static final String DEPOT_HEAD_DEPOT_FAILED_MSG = "仓库不能为空"; | ||||||
|  |     //单据录入-调入仓库不能为空 | ||||||
|  |     public static final int DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE = 8500005; | ||||||
|  |     public static final String DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG = "调入仓库不能为空"; | ||||||
|  |     //单据录入-明细不能为空 | ||||||
|  |     public static final int DEPOT_HEAD_ROW_FAILED_CODE = 8500006; | ||||||
|  |     public static final String DEPOT_HEAD_ROW_FAILED_MSG = "单据明细不能为空"; | ||||||
|  |     //单据录入-账户不能为空 | ||||||
|  |     public static final int DEPOT_HEAD_ACCOUNT_FAILED_CODE = 8500007; | ||||||
|  |     public static final String DEPOT_HEAD_ACCOUNT_FAILED_MSG = "结算账户不能为空"; | ||||||
|  |     //单据录入-请修改多账户的结算金额 | ||||||
|  |     public static final int DEPOT_HEAD_MANY_ACCOUNT_FAILED_CODE = 8500008; | ||||||
|  |     public static final String DEPOT_HEAD_MANY_ACCOUNT_FAILED_MSG = "请修改多账户的结算金额"; | ||||||
|  |     //单据录入-调入仓库与原仓库不能重复 | ||||||
|  |     public static final int DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_CODE = 8500010; | ||||||
|  |     public static final String DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_MSG = "调入仓库与原仓库不能重复"; | ||||||
|  |     //单据删除-只有未审核的单据才能删除,请先进行反审核 | ||||||
|  |     public static final int DEPOT_HEAD_UN_AUDIT_DELETE_FAILED_CODE = 8500011; | ||||||
|  |     public static final String DEPOT_HEAD_UN_AUDIT_DELETE_FAILED_MSG = "抱歉,只有未审核的单据才能删除,请先进行反审核"; | ||||||
|  |     //单据审核-只有未审核的单据才能审核 | ||||||
|  |     public static final int DEPOT_HEAD_UN_AUDIT_TO_AUDIT_FAILED_CODE = 8500012; | ||||||
|  |     public static final String DEPOT_HEAD_UN_AUDIT_TO_AUDIT_FAILED_MSG = "抱歉,只有未审核的单据才能审核"; | ||||||
|  |     //单据反审核-只有已审核的单据才能反审核 | ||||||
|  |     public static final int DEPOT_HEAD_AUDIT_TO_UN_AUDIT_FAILED_CODE = 8500013; | ||||||
|  |     public static final String DEPOT_HEAD_AUDIT_TO_UN_AUDIT_FAILED_MSG = "抱歉,只有已审核的单据才能反审核"; | ||||||
|  |     //单据录入-商品条码XXX的数量需要修改下 | ||||||
|  |     public static final int DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_CODE = 85000014; | ||||||
|  |     public static final String DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_MSG = "商品条码%s的数量需要修改下"; | ||||||
|  |     //单据录入-商品的批号不能为空 | ||||||
|  |     public static final int DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE = 8500015; | ||||||
|  |     public static final String DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG = "抱歉,商品条码:%s的批号不能为空"; | ||||||
|  |     //单据录入-会员预付款余额不足 | ||||||
|  |     public static final int DEPOT_HEAD_MEMBER_PAY_LACK_CODE = 8500016; | ||||||
|  |     public static final String DEPOT_HEAD_MEMBER_PAY_LACK_MSG = "抱歉,会员预付款余额不足"; | ||||||
|  |     //单据录入-累计订金超出原订单中的订金 | ||||||
|  |     public static final int DEPOT_HEAD_DEPOSIT_OVER_PRE_CODE = 8500017; | ||||||
|  |     public static final String DEPOT_HEAD_DEPOSIT_OVER_PRE_MSG = "抱歉,累计订金超出原订单中的订金"; | ||||||
|  |     //单据录入-商品条码XXX的单价低于最低售价 | ||||||
|  |     public static final int DEPOT_HEAD_UNIT_PRICE_LOW_CODE = 8500018; | ||||||
|  |     public static final String DEPOT_HEAD_UNIT_PRICE_LOW_MSG = "商品条码%s的单价低于最低售价"; | ||||||
|  |     //单据录入-单据明细中必须要有组合件和普通子件 | ||||||
|  |     public static final int DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_CODE = 8500020; | ||||||
|  |     public static final String DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_MSG = "抱歉,单据明细中必须要有组合件和普通子件"; | ||||||
|  |     //单据录入-商品条码XXX的数量与序列号不一致 | ||||||
|  |     public static final int DEPOT_HEAD_SN_NUMBERE_FAILED_CODE = 8500021; | ||||||
|  |     public static final String DEPOT_HEAD_SN_NUMBERE_FAILED_MSG = "抱歉,商品条码:%s的数量与序列号不一致"; | ||||||
|  |     //单据录入-单据编号已经存在 | ||||||
|  |     public static final int DEPOT_HEAD_BILL_NUMBER_EXIST_CODE = 8500022; | ||||||
|  |     public static final String DEPOT_HEAD_BILL_NUMBER_EXIST_MSG = "抱歉,单据编号已经存在"; | ||||||
|  |     //单据录入-单据当前状态下不能修改 | ||||||
|  |     public static final int DEPOT_HEAD_BILL_CANNOT_EDIT_CODE = 8500023; | ||||||
|  |     public static final String DEPOT_HEAD_BILL_CANNOT_EDIT_MSG = "抱歉,单据当前状态下不能修改"; | ||||||
|  |     //单据删除-单据中的序列号已经出库,不能删除 | ||||||
|  |     public static final int DEPOT_HEAD_SERIAL_IS_SELL_CODE = 8500024; | ||||||
|  |     public static final String DEPOT_HEAD_SERIAL_IS_SELL_MSG = "抱歉,单据%s的序列号已经出库,不能删除"; | ||||||
|  |     //单据录入-单据附件不能超过规定数量 | ||||||
|  |     public static final int DEPOT_HEAD_FILE_NUM_LIMIT_CODE = 8500025; | ||||||
|  |     public static final String DEPOT_HEAD_FILE_NUM_LIMIT_MSG = "抱歉,单据附件不能超过%s份"; | ||||||
|  |     //单据录入-完成采购的单据不能进行反审核 | ||||||
|  |     public static final int DEPOT_HEAD_PURCHASE_STATUS_TWO_CODE = 8500026; | ||||||
|  |     public static final String DEPOT_HEAD_PURCHASE_STATUS_TWO_MSG = "抱歉,完成采购的单据不能进行反审核"; | ||||||
|  |     //单据录入-部分采购的单据不能进行反审核 | ||||||
|  |     public static final int DEPOT_HEAD_PURCHASE_STATUS_THREE_CODE = 8500027; | ||||||
|  |     public static final String DEPOT_HEAD_PURCHASE_STATUS_THREE_MSG = "抱歉,部分采购的单据不能进行反审核"; | ||||||
|  |     //单据录入-单据中存在部分状态,需要到新增界面关联单据 | ||||||
|  |     public static final int DEPOT_ITEM_EXIST_PARTIALLY_STATUS_FAILED_CODE = 8500028; | ||||||
|  |     public static final String DEPOT_ITEM_EXIST_PARTIALLY_STATUS_FAILED_MSG = "抱歉,单据:%s是部分%s状态,需要到新增界面关联单据"; | ||||||
|  |     //单据录入-关联请购单号和关联订单号不能同时录入 | ||||||
|  |     public static final int DEPOT_ITEM_EXIST_REPEAT_NO_FAILED_CODE = 8500029; | ||||||
|  |     public static final String DEPOT_ITEM_EXIST_REPEAT_NO_FAILED_MSG = "抱歉,关联请购单号和关联订单号不能同时录入"; | ||||||
|  |     //单据录入-单据最新状态不能进行批量操作 | ||||||
|  |     public static final int DEPOT_ITEM_EXIST_NEW_STATUS_FAILED_CODE = 8500030; | ||||||
|  |     public static final String DEPOT_ITEM_EXIST_NEW_STATUS_FAILED_MSG = "抱歉,单据:%s最新状态不能进行批量操作"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      *  单据明细信息 | ||||||
|  |      * type = 90 | ||||||
|  |      * */ | ||||||
|  |     //添加单据明细信息失败 | ||||||
|  |     public static final int DEPOT_ITEM_ADD_FAILED_CODE = 9000000; | ||||||
|  |     public static final String DEPOT_ITEM_ADD_FAILED_MSG = "添加单据明细信息失败"; | ||||||
|  |     //删除单据明细信息失败 | ||||||
|  |     public static final int DEPOT_ITEM_DELETE_FAILED_CODE = 9000001; | ||||||
|  |     public static final String DEPOT_ITEM_DELETE_FAILED_MSG = "删除单据明细信息失败"; | ||||||
|  |     //修改单据明细信息失败 | ||||||
|  |     public static final int DEPOT_ITEM_EDIT_FAILED_CODE = 9000002; | ||||||
|  |     public static final String DEPOT_ITEM_EDIT_FAILED_MSG = "修改单据明细信息失败"; | ||||||
|  |     //单据明细-明细中商品不存在 | ||||||
|  |     public static final int DEPOT_ITEM_BARCODE_IS_NOT_EXIST_CODE = 9000003; | ||||||
|  |     public static final String DEPOT_ITEM_BARCODE_IS_NOT_EXIST_MSG = "抱歉,商品条码:%s在商品管理中不存在"; | ||||||
|  |     //单据明细-明细中仓库不存在 | ||||||
|  |     public static final int DEPOT_ITEM_DEPOTNAME_IS_NOT_EXIST_CODE = 9000004; | ||||||
|  |     public static final String DEPOT_ITEM_DEPOTNAME_IS_NOT_EXIST_MSG = "抱歉,仓库:%s在基础资料-仓库信息中不存在"; | ||||||
|  |     //单据明细-单据中存在序列号,需要到新增界面关联单据 | ||||||
|  |     public static final int DEPOT_ITEM_EXIST_SERIAL_NUMBER_FAILED_CODE = 9000005; | ||||||
|  |     public static final String DEPOT_ITEM_EXIST_SERIAL_NUMBER_FAILED_MSG = "抱歉,单据:%s里面存在序列号,需要到新增界面关联单据"; | ||||||
|  |     //单据明细-单据中存在批号,需要到新增界面关联单据 | ||||||
|  |     public static final int DEPOT_ITEM_EXIST_BATCH_NUMBER_FAILED_CODE = 9000006; | ||||||
|  |     public static final String DEPOT_ITEM_EXIST_BATCH_NUMBER_FAILED_MSG = "抱歉,单据:%s里面存在批号,需要到新增界面关联单据"; | ||||||
|  |     //原关联单据已被修改,请重新关联 | ||||||
|  |     public static final int DEPOT_ITEM_PRE_BILL_IS_CHANGE_CODE = 9000007; | ||||||
|  |     public static final String DEPOT_ITEM_PRE_BILL_IS_CHANGE_MSG = "抱歉,原关联单据已被修改,请重新关联"; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      *  财务信息 | ||||||
|  |      * type = 95 | ||||||
|  |      * */ | ||||||
|  |     //添加财务信息失败 | ||||||
|  |     public static final int ACCOUNT_HEAD_ADD_FAILED_CODE = 9500000; | ||||||
|  |     public static final String ACCOUNT_HEAD_ADD_FAILED_MSG = "添加财务信息失败"; | ||||||
|  |     //删除财务信息失败 | ||||||
|  |     public static final int ACCOUNT_HEAD_DELETE_FAILED_CODE = 9500001; | ||||||
|  |     public static final String ACCOUNT_HEAD_DELETE_FAILED_MSG = "删除财务信息失败"; | ||||||
|  |     //修改财务信息失败 | ||||||
|  |     public static final int ACCOUNT_HEAD_EDIT_FAILED_CODE = 9500002; | ||||||
|  |     public static final String ACCOUNT_HEAD_EDIT_FAILED_MSG = "修改财务信息失败"; | ||||||
|  |     //单据录入-明细不能为空 | ||||||
|  |     public static final int ACCOUNT_HEAD_ROW_FAILED_CODE = 9500003; | ||||||
|  |     public static final String ACCOUNT_HEAD_ROW_FAILED_MSG = "单据明细不能为空"; | ||||||
|  |     //单据删除-只有未审核的单据才能删除,请先进行反审核 | ||||||
|  |     public static final int ACCOUNT_HEAD_UN_AUDIT_DELETE_FAILED_CODE = 9500004; | ||||||
|  |     public static final String ACCOUNT_HEAD_UN_AUDIT_DELETE_FAILED_MSG = "抱歉,只有未审核的单据才能删除,请先进行反审核"; | ||||||
|  |     //财务信息录入-单据编号已经存在 | ||||||
|  |     public static final int ACCOUNT_HEAD_BILL_NO_EXIST_CODE = 9500005; | ||||||
|  |     public static final String ACCOUNT_HEAD_BILL_NO_EXIST_MSG = "抱歉,单据编号已经存在"; | ||||||
|  |     //财务信息录入-付款账户和明细中的账户重复 | ||||||
|  |     public static final int ACCOUNT_HEAD_ACCOUNT_REPEAT_CODE = 9500006; | ||||||
|  |     public static final String ACCOUNT_HEAD_ACCOUNT_REPEAT_MSG = "抱歉,付款账户:%s和明细中的账户重复"; | ||||||
|  |     /** | ||||||
|  |      *  财务明细信息 | ||||||
|  |      * type = 100 | ||||||
|  |      * */ | ||||||
|  |     //添加财务明细信息失败 | ||||||
|  |     public static final int ACCOUNT_ITEM_ADD_FAILED_CODE = 10000000; | ||||||
|  |     public static final String ACCOUNT_ITEM_ADD_FAILED_MSG = "添加财务明细信息失败"; | ||||||
|  |     //删除财务明细信息失败 | ||||||
|  |     public static final int ACCOUNT_ITEM_DELETE_FAILED_CODE = 10000001; | ||||||
|  |     public static final String ACCOUNT_ITEM_DELETE_FAILED_MSG = "删除财务明细信息失败"; | ||||||
|  |     //修改财务明细信息失败 | ||||||
|  |     public static final int ACCOUNT_ITEM_EDIT_FAILED_CODE = 10000002; | ||||||
|  |     public static final String ACCOUNT_ITEM_EDIT_FAILED_MSG = "修改财务明细信息失败"; | ||||||
|  |     /** | ||||||
|  |      * 序列号 | ||||||
|  |      * type = 105 | ||||||
|  |      * */ | ||||||
|  |     /**序列号已存在*/ | ||||||
|  |     public static final int SERIAL_NUMBERE_ALREADY_EXISTS_CODE = 10500000; | ||||||
|  |     public static final String SERIAL_NUMBERE_ALREADY_EXISTS_MSG = "序列号:%s已存在"; | ||||||
|  |     /**序列号不存在或者已经出库*/ | ||||||
|  |     public static final int SERIAL_NUMBERE_NOT_EXISTS_CODE = 10500001; | ||||||
|  |     public static final String SERIAL_NUMBERE_NOT_EXISTS_MSG = "序列号:%s不存在或者已经出库"; | ||||||
|  |     /** | ||||||
|  |      * 机构信息 | ||||||
|  |      * type = 110 | ||||||
|  |      * */ | ||||||
|  |     //添加机构信息失败 | ||||||
|  |     public static final int ORGANIZATION_ADD_FAILED_CODE = 11000000; | ||||||
|  |     public static final String ORGANIZATION_ADD_FAILED_MSG = "添加机构信息失败"; | ||||||
|  |     //删除机构信息失败 | ||||||
|  |     public static final int ORGANIZATION_DELETE_FAILED_CODE = 11000001; | ||||||
|  |     public static final String ORGANIZATION_DELETE_FAILED_MSG = "删除机构信息失败"; | ||||||
|  |     //修改机构信息失败 | ||||||
|  |     public static final int ORGANIZATION_EDIT_FAILED_CODE = 11000002; | ||||||
|  |     public static final String ORGANIZATION_EDIT_FAILED_MSG = "修改机构信息失败"; | ||||||
|  |     //机构编号已存在 | ||||||
|  |     public static final int ORGANIZATION_NO_ALREADY_EXISTS_CODE = 11000003; | ||||||
|  |     public static final String ORGANIZATION_NO_ALREADY_EXISTS_MSG = "机构编号已存在"; | ||||||
|  |     //根机构不允许删除 | ||||||
|  |     public static final int ORGANIZATION_ROOT_NOT_ALLOWED_DELETE_CODE = 11000004; | ||||||
|  |     public static final String ORGANIZATION_ROOT_NOT_ALLOWED_DELETE_MSG = "根机构不允许删除"; | ||||||
|  |     //根机构不允许修改 | ||||||
|  |     public static final int ORGANIZATION_ROOT_NOT_ALLOWED_EDIT_CODE = 11000005; | ||||||
|  |     public static final String ORGANIZATION_ROOT_NOT_ALLOWED_EDIT_MSG = "根机构不允许修改"; | ||||||
|  |     //该机构存在下级不允许删除 | ||||||
|  |     public static final int ORGANIZATION_CHILD_NOT_ALLOWED_DELETE_CODE = 11000006; | ||||||
|  |     public static final String ORGANIZATION_CHILD_NOT_ALLOWED_DELETE_MSG = "该机构存在下级不允许删除"; | ||||||
|  |     /** | ||||||
|  |      * 机构用户关联关系 | ||||||
|  |      * type = 115 | ||||||
|  |      * */ | ||||||
|  |     //添加机构用户关联关系失败 | ||||||
|  |     public static final int ORGA_USER_REL_ADD_FAILED_CODE = 11500000; | ||||||
|  |     public static final String ORGA_USER_REL_ADD_FAILED_MSG = "添加机构用户关联关系失败"; | ||||||
|  |     //删除机构用户关联关系失败 | ||||||
|  |     public static final int ORGA_USER_REL_DELETE_FAILED_CODE = 11500001; | ||||||
|  |     public static final String ORGA_USER_REL_DELETE_FAILED_MSG = "删除机构用户关联关系失败"; | ||||||
|  |     //修改机构用户关联关系失败 | ||||||
|  |     public static final int ORGA_USER_REL_EDIT_FAILED_CODE = 11500002; | ||||||
|  |     public static final String ORGA_USER_REL_EDIT_FAILED_MSG = "修改机构用户关联关系失败"; | ||||||
|  | 
 | ||||||
|  |     //进销存统计,如果有权限的仓库数量太多则提示要选择仓库 | ||||||
|  |     public static final int REPORT_TWO_MANY_DEPOT_FAILED_CODE = 510; | ||||||
|  |     public static final String REPORT_TWO_MANY_DEPOT_FAILED_MSG = "请选择仓库,再进行查询"; | ||||||
|  | 
 | ||||||
|  |     //演示用户禁止操作 | ||||||
|  |     public static final int SYSTEM_CONFIG_TEST_USER_CODE = -1; | ||||||
|  |     public static final String SYSTEM_CONFIG_TEST_USER_MSG = "演示用户禁止操作"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 标准正常返回/操作成功返回 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     public static JSONObject standardSuccess () { | ||||||
|  |         JSONObject success = new JSONObject(); | ||||||
|  |         success.put(GLOBAL_RETURNS_CODE, SERVICE_SUCCESS_CODE); | ||||||
|  |         success.put(GLOBAL_RETURNS_MESSAGE, SERVICE_SUCCESS_MSG); | ||||||
|  |         return success; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,308 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Account; | ||||||
|  | import com.jsh.erp.datasource.vo.AccountVo4InOutList; | ||||||
|  | import com.jsh.erp.datasource.vo.AccountVo4List; | ||||||
|  | import com.jsh.erp.service.AccountService; | ||||||
|  | import com.jsh.erp.service.SystemConfigService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author jishenghua 75271*8920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/account") | ||||||
|  | @Api(tags = {"账户管理"}) | ||||||
|  | public class AccountController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(AccountController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private AccountService accountService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SystemConfigService systemConfigService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Account account = accountService.getAccount(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(account != null) { | ||||||
|  |             objectMap.put("info", account); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         String serialNo = StringUtil.getInfo(search, "serialNo"); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         List<AccountVo4List> list = accountService.select(name, serialNo, remark); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = accountService.insertAccount(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = accountService.updateAccount(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = accountService.deleteAccount(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = accountService.batchDeleteAccount(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = accountService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找结算账户信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findBySelect") | ||||||
|  |     @ApiOperation(value = "查找结算账户信息-下拉框") | ||||||
|  |     public String findBySelect(HttpServletRequest request) throws Exception { | ||||||
|  |         String res = null; | ||||||
|  |         try { | ||||||
|  |             List<Account> dataList = accountService.findBySelect(); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (Account account : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("Id", account.getId()); | ||||||
|  |                     //结算账户名称 | ||||||
|  |                     item.put("AccountName", account.getName()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res = dataArray.toJSONString(); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取所有结算账户 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAccount") | ||||||
|  |     @ApiOperation(value = "获取所有结算账户") | ||||||
|  |     public BaseResponseInfo getAccount(HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             List<Account> accountList = accountService.getAccount(); | ||||||
|  |             map.put("accountList", accountList); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 账户流水信息 | ||||||
|  |      * @param currentPage | ||||||
|  |      * @param pageSize | ||||||
|  |      * @param accountId | ||||||
|  |      * @param initialAmount | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findAccountInOutList") | ||||||
|  |     @ApiOperation(value = "账户流水信息") | ||||||
|  |     public BaseResponseInfo findAccountInOutList(@RequestParam("currentPage") Integer currentPage, | ||||||
|  |                                                  @RequestParam("pageSize") Integer pageSize, | ||||||
|  |                                                  @RequestParam("accountId") Long accountId, | ||||||
|  |                                                  @RequestParam("initialAmount") BigDecimal initialAmount, | ||||||
|  |                                                  @RequestParam(value = "number",required = false) String number, | ||||||
|  |                                                  @RequestParam(value = "beginTime",required = false) String beginTime, | ||||||
|  |                                                  @RequestParam(value = "endTime",required = false) String endTime, | ||||||
|  |                                                  HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             Boolean forceFlag = systemConfigService.getForceApprovalFlag(); | ||||||
|  |             List<AccountVo4InOutList> dataList = accountService.findAccountInOutList(accountId, StringUtil.toNull(number), | ||||||
|  |                     beginTime, endTime, forceFlag, (currentPage-1)*pageSize, pageSize); | ||||||
|  |             int total = accountService.findAccountInOutListCount(accountId, StringUtil.toNull(number), | ||||||
|  |                     beginTime, endTime, forceFlag); | ||||||
|  |             map.put("total", total); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (AccountVo4InOutList aEx : dataList) { | ||||||
|  |                     String type = aEx.getType().replace("其它", ""); | ||||||
|  |                     aEx.setType(type); | ||||||
|  |                     String operTime = aEx.getOperTime(); | ||||||
|  |                     BigDecimal balance = accountService.getAccountSum(accountId, null, operTime, forceFlag) | ||||||
|  |                             .add(accountService.getAccountSumByHead(accountId, null, operTime, forceFlag)) | ||||||
|  |                             .add(accountService.getAccountSumByDetail(accountId, null, operTime, forceFlag)) | ||||||
|  |                             .add(accountService.getManyAccountSum(accountId, null, operTime, forceFlag)).add(initialAmount); | ||||||
|  |                     aEx.setBalance(balance); | ||||||
|  |                     aEx.setAccountId(accountId); | ||||||
|  |                     dataArray.add(aEx); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             map.put("rows", dataArray); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新默认账户 | ||||||
|  |      * @param object | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/updateIsDefault") | ||||||
|  |     @ApiOperation(value = "更新默认账户") | ||||||
|  |     public String updateIsDefault(@RequestBody JSONObject object, | ||||||
|  |                                        HttpServletRequest request) throws Exception{ | ||||||
|  |         Long accountId = object.getLong("id"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = accountService.updateIsDefault(accountId); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取带余额的报表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/listWithBalance") | ||||||
|  |     @ApiOperation(value = "获取带余额的报表") | ||||||
|  |     public TableDataInfo listWithBalance(@RequestParam("name") String name, | ||||||
|  |                                             @RequestParam("serialNo") String serialNo, | ||||||
|  |                                             HttpServletRequest request) throws Exception { | ||||||
|  |         List<AccountVo4List> list = accountService.listWithBalance(StringUtil.toNull(name), StringUtil.toNull(serialNo)); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 结算账户的统计 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getStatistics") | ||||||
|  |     @ApiOperation(value = "结算账户的统计") | ||||||
|  |     public BaseResponseInfo getStatistics(@RequestParam("name") String name, | ||||||
|  |                                           @RequestParam("serialNo") String serialNo, | ||||||
|  |                                           HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> map = accountService.getStatistics(StringUtil.toNull(name), StringUtil.toNull(serialNo)); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = accountService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,197 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.constants.ExceptionConstants; | ||||||
|  | import com.jsh.erp.datasource.entities.AccountHead; | ||||||
|  | import com.jsh.erp.datasource.entities.AccountHeadVo4Body; | ||||||
|  | import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx; | ||||||
|  | import com.jsh.erp.service.AccountHeadService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author jishenghua 752*718*920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/accountHead") | ||||||
|  | @Api(tags = {"财务管理"}) | ||||||
|  | public class AccountHeadController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(AccountHeadController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private AccountHeadService accountHeadService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         AccountHead accountHead = accountHeadService.getAccountHead(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(accountHead != null) { | ||||||
|  |             objectMap.put("info", accountHead); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         String billNo = StringUtil.getInfo(search, "billNo"); | ||||||
|  |         String beginTime = StringUtil.getInfo(search, "beginTime"); | ||||||
|  |         String endTime = StringUtil.getInfo(search, "endTime"); | ||||||
|  |         Long organId = StringUtil.parseStrLong(StringUtil.getInfo(search, "organId")); | ||||||
|  |         Long creator = StringUtil.parseStrLong(StringUtil.getInfo(search, "creator")); | ||||||
|  |         Long handsPersonId = StringUtil.parseStrLong(StringUtil.getInfo(search, "handsPersonId")); | ||||||
|  |         Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId")); | ||||||
|  |         String status = StringUtil.getInfo(search, "status"); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         String number = StringUtil.getInfo(search, "number"); | ||||||
|  |         Long inOutItemId = StringUtil.parseStrLong(StringUtil.getInfo(search, "inOutItemId")); | ||||||
|  |         List<AccountHeadVo4ListEx> list = accountHeadService.select(type, billNo, beginTime, endTime, organId, creator, | ||||||
|  |                 handsPersonId, accountId, status, remark, number, inOutItemId); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = accountHeadService.deleteAccountHead(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = accountHeadService.batchDeleteAccountHead(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-审核或者反审核 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态-审核或者反审核") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request) throws Exception{ | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         String status = jsonObject.getString("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         int res = accountHeadService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增财务主表及财务子表信息 | ||||||
|  |      * @param body | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/addAccountHeadAndDetail") | ||||||
|  |     @ApiOperation(value = "新增财务主表及财务子表信息") | ||||||
|  |     public Object addAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws  Exception{ | ||||||
|  |         JSONObject result = ExceptionConstants.standardSuccess(); | ||||||
|  |         String beanJson = body.getInfo(); | ||||||
|  |         String rows = body.getRows(); | ||||||
|  |         accountHeadService.addAccountHeadAndDetail(beanJson,rows, request); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新财务主表及财务子表信息 | ||||||
|  |      * @param body | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PutMapping(value = "/updateAccountHeadAndDetail") | ||||||
|  |     @ApiOperation(value = "更新财务主表及财务子表信息") | ||||||
|  |     public Object updateAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONObject result = ExceptionConstants.standardSuccess(); | ||||||
|  |         String beanJson = body.getInfo(); | ||||||
|  |         String rows = body.getRows(); | ||||||
|  |         accountHeadService.updateAccountHeadAndDetail(beanJson,rows,request); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据编号查询单据信息 | ||||||
|  |      * @param billNo | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getDetailByNumber") | ||||||
|  |     @ApiOperation(value = "根据编号查询单据信息") | ||||||
|  |     public BaseResponseInfo getDetailByNumber(@RequestParam("billNo") String billNo, | ||||||
|  |                                               HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         AccountHeadVo4ListEx ahl = new AccountHeadVo4ListEx(); | ||||||
|  |         try { | ||||||
|  |             List<AccountHeadVo4ListEx> list = accountHeadService.getDetailByNumber(billNo); | ||||||
|  |             if(list.size()>0) { | ||||||
|  |                 ahl = list.get(0); | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = ahl; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据出入库单据id查询收付款单号 | ||||||
|  |      * @param billId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getFinancialBillNoByBillId") | ||||||
|  |     @ApiOperation(value = "根据编号查询单据信息") | ||||||
|  |     public BaseResponseInfo getFinancialBillNoByBillId(@RequestParam("billId") Long billId, | ||||||
|  |                                               HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<AccountHead> list = accountHeadService.getFinancialBillNoByBillId(billId); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = list; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,93 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.constants.BusinessConstants; | ||||||
|  | import com.jsh.erp.datasource.vo.AccountItemVo4List; | ||||||
|  | import com.jsh.erp.service.AccountHeadService; | ||||||
|  | import com.jsh.erp.service.AccountItemService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestParam; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua 752*718*920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/accountItem") | ||||||
|  | @Api(tags = {"财务明细"}) | ||||||
|  | public class AccountItemController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(AccountItemController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private AccountItemService accountItemService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private AccountHeadService accountHeadService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/getDetailList") | ||||||
|  |     @ApiOperation(value = "明细列表") | ||||||
|  |     public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId, | ||||||
|  |                                           HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String type = null; | ||||||
|  |             List<AccountItemVo4List> dataList = new ArrayList<>(); | ||||||
|  |             if(headerId != 0) { | ||||||
|  |                 dataList = accountItemService.getDetailList(headerId); | ||||||
|  |                 type = accountHeadService.getAccountHead(headerId).getType(); | ||||||
|  |             } | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             outer.put("total", dataList.size()); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (AccountItemVo4List ai : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("accountId", ai.getAccountId()); | ||||||
|  |                     item.put("accountName", ai.getAccountName()); | ||||||
|  |                     item.put("inOutItemId", ai.getInOutItemId()); | ||||||
|  |                     item.put("inOutItemName", ai.getInOutItemName()); | ||||||
|  |                     if(StringUtil.isNotEmpty(ai.getBillNumber())) { | ||||||
|  |                         item.put("billNumber", ai.getBillNumber()); | ||||||
|  |                     } else { | ||||||
|  |                         item.put("billNumber", "QiChu"); | ||||||
|  |                     } | ||||||
|  |                     item.put("needDebt", ai.getNeedDebt()); | ||||||
|  |                     item.put("finishDebt", ai.getFinishDebt()); | ||||||
|  |                     BigDecimal eachAmount = ai.getEachAmount(); | ||||||
|  |                     if(BusinessConstants.TYPE_MONEY_IN.equals(type)) { | ||||||
|  |                         item.put("eachAmount", eachAmount); | ||||||
|  |                     } else if(BusinessConstants.TYPE_MONEY_OUT.equals(type)) { | ||||||
|  |                         item.put("eachAmount", BigDecimal.ZERO.subtract(eachAmount)); | ||||||
|  |                     } else { | ||||||
|  |                         item.put("eachAmount", (eachAmount.compareTo(BigDecimal.ZERO))==-1 ? BigDecimal.ZERO.subtract(eachAmount): eachAmount); | ||||||
|  |                     } | ||||||
|  |                     item.put("remark", ai.getRemark()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             outer.put("rows", dataArray); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = outer; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,298 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Depot; | ||||||
|  | import com.jsh.erp.datasource.entities.DepotEx; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialInitialStock; | ||||||
|  | import com.jsh.erp.service.DepotService; | ||||||
|  | import com.jsh.erp.service.MaterialService; | ||||||
|  | import com.jsh.erp.service.UserBusinessService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua 752*718*920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/depot") | ||||||
|  | @Api(tags = {"仓库管理"}) | ||||||
|  | public class DepotController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(DepotController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private DepotService depotService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserBusinessService userBusinessService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MaterialService materialService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Depot depot = depotService.getDepot(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(depot != null) { | ||||||
|  |             objectMap.put("info", depot); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type")); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         List<DepotEx> list = depotService.select(name, type, remark); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = depotService.insertDepot(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = depotService.updateDepot(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = depotService.deleteDepot(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = depotService.batchDeleteDepot(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = depotService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllList") | ||||||
|  |     @ApiOperation(value = "仓库列表") | ||||||
|  |     public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<Depot> depotList = depotService.getAllList(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = depotList; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 用户对应仓库显示 | ||||||
|  |      * @param type | ||||||
|  |      * @param keyId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findUserDepot") | ||||||
|  |     @ApiOperation(value = "用户对应仓库显示") | ||||||
|  |     public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId, | ||||||
|  |                                  HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             //获取权限信息 | ||||||
|  |             String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, keyId); | ||||||
|  |             List<Depot> dataList = depotService.findUserDepot(); | ||||||
|  |             //开始拼接json数据 | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             outer.put("id", 0); | ||||||
|  |             outer.put("key", 0); | ||||||
|  |             outer.put("value", 0); | ||||||
|  |             outer.put("title", "仓库列表"); | ||||||
|  |             outer.put("attributes", "仓库列表"); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (Depot depot : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", depot.getId()); | ||||||
|  |                     item.put("key", depot.getId()); | ||||||
|  |                     item.put("value", depot.getId()); | ||||||
|  |                     item.put("title", depot.getName()); | ||||||
|  |                     item.put("attributes", depot.getName()); | ||||||
|  |                     Boolean flag = ubValue.contains("[" + depot.getId().toString() + "]"); | ||||||
|  |                     if (flag) { | ||||||
|  |                         item.put("checked", true); | ||||||
|  |                     } | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             outer.put("children", dataArray); | ||||||
|  |             arr.add(outer); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取当前用户拥有权限的仓库列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findDepotByCurrentUser") | ||||||
|  |     @ApiOperation(value = "获取当前用户拥有权限的仓库列表") | ||||||
|  |     public BaseResponseInfo findDepotByCurrentUser(HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             JSONArray arr = depotService.findDepotByCurrentUser(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = arr; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新默认仓库 | ||||||
|  |      * @param object | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/updateIsDefault") | ||||||
|  |     @ApiOperation(value = "更新默认仓库") | ||||||
|  |     public String updateIsDefault(@RequestBody JSONObject object, | ||||||
|  |                                        HttpServletRequest request) throws Exception{ | ||||||
|  |         Long depotId = object.getLong("id"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = depotService.updateIsDefault(depotId); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 仓库列表-带库存 | ||||||
|  |      * @param mId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllListWithStock") | ||||||
|  |     @ApiOperation(value = "仓库列表-带库存") | ||||||
|  |     public BaseResponseInfo getAllList(@RequestParam("mId") Long mId, | ||||||
|  |                                        HttpServletRequest request) { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<Depot> list = depotService.getAllList(); | ||||||
|  |             List<DepotEx> depotList = new ArrayList<DepotEx>(); | ||||||
|  |             for(Depot depot: list) { | ||||||
|  |                 DepotEx de = new DepotEx(); | ||||||
|  |                 if(mId!=0) { | ||||||
|  |                     BigDecimal initStock = materialService.getInitStock(mId, depot.getId()); | ||||||
|  |                     BigDecimal currentStock = materialService.getCurrentStockByMaterialIdAndDepotId(mId, depot.getId()); | ||||||
|  |                     de.setInitStock(initStock); | ||||||
|  |                     de.setCurrentStock(currentStock); | ||||||
|  |                     MaterialInitialStock materialInitialStock = materialService.getSafeStock(mId, depot.getId()); | ||||||
|  |                     de.setLowSafeStock(materialInitialStock.getLowSafeStock()); | ||||||
|  |                     de.setHighSafeStock(materialInitialStock.getHighSafeStock()); | ||||||
|  |                 } else { | ||||||
|  |                     de.setInitStock(BigDecimal.ZERO); | ||||||
|  |                     de.setCurrentStock(BigDecimal.ZERO); | ||||||
|  |                 } | ||||||
|  |                 de.setId(depot.getId()); | ||||||
|  |                 de.setName(depot.getName()); | ||||||
|  |                 depotList.add(de); | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = depotList; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = depotService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,367 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.*; | ||||||
|  | import com.jsh.erp.service.FunctionService; | ||||||
|  | import com.jsh.erp.service.SystemConfigService; | ||||||
|  | import com.jsh.erp.service.UserBusinessService; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.dao.DataAccessException; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji-sheng-hua  jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/function") | ||||||
|  | @Api(tags = {"功能管理"}) | ||||||
|  | public class FunctionController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(FunctionController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private FunctionService functionService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserBusinessService userBusinessService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SystemConfigService systemConfigService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Function function = functionService.getFunction(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(function != null) { | ||||||
|  |             objectMap.put("info", function); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         List<FunctionEx> list = functionService.select(name, type); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = functionService.insertFunction(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = functionService.updateFunction(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = functionService.deleteFunction(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = functionService.batchDeleteFunction(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = functionService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNumberExist") | ||||||
|  |     @ApiOperation(value = "检查编号是否存在") | ||||||
|  |     public String checkIsNumberExist(@RequestParam Long id, | ||||||
|  |                                      @RequestParam(value ="number", required = false) String number, | ||||||
|  |                                      HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<String, Object>(); | ||||||
|  |         int exist = functionService.checkIsNumberExist(id, number); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据父编号查询菜单 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/findMenuByPNumber") | ||||||
|  |     @ApiOperation(value = "根据父编号查询菜单") | ||||||
|  |     public JSONArray findMenuByPNumber(@RequestBody JSONObject jsonObject, | ||||||
|  |                               HttpServletRequest request)throws Exception { | ||||||
|  |         String pNumber = jsonObject.getString("pNumber"); | ||||||
|  |         String userId = jsonObject.getString("userId"); | ||||||
|  |         //存放数据json数组 | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             Long roleId = 0L; | ||||||
|  |             String fc = ""; | ||||||
|  |             List<UserBusiness> roleList = userBusinessService.getBasicData(userId, "UserRole"); | ||||||
|  |             if(roleList!=null && roleList.size()>0){ | ||||||
|  |                 String value = roleList.get(0).getValue(); | ||||||
|  |                 if(StringUtil.isNotEmpty(value)){ | ||||||
|  |                     String roleIdStr = value.replace("[", "").replace("]", ""); | ||||||
|  |                     roleId = Long.parseLong(roleIdStr); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             //当前用户所拥有的功能列表,格式如:[1][2][5] | ||||||
|  |             List<UserBusiness> funList = userBusinessService.getBasicData(roleId.toString(), "RoleFunctions"); | ||||||
|  |             if(funList!=null && funList.size()>0){ | ||||||
|  |                 fc = funList.get(0).getValue(); | ||||||
|  |             } | ||||||
|  |             //获取系统配置信息-是否开启多级审核 | ||||||
|  |             String approvalFlag = "0"; | ||||||
|  |             List<SystemConfig> list = systemConfigService.getSystemConfig(); | ||||||
|  |             if(list.size()>0) { | ||||||
|  |                 approvalFlag = list.get(0).getMultiLevelApprovalFlag(); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             List<Function> dataList = functionService.getRoleFunction(pNumber); | ||||||
|  |             if (dataList.size() != 0) { | ||||||
|  |                 User userInfo = userService.getCurrentUser(); | ||||||
|  |                 //获取当前用户所属的租户所拥有的功能id的map | ||||||
|  |                 Map<Long, Long> funIdMap = functionService.getCurrentTenantFunIdMap(); | ||||||
|  |                 dataArray = getMenuByFunction(dataList, fc, approvalFlag, funIdMap, userInfo); | ||||||
|  |                 //增加首页菜单项 | ||||||
|  |                 JSONObject homeItem = new JSONObject(); | ||||||
|  |                 homeItem.put("id", 0); | ||||||
|  |                 homeItem.put("text", "首页"); | ||||||
|  |                 homeItem.put("icon", "home"); | ||||||
|  |                 homeItem.put("url", "/dashboard/analysis"); | ||||||
|  |                 homeItem.put("component", "/layouts/TabLayout"); | ||||||
|  |                 dataArray.add(0,homeItem); | ||||||
|  |             } | ||||||
|  |         } catch (DataAccessException e) { | ||||||
|  |             logger.error(">>>>>>>>>>>>>>>>>>>查找异常", e); | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public JSONArray getMenuByFunction(List<Function> dataList, String fc, String approvalFlag, Map<Long, Long> funIdMap, User userInfo) throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         for (Function function : dataList) { | ||||||
|  |             //如果不是超管也不是租户就需要校验,防止分配下级用户的功能权限,大于租户的权限 | ||||||
|  |             if("admin".equals(userInfo.getLoginName()) || userInfo.getId().equals(userInfo.getTenantId()) || funIdMap.get(function.getId())!=null) { | ||||||
|  |                 //如果关闭多级审核,遇到任务审核菜单直接跳过 | ||||||
|  |                 if("0".equals(approvalFlag) && "/workflow".equals(function.getUrl())) { | ||||||
|  |                     continue; | ||||||
|  |                 } | ||||||
|  |                 JSONObject item = new JSONObject(); | ||||||
|  |                 List<Function> newList = functionService.getRoleFunction(function.getNumber()); | ||||||
|  |                 item.put("id", function.getId()); | ||||||
|  |                 item.put("text", function.getName()); | ||||||
|  |                 item.put("icon", function.getIcon()); | ||||||
|  |                 item.put("url", function.getUrl()); | ||||||
|  |                 item.put("component", function.getComponent()); | ||||||
|  |                 if (newList.size()>0) { | ||||||
|  |                     JSONArray childrenArr = getMenuByFunction(newList, fc, approvalFlag, funIdMap, userInfo); | ||||||
|  |                     if(childrenArr.size()>0) { | ||||||
|  |                         item.put("children", childrenArr); | ||||||
|  |                         dataArray.add(item); | ||||||
|  |                     } | ||||||
|  |                 } else { | ||||||
|  |                     if (fc.indexOf("[" + function.getId().toString() + "]") != -1) { | ||||||
|  |                         dataArray.add(item); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 角色对应功能显示 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findRoleFunction") | ||||||
|  |     @ApiOperation(value = "角色对应功能显示") | ||||||
|  |     public JSONArray findRoleFunction(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             //获取当前用户所拥有的功能id列表 | ||||||
|  |             List<Long> funIdList = functionService.getCurrentUserFunIdList(); | ||||||
|  |             if("admin".equals(userInfo.getLoginName())) { | ||||||
|  |                 funIdList = null; | ||||||
|  |             } | ||||||
|  |             List<Function> dataListFun = functionService.findRoleFunction("0", funIdList); | ||||||
|  |             //开始拼接json数据 | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             outer.put("id", 0); | ||||||
|  |             outer.put("key", 0); | ||||||
|  |             outer.put("value", 0); | ||||||
|  |             outer.put("title", "功能列表"); | ||||||
|  |             outer.put("attributes", "功能列表"); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataListFun) { | ||||||
|  |                 //根据条件从列表里面移除"系统管理" | ||||||
|  |                 List<Function> dataList = new ArrayList<>(); | ||||||
|  |                 for (Function fun : dataListFun) { | ||||||
|  |                     String token = request.getHeader("X-Access-Token"); | ||||||
|  |                     Long tenantId = Tools.getTenantIdByToken(token); | ||||||
|  |                     if (tenantId!=0L) { | ||||||
|  |                         if(!("系统管理").equals(fun.getName())) { | ||||||
|  |                             dataList.add(fun); | ||||||
|  |                         } | ||||||
|  |                     } else { | ||||||
|  |                         //超管 | ||||||
|  |                         dataList.add(fun); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 dataArray = getFunctionList(dataList, type, keyId, funIdList); | ||||||
|  |                 outer.put("children", dataArray); | ||||||
|  |             } | ||||||
|  |             arr.add(outer); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public JSONArray getFunctionList(List<Function> dataList, String type, String keyId, List<Long> funIdList) throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         //获取权限信息 | ||||||
|  |         String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, keyId); | ||||||
|  |         if (null != dataList) { | ||||||
|  |             for (Function function : dataList) { | ||||||
|  |                 JSONObject item = new JSONObject(); | ||||||
|  |                 item.put("id", function.getId()); | ||||||
|  |                 item.put("key", function.getId()); | ||||||
|  |                 item.put("value", function.getId()); | ||||||
|  |                 item.put("title", function.getName()); | ||||||
|  |                 item.put("attributes", function.getName()); | ||||||
|  |                 List<Function> funList = functionService.findRoleFunction(function.getNumber(), funIdList); | ||||||
|  |                 if(funList.size()>0) { | ||||||
|  |                     JSONArray funArr = getFunctionList(funList, type, keyId, funIdList); | ||||||
|  |                     item.put("children", funArr); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } else { | ||||||
|  |                     Boolean flag = ubValue.contains("[" + function.getId().toString() + "]"); | ||||||
|  |                     item.put("checked", flag); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据id列表查找功能信息 | ||||||
|  |      * @param roleId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findRoleFunctionsById") | ||||||
|  |     @ApiOperation(value = "根据id列表查找功能信息") | ||||||
|  |     public BaseResponseInfo findByIds(@RequestParam("roleId") Long roleId, | ||||||
|  |                                       HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<UserBusiness> list = userBusinessService.getBasicData(roleId.toString(), "RoleFunctions"); | ||||||
|  |             if(null!=list && list.size()>0) { | ||||||
|  |                 //按钮 | ||||||
|  |                 Map<Long,String> btnMap = new HashMap<>(); | ||||||
|  |                 String btnStr = list.get(0).getBtnStr(); | ||||||
|  |                 if(StringUtil.isNotEmpty(btnStr)) { | ||||||
|  |                     JSONArray btnArr = JSONArray.parseArray(btnStr); | ||||||
|  |                     for(Object obj: btnArr) { | ||||||
|  |                         JSONObject btnObj = JSONObject.parseObject(obj.toString()); | ||||||
|  |                         if(btnObj.get("funId")!=null && btnObj.get("btnStr")!=null) { | ||||||
|  |                             btnMap.put(btnObj.getLong("funId"), btnObj.getString("btnStr")); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 //菜单 | ||||||
|  |                 String funIds = list.get(0).getValue(); | ||||||
|  |                 funIds = funIds.substring(1, funIds.length() - 1); | ||||||
|  |                 funIds = funIds.replace("][",","); | ||||||
|  |                 List<Function> dataList = functionService.findByIds(funIds); | ||||||
|  |                 JSONObject outer = new JSONObject(); | ||||||
|  |                 User userInfo = userService.getCurrentUser(); | ||||||
|  |                 Map<Long, Long> funIdMap = functionService.getCurrentUserFunIdMap(); | ||||||
|  |                 //存放数据json数组 | ||||||
|  |                 JSONArray dataArray = new JSONArray(); | ||||||
|  |                 if (null != dataList) { | ||||||
|  |                     for (Function function : dataList) { | ||||||
|  |                         //如果不是超管需要校验,防止分配下级用户的按钮权限,大于自身的权限 | ||||||
|  |                         if("admin".equals(userInfo.getLoginName()) || funIdMap.get(function.getId())!=null) { | ||||||
|  |                             JSONObject item = new JSONObject(); | ||||||
|  |                             item.put("id", function.getId()); | ||||||
|  |                             item.put("name", function.getName()); | ||||||
|  |                             item.put("pushBtn", function.getPushBtn()); | ||||||
|  |                             item.put("btnStr", btnMap.get(function.getId())); | ||||||
|  |                             dataArray.add(item); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 outer.put("rows", dataArray); | ||||||
|  |                 outer.put("total", dataArray.size()); | ||||||
|  |                 res.code = 200; | ||||||
|  |                 res.data = outer; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,160 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.InOutItem; | ||||||
|  | import com.jsh.erp.service.InOutItemService; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author jishenghua  jshERP 2018年12月25日14:38:08 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/inOutItem") | ||||||
|  | @Api(tags = {"收支项目"}) | ||||||
|  | public class InOutItemController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(InOutItemController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private InOutItemService inOutItemService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         InOutItem inOutItem = inOutItemService.getInOutItem(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(inOutItem != null) { | ||||||
|  |             objectMap.put("info", inOutItem); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         List<InOutItem> list = inOutItemService.select(name, type, remark); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = inOutItemService.insertInOutItem(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = inOutItemService.updateInOutItem(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = inOutItemService.deleteInOutItem(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = inOutItemService.batchDeleteInOutItem(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = inOutItemService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找收支项目信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findBySelect") | ||||||
|  |     @ApiOperation(value = "查找收支项目信息") | ||||||
|  |     public String findBySelect(@RequestParam("type") String type, HttpServletRequest request) throws Exception{ | ||||||
|  |         String res = null; | ||||||
|  |         try { | ||||||
|  |             List<InOutItem> dataList = inOutItemService.findBySelect(type); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (InOutItem inOutItem : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", inOutItem.getId()); | ||||||
|  |                     //收支项目名称 | ||||||
|  |                     item.put("name", inOutItem.getName()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res = dataArray.toJSONString(); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = inOutItemService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,101 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Log; | ||||||
|  | import com.jsh.erp.datasource.vo.LogVo4List; | ||||||
|  | import com.jsh.erp.service.LogService; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua 752*718*920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/log") | ||||||
|  | @Api(tags = {"日志管理"}) | ||||||
|  | public class LogController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(LogController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private LogService logService; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Log log = logService.getLog(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(log != null) { | ||||||
|  |             objectMap.put("info", log); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String operation = StringUtil.getInfo(search, "operation"); | ||||||
|  |         String userInfo = StringUtil.getInfo(search, "userInfo"); | ||||||
|  |         String clientIp = StringUtil.getInfo(search, "clientIp"); | ||||||
|  |         String tenantLoginName = StringUtil.getInfo(search, "tenantLoginName"); | ||||||
|  |         String tenantType = StringUtil.getInfo(search, "tenantType"); | ||||||
|  |         String beginTime = StringUtil.getInfo(search, "beginTime"); | ||||||
|  |         String endTime = StringUtil.getInfo(search, "endTime"); | ||||||
|  |         String content = StringUtil.getInfo(search, "content"); | ||||||
|  |         List<LogVo4List> list = logService.select(operation, userInfo, clientIp, tenantLoginName, tenantType, beginTime, endTime, content); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<String, Object>(); | ||||||
|  |         int insert = logService.insertLog(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = logService.updateLog(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = logService.deleteLog(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = logService.batchDeleteLog(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,150 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialAttribute; | ||||||
|  | import com.jsh.erp.service.MaterialAttributeService; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/materialAttribute") | ||||||
|  | @Api(tags = {"商品属性"}) | ||||||
|  | public class MaterialAttributeController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MaterialAttributeController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MaterialAttributeService materialAttributeService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         MaterialAttribute materialAttribute = materialAttributeService.getMaterialAttribute(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(materialAttribute != null) { | ||||||
|  |             objectMap.put("info", materialAttribute); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String attributeName = StringUtil.getInfo(search, "attributeName"); | ||||||
|  |         List<MaterialAttribute> list = materialAttributeService.select(attributeName); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = materialAttributeService.insertMaterialAttribute(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = materialAttributeService.updateMaterialAttribute(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialAttributeService.deleteMaterialAttribute(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialAttributeService.batchDeleteMaterialAttribute(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = materialAttributeService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取商品属性的名称列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getNameList") | ||||||
|  |     @ApiOperation(value = "获取商品属性的名称列表") | ||||||
|  |     public JSONArray getNameList(HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialAttribute> materialAttributeList = materialAttributeService.getMaterialAttribute(); | ||||||
|  |             if (null != materialAttributeList) { | ||||||
|  |                 for (MaterialAttribute materialAttribute : materialAttributeList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("value", materialAttribute.getId().toString()); | ||||||
|  |                     item.put("name", materialAttribute.getAttributeName()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取id查询属性的值列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getValueListById") | ||||||
|  |     @ApiOperation(value = "获取id查询属性的值列表") | ||||||
|  |     public JSONArray getValueListById(@RequestParam("id") Long id, | ||||||
|  |                                      HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             dataArray = materialAttributeService.getValueArrById(id); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,190 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSON; | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialCategory; | ||||||
|  | import com.jsh.erp.datasource.vo.TreeNode; | ||||||
|  | import com.jsh.erp.service.MaterialCategoryService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji—sheng—hua   jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/materialCategory") | ||||||
|  | @Api(tags = {"商品类别"}) | ||||||
|  | public class MaterialCategoryController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MaterialCategoryController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MaterialCategoryService materialCategoryService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         MaterialCategory materialCategory = materialCategoryService.getMaterialCategory(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(materialCategory != null) { | ||||||
|  |             objectMap.put("info", materialCategory); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         Integer parentId = StringUtil.parseInteger(StringUtil.getInfo(search, "parentId")); | ||||||
|  |         List<MaterialCategory> list = materialCategoryService.select(name, parentId); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = materialCategoryService.insertMaterialCategory(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = materialCategoryService.updateMaterialCategory(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialCategoryService.deleteMaterialCategory(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialCategoryService.batchDeleteMaterialCategory(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = materialCategoryService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取全部商品类别 | ||||||
|  |      * @param parentId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllList") | ||||||
|  |     @ApiOperation(value = "获取全部商品类别") | ||||||
|  |     public BaseResponseInfo getAllList(@RequestParam("parentId") Long parentId, HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialCategory> materialCategoryList = materialCategoryService.getAllList(parentId); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = materialCategoryList; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据id来查询商品名称 | ||||||
|  |      * @param id | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findById") | ||||||
|  |     @ApiOperation(value = "根据id来查询商品名称") | ||||||
|  |     public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialCategory> dataList = materialCategoryService.findById(id); | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (MaterialCategory mc : dataList) { | ||||||
|  |                     outer.put("id", mc.getId()); | ||||||
|  |                     outer.put("name", mc.getName()); | ||||||
|  |                     outer.put("parentId", mc.getParentId()); | ||||||
|  |                     List<MaterialCategory> dataParentList = materialCategoryService.findById(mc.getParentId()); | ||||||
|  |                     if(dataParentList!=null&&dataParentList.size()>0){ | ||||||
|  |                         outer.put("parentName", dataParentList.get(0).getName()); | ||||||
|  |                     } | ||||||
|  |                     outer.put("sort", mc.getSort()); | ||||||
|  |                     outer.put("serialNo", mc.getSerialNo()); | ||||||
|  |                     outer.put("remark", mc.getRemark()); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = outer; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 获取商品类别树数据 | ||||||
|  |      * @Param: | ||||||
|  |      * @return com.alibaba.fastjson.JSONArray | ||||||
|  |      */ | ||||||
|  |     @RequestMapping(value = "/getMaterialCategoryTree") | ||||||
|  |     @ApiOperation(value = "获取商品类别树数据") | ||||||
|  |     public JSONArray getMaterialCategoryTree(@RequestParam("id") Long id) throws Exception{ | ||||||
|  |        JSONArray arr=new JSONArray(); | ||||||
|  |        List<TreeNode> materialCategoryTree = materialCategoryService.getMaterialCategoryTree(id); | ||||||
|  |        if(materialCategoryTree!=null&&materialCategoryTree.size()>0){ | ||||||
|  |            for(TreeNode node:materialCategoryTree){ | ||||||
|  |                String str=JSON.toJSONString(node); | ||||||
|  |                JSONObject obj=JSON.parseObject(str); | ||||||
|  |                arr.add(obj) ; | ||||||
|  |            } | ||||||
|  |        } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,832 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Material; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialExtend; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialVo4Unit; | ||||||
|  | import com.jsh.erp.datasource.entities.Unit; | ||||||
|  | import com.jsh.erp.service.DepotService; | ||||||
|  | import com.jsh.erp.service.DepotItemService; | ||||||
|  | import com.jsh.erp.service.MaterialService; | ||||||
|  | import com.jsh.erp.service.RoleService; | ||||||
|  | import com.jsh.erp.service.SystemConfigService; | ||||||
|  | import com.jsh.erp.service.UnitService; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.beans.factory.annotation.Value; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji|sheng|hua jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/material") | ||||||
|  | @Api(tags = {"商品管理"}) | ||||||
|  | public class MaterialController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MaterialController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MaterialService materialService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private DepotItemService depotItemService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SystemConfigService systemConfigService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UnitService unitService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private DepotService depotService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private RoleService roleService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     @Value(value="${file.uploadType}") | ||||||
|  |     private Long fileUploadType; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Material material = materialService.getMaterial(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(material != null) { | ||||||
|  |             objectMap.put("info", material); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String categoryId = StringUtil.getInfo(search, "categoryId"); | ||||||
|  |         String materialParam = StringUtil.getInfo(search, "materialParam"); | ||||||
|  |         String standard = StringUtil.getInfo(search, "standard"); | ||||||
|  |         String model = StringUtil.getInfo(search, "model"); | ||||||
|  |         String color = StringUtil.getInfo(search, "color"); | ||||||
|  |         String brand = StringUtil.getInfo(search, "brand"); | ||||||
|  |         String mfrs = StringUtil.getInfo(search, "mfrs"); | ||||||
|  |         String otherField1 = StringUtil.getInfo(search, "otherField1"); | ||||||
|  |         String otherField2 = StringUtil.getInfo(search, "otherField2"); | ||||||
|  |         String otherField3 = StringUtil.getInfo(search, "otherField3"); | ||||||
|  |         String weight = StringUtil.getInfo(search, "weight"); | ||||||
|  |         String expiryNum = StringUtil.getInfo(search, "expiryNum"); | ||||||
|  |         String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber"); | ||||||
|  |         String enableBatchNumber = StringUtil.getInfo(search, "enableBatchNumber"); | ||||||
|  |         String position = StringUtil.getInfo(search, "position"); | ||||||
|  |         String enabled = StringUtil.getInfo(search, "enabled"); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         String mpList = StringUtil.getInfo(search, "mpList"); | ||||||
|  |         List<MaterialVo4Unit> list = materialService.select(materialParam, standard, model, color, brand, mfrs, otherField1, otherField2, | ||||||
|  |                 otherField3, weight, expiryNum, enableSerialNumber, enableBatchNumber, position, enabled, remark, categoryId, mpList); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = materialService.insertMaterial(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = materialService.updateMaterial(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialService.deleteMaterial(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialService.batchDeleteMaterial(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = materialService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 检查商品是否存在 | ||||||
|  |      * @param id | ||||||
|  |      * @param name | ||||||
|  |      * @param model | ||||||
|  |      * @param color | ||||||
|  |      * @param standard | ||||||
|  |      * @param mfrs | ||||||
|  |      * @param otherField1 | ||||||
|  |      * @param otherField2 | ||||||
|  |      * @param otherField3 | ||||||
|  |      * @param unit | ||||||
|  |      * @param unitId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/checkIsExist") | ||||||
|  |     @ApiOperation(value = "检查商品是否存在") | ||||||
|  |     public String checkIsExist(@RequestParam("id") Long id, @RequestParam("name") String name, | ||||||
|  |                                @RequestParam("model") String model, @RequestParam("color") String color, | ||||||
|  |                                @RequestParam("standard") String standard, @RequestParam("mfrs") String mfrs, | ||||||
|  |                                @RequestParam("otherField1") String otherField1, @RequestParam("otherField2") String otherField2, | ||||||
|  |                                @RequestParam("otherField3") String otherField3, @RequestParam("unit") String unit,@RequestParam("unitId") Long unitId, | ||||||
|  |                                HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<String, Object>(); | ||||||
|  |         int exist = materialService.checkIsExist(id, name, StringUtil.toNull(model), StringUtil.toNull(color), | ||||||
|  |                 StringUtil.toNull(standard), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1), | ||||||
|  |                 StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), StringUtil.toNull(unit), unitId); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态-启用或者禁用") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = materialService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据id来查询商品名称 | ||||||
|  |      * @param id | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findById") | ||||||
|  |     @ApiOperation(value = "根据id来查询商品名称") | ||||||
|  |     public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialVo4Unit> list = materialService.findById(id); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = list; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据meId来查询商品名称 | ||||||
|  |      * @param meId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findByIdWithBarCode") | ||||||
|  |     @ApiOperation(value = "根据meId来查询商品名称") | ||||||
|  |     public BaseResponseInfo findByIdWithBarCode(@RequestParam("meId") Long meId, | ||||||
|  |                                                 @RequestParam("mpList") String mpList, | ||||||
|  |                                                 HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String[] mpArr = mpList.split(","); | ||||||
|  |             MaterialVo4Unit mu = new MaterialVo4Unit(); | ||||||
|  |             List<MaterialVo4Unit> list = materialService.findByIdWithBarCode(meId); | ||||||
|  |             if(list!=null && list.size()>0) { | ||||||
|  |                 mu = list.get(0); | ||||||
|  |                 mu.setMaterialOther(materialService.getMaterialOtherByParam(mpArr, mu)); | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = mu; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据关键词查找商品信息-条码、名称、规格、型号 | ||||||
|  |      * @param q | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaterialByParam") | ||||||
|  |     @ApiOperation(value = "根据关键词查找商品信息") | ||||||
|  |     public BaseResponseInfo getMaterialByParam(@RequestParam("q") String q, | ||||||
|  |                                    HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             JSONArray arr = materialService.getMaterialByParam(q); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = arr; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找商品信息-下拉框 | ||||||
|  |      * @param mpList | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findBySelect") | ||||||
|  |     @ApiOperation(value = "查找商品信息") | ||||||
|  |     public JSONObject findBySelect(@RequestParam(value = "categoryId", required = false) Long categoryId, | ||||||
|  |                                   @RequestParam(value = "q", required = false) String q, | ||||||
|  |                                   @RequestParam(value = "standardOrModel", required = false) String standardOrModel, | ||||||
|  |                                   @RequestParam(value = "mpList", required = false) String mpList, | ||||||
|  |                                   @RequestParam(value = "depotId", required = false) Long depotId, | ||||||
|  |                                   @RequestParam(value = "color", required = false) String color, | ||||||
|  |                                   @RequestParam(value = "brand", required = false) String brand, | ||||||
|  |                                   @RequestParam(value = "mfrs", required = false) String mfrs, | ||||||
|  |                                   @RequestParam(value = "otherField1", required = false) String otherField1, | ||||||
|  |                                   @RequestParam(value = "otherField2", required = false) String otherField2, | ||||||
|  |                                   @RequestParam(value = "otherField3", required = false) String otherField3, | ||||||
|  |                                   @RequestParam(value = "enableSerialNumber", required = false) String enableSerialNumber, | ||||||
|  |                                   @RequestParam(value = "enableBatchNumber", required = false) String enableBatchNumber, | ||||||
|  |                                   @RequestParam("page") Integer currentPage, | ||||||
|  |                                   @RequestParam("rows") Integer pageSize, | ||||||
|  |                                   HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONObject object = new JSONObject(); | ||||||
|  |         try { | ||||||
|  |             String[] mpArr = new String[]{}; | ||||||
|  |             if(StringUtil.isNotEmpty(mpList)){ | ||||||
|  |                 mpArr= mpList.split(","); | ||||||
|  |             } | ||||||
|  |             List<MaterialVo4Unit> dataList = materialService.findBySelectWithBarCode(categoryId, q, StringUtil.toNull(standardOrModel), | ||||||
|  |                     StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1), StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), | ||||||
|  |                     enableSerialNumber, enableBatchNumber, (currentPage-1)*pageSize, pageSize); | ||||||
|  |             int total = materialService.findBySelectWithBarCodeCount(categoryId, q, StringUtil.toNull(standardOrModel), | ||||||
|  |                     StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1), StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), | ||||||
|  |                     enableSerialNumber, enableBatchNumber); | ||||||
|  |             object.put("total", total); | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (MaterialVo4Unit material : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", material.getMeId()); //商品扩展表的id | ||||||
|  |                     String ratioStr = ""; //比例 | ||||||
|  |                     Unit unit = new Unit(); | ||||||
|  |                     if (material.getUnitId() == null) { | ||||||
|  |                         ratioStr = ""; | ||||||
|  |                     } else { | ||||||
|  |                         unit = unitService.getUnit(material.getUnitId()); | ||||||
|  |                         //拼接副单位的比例 | ||||||
|  |                         String commodityUnit = material.getCommodityUnit(); | ||||||
|  |                         if(commodityUnit.equals(unit.getBasicUnit())) { | ||||||
|  |                             ratioStr = "[基本]"; | ||||||
|  |                         } | ||||||
|  |                         if(commodityUnit.equals(unit.getOtherUnit()) && unit.getRatio()!=null) { | ||||||
|  |                             ratioStr = "[" + unit.getRatio().stripTrailingZeros().toPlainString() + unit.getBasicUnit() + "]"; | ||||||
|  |                         } | ||||||
|  |                         if(commodityUnit.equals(unit.getOtherUnitTwo()) && unit.getRatioTwo()!=null) { | ||||||
|  |                             ratioStr = "[" + unit.getRatioTwo().stripTrailingZeros().toPlainString() + unit.getBasicUnit() + "]"; | ||||||
|  |                         } | ||||||
|  |                         if(commodityUnit.equals(unit.getOtherUnitThree()) && unit.getRatioThree()!=null) { | ||||||
|  |                             ratioStr = "[" + unit.getRatioThree().stripTrailingZeros().toPlainString() + unit.getBasicUnit() + "]"; | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                     item.put("mBarCode", material.getmBarCode()); | ||||||
|  |                     item.put("name", material.getName()); | ||||||
|  |                     item.put("mnemonic", material.getMnemonic()); | ||||||
|  |                     item.put("categoryName", material.getCategoryName()); | ||||||
|  |                     item.put("standard", material.getStandard()); | ||||||
|  |                     item.put("model", material.getModel()); | ||||||
|  |                     item.put("color", material.getColor()); | ||||||
|  |                     item.put("brand", material.getBrand()); | ||||||
|  |                     item.put("mfrs", material.getMfrs()); | ||||||
|  |                     item.put("unit", material.getCommodityUnit() + ratioStr); | ||||||
|  |                     item.put("sku", material.getSku()); | ||||||
|  |                     item.put("enableSerialNumber", material.getEnableSerialNumber()); | ||||||
|  |                     item.put("enableBatchNumber", material.getEnableBatchNumber()); | ||||||
|  |                     BigDecimal stock; | ||||||
|  |                     if(StringUtil.isNotEmpty(material.getSku())){ | ||||||
|  |                         stock = depotItemService.getSkuStockByParam(depotId,material.getMeId(),null,null); | ||||||
|  |                     } else { | ||||||
|  |                         stock = depotItemService.getCurrentStockByParam(depotId, material.getId()); | ||||||
|  |                         if (material.getUnitId()!=null){ | ||||||
|  |                             String commodityUnit = material.getCommodityUnit(); | ||||||
|  |                             stock = unitService.parseStockByUnit(stock, unit, commodityUnit); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                     item.put("stock", stock); | ||||||
|  |                     item.put("expand", materialService.getMaterialOtherByParam(mpArr, material)); | ||||||
|  |                     item.put("otherField1", material.getOtherField1()); | ||||||
|  |                     item.put("otherField2", material.getOtherField2()); | ||||||
|  |                     item.put("otherField3", material.getOtherField3()); | ||||||
|  |                     item.put("imgName", material.getImgName()); | ||||||
|  |                     if(fileUploadType == 2) { | ||||||
|  |                         item.put("imgSmall", "small"); | ||||||
|  |                         item.put("imgLarge", "large"); | ||||||
|  |                     } else { | ||||||
|  |                         item.put("imgSmall", ""); | ||||||
|  |                         item.put("imgLarge", ""); | ||||||
|  |                     } | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             object.put("rows", dataArray); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return object; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据商品id查找商品信息 | ||||||
|  |      * @param meId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaterialByMeId") | ||||||
|  |     @ApiOperation(value = "根据商品id查找商品信息") | ||||||
|  |     public JSONObject getMaterialByMeId(@RequestParam(value = "meId", required = false) Long meId, | ||||||
|  |                                         @RequestParam("mpList") String mpList, | ||||||
|  |                                         HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONObject item = new JSONObject(); | ||||||
|  |         try { | ||||||
|  |             String[] mpArr = mpList.split(","); | ||||||
|  |             List<MaterialVo4Unit> materialList = materialService.getMaterialByMeId(meId); | ||||||
|  |             if(materialList!=null && materialList.size()!=1) { | ||||||
|  |                 return item; | ||||||
|  |             } else if(materialList.size() == 1) { | ||||||
|  |                 MaterialVo4Unit material = materialList.get(0); | ||||||
|  |                 item.put("Id", material.getMeId()); //商品扩展表的id | ||||||
|  |                 String ratio; //比例 | ||||||
|  |                 if (material.getUnitId() == null || material.getUnitId().equals("")) { | ||||||
|  |                     ratio = ""; | ||||||
|  |                 } else { | ||||||
|  |                     ratio = material.getUnitName(); | ||||||
|  |                     ratio = ratio.substring(ratio.indexOf("(")); | ||||||
|  |                 } | ||||||
|  |                 //名称/型号/扩展信息/包装 | ||||||
|  |                 String MaterialName = ""; | ||||||
|  |                 MaterialName = MaterialName + material.getmBarCode() + "_" + material.getName() | ||||||
|  |                         + ((material.getStandard() == null || material.getStandard().equals("")) ? "" : "(" + material.getStandard() + ")"); | ||||||
|  |                 String expand = materialService.getMaterialOtherByParam(mpArr, material); //扩展信息 | ||||||
|  |                 MaterialName = MaterialName + expand + ((material.getUnit() == null || material.getUnit().equals("")) ? "" : "(" + material.getUnit() + ")") + ratio; | ||||||
|  |                 item.put("MaterialName", MaterialName); | ||||||
|  |                 item.put("name", material.getName()); | ||||||
|  |                 item.put("expand", expand); | ||||||
|  |                 item.put("model", material.getModel()); | ||||||
|  |                 item.put("standard", material.getStandard()); | ||||||
|  |                 item.put("unit", material.getUnit() + ratio); | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return item; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生成excel表格 | ||||||
|  |      * @param categoryId | ||||||
|  |      * @param materialParam | ||||||
|  |      * @param color | ||||||
|  |      * @param weight | ||||||
|  |      * @param expiryNum | ||||||
|  |      * @param enabled | ||||||
|  |      * @param enableSerialNumber | ||||||
|  |      * @param enableBatchNumber | ||||||
|  |      * @param remark | ||||||
|  |      * @param mpList | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/exportExcel") | ||||||
|  |     @ApiOperation(value = "生成excel表格") | ||||||
|  |     public void exportExcel(@RequestParam(value = "categoryId", required = false) String categoryId, | ||||||
|  |                             @RequestParam(value = "materialParam", required = false) String materialParam, | ||||||
|  |                             @RequestParam(value = "color", required = false) String color, | ||||||
|  |                             @RequestParam(value = "materialOther", required = false) String materialOther, | ||||||
|  |                             @RequestParam(value = "weight", required = false) String weight, | ||||||
|  |                             @RequestParam(value = "expiryNum", required = false) String expiryNum, | ||||||
|  |                             @RequestParam(value = "enabled", required = false) String enabled, | ||||||
|  |                             @RequestParam(value = "enableSerialNumber", required = false) String enableSerialNumber, | ||||||
|  |                             @RequestParam(value = "enableBatchNumber", required = false) String enableBatchNumber, | ||||||
|  |                             @RequestParam(value = "remark", required = false) String remark, | ||||||
|  |                             @RequestParam(value = "mpList", required = false) String mpList, | ||||||
|  |                             HttpServletRequest request, HttpServletResponse response) { | ||||||
|  |         try { | ||||||
|  |             materialService.exportExcel(StringUtil.toNull(categoryId), StringUtil.toNull(materialParam), StringUtil.toNull(color), | ||||||
|  |                     StringUtil.toNull(materialOther), StringUtil.toNull(weight), | ||||||
|  |                     StringUtil.toNull(expiryNum), StringUtil.toNull(enabled), StringUtil.toNull(enableSerialNumber), | ||||||
|  |                     StringUtil.toNull(enableBatchNumber), StringUtil.toNull(remark), mpList, response); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * excel表格导入产品(含初始库存) | ||||||
|  |      * @param file | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/importExcel") | ||||||
|  |     @ApiOperation(value = "excel表格导入产品") | ||||||
|  |     public BaseResponseInfo importExcel(MultipartFile file, | ||||||
|  |                             HttpServletRequest request, HttpServletResponse response) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             res = materialService.importExcel(file, request); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取商品序列号 | ||||||
|  |      * @param q | ||||||
|  |      * @param currentPage | ||||||
|  |      * @param pageSize | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaterialEnableSerialNumberList") | ||||||
|  |     @ApiOperation(value = "获取商品序列号") | ||||||
|  |     public JSONObject getMaterialEnableSerialNumberList( | ||||||
|  |                                 @RequestParam(value = "q", required = false) String q, | ||||||
|  |                                 @RequestParam("page") Integer currentPage, | ||||||
|  |                                 @RequestParam("rows") Integer pageSize, | ||||||
|  |                                 HttpServletRequest request, | ||||||
|  |                                 HttpServletResponse response)throws Exception { | ||||||
|  |         JSONObject object= new JSONObject(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialVo4Unit> list = materialService.getMaterialEnableSerialNumberList(q, (currentPage-1)*pageSize, pageSize); | ||||||
|  |             Long count = materialService.getMaterialEnableSerialNumberCount(q); | ||||||
|  |             object.put("rows", list); | ||||||
|  |             object.put("total", count); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return object; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取最大条码 | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaxBarCode") | ||||||
|  |     @ApiOperation(value = "获取最大条码") | ||||||
|  |     public BaseResponseInfo getMaxBarCode() throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         String barCode = materialService.getMaxBarCode(); | ||||||
|  |         map.put("barCode", barCode); | ||||||
|  |         res.code = 200; | ||||||
|  |         res.data = map; | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 商品名称模糊匹配 | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaterialNameList") | ||||||
|  |     @ApiOperation(value = "商品名称模糊匹配") | ||||||
|  |     public JSONArray getMaterialNameList() throws Exception { | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             List<String> list = materialService.getMaterialNameList(); | ||||||
|  |             for (String s : list) { | ||||||
|  |                 JSONObject item = new JSONObject(); | ||||||
|  |                 item.put("value", s); | ||||||
|  |                 item.put("text", s); | ||||||
|  |                 arr.add(item); | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据条码查询商品信息 | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getMaterialByBarCode") | ||||||
|  |     @ApiOperation(value = "根据条码查询商品信息") | ||||||
|  |     public BaseResponseInfo getMaterialByBarCode(@RequestParam("barCode") String barCode, | ||||||
|  |                                           @RequestParam(value = "organId", required = false) Long organId, | ||||||
|  |                                           @RequestParam(value = "depotId", required = false) Long depotId, | ||||||
|  |                                           @RequestParam("mpList") String mpList, | ||||||
|  |                                           @RequestParam(required = false, value = "prefixNo") String prefixNo, | ||||||
|  |                                           HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Long userId = userService.getUserId(request); | ||||||
|  |             String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit(); | ||||||
|  |             String[] mpArr = mpList.split(","); | ||||||
|  |             //支持序列号查询,先根据序列号查询条码,如果查不到就直接查条码 | ||||||
|  |             MaterialExtend materialExtend = materialService.getMaterialExtendBySerialNumber(barCode); | ||||||
|  |             if(materialExtend!=null && StringUtil.isNotEmpty(materialExtend.getBarCode())) { | ||||||
|  |                 barCode = materialExtend.getBarCode(); | ||||||
|  |             } | ||||||
|  |             List<MaterialVo4Unit> list = materialService.getMaterialByBarCode(barCode); | ||||||
|  |             if(list!=null && list.size()>0) { | ||||||
|  |                 for(MaterialVo4Unit mvo: list) { | ||||||
|  |                     mvo.setMaterialOther(materialService.getMaterialOtherByParam(mpArr, mvo)); | ||||||
|  |                     if ("LSCK".equals(prefixNo) || "LSTH".equals(prefixNo)) { | ||||||
|  |                         //零售价 | ||||||
|  |                         mvo.setBillPrice(mvo.getCommodityDecimal()); | ||||||
|  |                     } else if ("CGDD".equals(prefixNo) || "CGRK".equals(prefixNo) || "CGTH".equals(prefixNo)) { | ||||||
|  |                         //采购价 | ||||||
|  |                         mvo.setBillPrice(mvo.getPurchaseDecimal()); | ||||||
|  |                     } else if("QTRK".equals(prefixNo) || "DBCK".equals(prefixNo) || "ZZD".equals(prefixNo) || "CXD".equals(prefixNo) | ||||||
|  |                             || "PDLR".equals(prefixNo) || "PDFP".equals(prefixNo)) { | ||||||
|  |                         //采购价-给录入界面按权限屏蔽 | ||||||
|  |                         mvo.setBillPrice(roleService.parseBillPriceByLimit(mvo.getPurchaseDecimal(), "buy", priceLimit, request)); | ||||||
|  |                     } if ("XSDD".equals(prefixNo) || "XSCK".equals(prefixNo) || "XSTH".equals(prefixNo) || "QTCK".equals(prefixNo)) { | ||||||
|  |                         //销售价 | ||||||
|  |                         if(organId == null) { | ||||||
|  |                             mvo.setBillPrice(mvo.getWholesaleDecimal()); | ||||||
|  |                         } else { | ||||||
|  |                             //查询最后一单的销售价,实现不同的客户不同的销售价 | ||||||
|  |                             BigDecimal lastUnitPrice = depotItemService.getLastUnitPriceByParam(organId, mvo.getMeId(), prefixNo); | ||||||
|  |                             mvo.setBillPrice(lastUnitPrice!=null? lastUnitPrice : mvo.getWholesaleDecimal()); | ||||||
|  |                         } | ||||||
|  |                         //销售价-给录入界面按权限屏蔽价格 | ||||||
|  |                         if("QTCK".equals(prefixNo)) { | ||||||
|  |                             mvo.setBillPrice(roleService.parseBillPriceByLimit(mvo.getWholesaleDecimal(), "sale", priceLimit, request)); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                     //仓库id | ||||||
|  |                     if (depotId == null) { | ||||||
|  |                         JSONArray depotArr = depotService.findDepotByCurrentUser(); | ||||||
|  |                         for (Object obj : depotArr) { | ||||||
|  |                             JSONObject depotObj = JSONObject.parseObject(obj.toString()); | ||||||
|  |                             if (depotObj.get("isDefault") != null) { | ||||||
|  |                                 Boolean isDefault = depotObj.getBoolean("isDefault"); | ||||||
|  |                                 if (isDefault) { | ||||||
|  |                                     Long id = depotObj.getLong("id"); | ||||||
|  |                                     if (!"CGDD".equals(prefixNo) && !"XSDD".equals(prefixNo)) { | ||||||
|  |                                         //除订单之外的单据才有仓库 | ||||||
|  |                                         mvo.setDepotId(id); | ||||||
|  |                                     } | ||||||
|  |                                     getStockByMaterialInfo(mvo); | ||||||
|  |                                 } | ||||||
|  |                             } | ||||||
|  |                         } | ||||||
|  |                     } else { | ||||||
|  |                         mvo.setDepotId(depotId); | ||||||
|  |                         getStockByMaterialInfo(mvo); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = list; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据商品信息获取库存,进行赋值 | ||||||
|  |      * @param mvo | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     private void getStockByMaterialInfo(MaterialVo4Unit mvo) throws Exception { | ||||||
|  |         BigDecimal stock; | ||||||
|  |         if (StringUtil.isNotEmpty(mvo.getSku())) { | ||||||
|  |             stock = depotItemService.getSkuStockByParam(mvo.getDepotId(), mvo.getMeId(), null, null); | ||||||
|  |         } else { | ||||||
|  |             stock = depotItemService.getCurrentStockByParam(mvo.getDepotId(), mvo.getId()); | ||||||
|  |             if (mvo.getUnitId() != null) { | ||||||
|  |                 Unit unit = unitService.getUnit(mvo.getUnitId()); | ||||||
|  |                 String commodityUnit = mvo.getCommodityUnit(); | ||||||
|  |                 stock = unitService.parseStockByUnit(stock, unit, commodityUnit); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         mvo.setStock(stock); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 商品库存查询 | ||||||
|  |      * @param currentPage | ||||||
|  |      * @param pageSize | ||||||
|  |      * @param depotIds | ||||||
|  |      * @param categoryId | ||||||
|  |      * @param materialParam | ||||||
|  |      * @param zeroStock | ||||||
|  |      * @param column | ||||||
|  |      * @param order | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getListWithStock") | ||||||
|  |     @ApiOperation(value = "商品库存查询") | ||||||
|  |     public BaseResponseInfo getListWithStock(@RequestParam("currentPage") Integer currentPage, | ||||||
|  |                                              @RequestParam("pageSize") Integer pageSize, | ||||||
|  |                                              @RequestParam(value = "depotIds", required = false) String depotIds, | ||||||
|  |                                              @RequestParam(value = "categoryId", required = false) Long categoryId, | ||||||
|  |                                              @RequestParam(value = "position", required = false) String position, | ||||||
|  |                                              @RequestParam("materialParam") String materialParam, | ||||||
|  |                                              @RequestParam("zeroStock") Integer zeroStock, | ||||||
|  |                                              @RequestParam(value = "column", required = false, defaultValue = "createTime") String column, | ||||||
|  |                                              @RequestParam(value = "order", required = false, defaultValue = "desc") String order, | ||||||
|  |                                              HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<>(); | ||||||
|  |         try { | ||||||
|  |             List<Long> idList = new ArrayList<>(); | ||||||
|  |             List<Long> depotList = new ArrayList<>(); | ||||||
|  |             if(categoryId != null){ | ||||||
|  |                 idList = materialService.getListByParentId(categoryId); | ||||||
|  |             } | ||||||
|  |             if(StringUtil.isNotEmpty(depotIds)) { | ||||||
|  |                 depotList = StringUtil.strToLongList(depotIds); | ||||||
|  |             } else { | ||||||
|  |                 //未选择仓库时默认为当前用户有权限的仓库 | ||||||
|  |                 JSONArray depotArr = depotService.findDepotByCurrentUser(); | ||||||
|  |                 for(Object obj: depotArr) { | ||||||
|  |                     JSONObject object = JSONObject.parseObject(obj.toString()); | ||||||
|  |                     depotList.add(object.getLong("id")); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             Boolean moveAvgPriceFlag = systemConfigService.getMoveAvgPriceFlag(); | ||||||
|  |             List<MaterialVo4Unit> dataList = materialService.getListWithStock(depotList, idList, StringUtil.toNull(position), StringUtil.toNull(materialParam), | ||||||
|  |                     moveAvgPriceFlag, zeroStock, StringUtil.safeSqlParse(column), StringUtil.safeSqlParse(order), (currentPage-1)*pageSize, pageSize); | ||||||
|  |             int total = materialService.getListWithStockCount(depotList, idList, StringUtil.toNull(position), StringUtil.toNull(materialParam), zeroStock); | ||||||
|  |             MaterialVo4Unit materialVo4Unit= materialService.getTotalStockAndPrice(depotList, idList, StringUtil.toNull(position), StringUtil.toNull(materialParam)); | ||||||
|  |             map.put("total", total); | ||||||
|  |             map.put("currentStock", materialVo4Unit.getCurrentStock()!=null?materialVo4Unit.getCurrentStock():BigDecimal.ZERO); | ||||||
|  |             if(moveAvgPriceFlag) { | ||||||
|  |                 map.put("currentStockPrice", materialVo4Unit.getCurrentStockMovePrice()!=null?materialVo4Unit.getCurrentStockMovePrice():BigDecimal.ZERO); | ||||||
|  |             } else { | ||||||
|  |                 map.put("currentStockPrice", materialVo4Unit.getCurrentStockPrice()!=null?materialVo4Unit.getCurrentStockPrice():BigDecimal.ZERO); | ||||||
|  |             } | ||||||
|  |             map.put("currentWeight", materialVo4Unit.getCurrentWeight()!=null?materialVo4Unit.getCurrentWeight():BigDecimal.ZERO); | ||||||
|  |             map.put("rows", dataList); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置商品当前的实时库存(按每个仓库) | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetMaterialCurrentStock") | ||||||
|  |     @ApiOperation(value = "批量设置商品当前的实时库存(按每个仓库)") | ||||||
|  |     public String batchSetMaterialCurrentStock(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = materialService.batchSetMaterialCurrentStock(ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置商品当前的成本价 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetMaterialCurrentUnitPrice") | ||||||
|  |     @ApiOperation(value = "批量设置商品当前的成本价") | ||||||
|  |     public String batchSetMaterialCurrentUnitPrice(@RequestBody JSONObject jsonObject, | ||||||
|  |                                                HttpServletRequest request)throws Exception { | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = materialService.batchSetMaterialCurrentUnitPrice(ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量更新商品信息 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchUpdate") | ||||||
|  |     @ApiOperation(value = "批量更新商品信息") | ||||||
|  |     public String batchUpdate(@RequestBody JSONObject jsonObject, | ||||||
|  |                               HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = materialService.batchUpdate(jsonObject); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 转换名称为拼音 | ||||||
|  |      * @param jsonObject | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/changeNameToPinYin") | ||||||
|  |     @ApiOperation(value = "转换名称为拼音") | ||||||
|  |     public BaseResponseInfo changeNameToPinYin(@RequestBody JSONObject jsonObject)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String name = jsonObject.getString("name"); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = PinYinUtil.getFirstLettersLo(name); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,181 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialExtend; | ||||||
|  | import com.jsh.erp.datasource.vo.MaterialExtendVo4List; | ||||||
|  | import com.jsh.erp.service.MaterialExtendService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author jijiaqing | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/materialsExtend") | ||||||
|  | @Api(tags = {"商品价格扩展"}) | ||||||
|  | public class MaterialExtendController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MaterialExtendController.class); | ||||||
|  |     @Resource | ||||||
|  |     private MaterialExtendService materialExtendService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         MaterialExtend materialExtend = materialExtendService.getMaterialExtend(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(materialExtend != null) { | ||||||
|  |             objectMap.put("info", materialExtend); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = materialExtendService.insertMaterialExtend(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = materialExtendService.updateMaterialExtend(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialExtendService.deleteMaterialExtend(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialExtendService.batchDeleteMaterialExtendByIds(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/getDetailList") | ||||||
|  |     @ApiOperation(value = "价格信息列表") | ||||||
|  |     public BaseResponseInfo getDetailList(@RequestParam("materialId") Long materialId, | ||||||
|  |                                           HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialExtendVo4List> dataList = new ArrayList<MaterialExtendVo4List>(); | ||||||
|  |             if(materialId!=0) { | ||||||
|  |                 dataList = materialExtendService.getDetailList(materialId); | ||||||
|  |             } | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             outer.put("total", dataList.size()); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (MaterialExtendVo4List md : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", md.getId()); | ||||||
|  |                     item.put("barCode", md.getBarCode()); | ||||||
|  |                     item.put("commodityUnit", md.getCommodityUnit()); | ||||||
|  |                     if(StringUtil.isNotEmpty(md.getSku())){ | ||||||
|  |                         item.put("sku", md.getSku()); | ||||||
|  |                     } | ||||||
|  |                     item.put("purchaseDecimal", md.getPurchaseDecimal()); | ||||||
|  |                     item.put("commodityDecimal", md.getCommodityDecimal()); | ||||||
|  |                     item.put("wholesaleDecimal", md.getWholesaleDecimal()); | ||||||
|  |                     item.put("lowDecimal", md.getLowDecimal()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             outer.put("rows", dataArray); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = outer; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据条码查询商品信息 | ||||||
|  |      * @param barCode | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getInfoByBarCode") | ||||||
|  |     @ApiOperation(value = "根据条码查询商品信息") | ||||||
|  |     public BaseResponseInfo getInfoByBarCode(@RequestParam("barCode") String barCode, | ||||||
|  |                                           HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             MaterialExtend materialExtend = materialExtendService.getInfoByBarCode(barCode); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = materialExtend; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 校验条码是否存在 | ||||||
|  |      * @param id | ||||||
|  |      * @param barCode | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/checkIsBarCodeExist") | ||||||
|  |     @ApiOperation(value = "校验条码是否存在") | ||||||
|  |     public BaseResponseInfo checkIsBarCodeExist(@RequestParam("id") Long id, | ||||||
|  |                                                 @RequestParam("barCode") String barCode, | ||||||
|  |                                              HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<>(); | ||||||
|  |         try { | ||||||
|  |             int exist = materialExtendService.checkIsBarCodeExist(id, barCode); | ||||||
|  |             if(exist > 0) { | ||||||
|  |                 map.put("status", true); | ||||||
|  |             } else { | ||||||
|  |                 map.put("status", false); | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,145 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.MaterialProperty; | ||||||
|  | import com.jsh.erp.service.MaterialPropertyService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Description | ||||||
|  |  * | ||||||
|  |  * @Author: jsh | ||||||
|  |  * @Date: 2025/3/25 15:24 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/materialProperty") | ||||||
|  | @Api(tags = {"商品扩展字段"}) | ||||||
|  | public class MaterialPropertyController extends BaseController { | ||||||
|  | 
 | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MaterialPropertyController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MaterialPropertyService materialPropertyService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         MaterialProperty materialProperty = materialPropertyService.getMaterialProperty(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(materialProperty != null) { | ||||||
|  |             objectMap.put("info", materialProperty); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         List<MaterialProperty> list = materialPropertyService.select(name); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = materialPropertyService.insertMaterialProperty(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = materialPropertyService.updateMaterialProperty(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/addOrUpdate") | ||||||
|  |     @ApiOperation(value = "新增或修改") | ||||||
|  |     public String addOrUpdate(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         String nativeName = obj.getString("nativeName"); | ||||||
|  |         String anotherName = obj.getString("anotherName"); | ||||||
|  |         boolean exist = materialPropertyService.checkIsNativeNameExist(nativeName); | ||||||
|  |         int res; | ||||||
|  |         if(!exist) { | ||||||
|  |             obj.put("id", null); | ||||||
|  |             res = materialPropertyService.insertMaterialProperty(obj, request); | ||||||
|  |         } else { | ||||||
|  |             res = materialPropertyService.updateMaterialPropertyByNativeName(nativeName, anotherName); | ||||||
|  |         } | ||||||
|  |         return returnStr(objectMap, res); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialPropertyService.deleteMaterialProperty(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = materialPropertyService.batchDeleteMaterialProperty(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = materialPropertyService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/getAllList") | ||||||
|  |     @ApiOperation(value = "查询全部商品扩展字段信息") | ||||||
|  |     public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MaterialProperty> list = materialPropertyService.getMaterialProperty(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = list; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,236 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Msg; | ||||||
|  | import com.jsh.erp.datasource.entities.MsgEx; | ||||||
|  | import com.jsh.erp.service.MsgService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/msg") | ||||||
|  | @Api(tags = {"消息管理"}) | ||||||
|  | public class MsgController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(MsgController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private MsgService msgService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Msg msg = msgService.getMsg(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(msg != null) { | ||||||
|  |             objectMap.put("info", msg); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         List<MsgEx> list = msgService.select(name); | ||||||
|  |         if(list!=null && list.size()>0) { | ||||||
|  |             return getDataTable(list); | ||||||
|  |         } else { | ||||||
|  |             return null; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = msgService.insertMsg(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = msgService.updateMsg(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = msgService.deleteMsg(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = msgService.batchDeleteMsg(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = msgService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据状态查询消息 | ||||||
|  |      * @param status | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getMsgByStatus") | ||||||
|  |     @ApiOperation(value = "根据状态查询消息") | ||||||
|  |     public BaseResponseInfo getMsgByStatus(@RequestParam("status") String status, | ||||||
|  |                                            HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<MsgEx> list = msgService.getMsgByStatus(status); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = list; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量更新状态 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/batchUpdateStatus") | ||||||
|  |     @ApiOperation(value = "批量更新状态") | ||||||
|  |     public BaseResponseInfo batchUpdateStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                               HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String ids = jsonObject.getString("ids"); | ||||||
|  |             String status = jsonObject.getString("status"); | ||||||
|  |             msgService.batchUpdateStatus(ids, status); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = "更新成功"; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据状态查询数量 | ||||||
|  |      * @param status | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getMsgCountByStatus") | ||||||
|  |     @ApiOperation(value = "根据状态查询数量") | ||||||
|  |     public BaseResponseInfo getMsgCountByStatus(@RequestParam("status") String status, | ||||||
|  |                                                 HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Long> map = new HashMap<String, Long>(); | ||||||
|  |             Long count = msgService.getMsgCountByStatus(status); | ||||||
|  |             map.put("count", count); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据类型查询数量 | ||||||
|  |      * @param type | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getMsgCountByType") | ||||||
|  |     @ApiOperation(value = "根据类型查询数量") | ||||||
|  |     public BaseResponseInfo getMsgCountByType(@RequestParam("type") String type, | ||||||
|  |                                                 HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Integer> map = new HashMap<>(); | ||||||
|  |             Integer count = msgService.getMsgCountByType(type); | ||||||
|  |             map.put("count", count); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 全部设置未已读 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/readAllMsg") | ||||||
|  |     @ApiOperation(value = "全部设置未已读") | ||||||
|  |     public BaseResponseInfo readAllMsg(HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             msgService.readAllMsg(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = "操作成功!"; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,187 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSON; | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.constants.BusinessConstants; | ||||||
|  | import com.jsh.erp.datasource.entities.Organization; | ||||||
|  | import com.jsh.erp.datasource.vo.TreeNode; | ||||||
|  | import com.jsh.erp.service.OrganizationService; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.text.SimpleDateFormat; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * create by: jsh | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/organization") | ||||||
|  | @Api(tags = {"机构管理"}) | ||||||
|  | public class OrganizationController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(OrganizationController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private OrganizationService organizationService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Organization organization = organizationService.getOrganization(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(organization != null) { | ||||||
|  |             objectMap.put("info", organization); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = organizationService.insertOrganization(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = organizationService.updateOrganization(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = organizationService.deleteOrganization(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = organizationService.batchDeleteOrganization(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = organizationService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据id来查询机构信息 | ||||||
|  |      * @param id | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findById") | ||||||
|  |     @ApiOperation(value = "根据id来查询机构信息") | ||||||
|  |     public BaseResponseInfo findById(@RequestParam("id") Long id, HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||||||
|  |         try { | ||||||
|  |             List<Organization> dataList = organizationService.findById(id); | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (Organization org : dataList) { | ||||||
|  |                     outer.put("id", org.getId()); | ||||||
|  |                     outer.put("orgAbr", org.getOrgAbr()); | ||||||
|  |                     outer.put("parentId", org.getParentId()); | ||||||
|  |                     List<Organization> dataParentList = organizationService.findByParentId(org.getParentId()); | ||||||
|  |                     if(dataParentList!=null&&dataParentList.size()>0){ | ||||||
|  |                         //父级机构名称显示简称 | ||||||
|  |                         outer.put("orgParentName", dataParentList.get(0).getOrgAbr()); | ||||||
|  |                     } | ||||||
|  |                     outer.put("orgNo", org.getOrgNo()); | ||||||
|  |                     outer.put("sort", org.getSort()); | ||||||
|  |                     outer.put("remark", org.getRemark()); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = outer; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取机构树数据 | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getOrganizationTree") | ||||||
|  |     @ApiOperation(value = "获取机构树数据") | ||||||
|  |     public JSONArray getOrganizationTree(@RequestParam("id") Long id) throws Exception{ | ||||||
|  |        JSONArray arr=new JSONArray(); | ||||||
|  |        List<TreeNode> organizationTree= organizationService.getOrganizationTree(id); | ||||||
|  |        if(organizationTree!=null&&organizationTree.size()>0){ | ||||||
|  |            for(TreeNode node:organizationTree){ | ||||||
|  |                String str=JSON.toJSONString(node); | ||||||
|  |                JSONObject obj=JSON.parseObject(str); | ||||||
|  |                arr.add(obj); | ||||||
|  |            } | ||||||
|  |        } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据用户获取全部机构树 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllOrganizationTreeByUser") | ||||||
|  |     @ApiOperation(value = "根据用户获取全部机构树") | ||||||
|  |     public JSONArray getAllOrganizationTreeByUser(HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         Long userId = userService.getUserId(request); | ||||||
|  |         String roleType = userService.getRoleTypeByUserId(userId).getType(); | ||||||
|  |         if(BusinessConstants.ROLE_TYPE_PUBLIC.equals(roleType)) { | ||||||
|  |             List<TreeNode> organizationTree = organizationService.getOrganizationTree(null); | ||||||
|  |             if(organizationTree!=null && organizationTree.size()>0){ | ||||||
|  |                 for(TreeNode node: organizationTree){ | ||||||
|  |                     String str = JSON.toJSONString(node); | ||||||
|  |                     JSONObject obj = JSON.parseObject(str); | ||||||
|  |                     arr.add(obj); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,241 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Person; | ||||||
|  | import com.jsh.erp.service.PersonService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji|sheng|hua 管伊佳erp | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/person") | ||||||
|  | @Api(tags = {"经手人管理"}) | ||||||
|  | public class PersonController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(PersonController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private PersonService personService; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Person person = personService.getPerson(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(person != null) { | ||||||
|  |             objectMap.put("info", person); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         List<Person> list = personService.select(name, type); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = personService.insertPerson(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = personService.updatePerson(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = personService.deletePerson(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = personService.batchDeletePerson(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = personService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 全部数据列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllList") | ||||||
|  |     @ApiOperation(value = "全部数据列表") | ||||||
|  |     public BaseResponseInfo getAllList(HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             List<Person> personList = personService.getPerson(); | ||||||
|  |             map.put("personList", personList); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = personList; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据Id获取经手人信息 | ||||||
|  |      * @param personIds | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPersonByIds") | ||||||
|  |     @ApiOperation(value = "根据Id获取经手人信息") | ||||||
|  |     public BaseResponseInfo getPersonByIds(@RequestParam("personIds") String personIds, | ||||||
|  |                                            HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             Map<Long,String> personMap = personService.getPersonMap(); | ||||||
|  |             String names = personService.getPersonByMapAndIds(personMap, personIds); | ||||||
|  |             map.put("names", names); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据类型获取经手人信息 | ||||||
|  |      * @param type | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPersonByType") | ||||||
|  |     @ApiOperation(value = "根据类型获取经手人信息") | ||||||
|  |     public BaseResponseInfo getPersonByType(@RequestParam("type") String type, | ||||||
|  |                                             HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             List<Person> personList = personService.getPersonByType(type); | ||||||
|  |             map.put("personList", personList); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据类型获取经手人信息 1-销售员,2-仓管员,3-财务员 | ||||||
|  |      * @param typeNum | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPersonByNumType") | ||||||
|  |     @ApiOperation(value = "根据类型获取经手人信息1-销售员,2-仓管员,3-财务员") | ||||||
|  |     public JSONArray getPersonByNumType(@RequestParam("type") String typeNum, | ||||||
|  |                                         HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             String type = ""; | ||||||
|  |             if (typeNum.equals("1")) { | ||||||
|  |                 type = "销售员"; | ||||||
|  |             } else if (typeNum.equals("2")) { | ||||||
|  |                 type = "仓管员"; | ||||||
|  |             } else if (typeNum.equals("3")) { | ||||||
|  |                 type = "财务员"; | ||||||
|  |             } | ||||||
|  |             List<Person> personList = personService.getPersonByType(type); | ||||||
|  |             if (null != personList) { | ||||||
|  |                 for (Person person : personList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("value", person.getId().toString()); | ||||||
|  |                     item.put("text", person.getName()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = personService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,197 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.PlatformConfig; | ||||||
|  | import com.jsh.erp.service.PlatformConfigService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji|sheng|hua 管伊佳erp QQ7827-18920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/platformConfig") | ||||||
|  | @Api(tags = {"平台参数"}) | ||||||
|  | public class PlatformConfigController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(PlatformConfigController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private PlatformConfigService platformConfigService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         PlatformConfig platformConfig = platformConfigService.getPlatformConfig(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(platformConfig != null) { | ||||||
|  |             objectMap.put("info", platformConfig); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String platformKey = StringUtil.getInfo(search, "platformKey"); | ||||||
|  |         List<PlatformConfig> list = platformConfigService.select(platformKey); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = platformConfigService.insertPlatformConfig(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = platformConfigService.updatePlatformConfig(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = platformConfigService.deletePlatformConfig(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = platformConfigService.batchDeletePlatformConfig(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取平台名称 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPlatform/name") | ||||||
|  |     @ApiOperation(value = "获取平台名称") | ||||||
|  |     public String getPlatformName(HttpServletRequest request)throws Exception { | ||||||
|  |         String res; | ||||||
|  |         try { | ||||||
|  |             String platformKey = "platform_name"; | ||||||
|  |             PlatformConfig platformConfig = platformConfigService.getInfoByKey(platformKey); | ||||||
|  |             res = platformConfig.getPlatformValue(); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res = "ERP系统"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取官方网站地址 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPlatform/url") | ||||||
|  |     @ApiOperation(value = "获取官方网站地址") | ||||||
|  |     public String getPlatformUrl(HttpServletRequest request)throws Exception { | ||||||
|  |         String res; | ||||||
|  |         try { | ||||||
|  |             String platformKey = "platform_url"; | ||||||
|  |             PlatformConfig platformConfig = platformConfigService.getInfoByKey(platformKey); | ||||||
|  |             res = platformConfig.getPlatformValue(); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res = "#"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取是否开启注册 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getPlatform/registerFlag") | ||||||
|  |     @ApiOperation(value = "获取是否开启注册") | ||||||
|  |     public String getPlatformRegisterFlag(HttpServletRequest request)throws Exception { | ||||||
|  |         String res; | ||||||
|  |         try { | ||||||
|  |             String platformKey = "register_flag"; | ||||||
|  |             PlatformConfig platformConfig = platformConfigService.getInfoByKey(platformKey); | ||||||
|  |             res = platformConfig.getPlatformValue(); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res = "#"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据platformKey更新platformValue | ||||||
|  |      * @param object | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/updatePlatformConfigByKey") | ||||||
|  |     @ApiOperation(value = "根据platformKey更新platformValue") | ||||||
|  |     public String updatePlatformConfigByKey(@RequestBody JSONObject object, | ||||||
|  |                                             HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         String platformKey = object.getString("platformKey"); | ||||||
|  |         String platformValue = object.getString("platformValue"); | ||||||
|  |         int res = platformConfigService.updatePlatformConfigByKey(platformKey, platformValue); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据platformKey查询信息 | ||||||
|  |      * @param platformKey | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getInfoByKey") | ||||||
|  |     @ApiOperation(value = "根据platformKey查询信息") | ||||||
|  |     public BaseResponseInfo getInfoByKey(@RequestParam("platformKey") String platformKey, | ||||||
|  |                                             HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             PlatformConfig platformConfig = platformConfigService.getInfoByKey(platformKey); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = platformConfig; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,368 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.gitee.starblues.integration.application.PluginApplication; | ||||||
|  | import com.gitee.starblues.integration.operator.PluginOperator; | ||||||
|  | import com.gitee.starblues.integration.operator.module.PluginInfo; | ||||||
|  | import com.jsh.erp.constants.BusinessConstants; | ||||||
|  | import com.jsh.erp.datasource.entities.User; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.ComputerInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.util.DigestUtils; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.nio.file.Paths; | ||||||
|  | import java.util.*; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 插件jar 包测试功能 | ||||||
|  |  * @author jishenghua | ||||||
|  |  * @version 1.0 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/plugin") | ||||||
|  | @Api(tags = {"插件管理"}) | ||||||
|  | public class PluginController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(PluginController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     private final PluginOperator pluginOperator; | ||||||
|  | 
 | ||||||
|  |     @Autowired | ||||||
|  |     public PluginController(PluginApplication pluginApplication) { | ||||||
|  |         this.pluginOperator = pluginApplication.getPluginOperator(); | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 获取插件信息 | ||||||
|  |      * @return 返回插件信息 | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取插件信息") | ||||||
|  |     public BaseResponseInfo getPluginInfo(@RequestParam(value = "name",required = false) String name, | ||||||
|  |                                           @RequestParam("currentPage") Integer currentPage, | ||||||
|  |                                           @RequestParam("pageSize") Integer pageSize, | ||||||
|  |                                           HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             List<PluginInfo> resList = new ArrayList<>(); | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 List<PluginInfo> list = pluginOperator.getPluginInfo(); | ||||||
|  |                 if (StringUtil.isEmpty(name)) { | ||||||
|  |                     resList = list; | ||||||
|  |                 } else { | ||||||
|  |                     for (PluginInfo pi : list) { | ||||||
|  |                         String desc = pi.getPluginDescriptor().getPluginDescription(); | ||||||
|  |                         if (desc.contains(name)) { | ||||||
|  |                             resList.add(pi); | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             map.put("rows", resList); | ||||||
|  |             map.put("total", resList.size()); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取插件jar文件名 | ||||||
|  |      * @return 获取插件文件名。只在生产环境显示 | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/files") | ||||||
|  |     @ApiOperation(value = "获取插件jar文件名") | ||||||
|  |     public Set<String> getPluginFilePaths(){ | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 return pluginOperator.getPluginFilePaths(); | ||||||
|  |             } else { | ||||||
|  |                 return null; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             return null; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据插件id停止插件 | ||||||
|  |      * @param id 插件id | ||||||
|  |      * @return 返回操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/stop/{id}") | ||||||
|  |     @ApiOperation(value = "根据插件id停止插件") | ||||||
|  |     public BaseResponseInfo stop(@PathVariable("id") String id){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         String message = ""; | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.stop(id)) { | ||||||
|  |                     message = "plugin '" + id + "' stop success"; | ||||||
|  |                 } else { | ||||||
|  |                     message = "plugin '" + id + "' stop failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 message = "power is limit"; | ||||||
|  |             } | ||||||
|  |             map.put("message", message); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             map.put("message", "plugin '" + id +"' stop failure. " + e.getMessage()); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = map; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据插件id启动插件 | ||||||
|  |      * @param id 插件id | ||||||
|  |      * @return 返回操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/start/{id}") | ||||||
|  |     @ApiOperation(value = "根据插件id启动插件") | ||||||
|  |     public BaseResponseInfo start(@PathVariable("id") String id){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         String message = ""; | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.start(id)) { | ||||||
|  |                     message = "plugin '" + id + "' start success"; | ||||||
|  |                 } else { | ||||||
|  |                     message = "plugin '" + id + "' start failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 message = "power is limit"; | ||||||
|  |             } | ||||||
|  |             map.put("message", message); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             map.put("message", "plugin '" + id +"' start failure. " + e.getMessage()); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = map; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据插件id卸载插件 | ||||||
|  |      * @param id 插件id | ||||||
|  |      * @return 返回操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/uninstall/{id}") | ||||||
|  |     @ApiOperation(value = "根据插件id卸载插件") | ||||||
|  |     public BaseResponseInfo uninstall(@PathVariable("id") String id){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         String message = ""; | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.uninstall(id, true)) { | ||||||
|  |                     message = "plugin '" + id + "' uninstall success"; | ||||||
|  |                 } else { | ||||||
|  |                     message = "plugin '" + id + "' uninstall failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 message = "power is limit"; | ||||||
|  |             } | ||||||
|  |             map.put("message", message); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             map.put("message", "plugin '" + id +"' uninstall failure. " + e.getMessage()); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = map; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据插件路径安装插件。该插件jar必须在服务器上存在。注意: 该操作只适用于生产环境 | ||||||
|  |      * @param path 插件路径名称 | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/installByPath") | ||||||
|  |     @ApiOperation(value = "根据插件路径安装插件") | ||||||
|  |     public String install(@RequestParam("path") String path){ | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.install(Paths.get(path))) { | ||||||
|  |                     return "installByPath success"; | ||||||
|  |                 } else { | ||||||
|  |                     return "installByPath failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 return "installByPath failure"; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             return "installByPath failure : " + e.getMessage(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 上传并安装插件。注意: 该操作只适用于生产环境 | ||||||
|  |      * @param file 上传文件 multipartFile | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/uploadInstallPluginJar") | ||||||
|  |     @ApiOperation(value = "上传并安装插件") | ||||||
|  |     public BaseResponseInfo install(MultipartFile file, HttpServletRequest request, HttpServletResponse response){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 pluginOperator.uploadPluginAndStart(file); | ||||||
|  |                 res.code = 200; | ||||||
|  |                 res.data = "导入成功"; | ||||||
|  |             } else { | ||||||
|  |                 res.code = 500; | ||||||
|  |                 res.data = "抱歉,无操作权限!"; | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "导入失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 上传插件的配置文件。注意: 该操作只适用于生产环境 | ||||||
|  |      * @param multipartFile 上传文件 multipartFile | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/uploadPluginConfigFile") | ||||||
|  |     @ApiOperation(value = "上传插件的配置文件") | ||||||
|  |     public String uploadConfig(@RequestParam("configFile") MultipartFile multipartFile){ | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.uploadConfigFile(multipartFile)) { | ||||||
|  |                     return "uploadConfig success"; | ||||||
|  |                 } else { | ||||||
|  |                     return "uploadConfig failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 return "installByPath failure"; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             return "uploadConfig failure : " + e.getMessage(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 备份插件。注意: 该操作只适用于生产环境 | ||||||
|  |      * @param pluginId 插件id | ||||||
|  |      * @return 操作结果 | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/back/{pluginId}") | ||||||
|  |     @ApiOperation(value = "备份插件") | ||||||
|  |     public String backupPlugin(@PathVariable("pluginId") String pluginId){ | ||||||
|  |         try { | ||||||
|  |             User userInfo = userService.getCurrentUser(); | ||||||
|  |             if(BusinessConstants.DEFAULT_MANAGER.equals(userInfo.getLoginName())) { | ||||||
|  |                 if (pluginOperator.backupPlugin(pluginId, "testBack")) { | ||||||
|  |                     return "backupPlugin success"; | ||||||
|  |                 } else { | ||||||
|  |                     return "backupPlugin failure"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 return "backupPlugin failure"; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             return "backupPlugin failure : " + e.getMessage(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取加密后的mac | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getMacWithSecret") | ||||||
|  |     @ApiOperation(value = "获取加密后的mac") | ||||||
|  |     public BaseResponseInfo getMacWithSecret(){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String mac = ComputerInfo.getMacAddress(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = DigestUtils.md5DigestAsHex(mac.getBytes()); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据插件标识判断是否存在 | ||||||
|  |      * @param pluginIds 多个用逗号隔开 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/checkByPluginId") | ||||||
|  |     @ApiOperation(value = "根据插件标识判断是否存在") | ||||||
|  |     public BaseResponseInfo checkByTag(@RequestParam("pluginIds") String pluginIds){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             boolean data = false; | ||||||
|  |             if(StringUtil.isNotEmpty(pluginIds)) { | ||||||
|  |                 String[] pluginIdList = pluginIds.split(","); | ||||||
|  |                 List<PluginInfo> list = pluginOperator.getPluginInfo(); | ||||||
|  |                 for (PluginInfo pi : list) { | ||||||
|  |                     String info = pi.getPluginDescriptor().getPluginId(); | ||||||
|  |                     for (int i = 0; i < pluginIdList.length; i++) { | ||||||
|  |                         if (pluginIdList[i].equals(info)) { | ||||||
|  |                             data = true; | ||||||
|  |                         } | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,178 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Role; | ||||||
|  | import com.jsh.erp.datasource.entities.RoleEx; | ||||||
|  | import com.jsh.erp.service.RoleService; | ||||||
|  | import com.jsh.erp.service.UserBusinessService; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji sheng hua jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/role") | ||||||
|  | @Api(tags = {"角色管理"}) | ||||||
|  | public class RoleController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(RoleController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private RoleService roleService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserBusinessService userBusinessService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Role role = roleService.getRole(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(role != null) { | ||||||
|  |             objectMap.put("info", role); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         String description = StringUtil.getInfo(search, "description"); | ||||||
|  |         List<RoleEx> list = roleService.select(name, description); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = roleService.insertRole(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = roleService.updateRole(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = roleService.deleteRole(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = roleService.batchDeleteRole(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = roleService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 角色对应应用显示 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findUserRole") | ||||||
|  |     @ApiOperation(value = "查询用户的角色") | ||||||
|  |     public JSONArray findUserRole(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId, | ||||||
|  |                                   HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             //获取权限信息 | ||||||
|  |             String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, keyId); | ||||||
|  |             List<Role> dataList = roleService.findUserRole(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (Role role : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", role.getId()); | ||||||
|  |                     item.put("text", role.getName()); | ||||||
|  |                     Boolean flag = ubValue.contains("[" + role.getId().toString() + "]"); | ||||||
|  |                     if (flag) { | ||||||
|  |                         item.put("checked", true); | ||||||
|  |                     } | ||||||
|  |                     arr.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/allList") | ||||||
|  |     @ApiOperation(value = "查询全部角色列表") | ||||||
|  |     public List<Role> allList(HttpServletRequest request)throws Exception { | ||||||
|  |         return roleService.allList(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/tenantRoleList") | ||||||
|  |     @ApiOperation(value = "查询租户角色列表") | ||||||
|  |     public List<Role> tenantRoleList(HttpServletRequest request)throws Exception { | ||||||
|  |         return roleService.tenantRoleList(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = roleService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,53 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.jsh.erp.service.SequenceService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji-sheng-hua 752*718*920 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/sequence") | ||||||
|  | @Api(tags = {"单据编号"}) | ||||||
|  | public class SequenceController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(SequenceController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SequenceService sequenceService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单据编号生成接口 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/buildNumber") | ||||||
|  |     @ApiOperation(value = "单据编号生成接口") | ||||||
|  |     public BaseResponseInfo buildNumber(HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             String number = sequenceService.buildOnlyNumber(); | ||||||
|  |             map.put("defaultNumber", number); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,103 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.datasource.entities.DepotItem; | ||||||
|  | import com.jsh.erp.datasource.entities.SerialNumberEx; | ||||||
|  | import com.jsh.erp.service.DepotHeadService; | ||||||
|  | import com.jsh.erp.service.DepotItemService; | ||||||
|  | import com.jsh.erp.service.SerialNumberService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.Tools; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Description | ||||||
|  |  * @Author: jsh | ||||||
|  |  * @Date: 2019/1/22 10:29 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/serialNumber") | ||||||
|  | @Api(tags = {"序列号管理"}) | ||||||
|  | public class SerialNumberController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(SerialNumberController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SerialNumberService serialNumberService; | ||||||
|  |     @Resource | ||||||
|  |     private DepotHeadService depotHeadService; | ||||||
|  |     @Resource | ||||||
|  |     private DepotItemService depotItemService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * create by: jsh | ||||||
|  |      * @return java.lang.Object | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/batAddSerialNumber") | ||||||
|  |     @ApiOperation(value = "批量添加序列号") | ||||||
|  |     public String batAddSerialNumber(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception{ | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         String materialCode = jsonObject.getString("materialCode"); | ||||||
|  |         String serialNumberPrefix = jsonObject.getString("serialNumberPrefix"); | ||||||
|  |         Integer batAddTotal = jsonObject.getInteger("batAddTotal"); | ||||||
|  |         String remark = jsonObject.getString("remark"); | ||||||
|  |         int insert = serialNumberService.batAddSerialNumber(materialCode,serialNumberPrefix,batAddTotal,remark); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取序列号商品 | ||||||
|  |      * @param name | ||||||
|  |      * @param depotId | ||||||
|  |      * @param barCode | ||||||
|  |      * @param currentPage | ||||||
|  |      * @param pageSize | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getEnableSerialNumberList") | ||||||
|  |     @ApiOperation(value = "获取序列号商品") | ||||||
|  |     public BaseResponseInfo getEnableSerialNumberList(@RequestParam("name") String name, | ||||||
|  |                                                       @RequestParam("depotItemId") Long depotItemId, | ||||||
|  |                                                       @RequestParam("depotId") Long depotId, | ||||||
|  |                                                       @RequestParam("barCode") String barCode, | ||||||
|  |                                                       @RequestParam("page") Integer currentPage, | ||||||
|  |                                                       @RequestParam("rows") Integer pageSize, | ||||||
|  |                                                       HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         Map<String, Object> map = new HashMap<>(); | ||||||
|  |         try { | ||||||
|  |             String number = ""; | ||||||
|  |             if(depotItemId != null) { | ||||||
|  |                 DepotItem depotItem = depotItemService.getDepotItem(depotItemId); | ||||||
|  |                 number = depotHeadService.getDepotHead(depotItem.getHeaderId()).getNumber(); | ||||||
|  |             } | ||||||
|  |             List<SerialNumberEx> list = serialNumberService.getEnableSerialNumberList(number, name, depotId, barCode, (currentPage-1)*pageSize, pageSize); | ||||||
|  |             for(SerialNumberEx serialNumberEx: list) { | ||||||
|  |                 serialNumberEx.setCreateTimeStr(Tools.getCenternTime(serialNumberEx.getCreateTime())); | ||||||
|  |             } | ||||||
|  |             Long total = serialNumberService.getEnableSerialNumberCount(number, name, depotId, barCode); | ||||||
|  |             map.put("rows", list); | ||||||
|  |             map.put("total", total); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,488 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Supplier; | ||||||
|  | import com.jsh.erp.service.SupplierService; | ||||||
|  | import com.jsh.erp.service.SystemConfigService; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.service.UserBusinessService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.io.File; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji|sheng|hua 管伊佳erp | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/supplier") | ||||||
|  | @Api(tags = {"商家管理"}) | ||||||
|  | public class SupplierController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(SupplierController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SupplierService supplierService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserBusinessService userBusinessService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SystemConfigService systemConfigService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Supplier supplier = supplierService.getSupplier(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(supplier != null) { | ||||||
|  |             objectMap.put("info", supplier); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String supplier = StringUtil.getInfo(search, "supplier"); | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         String phonenum = StringUtil.getInfo(search, "phonenum"); | ||||||
|  |         String telephone = StringUtil.getInfo(search, "telephone"); | ||||||
|  |         List<Supplier> list = supplierService.select(supplier, type, phonenum, telephone); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = supplierService.insertSupplier(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = supplierService.updateSupplier(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = supplierService.deleteSupplier(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = supplierService.batchDeleteSupplier(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = supplierService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameAndTypeExist") | ||||||
|  |     @ApiOperation(value = "检查名称和类型是否存在") | ||||||
|  |     public String checkIsNameAndTypeExist(@RequestParam Long id, | ||||||
|  |                                           @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                           @RequestParam(value ="type") String type, | ||||||
|  |                                           HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = supplierService.checkIsNameAndTypeExist(id, name, type); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找客户信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/findBySelect_cus") | ||||||
|  |     @ApiOperation(value = "查找客户信息") | ||||||
|  |     public JSONArray findBySelectCus(HttpServletRequest request) { | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             String type = "UserCustomer"; | ||||||
|  |             Long userId = userService.getUserId(request); | ||||||
|  |             //获取权限信息 | ||||||
|  |             String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, userId.toString()); | ||||||
|  |             List<Supplier> supplierList = supplierService.findBySelectCus(); | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != supplierList) { | ||||||
|  |                 boolean customerFlag = systemConfigService.getCustomerFlag(); | ||||||
|  |                 for (Supplier supplier : supplierList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     Boolean flag = ubValue.contains("[" + supplier.getId().toString() + "]"); | ||||||
|  |                     if (!customerFlag || flag) { | ||||||
|  |                         item.put("id", supplier.getId()); | ||||||
|  |                         item.put("supplier", supplier.getSupplier()); //客户名称 | ||||||
|  |                         dataArray.add(item); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             arr = dataArray; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找供应商信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/findBySelect_sup") | ||||||
|  |     @ApiOperation(value = "查找供应商信息") | ||||||
|  |     public JSONArray findBySelectSup(HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             List<Supplier> supplierList = supplierService.findBySelectSup(); | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != supplierList) { | ||||||
|  |                 for (Supplier supplier : supplierList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", supplier.getId()); | ||||||
|  |                     //供应商名称 | ||||||
|  |                     item.put("supplier", supplier.getSupplier()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             arr = dataArray; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找往来单位,含供应商和客户信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/findBySelect_organ") | ||||||
|  |     @ApiOperation(value = "查找往来单位,含供应商和客户信息") | ||||||
|  |     public JSONArray findBySelectOrgan(HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             //1、获取供应商信息 | ||||||
|  |             List<Supplier> supplierList = supplierService.findBySelectSup(); | ||||||
|  |             if (null != supplierList) { | ||||||
|  |                 for (Supplier supplier : supplierList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", supplier.getId()); | ||||||
|  |                     item.put("supplier", supplier.getSupplier() + "[供应商]"); //供应商名称 | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             //2、获取客户信息 | ||||||
|  |             String type = "UserCustomer"; | ||||||
|  |             Long userId = userService.getUserId(request); | ||||||
|  |             String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, userId.toString()); | ||||||
|  |             List<Supplier> customerList = supplierService.findBySelectCus(); | ||||||
|  |             if (null != customerList) { | ||||||
|  |                 boolean customerFlag = systemConfigService.getCustomerFlag(); | ||||||
|  |                 for (Supplier supplier : customerList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     Boolean flag = ubValue.contains("[" + supplier.getId().toString() + "]"); | ||||||
|  |                     if (!customerFlag || flag) { | ||||||
|  |                         item.put("id", supplier.getId()); | ||||||
|  |                         item.put("supplier", supplier.getSupplier() + "[客户]"); //客户名称 | ||||||
|  |                         dataArray.add(item); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             arr = dataArray; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查找会员信息-下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/findBySelect_retail") | ||||||
|  |     @ApiOperation(value = "查找会员信息") | ||||||
|  |     public JSONArray findBySelectRetail(HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             List<Supplier> supplierList = supplierService.findBySelectRetail(); | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != supplierList) { | ||||||
|  |                 for (Supplier supplier : supplierList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", supplier.getId()); | ||||||
|  |                     //客户名称 | ||||||
|  |                     item.put("supplier", supplier.getSupplier()); | ||||||
|  |                     item.put("advanceIn", supplier.getAdvanceIn()); //预付款金额 | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             arr = dataArray; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = supplierService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 用户对应客户显示 | ||||||
|  |      * @param type | ||||||
|  |      * @param keyId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/findUserCustomer") | ||||||
|  |     @ApiOperation(value = "用户对应客户显示") | ||||||
|  |     public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId, | ||||||
|  |                                    HttpServletRequest request) throws Exception{ | ||||||
|  |         JSONArray arr = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             //获取权限信息 | ||||||
|  |             String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, keyId); | ||||||
|  |             List<Supplier> dataList = supplierService.findUserCustomer(); | ||||||
|  |             //开始拼接json数据 | ||||||
|  |             JSONObject outer = new JSONObject(); | ||||||
|  |             outer.put("id", 0); | ||||||
|  |             outer.put("key", 0); | ||||||
|  |             outer.put("value", 0); | ||||||
|  |             outer.put("title", "客户列表"); | ||||||
|  |             outer.put("attributes", "客户列表"); | ||||||
|  |             //存放数据json数组 | ||||||
|  |             JSONArray dataArray = new JSONArray(); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (Supplier supplier : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", supplier.getId()); | ||||||
|  |                     item.put("key", supplier.getId()); | ||||||
|  |                     item.put("value", supplier.getId()); | ||||||
|  |                     item.put("title", supplier.getSupplier()); | ||||||
|  |                     item.put("attributes", supplier.getSupplier()); | ||||||
|  |                     Boolean flag = ubValue.contains("[" + supplier.getId().toString() + "]"); | ||||||
|  |                     if (flag) { | ||||||
|  |                         item.put("checked", true); | ||||||
|  |                     } | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             outer.put("children", dataArray); | ||||||
|  |             arr.add(outer); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 根据客户或供应商查询期初、期初已收等信息 | ||||||
|  |      * @param organId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getBeginNeedByOrganId") | ||||||
|  |     @ApiOperation(value = "根据客户或供应商查询期初、期初已收等信息") | ||||||
|  |     public BaseResponseInfo getBeginNeedByOrganId(@RequestParam("organId") Long organId, | ||||||
|  |                                         HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> map = supplierService.getBeginNeedByOrganId(organId); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = map; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 导入供应商 | ||||||
|  |      * @param file | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/importVendor") | ||||||
|  |     @ApiOperation(value = "导入供应商") | ||||||
|  |     public BaseResponseInfo importVendor(MultipartFile file, | ||||||
|  |                             HttpServletRequest request, HttpServletResponse response) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             supplierService.importVendor(file, request); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = "导入成功"; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "导入失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 导入客户 | ||||||
|  |      * @param file | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/importCustomer") | ||||||
|  |     @ApiOperation(value = "导入客户") | ||||||
|  |     public BaseResponseInfo importCustomer(MultipartFile file, | ||||||
|  |                                         HttpServletRequest request, HttpServletResponse response) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             supplierService.importCustomer(file, request); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = "导入成功"; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "导入失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 导入会员 | ||||||
|  |      * @param file | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/importMember") | ||||||
|  |     @ApiOperation(value = "导入会员") | ||||||
|  |     public BaseResponseInfo importMember(MultipartFile file, | ||||||
|  |                                            HttpServletRequest request, HttpServletResponse response) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             supplierService.importMember(file, request); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = "导入成功"; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "导入失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 生成excel表格 | ||||||
|  |      * @param supplier | ||||||
|  |      * @param type | ||||||
|  |      * @param phonenum | ||||||
|  |      * @param telephone | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/exportExcel") | ||||||
|  |     public void exportExcel(@RequestParam(value = "supplier", required = false) String supplier, | ||||||
|  |                             @RequestParam("type") String type, | ||||||
|  |                             @RequestParam(value = "phonenum", required = false) String phonenum, | ||||||
|  |                             @RequestParam(value = "telephone", required = false) String telephone, | ||||||
|  |                             HttpServletRequest request, HttpServletResponse response) { | ||||||
|  |         try { | ||||||
|  |             List<Supplier> dataList = supplierService.findByAll(supplier, type, phonenum, telephone); | ||||||
|  |             File file = supplierService.exportExcel(dataList, type); | ||||||
|  |             ExcelUtils.downloadExcel(file, file.getName(), response); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置会员当前的预付款 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetAdvanceIn") | ||||||
|  |     @ApiOperation(value = "批量设置会员当前的预付款") | ||||||
|  |     public String batchSetAdvanceIn(@RequestBody JSONObject jsonObject, | ||||||
|  |                                     HttpServletRequest request)throws Exception { | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = supplierService.batchSetAdvanceIn(ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,370 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.SystemConfig; | ||||||
|  | import com.jsh.erp.service.SystemConfigService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.beans.factory.annotation.Value; | ||||||
|  | import org.springframework.util.AntPathMatcher; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.web.multipart.MultipartFile; | ||||||
|  | import org.springframework.web.multipart.MultipartHttpServletRequest; | ||||||
|  | import org.springframework.web.servlet.HandlerMapping; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.imageio.ImageIO; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.awt.image.BufferedImage; | ||||||
|  | import java.io.*; | ||||||
|  | import java.net.HttpURLConnection; | ||||||
|  | import java.net.URL; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Description | ||||||
|  |  * @Author: jishenghua | ||||||
|  |  * @Date: 2021-3-13 0:01 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/systemConfig") | ||||||
|  | @Api(tags = {"系统参数"}) | ||||||
|  | public class SystemConfigController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(SystemConfigController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private SystemConfigService systemConfigService; | ||||||
|  | 
 | ||||||
|  |     @Value(value="${file.uploadType}") | ||||||
|  |     private Long fileUploadType; | ||||||
|  | 
 | ||||||
|  |     @Value(value="${file.path}") | ||||||
|  |     private String filePath; | ||||||
|  | 
 | ||||||
|  |     @Value(value="${spring.servlet.multipart.max-file-size}") | ||||||
|  |     private Long maxFileSize; | ||||||
|  | 
 | ||||||
|  |     @Value(value="${spring.servlet.multipart.max-request-size}") | ||||||
|  |     private Long maxRequestSize; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         SystemConfig systemConfig = systemConfigService.getSystemConfig(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(systemConfig != null) { | ||||||
|  |             objectMap.put("info", systemConfig); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String companyName = StringUtil.getInfo(search, "companyName"); | ||||||
|  |         List<SystemConfig> list = systemConfigService.select(companyName); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = systemConfigService.insertSystemConfig(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = systemConfigService.updateSystemConfig(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = systemConfigService.deleteSystemConfig(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = systemConfigService.batchDeleteSystemConfig(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = systemConfigService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取当前租户的配置信息 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getCurrentInfo") | ||||||
|  |     @ApiOperation(value = "获取当前租户的配置信息") | ||||||
|  |     public BaseResponseInfo getCurrentInfo(HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try{ | ||||||
|  |             List<SystemConfig> list = systemConfigService.getSystemConfig(); | ||||||
|  |             res.code = 200; | ||||||
|  |             if(list.size()>0) { | ||||||
|  |                 res.data = list.get(0); | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取文件大小限制 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/fileSizeLimit") | ||||||
|  |     @ApiOperation(value = "获取文件大小限制") | ||||||
|  |     public BaseResponseInfo fileSizeLimit(HttpServletRequest request) throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try{ | ||||||
|  |             Long limit = 0L; | ||||||
|  |             if(maxFileSize<maxRequestSize) { | ||||||
|  |                 limit = maxFileSize; | ||||||
|  |             } else { | ||||||
|  |                 limit = maxRequestSize; | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = limit; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 文件上传统一方法 | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/upload") | ||||||
|  |     @ApiOperation(value = "文件上传统一方法") | ||||||
|  |     public BaseResponseInfo upload(HttpServletRequest request, HttpServletResponse response) { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String savePath = ""; | ||||||
|  |             String bizPath = request.getParameter("biz"); | ||||||
|  |             if ("bill".equals(bizPath) || "financial".equals(bizPath) || "material".equals(bizPath)) { | ||||||
|  |                 MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; | ||||||
|  |                 MultipartFile file = multipartRequest.getFile("file");// 获取上传文件对象 | ||||||
|  |                 if(fileUploadType == 1) { | ||||||
|  |                     savePath = systemConfigService.uploadLocal(file, bizPath, request); | ||||||
|  |                 } else if(fileUploadType == 2) { | ||||||
|  |                     savePath = systemConfigService.uploadAliOss(file, bizPath, request); | ||||||
|  |                 } | ||||||
|  |                 if(StringUtil.isNotEmpty(savePath)){ | ||||||
|  |                     res.code = 200; | ||||||
|  |                     res.data = savePath; | ||||||
|  |                 }else { | ||||||
|  |                     res.code = 500; | ||||||
|  |                     res.data = "上传失败!"; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 res.code = 505; | ||||||
|  |                 res.data = "文件分类错误!"; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "上传失败!"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 预览图片&下载文件 | ||||||
|  |      * 请求地址:http://localhost:8080/common/static/{financial/afsdfasdfasdf_1547866868179.txt} | ||||||
|  |      * | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/static/**") | ||||||
|  |     @ApiOperation(value = "预览图片&下载文件") | ||||||
|  |     public void view(HttpServletRequest request, HttpServletResponse response) { | ||||||
|  |         // ISO-8859-1 ==> UTF-8 进行编码转换 | ||||||
|  |         String imgPath = extractPathFromPattern(request); | ||||||
|  |         if(StringUtil.isEmpty(imgPath) || imgPath=="null"){ | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |         // 其余处理略 | ||||||
|  |         InputStream inputStream = null; | ||||||
|  |         OutputStream outputStream = null; | ||||||
|  |         try { | ||||||
|  |             imgPath = imgPath.replace("..", ""); | ||||||
|  |             if (imgPath.endsWith(",")) { | ||||||
|  |                 imgPath = imgPath.substring(0, imgPath.length() - 1); | ||||||
|  |             } | ||||||
|  |             String fileUrl = ""; | ||||||
|  |             if(fileUploadType == 1) { | ||||||
|  |                 fileUrl = systemConfigService.getFileUrlLocal(imgPath); | ||||||
|  |                 inputStream = new BufferedInputStream(new FileInputStream(fileUrl)); | ||||||
|  |             } else if(fileUploadType == 2) { | ||||||
|  |                 fileUrl = systemConfigService.getFileUrlAliOss(imgPath); | ||||||
|  |                 URL url = new URL(fileUrl); | ||||||
|  |                 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | ||||||
|  |                 conn.setRequestMethod("GET"); | ||||||
|  |                 conn.setConnectTimeout(5 * 1000); | ||||||
|  |                 inputStream = conn.getInputStream();// 通过输入流获取图片数据 | ||||||
|  |             } | ||||||
|  |             outputStream = response.getOutputStream(); | ||||||
|  |             byte[] buf = new byte[1024]; | ||||||
|  |             int len; | ||||||
|  |             while ((len = inputStream.read(buf)) > 0) { | ||||||
|  |                 outputStream.write(buf, 0, len); | ||||||
|  |             } | ||||||
|  |             response.flushBuffer(); | ||||||
|  |         } catch (IOException e) { | ||||||
|  |             logger.error("预览文件失败" + e.getMessage()); | ||||||
|  |             response.setStatus(404); | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             response.setStatus(404); | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } finally { | ||||||
|  |             if (inputStream != null) { | ||||||
|  |                 try { | ||||||
|  |                     inputStream.close(); | ||||||
|  |                 } catch (IOException e) { | ||||||
|  |                     logger.error(e.getMessage(), e); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             if (outputStream != null) { | ||||||
|  |                 try { | ||||||
|  |                     outputStream.close(); | ||||||
|  |                 } catch (IOException e) { | ||||||
|  |                     logger.error(e.getMessage(), e); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 预览缩略图&下载文件 | ||||||
|  |      * @param request | ||||||
|  |      * @param response | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/static/mini/**") | ||||||
|  |     @ApiOperation(value = "预览缩略图&下载文件") | ||||||
|  |     public void viewMini(HttpServletRequest request, HttpServletResponse response) { | ||||||
|  |         // ISO-8859-1 ==> UTF-8 进行编码转换 | ||||||
|  |         String imgPath = extractPathFromPattern(request); | ||||||
|  |         if(StringUtil.isEmpty(imgPath) || imgPath=="null"){ | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |         InputStream inputStream = null; | ||||||
|  |         OutputStream outputStream = null; | ||||||
|  |         try { | ||||||
|  |             imgPath = imgPath.replace("..", ""); | ||||||
|  |             if (imgPath.endsWith(",")) { | ||||||
|  |                 imgPath = imgPath.substring(0, imgPath.length() - 1); | ||||||
|  |             } | ||||||
|  |             String fileUrl = ""; | ||||||
|  |             if(fileUploadType == 1) { | ||||||
|  |                 fileUrl = systemConfigService.getFileUrlLocal(imgPath); | ||||||
|  |                 inputStream = new BufferedInputStream(new FileInputStream(fileUrl)); | ||||||
|  |             } else if(fileUploadType == 2) { | ||||||
|  |                 fileUrl = systemConfigService.getFileUrlAliOss(imgPath); | ||||||
|  |                 URL url = new URL(fileUrl); | ||||||
|  |                 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); | ||||||
|  |                 conn.setRequestMethod("GET"); | ||||||
|  |                 conn.setConnectTimeout(5 * 1000); | ||||||
|  |                 inputStream = conn.getInputStream();// 通过输入流获取图片数据 | ||||||
|  |             } | ||||||
|  |             int index = fileUrl.lastIndexOf("."); | ||||||
|  |             String ext = fileUrl.substring(index + 1); | ||||||
|  |             BufferedImage image = systemConfigService.getImageMini(inputStream, 80); | ||||||
|  |             outputStream = response.getOutputStream(); | ||||||
|  |             ImageIO.write(image, ext, outputStream); | ||||||
|  |             response.flushBuffer(); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             response.setStatus(404); | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } finally { | ||||||
|  |             if (outputStream != null) { | ||||||
|  |                 try { | ||||||
|  |                     outputStream.close(); | ||||||
|  |                 } catch (IOException e) { | ||||||
|  |                     logger.error(e.getMessage(), e); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * Excel导出统一接口 | ||||||
|  |      * @param response | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/exportExcelByParam") | ||||||
|  |     @ApiOperation(value = "生成excel表格") | ||||||
|  |     public void exportExcelByParam(@RequestBody JSONObject jsonObject, | ||||||
|  |                                    HttpServletResponse response) { | ||||||
|  |         try { | ||||||
|  |             String title = jsonObject.getString("title"); | ||||||
|  |             String head = jsonObject.getString("head"); | ||||||
|  |             String tip = jsonObject.getString("tip"); | ||||||
|  |             JSONArray arr = jsonObject.getJSONArray("list"); | ||||||
|  |             systemConfigService.exportExcelByParam(title, head, tip, arr, response); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      *  把指定URL后的字符串全部截断当成参数 | ||||||
|  |      *  这么做是为了防止URL中包含中文或者特殊字符(/等)时,匹配不了的问题 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     private static String extractPathFromPattern(final HttpServletRequest request) { | ||||||
|  |         String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE); | ||||||
|  |         String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE); | ||||||
|  |         return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,128 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Tenant; | ||||||
|  | import com.jsh.erp.datasource.entities.TenantEx; | ||||||
|  | import com.jsh.erp.service.TenantService; | ||||||
|  | import com.jsh.erp.utils.Constants; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import com.jsh.erp.utils.StringUtil; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji_sheng_hua 管伊佳erp | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/tenant") | ||||||
|  | @Api(tags = {"租户管理"}) | ||||||
|  | public class TenantController extends BaseController { | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private TenantService tenantService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Tenant tenant = tenantService.getTenant(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(tenant != null) { | ||||||
|  |             objectMap.put("info", tenant); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String loginName = StringUtil.getInfo(search, "loginName"); | ||||||
|  |         String type = StringUtil.getInfo(search, "type"); | ||||||
|  |         String enabled = StringUtil.getInfo(search, "enabled"); | ||||||
|  |         String remark = StringUtil.getInfo(search, "remark"); | ||||||
|  |         List<TenantEx> list = tenantService.select(loginName, type, enabled, remark); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = tenantService.insertTenant(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = tenantService.updateTenant(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = tenantService.deleteTenant(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = tenantService.batchDeleteTenant(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = tenantService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = tenantService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,150 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.datasource.entities.Unit; | ||||||
|  | import com.jsh.erp.service.UnitService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Description | ||||||
|  |  * | ||||||
|  |  * @Author: qiankunpingtai | ||||||
|  |  * @Date: 2019/4/1 15:38 | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/unit") | ||||||
|  | @Api(tags = {"单位管理"}) | ||||||
|  | public class UnitController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(UnitController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UnitService unitService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         Unit unit = unitService.getUnit(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(unit != null) { | ||||||
|  |             objectMap.put("info", unit); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String name = StringUtil.getInfo(search, "name"); | ||||||
|  |         List<Unit> list = unitService.select(name); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = unitService.insertUnit(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = unitService.updateUnit(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = unitService.deleteUnit(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = unitService.batchDeleteUnit(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = unitService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位列表 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getAllList") | ||||||
|  |     @ApiOperation(value = "单位列表") | ||||||
|  |     public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<Unit> unitList = unitService.getUnit(); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = unitList; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取数据失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Boolean status = jsonObject.getBoolean("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = unitService.batchSetStatus(status, ids); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,170 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.datasource.entities.UserBusiness; | ||||||
|  | import com.jsh.erp.service.UserBusinessService; | ||||||
|  | import com.jsh.erp.utils.BaseResponseInfo; | ||||||
|  | import com.jsh.erp.utils.ErpInfo; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji_sheng_hua jshERP | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/userBusiness") | ||||||
|  | @Api(tags = {"用户角色模块的关系"}) | ||||||
|  | public class UserBusinessController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(UserBusinessController.class); | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserBusinessService userBusinessService; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         UserBusiness userBusiness = userBusinessService.getUserBusiness(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(userBusiness != null) { | ||||||
|  |             objectMap.put("info", userBusiness); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = userBusinessService.insertUserBusiness(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = userBusinessService.updateUserBusiness(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = userBusinessService.deleteUserBusiness(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = userBusinessService.batchDeleteUserBusiness(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = userBusinessService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     /** | ||||||
|  |      * 获取信息 | ||||||
|  |      * @param keyId | ||||||
|  |      * @param type | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getBasicData") | ||||||
|  |     @ApiOperation(value = "获取信息") | ||||||
|  |     public BaseResponseInfo getBasicData(@RequestParam(value = "KeyId") String keyId, | ||||||
|  |                                          @RequestParam(value = "Type") String type, | ||||||
|  |                                          HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             List<UserBusiness> list = userBusinessService.getBasicData(keyId, type); | ||||||
|  |             Map<String, List> mapData = new HashMap<String, List>(); | ||||||
|  |             mapData.put("userBusinessList", list); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = mapData; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "查询权限失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 校验存在 | ||||||
|  |      * @param type | ||||||
|  |      * @param keyId | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/checkIsValueExist") | ||||||
|  |     @ApiOperation(value = "校验存在") | ||||||
|  |     public String checkIsValueExist(@RequestParam(value ="type", required = false) String type, | ||||||
|  |                                    @RequestParam(value ="keyId", required = false) String keyId, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<String, Object>(); | ||||||
|  |         Long id = userBusinessService.checkIsValueExist(type, keyId); | ||||||
|  |         objectMap.put("id", id); | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新角色的按钮权限 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/updateBtnStr") | ||||||
|  |     @ApiOperation(value = "更新角色的按钮权限") | ||||||
|  |     public BaseResponseInfo updateBtnStr(@RequestBody JSONObject jsonObject, | ||||||
|  |                                          HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String roleId = jsonObject.getString("roleId"); | ||||||
|  |             String btnStr = jsonObject.getString("btnStr"); | ||||||
|  |             String keyId = roleId; | ||||||
|  |             String type = "RoleFunctions"; | ||||||
|  |             int back = userBusinessService.updateBtnStr(keyId, type, btnStr); | ||||||
|  |             if(back > 0) { | ||||||
|  |                 res.code = 200; | ||||||
|  |                 res.data = "成功"; | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "更新权限失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,542 @@ | |||||||
|  | package com.jsh.erp.controller; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.fastjson.JSON; | ||||||
|  | import com.alibaba.fastjson.JSONArray; | ||||||
|  | import com.alibaba.fastjson.JSONObject; | ||||||
|  | import com.jsh.erp.base.BaseController; | ||||||
|  | import com.jsh.erp.base.TableDataInfo; | ||||||
|  | import com.jsh.erp.constants.BusinessConstants; | ||||||
|  | import com.jsh.erp.constants.ExceptionConstants; | ||||||
|  | import com.jsh.erp.datasource.entities.Tenant; | ||||||
|  | import com.jsh.erp.datasource.entities.User; | ||||||
|  | import com.jsh.erp.datasource.entities.UserEx; | ||||||
|  | import com.jsh.erp.datasource.vo.TreeNodeEx; | ||||||
|  | import com.jsh.erp.exception.BusinessParamCheckingException; | ||||||
|  | import com.jsh.erp.exception.BusinessRunTimeException; | ||||||
|  | import com.jsh.erp.service.RedisService; | ||||||
|  | import com.jsh.erp.service.RoleService; | ||||||
|  | import com.jsh.erp.service.TenantService; | ||||||
|  | import com.jsh.erp.service.UserService; | ||||||
|  | import com.jsh.erp.utils.*; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import org.slf4j.Logger; | ||||||
|  | import org.slf4j.LoggerFactory; | ||||||
|  | import org.springframework.beans.factory.annotation.Value; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | 
 | ||||||
|  | import javax.annotation.Resource; | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import java.util.*; | ||||||
|  | 
 | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnJson; | ||||||
|  | import static com.jsh.erp.utils.ResponseJsonUtil.returnStr; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author ji_sheng_hua 管伊佳erp | ||||||
|  |  */ | ||||||
|  | @RestController | ||||||
|  | @RequestMapping(value = "/user") | ||||||
|  | @Api(tags = {"用户管理"}) | ||||||
|  | public class UserController extends BaseController { | ||||||
|  |     private Logger logger = LoggerFactory.getLogger(UserController.class); | ||||||
|  | 
 | ||||||
|  |     @Value("${manage.roleId}") | ||||||
|  |     private Integer manageRoleId; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private UserService userService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private RoleService roleService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private TenantService tenantService; | ||||||
|  | 
 | ||||||
|  |     @Resource | ||||||
|  |     private RedisService redisService; | ||||||
|  | 
 | ||||||
|  |     private static String SUCCESS = "操作成功"; | ||||||
|  |     private static String ERROR = "操作失败"; | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/info") | ||||||
|  |     @ApiOperation(value = "根据id获取信息") | ||||||
|  |     public String getList(@RequestParam("id") Long id, | ||||||
|  |                           HttpServletRequest request) throws Exception { | ||||||
|  |         User user = userService.getUser(id); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         if(user != null) { | ||||||
|  |             objectMap.put("info", user); | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/list") | ||||||
|  |     @ApiOperation(value = "获取信息列表") | ||||||
|  |     public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         String userName = StringUtil.getInfo(search, "userName"); | ||||||
|  |         String loginName = StringUtil.getInfo(search, "loginName"); | ||||||
|  |         List<UserEx> list = userService.select(userName, loginName); | ||||||
|  |         return getDataTable(list); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/add") | ||||||
|  |     @ApiOperation(value = "新增") | ||||||
|  |     public String addResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int insert = userService.insertUser(obj, request); | ||||||
|  |         return returnStr(objectMap, insert); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/update") | ||||||
|  |     @ApiOperation(value = "修改") | ||||||
|  |     public String updateResource(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int update = userService.updateUser(obj, request); | ||||||
|  |         return returnStr(objectMap, update); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/delete") | ||||||
|  |     @ApiOperation(value = "删除") | ||||||
|  |     public String deleteResource(@RequestParam("id") Long id, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = userService.deleteUser(id, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @DeleteMapping(value = "/deleteBatch") | ||||||
|  |     @ApiOperation(value = "批量删除") | ||||||
|  |     public String batchDeleteResource(@RequestParam("ids") String ids, HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int delete = userService.batchDeleteUser(ids, request); | ||||||
|  |         return returnStr(objectMap, delete); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/checkIsNameExist") | ||||||
|  |     @ApiOperation(value = "检查名称是否存在") | ||||||
|  |     public String checkIsNameExist(@RequestParam Long id, @RequestParam(value ="name", required = false) String name, | ||||||
|  |                                    HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int exist = userService.checkIsNameExist(id, name); | ||||||
|  |         if(exist > 0) { | ||||||
|  |             objectMap.put("status", true); | ||||||
|  |         } else { | ||||||
|  |             objectMap.put("status", false); | ||||||
|  |         } | ||||||
|  |         return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/login") | ||||||
|  |     @ApiOperation(value = "登录") | ||||||
|  |     public BaseResponseInfo login(@RequestBody UserEx userParam, HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             //特殊处理,不校验验证码 | ||||||
|  |             //userService.validateCaptcha(userParam.getCode(), userParam.getUuid()); | ||||||
|  |             Map<String, Object> data = userService.login(userParam.getLoginName().trim(), userParam.getPassword().trim(), request); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch (BusinessRunTimeException e) { | ||||||
|  |             throw new BusinessRunTimeException(e.getCode(), e.getMessage()); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "用户登录失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/weixinLogin") | ||||||
|  |     @ApiOperation(value = "微信登录") | ||||||
|  |     public BaseResponseInfo weixinLogin(@RequestBody JSONObject jsonObject, | ||||||
|  |                                   HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             String weixinCode = jsonObject.getString("weixinCode"); | ||||||
|  |             User user = userService.getUserByWeixinCode(weixinCode); | ||||||
|  |             if(user == null) { | ||||||
|  |                 res.code = 501; | ||||||
|  |                 res.data = "微信未绑定"; | ||||||
|  |             } else { | ||||||
|  |                 logger.info("微信登录:" + user.getLoginName()); | ||||||
|  |                 Map<String, Object> data = userService.login(user.getLoginName().trim(), user.getPassword().trim(), request); | ||||||
|  |                 res.code = 200; | ||||||
|  |                 res.data = data; | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "用户登录失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/weixinBind") | ||||||
|  |     @ApiOperation(value = "绑定微信") | ||||||
|  |     public String weixinBind(@RequestBody JSONObject jsonObject, | ||||||
|  |                              HttpServletRequest request)throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         String loginName = jsonObject.getString("loginName"); | ||||||
|  |         String password = jsonObject.getString("password"); | ||||||
|  |         String weixinCode = jsonObject.getString("weixinCode"); | ||||||
|  |         int res = userService.weixinBind(loginName, password, weixinCode); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/getUserSession") | ||||||
|  |     @ApiOperation(value = "获取用户信息") | ||||||
|  |     public BaseResponseInfo getSessionUser(HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<>(); | ||||||
|  |             Long userId = Long.parseLong(redisService.getObjectFromSessionByKey(request,"userId").toString()); | ||||||
|  |             User user = userService.getUser(userId); | ||||||
|  |             user.setPassword(null); | ||||||
|  |             data.put("user", user); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取session失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/logout") | ||||||
|  |     @ApiOperation(value = "退出") | ||||||
|  |     public BaseResponseInfo logout(HttpServletRequest request, HttpServletResponse response)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             redisService.deleteObjectBySession(request,"userId"); | ||||||
|  |             redisService.deleteObjectBySession(request,"clientIp"); | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "退出失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/resetPwd") | ||||||
|  |     @ApiOperation(value = "重置密码") | ||||||
|  |     public String resetPwd(@RequestBody JSONObject jsonObject, | ||||||
|  |                                      HttpServletRequest request) throws Exception { | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         Long id = jsonObject.getLong("id"); | ||||||
|  |         String password = "123456"; | ||||||
|  |         String md5Pwd = Tools.md5Encryp(password); | ||||||
|  |         int update = userService.resetPwd(md5Pwd, id); | ||||||
|  |         if(update > 0) { | ||||||
|  |             return returnJson(objectMap, SUCCESS, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ERROR, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @PutMapping(value = "/updatePwd") | ||||||
|  |     @ApiOperation(value = "更新密码") | ||||||
|  |     public String updatePwd(@RequestBody JSONObject jsonObject, HttpServletRequest request)throws Exception { | ||||||
|  |         Integer flag = 0; | ||||||
|  |         Map<String, Object> objectMap = new HashMap<String, Object>(); | ||||||
|  |         try { | ||||||
|  |             String info = ""; | ||||||
|  |             Long userId = jsonObject.getLong("userId"); | ||||||
|  |             String oldpwd = jsonObject.getString("oldpassword"); | ||||||
|  |             String password = jsonObject.getString("password"); | ||||||
|  |             User user = userService.getUser(userId); | ||||||
|  |             //必须和原始密码一致才可以更新密码 | ||||||
|  |             if (oldpwd.equalsIgnoreCase(user.getPassword())) { | ||||||
|  |                 user.setPassword(password); | ||||||
|  |                 flag = userService.updateUserByObj(user); //1-成功 | ||||||
|  |                 info = "修改成功"; | ||||||
|  |             } else { | ||||||
|  |                 flag = 2; //原始密码输入错误 | ||||||
|  |                 info = "原始密码输入错误"; | ||||||
|  |             } | ||||||
|  |             objectMap.put("status", flag); | ||||||
|  |             if(flag > 0) { | ||||||
|  |                 return returnJson(objectMap, info, ErpInfo.OK.code); | ||||||
|  |             } else { | ||||||
|  |                 return returnJson(objectMap, ERROR, ErpInfo.ERROR.code); | ||||||
|  |             } | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(">>>>>>>>>>>>>修改用户ID为 : " + jsonObject.getLong("userId") + "密码信息失败", e); | ||||||
|  |             flag = 3; | ||||||
|  |             objectMap.put("status", flag); | ||||||
|  |             return returnJson(objectMap, ERROR, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 用户列表,用于用户下拉框 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/getUserList") | ||||||
|  |     @ApiOperation(value = "用户列表") | ||||||
|  |     public JSONArray getUserList(HttpServletRequest request)throws Exception { | ||||||
|  |         JSONArray dataArray = new JSONArray(); | ||||||
|  |         try { | ||||||
|  |             List<User> dataList = userService.getUser(request); | ||||||
|  |             if (null != dataList) { | ||||||
|  |                 for (User user : dataList) { | ||||||
|  |                     JSONObject item = new JSONObject(); | ||||||
|  |                     item.put("id", user.getId()); | ||||||
|  |                     item.put("userName", user.getUsername()); | ||||||
|  |                     dataArray.add(item); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |         } | ||||||
|  |         return dataArray; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * create by: cjl | ||||||
|  |      * description: | ||||||
|  |      *  新增用户及机构和用户关系 | ||||||
|  |      * create time: 2019/3/8 16:06 | ||||||
|  |      * @Param: beanJson | ||||||
|  |      * @return java.lang.Object | ||||||
|  |      */ | ||||||
|  |     @PostMapping("/addUser") | ||||||
|  |     @ApiOperation(value = "新增用户") | ||||||
|  |     @ResponseBody | ||||||
|  |     public Object addUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{ | ||||||
|  |         JSONObject result = ExceptionConstants.standardSuccess(); | ||||||
|  |         User userInfo = userService.getCurrentUser(); | ||||||
|  |         Tenant tenant = tenantService.getTenantByTenantId(userInfo.getTenantId()); | ||||||
|  |         Long count = userService.countUser(null,null); | ||||||
|  |         if(tenant!=null) { | ||||||
|  |             if(count>= tenant.getUserNumLimit()) { | ||||||
|  |                 throw new BusinessParamCheckingException(ExceptionConstants.USER_OVER_LIMIT_FAILED_CODE, | ||||||
|  |                         ExceptionConstants.USER_OVER_LIMIT_FAILED_MSG); | ||||||
|  |             } else { | ||||||
|  |                 UserEx ue= JSONObject.parseObject(obj.toJSONString(), UserEx.class); | ||||||
|  |                 userService.addUserAndOrgUserRel(ue, request); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * create by: cjl | ||||||
|  |      * description: | ||||||
|  |      *  修改用户及机构和用户关系 | ||||||
|  |      * create time: 2019/3/8 16:06 | ||||||
|  |      * @Param: beanJson | ||||||
|  |      * @return java.lang.Object | ||||||
|  |      */ | ||||||
|  |     @PutMapping("/updateUser") | ||||||
|  |     @ApiOperation(value = "修改用户") | ||||||
|  |     @ResponseBody | ||||||
|  |     public Object updateUser(@RequestBody JSONObject obj, HttpServletRequest request)throws Exception{ | ||||||
|  |         JSONObject result = ExceptionConstants.standardSuccess(); | ||||||
|  |         UserEx ue= JSONObject.parseObject(obj.toJSONString(), UserEx.class); | ||||||
|  |         userService.updateUserAndOrgUserRel(ue, request); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 注册用户 | ||||||
|  |      * @param ue | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/registerUser") | ||||||
|  |     @ApiOperation(value = "注册用户") | ||||||
|  |     public Object registerUser(@RequestBody UserEx ue, | ||||||
|  |                                HttpServletRequest request)throws Exception{ | ||||||
|  |         JSONObject result = ExceptionConstants.standardSuccess(); | ||||||
|  |         ue.setUsername(ue.getLoginName()); | ||||||
|  |         userService.validateCaptcha(ue.getCode(), ue.getUuid()); | ||||||
|  |         userService.checkLoginName(ue); //检查登录名 | ||||||
|  |         userService.registerUser(ue,manageRoleId,request); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取机构用户树 | ||||||
|  |      * @return | ||||||
|  |      * @throws Exception | ||||||
|  |      */ | ||||||
|  |     @RequestMapping("/getOrganizationUserTree") | ||||||
|  |     @ApiOperation(value = "获取机构用户树") | ||||||
|  |     public JSONArray getOrganizationUserTree()throws Exception{ | ||||||
|  |         JSONArray arr=new JSONArray(); | ||||||
|  |         List<TreeNodeEx> organizationUserTree= userService.getOrganizationUserTree(); | ||||||
|  |         if(organizationUserTree!=null&&organizationUserTree.size()>0){ | ||||||
|  |             for(TreeNodeEx node:organizationUserTree){ | ||||||
|  |                 String str=JSON.toJSONString(node); | ||||||
|  |                 JSONObject obj=JSON.parseObject(str); | ||||||
|  |                 arr.add(obj) ; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return arr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @GetMapping(value = "/getCurrentPriceLimit") | ||||||
|  |     @ApiOperation(value = "查询当前用户的价格屏蔽") | ||||||
|  |     public BaseResponseInfo getCurrentPriceLimit(HttpServletRequest request)throws Exception { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<>(); | ||||||
|  |             String priceLimit = roleService.getCurrentPriceLimit(request); | ||||||
|  |             data.put("priceLimit", priceLimit); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取session失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取当前用户的角色类型 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getRoleTypeByCurrentUser") | ||||||
|  |     @ApiOperation(value = "获取当前用户的角色类型") | ||||||
|  |     public BaseResponseInfo getRoleTypeByCurrentUser(HttpServletRequest request) { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<String, Object>(); | ||||||
|  |             Long userId = userService.getUserId(request); | ||||||
|  |             String roleType = userService.getRoleTypeByUserId(userId).getType(); //角色类型 | ||||||
|  |             data.put("roleType", roleType); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取当前用户的按钮权限 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/getUserBtnByCurrentUser") | ||||||
|  |     @ApiOperation(value = "获取当前用户的按钮权限") | ||||||
|  |     public BaseResponseInfo getUserBtnByCurrentUser(HttpServletRequest request) { | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<>(); | ||||||
|  |             Long userId = userService.getUserId(request); | ||||||
|  |             String loginName = userService.getUser(userId).getLoginName(); | ||||||
|  |             JSONArray btnStrArr = userService.getBtnStrArrById(userId); | ||||||
|  |             if(!"admin".equals(loginName)) { | ||||||
|  |                 data.put("userBtn", btnStrArr); | ||||||
|  |             } | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch(Exception e){ | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取随机校验码 | ||||||
|  |      * @param response | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/randomImage") | ||||||
|  |     @ApiOperation(value = "获取随机校验码") | ||||||
|  |     public BaseResponseInfo randomImage(HttpServletResponse response){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<>(); | ||||||
|  |             String uuid = UUID.randomUUID().toString().replaceAll("-", "") + ""; | ||||||
|  |             String verifyKey = BusinessConstants.CAPTCHA_CODE_KEY + uuid; | ||||||
|  |             String codeNum = Tools.getCharAndNum(4); | ||||||
|  |             redisService.storageCaptchaObject(verifyKey, codeNum); | ||||||
|  |             String base64 = RandImageUtil.generate(codeNum); | ||||||
|  |             data.put("uuid", uuid); | ||||||
|  |             data.put("base64", base64); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量设置状态-启用或者禁用 | ||||||
|  |      * @param jsonObject | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PostMapping(value = "/batchSetStatus") | ||||||
|  |     @ApiOperation(value = "批量设置状态") | ||||||
|  |     public String batchSetStatus(@RequestBody JSONObject jsonObject, | ||||||
|  |                                  HttpServletRequest request)throws Exception { | ||||||
|  |         Byte status = jsonObject.getByte("status"); | ||||||
|  |         String ids = jsonObject.getString("ids"); | ||||||
|  |         Map<String, Object> objectMap = new HashMap<>(); | ||||||
|  |         int res = userService.batchSetStatus(status, ids, request); | ||||||
|  |         if(res > 0) { | ||||||
|  |             return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code); | ||||||
|  |         } else { | ||||||
|  |             return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取当前用户的用户数量和租户信息 | ||||||
|  |      * @param request | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/infoWithTenant") | ||||||
|  |     @ApiOperation(value = "获取当前用户的用户数量和租户信息") | ||||||
|  |     public BaseResponseInfo infoWithTenant(HttpServletRequest request){ | ||||||
|  |         BaseResponseInfo res = new BaseResponseInfo(); | ||||||
|  |         try { | ||||||
|  |             Map<String, Object> data = new HashMap<>(); | ||||||
|  |             Long userId = Long.parseLong(redisService.getObjectFromSessionByKey(request,"userId").toString()); | ||||||
|  |             User user = userService.getUser(userId); | ||||||
|  |             //获取当前用户数 | ||||||
|  |             int userCurrentNum = userService.getUser(request).size(); | ||||||
|  |             Tenant tenant = tenantService.getTenantByTenantId(user.getTenantId()); | ||||||
|  |             if(tenant.getExpireTime()!=null && tenant.getExpireTime().getTime()<System.currentTimeMillis()){ | ||||||
|  |                 //租户已经过期,移除token | ||||||
|  |                 redisService.deleteObjectBySession(request,"userId"); | ||||||
|  |                 redisService.deleteObjectBySession(request,"clientIp"); | ||||||
|  |             } | ||||||
|  |             data.put("type", tenant.getType()); //租户类型,0免费租户,1付费租户 | ||||||
|  |             data.put("expireTime", Tools.parseDateToStr(tenant.getExpireTime())); | ||||||
|  |             data.put("userCurrentNum", userCurrentNum); | ||||||
|  |             data.put("userNumLimit", tenant.getUserNumLimit()); | ||||||
|  |             data.put("tenantId", tenant.getTenantId()); | ||||||
|  |             res.code = 200; | ||||||
|  |             res.data = data; | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             logger.error(e.getMessage(), e); | ||||||
|  |             res.code = 500; | ||||||
|  |             res.data = "获取失败"; | ||||||
|  |         } | ||||||
|  |         return res; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,115 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class Account { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private String serialNo; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal initialAmount; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal currentAmount; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Boolean enabled; | ||||||
|  | 
 | ||||||
|  |     private String sort; | ||||||
|  | 
 | ||||||
|  |     private Boolean isDefault; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSerialNo() { | ||||||
|  |         return serialNo; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSerialNo(String serialNo) { | ||||||
|  |         this.serialNo = serialNo == null ? null : serialNo.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getInitialAmount() { | ||||||
|  |         return initialAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setInitialAmount(BigDecimal initialAmount) { | ||||||
|  |         this.initialAmount = initialAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getCurrentAmount() { | ||||||
|  |         return currentAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCurrentAmount(BigDecimal currentAmount) { | ||||||
|  |         this.currentAmount = currentAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getEnabled() { | ||||||
|  |         return enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnabled(Boolean enabled) { | ||||||
|  |         this.enabled = enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSort() { | ||||||
|  |         return sort; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSort(String sort) { | ||||||
|  |         this.sort = sort == null ? null : sort.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getIsDefault() { | ||||||
|  |         return isDefault; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setIsDefault(Boolean isDefault) { | ||||||
|  |         this.isDefault = isDefault; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,910 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | public class AccountExample { | ||||||
|  |     protected String orderByClause; | ||||||
|  | 
 | ||||||
|  |     protected boolean distinct; | ||||||
|  | 
 | ||||||
|  |     protected List<Criteria> oredCriteria; | ||||||
|  | 
 | ||||||
|  |     public AccountExample() { | ||||||
|  |         oredCriteria = new ArrayList<>(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByClause(String orderByClause) { | ||||||
|  |         this.orderByClause = orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByClause() { | ||||||
|  |         return orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDistinct(boolean distinct) { | ||||||
|  |         this.distinct = distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public boolean isDistinct() { | ||||||
|  |         return distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public List<Criteria> getOredCriteria() { | ||||||
|  |         return oredCriteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void or(Criteria criteria) { | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria or() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria createCriteria() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         if (oredCriteria.size() == 0) { | ||||||
|  |             oredCriteria.add(criteria); | ||||||
|  |         } | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected Criteria createCriteriaInternal() { | ||||||
|  |         Criteria criteria = new Criteria(); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void clear() { | ||||||
|  |         oredCriteria.clear(); | ||||||
|  |         orderByClause = null; | ||||||
|  |         distinct = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected abstract static class GeneratedCriteria { | ||||||
|  |         protected List<Criterion> criteria; | ||||||
|  | 
 | ||||||
|  |         protected GeneratedCriteria() { | ||||||
|  |             super(); | ||||||
|  |             criteria = new ArrayList<>(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isValid() { | ||||||
|  |             return criteria.size() > 0; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getAllCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition) { | ||||||
|  |             if (condition == null) { | ||||||
|  |                 throw new RuntimeException("Value for condition cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value, String property) { | ||||||
|  |             if (value == null) { | ||||||
|  |                 throw new RuntimeException("Value for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value1, Object value2, String property) { | ||||||
|  |             if (value1 == null || value2 == null) { | ||||||
|  |                 throw new RuntimeException("Between values for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value1, value2)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNull() { | ||||||
|  |             addCriterion("id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNotNull() { | ||||||
|  |             addCriterion("id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdEqualTo(Long value) { | ||||||
|  |             addCriterion("id =", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("id <>", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("id >", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id >=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThan(Long value) { | ||||||
|  |             addCriterion("id <", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id <=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIn(List<Long> values) { | ||||||
|  |             addCriterion("id in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("id not in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id not between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIsNull() { | ||||||
|  |             addCriterion("name is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIsNotNull() { | ||||||
|  |             addCriterion("name is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameEqualTo(String value) { | ||||||
|  |             addCriterion("name =", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotEqualTo(String value) { | ||||||
|  |             addCriterion("name <>", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameGreaterThan(String value) { | ||||||
|  |             addCriterion("name >", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("name >=", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLessThan(String value) { | ||||||
|  |             addCriterion("name <", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("name <=", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLike(String value) { | ||||||
|  |             addCriterion("name like", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotLike(String value) { | ||||||
|  |             addCriterion("name not like", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIn(List<String> values) { | ||||||
|  |             addCriterion("name in", values, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotIn(List<String> values) { | ||||||
|  |             addCriterion("name not in", values, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameBetween(String value1, String value2) { | ||||||
|  |             addCriterion("name between", value1, value2, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("name not between", value1, value2, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoIsNull() { | ||||||
|  |             addCriterion("serial_no is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoIsNotNull() { | ||||||
|  |             addCriterion("serial_no is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoEqualTo(String value) { | ||||||
|  |             addCriterion("serial_no =", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoNotEqualTo(String value) { | ||||||
|  |             addCriterion("serial_no <>", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoGreaterThan(String value) { | ||||||
|  |             addCriterion("serial_no >", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("serial_no >=", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoLessThan(String value) { | ||||||
|  |             addCriterion("serial_no <", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("serial_no <=", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoLike(String value) { | ||||||
|  |             addCriterion("serial_no like", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoNotLike(String value) { | ||||||
|  |             addCriterion("serial_no not like", value, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoIn(List<String> values) { | ||||||
|  |             addCriterion("serial_no in", values, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoNotIn(List<String> values) { | ||||||
|  |             addCriterion("serial_no not in", values, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoBetween(String value1, String value2) { | ||||||
|  |             addCriterion("serial_no between", value1, value2, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSerialNoNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("serial_no not between", value1, value2, "serialNo"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountIsNull() { | ||||||
|  |             addCriterion("initial_amount is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountIsNotNull() { | ||||||
|  |             addCriterion("initial_amount is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount =", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountNotEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount <>", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountGreaterThan(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount >", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountGreaterThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount >=", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountLessThan(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount <", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountLessThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("initial_amount <=", value, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("initial_amount in", values, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountNotIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("initial_amount not in", values, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("initial_amount between", value1, value2, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInitialAmountNotBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("initial_amount not between", value1, value2, "initialAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountIsNull() { | ||||||
|  |             addCriterion("current_amount is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountIsNotNull() { | ||||||
|  |             addCriterion("current_amount is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount =", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountNotEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount <>", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountGreaterThan(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount >", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountGreaterThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount >=", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountLessThan(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount <", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountLessThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("current_amount <=", value, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("current_amount in", values, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountNotIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("current_amount not in", values, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("current_amount between", value1, value2, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCurrentAmountNotBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("current_amount not between", value1, value2, "currentAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNull() { | ||||||
|  |             addCriterion("remark is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNotNull() { | ||||||
|  |             addCriterion("remark is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkEqualTo(String value) { | ||||||
|  |             addCriterion("remark =", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotEqualTo(String value) { | ||||||
|  |             addCriterion("remark <>", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThan(String value) { | ||||||
|  |             addCriterion("remark >", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark >=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThan(String value) { | ||||||
|  |             addCriterion("remark <", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark <=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLike(String value) { | ||||||
|  |             addCriterion("remark like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotLike(String value) { | ||||||
|  |             addCriterion("remark not like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIn(List<String> values) { | ||||||
|  |             addCriterion("remark in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotIn(List<String> values) { | ||||||
|  |             addCriterion("remark not in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark not between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIsNull() { | ||||||
|  |             addCriterion("enabled is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIsNotNull() { | ||||||
|  |             addCriterion("enabled is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled =", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled <>", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledGreaterThan(Boolean value) { | ||||||
|  |             addCriterion("enabled >", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledGreaterThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled >=", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledLessThan(Boolean value) { | ||||||
|  |             addCriterion("enabled <", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledLessThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled <=", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIn(List<Boolean> values) { | ||||||
|  |             addCriterion("enabled in", values, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotIn(List<Boolean> values) { | ||||||
|  |             addCriterion("enabled not in", values, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("enabled between", value1, value2, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("enabled not between", value1, value2, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIsNull() { | ||||||
|  |             addCriterion("sort is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIsNotNull() { | ||||||
|  |             addCriterion("sort is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortEqualTo(String value) { | ||||||
|  |             addCriterion("sort =", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotEqualTo(String value) { | ||||||
|  |             addCriterion("sort <>", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortGreaterThan(String value) { | ||||||
|  |             addCriterion("sort >", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("sort >=", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLessThan(String value) { | ||||||
|  |             addCriterion("sort <", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("sort <=", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLike(String value) { | ||||||
|  |             addCriterion("sort like", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotLike(String value) { | ||||||
|  |             addCriterion("sort not like", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIn(List<String> values) { | ||||||
|  |             addCriterion("sort in", values, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotIn(List<String> values) { | ||||||
|  |             addCriterion("sort not in", values, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortBetween(String value1, String value2) { | ||||||
|  |             addCriterion("sort between", value1, value2, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("sort not between", value1, value2, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultIsNull() { | ||||||
|  |             addCriterion("is_default is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultIsNotNull() { | ||||||
|  |             addCriterion("is_default is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultEqualTo(Boolean value) { | ||||||
|  |             addCriterion("is_default =", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultNotEqualTo(Boolean value) { | ||||||
|  |             addCriterion("is_default <>", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultGreaterThan(Boolean value) { | ||||||
|  |             addCriterion("is_default >", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultGreaterThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("is_default >=", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultLessThan(Boolean value) { | ||||||
|  |             addCriterion("is_default <", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultLessThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("is_default <=", value, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultIn(List<Boolean> values) { | ||||||
|  |             addCriterion("is_default in", values, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultNotIn(List<Boolean> values) { | ||||||
|  |             addCriterion("is_default not in", values, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("is_default between", value1, value2, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIsDefaultNotBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("is_default not between", value1, value2, "isDefault"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNull() { | ||||||
|  |             addCriterion("tenant_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNotNull() { | ||||||
|  |             addCriterion("tenant_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id =", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <>", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("tenant_id >", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id >=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThan(Long value) { | ||||||
|  |             addCriterion("tenant_id <", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id not in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id not between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNull() { | ||||||
|  |             addCriterion("delete_flag is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNotNull() { | ||||||
|  |             addCriterion("delete_flag is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag =", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <>", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThan(String value) { | ||||||
|  |             addCriterion("delete_flag >", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag >=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThan(String value) { | ||||||
|  |             addCriterion("delete_flag <", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLike(String value) { | ||||||
|  |             addCriterion("delete_flag like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotLike(String value) { | ||||||
|  |             addCriterion("delete_flag not like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag not in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag not between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criteria extends GeneratedCriteria { | ||||||
|  |         protected Criteria() { | ||||||
|  |             super(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criterion { | ||||||
|  |         private String condition; | ||||||
|  | 
 | ||||||
|  |         private Object value; | ||||||
|  | 
 | ||||||
|  |         private Object secondValue; | ||||||
|  | 
 | ||||||
|  |         private boolean noValue; | ||||||
|  | 
 | ||||||
|  |         private boolean singleValue; | ||||||
|  | 
 | ||||||
|  |         private boolean betweenValue; | ||||||
|  | 
 | ||||||
|  |         private boolean listValue; | ||||||
|  | 
 | ||||||
|  |         private String typeHandler; | ||||||
|  | 
 | ||||||
|  |         public String getCondition() { | ||||||
|  |             return condition; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getValue() { | ||||||
|  |             return value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getSecondValue() { | ||||||
|  |             return secondValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isNoValue() { | ||||||
|  |             return noValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isSingleValue() { | ||||||
|  |             return singleValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isBetweenValue() { | ||||||
|  |             return betweenValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isListValue() { | ||||||
|  |             return listValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public String getTypeHandler() { | ||||||
|  |             return typeHandler; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.typeHandler = null; | ||||||
|  |             this.noValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             if (value instanceof List<?>) { | ||||||
|  |                 this.listValue = true; | ||||||
|  |             } else { | ||||||
|  |                 this.singleValue = true; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value) { | ||||||
|  |             this(condition, value, null); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.secondValue = secondValue; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             this.betweenValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue) { | ||||||
|  |             this(condition, value, secondValue, null); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,176 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class AccountHead { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String type; | ||||||
|  | 
 | ||||||
|  |     private Long organId; | ||||||
|  | 
 | ||||||
|  |     private Long handsPersonId; | ||||||
|  | 
 | ||||||
|  |     private Long creator; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal changeAmount; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal discountMoney; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal totalPrice; | ||||||
|  | 
 | ||||||
|  |     private Long accountId; | ||||||
|  | 
 | ||||||
|  |     private String billNo; | ||||||
|  | 
 | ||||||
|  |     private Date billTime; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private String fileName; | ||||||
|  | 
 | ||||||
|  |     private String status; | ||||||
|  | 
 | ||||||
|  |     private String source; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(String type) { | ||||||
|  |         this.type = type == null ? null : type.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getOrganId() { | ||||||
|  |         return organId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrganId(Long organId) { | ||||||
|  |         this.organId = organId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getHandsPersonId() { | ||||||
|  |         return handsPersonId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setHandsPersonId(Long handsPersonId) { | ||||||
|  |         this.handsPersonId = handsPersonId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getCreator() { | ||||||
|  |         return creator; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCreator(Long creator) { | ||||||
|  |         this.creator = creator; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getChangeAmount() { | ||||||
|  |         return changeAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setChangeAmount(BigDecimal changeAmount) { | ||||||
|  |         this.changeAmount = changeAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getDiscountMoney() { | ||||||
|  |         return discountMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDiscountMoney(BigDecimal discountMoney) { | ||||||
|  |         this.discountMoney = discountMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTotalPrice() { | ||||||
|  |         return totalPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTotalPrice(BigDecimal totalPrice) { | ||||||
|  |         this.totalPrice = totalPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getAccountId() { | ||||||
|  |         return accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountId(Long accountId) { | ||||||
|  |         this.accountId = accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBillNo() { | ||||||
|  |         return billNo; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBillNo(String billNo) { | ||||||
|  |         this.billNo = billNo == null ? null : billNo.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getBillTime() { | ||||||
|  |         return billTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBillTime(Date billTime) { | ||||||
|  |         this.billTime = billTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getFileName() { | ||||||
|  |         return fileName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setFileName(String fileName) { | ||||||
|  |         this.fileName = fileName == null ? null : fileName.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getStatus() { | ||||||
|  |         return status; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setStatus(String status) { | ||||||
|  |         this.status = status == null ? null : status.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSource() { | ||||||
|  |         return source; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSource(String source) { | ||||||
|  |         this.source = source == null ? null : source.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | public class AccountHeadVo4Body { | ||||||
|  | 
 | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String info; | ||||||
|  | 
 | ||||||
|  |     private String rows; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getInfo() { | ||||||
|  |         return info; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setInfo(String info) { | ||||||
|  |         this.info = info; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRows() { | ||||||
|  |         return rows; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRows(String rows) { | ||||||
|  |         this.rows = rows; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,57 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class AccountHeadVo4ListEx extends AccountHead{ | ||||||
|  | 
 | ||||||
|  |     private String organName; | ||||||
|  | 
 | ||||||
|  |     private String handsPersonName; | ||||||
|  | 
 | ||||||
|  |     private String userName; | ||||||
|  | 
 | ||||||
|  |     private String accountName; | ||||||
|  | 
 | ||||||
|  |     private String billTimeStr; | ||||||
|  | 
 | ||||||
|  |     public String getOrganName() { | ||||||
|  |         return organName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrganName(String organName) { | ||||||
|  |         this.organName = organName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getHandsPersonName() { | ||||||
|  |         return handsPersonName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setHandsPersonName(String handsPersonName) { | ||||||
|  |         this.handsPersonName = handsPersonName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getUserName() { | ||||||
|  |         return userName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUserName(String userName) { | ||||||
|  |         this.userName = userName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAccountName() { | ||||||
|  |         return accountName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountName(String accountName) { | ||||||
|  |         this.accountName = accountName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBillTimeStr() { | ||||||
|  |         return billTimeStr; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBillTimeStr(String billTimeStr) { | ||||||
|  |         this.billTimeStr = billTimeStr; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,115 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class AccountItem { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private Long headerId; | ||||||
|  | 
 | ||||||
|  |     private Long accountId; | ||||||
|  | 
 | ||||||
|  |     private Long inOutItemId; | ||||||
|  | 
 | ||||||
|  |     private Long billId; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal needDebt; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal finishDebt; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal eachAmount; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getHeaderId() { | ||||||
|  |         return headerId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setHeaderId(Long headerId) { | ||||||
|  |         this.headerId = headerId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getAccountId() { | ||||||
|  |         return accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountId(Long accountId) { | ||||||
|  |         this.accountId = accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getInOutItemId() { | ||||||
|  |         return inOutItemId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setInOutItemId(Long inOutItemId) { | ||||||
|  |         this.inOutItemId = inOutItemId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getBillId() { | ||||||
|  |         return billId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBillId(Long billId) { | ||||||
|  |         this.billId = billId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getNeedDebt() { | ||||||
|  |         return needDebt; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setNeedDebt(BigDecimal needDebt) { | ||||||
|  |         this.needDebt = needDebt; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getFinishDebt() { | ||||||
|  |         return finishDebt; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setFinishDebt(BigDecimal finishDebt) { | ||||||
|  |         this.finishDebt = finishDebt; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getEachAmount() { | ||||||
|  |         return eachAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEachAmount(BigDecimal eachAmount) { | ||||||
|  |         this.eachAmount = eachAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,880 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | public class AccountItemExample { | ||||||
|  |     protected String orderByClause; | ||||||
|  | 
 | ||||||
|  |     protected boolean distinct; | ||||||
|  | 
 | ||||||
|  |     protected List<Criteria> oredCriteria; | ||||||
|  | 
 | ||||||
|  |     public AccountItemExample() { | ||||||
|  |         oredCriteria = new ArrayList<>(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByClause(String orderByClause) { | ||||||
|  |         this.orderByClause = orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByClause() { | ||||||
|  |         return orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDistinct(boolean distinct) { | ||||||
|  |         this.distinct = distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public boolean isDistinct() { | ||||||
|  |         return distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public List<Criteria> getOredCriteria() { | ||||||
|  |         return oredCriteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void or(Criteria criteria) { | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria or() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria createCriteria() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         if (oredCriteria.size() == 0) { | ||||||
|  |             oredCriteria.add(criteria); | ||||||
|  |         } | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected Criteria createCriteriaInternal() { | ||||||
|  |         Criteria criteria = new Criteria(); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void clear() { | ||||||
|  |         oredCriteria.clear(); | ||||||
|  |         orderByClause = null; | ||||||
|  |         distinct = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected abstract static class GeneratedCriteria { | ||||||
|  |         protected List<Criterion> criteria; | ||||||
|  | 
 | ||||||
|  |         protected GeneratedCriteria() { | ||||||
|  |             super(); | ||||||
|  |             criteria = new ArrayList<>(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isValid() { | ||||||
|  |             return criteria.size() > 0; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getAllCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition) { | ||||||
|  |             if (condition == null) { | ||||||
|  |                 throw new RuntimeException("Value for condition cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value, String property) { | ||||||
|  |             if (value == null) { | ||||||
|  |                 throw new RuntimeException("Value for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value1, Object value2, String property) { | ||||||
|  |             if (value1 == null || value2 == null) { | ||||||
|  |                 throw new RuntimeException("Between values for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value1, value2)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNull() { | ||||||
|  |             addCriterion("id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNotNull() { | ||||||
|  |             addCriterion("id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdEqualTo(Long value) { | ||||||
|  |             addCriterion("id =", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("id <>", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("id >", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id >=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThan(Long value) { | ||||||
|  |             addCriterion("id <", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id <=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIn(List<Long> values) { | ||||||
|  |             addCriterion("id in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("id not in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id not between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdIsNull() { | ||||||
|  |             addCriterion("header_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdIsNotNull() { | ||||||
|  |             addCriterion("header_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdEqualTo(Long value) { | ||||||
|  |             addCriterion("header_id =", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("header_id <>", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("header_id >", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("header_id >=", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdLessThan(Long value) { | ||||||
|  |             addCriterion("header_id <", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("header_id <=", value, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdIn(List<Long> values) { | ||||||
|  |             addCriterion("header_id in", values, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("header_id not in", values, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("header_id between", value1, value2, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andHeaderIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("header_id not between", value1, value2, "headerId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdIsNull() { | ||||||
|  |             addCriterion("account_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdIsNotNull() { | ||||||
|  |             addCriterion("account_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdEqualTo(Long value) { | ||||||
|  |             addCriterion("account_id =", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("account_id <>", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("account_id >", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("account_id >=", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdLessThan(Long value) { | ||||||
|  |             addCriterion("account_id <", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("account_id <=", value, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdIn(List<Long> values) { | ||||||
|  |             addCriterion("account_id in", values, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("account_id not in", values, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("account_id between", value1, value2, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAccountIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("account_id not between", value1, value2, "accountId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdIsNull() { | ||||||
|  |             addCriterion("in_out_item_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdIsNotNull() { | ||||||
|  |             addCriterion("in_out_item_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdEqualTo(Long value) { | ||||||
|  |             addCriterion("in_out_item_id =", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("in_out_item_id <>", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("in_out_item_id >", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("in_out_item_id >=", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdLessThan(Long value) { | ||||||
|  |             addCriterion("in_out_item_id <", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("in_out_item_id <=", value, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdIn(List<Long> values) { | ||||||
|  |             addCriterion("in_out_item_id in", values, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("in_out_item_id not in", values, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("in_out_item_id between", value1, value2, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andInOutItemIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("in_out_item_id not between", value1, value2, "inOutItemId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdIsNull() { | ||||||
|  |             addCriterion("bill_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdIsNotNull() { | ||||||
|  |             addCriterion("bill_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdEqualTo(Long value) { | ||||||
|  |             addCriterion("bill_id =", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("bill_id <>", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("bill_id >", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("bill_id >=", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdLessThan(Long value) { | ||||||
|  |             addCriterion("bill_id <", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("bill_id <=", value, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdIn(List<Long> values) { | ||||||
|  |             addCriterion("bill_id in", values, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("bill_id not in", values, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("bill_id between", value1, value2, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andBillIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("bill_id not between", value1, value2, "billId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtIsNull() { | ||||||
|  |             addCriterion("need_debt is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtIsNotNull() { | ||||||
|  |             addCriterion("need_debt is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt =", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtNotEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt <>", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtGreaterThan(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt >", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtGreaterThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt >=", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtLessThan(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt <", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtLessThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("need_debt <=", value, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("need_debt in", values, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtNotIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("need_debt not in", values, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("need_debt between", value1, value2, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNeedDebtNotBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("need_debt not between", value1, value2, "needDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtIsNull() { | ||||||
|  |             addCriterion("finish_debt is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtIsNotNull() { | ||||||
|  |             addCriterion("finish_debt is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt =", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtNotEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt <>", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtGreaterThan(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt >", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtGreaterThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt >=", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtLessThan(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt <", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtLessThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("finish_debt <=", value, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("finish_debt in", values, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtNotIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("finish_debt not in", values, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("finish_debt between", value1, value2, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andFinishDebtNotBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("finish_debt not between", value1, value2, "finishDebt"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountIsNull() { | ||||||
|  |             addCriterion("each_amount is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountIsNotNull() { | ||||||
|  |             addCriterion("each_amount is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount =", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountNotEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount <>", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountGreaterThan(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount >", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountGreaterThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount >=", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountLessThan(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount <", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountLessThanOrEqualTo(BigDecimal value) { | ||||||
|  |             addCriterion("each_amount <=", value, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("each_amount in", values, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountNotIn(List<BigDecimal> values) { | ||||||
|  |             addCriterion("each_amount not in", values, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("each_amount between", value1, value2, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEachAmountNotBetween(BigDecimal value1, BigDecimal value2) { | ||||||
|  |             addCriterion("each_amount not between", value1, value2, "eachAmount"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNull() { | ||||||
|  |             addCriterion("remark is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNotNull() { | ||||||
|  |             addCriterion("remark is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkEqualTo(String value) { | ||||||
|  |             addCriterion("remark =", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotEqualTo(String value) { | ||||||
|  |             addCriterion("remark <>", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThan(String value) { | ||||||
|  |             addCriterion("remark >", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark >=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThan(String value) { | ||||||
|  |             addCriterion("remark <", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark <=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLike(String value) { | ||||||
|  |             addCriterion("remark like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotLike(String value) { | ||||||
|  |             addCriterion("remark not like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIn(List<String> values) { | ||||||
|  |             addCriterion("remark in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotIn(List<String> values) { | ||||||
|  |             addCriterion("remark not in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark not between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNull() { | ||||||
|  |             addCriterion("tenant_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNotNull() { | ||||||
|  |             addCriterion("tenant_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id =", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <>", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("tenant_id >", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id >=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThan(Long value) { | ||||||
|  |             addCriterion("tenant_id <", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id not in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id not between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNull() { | ||||||
|  |             addCriterion("delete_flag is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNotNull() { | ||||||
|  |             addCriterion("delete_flag is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag =", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <>", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThan(String value) { | ||||||
|  |             addCriterion("delete_flag >", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag >=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThan(String value) { | ||||||
|  |             addCriterion("delete_flag <", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLike(String value) { | ||||||
|  |             addCriterion("delete_flag like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotLike(String value) { | ||||||
|  |             addCriterion("delete_flag not like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag not in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag not between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criteria extends GeneratedCriteria { | ||||||
|  |         protected Criteria() { | ||||||
|  |             super(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criterion { | ||||||
|  |         private String condition; | ||||||
|  | 
 | ||||||
|  |         private Object value; | ||||||
|  | 
 | ||||||
|  |         private Object secondValue; | ||||||
|  | 
 | ||||||
|  |         private boolean noValue; | ||||||
|  | 
 | ||||||
|  |         private boolean singleValue; | ||||||
|  | 
 | ||||||
|  |         private boolean betweenValue; | ||||||
|  | 
 | ||||||
|  |         private boolean listValue; | ||||||
|  | 
 | ||||||
|  |         private String typeHandler; | ||||||
|  | 
 | ||||||
|  |         public String getCondition() { | ||||||
|  |             return condition; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getValue() { | ||||||
|  |             return value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getSecondValue() { | ||||||
|  |             return secondValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isNoValue() { | ||||||
|  |             return noValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isSingleValue() { | ||||||
|  |             return singleValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isBetweenValue() { | ||||||
|  |             return betweenValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isListValue() { | ||||||
|  |             return listValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public String getTypeHandler() { | ||||||
|  |             return typeHandler; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.typeHandler = null; | ||||||
|  |             this.noValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             if (value instanceof List<?>) { | ||||||
|  |                 this.listValue = true; | ||||||
|  |             } else { | ||||||
|  |                 this.singleValue = true; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value) { | ||||||
|  |             this(condition, value, null); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.secondValue = secondValue; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             this.betweenValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue) { | ||||||
|  |             this(condition, value, secondValue, null); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,47 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class AccountVo4Sum { | ||||||
|  | 
 | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal accountSum; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal accountSumByHead; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal accountSumByDetail; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getAccountSum() { | ||||||
|  |         return accountSum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountSum(BigDecimal accountSum) { | ||||||
|  |         this.accountSum = accountSum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getAccountSumByHead() { | ||||||
|  |         return accountSumByHead; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountSumByHead(BigDecimal accountSumByHead) { | ||||||
|  |         this.accountSumByHead = accountSumByHead; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getAccountSumByDetail() { | ||||||
|  |         return accountSumByDetail; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountSumByDetail(BigDecimal accountSumByDetail) { | ||||||
|  |         this.accountSumByDetail = accountSumByDetail; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,135 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class Depot { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private String address; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal warehousing; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal truckage; | ||||||
|  | 
 | ||||||
|  |     private Integer type; | ||||||
|  | 
 | ||||||
|  |     private String sort; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Long principal; | ||||||
|  | 
 | ||||||
|  |     private Boolean enabled; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     private Boolean isDefault; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAddress() { | ||||||
|  |         return address; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAddress(String address) { | ||||||
|  |         this.address = address == null ? null : address.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getWarehousing() { | ||||||
|  |         return warehousing; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setWarehousing(BigDecimal warehousing) { | ||||||
|  |         this.warehousing = warehousing; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTruckage() { | ||||||
|  |         return truckage; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTruckage(BigDecimal truckage) { | ||||||
|  |         this.truckage = truckage; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Integer getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(Integer type) { | ||||||
|  |         this.type = type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSort() { | ||||||
|  |         return sort; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSort(String sort) { | ||||||
|  |         this.sort = sort == null ? null : sort.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getPrincipal() { | ||||||
|  |         return principal; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPrincipal(Long principal) { | ||||||
|  |         this.principal = principal; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getEnabled() { | ||||||
|  |         return enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnabled(Boolean enabled) { | ||||||
|  |         this.enabled = enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getIsDefault() { | ||||||
|  |         return isDefault; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setIsDefault(Boolean isDefault) { | ||||||
|  |         this.isDefault = isDefault; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Description | ||||||
|  |  * | ||||||
|  |  * @Author: cjl | ||||||
|  |  * @Date: 2019/2/25 11:40 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | public class DepotEx extends Depot{ | ||||||
|  |     //负责人名字 | ||||||
|  |     private String principalName; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal initStock; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal currentStock; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal lowSafeStock; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal highSafeStock; | ||||||
|  | 
 | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,326 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class DepotHead { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String type; | ||||||
|  | 
 | ||||||
|  |     private String subType; | ||||||
|  | 
 | ||||||
|  |     private String defaultNumber; | ||||||
|  | 
 | ||||||
|  |     private String number; | ||||||
|  | 
 | ||||||
|  |     private Date createTime; | ||||||
|  | 
 | ||||||
|  |     private Date operTime; | ||||||
|  | 
 | ||||||
|  |     private Long organId; | ||||||
|  | 
 | ||||||
|  |     private Long creator; | ||||||
|  | 
 | ||||||
|  |     private Long accountId; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal changeAmount; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal backAmount; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal totalPrice; | ||||||
|  | 
 | ||||||
|  |     private String payType; | ||||||
|  | 
 | ||||||
|  |     private String billType; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private String fileName; | ||||||
|  | 
 | ||||||
|  |     private String salesMan; | ||||||
|  | 
 | ||||||
|  |     private String accountIdList; | ||||||
|  | 
 | ||||||
|  |     private String accountMoneyList; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal discount; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal discountMoney; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal discountLastMoney; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal otherMoney; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal deposit; | ||||||
|  | 
 | ||||||
|  |     private String status; | ||||||
|  | 
 | ||||||
|  |     private String purchaseStatus; | ||||||
|  | 
 | ||||||
|  |     private String source; | ||||||
|  | 
 | ||||||
|  |     private String linkNumber; | ||||||
|  | 
 | ||||||
|  |     private String linkApply; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(String type) { | ||||||
|  |         this.type = type == null ? null : type.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSubType() { | ||||||
|  |         return subType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSubType(String subType) { | ||||||
|  |         this.subType = subType == null ? null : subType.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDefaultNumber() { | ||||||
|  |         return defaultNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDefaultNumber(String defaultNumber) { | ||||||
|  |         this.defaultNumber = defaultNumber == null ? null : defaultNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getNumber() { | ||||||
|  |         return number; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setNumber(String number) { | ||||||
|  |         this.number = number == null ? null : number.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getCreateTime() { | ||||||
|  |         return createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCreateTime(Date createTime) { | ||||||
|  |         this.createTime = createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getOperTime() { | ||||||
|  |         return operTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOperTime(Date operTime) { | ||||||
|  |         this.operTime = operTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getOrganId() { | ||||||
|  |         return organId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrganId(Long organId) { | ||||||
|  |         this.organId = organId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getCreator() { | ||||||
|  |         return creator; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCreator(Long creator) { | ||||||
|  |         this.creator = creator; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getAccountId() { | ||||||
|  |         return accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountId(Long accountId) { | ||||||
|  |         this.accountId = accountId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getChangeAmount() { | ||||||
|  |         return changeAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setChangeAmount(BigDecimal changeAmount) { | ||||||
|  |         this.changeAmount = changeAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getBackAmount() { | ||||||
|  |         return backAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBackAmount(BigDecimal backAmount) { | ||||||
|  |         this.backAmount = backAmount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTotalPrice() { | ||||||
|  |         return totalPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTotalPrice(BigDecimal totalPrice) { | ||||||
|  |         this.totalPrice = totalPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPayType() { | ||||||
|  |         return payType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPayType(String payType) { | ||||||
|  |         this.payType = payType == null ? null : payType.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBillType() { | ||||||
|  |         return billType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBillType(String billType) { | ||||||
|  |         this.billType = billType == null ? null : billType.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getFileName() { | ||||||
|  |         return fileName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setFileName(String fileName) { | ||||||
|  |         this.fileName = fileName == null ? null : fileName.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSalesMan() { | ||||||
|  |         return salesMan; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSalesMan(String salesMan) { | ||||||
|  |         this.salesMan = salesMan == null ? null : salesMan.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAccountIdList() { | ||||||
|  |         return accountIdList; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountIdList(String accountIdList) { | ||||||
|  |         this.accountIdList = accountIdList == null ? null : accountIdList.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAccountMoneyList() { | ||||||
|  |         return accountMoneyList; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAccountMoneyList(String accountMoneyList) { | ||||||
|  |         this.accountMoneyList = accountMoneyList == null ? null : accountMoneyList.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getDiscount() { | ||||||
|  |         return discount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDiscount(BigDecimal discount) { | ||||||
|  |         this.discount = discount; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getDiscountMoney() { | ||||||
|  |         return discountMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDiscountMoney(BigDecimal discountMoney) { | ||||||
|  |         this.discountMoney = discountMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getDiscountLastMoney() { | ||||||
|  |         return discountLastMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDiscountLastMoney(BigDecimal discountLastMoney) { | ||||||
|  |         this.discountLastMoney = discountLastMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getOtherMoney() { | ||||||
|  |         return otherMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtherMoney(BigDecimal otherMoney) { | ||||||
|  |         this.otherMoney = otherMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getDeposit() { | ||||||
|  |         return deposit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeposit(BigDecimal deposit) { | ||||||
|  |         this.deposit = deposit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getStatus() { | ||||||
|  |         return status; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setStatus(String status) { | ||||||
|  |         this.status = status == null ? null : status.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPurchaseStatus() { | ||||||
|  |         return purchaseStatus; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPurchaseStatus(String purchaseStatus) { | ||||||
|  |         this.purchaseStatus = purchaseStatus == null ? null : purchaseStatus.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSource() { | ||||||
|  |         return source; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSource(String source) { | ||||||
|  |         this.source = source == null ? null : source.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getLinkNumber() { | ||||||
|  |         return linkNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setLinkNumber(String linkNumber) { | ||||||
|  |         this.linkNumber = linkNumber == null ? null : linkNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getLinkApply() { | ||||||
|  |         return linkApply; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setLinkApply(String linkApply) { | ||||||
|  |         this.linkApply = linkApply == null ? null : linkApply.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,46 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class DepotHeadVo4Body { | ||||||
|  | 
 | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String info; | ||||||
|  | 
 | ||||||
|  |     private String rows; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal preTotalPrice; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getInfo() { | ||||||
|  |         return info; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setInfo(String info) { | ||||||
|  |         this.info = info; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRows() { | ||||||
|  |         return rows; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRows(String rows) { | ||||||
|  |         this.rows = rows; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getPreTotalPrice() { | ||||||
|  |         return preTotalPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPreTotalPrice(BigDecimal preTotalPrice) { | ||||||
|  |         this.preTotalPrice = preTotalPrice; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,256 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class DepotItem { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private Long headerId; | ||||||
|  | 
 | ||||||
|  |     private Long materialId; | ||||||
|  | 
 | ||||||
|  |     private Long materialExtendId; | ||||||
|  | 
 | ||||||
|  |     private String materialUnit; | ||||||
|  | 
 | ||||||
|  |     private String sku; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal operNumber; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal basicNumber; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal unitPrice; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal purchaseUnitPrice; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal taxUnitPrice; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal allPrice; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Long depotId; | ||||||
|  | 
 | ||||||
|  |     private Long anotherDepotId; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal taxRate; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal taxMoney; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal taxLastMoney; | ||||||
|  | 
 | ||||||
|  |     private String materialType; | ||||||
|  | 
 | ||||||
|  |     private String snList; | ||||||
|  | 
 | ||||||
|  |     private String batchNumber; | ||||||
|  | 
 | ||||||
|  |     private Date expirationDate; | ||||||
|  | 
 | ||||||
|  |     private Long linkId; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getHeaderId() { | ||||||
|  |         return headerId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setHeaderId(Long headerId) { | ||||||
|  |         this.headerId = headerId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getMaterialId() { | ||||||
|  |         return materialId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialId(Long materialId) { | ||||||
|  |         this.materialId = materialId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getMaterialExtendId() { | ||||||
|  |         return materialExtendId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialExtendId(Long materialExtendId) { | ||||||
|  |         this.materialExtendId = materialExtendId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMaterialUnit() { | ||||||
|  |         return materialUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialUnit(String materialUnit) { | ||||||
|  |         this.materialUnit = materialUnit == null ? null : materialUnit.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSku() { | ||||||
|  |         return sku; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSku(String sku) { | ||||||
|  |         this.sku = sku == null ? null : sku.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getOperNumber() { | ||||||
|  |         return operNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOperNumber(BigDecimal operNumber) { | ||||||
|  |         this.operNumber = operNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getBasicNumber() { | ||||||
|  |         return basicNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBasicNumber(BigDecimal basicNumber) { | ||||||
|  |         this.basicNumber = basicNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getUnitPrice() { | ||||||
|  |         return unitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnitPrice(BigDecimal unitPrice) { | ||||||
|  |         this.unitPrice = unitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getPurchaseUnitPrice() { | ||||||
|  |         return purchaseUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPurchaseUnitPrice(BigDecimal purchaseUnitPrice) { | ||||||
|  |         this.purchaseUnitPrice = purchaseUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTaxUnitPrice() { | ||||||
|  |         return taxUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTaxUnitPrice(BigDecimal taxUnitPrice) { | ||||||
|  |         this.taxUnitPrice = taxUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getAllPrice() { | ||||||
|  |         return allPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAllPrice(BigDecimal allPrice) { | ||||||
|  |         this.allPrice = allPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getDepotId() { | ||||||
|  |         return depotId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDepotId(Long depotId) { | ||||||
|  |         this.depotId = depotId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getAnotherDepotId() { | ||||||
|  |         return anotherDepotId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAnotherDepotId(Long anotherDepotId) { | ||||||
|  |         this.anotherDepotId = anotherDepotId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTaxRate() { | ||||||
|  |         return taxRate; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTaxRate(BigDecimal taxRate) { | ||||||
|  |         this.taxRate = taxRate; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTaxMoney() { | ||||||
|  |         return taxMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTaxMoney(BigDecimal taxMoney) { | ||||||
|  |         this.taxMoney = taxMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getTaxLastMoney() { | ||||||
|  |         return taxLastMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTaxLastMoney(BigDecimal taxLastMoney) { | ||||||
|  |         this.taxLastMoney = taxLastMoney; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMaterialType() { | ||||||
|  |         return materialType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialType(String materialType) { | ||||||
|  |         this.materialType = materialType == null ? null : materialType.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSnList() { | ||||||
|  |         return snList; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSnList(String snList) { | ||||||
|  |         this.snList = snList == null ? null : snList.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBatchNumber() { | ||||||
|  |         return batchNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBatchNumber(String batchNumber) { | ||||||
|  |         this.batchNumber = batchNumber == null ? null : batchNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getExpirationDate() { | ||||||
|  |         return expirationDate; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setExpirationDate(Date expirationDate) { | ||||||
|  |         this.expirationDate = expirationDate; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getLinkId() { | ||||||
|  |         return linkId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setLinkId(Long linkId) { | ||||||
|  |         this.linkId = linkId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,117 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class DepotItemVo4DetailByTypeAndMId { | ||||||
|  | 
 | ||||||
|  |     private String number; | ||||||
|  | 
 | ||||||
|  |     private String barCode; | ||||||
|  | 
 | ||||||
|  |     private String materialName; | ||||||
|  | 
 | ||||||
|  |     private String type; | ||||||
|  | 
 | ||||||
|  |     private String subType; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal bnum; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal unitPrice; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal allPrice; | ||||||
|  | 
 | ||||||
|  |     private String materialUnit; | ||||||
|  | 
 | ||||||
|  |     private String depotName; | ||||||
|  | 
 | ||||||
|  |     private Date otime; | ||||||
|  | 
 | ||||||
|  |     public String getNumber() { | ||||||
|  |         return number; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setNumber(String number) { | ||||||
|  |         this.number = number; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBarCode() { | ||||||
|  |         return barCode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBarCode(String barCode) { | ||||||
|  |         this.barCode = barCode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMaterialName() { | ||||||
|  |         return materialName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialName(String materialName) { | ||||||
|  |         this.materialName = materialName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(String type) { | ||||||
|  |         this.type = type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSubType() { | ||||||
|  |         return subType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSubType(String subType) { | ||||||
|  |         this.subType = subType; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getBnum() { | ||||||
|  |         return bnum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBnum(BigDecimal bnum) { | ||||||
|  |         this.bnum = bnum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getUnitPrice() { | ||||||
|  |         return unitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnitPrice(BigDecimal unitPrice) { | ||||||
|  |         this.unitPrice = unitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getAllPrice() { | ||||||
|  |         return allPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAllPrice(BigDecimal allPrice) { | ||||||
|  |         this.allPrice = allPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMaterialUnit() { | ||||||
|  |         return materialUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialUnit(String materialUnit) { | ||||||
|  |         this.materialUnit = materialUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDepotName() { | ||||||
|  |         return depotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDepotName(String depotName) { | ||||||
|  |         this.depotName = depotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getOtime() { | ||||||
|  |         return otime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtime(Date otime) { | ||||||
|  |         this.otime = otime; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,27 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class DepotItemVo4Material extends DepotItem{ | ||||||
|  | 
 | ||||||
|  |     private String mname; | ||||||
|  | 
 | ||||||
|  |     private String mmodel; | ||||||
|  | 
 | ||||||
|  |     public String getMname() { | ||||||
|  |         return mname; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMname(String mname) { | ||||||
|  |         this.mname = mname; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMmodel() { | ||||||
|  |         return mmodel; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMmodel(String mmodel) { | ||||||
|  |         this.mmodel = mmodel; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,26 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class DepotItemVo4MaterialAndSum { | ||||||
|  | 
 | ||||||
|  |     private Long materialExtendId; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal operNumber; | ||||||
|  | 
 | ||||||
|  |     public Long getMaterialExtendId() { | ||||||
|  |         return materialExtendId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialExtendId(Long materialExtendId) { | ||||||
|  |         this.materialExtendId = materialExtendId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getOperNumber() { | ||||||
|  |         return operNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOperNumber(BigDecimal operNumber) { | ||||||
|  |         this.operNumber = operNumber; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,276 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class DepotItemVo4WithInfoEx extends DepotItem{ | ||||||
|  | 
 | ||||||
|  |     private Long MId; | ||||||
|  | 
 | ||||||
|  |     private String MName; | ||||||
|  | 
 | ||||||
|  |     private String MModel; | ||||||
|  | 
 | ||||||
|  |     private String MaterialUnit; | ||||||
|  | 
 | ||||||
|  |     private String MColor; | ||||||
|  | 
 | ||||||
|  |     private String MStandard; | ||||||
|  | 
 | ||||||
|  |     private String MMfrs; | ||||||
|  | 
 | ||||||
|  |     private String MOtherField1; | ||||||
|  | 
 | ||||||
|  |     private String MOtherField2; | ||||||
|  | 
 | ||||||
|  |     private String MOtherField3; | ||||||
|  | 
 | ||||||
|  |     private String enableSerialNumber; | ||||||
|  | 
 | ||||||
|  |     private String enableBatchNumber; | ||||||
|  | 
 | ||||||
|  |     private String DepotName; | ||||||
|  | 
 | ||||||
|  |     private String AnotherDepotName; | ||||||
|  | 
 | ||||||
|  |     private Long UnitId; | ||||||
|  | 
 | ||||||
|  |     private String unitName; | ||||||
|  | 
 | ||||||
|  |     private Integer ratio; | ||||||
|  | 
 | ||||||
|  |     private String otherUnit; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal presetPriceOne; | ||||||
|  | 
 | ||||||
|  |     private String priceStrategy; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal purchaseDecimal; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal currentUnitPrice; | ||||||
|  | 
 | ||||||
|  |     private String barCode; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal weight; | ||||||
|  | 
 | ||||||
|  |     private String position; | ||||||
|  | 
 | ||||||
|  |     private String imgName; | ||||||
|  | 
 | ||||||
|  |     private String brand; | ||||||
|  | 
 | ||||||
|  |     public Long getMId() { | ||||||
|  |         return MId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMId(Long MId) { | ||||||
|  |         this.MId = MId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMName() { | ||||||
|  |         return MName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMName(String MName) { | ||||||
|  |         this.MName = MName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMModel() { | ||||||
|  |         return MModel; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMModel(String MModel) { | ||||||
|  |         this.MModel = MModel; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMaterialUnit() { | ||||||
|  |         return MaterialUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMaterialUnit(String materialUnit) { | ||||||
|  |         MaterialUnit = materialUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMColor() { | ||||||
|  |         return MColor; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMColor(String MColor) { | ||||||
|  |         this.MColor = MColor; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMStandard() { | ||||||
|  |         return MStandard; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMStandard(String MStandard) { | ||||||
|  |         this.MStandard = MStandard; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMMfrs() { | ||||||
|  |         return MMfrs; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMMfrs(String MMfrs) { | ||||||
|  |         this.MMfrs = MMfrs; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMOtherField1() { | ||||||
|  |         return MOtherField1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMOtherField1(String MOtherField1) { | ||||||
|  |         this.MOtherField1 = MOtherField1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMOtherField2() { | ||||||
|  |         return MOtherField2; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMOtherField2(String MOtherField2) { | ||||||
|  |         this.MOtherField2 = MOtherField2; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMOtherField3() { | ||||||
|  |         return MOtherField3; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMOtherField3(String MOtherField3) { | ||||||
|  |         this.MOtherField3 = MOtherField3; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getEnableSerialNumber() { | ||||||
|  |         return enableSerialNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnableSerialNumber(String enableSerialNumber) { | ||||||
|  |         this.enableSerialNumber = enableSerialNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getEnableBatchNumber() { | ||||||
|  |         return enableBatchNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnableBatchNumber(String enableBatchNumber) { | ||||||
|  |         this.enableBatchNumber = enableBatchNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDepotName() { | ||||||
|  |         return DepotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDepotName(String depotName) { | ||||||
|  |         DepotName = depotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAnotherDepotName() { | ||||||
|  |         return AnotherDepotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAnotherDepotName(String anotherDepotName) { | ||||||
|  |         AnotherDepotName = anotherDepotName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getUnitId() { | ||||||
|  |         return UnitId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnitId(Long unitId) { | ||||||
|  |         UnitId = unitId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getUnitName() { | ||||||
|  |         return unitName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnitName(String unitName) { | ||||||
|  |         this.unitName = unitName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Integer getRatio() { | ||||||
|  |         return ratio; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRatio(Integer ratio) { | ||||||
|  |         this.ratio = ratio; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOtherUnit() { | ||||||
|  |         return otherUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtherUnit(String otherUnit) { | ||||||
|  |         this.otherUnit = otherUnit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getPresetPriceOne() { | ||||||
|  |         return presetPriceOne; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPresetPriceOne(BigDecimal presetPriceOne) { | ||||||
|  |         this.presetPriceOne = presetPriceOne; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPriceStrategy() { | ||||||
|  |         return priceStrategy; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPriceStrategy(String priceStrategy) { | ||||||
|  |         this.priceStrategy = priceStrategy; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getPurchaseDecimal() { | ||||||
|  |         return purchaseDecimal; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPurchaseDecimal(BigDecimal purchaseDecimal) { | ||||||
|  |         this.purchaseDecimal = purchaseDecimal; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getCurrentUnitPrice() { | ||||||
|  |         return currentUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCurrentUnitPrice(BigDecimal currentUnitPrice) { | ||||||
|  |         this.currentUnitPrice = currentUnitPrice; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBarCode() { | ||||||
|  |         return barCode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBarCode(String barCode) { | ||||||
|  |         this.barCode = barCode; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getWeight() { | ||||||
|  |         return weight; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setWeight(BigDecimal weight) { | ||||||
|  |         this.weight = weight; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPosition() { | ||||||
|  |         return position; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPosition(String position) { | ||||||
|  |         this.position = position; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getImgName() { | ||||||
|  |         return imgName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setImgName(String imgName) { | ||||||
|  |         this.imgName = imgName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBrand() { | ||||||
|  |         return brand; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBrand(String brand) { | ||||||
|  |         this.brand = brand; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,133 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | public class Function { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String number; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private String parentNumber; | ||||||
|  | 
 | ||||||
|  |     private String url; | ||||||
|  | 
 | ||||||
|  |     private String component; | ||||||
|  | 
 | ||||||
|  |     private Boolean state; | ||||||
|  | 
 | ||||||
|  |     private String sort; | ||||||
|  | 
 | ||||||
|  |     private Boolean enabled; | ||||||
|  | 
 | ||||||
|  |     private String type; | ||||||
|  | 
 | ||||||
|  |     private String pushBtn; | ||||||
|  | 
 | ||||||
|  |     private String icon; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getNumber() { | ||||||
|  |         return number; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setNumber(String number) { | ||||||
|  |         this.number = number == null ? null : number.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getParentNumber() { | ||||||
|  |         return parentNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setParentNumber(String parentNumber) { | ||||||
|  |         this.parentNumber = parentNumber == null ? null : parentNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getUrl() { | ||||||
|  |         return url; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUrl(String url) { | ||||||
|  |         this.url = url == null ? null : url.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getComponent() { | ||||||
|  |         return component; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setComponent(String component) { | ||||||
|  |         this.component = component == null ? null : component.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getState() { | ||||||
|  |         return state; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setState(Boolean state) { | ||||||
|  |         this.state = state; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSort() { | ||||||
|  |         return sort; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSort(String sort) { | ||||||
|  |         this.sort = sort == null ? null : sort.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getEnabled() { | ||||||
|  |         return enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnabled(Boolean enabled) { | ||||||
|  |         this.enabled = enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(String type) { | ||||||
|  |         this.type = type == null ? null : type.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPushBtn() { | ||||||
|  |         return pushBtn; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPushBtn(String pushBtn) { | ||||||
|  |         this.pushBtn = pushBtn == null ? null : pushBtn.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getIcon() { | ||||||
|  |         return icon; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setIcon(String icon) { | ||||||
|  |         this.icon = icon == null ? null : icon.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | public class FunctionEx extends Function { | ||||||
|  | 
 | ||||||
|  |     private String parentName; | ||||||
|  | 
 | ||||||
|  |     public String getParentName() { | ||||||
|  |         return parentName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setParentName(String parentName) { | ||||||
|  |         this.parentName = parentName; | ||||||
|  |     } | ||||||
|  | } | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,83 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | public class InOutItem { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private String type; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Boolean enabled; | ||||||
|  | 
 | ||||||
|  |     private String sort; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getType() { | ||||||
|  |         return type; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setType(String type) { | ||||||
|  |         this.type = type == null ? null : type.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getEnabled() { | ||||||
|  |         return enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnabled(Boolean enabled) { | ||||||
|  |         this.enabled = enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSort() { | ||||||
|  |         return sort; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSort(String sort) { | ||||||
|  |         this.sort = sort == null ? null : sort.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,729 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | public class InOutItemExample { | ||||||
|  |     protected String orderByClause; | ||||||
|  | 
 | ||||||
|  |     protected boolean distinct; | ||||||
|  | 
 | ||||||
|  |     protected List<Criteria> oredCriteria; | ||||||
|  | 
 | ||||||
|  |     public InOutItemExample() { | ||||||
|  |         oredCriteria = new ArrayList<>(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByClause(String orderByClause) { | ||||||
|  |         this.orderByClause = orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByClause() { | ||||||
|  |         return orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDistinct(boolean distinct) { | ||||||
|  |         this.distinct = distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public boolean isDistinct() { | ||||||
|  |         return distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public List<Criteria> getOredCriteria() { | ||||||
|  |         return oredCriteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void or(Criteria criteria) { | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria or() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria createCriteria() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         if (oredCriteria.size() == 0) { | ||||||
|  |             oredCriteria.add(criteria); | ||||||
|  |         } | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected Criteria createCriteriaInternal() { | ||||||
|  |         Criteria criteria = new Criteria(); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void clear() { | ||||||
|  |         oredCriteria.clear(); | ||||||
|  |         orderByClause = null; | ||||||
|  |         distinct = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected abstract static class GeneratedCriteria { | ||||||
|  |         protected List<Criterion> criteria; | ||||||
|  | 
 | ||||||
|  |         protected GeneratedCriteria() { | ||||||
|  |             super(); | ||||||
|  |             criteria = new ArrayList<>(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isValid() { | ||||||
|  |             return criteria.size() > 0; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getAllCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition) { | ||||||
|  |             if (condition == null) { | ||||||
|  |                 throw new RuntimeException("Value for condition cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value, String property) { | ||||||
|  |             if (value == null) { | ||||||
|  |                 throw new RuntimeException("Value for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value1, Object value2, String property) { | ||||||
|  |             if (value1 == null || value2 == null) { | ||||||
|  |                 throw new RuntimeException("Between values for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value1, value2)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNull() { | ||||||
|  |             addCriterion("id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNotNull() { | ||||||
|  |             addCriterion("id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdEqualTo(Long value) { | ||||||
|  |             addCriterion("id =", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("id <>", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("id >", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id >=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThan(Long value) { | ||||||
|  |             addCriterion("id <", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id <=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIn(List<Long> values) { | ||||||
|  |             addCriterion("id in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("id not in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id not between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIsNull() { | ||||||
|  |             addCriterion("name is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIsNotNull() { | ||||||
|  |             addCriterion("name is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameEqualTo(String value) { | ||||||
|  |             addCriterion("name =", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotEqualTo(String value) { | ||||||
|  |             addCriterion("name <>", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameGreaterThan(String value) { | ||||||
|  |             addCriterion("name >", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("name >=", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLessThan(String value) { | ||||||
|  |             addCriterion("name <", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("name <=", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameLike(String value) { | ||||||
|  |             addCriterion("name like", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotLike(String value) { | ||||||
|  |             addCriterion("name not like", value, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameIn(List<String> values) { | ||||||
|  |             addCriterion("name in", values, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotIn(List<String> values) { | ||||||
|  |             addCriterion("name not in", values, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameBetween(String value1, String value2) { | ||||||
|  |             addCriterion("name between", value1, value2, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andNameNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("name not between", value1, value2, "name"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeIsNull() { | ||||||
|  |             addCriterion("type is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeIsNotNull() { | ||||||
|  |             addCriterion("type is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeEqualTo(String value) { | ||||||
|  |             addCriterion("type =", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeNotEqualTo(String value) { | ||||||
|  |             addCriterion("type <>", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeGreaterThan(String value) { | ||||||
|  |             addCriterion("type >", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("type >=", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeLessThan(String value) { | ||||||
|  |             addCriterion("type <", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("type <=", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeLike(String value) { | ||||||
|  |             addCriterion("type like", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeNotLike(String value) { | ||||||
|  |             addCriterion("type not like", value, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeIn(List<String> values) { | ||||||
|  |             addCriterion("type in", values, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeNotIn(List<String> values) { | ||||||
|  |             addCriterion("type not in", values, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeBetween(String value1, String value2) { | ||||||
|  |             addCriterion("type between", value1, value2, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTypeNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("type not between", value1, value2, "type"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNull() { | ||||||
|  |             addCriterion("remark is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIsNotNull() { | ||||||
|  |             addCriterion("remark is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkEqualTo(String value) { | ||||||
|  |             addCriterion("remark =", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotEqualTo(String value) { | ||||||
|  |             addCriterion("remark <>", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThan(String value) { | ||||||
|  |             addCriterion("remark >", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark >=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThan(String value) { | ||||||
|  |             addCriterion("remark <", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("remark <=", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkLike(String value) { | ||||||
|  |             addCriterion("remark like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotLike(String value) { | ||||||
|  |             addCriterion("remark not like", value, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkIn(List<String> values) { | ||||||
|  |             addCriterion("remark in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotIn(List<String> values) { | ||||||
|  |             addCriterion("remark not in", values, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andRemarkNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("remark not between", value1, value2, "remark"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIsNull() { | ||||||
|  |             addCriterion("enabled is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIsNotNull() { | ||||||
|  |             addCriterion("enabled is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled =", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled <>", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledGreaterThan(Boolean value) { | ||||||
|  |             addCriterion("enabled >", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledGreaterThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled >=", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledLessThan(Boolean value) { | ||||||
|  |             addCriterion("enabled <", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledLessThanOrEqualTo(Boolean value) { | ||||||
|  |             addCriterion("enabled <=", value, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledIn(List<Boolean> values) { | ||||||
|  |             addCriterion("enabled in", values, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotIn(List<Boolean> values) { | ||||||
|  |             addCriterion("enabled not in", values, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("enabled between", value1, value2, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andEnabledNotBetween(Boolean value1, Boolean value2) { | ||||||
|  |             addCriterion("enabled not between", value1, value2, "enabled"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIsNull() { | ||||||
|  |             addCriterion("sort is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIsNotNull() { | ||||||
|  |             addCriterion("sort is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortEqualTo(String value) { | ||||||
|  |             addCriterion("sort =", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotEqualTo(String value) { | ||||||
|  |             addCriterion("sort <>", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortGreaterThan(String value) { | ||||||
|  |             addCriterion("sort >", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("sort >=", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLessThan(String value) { | ||||||
|  |             addCriterion("sort <", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("sort <=", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortLike(String value) { | ||||||
|  |             addCriterion("sort like", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotLike(String value) { | ||||||
|  |             addCriterion("sort not like", value, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortIn(List<String> values) { | ||||||
|  |             addCriterion("sort in", values, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotIn(List<String> values) { | ||||||
|  |             addCriterion("sort not in", values, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortBetween(String value1, String value2) { | ||||||
|  |             addCriterion("sort between", value1, value2, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andSortNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("sort not between", value1, value2, "sort"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNull() { | ||||||
|  |             addCriterion("tenant_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNotNull() { | ||||||
|  |             addCriterion("tenant_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id =", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <>", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("tenant_id >", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id >=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThan(Long value) { | ||||||
|  |             addCriterion("tenant_id <", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id not in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id not between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNull() { | ||||||
|  |             addCriterion("delete_flag is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNotNull() { | ||||||
|  |             addCriterion("delete_flag is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag =", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <>", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThan(String value) { | ||||||
|  |             addCriterion("delete_flag >", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag >=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThan(String value) { | ||||||
|  |             addCriterion("delete_flag <", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLike(String value) { | ||||||
|  |             addCriterion("delete_flag like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotLike(String value) { | ||||||
|  |             addCriterion("delete_flag not like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag not in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag not between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criteria extends GeneratedCriteria { | ||||||
|  |         protected Criteria() { | ||||||
|  |             super(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criterion { | ||||||
|  |         private String condition; | ||||||
|  | 
 | ||||||
|  |         private Object value; | ||||||
|  | 
 | ||||||
|  |         private Object secondValue; | ||||||
|  | 
 | ||||||
|  |         private boolean noValue; | ||||||
|  | 
 | ||||||
|  |         private boolean singleValue; | ||||||
|  | 
 | ||||||
|  |         private boolean betweenValue; | ||||||
|  | 
 | ||||||
|  |         private boolean listValue; | ||||||
|  | 
 | ||||||
|  |         private String typeHandler; | ||||||
|  | 
 | ||||||
|  |         public String getCondition() { | ||||||
|  |             return condition; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getValue() { | ||||||
|  |             return value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getSecondValue() { | ||||||
|  |             return secondValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isNoValue() { | ||||||
|  |             return noValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isSingleValue() { | ||||||
|  |             return singleValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isBetweenValue() { | ||||||
|  |             return betweenValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isListValue() { | ||||||
|  |             return listValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public String getTypeHandler() { | ||||||
|  |             return typeHandler; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.typeHandler = null; | ||||||
|  |             this.noValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             if (value instanceof List<?>) { | ||||||
|  |                 this.listValue = true; | ||||||
|  |             } else { | ||||||
|  |                 this.singleValue = true; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value) { | ||||||
|  |             this(condition, value, null); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.secondValue = secondValue; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             this.betweenValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue) { | ||||||
|  |             this(condition, value, secondValue, null); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,85 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class Log { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private Long userId; | ||||||
|  | 
 | ||||||
|  |     private String operation; | ||||||
|  | 
 | ||||||
|  |     private String clientIp; | ||||||
|  | 
 | ||||||
|  |     private Date createTime; | ||||||
|  | 
 | ||||||
|  |     private Byte status; | ||||||
|  | 
 | ||||||
|  |     private String content; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getUserId() { | ||||||
|  |         return userId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUserId(Long userId) { | ||||||
|  |         this.userId = userId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOperation() { | ||||||
|  |         return operation; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOperation(String operation) { | ||||||
|  |         this.operation = operation == null ? null : operation.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getClientIp() { | ||||||
|  |         return clientIp; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setClientIp(String clientIp) { | ||||||
|  |         this.clientIp = clientIp == null ? null : clientIp.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getCreateTime() { | ||||||
|  |         return createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCreateTime(Date createTime) { | ||||||
|  |         this.createTime = createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Byte getStatus() { | ||||||
|  |         return status; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setStatus(Byte status) { | ||||||
|  |         this.status = status; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getContent() { | ||||||
|  |         return content; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setContent(String content) { | ||||||
|  |         this.content = content == null ? null : content.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,710 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.Date; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | public class LogExample { | ||||||
|  |     protected String orderByClause; | ||||||
|  | 
 | ||||||
|  |     protected boolean distinct; | ||||||
|  | 
 | ||||||
|  |     protected List<Criteria> oredCriteria; | ||||||
|  | 
 | ||||||
|  |     public LogExample() { | ||||||
|  |         oredCriteria = new ArrayList<>(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByClause(String orderByClause) { | ||||||
|  |         this.orderByClause = orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByClause() { | ||||||
|  |         return orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDistinct(boolean distinct) { | ||||||
|  |         this.distinct = distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public boolean isDistinct() { | ||||||
|  |         return distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public List<Criteria> getOredCriteria() { | ||||||
|  |         return oredCriteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void or(Criteria criteria) { | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria or() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria createCriteria() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         if (oredCriteria.size() == 0) { | ||||||
|  |             oredCriteria.add(criteria); | ||||||
|  |         } | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected Criteria createCriteriaInternal() { | ||||||
|  |         Criteria criteria = new Criteria(); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void clear() { | ||||||
|  |         oredCriteria.clear(); | ||||||
|  |         orderByClause = null; | ||||||
|  |         distinct = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected abstract static class GeneratedCriteria { | ||||||
|  |         protected List<Criterion> criteria; | ||||||
|  | 
 | ||||||
|  |         protected GeneratedCriteria() { | ||||||
|  |             super(); | ||||||
|  |             criteria = new ArrayList<>(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isValid() { | ||||||
|  |             return criteria.size() > 0; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getAllCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition) { | ||||||
|  |             if (condition == null) { | ||||||
|  |                 throw new RuntimeException("Value for condition cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value, String property) { | ||||||
|  |             if (value == null) { | ||||||
|  |                 throw new RuntimeException("Value for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value1, Object value2, String property) { | ||||||
|  |             if (value1 == null || value2 == null) { | ||||||
|  |                 throw new RuntimeException("Between values for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value1, value2)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNull() { | ||||||
|  |             addCriterion("id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNotNull() { | ||||||
|  |             addCriterion("id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdEqualTo(Long value) { | ||||||
|  |             addCriterion("id =", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("id <>", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("id >", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id >=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThan(Long value) { | ||||||
|  |             addCriterion("id <", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id <=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIn(List<Long> values) { | ||||||
|  |             addCriterion("id in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("id not in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id not between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdIsNull() { | ||||||
|  |             addCriterion("user_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdIsNotNull() { | ||||||
|  |             addCriterion("user_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdEqualTo(Long value) { | ||||||
|  |             addCriterion("user_id =", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("user_id <>", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("user_id >", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("user_id >=", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdLessThan(Long value) { | ||||||
|  |             addCriterion("user_id <", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("user_id <=", value, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdIn(List<Long> values) { | ||||||
|  |             addCriterion("user_id in", values, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("user_id not in", values, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("user_id between", value1, value2, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andUserIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("user_id not between", value1, value2, "userId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationIsNull() { | ||||||
|  |             addCriterion("operation is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationIsNotNull() { | ||||||
|  |             addCriterion("operation is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationEqualTo(String value) { | ||||||
|  |             addCriterion("operation =", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationNotEqualTo(String value) { | ||||||
|  |             addCriterion("operation <>", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationGreaterThan(String value) { | ||||||
|  |             addCriterion("operation >", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("operation >=", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationLessThan(String value) { | ||||||
|  |             addCriterion("operation <", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("operation <=", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationLike(String value) { | ||||||
|  |             addCriterion("operation like", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationNotLike(String value) { | ||||||
|  |             addCriterion("operation not like", value, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationIn(List<String> values) { | ||||||
|  |             addCriterion("operation in", values, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationNotIn(List<String> values) { | ||||||
|  |             addCriterion("operation not in", values, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationBetween(String value1, String value2) { | ||||||
|  |             addCriterion("operation between", value1, value2, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andOperationNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("operation not between", value1, value2, "operation"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpIsNull() { | ||||||
|  |             addCriterion("client_ip is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpIsNotNull() { | ||||||
|  |             addCriterion("client_ip is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpEqualTo(String value) { | ||||||
|  |             addCriterion("client_ip =", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpNotEqualTo(String value) { | ||||||
|  |             addCriterion("client_ip <>", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpGreaterThan(String value) { | ||||||
|  |             addCriterion("client_ip >", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("client_ip >=", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpLessThan(String value) { | ||||||
|  |             addCriterion("client_ip <", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("client_ip <=", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpLike(String value) { | ||||||
|  |             addCriterion("client_ip like", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpNotLike(String value) { | ||||||
|  |             addCriterion("client_ip not like", value, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpIn(List<String> values) { | ||||||
|  |             addCriterion("client_ip in", values, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpNotIn(List<String> values) { | ||||||
|  |             addCriterion("client_ip not in", values, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpBetween(String value1, String value2) { | ||||||
|  |             addCriterion("client_ip between", value1, value2, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andClientIpNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("client_ip not between", value1, value2, "clientIp"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeIsNull() { | ||||||
|  |             addCriterion("create_time is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeIsNotNull() { | ||||||
|  |             addCriterion("create_time is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeEqualTo(Date value) { | ||||||
|  |             addCriterion("create_time =", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeNotEqualTo(Date value) { | ||||||
|  |             addCriterion("create_time <>", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeGreaterThan(Date value) { | ||||||
|  |             addCriterion("create_time >", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { | ||||||
|  |             addCriterion("create_time >=", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeLessThan(Date value) { | ||||||
|  |             addCriterion("create_time <", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeLessThanOrEqualTo(Date value) { | ||||||
|  |             addCriterion("create_time <=", value, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeIn(List<Date> values) { | ||||||
|  |             addCriterion("create_time in", values, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeNotIn(List<Date> values) { | ||||||
|  |             addCriterion("create_time not in", values, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeBetween(Date value1, Date value2) { | ||||||
|  |             addCriterion("create_time between", value1, value2, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andCreateTimeNotBetween(Date value1, Date value2) { | ||||||
|  |             addCriterion("create_time not between", value1, value2, "createTime"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusIsNull() { | ||||||
|  |             addCriterion("status is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusIsNotNull() { | ||||||
|  |             addCriterion("status is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusEqualTo(Byte value) { | ||||||
|  |             addCriterion("status =", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusNotEqualTo(Byte value) { | ||||||
|  |             addCriterion("status <>", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusGreaterThan(Byte value) { | ||||||
|  |             addCriterion("status >", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusGreaterThanOrEqualTo(Byte value) { | ||||||
|  |             addCriterion("status >=", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusLessThan(Byte value) { | ||||||
|  |             addCriterion("status <", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusLessThanOrEqualTo(Byte value) { | ||||||
|  |             addCriterion("status <=", value, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusIn(List<Byte> values) { | ||||||
|  |             addCriterion("status in", values, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusNotIn(List<Byte> values) { | ||||||
|  |             addCriterion("status not in", values, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusBetween(Byte value1, Byte value2) { | ||||||
|  |             addCriterion("status between", value1, value2, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andStatusNotBetween(Byte value1, Byte value2) { | ||||||
|  |             addCriterion("status not between", value1, value2, "status"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentIsNull() { | ||||||
|  |             addCriterion("content is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentIsNotNull() { | ||||||
|  |             addCriterion("content is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentEqualTo(String value) { | ||||||
|  |             addCriterion("content =", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentNotEqualTo(String value) { | ||||||
|  |             addCriterion("content <>", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentGreaterThan(String value) { | ||||||
|  |             addCriterion("content >", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("content >=", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentLessThan(String value) { | ||||||
|  |             addCriterion("content <", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("content <=", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentLike(String value) { | ||||||
|  |             addCriterion("content like", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentNotLike(String value) { | ||||||
|  |             addCriterion("content not like", value, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentIn(List<String> values) { | ||||||
|  |             addCriterion("content in", values, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentNotIn(List<String> values) { | ||||||
|  |             addCriterion("content not in", values, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentBetween(String value1, String value2) { | ||||||
|  |             addCriterion("content between", value1, value2, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andContentNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("content not between", value1, value2, "content"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNull() { | ||||||
|  |             addCriterion("tenant_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNotNull() { | ||||||
|  |             addCriterion("tenant_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id =", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <>", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("tenant_id >", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id >=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThan(Long value) { | ||||||
|  |             addCriterion("tenant_id <", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id not in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id not between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criteria extends GeneratedCriteria { | ||||||
|  |         protected Criteria() { | ||||||
|  |             super(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criterion { | ||||||
|  |         private String condition; | ||||||
|  | 
 | ||||||
|  |         private Object value; | ||||||
|  | 
 | ||||||
|  |         private Object secondValue; | ||||||
|  | 
 | ||||||
|  |         private boolean noValue; | ||||||
|  | 
 | ||||||
|  |         private boolean singleValue; | ||||||
|  | 
 | ||||||
|  |         private boolean betweenValue; | ||||||
|  | 
 | ||||||
|  |         private boolean listValue; | ||||||
|  | 
 | ||||||
|  |         private String typeHandler; | ||||||
|  | 
 | ||||||
|  |         public String getCondition() { | ||||||
|  |             return condition; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getValue() { | ||||||
|  |             return value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getSecondValue() { | ||||||
|  |             return secondValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isNoValue() { | ||||||
|  |             return noValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isSingleValue() { | ||||||
|  |             return singleValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isBetweenValue() { | ||||||
|  |             return betweenValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isListValue() { | ||||||
|  |             return listValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public String getTypeHandler() { | ||||||
|  |             return typeHandler; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.typeHandler = null; | ||||||
|  |             this.noValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             if (value instanceof List<?>) { | ||||||
|  |                 this.listValue = true; | ||||||
|  |             } else { | ||||||
|  |                 this.singleValue = true; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value) { | ||||||
|  |             this(condition, value, null); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.secondValue = secondValue; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             this.betweenValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue) { | ||||||
|  |             this(condition, value, secondValue, null); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,245 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | public class Material { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private Long categoryId; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private String mfrs; | ||||||
|  | 
 | ||||||
|  |     private String model; | ||||||
|  | 
 | ||||||
|  |     private String standard; | ||||||
|  | 
 | ||||||
|  |     private String brand; | ||||||
|  | 
 | ||||||
|  |     private String mnemonic; | ||||||
|  | 
 | ||||||
|  |     private String color; | ||||||
|  | 
 | ||||||
|  |     private String unit; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private String imgName; | ||||||
|  | 
 | ||||||
|  |     private Long unitId; | ||||||
|  | 
 | ||||||
|  |     private Integer expiryNum; | ||||||
|  | 
 | ||||||
|  |     private BigDecimal weight; | ||||||
|  | 
 | ||||||
|  |     private Boolean enabled; | ||||||
|  | 
 | ||||||
|  |     private String otherField1; | ||||||
|  | 
 | ||||||
|  |     private String otherField2; | ||||||
|  | 
 | ||||||
|  |     private String otherField3; | ||||||
|  | 
 | ||||||
|  |     private String enableSerialNumber; | ||||||
|  | 
 | ||||||
|  |     private String enableBatchNumber; | ||||||
|  | 
 | ||||||
|  |     private String position; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getCategoryId() { | ||||||
|  |         return categoryId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCategoryId(Long categoryId) { | ||||||
|  |         this.categoryId = categoryId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMfrs() { | ||||||
|  |         return mfrs; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMfrs(String mfrs) { | ||||||
|  |         this.mfrs = mfrs == null ? null : mfrs.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getModel() { | ||||||
|  |         return model; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setModel(String model) { | ||||||
|  |         this.model = model == null ? null : model.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getStandard() { | ||||||
|  |         return standard; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setStandard(String standard) { | ||||||
|  |         this.standard = standard == null ? null : standard.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getBrand() { | ||||||
|  |         return brand; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setBrand(String brand) { | ||||||
|  |         this.brand = brand == null ? null : brand.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMnemonic() { | ||||||
|  |         return mnemonic; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMnemonic(String mnemonic) { | ||||||
|  |         this.mnemonic = mnemonic == null ? null : mnemonic.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getColor() { | ||||||
|  |         return color; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setColor(String color) { | ||||||
|  |         this.color = color == null ? null : color.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getUnit() { | ||||||
|  |         return unit; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnit(String unit) { | ||||||
|  |         this.unit = unit == null ? null : unit.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getImgName() { | ||||||
|  |         return imgName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setImgName(String imgName) { | ||||||
|  |         this.imgName = imgName == null ? null : imgName.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getUnitId() { | ||||||
|  |         return unitId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUnitId(Long unitId) { | ||||||
|  |         this.unitId = unitId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Integer getExpiryNum() { | ||||||
|  |         return expiryNum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setExpiryNum(Integer expiryNum) { | ||||||
|  |         this.expiryNum = expiryNum; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public BigDecimal getWeight() { | ||||||
|  |         return weight; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setWeight(BigDecimal weight) { | ||||||
|  |         this.weight = weight; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean getEnabled() { | ||||||
|  |         return enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnabled(Boolean enabled) { | ||||||
|  |         this.enabled = enabled; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOtherField1() { | ||||||
|  |         return otherField1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtherField1(String otherField1) { | ||||||
|  |         this.otherField1 = otherField1 == null ? null : otherField1.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOtherField2() { | ||||||
|  |         return otherField2; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtherField2(String otherField2) { | ||||||
|  |         this.otherField2 = otherField2 == null ? null : otherField2.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOtherField3() { | ||||||
|  |         return otherField3; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOtherField3(String otherField3) { | ||||||
|  |         this.otherField3 = otherField3 == null ? null : otherField3.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getEnableSerialNumber() { | ||||||
|  |         return enableSerialNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnableSerialNumber(String enableSerialNumber) { | ||||||
|  |         this.enableSerialNumber = enableSerialNumber == null ? null : enableSerialNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getEnableBatchNumber() { | ||||||
|  |         return enableBatchNumber; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setEnableBatchNumber(String enableBatchNumber) { | ||||||
|  |         this.enableBatchNumber = enableBatchNumber == null ? null : enableBatchNumber.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getPosition() { | ||||||
|  |         return position; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setPosition(String position) { | ||||||
|  |         this.position = position == null ? null : position.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,53 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | public class MaterialAttribute { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String attributeName; | ||||||
|  | 
 | ||||||
|  |     private String attributeValue; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAttributeName() { | ||||||
|  |         return attributeName; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAttributeName(String attributeName) { | ||||||
|  |         this.attributeName = attributeName == null ? null : attributeName.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getAttributeValue() { | ||||||
|  |         return attributeValue; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setAttributeValue(String attributeValue) { | ||||||
|  |         this.attributeValue = attributeValue == null ? null : attributeValue.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,529 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | public class MaterialAttributeExample { | ||||||
|  |     protected String orderByClause; | ||||||
|  | 
 | ||||||
|  |     protected boolean distinct; | ||||||
|  | 
 | ||||||
|  |     protected List<Criteria> oredCriteria; | ||||||
|  | 
 | ||||||
|  |     public MaterialAttributeExample() { | ||||||
|  |         oredCriteria = new ArrayList<>(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setOrderByClause(String orderByClause) { | ||||||
|  |         this.orderByClause = orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getOrderByClause() { | ||||||
|  |         return orderByClause; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDistinct(boolean distinct) { | ||||||
|  |         this.distinct = distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public boolean isDistinct() { | ||||||
|  |         return distinct; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public List<Criteria> getOredCriteria() { | ||||||
|  |         return oredCriteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void or(Criteria criteria) { | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria or() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         oredCriteria.add(criteria); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Criteria createCriteria() { | ||||||
|  |         Criteria criteria = createCriteriaInternal(); | ||||||
|  |         if (oredCriteria.size() == 0) { | ||||||
|  |             oredCriteria.add(criteria); | ||||||
|  |         } | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected Criteria createCriteriaInternal() { | ||||||
|  |         Criteria criteria = new Criteria(); | ||||||
|  |         return criteria; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void clear() { | ||||||
|  |         oredCriteria.clear(); | ||||||
|  |         orderByClause = null; | ||||||
|  |         distinct = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     protected abstract static class GeneratedCriteria { | ||||||
|  |         protected List<Criterion> criteria; | ||||||
|  | 
 | ||||||
|  |         protected GeneratedCriteria() { | ||||||
|  |             super(); | ||||||
|  |             criteria = new ArrayList<>(); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isValid() { | ||||||
|  |             return criteria.size() > 0; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getAllCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public List<Criterion> getCriteria() { | ||||||
|  |             return criteria; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition) { | ||||||
|  |             if (condition == null) { | ||||||
|  |                 throw new RuntimeException("Value for condition cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value, String property) { | ||||||
|  |             if (value == null) { | ||||||
|  |                 throw new RuntimeException("Value for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected void addCriterion(String condition, Object value1, Object value2, String property) { | ||||||
|  |             if (value1 == null || value2 == null) { | ||||||
|  |                 throw new RuntimeException("Between values for " + property + " cannot be null"); | ||||||
|  |             } | ||||||
|  |             criteria.add(new Criterion(condition, value1, value2)); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNull() { | ||||||
|  |             addCriterion("id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIsNotNull() { | ||||||
|  |             addCriterion("id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdEqualTo(Long value) { | ||||||
|  |             addCriterion("id =", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("id <>", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("id >", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id >=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThan(Long value) { | ||||||
|  |             addCriterion("id <", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("id <=", value, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdIn(List<Long> values) { | ||||||
|  |             addCriterion("id in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("id not in", values, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("id not between", value1, value2, "id"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameIsNull() { | ||||||
|  |             addCriterion("attribute_name is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameIsNotNull() { | ||||||
|  |             addCriterion("attribute_name is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_name =", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameNotEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_name <>", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameGreaterThan(String value) { | ||||||
|  |             addCriterion("attribute_name >", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_name >=", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameLessThan(String value) { | ||||||
|  |             addCriterion("attribute_name <", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_name <=", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameLike(String value) { | ||||||
|  |             addCriterion("attribute_name like", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameNotLike(String value) { | ||||||
|  |             addCriterion("attribute_name not like", value, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameIn(List<String> values) { | ||||||
|  |             addCriterion("attribute_name in", values, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameNotIn(List<String> values) { | ||||||
|  |             addCriterion("attribute_name not in", values, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameBetween(String value1, String value2) { | ||||||
|  |             addCriterion("attribute_name between", value1, value2, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeNameNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("attribute_name not between", value1, value2, "attributeName"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueIsNull() { | ||||||
|  |             addCriterion("attribute_value is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueIsNotNull() { | ||||||
|  |             addCriterion("attribute_value is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_value =", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueNotEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_value <>", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueGreaterThan(String value) { | ||||||
|  |             addCriterion("attribute_value >", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_value >=", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueLessThan(String value) { | ||||||
|  |             addCriterion("attribute_value <", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("attribute_value <=", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueLike(String value) { | ||||||
|  |             addCriterion("attribute_value like", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueNotLike(String value) { | ||||||
|  |             addCriterion("attribute_value not like", value, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueIn(List<String> values) { | ||||||
|  |             addCriterion("attribute_value in", values, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueNotIn(List<String> values) { | ||||||
|  |             addCriterion("attribute_value not in", values, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueBetween(String value1, String value2) { | ||||||
|  |             addCriterion("attribute_value between", value1, value2, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andAttributeValueNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("attribute_value not between", value1, value2, "attributeValue"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNull() { | ||||||
|  |             addCriterion("tenant_id is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIsNotNull() { | ||||||
|  |             addCriterion("tenant_id is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id =", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <>", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThan(Long value) { | ||||||
|  |             addCriterion("tenant_id >", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id >=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThan(Long value) { | ||||||
|  |             addCriterion("tenant_id <", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdLessThanOrEqualTo(Long value) { | ||||||
|  |             addCriterion("tenant_id <=", value, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotIn(List<Long> values) { | ||||||
|  |             addCriterion("tenant_id not in", values, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andTenantIdNotBetween(Long value1, Long value2) { | ||||||
|  |             addCriterion("tenant_id not between", value1, value2, "tenantId"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNull() { | ||||||
|  |             addCriterion("delete_flag is null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIsNotNull() { | ||||||
|  |             addCriterion("delete_flag is not null"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag =", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <>", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThan(String value) { | ||||||
|  |             addCriterion("delete_flag >", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagGreaterThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag >=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThan(String value) { | ||||||
|  |             addCriterion("delete_flag <", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLessThanOrEqualTo(String value) { | ||||||
|  |             addCriterion("delete_flag <=", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagLike(String value) { | ||||||
|  |             addCriterion("delete_flag like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotLike(String value) { | ||||||
|  |             addCriterion("delete_flag not like", value, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotIn(List<String> values) { | ||||||
|  |             addCriterion("delete_flag not in", values, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Criteria andDeleteFlagNotBetween(String value1, String value2) { | ||||||
|  |             addCriterion("delete_flag not between", value1, value2, "deleteFlag"); | ||||||
|  |             return (Criteria) this; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criteria extends GeneratedCriteria { | ||||||
|  |         protected Criteria() { | ||||||
|  |             super(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static class Criterion { | ||||||
|  |         private String condition; | ||||||
|  | 
 | ||||||
|  |         private Object value; | ||||||
|  | 
 | ||||||
|  |         private Object secondValue; | ||||||
|  | 
 | ||||||
|  |         private boolean noValue; | ||||||
|  | 
 | ||||||
|  |         private boolean singleValue; | ||||||
|  | 
 | ||||||
|  |         private boolean betweenValue; | ||||||
|  | 
 | ||||||
|  |         private boolean listValue; | ||||||
|  | 
 | ||||||
|  |         private String typeHandler; | ||||||
|  | 
 | ||||||
|  |         public String getCondition() { | ||||||
|  |             return condition; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getValue() { | ||||||
|  |             return value; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public Object getSecondValue() { | ||||||
|  |             return secondValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isNoValue() { | ||||||
|  |             return noValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isSingleValue() { | ||||||
|  |             return singleValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isBetweenValue() { | ||||||
|  |             return betweenValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public boolean isListValue() { | ||||||
|  |             return listValue; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public String getTypeHandler() { | ||||||
|  |             return typeHandler; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.typeHandler = null; | ||||||
|  |             this.noValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             if (value instanceof List<?>) { | ||||||
|  |                 this.listValue = true; | ||||||
|  |             } else { | ||||||
|  |                 this.singleValue = true; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value) { | ||||||
|  |             this(condition, value, null); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { | ||||||
|  |             super(); | ||||||
|  |             this.condition = condition; | ||||||
|  |             this.value = value; | ||||||
|  |             this.secondValue = secondValue; | ||||||
|  |             this.typeHandler = typeHandler; | ||||||
|  |             this.betweenValue = true; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         protected Criterion(String condition, Object value, Object secondValue) { | ||||||
|  |             this(condition, value, secondValue, null); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,115 @@ | |||||||
|  | package com.jsh.erp.datasource.entities; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | public class MaterialCategory { | ||||||
|  |     private Long id; | ||||||
|  | 
 | ||||||
|  |     private String name; | ||||||
|  | 
 | ||||||
|  |     private Short categoryLevel; | ||||||
|  | 
 | ||||||
|  |     private Long parentId; | ||||||
|  | 
 | ||||||
|  |     private String sort; | ||||||
|  | 
 | ||||||
|  |     private String serialNo; | ||||||
|  | 
 | ||||||
|  |     private String remark; | ||||||
|  | 
 | ||||||
|  |     private Date createTime; | ||||||
|  | 
 | ||||||
|  |     private Date updateTime; | ||||||
|  | 
 | ||||||
|  |     private Long tenantId; | ||||||
|  | 
 | ||||||
|  |     private String deleteFlag; | ||||||
|  | 
 | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name == null ? null : name.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Short getCategoryLevel() { | ||||||
|  |         return categoryLevel; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCategoryLevel(Short categoryLevel) { | ||||||
|  |         this.categoryLevel = categoryLevel; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getParentId() { | ||||||
|  |         return parentId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setParentId(Long parentId) { | ||||||
|  |         this.parentId = parentId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSort() { | ||||||
|  |         return sort; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSort(String sort) { | ||||||
|  |         this.sort = sort == null ? null : sort.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getSerialNo() { | ||||||
|  |         return serialNo; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setSerialNo(String serialNo) { | ||||||
|  |         this.serialNo = serialNo == null ? null : serialNo.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getRemark() { | ||||||
|  |         return remark; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setRemark(String remark) { | ||||||
|  |         this.remark = remark == null ? null : remark.trim(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getCreateTime() { | ||||||
|  |         return createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCreateTime(Date createTime) { | ||||||
|  |         this.createTime = createTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Date getUpdateTime() { | ||||||
|  |         return updateTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setUpdateTime(Date updateTime) { | ||||||
|  |         this.updateTime = updateTime; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Long getTenantId() { | ||||||
|  |         return tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setTenantId(Long tenantId) { | ||||||
|  |         this.tenantId = tenantId; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getDeleteFlag() { | ||||||
|  |         return deleteFlag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setDeleteFlag(String deleteFlag) { | ||||||
|  |         this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); | ||||||
|  |     } | ||||||
|  | } | ||||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	Block a user