Pre Merge pull request !4 from 衡光杰/jeecg_3.8

pull/4/MERGE
衡光杰 3 years ago committed by Gitee
commit a23ff46386
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (c) 2013 <a href="http://www.jeecg.org">jeecg</a> All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

@ -1,228 +1,242 @@
JEECG 微云快速开发平台
![JEECG](https://static.oschina.net/uploads/img/201905/24184932_ak9D.png "Jeecg快速开发平台")
JEECG 微云快速开发平台
===============
当前最新版本: 3.7.8发布日期20180806
当前最新版本: 3.8发布日期20181024
JEECG微服务架构: [jeecg-p3 1.0版](https://gitee.com/jeecg/jeecg-p3)
JEECG全新版本已经发布,强烈建议(Spring2.x+Vue+Antd 前后端分离) [jeecg-boot](https://github.com/zhangdaiscott/jeecg-boot)
前言:
前言:
-----------------------------------
随着 WEB UI 框架 ( EasyUI/Jquery UI/Ext/DWZ/VUE/Boostrap) 等的逐渐成熟,系统界面逐渐实现统一化,代码生成器也可以生成统一规范的界面!
代码生成+手工MERGE半智能开发将是新的趋势单表数据模型和一对多数据模型的增删改查功能直接生成使用,可节省80%工作量,快速提高开发效率!!!
随着 WEB UI 框架 ( EasyUI/Jquery UI/Ext/DWZ/VUE/Boostrap) 等的逐渐成熟,系统界面逐渐实现统一化,代码生成器也可以生成统一规范的界面!
代码生成+手工MERGE半智能开发将是新的趋势单表数据模型和一对多数据模型的增删改查功能直接生成使用,可节省80%工作量,快速提高开发效率!!!
简介
简介
-----------------------------------
JEECGJ2EE Code Generation是一款基于代码生成器的智能开发平台。引领新的开发模式(Online Coding->代码生成器->手工MERGE智能开发)可以帮助解决Java项目90%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。
JEECGJ2EE Code Generation是一款基于代码生成器的智能开发平台。引领新的开发模式(Online Coding->代码生成器->手工MERGE智能开发)可以帮助解决Java项目90%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。
JEECG宗旨是: 简单功能由代Online Coding配置出功能;复杂功能由代码生成器生成进行手工Merge; 复杂流程业务采用表单自定义,业务流程使用工作流来实现、扩展出任务接口,供开发编写业务逻辑。实现了流程任务节点和任务接口的灵活配置,既保证了公司流程的保密行,又减少了开发人员的工作量。
JEECG宗旨是: 简单功能由代Online Coding配置出功能;复杂功能由代码生成器生成进行手工Merge; 复杂流程业务采用表单自定义,业务流程使用工作流来实现、扩展出任务接口,供开发编写业务逻辑。实现了流程任务节点和任务接口的灵活配置,既保证了公司流程的保密行,又减少了开发人员的工作量。
适用项目
适用项目
-----------------------------------
JEECG快速开发平台可以应用在任何J2EE项目的开发中尤其适合企业信息管理系统MIS、内部办公系统OA、企业资源计划系统ERP、客户关系管理系统CRM其半智能手工Merge的开发方式可以显著提高开发效率90%以上极大降低开发成本JEECG尤为显著的支持SAAS企业级应用开发插件机制更好的支持了SAAS云应用需求。
JEECG快速开发平台可以应用在任何J2EE项目的开发中尤其适合企业信息管理系统MIS、内部办公系统OA、企业资源计划系统ERP、客户关系管理系统CRM其半智能手工Merge的开发方式可以显著提高开发效率90%以上极大降低开发成本JEECG尤为显著的支持SAAS企业级应用开发插件机制更好的支持了SAAS云应用需求。
为什么选择JEECG?
为什么选择JEECG?
-----------------------------------
* 1.采用主流框架,容易上手; 代码生成器依赖性低,很方便的扩展能力,可完全实现二次开发;
* 2.开发效率很高,采用代码生成器,单表数据模型和一对多(父子表)数据模型,增删改查功能自动生成,菜单配置直接使用;
* 3.页面校验自动生成(必须输入、数字校验、金额校验、时间空间等);
* 4.封装完善的用户基础权限、强大的数据权限、和数据字典等基础功能,直接使用无需修改
* 5.常用共通封装,各种工具类(定时任务,短信接口,邮件发送,Excel导出等),基本满足80%项目需求
* 6.集成简易报表工具图像报表和数据导出非常方便可极其方便的生成pdf、excel、word等报表
* 7.集成工作流activiti并实现了只需在页面配置流程转向可极大的简化jbpm工作流的开发用jbpm的流程设计器画出了流程走向一个工作流基本就完成了只需写很少量的java代码
* 8.UI标签库针对WEB UI进行标准式封装页面统一采用自定义标签实现功能列表数据展现、页面校验等,标签使用简单清晰且便于维护
* 9.在线流程设计采用开源Activiti流程引擎实现在线画流程,自定义表单,表单挂靠,业务流转
* 10.查询过滤器查询功能自动生成后台动态拼SQL追加查询条件支持多种匹配方式全匹配/模糊查询/包含查询/不匹配查询);
* 11.多数据源:及其简易的使用方式,在线配置数据源配置,便捷的从其他数据抓取数据;
* 12.国际化:支持多语言,开发国际化项目非常方便;
* 13.数据权限(精细化数据权限控制,控制到行级,列表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段
* 14.多种首页风格切换,支持自定义首页风格。经典风格、Shortcut风格、ACE bootstrap风格、云桌面风格
* 15.在线配置报表(无需编码,通过在线配置方式,实现曲线图,柱状图,数据等报表)
* 16.简易Excel导入导出支持单表导出和一对多表模式导出生成的代码自带导入导出功能
* 17.自定义表单支持用户自定义表单布局支持单表一对多表单、支持select、radio、checkbox、textarea、date、popup、列表、宏等控件
* 18.专业接口对接机制统一采用restful接口方式集成swagger-ui在线接口文档Jwt token安全验证方便客户端对接
* 19.接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制
* 20.高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史
* 21.支持二级管理员,权限细化管理
* 22.代码生成器支持resutful接口生成
JEECG 功能特点
* 1.采用主流框架,容易上手; 代码生成器依赖性低,很方便的扩展能力,可完全实现二次开发;
* 2.开发效率很高,采用代码生成器,单表数据模型和一对多(父子表)数据模型,增删改查功能自动生成,菜单配置直接使用;
* 3.页面校验自动生成(必须输入、数字校验、金额校验、时间空间等);
* 4.封装完善的用户基础权限、强大的数据权限、和数据字典等基础功能,直接使用无需修改
* 5.常用共通封装,各种工具类(定时任务,短信接口,邮件发送,Excel导出等),基本满足80%项目需求
* 6.集成简易报表工具图像报表和数据导出非常方便可极其方便的生成pdf、excel、word等报表
* 7.集成工作流activiti并实现了只需在页面配置流程转向可极大的简化jbpm工作流的开发用jbpm的流程设计器画出了流程走向一个工作流基本就完成了只需写很少量的java代码
* 8.UI标签库针对WEB UI进行标准式封装页面统一采用自定义标签实现功能列表数据展现、页面校验等,标签使用简单清晰且便于维护
* 9.在线流程设计采用开源Activiti流程引擎实现在线画流程,自定义表单,表单挂靠,业务流转
* 10.查询过滤器查询功能自动生成后台动态拼SQL追加查询条件支持多种匹配方式全匹配/模糊查询/包含查询/不匹配查询);
* 11.多数据源:及其简易的使用方式,在线配置数据源配置,便捷的从其他数据抓取数据;
* 12.国际化:支持多语言,开发国际化项目非常方便;
* 13.数据权限(精细化数据权限控制,控制到行级,列表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段
* 14.多种首页风格切换,支持自定义首页风格。经典风格、Shortcut风格、ACE bootstrap风格、云桌面风格
* 15.在线配置报表(无需编码,通过在线配置方式,实现曲线图,柱状图,数据等报表)
* 16.简易Excel导入导出支持单表导出和一对多表模式导出生成的代码自带导入导出功能
* 17.自定义表单支持用户自定义表单布局支持单表一对多表单、支持select、radio、checkbox、textarea、date、popup、列表、宏等控件
* 18.专业接口对接机制统一采用restful接口方式集成swagger-ui在线接口文档Jwt token安全验证方便客户端对接
* 19.接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制
* 20.高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史
* 21.支持二级管理员,权限细化管理
* 22.代码生成器支持resutful接口生成
JEECG 功能特点
-----------------------------------
* 采用SpringMVC + Hibernate + Minidao(类Mybatis) + Easyui(UI库)+ Jquery + Boostrap + Ehcache + Redis + Ztree + Vue + Boostrap-table + ElementUI等基础架构</br>
* 采用面向声明的开发模式, 基于泛型编写极少代码即可实现复杂的数据展示、数据编辑、表单处理等功能再配合Online Coding在线开发与代码生成器的使用,将J2EE的开发效率提高8倍以上可以将代码减少90%以上。</br>
* JEECG 技术点总结:
* <b>技术点一:</b>代码生成器SPA单页面应用快速生成采用VUE+ElementUI打造酷炫效果 </br>
* <b>技术点二:</b>新一代代码生成器更灵活的代码生成器工厂,可灵活自定义生成的代码文件名称、路径等;根据模板结构生成代码文件</br>
* <b>技术点三:</b>新一代代码生成器支持Vue+ElementUI风格Bootstrap表单+EasyUI原生态列表风格ElementUI表单+EasyUI原生态列表风格</br>
* <b>技术点四:</b>Dategrid标签多列表风格快速切换给用户提供多种选择</br>
* <b>技术点五:</b>Online Coding在线开发(通过在线配置实现一个表模型的增删改查功能,无需一行代码,支持用户自定义表单布局) </br>
* <b>技术点六:</b>代码生成器,支持多种数据模型,根据表生成对应的Entity,Service,Dao,Action,JSP等,增删改查功能生成直接使用</br>
* <b>技术点七:</b>UI快速开发库针对WEB UI进行标准封装页面统一采用UI标签实现功能数据datagrid,表单校验,Popup,Tab等实现JSP页面零JS开发维护非常高效</br>
* <b>技术点八:</b>在线流程定义采用开源Activiti流程引擎实现在线画流程,自定义表单,表单挂接,业务流转,流程监控,流程跟踪,流程委托等</br>
* <b>技术点九:</b>自定义表单,支持用户自定义表单布局支持单表、列表、Select\Radio\Checkbox\PopUP\Date等特殊控件</br>
* <b>技术点十:</b>查询过滤器查询功能自动生成后台动态拼SQL追加查询条件支持多种匹配方式全匹配/模糊查询/包含查询/不匹配查询)</br>
* <b>技术点十一::</b>移动平台支持对Bootstrap(兼容Html5)进行标准封装 </br>
* <b>技术点十二:</b>动态报表功能用户输入一个sql系统自动解析生成报表</br>
* <b>技术点十三:</b>数据权限(精细化数据权限控制,控制到行级,列表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段)</br>
* <b>技术点十四:</b>国际化(支持多语言,国际化的封装为多语言做了便捷支持)</br>
* <b>技术点十五:</b>多数据源(在线配置数据源,数据源工作类封装)</br>
* <b>技术点十六:</b>多种首页风格切换,支持自定义首页风格。经典风格、Shortcut风格、ACE bootstrap风格、云桌面风格</br>
* <b>技术点十七:</b>在线配置报表(无需编码,通过在线配置方式,实现曲线图,柱状图,数据等报表)</br>
* <b>技术点十八:</b>简易Excel导入导出支持单表导出和一对多表模式导出生成的代码自带导入导出功能</br>
* <b>技术点十九:</b>移动OA移动OA审批功能采用H5技术实现手机移动办公无缝对接微信、钉钉、微信企业号、也可以做APP</br>
* <b>技术点二十:</b>移动图表在线配置移动报表采用H5技术可以手机端查看</br>
* <b>技术点二十一::</b>插件开发业务功能组件以插件方式集成平台也可以单独部署发发布有力支撑了SAAS云应用系统需求</br>
* <b>技术点二十二::</b>专业接口对接机制统一采用restful接口方式集成swagger-ui在线接口文档Jwt token安全验证方便客户端对接</br>
* <b>技术点二十三:</b>接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制</br>
* <b>技术点二十四:</b>高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史</br>
* <b>技术点二十五:</b>支持二级管理员,权限细化管理</br>
* <b>技术点二十六:</b>代码生成器支持resutful接口生成</br>
* JEECG V3.7.8, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* 支持多种浏览器: IE, 火狐, Google 等</br>
* 支持数据库: Mysql,Oracle,Postgre,SqlServer等</br>
* 基础权限: 用户,角色,菜单权限,按钮权限,数据权限</br>
* 智能报表集成: 简易的图像报表工具和Excel导入导出</br>
* Web容器测试通过的有Jetty和Tomcat,Weblogic</br>
* 亮点功能:分布式部署,云平台,移动平台开发,规则引擎</br>
* 要求JDK1.6+</br>
技术文档
* 采用SpringMVC + Hibernate + Minidao(类Mybatis) + Easyui(UI库)+ Jquery + Boostrap + Ehcache + Redis + Ztree + Vue + Boostrap-table + ElementUI等基础架构</br>
* 采用面向声明的开发模式, 基于泛型编写极少代码即可实现复杂的数据展示、数据编辑、表单处理等功能再配合Online Coding在线开发与代码生成器的使用,将J2EE的开发效率提高8倍以上可以将代码减少90%以上。</br>
* JEECG 技术点总结:
* <b>技术点一:</b>代码生成器SPA单页面应用快速生成采用VUE+ElementUI打造酷炫效果 </br>
* <b>技术点二:</b>新一代代码生成器更灵活的代码生成器工厂,可灵活自定义生成的代码文件名称、路径等;根据模板结构生成代码文件</br>
* <b>技术点三:</b>新一代代码生成器支持Vue+ElementUI风格Bootstrap表单+EasyUI原生态列表风格ElementUI表单+EasyUI原生态列表风格</br>
* <b>技术点四:</b>Dategrid标签多列表风格快速切换给用户提供多种选择</br>
* <b>技术点五:</b>Online Coding在线开发(通过在线配置实现一个表模型的增删改查功能,无需一行代码,支持用户自定义表单布局) </br>
* <b>技术点六:</b>代码生成器,支持多种数据模型,根据表生成对应的Entity,Service,Dao,Action,JSP等,增删改查功能生成直接使用</br>
* <b>技术点七:</b>UI快速开发库针对WEB UI进行标准封装页面统一采用UI标签实现功能数据datagrid,表单校验,Popup,Tab等实现JSP页面零JS开发维护非常高效</br>
* <b>技术点八:</b>在线流程定义采用开源Activiti流程引擎实现在线画流程,自定义表单,表单挂接,业务流转,流程监控,流程跟踪,流程委托等</br>
* <b>技术点九:</b>自定义表单,支持用户自定义表单布局支持单表、列表、Select\Radio\Checkbox\PopUP\Date等特殊控件</br>
* <b>技术点十:</b>查询过滤器查询功能自动生成后台动态拼SQL追加查询条件支持多种匹配方式全匹配/模糊查询/包含查询/不匹配查询)</br>
* <b>技术点十一::</b>移动平台支持对Bootstrap(兼容Html5)进行标准封装 </br>
* <b>技术点十二:</b>动态报表功能用户输入一个sql系统自动解析生成报表</br>
* <b>技术点十三:</b>数据权限(精细化数据权限控制,控制到行级,列表级,表单字段级,实现不同人看不同数据,不同人对同一个页面操作不同字段)</br>
* <b>技术点十四:</b>国际化(支持多语言,国际化的封装为多语言做了便捷支持)</br>
* <b>技术点十五:</b>多数据源(在线配置数据源,数据源工作类封装)</br>
* <b>技术点十六:</b>多种首页风格切换,支持自定义首页风格。经典风格、Shortcut风格、ACE bootstrap风格、云桌面风格</br>
* <b>技术点十七:</b>在线配置报表(无需编码,通过在线配置方式,实现曲线图,柱状图,数据等报表)</br>
* <b>技术点十八:</b>简易Excel导入导出支持单表导出和一对多表模式导出生成的代码自带导入导出功能</br>
* <b>技术点十九:</b>移动OA移动OA审批功能采用H5技术实现手机移动办公无缝对接微信、钉钉、微信企业号、也可以做APP</br>
* <b>技术点二十:</b>移动图表在线配置移动报表采用H5技术可以手机端查看</br>
* <b>技术点二十一::</b>插件开发业务功能组件以插件方式集成平台也可以单独部署发发布有力支撑了SAAS云应用系统需求</br>
* <b>技术点二十二::</b>专业接口对接机制统一采用restful接口方式集成swagger-ui在线接口文档Jwt token安全验证方便客户端对接</br>
* <b>技术点二十三:</b>接口安全机制,可细化控制接口授权,非常简便实现不同客户端只看自己数据等控制</br>
* <b>技术点二十四:</b>高级组合查询功能,在线配置支持主子表关联查询,可保存查询历史</br>
* <b>技术点二十五:</b>支持二级管理员,权限细化管理</br>
* <b>技术点二十六:</b>代码生成器支持resutful接口生成</br>
* JEECG V3.7.8, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* 支持多种浏览器: IE, 火狐, Google 等</br>
* 支持数据库: Mysql,Oracle,Postgre,SqlServer等</br>
* 基础权限: 用户,角色,菜单权限,按钮权限,数据权限</br>
* 智能报表集成: 简易的图像报表工具和Excel导入导出</br>
* Web容器测试通过的有Jetty和Tomcat,Weblogic</br>
* 亮点功能:分布式部署,云平台,移动平台开发,规则引擎</br>
* 要求JDK1.6+</br>
技术文档
-----------------------------------
* [在线演示](http://demo.jeecg.org)
* [JEECG 入门开发环境搭建](https://blog.csdn.net/zhangdaiscott/article/details/50915206)
* [JEECG 在线开发文档](http://jeecg3.mydoc.io)
* [JEECG 常见问题贴](http://www.jeecg.org/forum.php?mod=viewthread&tid=1830&extra=page%3D1)
* [JEECG 本地maven仓库下载](https://gitee.com/jeecg/jeecg-local-maven)
* [JEECG 在线视频教程](https://edu.csdn.net/lecturer/929)
* [非Maven版本下载](https://github.com/zhangdaiscott/jeecg-nomaven)
* [JEECG 版本日志](http://www.jeecg.org/forum.php?mod=viewthread&tid=365&extra=page%3D1)
* [在线演示](http://demo.jeecg.com)
* [JEECG 入门开发环境搭建](http://jeecg3.mydoc.io/?t=286008)
* [JEECG 在线开发文档](http://jeecg3.mydoc.io)
* [JEECG 常见问题贴](http://www.jeecg.org/forum.php?mod=viewthread&tid=1830&extra=page%3D1)
* [JEECG 本地maven仓库下载](https://gitee.com/jeecg/jeecg-local-maven)
* [非Maven版本下载](https://github.com/zhangdaiscott/jeecg-nomaven)
* [JEECG 版本日志](http://www.jeecg.org/forum.php?mod=viewthread&tid=365&extra=page%3D1)
* JEECG 视频教程(网盘密码rxk3): [https://pan.baidu.com/s/1ONWNrtKbNY3gI3TztgtOJA](https://pan.baidu.com/s/1ONWNrtKbNY3gI3TztgtOJA)
工程说明
-----------------------------------
* 关于项目插件打包使用说明:
一些不常变动的插件例如My97DatePickerlhgDialog等组件为提高项目加载效率打包成jar项目引用加载如需要更改相关插件源码可下载工程[https://gitee.com/jeecg/jeecg-common-plugin-ui](https://gitee.com/jeecg/jeecg-common-plugin-ui)引入
技术交流
技术交流
-----------------------------------
* QQ交流群 ⑥190866569、其他群(全满)</br>
* 官方论坛: [http://www.jeecg.org](http://www.jeecg.org)
* 官方博客: [http://blog.csdn.net/zhangdaiscott](http://blog.csdn.net/zhangdaiscott)
* 关注官方微信公众号,获取更多资讯
* QQ交流群 ⑦286263896、其他群(全满)</br>
* 官方论坛: [http://www.jeecg.org](http://www.jeecg.org)
* 官方博客: [http://blog.csdn.net/zhangdaiscott](http://blog.csdn.net/zhangdaiscott)
* 关注官方微信公众号,获取更多资讯
![输入图片说明](https://static.oschina.net/uploads/img/201807/09172938_ltsb.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09172938_ltsb.jpg "在这里输入图片标题")
社区荣誉
社区荣誉
-----------------------------------
* 开源社区http://www.jeecg.org
* ★2012年JEECG在Google Code上开源;
* ★2012年底开源项目JEECG被"ITeye专家访谈";
* ★2012年底开源项目JEECG被"CSDN专家访谈";
* ★2013年应邀参加"第八届开源中国开源世界高峰论坛"该论坛由中国开源软件推进联盟主办、全球最大中文IT社区CSDN与程序员杂志协办
* ★2013年应邀参加"开源群英会2013”的开源英雄;
* ★2013年度中国优秀开源项目评选-公开投票,“JEECG以887票位居第九"该项目中国开源软件推进联盟主办、全球最大中文IT社区CSDN与程序员杂志协办
* ★2013年度成立JEECG开源团队创立JEECG开源社区;
* ★2013年度JEECG参加“云计算成就创业梦想”第二届阿里云开发者大赛";
* ★2013年度应邀参加了"SDCC 2013中国软件开发者大会" 大会由CSDN和《程序员》杂志倾力打造
* ★2013年下半年推出开源项目"MiniDao(持久层解决方案)"超越了Mybatis和Hibernate
* ★2014年5月应邀参加中国科学院大学创新创业年度论坛探讨“创业企业发展、创新创业孵化”的主题成为中国科学院大学创新创业和风险投资协会副会长。
* ★2014年推出当前最火的开源项目“JeeWx(捷微:敏捷微信开发平台并获得CSDN举办的“2014年开发者大会”公开投票第一名
* ★2014年8月份捷微jeewx2.0与百度达成战略合作,集成百度地图,增加地图功能,附近商家团购等信息搜索。
* ★2014年12月份捷微jeewx与联通集团达成战略合作负责联通集团微信公众账号集团化运营。
* ★2015年3月份捷微jeewx推出集团化微信运营版本专注微信应用一体化企业系统集成实现公众账号上下级类似组织机构权限模式。
* ★2015年6月份捷微jeewx推出集企业号版本与中国移动打成战略合作推出企业号营销新模式。
* ★2015开源中国最火开源项目,TOP5独占2位(jeewx\jeecg),TOP50占4位jeewx\jeecg\easypoi\jeewx-api)
* ★2016年2月JEECG推出移动能力版本在线配置移动报表在线配置移动表单微信OA一体化集成
* ★2016年3月JEECG插件开发机制采用插件方式为用户提供插件服务目前插件OA、微信企业号、文档云盘
* ★2016年4月捷微H5活动平台与微盟达成战略合作伙伴
系统演示
* 开源社区http://www.jeecg.org
* ★2012年JEECG在Google Code上开源;
* ★2012年底开源项目JEECG被"ITeye专家访谈";
* ★2012年底开源项目JEECG被"CSDN专家访谈";
* ★2013年应邀参加"第八届开源中国开源世界高峰论坛"该论坛由中国开源软件推进联盟主办、全球最大中文IT社区CSDN与程序员杂志协办
* ★2013年应邀参加"开源群英会2013”的开源英雄;
* ★2013年度中国优秀开源项目评选-公开投票,“JEECG以887票位居第九"该项目中国开源软件推进联盟主办、全球最大中文IT社区CSDN与程序员杂志协办
* ★2013年度成立JEECG开源团队创立JEECG开源社区;
* ★2013年度JEECG参加“云计算成就创业梦想”第二届阿里云开发者大赛";
* ★2013年度应邀参加了"SDCC 2013中国软件开发者大会" 大会由CSDN和《程序员》杂志倾力打造
* ★2013年下半年推出开源项目"MiniDao(持久层解决方案)"超越了Mybatis和Hibernate
* ★2014年5月应邀参加中国科学院大学创新创业年度论坛探讨“创业企业发展、创新创业孵化”的主题成为中国科学院大学创新创业和风险投资协会副会长。
* ★2014年推出当前最火的开源项目“JeeWx(捷微:敏捷微信开发平台并获得CSDN举办的“2014年开发者大会”公开投票第一名
* ★2014年8月份捷微jeewx2.0与百度达成战略合作,集成百度地图,增加地图功能,附近商家团购等信息搜索。
* ★2014年12月份捷微jeewx与联通集团达成战略合作负责联通集团微信公众账号集团化运营。
* ★2015年3月份捷微jeewx推出集团化微信运营版本专注微信应用一体化企业系统集成实现公众账号上下级类似组织机构权限模式。
* ★2015年6月份捷微jeewx推出集企业号版本与中国移动打成战略合作推出企业号营销新模式。
* ★2015开源中国最火开源项目,TOP5独占2位(jeewx\jeecg),TOP50占4位jeewx\jeecg\easypoi\jeewx-api)
* ★2016年2月JEECG推出移动能力版本在线配置移动报表在线配置移动表单微信OA一体化集成
* ★2016年3月JEECG插件开发机制采用插件方式为用户提供插件服务目前插件OA、微信企业号、文档云盘
* ★2016年4月捷微H5活动平台与微盟达成战略合作伙伴
* ★2016年jeecg推出插件开发框架 jeecg-p3主推通过jeecg解决未来SAAS项目需求方案
* ★2017年JEEWX推出小程序产品 小程序商城、小程序官网CMS系统、小程序论坛
* ★2017年度 Jeecg荣获开源中国2017年度最受欢迎开源项目第五名
* ★2018年JEEWX推出大数据版本集团版微信管家系统支持多触点微信、小程序、企业微信、QQ公众号、支付窗支持同时维护多公众号和集团模式公众号运营支持高并发大数据程序。
* ★2018年JEEWX推出在线免费活动平台、H5活动之家。
* ★2019年jeecg打造全新开发平台jeecg_boot(springboot+antd+vue 前后端分离最新架构)
系统演示
-----------------------------------
### [1].多套首页风格支持自定义H+风格|FineUI风格|ACE风格|Shortcut风格/云桌面等)
![输入图片说明](https://static.oschina.net/uploads/img/201807/09163742_IbMJ.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164411_zSuo.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164423_JfhR.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164434_NSLt.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164152_hxHU.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164204_uVWu.jpg "在这里输入图片标题")
### [2].表单设计能力online表单开发、表单设计器、word布局、积木表单
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164800_npNS.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164811_4UmX.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164822_SE7Z.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165024_90bw.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165445_QkbR.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165756_D2m3.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165958_syDn.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165540_CizC.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170233_i84Q.png "在这里输入图片标题")
### [3].流程组件演示
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171414_X1ee.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171521_bghO.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171532_NoB0.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171539_gh87.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171656_QTea.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171705_CTug.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171845_83W0.png "在这里输入图片标题")
### [4].报表演示(在线配置报表)
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170858_40eu.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170906_l8g0.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170916_KkLG.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170924_hDPz.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170932_HABN.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170941_McYh.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171047_38JE.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170949_FWks.png "在这里输入图片标题")
### [5].移动报表演示
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165909_OXfn.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165929_OnoB.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165943_eyQF.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165955_tJkX.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170011_9CWF.png "在这里输入图片标题")
### [6].移动OA演示
![输入图片说明](https://static.oschina.net/uploads/img/201804/19173027_byRC.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19173036_C5Kv.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170252_9gZf.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170305_ud5Y.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170337_0myK.png "在这里输入图片标题")
### [6].移动APP
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170420_v4qK.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170430_kqK2.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170449_W72k.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170458_qIv2.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170508_q2XJ.jpg "在这里输入图片标题")
代码示例
### [1].多套首页风格支持自定义H+风格|FineUI风格|ACE风格|Shortcut风格/云桌面等)
![输入图片说明](https://static.oschina.net/uploads/img/201807/09163742_IbMJ.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164411_zSuo.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164423_JfhR.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164434_NSLt.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164152_hxHU.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164204_uVWu.jpg "在这里输入图片标题")
### [2].表单设计能力online表单开发、表单设计器、word布局、积木表单
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164800_npNS.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164811_4UmX.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09164822_SE7Z.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165024_90bw.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165445_QkbR.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165756_D2m3.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09165958_syDn.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165540_CizC.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170233_i84Q.png "在这里输入图片标题")
### [3].流程组件演示
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171414_X1ee.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171521_bghO.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171532_NoB0.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171539_gh87.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171656_QTea.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171705_CTug.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171845_83W0.png "在这里输入图片标题")
### [4].报表演示(在线配置报表)
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170858_40eu.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170906_l8g0.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170916_KkLG.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170924_hDPz.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170932_HABN.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170941_McYh.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09171047_38JE.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201807/09170949_FWks.png "在这里输入图片标题")
### [5].移动报表演示
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165909_OXfn.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165929_OnoB.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165943_eyQF.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19165955_tJkX.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170011_9CWF.png "在这里输入图片标题")
### [6].移动OA演示
![输入图片说明](https://static.oschina.net/uploads/img/201804/19173027_byRC.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19173036_C5Kv.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170252_9gZf.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170305_ud5Y.png "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170337_0myK.png "在这里输入图片标题")
### [6].移动APP
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170420_v4qK.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170430_kqK2.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170449_W72k.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170458_qIv2.jpg "在这里输入图片标题")
![输入图片说明](https://static.oschina.net/uploads/img/201804/19170508_q2XJ.jpg "在这里输入图片标题")
代码示例
-----------------------------------
这是一个有多行的文本框
这是一个有多行的文本框
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="easyui-layout" fit="true">
<div region="center" style="padding:1px;">
<t:dategrid name="jeecgDemoList" title="开发DEMO列表" actionUrl="jeecgDemoController.do?datagrid" idField="id" fit="true">
<t:dgCol title="编号" field="id" hidden="false"></t:dgCol>
<t:dgCol title="用户名" field="userName" query="true"></t:dgCol>
<t:dgCol title="电话号码" sortable="false" field="mobilePhone" width="20" query="true"></t:dgCol>
<t:dgCol title="办公电话" field="officePhone"></t:dgCol>
<t:dgCol title="邮箱" field="email"></t:dgCol>
<t:dgCol title="年龄" sortable="true" field="age"></t:dgCol>
<t:dgCol title="工资" field="sex"></t:dgCol>
<t:dgCol title="性别" field="salary"></t:dgCol>
<t:dgCol title="生日" field="birthday" formatter="yyyy/MM/dd"></t:dgCol>
<t:dgCol title="创建日期" field="createTime" formatter="yyyy-MM-dd hh:mm:ss"></t:dgCol>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgFunOpt funname="szqm(id)" title="审核" />
<t:dgDelOpt title="删除" url="jeecgDemoController.do?del&id={id}" />
<t:dgToolBar title="录入" icon="icon-add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit"></t:dgToolBar>
<t:dategrid name="jeecgDemoList" title="开发DEMO列表" actionUrl="jeecgDemoController.do?datagrid" idField="id" fit="true">
<t:dgCol title="编号" field="id" hidden="false"></t:dgCol>
<t:dgCol title="用户名" field="userName" query="true"></t:dgCol>
<t:dgCol title="电话号码" sortable="false" field="mobilePhone" width="20" query="true"></t:dgCol>
<t:dgCol title="办公电话" field="officePhone"></t:dgCol>
<t:dgCol title="邮箱" field="email"></t:dgCol>
<t:dgCol title="年龄" sortable="true" field="age"></t:dgCol>
<t:dgCol title="工资" field="sex"></t:dgCol>
<t:dgCol title="性别" field="salary"></t:dgCol>
<t:dgCol title="生日" field="birthday" formatter="yyyy/MM/dd"></t:dgCol>
<t:dgCol title="创建日期" field="createTime" formatter="yyyy-MM-dd hh:mm:ss"></t:dgCol>
<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
<t:dgFunOpt funname="szqm(id)" title="审核" />
<t:dgDelOpt title="删除" url="jeecgDemoController.do?del&id={id}" />
<t:dgToolBar title="录入" icon="icon-add"></t:dgToolBar>
<t:dgToolBar title="编辑" icon="icon-edit"></t:dgToolBar>
</t:dategrid>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,9 +5,9 @@
1.oracle 导入命令
说明: jeecg脚本导出用户是scott
imp scott/tiger@orcl file=jeecg_3.7.8_oracle11g.dmp
imp scott/tiger@orcl file=jeecg_3.8_oracle11g.dmp
导入其他用户的表
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_3.7.8_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_3.8_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
2. oracle、SqlServer脚步索引会有部分丢失为了系统性能请自行补加索引。
@ -16,6 +16,6 @@
4.老版本数据库增量升级
执行老版本升级SQL脚本
3.7.7升级到3.7.8
docs/老版本增量升级/jeecg_mysql-3.7.7-update-3.7.8.sql
3.7.8升级到3.8
docs/老版本增量升级/jeecg_mysql-3.7.8-update-3.8.sql

@ -1,12 +0,0 @@
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('402881fa64a1ca500164a1d549e40001', NULL, '1', 'Bootstrap树形列表', '5', 'jeecgFormDemoController.do?bootstrapTreeListDemo', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-tree', 'admin', '管理员', 'admin', '2018-07-16 16:17:45', '2018-07-16 14:44:27', '管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f68164caf6520164cb5ecade0006', NULL, '1', '检索下拉框', '100', 'jeecgListDemoController.do?suggest', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', '', 'admin', '管理员', NULL, NULL, '2018-07-24 16:19:04', NULL);
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f68164caf6520164cb5d79670004', NULL, '1', 'plupload上传1', '100', 'jeecgFormDemoController.do?plupload1', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', '', 'admin', '管理员', NULL, NULL, '2018-07-24 16:17:38', NULL);
UPDATE `t_s_function` SET `function_icon_style`='fa-list-ol' WHERE (`ID`='4028f68164caf6520164cb5ecade0006');
UPDATE `t_s_function` SET `function_icon_style`='fa-upload' WHERE (`ID`='4028f68164caf6520164cb5d79670004');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f68164cfec7b0164d07373540002', NULL, '1', 'plupload上传2', '100', 'jeecgFormDemoController.do?plupload2', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-upload', 'admin', '管理员', NULL, NULL, '2018-07-25 15:59:44', NULL);
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028810a64e8d94d0164e9033a580005', NULL, '1', '单据打印', '10', 'jeecgFormDemoController.do?printingDemo', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-print', 'admin', '管理员', 'admin', '2018-07-30 14:30:52', '2018-07-30 10:27:40', '管理员');
UPDATE `t_s_icon` SET `extend` = 'png', `iconclas` = 'deskIcon', `content` = NULL, `name` = 'Online表单开发', `path` = 'plug-in/sliding/icon/Finder.png', `type` = 3 WHERE `ID` = '8a8ab0b246dc81120146dc818102002c';
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('4028810264f4f97d0164f528560a0010', 'please.input.table.content', 'Please Input Table Content', 'en', '2018-08-01 19:03:39', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('4028810264f4f97d0164f527c5dd000e', 'please.input.table.content', '请填写表描述!', 'zh-cn', '2018-08-01 19:03:02', 'admin', '管理员', NULL, NULL, NULL);
UPDATE `cgform_field` SET `id`='ff8080816021b031016021fced19000f', `content`='收货人', `create_by`='admin', `create_date`='2017-12-04 22:45:12', `create_name`='管理员', `dict_field`='receiver_name,receiver_mobile', `dict_table`='user_msg', `dict_text`='realname,account', `field_default`='', `field_href`='', `field_length`='120', `field_name`='receiver_name', `field_valid_type`='', `field_must_input`='N', `is_key`='N', `is_null`='Y', `is_query`='Y', `is_show`='Y', `is_show_list`='Y', `length`='56', `main_field`='', `main_table`='', `old_field_name`='receiver_name', `order_num`='11', `point_length`='0', `query_mode`='single', `show_type`='popup', `type`='string', `update_by`='admin', `update_date`='2018-08-02 20:14:54', `update_name`='管理员', `table_id`='ff8080816021b031016021fced100004', `extend_json`='', `fill_rule_code`='' WHERE (`id`='ff8080816021b031016021fced19000f');
update t_s_muti_lang set lang_context = '3.7.8' where lang_key ='system.version.number';

@ -0,0 +1,19 @@
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('40288102653ced6601653cee431c0001', NULL, 1, '面板拖拽', '37', 'jeecgListDemoController.do?goDraggablePanels', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 0, 'fa-clone', 'admin', '管理员', 'admin', '2018-08-15 18:17:15', '2018-08-15 17:32:52', '管理员');
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('402881026560c0a0016560e2bd800007', 'common.position.name', 'Position Name', 'en', '2018-08-22 17:06:37', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('402881026560c0a0016560e237d50005', 'common.position.name', '职务', 'zh-cn', '2018-08-22 17:06:03', 'admin', '管理员', NULL, NULL, NULL);
update cgform_ftl SET FTL_CONTENT = replace(FTL_CONTENT, 'plug-in/uploadify/jquery.uploadify-3.1.js', 'plug-in/plupload/plupload.full.min.js');
UPDATE `jform_graphreport_head` SET `cgr_sql` = 'select a.userid, count(*) ct, sum(CASE WHEN a.logcontent like \'%\' or a.logcontent like \'%cess\' THEN 1 ELSE 0 END) login_count from t_s_log a where {operatetime} group by a.userid order by ct desc' WHERE `id` = '402881e64ca71152014ca71152480000';
ALTER TABLE `cgform_enhance_java`
ADD COLUMN `event` varchar(10) NOT NULL COMMENT '事件状态(end:结束start:开始)' AFTER `active_status`;
alter table cgform_enhance_java alter column event set default 'end';
update cgform_enhance_java set event = 'end' where event is null;
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657927c401657947f3f90003', 'common.event', 'Event State', 'en', '2018-08-27 10:48:03', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657927c401657947644c0001', 'common.event', '事件状态', 'zh-cn', '2018-08-27 10:47:27', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed01657954835f0007', 'common.end', 'End', 'en', '2018-08-27 11:01:46', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed0165795465070005', 'common.end', '结束', 'zh-cn', '2018-08-27 11:01:39', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed0165795414370003', 'common.begin', 'Begin', 'en', '2018-08-27 11:01:18', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_muti_lang`(`id`, `lang_key`, `lang_context`, `lang_code`, `create_date`, `create_by`, `create_name`, `update_date`, `update_by`, `update_name`) VALUES ('40288102657951ed016579537e400001', 'common.begin', '开始', 'zh-cn', '2018-08-27 11:00:40', 'admin', '管理员', NULL, NULL, NULL);
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f681658063000165806aa21c0001', NULL, '1', 'jxls导出excel', '99', 'jeecgDemoExcelController.do?jxls', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-file-excel-o', 'admin', '管理员', 'admin', '2018-08-28 20:07:29', '2018-08-28 20:03:16', '管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`) VALUES ('4028f68165a8fe350165a90f06d50001', NULL, '1', '下拉多选demo', '100', 'jeecgFormDemoController.do?multiSelect', '4028f6815af3ce54015af3d1ad610001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', '0', 'fa-list-ol', 'admin', '管理员', 'admin', '2018-09-05 17:28:15', '2018-09-05 17:27:38', '管理员');
update t_s_muti_lang set lang_context = '3.8' where lang_key ='system.version.number';

@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jeecgframework</groupId>
<artifactId>jeecg</artifactId>
<version>3.7.8</version>
<version>3.8</version>
<packaging>war</packaging>
<properties>
<!-- 自定义依赖包 -->
<codegenerate.version>3.6.3</codegenerate.version>
<codegenerate.version>3.6.4</codegenerate.version>
<jeecg-common-plugin-ui.version>1.0.0</jeecg-common-plugin-ui.version>
<!-- springmvc -->
@ -70,7 +70,7 @@
<!-- pinyin4j -->
<pinyin4j.version>2.5.1</pinyin4j.version>
<!-- jeasypoi 工具类 -->
<jeasypoi.version>2.1.9</jeasypoi.version>
<jeasypoi.version>2.2.0</jeasypoi.version>
<!-- cxf webservice -->
<cxf.version>3.0.2</cxf.version>
<!-- jacob -->
@ -143,7 +143,7 @@
<artifactId>codegenerate</artifactId>
<version>${codegenerate.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/codegenerate-3.6.3-20180614.jar</systemPath>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/codegenerate-3.6.4-20180823.jar</systemPath>
</dependency>
<!-- jeecg plugin-ui-->
<dependency>
@ -151,7 +151,7 @@
<artifactId>jeecg-common-plugin-ui</artifactId>
<version>${jeecg-common-plugin-ui.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/jeecg-common-plugin-ui-1.0.0-20180613.jar</systemPath>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/jeecg-common-plugin-ui-1.0.0-20180813.jar</systemPath>
</dependency>
<!-- 自定义的依赖包 end -->
@ -444,7 +444,7 @@
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
<scope>system</scope>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/freemarker-null-2.3.19.jar</systemPath>
</dependency>
<!-- jeasypoi 工具类 -->
@ -614,6 +614,14 @@
</dependency>
<!-- Jeecg Plugin end -->
<!-- update-begin-author:taoYan date:20180828 for:jxls导出excel -->
<dependency>
<groupId>net.sf.jxls</groupId>
<artifactId>jxls-core</artifactId>
<version>1.0.6</version>
</dependency>
<!-- update-end-author:taoYan date:20180828 for:jxls导出excel -->
</dependencies>
<organization>

@ -1,10 +1,15 @@
package com.jeecg.demo.controller;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Validator;
@ -15,6 +20,7 @@ import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.JxlsExcelExportUtil;
import org.jeecgframework.core.util.MyBeanUtils;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.StringUtil;
@ -37,10 +43,14 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.jeecg.demo.entity.JeecgDemoExcelEntity;
import com.jeecg.demo.entity.JformOrderCustomerEntity;
import com.jeecg.demo.entity.JformOrderMainEntity;
import com.jeecg.demo.page.JformOrderMainPage;
import com.jeecg.demo.service.JeecgDemoExcelServiceI;
import com.jeecg.demo.util.FreemarkerUtil;
import io.swagger.annotations.Api;
import net.sf.jxls.transformer.XLSTransformer;
/**
* @Title: Controller
@ -324,5 +334,117 @@ public class JeecgDemoExcelController extends BaseController {
e.printStackTrace();
}
}
@RequestMapping("/jxlsExportXls")
public void jxlsExportXls(JeecgDemoExcelEntity jeecgDemoExcel,HttpServletRequest request,HttpServletResponse response) throws IOException{
try {
//查询组织结构表 由集合转化成map
List<Map<String,Object>> departs = this.systemService.findForJdbc("select id,departname from t_s_depart");
Map<String,Object> dptMap = new HashMap<String,Object>();
for (Map<String, Object> map : departs) {
dptMap.put(map.get("id").toString(), map.get("departname"));
}
//获取数据集
List<JeecgDemoExcelEntity> list = this.jeecgDemoExcelService.loadAll(JeecgDemoExcelEntity.class);
//遍历替换值
for (JeecgDemoExcelEntity temp : list) {
String sex = temp.getSex();
if("0".equals(sex)){
sex = "男性";
}else if("1".equals(sex)){
sex = "女性";
}
temp.setSex(sex);
Object depart =dptMap.get(temp.getDepart());
temp.setDepart(depart==null?"":String.valueOf(depart));
}
//JXLS生成workbook
Map<String,Object> beans =new HashMap<String,Object>();
beans.put("datac",list);
XLSTransformer transformer = new XLSTransformer();
String srcFilePath = request.getServletContext().getRealPath("/")+"export/template/jxls.xls";
InputStream is = new BufferedInputStream(new FileInputStream(srcFilePath));
org.apache.poi.ss.usermodel.Workbook workbook = transformer.transformXLS(is, beans);
//设置导出
response.addHeader("Cache-Control","no-cache");
response.setCharacterEncoding("UTF-8");
response.setContentType("application/octet-stream;charset=UTF-8");
String ua = request.getHeader("user-agent");
ua = ua == null ? null : ua.toLowerCase();
String docFileName = "jxls导出excel-demo.xls";
if(ua != null && (ua.indexOf("firefox") > 0 || ua.indexOf("safari")>0)){
try {
docFileName = new String(docFileName.getBytes(),"ISO8859-1");
response.addHeader("Content-Disposition","attachment;filename=" + docFileName);
} catch (Exception e) {
}
}else{
try {
docFileName = URLEncoder.encode(docFileName, "utf-8");
response.addHeader("Content-Disposition","attachment;filename=" + docFileName);
} catch (Exception e) {
}
}
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
} catch (Exception e) {
e.printStackTrace();
}
}
@RequestMapping(params = "jxls")
public ModelAndView jxls(HttpServletRequest req) {
return new ModelAndView("com/jeecg/demo/excel/jxlsOne2manyIndex");
}
@RequestMapping(params = "mainlist")
public ModelAndView mainlist(HttpServletRequest req) {
return new ModelAndView("com/jeecg/demo/excel/jxlsOne2manyMain");
}
@RequestMapping(params = "sublist")
public ModelAndView sublist(HttpServletRequest req) {
return new ModelAndView("com/jeecg/demo/excel/jxlsOne2manySub");
}
@RequestMapping(params = "jxlsExportXlsOne2Many")
public void jxlsExportXlsOne2Many(JformOrderMainEntity jformOrderMain,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid,ModelMap map) {
CriteriaQuery cq = new CriteriaQuery(JformOrderMainEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jformOrderMain);
try{
cq.add();
List<JformOrderMainEntity> list=this.systemService.getListByCriteriaQuery(cq, false);
List<JformOrderMainPage> pageList=new ArrayList<JformOrderMainPage>();
if(list!=null&&list.size()>0){
for(JformOrderMainEntity entity:list){
try{
JformOrderMainPage page=new JformOrderMainPage();
MyBeanUtils.copyBeanNotNull2Bean(entity,page);
Object id0 = entity.getId();
String hql0 = "from JformOrderCustomerEntity where 1 = 1 AND fK_ID = ? ";
List<JformOrderCustomerEntity> jformOrderCustomerEntityList = systemService.findHql(hql0,id0);
for (JformOrderCustomerEntity temp : jformOrderCustomerEntityList) {
String sex = temp.getSex();
if("0".equals(sex)){
sex = "男性";
}else if("1".equals(sex)){
sex = "女性";
}
temp.setSex(sex);
}
page.setJformOrderCustomerList(jformOrderCustomerEntityList);
pageList.add(page);
}catch(Exception e){
logger.info(e.getMessage());
}
}
}
Map<String,Object> beans =new HashMap<String,Object>();
beans.put("datac",pageList);
String repeat = request.getParameter("repeat");
String templateFilePath = request.getServletContext().getRealPath("/")+"export/template/jxlsone2many-"+repeat+".xls";
String exportFileName = "jxls导出excel-demo(一对多).xls";
JxlsExcelExportUtil.export(beans,exportFileName,templateFilePath, request, response);
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
}
}

@ -1012,4 +1012,14 @@ public class JeecgFormDemoController extends BaseController {
return new ModelAndView("com/jeecg/demo/printingDemo");
}
/**
* DEMO
* @author taoYan
* @since 201895
*/
@RequestMapping(params = "multiSelect")
public ModelAndView multiSelect() {
return new ModelAndView("com/jeecg/demo/select_multi");
}
}

@ -1411,12 +1411,21 @@ public class JeecgListDemoController extends BaseController {
@RequestMapping(value = "loadSuggestData")
@ResponseBody
public Object loadSuggestData(String keyword,HttpServletRequest request) {
String sql = "select a.username,a.realname,IFNULL(c.departname,'火星人') as depart from t_s_base_user a left join t_s_user_org b on b.user_id = a.ID left join t_s_depart c on c.id = b.org_id "
String sql = "select a.username,a.realname,c.departname as depart from t_s_base_user a left join t_s_user_org b on b.user_id = a.ID left join t_s_depart c on c.id = b.org_id "
+ "";//TODO keyword 没用到
JSONObject object = new JSONObject();
object.put("message", "");
try {
List<Map<String,Object>> data = this.systemService.findForJdbc(sql);
for (Map<String, Object> map : data) {
for (String key : map.keySet()) {
if(null == map.get(key)){
map.put(key,"");
}
}
}
net.sf.json.JSONArray array = net.sf.json.JSONArray.fromObject(data);
object.put("value", array);
object.put("code", 200);
@ -1427,4 +1436,13 @@ public class JeecgListDemoController extends BaseController {
return object;
}
/**
* DropDownDatagrid
* @return
*/
@RequestMapping(params = "goDraggablePanels")
public ModelAndView goDraggablePanels(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/draggablePanels");
}
}

@ -4,6 +4,7 @@ import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -66,7 +67,11 @@ public class JeecgDemoServiceImpl extends CommonServiceImpl implements JeecgDemo
ps.setString(1, id);
ps.setString(2, name);
ps.setInt(3, age);
ps.setString(4, DateUtils.date2Str(new SimpleDateFormat("yyyy-MM-dd HH:mm")));
// ps.setString(4, DateUtils.date2Str(new SimpleDateFormat("yyyy-MM-dd HH:mm")));
java.sql.Date date = new java.sql.Date(new Date().getTime());
ps.setDate(4, date);
}
public int getBatchSize()
{

@ -39,7 +39,7 @@ public class FreemarkerUtil {
if (ftl == null) {
synchronized (LOCK) {
try {
ftl = new FreemarkerUtil(request.getServletContext().getRealPath("/")+"export/template");
ftl = new FreemarkerUtil(request.getSession().getServletContext().getRealPath("/")+"export/template");
} catch (IOException e) {
e.printStackTrace();
}

@ -40,6 +40,7 @@ import java.util.*;
* @author
*
*/
@SuppressWarnings("unchecked")
@Repository
public class CommonDao extends GenericBaseCommonDao implements ICommonDao, IGenericBaseCommonDao {

@ -135,4 +135,10 @@ public final class Globals {
BUTTON_AUTHORITY_CHECK = true;
}
}
/**
* rest list
*/
public static Integer MAX_PAGESIZE = 2000; //条数
}

@ -11,6 +11,8 @@ import org.jeecgframework.core.util.oConvertUtils;
*/
public enum StoreUploadFilePathEnum {
PHOTOSUCAI("photosucai", "upload"+File.separator+"img"+File.separator+"photosucai"),
/**online文件上传位置*/
ONlINE("online","upload"+File.separator+"online"),
DEFAULT("default", "upload"+File.separator+"files");
private String name;

@ -19,7 +19,8 @@ public enum SysThemesEnum {
ACE_LE_STYLE("acele","main/ace_main","metrole", "ACE2风格"),
DIY("diy","main/diy","default","diy风格"),
HPLUS("hplus","main/hplus_main","metrole","H+风格"),
FINEUI_STYLE("fineui","main/fineui_main","metrole", "fineUI风格");
FINEUI_STYLE("fineui","main/fineui_main","metrole", "fineUI风格"),
ADMINLTE_STYLE("adminlte","main/adminlte_main","metrole","AdminLTE风格");
/**
*

@ -76,6 +76,9 @@ public class AuthInterceptor implements HandlerInterceptor {
//通过转换获取用户的请求URL地址
String requestPath = ResourceUtil.getJgAuthRequsetPath(request);
requestPath = filterUrl(requestPath);
//API接口不做登陆验证
if (requestPath.length()>3&&"api/".equals(requestPath.substring(0,4))) {
return true;
@ -106,7 +109,6 @@ public class AuthInterceptor implements HandlerInterceptor {
}
logger.debug("-----authInterceptor----requestPath------"+requestPath);
//步骤三: 判断请求URL是否有菜单访问权限
if(!systemService.loginUserIsHasMenuAuth(requestPath,functionId,loginUserId,orgId)){
Boolean isAjax=isAjax(request);
@ -267,4 +269,20 @@ public class AuthInterceptor implements HandlerInterceptor {
public void setExcludeContainUrls(List<String> excludeContainUrls) {
this.excludeContainUrls = excludeContainUrls;
}
private String filterUrl(String requestPath){
String url = "";
if(oConvertUtils.isNotEmpty(requestPath)){
url = requestPath.replace("\\", "/");
url = requestPath.replace("//", "/");
if(url.indexOf("//")>=0){
url = filterUrl(url);
}
if(url.startsWith("/")){
url=url.substring(1);
}
}
return url;
}
}

@ -137,17 +137,18 @@ public class DynamicDBUtil {
list = findList(dbKey, sql, param);
if(ListUtils.isNullOrEmpty(list))
{
logger.error("Except one, but not find actually");
return null;
}
if(list.size() > 1)
{
logger.error("Except one, but more than one actually");
return null;
}
return list.get(0);
}
@ -161,12 +162,16 @@ public class DynamicDBUtil {
public static Object findOneByHash(final String dbKey, String sql, HashMap<String, Object> data){
List<Map<String, Object>> list;
list = findListByHash(dbKey, sql, data);
if(ListUtils.isNullOrEmpty(list)){
logger.error("Except one, but not find actually");
return null;
}
if(list.size() > 1){
logger.error("Except one, but more than one actually");
return null;
}
return list.get(0);
}

@ -0,0 +1,52 @@
package org.jeecgframework.core.util;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import net.sf.jxls.exception.ParsePropertyException;
import net.sf.jxls.transformer.XLSTransformer;
public class JxlsExcelExportUtil {
public static void export(Map<String,Object> beans,String exportFileName,String templateFilePath, HttpServletRequest request,HttpServletResponse response) throws ParsePropertyException, InvalidFormatException, IOException{
XLSTransformer transformer = new XLSTransformer();
InputStream is = new BufferedInputStream(new FileInputStream(templateFilePath));
org.apache.poi.ss.usermodel.Workbook workbook = transformer.transformXLS(is, beans);
//设置导出
response.addHeader("Cache-Control","no-cache");
response.setCharacterEncoding("UTF-8");
response.setContentType("application/octet-stream;charset=UTF-8");
String ua = request.getHeader("user-agent");
ua = ua == null ? null : ua.toLowerCase();
if(ua != null && (ua.indexOf("firefox") > 0 || ua.indexOf("safari")>0)){
try {
exportFileName = new String(exportFileName.getBytes(),"ISO8859-1");
response.addHeader("Content-Disposition","attachment;filename=" + exportFileName);
} catch (Exception e) {
}
}else{
try {
exportFileName = URLEncoder.encode(exportFileName, "utf-8");
response.addHeader("Content-Disposition","attachment;filename=" + exportFileName);
} catch (Exception e) {
}
}
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
}
}

@ -860,7 +860,9 @@ public class ListtoMenu {
menuString.append("<li>");
if(function.getFunctionIconStyle()!=null&&!function.getFunctionIconStyle().trim().equals("")){
menuString.append("<a href=\"#\" class=\"dropdown-toggle\" ><i class=\""+function.getFunctionIconStyle()+"\"></i>");
menuString.append("<a href=\"#\" class=\"dropdown-toggle\" ><i class=\"fa "+function.getFunctionIconStyle()+"\"></i>");
}else{
menuString.append("<a href=\"#\" class=\"dropdown-toggle\" ><i class=\""+SysACEIconEnum.toEnum(function.getTSIcon().getIconClas()).getThemes()+"\"></i>");
}
@ -1118,4 +1120,26 @@ public class ListtoMenu {
return menuString.toString();
}
/**
* AdminLTE
* @param map the map of Map<Integer, List<TSFunction>>
* @param style AdminLTE
* @return
*/
public static String getAdminlteTree(Map<Integer, List<TSFunction>> map) {
if(map==null||map.size()==0||!map.containsKey(0)){return "不具有任何权限,\n请找管理员分配权限";}
StringBuffer menuString = new StringBuffer();
List<TSFunction> list = map.get(0);
for (TSFunction function : list) {
if(!function.hasSubFunction(map)){
menuString.append(getChildOfTree(function,1,map));
}else{
menuString.append("<li fit=\"false\" border=\"false\">");
menuString.append("<a onclick=\"onSelectTree('"+function.getId()+"')\">"+ getMutiLang(function.getFunctionName()) +"</a>");
menuString.append("</li>");
}
}
return menuString.toString();
}
}

@ -0,0 +1,36 @@
package org.jeecgframework.core.util;
public class UrlCheckUtil {
/**
*url
*
* @return
*/
public static Boolean checkUrl(String url,String specifyCharacter) {
url=url.replace("\\", "/");
Boolean flag = false;
if(url.contains(specifyCharacter)){
flag=true;
}
return flag;
}
/**
* url/.//../,true
*/
public static Boolean checkUrl(String url) {
return checkUrl(url,"/./") || checkUrl(url,"/../");
}
public static void main(String[] args) {
try {
Boolean checkUrl = checkUrl("\\user\\.\\aa.jpg","/./");
System.out.println(checkUrl);
if(checkUrl){
throw new Exception("文件地址不合法");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -235,8 +235,13 @@ public class BaseTag extends JeecgTag {
sb.append("<script type=\"text/javascript\" charset=\"utf-8\" src=\""+basePath+"/plug-in/ueditor/ueditor.all.min.js\"></script>");
}
if (oConvertUtils.isIn("uploadify", types)) {
/*sb.append("<link rel=\"stylesheet\" href=\""+basePath+"/plug-in/uploadify/css/uploadify.css\" type=\"text/css\"></link>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");*/
sb.append("<link rel=\"stylesheet\" href=\""+basePath+"/plug-in/uploadify/css/uploadify.css\" type=\"text/css\"></link>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/plupload/plupload.full.min.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/tools/Map.js\"></script>");
}
types = null;

@ -15,6 +15,7 @@ import javax.servlet.jsp.tagext.TagSupport;
* @version 1.0
*/
public class ComboTreeTag extends TagSupport {
private static final long serialVersionUID = 1L;
protected String id;// ID
protected String url;// 远程数据URL
protected String name;// 控件名称

@ -1565,7 +1565,8 @@ public class DataGridTag extends TagSupport {
sb.append("columns:[[");
this.getField(sb);
sb.append("]],");
sb.append("onLoadSuccess:function(data){$(\"#"+name+"\")."+grid+"(\"clearSelections\");");
sb.append("onLoadSuccess:function(data){$(\"#"+name+"\")."+grid+"(\"clearChecked\");$(\"#"+name+"\")."+grid+"(\"clearSelections\");");
//sb.append(" $(this).datagrid(\"fixRownumber\");");
@ -4122,7 +4123,7 @@ appendLine(sb," }}\">关系</th>");
}else{
appendLine(sb,"var toolbar = [{");
appendLine(sb," text:'',");
appendLine(sb," iconCls:'"+btnCls+"',");
appendLine(sb," iconCls:'icon-add',");
appendLine(sb," handler:function(){append();}");
appendLine(sb,"},{");
appendLine(sb," text:'',");

@ -129,6 +129,9 @@ public class MenuTag extends JeecgTag {
}else if (style.equals("fineui")){
sb.append(ListtoMenu.getFineuiMultistageTree(menuFun));
}
if(style.equals("adminlte")) {
sb.append(ListtoMenu.getAdminlteTree(menuFun));
}
this.putTagCache(sb);

@ -18,11 +18,9 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.jeecgframework.core.common.hibernate.qbc.PageList;
import org.jeecgframework.core.common.model.json.ComboBox;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.core.util.ContextHolderUtils;
import org.jeecgframework.core.util.ReflectHelper;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.tag.core.util.GzipUtilities;
import org.jeecgframework.tag.vo.datatable.DataTableReturn;
import org.jeecgframework.tag.vo.easyui.Autocomplete;
import org.jeecgframework.web.system.pojo.base.TSRole;
@ -486,22 +484,10 @@ public class TagUtil {
response.setHeader("Cache-Control", "no-store");
String jsonStr = TagUtil.getJson(dg);
try {
HttpServletRequest request = ContextHolderUtils.getRequest();
if (GzipUtilities.isGzipSupported(request) && !GzipUtilities.isGzipDisabled(request)) {
log.debug("-------datagrid----json-----开启Gzip压缩-------------");
response.setHeader("Content-Encoding", "gzip");
OutputStream pw = GzipUtilities.getGzipWriter(response);
pw.write(jsonStr.getBytes("UTF-8"));
pw.flush();
pw.close();
} else {
PrintWriter pw = response.getWriter();
pw.write(jsonStr.toString());
pw.flush();
pw.close();
}
PrintWriter pw = response.getWriter();
pw.write(jsonStr.toString());
pw.flush();
pw.close();
} catch (IOException e) {
e.printStackTrace();
}finally{
@ -528,22 +514,10 @@ public class TagUtil {
JSONObject object = JSONObject.parseObject(jsonStr);
JSONArray rows = object.getJSONArray("rows");
try {
HttpServletRequest request = ContextHolderUtils.getRequest();
if (GzipUtilities.isGzipSupported(request) && !GzipUtilities.isGzipDisabled(request)) {
log.debug("-------datagrid----json-----开启Gzip压缩-------------");
response.setHeader("Content-Encoding", "gzip");
OutputStream pw = GzipUtilities.getGzipWriter(response);
pw.write(rows.toString().getBytes("UTF-8"));
pw.flush();
pw.close();
} else {
PrintWriter pw = response.getWriter();
pw.write(rows.toString());
pw.flush();
pw.close();
}
PrintWriter pw = response.getWriter();
pw.write(rows.toString());
pw.flush();
pw.close();
} catch (IOException e) {
e.printStackTrace();
}finally{
@ -577,23 +551,11 @@ public class TagUtil {
}
try {
HttpServletRequest request = ContextHolderUtils.getRequest();
if (GzipUtilities.isGzipSupported(request) && !GzipUtilities.isGzipDisabled(request)) {
log.debug("-------datagrid----json-----开启Gzip压缩-------------");
response.setHeader("Content-Encoding", "gzip");
OutputStream pw = GzipUtilities.getGzipWriter(response);
pw.write(object.toString().getBytes("UTF-8"));
pw.flush();
pw.close();
} else {
PrintWriter pw = response.getWriter();
pw = response.getWriter();
pw.write(object.toString());
pw.flush();
pw.close();
}
PrintWriter pw = response.getWriter();
pw = response.getWriter();
pw.write(object.toString());
pw.flush();
pw.close();
} catch (IOException e) {
e.printStackTrace();
}finally{

@ -0,0 +1,402 @@
package org.jeecgframework.tag.core.easyui;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import org.jeecgframework.core.online.util.FreemarkerHelper;
import org.jeecgframework.core.util.ContextHolderUtils;
import org.jeecgframework.core.util.SysThemesUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.tag.core.JeecgTag;
/**
* pluploaduploadify<br>
* uploadify <br>
* 1easyui.tld uploadtag-class<br>
* 2baseuploadify<br>
* @author taoYan
* @since 2018816
*/
public class UploadPlTag extends JeecgTag {
private static final long serialVersionUID = -9022815118906773203L;
/**通用文件后缀*/
private static final String ALL_COMMON_FILE = "doc,docx,txt,ppt,xls,xlsx,html,htm";
/**图片文件后缀*/
private static final String ALL_IMG_FILE = "jpg,jpeg,png,gif,bmp,ico,tif";
protected String id;// ID
protected String uploader;//url
protected String name;//控件名称
protected String formData;//参数名称
protected String extend="";//上传文件的扩展名
protected String buttonText="浏览";//按钮文本
protected boolean multi=true;//是否多文件
protected String queueID="filediv";//文件容器ID
protected boolean dialog=true;//是否是弹出窗口模式
protected String callback;
protected boolean auto=false;//是否自动上传
protected String onUploadSuccess;//上传成功处理函数
protected boolean view=false;//生成查看删除链接
protected String formId;//参数名称
private boolean outhtml = true;
private String onUploadStart;//上传开始处理函数
private String height="18";//自定义上传按钮高度
private String width="80";//自定义上传按钮宽度
private String fileSizeLimit = "15MB";//上传文件大小设置
private String onFileAdded;//文件添加时触发方法
private String onFilesRemoved;//文件移除时触发方法
@SuppressWarnings("unchecked")
public int doStartTag() throws JspTagException {
List<String> idList = (List<String>) pageContext.getRequest().getAttribute("nameList");
if(idList == null || idList.isEmpty()){
idList = new ArrayList<String>();
}
idList.add(id);
pageContext.getRequest().setAttribute("nameList", idList);
return EVAL_PAGE;
}
public int doEndTag() throws JspTagException {
JspWriter out = null;
try {
out = this.pageContext.getOut();
out.print(end().toString());
out.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
out.clear();
out.close();
} catch (Exception e2) {
}
}
return EVAL_PAGE;
}
public StringBuffer end() {
StringBuffer sb = this.getTagCache();
if(sb != null){
return sb;
}
sb = new StringBuffer();
FreemarkerHelper free = new FreemarkerHelper();
Map<String, Object> mainConfig = new HashMap<String, Object>();
mainConfig.put("obj",this);
mainConfig.put("style","uploadify");
List<String> idList = (List<String>) pageContext.getRequest().getAttribute("nameList");
mainConfig.put("idList",idList);
String superQuery = free.parseTemplate("/org/jeecgframework/tag/ftl/plupload.ftl", mainConfig);
String format = "\r\n"; //调试 格式化
sb.append(superQuery).append(format);
return sb;
}
public String getAllowedFilesExt(){
if(oConvertUtils.isEmpty(extend)){
return ALL_COMMON_FILE+","+ALL_IMG_FILE;
}else{
if("pic".equals(extend)){
return ALL_IMG_FILE;
}else if(extend.equals("office")){
return ALL_COMMON_FILE;
}else{
if(extend.indexOf("*.")>=0){
extend = extend.replace("*.", "");
}
if(extend.indexOf(";")>=0){
extend = extend.replace(";", ",");
}
return extend;
}
}
}
/**
* ,jsessionidbug jueyue --- 20130916
* @return
*/
public String getUploader() {
return uploader+"&sessionId="+pageContext.getSession().getId()+"',";
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the formData
*/
public String getFormData() {
return formData;
}
/**
* @param formData the formData to set
*/
public void setFormData(String formData) {
this.formData = formData;
}
/**
* @return the extend
*/
public String getExtend() {
return extend;
}
/**
* @param extend the extend to set
*/
public void setExtend(String extend) {
this.extend = extend;
}
/**
* @return the buttonText
*/
public String getButtonText() {
return buttonText;
}
/**
* @param buttonText the buttonText to set
*/
public void setButtonText(String buttonText) {
this.buttonText = buttonText;
}
/**
* @return the multi
*/
public boolean isMulti() {
return multi;
}
/**
* @param multi the multi to set
*/
public void setMulti(boolean multi) {
this.multi = multi;
}
/**
* @return the queueID
*/
public String getQueueID() {
return queueID;
}
/**
* @param queueID the queueID to set
*/
public void setQueueID(String queueID) {
this.queueID = queueID;
}
/**
* @return the dialog
*/
public boolean isDialog() {
return dialog;
}
/**
* @param dialog the dialog to set
*/
public void setDialog(boolean dialog) {
this.dialog = dialog;
}
/**
* @return the callback
*/
public String getCallback() {
return callback;
}
/**
* @param callback the callback to set
*/
public void setCallback(String callback) {
this.callback = callback;
}
/**
* @return the auto
*/
public boolean isAuto() {
return auto;
}
/**
* @param auto the auto to set
*/
public void setAuto(boolean auto) {
this.auto = auto;
}
/**
* @return the onUploadSuccess
*/
public String getOnUploadSuccess() {
return onUploadSuccess;
}
/**
* @param onUploadSuccess the onUploadSuccess to set
*/
public void setOnUploadSuccess(String onUploadSuccess) {
this.onUploadSuccess = onUploadSuccess;
}
/**
* @return the view
*/
public boolean isView() {
return view;
}
/**
* @param view the view to set
*/
public void setView(boolean view) {
this.view = view;
}
/**
* @return the formId
*/
public String getFormId() {
return formId;
}
/**
* @param formId the formId to set
*/
public void setFormId(String formId) {
this.formId = formId;
}
/**
* @return the outhtml
*/
public boolean isOuthtml() {
return outhtml;
}
/**
* @param outhtml the outhtml to set
*/
public void setOuthtml(boolean outhtml) {
this.outhtml = outhtml;
}
/**
* @return the onUploadStart
*/
public String getOnUploadStart() {
return onUploadStart;
}
/**
* @param onUploadStart the onUploadStart to set
*/
public void setOnUploadStart(String onUploadStart) {
this.onUploadStart = onUploadStart;
}
/**
* @return the height
*/
public String getHeight() {
return height;
}
/**
* @param height the height to set
*/
public void setHeight(String height) {
this.height = height;
}
/**
* @return the width
*/
public String getWidth() {
return width;
}
/**
* @param width the width to set
*/
public void setWidth(String width) {
this.width = width;
}
/**
* @return the fileSizeLimit
*/
public String getFileSizeLimit() {
return fileSizeLimit;
}
/**
* @param fileSizeLimit the fileSizeLimit to set
*/
public void setFileSizeLimit(String fileSizeLimit) {
this.fileSizeLimit = fileSizeLimit;
}
/**
* @param uploader the uploader to set
*/
public void setUploader(String uploader) {
this.uploader = uploader;
}
/**
* @return the onFileAdded
*/
public String getOnFileAdded() {
return onFileAdded;
}
/**
* @param onFileAdded the onFileAdded to set
*/
public void setOnFileAdded(String onFileAdded) {
this.onFileAdded = onFileAdded;
}
/**
* @return the onFilesRemoved
*/
public String getOnFilesRemoved() {
return onFilesRemoved;
}
/**
* @param onFilesRemoved the onFilesRemoved to set
*/
public void setOnFilesRemoved(String onFilesRemoved) {
this.onFilesRemoved = onFilesRemoved;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("UploadTag [id=").append(id).append(", uploader=")
.append(uploader).append(", name=").append(name)
.append(", formData=").append(formData).append(", extend=")
.append(extend).append(", buttonText=").append(buttonText)
.append(", multi=").append(multi).append(", queueID=")
.append(queueID).append(", dialog=").append(dialog)
.append(", callback=").append(callback).append(", auto=")
.append(auto).append(", onUploadSuccess=")
.append(onUploadSuccess).append(", view=").append(view)
.append(", formId=").append(formId).append(", outhtml=")
.append(outhtml).append(", fileSizeLimit=").append(fileSizeLimit)
.append(",sysTheme=").append(SysThemesUtil.getSysTheme(ContextHolderUtils.getRequest()).getStyle())
.append(",brower_type=").append(ContextHolderUtils.getSession().getAttribute("brower_type"))
.append(",height=").append(height)
.append(",width=").append(width)
.append("]");
return builder.toString();
}
}

@ -0,0 +1,449 @@
package org.jeecgframework.tag.core.easyui;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
import org.jeecgframework.core.online.util.FreemarkerHelper;
import org.jeecgframework.core.util.FileUtils;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.oConvertUtils;
public class WebUploaderPlTag extends TagSupport {
private static final long serialVersionUID = -2057061070457899124L;
/**通用文件后缀*/
private static final String ALL_COMMON_FILE = "doc,docx,txt,ppt,xls,xlsx,html,htm";
/**图片文件后缀*/
private static final String ALL_IMG_FILE = "jpg,jpeg,png,gif,bmp,ico,tif";
private String name;//①文件路径 input默认name、②action返回的文件路径的name
private boolean auto=false;//是否自动上传上传按钮风格
private String url = "systemController/filedeal.do";//文件上传处理url
private int fileNumLimit =3;//fileNumLimit 最大文件数 TODO
private int fileSingleSizeLimit=5242880;//fileSingleSizeLimit单个文件最大5M[1024*1024*5]
private String fileVal="file";//fileVal设置文件上传域的name,默认file
private String buttonStyle;//自定义CSS样式 【 废弃】
private int size;//文件总大小【 废弃】
private boolean duplicate=false;//去重, 根据文件名字、文件大小和最后修改时间来生成hash Key.【 废弃】
private String showImgDiv;//显示图片的div,如果不给会默认在按钮下方添加div其id为'tempdiv_'+name【 废弃】
private String showAndDownUrl=ResourceUtil.getConfigByName("showAndDownUrl");//预览图片请求的url&文件下载url
private String pathValues;//默认值
private String type="file";
private String buttonText = "选择文件";//控件按钮显示文本
private String extensions;//允许的文件后缀,不带点,多个用逗号分割
private String extendParams;//类似css写法 这是文件上传时候需要传递的参数
private String datatype;//只要该属性有值,均视之为不为空
private String nullMsg;//空的时候的提示信息,默认会根据当前控件的类型提示,文件类则提示“请选择文件”;图片类则提示“请选择图片”.
private String readOnly="false";//保留字段
private String bizType;//业务类型,根据该类型确定上传路径
private boolean displayTxt=true;//是否显示上传列表[默认显示]true显示false隐藏
private boolean outJs = false;//是否在外部引入了js和css
private boolean swfTransform = false;//是否转换成swf文件文件预览使用
private String viewModel = "list";//TODO 未用到 支持list(文件列表)/thumb(缩略图模式)
public int doStartTag() throws JspTagException {
return EVAL_PAGE;
}
public int doEndTag() throws JspTagException {
JspWriter out = null;
StringBuffer sb = new StringBuffer();
try {
out = this.pageContext.getOut();
end(sb);
out.print(sb.toString());
out.flush();
} catch (IOException e) {
e.printStackTrace();
}finally{
if(out!=null){
try {
out.clearBuffer();
sb.setLength(0);
} catch (Exception e) {
e.printStackTrace();
}
}
}
return EVAL_PAGE;
}
public void end(StringBuffer sb) {
FreemarkerHelper free = new FreemarkerHelper();
Map<String, Object> mainConfig = new HashMap<String, Object>();
mainConfig.put("obj",this);
String superQuery = free.parseTemplate("/org/jeecgframework/tag/ftl/plupload.ftl", mainConfig);
String format = "\r\n"; //调试 格式化
sb.append(superQuery).append(format);
}
/**
* @param size
* @author taoYan
* @since 2018810
*/
private String random(int size){
String sources = "QAZWSXEDCRFVTGBYHNUJMIKOLP0123456789qwertyuiopasdfghjklzxcvbnm";
Random rand = new Random();
StringBuffer flag = new StringBuffer();
for (int j = 0; j < size; j++){
flag.append(sources.charAt(rand.nextInt(sources.length())) + "");
}
return flag.toString();
}
public String randomSix(){
return random(6);
}
/**
*
* @author taoYan
* @since 2018810
*/
public String getFilename(String path){
if(oConvertUtils.isEmpty(path)){
return null;
}
int index1 = path.lastIndexOf("/");
int index2 = path.lastIndexOf("_");
int index3 = path.lastIndexOf(".");
if(index1==-1 ||index2==-1||index3==-1){
return null;
}
String name = path.substring(index1+1,index2);
String ext = path.substring(index3);
return name+ext;
}
/**
* 1 -1
* @author taoYan
* @since 2018810
*/
public Integer supportView(String path){
Integer res = -1;
int index = path.lastIndexOf(".");
if(oConvertUtils.isEmpty(path)||index==-1){
return res;
}
String ext = path.substring(index+1);
if(FileUtils.isPicture(ext)){
res = 1;
}else if(this.swfTransform){
res = 1;
}
return res;
}
/**
*
* @author taoYan
* @since 2018810
*/
public String getAllowedFilesExt(){
if(oConvertUtils.isEmpty(extensions)){
return ALL_COMMON_FILE;
}
return extensions;
}
public String getAllowedIMG(){
if(oConvertUtils.isEmpty(extensions)){
return ALL_IMG_FILE;
}
return extensions;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the auto
*/
public boolean isAuto() {
return auto;
}
/**
* @param auto the auto to set
*/
public void setAuto(boolean auto) {
this.auto = auto;
}
/**
* @return the buttonStyle
*/
public String getButtonStyle() {
return buttonStyle;
}
/**
* @param buttonStyle the buttonStyle to set
*/
public void setButtonStyle(String buttonStyle) {
this.buttonStyle = buttonStyle;
}
/**
* @return the url
*/
public String getUrl() {
return url;
}
/**
* @param url the url to set
*/
public void setUrl(String url) {
this.url = url;
}
/**
* @return the fileNumLimit
*/
public int getFileNumLimit() {
return fileNumLimit;
}
/**
* @param fileNumLimit the fileNumLimit to set
*/
public void setFileNumLimit(int fileNumLimit) {
this.fileNumLimit = fileNumLimit;
}
/**
* @return the fileSingleSizeLimit
*/
public int getFileSingleSizeLimit() {
return fileSingleSizeLimit;
}
/**
* @param fileSingleSizeLimit the fileSingleSizeLimit to set
*/
public void setFileSingleSizeLimit(int fileSingleSizeLimit) {
this.fileSingleSizeLimit = fileSingleSizeLimit;
}
/**
* @return the size
*/
public int getSize() {
return size;
}
/**
* @param size the size to set
*/
public void setSize(int size) {
this.size = size;
}
/**
* @return the fileVal
*/
public String getFileVal() {
return fileVal;
}
/**
* @param fileVal the fileVal to set
*/
public void setFileVal(String fileVal) {
this.fileVal = fileVal;
}
/**
* @return the duplicate
*/
public boolean isDuplicate() {
return duplicate;
}
/**
* @param duplicate the duplicate to set
*/
public void setDuplicate(boolean duplicate) {
this.duplicate = duplicate;
}
/**
* @return the showImgDiv
*/
public String getShowImgDiv() {
return showImgDiv;
}
/**
* @param showImgDiv the showImgDiv to set
*/
public void setShowImgDiv(String showImgDiv) {
this.showImgDiv = showImgDiv;
}
/**
* @return the showAndDownUrl
*/
public String getShowAndDownUrl() {
return showAndDownUrl;
}
/**
* @param showAndDownUrl the showAndDownUrl to set
*/
public void setShowAndDownUrl(String showAndDownUrl) {
this.showAndDownUrl = showAndDownUrl;
}
/**
* @return the pathValues
*/
public String getPathValues() {
return pathValues;
}
/**
* @param pathValues the pathValues to set
*/
public void setPathValues(String pathValues) {
this.pathValues = pathValues;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the buttonText
*/
public String getButtonText() {
return buttonText;
}
/**
* @param buttonText the buttonText to set
*/
public void setButtonText(String buttonText) {
this.buttonText = buttonText;
}
/**
* @return the extensions
*/
public String getExtensions() {
return extensions;
}
/**
* @param extensions the extensions to set
*/
public void setExtensions(String extensions) {
this.extensions = extensions;
}
/**
* @return the extendParams
*/
public String getExtendParams() {
return extendParams;
}
/**
* @param extendParams the extendParams to set
*/
public void setExtendParams(String extendParams) {
this.extendParams = extendParams;
}
/**
* @return the datatype
*/
public String getDatatype() {
return datatype;
}
/**
* @param datatype the datatype to set
*/
public void setDatatype(String datatype) {
this.datatype = datatype;
}
/**
* @return the nullMsg
*/
public String getNullMsg() {
return nullMsg;
}
/**
* @param nullMsg the nullMsg to set
*/
public void setNullMsg(String nullMsg) {
this.nullMsg = nullMsg;
}
/**
* @return the readOnly
*/
public String getReadOnly() {
return readOnly;
}
/**
* @param readOnly the readOnly to set
*/
public void setReadOnly(String readOnly) {
this.readOnly = readOnly;
}
/**
* @return the bizType
*/
public String getBizType() {
return bizType;
}
/**
* @param bizType the bizType to set
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* @return the displayTxt
*/
public boolean isDisplayTxt() {
return displayTxt;
}
/**
* @param displayTxt the displayTxt to set
*/
public void setDisplayTxt(boolean displayTxt) {
this.displayTxt = displayTxt;
}
/**
* @return the outJs
*/
public boolean isOutJs() {
return outJs;
}
/**
* @param outJs the outJs to set
*/
public void setOutJs(boolean outJs) {
this.outJs = outJs;
}
/**
* @return the swfTransform
*/
public boolean isSwfTransform() {
return swfTransform;
}
/**
* @param swfTransform the swfTransform to set
*/
public void setSwfTransform(boolean swfTransform) {
this.swfTransform = swfTransform;
}
/**
* @return the viewModel
*/
public String getViewModel() {
return viewModel;
}
/**
* @param viewModel the viewModel to set
*/
public void setViewModel(String viewModel) {
this.viewModel = viewModel;
}
}

@ -1,18 +1,17 @@
package org.jeecgframework.tag.core.easyui;
import java.io.IOException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.oConvertUtils;
/**
* WebUploader
* WebUploader
* @author scott
*
*/
public class WebUploaderTag extends TagSupport {
private static final long serialVersionUID = 1L;

File diff suppressed because it is too large Load Diff

@ -38,7 +38,9 @@ public class FormHtmlUtil {
}else if(cgFormFieldEntity.getShowType().equals("datetime")){
html=getDatetimeFormHtml(cgFormFieldEntity);
}else if(cgFormFieldEntity.getShowType().equals("file")){
html=getFileFormHtml(cgFormFieldEntity);
html=getFilePluploadFormHtml(cgFormFieldEntity);
}else if(cgFormFieldEntity.getShowType().equals("textarea")){
html=getTextAreaFormHtml(cgFormFieldEntity);
}else if(cgFormFieldEntity.getShowType().equals("popup")){
@ -394,6 +396,7 @@ public class FormHtmlUtil {
/**
*filehtml
*/
@Deprecated
private static String getFileFormHtml(CgFormFieldEntity cgFormFieldEntity){
StringBuilder html = new StringBuilder("");
@ -443,6 +446,55 @@ public class FormHtmlUtil {
}
/**
*filehtml
*/
private static String getFilePluploadFormHtml(CgFormFieldEntity cgFormFieldEntity){
StringBuilder html = new StringBuilder("");
html.append("<div class='uploadify'>");
html.append("<table>");
html.append("<#list filesList as fileB>");
html.append("<tr style=\"height:34px;\">");
html.append("<td>\\${fileB['title']}</td>");
html.append("<td><a href=\"commonController.do?viewFile&fileid=\\${fileB['fileKey']}&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity\" title=\"下载\">下载</a></td>");
html.append("<td><a href=\"javascript:void(0);\" onclick=\"openwindow('预览','commonController.do?openViewFile&fileid=\\${fileB['fileKey']}&subclassname=org.jeecgframework.web.cgform.entity.upload.CgUploadEntity','fList',700,500)\">预览</a></td>");
html.append("<td><a href=\"javascript:void(0)\" class=\"jeecgDetail\" onclick=\"del('cgUploadController.do?delFile&id=\\${fileB['fileKey']}',this)\">删除</a></td>");
html.append("</tr></#list></table>");
html.append("<div class='plupload-btns'>");
html.append("<div id='"+cgFormFieldEntity.getFieldName()+"Upselector' class='uploadify-button' style='cursor:pointer;height:18px; line-height:18px; width:80px; position: relative; z-index: 1;'>");
html.append("<span class='uploadify-button-text'>添加文件</span></div><input type='button' id = '"+cgFormFieldEntity.getFieldName()+"' style='display:none'/>");
html.append("<div class='form' id='filediv_"+cgFormFieldEntity.getFieldName()+"'> </div></div>");
html.append("<script type=\"text/javascript\">");
html.append("\\$(function(){");
html.append("var serverMsg=\"\";");
html.append("var m = new Map();");
html.append("if(location.href.indexOf('load=detail')!=-1){\\$('.plupload-btns').hide();}");
html.append("var addtrFile = function(file) {var fileName = file.name;if (fileName.length > 20) {fileName = fileName.substring(0, 15) + '...';}var fileSize = Math.ceil(file.size/1024);");
html.append("var html = '<div id=\"'+file.id+'\" class=\"uploadify-queue-item\"><div class=\"cancel\"><a class=\"iqueueDel\" href=\"javascript:void(0)\">X</a></div><span class=\"fileName\" title=\"'+file.name+'\">'+fileName+'('+fileSize+'KB)</span><span class=\"sdata\"></span><div class=\"uploadify-progress\"><div class=\"uploadify-progress-bar\"></div></div></div>';");
html.append("\\$('#filediv_"+cgFormFieldEntity.getFieldName()+"').append(html);}\r\n");
html.append("var uploader = new plupload.Uploader({runtimes: 'html5,flash',");
html.append("browse_button: '"+cgFormFieldEntity.getFieldName()+"Upselector',");
html.append("url: '\\${basePath}/cgUploadController.do?saveFiles&jsessionid='+\\$(\"#sessionUID\").val()+'',");
html.append("flash_swf_url: '\\${basePath}/plug-in/plupload/Moxie.swf',");
html.append("filters: {max_file_size: \"15mb\", mime_types: [{title: \"Common files\", extensions:\"txt,doc,docx,xls,xlsx,ppt,pdf,jpg,jpeg,png,gif\"}],prevent_duplicates:false},");
html.append("multipart_params:{'cgFormName':'"+cgFormFieldEntity.getTable().getTableName()+"',");
html.append("'cgFormField':'"+cgFormFieldEntity.getFieldName()+"'},multi_selection: true,");
html.append("init: {PostInit: function() {\\$.iplupload('"+cgFormFieldEntity.getFieldName()+"',uploader);},");
html.append("FilesAdded: function(up, files) {for(var a = 0;a<files.length;a++){addtrFile(files[a]);}},");
html.append("UploadProgress: function(up, file) {var percent = file.percent;\\$('#' + file.id).find('.uploadify-progress-bar').css({'width': percent + '%'});},");
html.append("BeforeUpload: function(up, file) {var params = up.getOption('multipart_params');var cgFormId=\\$(\"input[name='id']\").val();params['cgFormId'] = cgFormId;up.setOption('multipart_params',params);},");
html.append("FileUploaded: function(up, file, info) {var response = jQuery.parseJSON(info.response);if (response.success) {serverMsg = response.msg;\\$(\"#\"+file.id).find(\".sdata\").text(' - Complete');setTimeout(function(){\\$(\"#\"+file.id).fadeOut(\"slow\");},500);}},");
html.append("UploadComplete: function(up, files) {if(files.length>0){var win = frameElement.api.opener;win.reloadTable();win.tip(serverMsg);frameElement.api.close();}},");
html.append("Error: function(up, err) {if(err.code == plupload.FILE_EXTENSION_ERROR){tip(\"文件类型不识别!\");}else if(plupload.FILE_SIZE_ERROR = err.code){tip(\"文件大小超标!\");}console.log(err);}}");
html.append("});\r\nuploader.init();");
html.append("\\$('#filediv_"+cgFormFieldEntity.getFieldName()+"').on('click','.iqueueDel',function(eve){");
html.append("var itemObj = \\$(eve.target).closest('.uploadify-queue-item');uploader.removeFile(uploader.getFile(itemObj.attr('id')));itemObj.find('.sdata').text(' - 已取消');setTimeout(function(){itemObj.fadeOut('slow');},500);});});");
html.append("function upload() {\\$('#").append(cgFormFieldEntity.getFieldName()).append("').uploadify('upload', '\\*');}");
html.append("function cancel() {\\$('#").append(cgFormFieldEntity.getFieldName()).append("').uploadify('cancel', '\\*');}");
html.append("</script>\r\n");
return html.toString();
}
/**
*popuphtml
*/

@ -33,6 +33,7 @@ import org.jeecgframework.web.cgform.common.CgAutoListConstant;
import org.jeecgframework.web.cgform.entity.config.CgFormFieldEntity;
import org.jeecgframework.web.cgform.entity.config.CgFormHeadEntity;
import org.jeecgframework.web.cgform.entity.template.CgformTemplateEntity;
import org.jeecgframework.web.cgform.exception.BusinessException;
import org.jeecgframework.web.cgform.service.autolist.CgTableServiceI;
import org.jeecgframework.web.cgform.service.autolist.ConfigServiceI;
import org.jeecgframework.web.cgform.service.config.CgFormFieldServiceI;
@ -389,18 +390,30 @@ public class CgAutoListController extends BaseController{
public AjaxJson del(String configId,String id,
HttpServletRequest request) {
AjaxJson j = new AjaxJson();
String message = "删除成功";
String tableName = PublicUtil.replaceTableName(configId);
String jversion = cgFormFieldService.getCgFormVersionByTableName(tableName);
String table = (String) configService.queryConfigs(tableName,jversion).get(CgAutoListConstant.TABLENAME);
//String jversion = cgFormFieldService.getCgFormVersionByTableName(configId);
//String table = (String) configService.queryConfigs(configId,jversion).get(CgAutoListConstant.TABLENAME);
try {
String tableName = PublicUtil.replaceTableName(configId);
String jversion = cgFormFieldService.getCgFormVersionByTableName(tableName);
String table = (String) configService.queryConfigs(tableName,jversion).get(CgAutoListConstant.TABLENAME);
//String jversion = cgFormFieldService.getCgFormVersionByTableName(configId);
//String table = (String) configService.queryConfigs(configId,jversion).get(CgAutoListConstant.TABLENAME);
cgTableService.delete(table, id);
log.info("["+IpUtil.getIpAddr(request)+"][online表单数据删除]"+message+"表名:"+configId);
systemService.addLog(message, Globals.Log_Type_DEL,
Globals.Log_Leavel_INFO);
} catch (BusinessException e) {
e.printStackTrace();
message = e.getMessage();
j.setSuccess(false);
}catch (Exception e) {
e.printStackTrace();
message = e.getMessage();
j.setSuccess(false);
}
cgTableService.delete(table, id);
String message = "删除成功";
log.info("["+IpUtil.getIpAddr(request)+"][online表单数据删除]"+message+"表名:"+configId);
systemService.addLog(message, Globals.Log_Type_DEL,
Globals.Log_Leavel_INFO);
j.setMsg(message);
return j;
}

@ -458,7 +458,10 @@ public class CgFormBuildController extends BaseController {
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/tools/easyuiextend.js\"></script>");
sb.append(SysThemesUtil.getEasyUiMainTheme(sysThemesEnum,basePath));
sb.append("<link rel=\"stylesheet\" href=\""+basePath+"/plug-in/uploadify/css/uploadify.css\" type=\"text/css\"></link>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");
//sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/plupload/plupload.full.min.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/tools/Map.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\""+basePath+"/plug-in/Validform/js/Validform_Datatype_zh-cn.js\"></script>");
@ -692,9 +695,12 @@ public class CgFormBuildController extends BaseController {
logger.debug("name:"+ok.toString()+";value:"+ov.toString());
}
data = CommUtils.mapConvert(data);
dataBaseService.executeJavaExtend(formId, buttonCode, data, "start");
dataBaseService.executeSqlExtend(formId, buttonCode, data);
dataBaseService.executeJavaExtend(formId, buttonCode, data);
dataBaseService.executeJavaExtend(formId, buttonCode, data, "end");
}
j.setSuccess(true);

@ -322,7 +322,10 @@ public class CgformFtlController extends BaseController {
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/tools/easyuiextend.js\"></script>");
sb.append("<link id=\"easyuiTheme\" rel=\"stylesheet\" href=\"${basePath}/plug-in/easyui/themes/metrole/main.css\" type=\"text/css\"></link>");
sb.append("<link rel=\"stylesheet\" href=\"${basePath}/plug-in/uploadify/css/uploadify.css\" type=\"text/css\"></link>");
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");
//sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/uploadify/jquery.uploadify-3.1.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/plupload/plupload.full.min.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/tools/Map.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js\"></script>");
sb.append("<script type=\"text/javascript\" src=\"${basePath}/plug-in/Validform/js/Validform_Datatype_zh-cn.js\"></script>");

@ -153,7 +153,9 @@ public class CgformEnhanceJavaController extends BaseController {
@ResponseBody
public AjaxJson doCgformEnhanceJava(CgformEnhanceJavaEntity cgformEnhanceJavaEntity, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
CgformEnhanceJavaEntity doCgformEnhanceJava = cgformEnhanceJavaService.getCgformEnhanceJavaEntityByCodeFormId(cgformEnhanceJavaEntity.getButtonCode(), cgformEnhanceJavaEntity.getFormId());
CgformEnhanceJavaEntity doCgformEnhanceJava = cgformEnhanceJavaService.getCgformEnhanceJavaEntityByCodeFormId(cgformEnhanceJavaEntity.getButtonCode(), cgformEnhanceJavaEntity.getFormId(), cgformEnhanceJavaEntity.getEvent());
if(doCgformEnhanceJava!=null){
j.setObj(doCgformEnhanceJava);
j.setSuccess(true);
@ -216,7 +218,7 @@ public class CgformEnhanceJavaController extends BaseController {
//根据buttonCode和formId初始化数据
cgformEnhanceJavaEntity.setButtonCode("add");
if (StringUtil.isNotEmpty(cgformEnhanceJavaEntity.getButtonCode())&&StringUtil.isNotEmpty(cgformEnhanceJavaEntity.getFormId())) {
CgformEnhanceJavaEntity cgformEnhanceJavaEntityVo = cgformEnhanceJavaService.getCgformEnhanceJavaEntityByCodeFormId(cgformEnhanceJavaEntity.getButtonCode(), cgformEnhanceJavaEntity.getFormId());
CgformEnhanceJavaEntity cgformEnhanceJavaEntityVo = cgformEnhanceJavaService.getCgformEnhanceJavaEntityByCodeFormId(cgformEnhanceJavaEntity.getButtonCode(), cgformEnhanceJavaEntity.getFormId(), cgformEnhanceJavaEntity.getEvent());
if(cgformEnhanceJavaEntityVo!=null){
cgformEnhanceJavaEntity = cgformEnhanceJavaEntityVo;
}

@ -107,7 +107,7 @@ public class GenerateController extends BaseController {
if(cgFormHead.getJformType()==1 || cgFormHead.getJformType()==3){
//如果是单表或者附表,则进入单表模型
request.setAttribute("jspModeList", GenerateUtil.getOnlineGenerateEnum("single","ext-common","Y".equals(cgFormHead.getIsTree())));// 默认老版本模板(IE8+/不支持移动/列表标签)
request.setAttribute("jspModeList", GenerateUtil.getOnlineGenerateEnum("single","ext","Y".equals(cgFormHead.getIsTree())));// 默认老版本模板(IE8+/不支持移动/列表标签)
returnModelAndView = "jeecg/cgform/generate/single";
}else{
@ -122,7 +122,7 @@ public class GenerateController extends BaseController {
}
}
request.setAttribute("jspModeList", GenerateUtil.getOnlineGenerateEnum("onetomany","ext-common","Y".equals(cgFormHead.getIsTree())));// 默认老版本模板(IE8+/不支持移动/列表标签)
request.setAttribute("jspModeList", GenerateUtil.getOnlineGenerateEnum("onetomany","ext","Y".equals(cgFormHead.getIsTree())));// 默认老版本模板(IE8+/不支持移动/列表标签)
request.setAttribute("subTableList", subTableList);
returnModelAndView = "jeecg/cgform/generate/one2many";

@ -12,10 +12,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecgframework.web.cgform.entity.upload.CgUploadEntity;
import org.jeecgframework.web.cgform.service.upload.CgUploadServiceI;
import org.jeecgframework.web.system.pojo.base.TSAttachment;
@ -23,6 +21,7 @@ import org.jeecgframework.web.system.service.SystemService;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery;
import org.jeecgframework.core.common.model.common.UploadFile;
import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.constant.Globals;
@ -41,6 +40,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import net.sf.json.JSONObject;
/**
*
@ -195,18 +196,23 @@ public class CgUploadController extends BaseController {
write2Disk(mf, extend, savePath);
TSAttachment attachment = new TSAttachment();
attachment.setId(UUID.randomUUID().toString().replace("-", ""));
attachment.setAttachmenttitle(fileName);
attachment.setAttachmenttitle(fileName.substring(0,fileName.lastIndexOf(".")));
attachment.setCreatedate(new Timestamp(new Date().getTime()));
attachment.setExtend(extend);
attachment.setRealpath(path + myfilename);
attachment.setSwfpath( path + FileUtils.getFilePrefix(myfilename) + ".swf");
SwfToolsUtil.convert2SWF(savePath);
String globalSwfTransformFlag = ResourceUtil.getConfigByName("swf.transform.flag");
if("true".equals(globalSwfTransformFlag) && !FileUtils.isPicture(extend)){
attachment.setSwfpath( path + FileUtils.getFilePrefix(myfilename) + ".swf");
SwfToolsUtil.convert2SWF(savePath);
}
systemService.save(attachment);
attributes.put("url", path + myfilename);
attributes.put("name", fileName);
attributes.put("swfpath", attachment.getSwfpath());
attributes.put("fileid", attachment.getId());
}
}
ajaxJson.setAttributes(attributes);
@ -272,5 +278,77 @@ public class CgUploadController extends BaseController {
return hexString;
}
/**
* Online
* 1.,
* 2.(),,,(/)
*/
@RequestMapping(params = "delAttachment")
@ResponseBody
public AjaxJson delAttachment( HttpServletRequest request) {
AjaxJson j = new AjaxJson();
String id = request.getParameter("id");
try {
CgUploadEntity file = systemService.getEntity(CgUploadEntity.class, id);
if(file==null){
//如果关系表中无数据,则表示是情景1
TSAttachment attachment = systemService.getEntity(TSAttachment.class, id);
cgUploadService.deleteAttachment(attachment);
j.setObj(1);//情景1
}else{
j.setObj(0);//情景2
}
j.setSuccess(true);
} catch (Exception e) {
j.setSuccess(false);
}
return j;
}
@RequestMapping(params = "updateCgformFile")
@ResponseBody
public AjaxJson updateCgformFile( HttpServletRequest request) {
AjaxJson j = new AjaxJson();
String cgFormId = oConvertUtils.getString(request.getParameter("cgFormId"));//动态表主键ID
String tableName = oConvertUtils.getString(request.getParameter("cgFormName"));//动态表名
String attachments = oConvertUtils.getString(request.getParameter("attachment"));//动态表上传控件字段
try {
cgUploadService.updateCgFormFile(cgFormId, tableName, attachments);
} catch (Exception e) {
j.setSuccess(false);
}
return j;
}
/**
*
* @author taoYan
* @since 201894
*/
@RequestMapping(params = "fileList")
public ModelAndView fileList(HttpServletRequest request) {
String cgFormId = oConvertUtils.getString(request.getParameter("cgformId"));//动态表主键ID
String tableName = oConvertUtils.getString(request.getParameter("cgformName"));//动态表名
String cgField = oConvertUtils.getString(request.getParameter("cgformField"));//动态表上传控件字段
CriteriaQuery cq = new CriteriaQuery(CgUploadEntity.class);
cq.eq("cgformName", tableName);
cq.eq("cgformId", cgFormId);
cq.eq("cgformField", cgField);
cq.add();
List<CgUploadEntity> list = this.systemService.getListByCriteriaQuery(cq, false);
net.sf.json.JSONArray array = net.sf.json.JSONArray.fromObject(list);
JSONObject json = new JSONObject();
json.put("total",list.size());
json.put("rows",array);
request.setAttribute("datagridData", json);
String img = request.getParameter("img");
if("1".equals(img)){
return new ModelAndView("common/upload/cgformUploadImglist");
}else{
return new ModelAndView("common/upload/cgformUploadFilelist");
}
}
//TODO 1.更新表cgform_uploadfiles的时候是根据页面传过来的ID以xx结尾判断历史OR新增文件,这个功能应该在java代码中查询数据库校验
//TODO 2.新增文件 但是不提交表单 那么附件表就会产生垃圾数据 需要写个xx功能 清除垃圾文件/数据
//TODO 3.上传代码在宏中定义但是依赖部分页面JS代码通用性不好。
}

@ -48,7 +48,11 @@ public class CgformEnhanceJavaEntity implements java.io.Serializable {
/**生效状态 0:无效/1:有效*/
@Excel(name="生效状态")
private java.lang.String activeStatus;
/**事件状态 end结束/start开始**/
@Excel(name="事件状态")
private java.lang.String event;
/**
*: java.lang.String
*@return: java.lang.String
@ -145,10 +149,27 @@ public class CgformEnhanceJavaEntity implements java.io.Serializable {
public void setActiveStatus(java.lang.String activeStatus){
this.activeStatus = activeStatus;
}
/**
*: java.lang.String
*@return: java.lang.String 0/1
*/
public java.lang.String getEvent() {
return event;
}
/**
*: java.lang.String
*@param: java.lang.String 0/1
*/
public void setEvent(java.lang.String event) {
this.event = event;
}
@Override
public String toString() {
return "CgformEnhanceJavaEntity [id=" + id + ", buttonCode="
+ buttonCode + ", cgJavaType=" + cgJavaType + ", cgJavaValue="
+ cgJavaValue + ", formId=" + formId + ", activeStatus=" + activeStatus + "]";
+ cgJavaValue + ", formId=" + formId + ", activeStatus=" + activeStatus + ", event=" + event + "]";
}
}

@ -49,7 +49,9 @@ public interface CgTableServiceI {
* @param id
* @return
*/
public boolean delete(String table,Object id);
public boolean delete(String table,Object id)throws org.jeecgframework.web.cgform.exception.BusinessException;
/**
*
* @param table

@ -28,7 +28,7 @@ public interface DataBaseService {
* sql
*
*/
public void executeSqlExtend(String formId,String buttonCode,Map<String, Object> data);
public void executeSqlExtend(String formId,String buttonCode,Map<String, Object> data) throws BusinessException;
public Object getPkValue(String tableName);
@ -40,6 +40,15 @@ public interface DataBaseService {
*/
public void executeJavaExtend(String formId, String buttonCode,Map<String, Object> data) throws BusinessException;
/**
* java
* @param formId
* @param buttonCode
* @param data
* @param event
*/
public void executeJavaExtend(String formId, String buttonCode,Map<String, Object> data, String event) throws BusinessException;
public List<CgformEnhanceJavaEntity> getCgformEnhanceJavaEntityByFormId(String formId);
}

@ -42,6 +42,15 @@ public interface CgformEnhanceJavaServiceI extends CommonService{
public CgformEnhanceJavaEntity getCgformEnhanceJavaEntityByCodeFormId(
String buttonCode, String formId);
/**
*
* @param buttonCode
* @param formId
* @return
*/
public CgformEnhanceJavaEntity getCgformEnhanceJavaEntityByCodeFormId(
String buttonCode, String formId, String event);
/**
*
* @param cgformEnhanceJavaEntity

@ -70,11 +70,14 @@ public class CgTableServiceImpl extends CommonServiceImpl implements CgTableServ
}
@SuppressWarnings("unchecked")
public boolean delete(String table, Object id) {
try{
public boolean delete(String table, Object id) throws org.jeecgframework.web.cgform.exception.BusinessException {
// try{
CgFormHeadEntity head = cgFormFieldService.getCgFormHeadByTableName(table);
Map<String,Object> data = dataBaseService.findOneForJdbc(table, id.toString());
dataBaseService.executeJavaExtend(head.getId(), "delete", data, "start");
if(data!=null){
//打印测试
Iterator it=data.entrySet().iterator();
@ -86,9 +89,6 @@ public class CgTableServiceImpl extends CommonServiceImpl implements CgTableServ
}
data = CommUtils.mapConvert(data);
dataBaseService.executeSqlExtend(head.getId(), "delete", data);
dataBaseService.executeJavaExtend(head.getId(), "delete", data);
}
//step.1 删除表
StringBuilder deleteSql = new StringBuilder();
@ -125,13 +125,17 @@ public class CgTableServiceImpl extends CommonServiceImpl implements CgTableServ
cgFormFieldService.deleteEntityById(CgUploadEntity.class, b.getId());
}
}
dataBaseService.executeJavaExtend(head.getId(), "delete", data, "end");
//--------longjb-end--20150526 ----for:add step.3 判断是否有附件字段,进行连带删除附件及附件表---------------
}catch (Exception e) {
e.printStackTrace();
return false;
}
// }catch (Exception e) {
// e.printStackTrace();
// return false;
// }
return true;
}
@SuppressWarnings("unchecked")
private void dealQuerySql(String table, String field, Map params,StringBuilder sqlB){
sqlB.append(" SELECT ");
@ -203,7 +207,9 @@ public class CgTableServiceImpl extends CommonServiceImpl implements CgTableServ
}
}
parentIds = parentIds.substring(1);
String subSQL = "select `" + parentIdFieldName + "`, count(*) ct from " + table + " a where a.`" + parentIdFieldName + "` in" + "(" + parentIds + ") group by a.`" + parentIdFieldName + "`";
String subSQL = "select " + parentIdFieldName + ", count(*) ct from " + table + " a where a." + parentIdFieldName + " in" + "(" + parentIds + ") group by a." + parentIdFieldName + "";
List<Map<String, Object>> subCountResult = this.findForJdbc(subSQL);
Map<String, Object> subCountMap = new HashMap<String, Object>();
for (Map<String, Object> map : subCountResult) {

@ -72,6 +72,9 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
public void insertTable(String tableName, Map<String, Object> data) throws BusinessException {
CgFormHeadEntity cgFormHeadEntity = cgFormFieldService.getCgFormHeadByTableName(tableName);
executeJavaExtend(cgFormHeadEntity.getId(),"add",data,"start");
//系统上下文变量赋值
fillInsertSysVar(tableName,data);
//主键适配器(根据不同的数据库进行生成)
@ -106,7 +109,7 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
if(cgFormHeadEntity!=null){
executeSqlExtend(cgFormHeadEntity.getId(),"add",data);
executeJavaExtend(cgFormHeadEntity.getId(),"add",data);
executeJavaExtend(cgFormHeadEntity.getId(),"add",data,"end");
}
}
@ -248,6 +251,9 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
data.put("id", id);
CgFormHeadEntity cgFormHeadEntity = cgFormFieldService.getCgFormHeadByTableName(tableName);
executeJavaExtend(cgFormHeadEntity.getId(),"update",data, "start");
int num = this.executeSql(sqlBuffer.toString(), data);
if(cgFormHeadEntity!=null){
@ -256,7 +262,7 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
executeSqlExtend(cgFormHeadEntity.getId(),"update",data);
executeJavaExtend(cgFormHeadEntity.getId(),"update",data);
executeJavaExtend(cgFormHeadEntity.getId(),"update",data, "end");
}
return num;
@ -283,7 +289,7 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
* sql
*
*/
public void executeSqlExtend(String formId,String buttonCode,Map<String, Object> data){
public void executeSqlExtend(String formId,String buttonCode,Map<String, Object> data) throws BusinessException{
//根据formId和buttonCode获取
CgformButtonSqlEntity cgformButtonSqlVo = getCgformButtonSqlByCodeFormId(buttonCode,formId);
if(cgformButtonSqlVo!=null){
@ -325,7 +331,9 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
try {
num = namedParameterJdbcTemplate.update(sql, data);
} catch (Throwable e) {
e.printStackTrace();
throw new BusinessException(e.getMessage());
}
}else{
num = this.executeSql(sql);
@ -723,10 +731,17 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
if(StringUtil.isNotEmpty(cgJavaValue)){
Object obj = null;
try {
// try {
if("class".equals(cgJavaType)){
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
try {
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}else if("spring".equals(cgJavaType)){
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
}
@ -737,11 +752,12 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
javaInter.execute(head.getTableName(),data);
}
} catch (Exception e) {
logger.error(e.getMessage());
e.printStackTrace();
throw new BusinessException("执行JAVA增强出现异常");
}
// } catch (Exception e) {
// logger.error(e.getMessage());
// e.printStackTrace();
// throw new BusinessException("执行JAVA增强出现异常");
// }
}
}
@ -756,6 +772,7 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
hql.append(" and t.activeStatus ='1'");
hql.append(" and t.event = 'end' ");
List<CgformEnhanceJavaEntity> list = this.findHql(hql.toString(),formId,buttonCode);
if(list!=null&&list.size()>0){
@ -772,5 +789,72 @@ public class DataBaseServiceImpl extends CommonServiceImpl implements DataBaseSe
return list;
}
@Override
public void executeJavaExtend(String formId, String buttonCode,
Map<String, Object> data, String event) throws BusinessException {
CgformEnhanceJavaEntity cgformEnhanceJavaEntity = getCgformEnhanceJavaEntityByCodeFormId(buttonCode,formId,event);
if(cgformEnhanceJavaEntity!=null){
String cgJavaType = cgformEnhanceJavaEntity.getCgJavaType();
String cgJavaValue = cgformEnhanceJavaEntity.getCgJavaValue();
if(StringUtil.isNotEmpty(cgJavaValue)){
Object obj = null;
// try {
if("class".equals(cgJavaType)){
//因新增时已经校验了实例化是否可以成功,所以这块就不需要再做一次判断
try {
obj = MyClassLoader.getClassByScn(cgJavaValue).newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}else if("spring".equals(cgJavaType)){
obj = ApplicationContextUtil.getContext().getBean(cgJavaValue);
}
if(obj instanceof CgformEnhanceJavaInter){
CgFormHeadEntity head = this.get(CgFormHeadEntity.class, formId);
CgformEnhanceJavaInter javaInter = (CgformEnhanceJavaInter) obj;
javaInter.execute(head.getTableName(),data);
}
// } catch (Exception e) {
// logger.error(e.getMessage());
// e.printStackTrace();
// throw new BusinessException("执行JAVA增强出现异常");
// }
}
}
}
public CgformEnhanceJavaEntity getCgformEnhanceJavaEntityByCodeFormId(String buttonCode, String formId, String event) {
StringBuilder hql = new StringBuilder("");
List<CgformEnhanceJavaEntity> list = null;
hql.append(" from CgformEnhanceJavaEntity t");
hql.append(" where t.formId=?");
hql.append(" and t.buttonCode =?");
hql.append(" and t.activeStatus ='1'");
if(oConvertUtils.isNotEmpty(event)) {
hql.append(" and t.event = ?");
list = this.findHql(hql.toString(),formId,buttonCode,event);
} else {
list = this.findHql(hql.toString(),formId,buttonCode);
}
if(list!=null&&list.size()>0){
return list.get(0);
}
return null;
}
}

@ -6,6 +6,7 @@ import java.util.UUID;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.jeecgframework.core.util.ApplicationContextUtil;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.web.cgform.entity.enhance.CgformEnhanceJavaEntity;
import org.jeecgframework.web.cgform.service.enhance.CgformEnhanceJavaServiceI;
import org.springframework.stereotype.Service;
@ -81,6 +82,10 @@ public class CgformEnhanceJavaServiceImpl extends CommonServiceImpl implements C
hql.append(" where t.formId=?");
hql.append(" and t.buttonCode =?");
hql.append(" and t.event = 'end' ");
hql.append(" and t.activeStatus = '1'");
List<CgformEnhanceJavaEntity> list = this.findHql(hql.toString(),formId,buttonCode);
if(list!=null&&list.size()>0){
@ -97,12 +102,15 @@ public class CgformEnhanceJavaServiceImpl extends CommonServiceImpl implements C
hql.append(" where t.formId=?");
hql.append(" and t.buttonCode =?");
hql.append(" and t.event = ?");
hql.append(" and t.activeStatus = '1'");
List<CgformEnhanceJavaEntity> list = null;
if(cgformEnhanceJavaEntity.getId()!=null){
hql.append(" and t.id !=?");
list = this.findHql(hql.toString(),cgformEnhanceJavaEntity.getFormId(),cgformEnhanceJavaEntity.getButtonCode(),cgformEnhanceJavaEntity.getId());
list = this.findHql(hql.toString(),cgformEnhanceJavaEntity.getFormId(),cgformEnhanceJavaEntity.getButtonCode(),cgformEnhanceJavaEntity.getEvent(),cgformEnhanceJavaEntity.getId());
}else{
list = this.findHql(hql.toString(),cgformEnhanceJavaEntity.getFormId(),cgformEnhanceJavaEntity.getButtonCode());
list = this.findHql(hql.toString(),cgformEnhanceJavaEntity.getFormId(),cgformEnhanceJavaEntity.getButtonCode(),cgformEnhanceJavaEntity.getEvent());
}
return list;
@ -134,4 +142,29 @@ public class CgformEnhanceJavaServiceImpl extends CommonServiceImpl implements C
return true;
}
@Override
public CgformEnhanceJavaEntity getCgformEnhanceJavaEntityByCodeFormId(
String buttonCode, String formId, String event) {
StringBuilder hql = new StringBuilder("");
List<CgformEnhanceJavaEntity> list = null;
hql.append(" from CgformEnhanceJavaEntity t");
hql.append(" where t.formId=?");
hql.append(" and t.buttonCode =?");
hql.append(" and t.activeStatus = 1");
if(oConvertUtils.isNotEmpty(event)) {
hql.append(" and t.event = ?");
list = this.findHql(hql.toString(),formId,buttonCode,event);
} else {
list = this.findHql(hql.toString(),formId,buttonCode);
}
if(list!=null&&list.size()>0){
return list.get(0);
}
return null;
}
}

@ -5,13 +5,16 @@ import java.util.Map;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.jeecgframework.core.util.ContextHolderUtils;
import org.jeecgframework.core.util.FileUtils;
import org.jeecgframework.core.util.oConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.jeecgframework.web.cgform.dao.upload.CgFormUploadDao;
import org.jeecgframework.web.cgform.entity.upload.CgUploadEntity;
import org.jeecgframework.web.cgform.service.upload.CgUploadServiceI;
import org.jeecgframework.web.system.pojo.base.TSAttachment;
@Service("cgUploadService")
@Transactional
public class CgUploadServiceImpl extends CommonServiceImpl implements CgUploadServiceI {
@ -45,4 +48,54 @@ public class CgUploadServiceImpl extends CommonServiceImpl implements CgUploadSe
}
}
@Override
public void deleteAttachment(TSAttachment attachment) {
String realpath = attachment.getRealpath();//附件相对路径
String pathNosuffix = FileUtils.getFilePrefix2(realpath);
//获取部署项目绝对地址
String projectPath = ContextHolderUtils.getSession().getServletContext().getRealPath("/");
//step.1 删除附件
FileUtils.delete(projectPath+realpath);
if(!FileUtils.isPicture(attachment.getExtend())){
//文件类型删除预览生成的文件
FileUtils.delete(projectPath+pathNosuffix+".pdf");
FileUtils.delete(projectPath+pathNosuffix+".swf");
}
//step.2 删除数据
commonDao.delete(attachment);
}
@Override
public void updateCgFormFile(String cgFormId, String tableName, String attachments) throws Exception{
JSONArray array = JSONArray.parseArray(attachments);
String addSql = "INSERT INTO cgform_uploadfiles (id,CGFORM_FIELD,CGFORM_ID,CGFORM_NAME) VALUES(?,?,?,?)";
String delSql = "delete from cgform_uploadfiles where id = ?";
for (Object object : array) {
JSONObject json = (JSONObject)object;
String cgFormField = json.getString("cgFormField");//获取表字段
String attachmentId = json.getString("attachment");//获取附件ID(逗号隔开的字符串)
if(oConvertUtils.isNotEmpty(attachmentId)){
String attachmentArray[] = attachmentId.split(",");
for (String a : attachmentArray) {
if(oConvertUtils.isNotEmpty(a)){
if(a.endsWith("_D")){
//以_D结尾 代表你是被删除掉了哦
String metaId = a.substring(0,a.length()-2);
//删除cgform_uploadfiles
commonDao.executeSql(delSql,metaId);
//删除附件表同时删除文件
TSAttachment attachment = this.getEntity(TSAttachment.class,metaId);
deleteAttachment(attachment);
}else if(a.endsWith("_O")){
//String metaId = a.substring(0,a.length()-2);//获取原始ID
//以_O结尾 代表你历史文件 那么需要走更新操作,但是没有需要更新的内容
}else{
commonDao.executeSql(addSql, a,cgFormField,cgFormId,tableName);
}
}
}
}
}
}
}

@ -3,6 +3,7 @@ package org.jeecgframework.web.cgform.service.upload;
import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.cgform.entity.upload.CgUploadEntity;
import org.jeecgframework.web.system.pojo.base.TSAttachment;
/**
*
* @Title:CgUploadServiceI
@ -24,4 +25,21 @@ public interface CgUploadServiceI extends CommonService{
* @param cgFormField
*/
public void writeBack(String cgFormId,String cgFormName,String cgFormField,String fileId,String fileUrl);
/**
*
* @author taoYan
* @since 201893
*/
public void deleteAttachment(TSAttachment attachment);
/**
*
* @param cgFormId ID
* @param tableName
* @param attachments :[{,[ID]}]
* @author taoYan
* @since 201893
*/
public void updateCgFormFile(String cgFormId,String tableName,String attachments) throws Exception;
}

@ -332,13 +332,15 @@ public class CgReportServiceImpl extends CommonServiceImpl implements CgReportSe
}else{
List<Map<String, Object>> dicDatas = queryDicBySQL(dict_code);
for(Map r:result){
String value = String.valueOf(r.get(field_name));
for(Map m:dicDatas){
String typecode = String.valueOf(m.get("typecode"));
String typename = String.valueOf(m.get("typename"));
if(value.equalsIgnoreCase(typecode)){
r.put(bean.get(CgReportConstant.ITEM_FIELDNAME),typename);
if(result!=null){
for(Map r:result){
String value = String.valueOf(r.get(field_name));
for(Map m:dicDatas){
String typecode = String.valueOf(m.get("typecode"));
String typename = String.valueOf(m.get("typename"));
if(value.equalsIgnoreCase(typecode)){
r.put(bean.get(CgReportConstant.ITEM_FIELDNAME),typename);
}
}
}
}

@ -10,6 +10,7 @@ import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
@ -184,7 +185,18 @@ public class GraphReportController extends BaseController {
@SuppressWarnings("unchecked")
private void loadVars(Map<String, Object> cgReportMap) {
Map mainM = (Map) cgReportMap.get(CgReportConstant.MAIN);
List<Map<String,Object>> fieldList = (List<Map<String, Object>>) cgReportMap.get(CgReportConstant.ITEMS);
List<Map<String,Object>> fieldList2 = (List<Map<String, Object>>) cgReportMap.get(CgReportConstant.ITEMS);
List<Map<String,Object>> fieldList = new ArrayList<Map<String,Object>>();
for (Map<String, Object> map : fieldList2) {
Map<String, Object> temp = new HashMap<String, Object>();
for (Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
temp.put(key.toLowerCase(), entry.getValue());
}
fieldList.add(temp);
}
List<Map<String,Object>> queryList = new ArrayList<Map<String,Object>>(0);
//图表数据
List<Map<String,Object>> graphList = new ArrayList<Map<String,Object>>(0);

@ -8,6 +8,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -644,9 +645,20 @@ public class SuperQueryMainController extends BaseController {
public AjaxJson getTextById(HttpServletRequest request,HttpServletResponse response) {
AjaxJson json=new AjaxJson();
String tableName = request.getParameter("tableName");
String sql=" SELECT table_name, `name`, txt,ctype,stype,dict_code,dict_table ,dict_text,main_id from super_query_field where table_name= ? GROUP BY `name`,txt";
String sql=" SELECT DISTINCT table_name, name, txt,ctype,stype,dict_code,dict_table ,dict_text,main_id from super_query_field where table_name= ?";
List<Map<String, Object>> findForJdbc = systemService.findForJdbc(sql,tableName);
json.setObj(findForJdbc);
List<Map<String,Object>> fieldList = new ArrayList<Map<String,Object>>();
for (Map<String, Object> map : findForJdbc) {
Map<String, Object> temp = new HashMap<String, Object>();
for (Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
temp.put(key.toLowerCase(), entry.getValue());
}
fieldList.add(temp);
}
json.setObj(fieldList);
return json;
}
@ -825,7 +837,9 @@ public class SuperQueryMainController extends BaseController {
AjaxJson json = new AjaxJson();
try {
// step.1 获取mainId和字段名称查询数据
String sql = "select stype,`name`,txt,dict_table,dict_code,dict_text from super_query_field where `name`=? AND main_id = ?";
String sql = "select stype,name,txt,dict_table,dict_code,dict_text from super_query_field where name=? AND main_id = ?";
List<Map<String, Object>> page = systemService.findForJdbc(sql,field,mainId);
if(page.size()>0) {
json.setObj(page);

@ -1303,13 +1303,17 @@ public class DepartAuthGroupController extends BaseController {
if (pFunction.size() > 0) {
for (TSDepartAuthgFunctionRelEntity departGroupRel : pFunction) {
TSFunction function = (TSFunction) departGroupRel.getTsFunction();
// 获取上级所有选中的ID
selectChild.add(function.getId());
for (TSFunction ts : functionList) {
if (ts.getId().equals(function.getId())) {
lists.add(ts);
if(function!=null){
// 获取上级所有选中的ID
selectChild.add(function.getId());
for (TSFunction ts : functionList) {
if (ts.getId().equals(function.getId())) {
lists.add(ts);
}
}
}
}
functionList = lists;
} else {
@ -1356,9 +1360,11 @@ public class DepartAuthGroupController extends BaseController {
if (role != null) {
if (oConvertUtils.isNotEmpty(role.getDepartAgId())) {
String pid = role.getDepartAgId();
String groupSql = "select * from t_s_depart_authg_function_rel where group_id = ?";
String groupSql = "select * from t_s_depart_authg_function_rel where group_id = ? and auth_id = ?";
// 查询部门组记录赋值给pOperationArray
pGroup = this.systemService.findForJdbc(groupSql, pid);
pGroup = this.systemService.findForJdbc(groupSql, pid, functionId);
}
}
String[] pOperationArray = null;
@ -1401,9 +1407,11 @@ public class DepartAuthGroupController extends BaseController {
if (role != null) {
if (oConvertUtils.isNotEmpty(role.getDepartAgId())) {
String pid = role.getDepartAgId();
String groupSql = "select * from t_s_depart_authg_function_rel where group_id = ?";
String groupSql = "select * from t_s_depart_authg_function_rel where group_id = ? and auth_id = ?";
// 查询部门组记录赋值给pDataRuleArray
pGroup = this.systemService.findForJdbc(groupSql, pid);
pGroup = this.systemService.findForJdbc(groupSql, pid, functionId);
}
}
String[] pDataRuleArray = null;

@ -14,6 +14,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.sf.json.JSONArray;
import org.apache.commons.lang.StringUtils;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.model.json.AjaxJson;
@ -52,6 +54,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.kisso.SSOHelper;
import com.baomidou.kisso.SSOToken;
import com.baomidou.kisso.common.util.HttpUtil;
@ -234,7 +237,7 @@ public class LoginController extends BaseController{
modelMap.put("currentOrgName", clientManager.getClient().getUser().getCurrentDepart().getDepartname());
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
if("fineui".equals(sysTheme.getStyle())|| "ace".equals(sysTheme.getStyle())||"diy".equals(sysTheme.getStyle())||"acele".equals(sysTheme.getStyle())||"hplus".equals(sysTheme.getStyle())){
if("fineui".equals(sysTheme.getStyle())|| "ace".equals(sysTheme.getStyle())||"diy".equals(sysTheme.getStyle())||"acele".equals(sysTheme.getStyle())||"hplus".equals(sysTheme.getStyle()) || "adminlte".equals(sysTheme.getStyle())){
request.setAttribute("menuMap", userService.getFunctionMap(user.getId()));
}
//国际化cookie
@ -698,4 +701,68 @@ public class LoginController extends BaseController{
public String login3(){
return "login/login3";
}
/**
* AdminLTE
*/
@RequestMapping(params = "getPrimaryMenuForAdminlte", method = {RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public AjaxJson getPrimaryMenuForAdminlte(String functionId, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
try {
//List<TSFunction> functions = this.systemService.findByProperty(TSFunction.class, "TSFunction.id", functionId);
String userid = ResourceUtil.getSessionUser().getId();
List<TSFunction> functions = userService.getSubFunctionList(userid, functionId);
JSONArray jsonArray = new JSONArray();
if(functions != null && functions.size() > 0) {
for (TSFunction function : functions) {
JSONObject jsonObjectInfo = new JSONObject();
jsonObjectInfo.put("id", function.getId());
jsonObjectInfo.put("text",oConvertUtils.getString(MutiLangUtil.getLang(function.getFunctionName())));
jsonObjectInfo.put("url",oConvertUtils.getString(function.getFunctionUrl()));
jsonObjectInfo.put("targetType", "iframe-tab");
jsonObjectInfo.put("icon", "fa " + oConvertUtils.getString(function.getFunctionIconStyle()));
jsonObjectInfo.put("children", getChildOfAdminLteTree(function));
jsonArray.add(jsonObjectInfo);
}
}
j.setObj(jsonArray);
} catch (Exception e) {
e.printStackTrace();
}
return j;
}
public JSONArray getChildOfAdminLteTree(TSFunction function) {
JSONArray jsonArray = new JSONArray();
List<TSFunction> functions = this.systemService.findByProperty(TSFunction.class, "TSFunction.id", function.getId());
if(functions != null && functions.size() > 0) {
for (TSFunction tsFunction : functions) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", tsFunction.getId());
jsonObject.put("text", MutiLangUtil.getLang(tsFunction.getFunctionName()));
jsonObject.put("url", tsFunction.getFunctionUrl());
jsonObject.put("targetType", "iframe-tab");
jsonObject.put("icon", "fa " + tsFunction.getFunctionIconStyle());
jsonObject.put("children", getChildOfAdminLteTree(tsFunction));
jsonArray.add(jsonObject);
}
}
return jsonArray;
}
/**
* AdminLTE
*
* @return
*/
@RequestMapping(params = "adminlteHome")
public ModelAndView adminlteHome(HttpServletRequest request) {
return new ModelAndView("main/adminlte_home");
}
}

@ -37,8 +37,10 @@ import org.jeecgframework.tag.vo.datatable.SortDirection;
import org.jeecgframework.tag.vo.easyui.ComboTreeModel;
import org.jeecgframework.tag.vo.easyui.TreeGridModel;
import org.jeecgframework.web.system.pojo.base.TSDepart;
import org.jeecgframework.web.system.pojo.base.TSRoleUser;
import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.system.pojo.base.TSUserOrg;
import org.jeecgframework.web.system.pojo.base.TSUserPositionRelEntity;
import org.jeecgframework.web.system.service.SystemService;
import org.jeecgframework.web.system.service.UserService;
import org.jeecgframework.web.system.util.OrgConstants;
@ -239,33 +241,38 @@ public class OrganzationController extends BaseController {
public AjaxJson delUserOrg(@RequestParam(required=true)String userid,@RequestParam(required=true)String departid) {
AjaxJson ajaxJson = new AjaxJson();
try {
//判断授权部门角色是否赋值,有值则不可删除
String sql1 = "SELECT COUNT(0) FROM t_s_role_user ru WHERE ru.roleid in (SELECT tsr.id FROM t_s_role tsr WHERE depart_ag_id = (SELECT dag.id FROM t_s_depart_auth_group dag WHERE dag.dept_id = ?)) and ru.userid = ?";
long roleUserCount = this.systemService.getCountForJdbcParam(sql1,departid,userid);
List<TSUserOrg> userOrgList = this.systemService.findByProperty(TSUserOrg.class, "tsUser.id", userid);
//判断分配职务是否赋值,有值则不可删除
//查询角色用户关联记录
String queryRoleUserSql = "select ru.id from t_s_role_user ru WHERE ru.roleid in (SELECT tsr.id FROM t_s_role tsr WHERE depart_ag_id = (SELECT dag.id FROM t_s_depart_auth_group dag WHERE dag.dept_id = ?)) and ru.userid = ?";
List<Map<String,Object>> listMaps = this.systemService.findForJdbc(queryRoleUserSql, departid, userid);
if(listMaps != null && listMaps.size() > 0) {
for (Map<String, Object> map : listMaps) {
if(oConvertUtils.isNotEmpty(map.get("id").toString())) {
//删除角色用户关联记录
this.systemService.deleteEntityById(TSRoleUser.class, map.get("id").toString());
}
}
}
//查找直接上级公司
String companyId = getCompanyId(departid);
if(StringUtils.isEmpty(companyId)){
companyId = "";
}
String sql2 = "select count(0) from t_s_user_position_rel where user_id = ? and company_id = ?";
long duties = this.systemService.getCountForJdbcParam(sql2,userid,companyId);
if(roleUserCount >= 1 || duties >= 1) {
ajaxJson.setSuccess(false);
ajaxJson.setMsg("当前用户拥有职务或部门角色,不可删除。");
}else if(userOrgList.size() == 1){
ajaxJson.setSuccess(false);
ajaxJson.setMsg("当前用户只包含有当前组织机构关系,不可删除,请切换用户的组织机构关系");
}else{
String sql = "delete from t_s_user_org where user_id = ? and org_id = ?";
this.systemService.executeSql(sql,userid,departid);
ajaxJson.setMsg("成功删除用户对应的组织机构关系");
//查询用户职位关联记录
String userPositionSql = "select id from t_s_user_position_rel where user_id = ? and company_id = ?";
List<Map<String,Object>> userPositions = this.systemService.findForJdbc(userPositionSql, userid, companyId);
if(userPositions != null && userPositions.size() > 0) {
for (Map<String, Object> map : userPositions) {
if(oConvertUtils.isNotEmpty(map.get("id").toString())) {
//删除用户职位关联记录
this.systemService.deleteEntityById(TSUserPositionRelEntity.class, map.get("id").toString());
}
}
}
String sql = "delete from t_s_user_org where user_id = ? and org_id = ?";
this.systemService.executeSql(sql,userid,departid);
ajaxJson.setMsg("成功删除用户对应的组织机构关系");
} catch (Exception e) {
e.printStackTrace();
LogUtil.log("删除用户对应的组织机构关系失败", ajaxJson.getMsg());
@ -574,7 +581,24 @@ public class OrganzationController extends BaseController {
cq.in("status", userstate);
cq.add();
this.systemService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
Map<String,Map<String,Object>> extMap = new HashMap<String, Map<String,Object>>();
List<TSUser> tsUserList = dataGrid.getResults();
for(TSUser temp : tsUserList){
Map<String,Object> m = new HashMap<String, Object>();
String sql = "SELECT tscp.position_name FROM t_s_company_position tscp WHERE id in (SELECT tsupr.position_id FROM t_s_user_position_rel tsupr WHERE tsupr.user_id = ?)";
List<Map<String,Object>> listMaps = systemService.findForJdbc(sql, temp.getId());
if(listMaps != null && listMaps.size() > 0) {
String positionName = "";
for (Map<String, Object> map : listMaps) {
positionName += map.get("position_name").toString() + ",";
}
m.put("positionName", positionName);
}
extMap.put(temp.getId(), m);
}
TagUtil.datagrid(response, dataGrid, extMap);
}
//----
@ -1131,6 +1155,50 @@ public class OrganzationController extends BaseController {
}
return dataList;
}
@RequestMapping(params="getMyTreeDataAsync",method ={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public List<Map<String,Object>> getMyTreeDataAsync(HttpServletResponse response,HttpServletRequest request ){
CriteriaQuery cq = new CriteriaQuery(TSDepart.class);
List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();
try{
String id = request.getParameter("id");
String userName = ResourceUtil.getSessionUser().getUserName();
if("admin".equals(userName)) {
if(oConvertUtils.isEmpty(id)){
//加载根节点
cq.isNull("TSPDepart");
}else{
//加载子节点
cq.eq("TSPDepart.id", id);
}
}else{
String sql = "select deptId from TSDepartAuthGroupEntity where id in (select groupId from TSDepartAuthgManagerEntity where userId = ?)";
List<String> deptIds = this.systemService.findHql(sql, userName);
if(deptIds!=null && deptIds.size()>0){
Object values[] = deptIds.toArray();
cq.in("id", values);
if(oConvertUtils.isEmpty(id)){
cq.isNull("TSPDepart");
}else{
//加载子节点
cq.eq("TSPDepart.id",id);
}
}else{
//如果非admin用户且无授权组织机构 那么 直接返回一个null
return null;
}
}
cq.addOrder("departOrder", SortDirection.asc);
cq.add();
List<TSDepart> departList = this.systemService.getListByCriteriaQuery(cq, false);
populateTree(departList,dataList);
}catch(Exception e){
e.printStackTrace();
}
return dataList;
}
private void populateTree(List<TSDepart> departList,List<Map<String,Object>> dataList){
Map<String,Object> map = null;

@ -51,6 +51,7 @@ import org.jeecgframework.core.util.PropertiesUtil;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.SetListSort;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.UrlCheckUtil;
import org.jeecgframework.core.util.YouBianCodeUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.tag.core.easyui.TagUtil;
@ -773,7 +774,7 @@ public class SystemController extends BaseController {
sb.append(" and org_code like '").append(parentCode).append("%'");
} else {
sb.append(" and LEFT(org_code,1)='A'");
//sb.append(" and LEFT(org_code,1)='A'");
}
@ -1755,6 +1756,11 @@ public class SystemController extends BaseController {
String ctxPath = request.getSession().getServletContext().getRealPath("/");
String dbpath = request.getParameter("filePath");
String downLoadPath = ctxPath + dbpath;
if(UrlCheckUtil.checkUrl(downLoadPath)){
return;
}
response.setContentType("application/x-msdownload;charset=utf-8");
String fileName=dbpath.substring(dbpath.lastIndexOf("/")+1);
String userAgent = request.getHeader("user-agent").toLowerCase();

@ -33,8 +33,10 @@ public interface DepartAuthGroupDao {
* @param userId
* @return
*/
@Sql("select dag.* from t_s_depart_auth_group as dag join t_s_depart_authg_manager as dam on dam.group_id=dag.id where user_id = :userId")
@Sql("select dag.* from t_s_depart_auth_group dag join t_s_depart_authg_manager dam on dam.group_id=dag.id where dam.user_id = :userId")
public List<Map<String,Object>> chkDepartAuthGroupList(@Param("userId") String userId);
/**
* ID

@ -176,11 +176,12 @@ public class TSDepartAuthGroupEntity implements java.io.Serializable {
*@return: java.lang.Integer
*/
@Column(name ="LEVEL",nullable=true,length=10)
@Column(name ="[LEVEL]",nullable=true,length=10)
public java.lang.Integer getLevel(){
return this.level;
}
/**
*: java.lang.Integer
*@param: java.lang.Integer

@ -74,5 +74,12 @@ public interface UserService extends CommonService{
* @return
*/
public String getShortcutPrimaryMenuDiy(List<TSFunction> primaryMenu);
/**
* ID
* @author taoYan
* @since 20181022
*/
public List<TSFunction> getSubFunctionList(String userid,String functionId);
}

@ -462,4 +462,28 @@ public class UserServiceImpl extends CommonServiceImpl implements UserService {
return floor;
}
@Override
public List<TSFunction> getSubFunctionList(String userid, String functionId) {
Map<String, TSFunction> loginActionlist = new HashMap<String, TSFunction>();
//查询用户角色对应的授权菜单
StringBuilder hqlsb1 = new StringBuilder("select distinct f from TSFunction f,TSRoleFunction rf,TSRoleUser ru ").append("where ru.TSRole.id=rf.TSRole.id and rf.TSFunction.id=f.id and ru.TSUser.id=? and f.TSFunction.id = ?");
//查询用户组织机构授权的菜单
StringBuilder hqlsb2 = new StringBuilder("select distinct c from TSFunction c,TSRoleFunction rf,TSRoleOrg b,TSUserOrg a ").append("where a.tsDepart.id=b.tsDepart.id and b.tsRole.id=rf.TSRole.id and rf.TSFunction.id=c.id and a.tsUser.id=? and c.TSFunction.id = ?");
List<TSFunction> list1 = this.findHql(hqlsb1.toString(), userid,functionId);
List<TSFunction> list2 = this.findHql(hqlsb2.toString(), userid,functionId);
for (TSFunction function : list1) {
loginActionlist.put(function.getId(), function);
}
for (TSFunction function : list2) {
loginActionlist.put(function.getId(), function);
}
list1.clear();
list2.clear();
list1 = null;
list2 = null;
List<TSFunction> list = new ArrayList<TSFunction>(loginActionlist.values());
Collections.sort(list, new NumberComparator());
return list;
}
}

@ -155,8 +155,17 @@ public class ImgServerServlet extends HttpServlet {
OutputStream outputStream = null;
try {
String imgurl = getUploadBasePath() + File.separator + imgPath;
inputStream = new BufferedInputStream(new FileInputStream(imgurl));
try {
inputStream = new BufferedInputStream(new FileInputStream(imgurl));
} catch (Exception e) {
//Online在线模板图片支持打进jar中如果图片寻找失败则再从jar中找
String imgClassPath = "/online/template/"+imgPath;
System.out.println(" imgClassPath "+imgClassPath);
if(inputStream==null){
inputStream = this.getClass().getResourceAsStream(imgClassPath);
}
}
outputStream = response.getOutputStream();
byte[] buf = new byte[1024];
int len;

@ -477,11 +477,19 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -292,7 +292,11 @@ function resetTrNum(tableId) {
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -325,7 +325,11 @@ function resetTrNum(tableId) {
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -124,26 +124,6 @@ function btListFileFormatter(value,row,index){
return listFileImgFormat(value);
}
//列表文件图片 列格式化方法
function listFileImgFormat(value,type){
var href='';
if(value==null || value.length==0){
return href;
}
var value1 = "img/server/"+value;
if("image"==type){
href+="<img src='"+value1+"' width=30 height=30 onmouseover='tipImg(this)' onmouseout='moveTipImg()' style='vertical-align:middle'/>";
}else{
if(value.indexOf(".jpg")>-1 || value.indexOf(".gif")>-1 || value.indexOf(".png")>-1){
href+="<img src='"+value1+"' onmouseover='tipImg(this)' onmouseout='moveTipImg()' width=30 height=30 style='vertical-align:middle'/>";
}else{
var value2 = "img/server/"+value+"?down=true";
href+="<a href='"+value2+"' class='ace_button' style='text-decoration:none;' target=_blank><u><i class='fa fa-download'></i>点击下载</u></a>";
}
}
return href;
}
<#if cgformConfig.cgFormHead.isTree == 'Y'>
/**
* 获取表格对象

@ -460,15 +460,23 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -25,7 +25,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<#-- update--begin--author:liushaoqian date:20180713 for:TASK #2964 【代码生成器--张伟健】单表代码生成器新老模板测试 -->
@ -68,6 +68,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -129,6 +133,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -26,7 +26,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<div class="container" style="width:100%;">
@ -66,6 +66,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${entityName?uncap_first}.${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control" maxlength="${po.length?c}" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -129,6 +133,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span> </span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" value='${'$'}{${entityName?uncap_first}.${po.fieldName}}' type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -124,26 +124,6 @@ function btListFileFormatter(value,row,index){
return listFileImgFormat(value);
}
//列表文件图片 列格式化方法
function listFileImgFormat(value,type){
var href='';
if(value==null || value.length==0){
return href;
}
var value1 = "img/server/"+value;
if("image"==type){
href+="<img src='"+value1+"' width=30 height=30 onmouseover='tipImg(this)' onmouseout='moveTipImg()' style='vertical-align:middle'/>";
}else{
if(value.indexOf(".jpg")>-1 || value.indexOf(".gif")>-1 || value.indexOf(".png")>-1){
href+="<img src='"+value1+"' onmouseover='tipImg(this)' onmouseout='moveTipImg()' width=30 height=30 style='vertical-align:middle'/>";
}else{
var value2 = "img/server/"+value+"?down=true";
href+="<a href='"+value2+"' class='ace_button' style='text-decoration:none;' target=_blank><u><i class='fa fa-download'></i>点击下载</u></a>";
}
}
return href;
}
<#if cgformConfig.cgFormHead.isTree == 'Y'>
/**
* 获取表格对象

@ -476,11 +476,19 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -292,7 +292,11 @@ function resetTrNum(tableId) {
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -325,7 +325,11 @@ function resetTrNum(tableId) {
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -33,7 +33,7 @@
<div class="accordion-inner">
<div class="panel panel-default" style="margin-bottom: 0px;">
<div class="panel-body">
<form id="${entityName?uncap_first}Form" onkeydown="if(event.keyCode==13){doSearch();return false;}">
<form id="searchForm" onkeydown="if(event.keyCode==13){doSearch();return false;}">
<#list columns as po>
<#if po.isQuery =='Y'>
<#if po.showType?index_of("datetime")!=-1>
@ -102,6 +102,13 @@
<select class="form-control input-sm" id="${po.fieldName}" name="${po.fieldName}"></select>
</div>
</div>
<#elseif po.showType=='popup'>
<div class="col-xs-12 col-sm-6 col-md-4">
<label for="${po.fieldName}">${po.content}</label>
<div class="input-group" style="width: 100%">
<input type="text" class="form-control input-sm" id="${po.fieldName}" name="${po.fieldName}" <#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if>/>
</div>
</div>
<#else>
<#if po.queryMode =='group'>
<div class="col-xs-12 col-sm-6 col-md-4">
@ -208,9 +215,9 @@
<#list columns as po>
<#if po.isQuery =='Y'>
<#if po.showType=='checkbox'||po.showType=='radio'>
loadSearchFormDicts($("#${entityName?uncap_first}Form").find(".${po.fieldName}-search"),${entityName?uncap_first}ListdictsData.${po.dictField},"${po.showType}","${po.fieldName}");
loadSearchFormDicts($("#searchForm").find(".${po.fieldName}-search"),${entityName?uncap_first}ListdictsData.${po.dictField},"${po.showType}","${po.fieldName}");
<#elseif po.showType=='select' || po.showType=='list'>
loadSearchFormDicts($("#${entityName?uncap_first}Form").find("select[name='${po.fieldName}']"),${entityName?uncap_first}ListdictsData.${po.dictField},"select");
loadSearchFormDicts($("#searchForm").find("select[name='${po.fieldName}']"),${entityName?uncap_first}ListdictsData.${po.dictField},"select");
</#if>
</#if>
</#list>
@ -355,7 +362,7 @@
field : '<#list columns as po>${po.fieldName},</#list>'
};
var params = $("#${entityName?uncap_first}Form").serializeArray();
var params = $("#searchForm").serializeArray();
for (x in params) {
temp[params[x].name] = params[x].value;
}
@ -373,7 +380,7 @@
}
function searchRest() {
$('#${entityName?uncap_first}Form').find(':input').each(function() {
$('#searchForm').find(':input').each(function() {
if("checkbox"== $(this).attr("type")){
$("input:checkbox[name='" + $(this).attr('name') + "']").attr('checked',false);
}else if("radio"== $(this).attr("type")){
@ -382,10 +389,10 @@
$(this).val("");
}
});
$('#${entityName?uncap_first}Form').find("input[type='checkbox']").each(function() {
$('#searchForm').find("input[type='checkbox']").each(function() {
$(this).attr('checked', false);
});
$('#${entityName?uncap_first}Form').find("input[type='radio']").each(function() {
$('#searchForm').find("input[type='radio']").each(function() {
$(this).attr('checked', false);
});
reloadTable();

@ -460,15 +460,23 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -26,7 +26,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<div class="container" style="width:100%;">
@ -66,6 +66,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -127,6 +131,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -26,7 +26,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<div class="container" style="width:100%;">
@ -66,6 +66,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${entityName?uncap_first}.${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control" maxlength="${po.length?c}" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -129,6 +133,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span> </span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" value='${'$'}{${entityName?uncap_first}.${po.fieldName}}' type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -33,7 +33,7 @@
<div class="accordion-inner">
<div class="panel panel-default" style="margin-bottom: 0px;">
<div class="panel-body">
<form id="${entityName?uncap_first}Form" onkeydown="if(event.keyCode==13){doSearch();return false;}">
<form id="searchForm" onkeydown="if(event.keyCode==13){doSearch();return false;}">
<#list columns as po>
<#if po.isQuery =='Y'>
<#if po.showType?index_of("datetime")!=-1>
@ -193,10 +193,10 @@
<#assign optionCodes="">
<#list columns as po>
<#if po.showType=='checkbox' || po.showType=='radio' || po.showType=='select' || po.showType=='list'>
<#if optionCodes?index_of(po.dictField) lt 0>
<#assign optionCodes=optionCodes+","+po.dictField >
<#if optionCodes?index_of(po.fieldName) lt 0>
<#assign optionCodes=optionCodes+","+po.fieldName >
promiseArr.push(new Promise(function(resolve, reject) {
initDictByCode(${entityName?uncap_first}ListdictsData,"${po.dictField}",resolve);
initDictByCode(${entityName?uncap_first}ListdictsData,"${po.dictField}",promiseArr,"${po.dictTable}","${po.dictText}");
}));
</#if>
</#if>
@ -206,9 +206,9 @@
<#list columns as po>
<#if po.isQuery =='Y'>
<#if po.showType=='checkbox'||po.showType=='radio'>
loadSearchFormDicts($("#${entityName?uncap_first}Form").find(".${po.fieldName}-search"),${entityName?uncap_first}ListdictsData.${po.dictField},"${po.showType}","${po.fieldName}");
loadSearchFormDicts($("#searchForm").find(".${po.fieldName}-search"),"${po.dictTable}","${po.dictField}","${po.showType}","${po.fieldName}");
<#elseif po.showType=='select' || po.showType=='list'>
loadSearchFormDicts($("#${entityName?uncap_first}Form").find("select[name='${po.fieldName}']"),${entityName?uncap_first}ListdictsData.${po.dictField},"select");
loadSearchFormDicts($("#searchForm").find("select[name='${po.fieldName}']"),"${po.dictTable}","${po.dictField}","select","${po.content}");
</#if>
</#if>
</#list>
@ -305,7 +305,7 @@
}
<#elseif po.showType=='checkbox' || po.showType=='radio' || po.showType=='select' || po.showType=='list'>
formatter : function(value, rec, index) {
return listDictFormat(value,${entityName?uncap_first}ListdictsData.${po.dictField});
return listDictFormat(value,"${po.dictField}","${po.dictTable}");
}
<#elseif po.showType=='image' ||po.showType=='file'>
formatter:function(value,rec,index){
@ -353,7 +353,7 @@
field : '<#list columns as po>${po.fieldName},</#list>'
};
var params = $("#${entityName?uncap_first}Form").serializeArray();
var params = $("#searchForm").serializeArray();
for (x in params) {
temp[params[x].name] = params[x].value;
}
@ -371,7 +371,7 @@
}
function searchRest() {
$('#${entityName?uncap_first}Form').find(':input').each(function() {
$('#searchForm').find(':input').each(function() {
if("checkbox"== $(this).attr("type")){
$("input:checkbox[name='" + $(this).attr('name') + "']").attr('checked',false);
}else if("radio"== $(this).attr("type")){
@ -380,10 +380,10 @@
$(this).val("");
}
});
$('#${entityName?uncap_first}Form').find("input[type='checkbox']").each(function() {
$('#searchForm').find("input[type='checkbox']").each(function() {
$(this).attr('checked', false);
});
$('#${entityName?uncap_first}Form').find("input[type='radio']").each(function() {
$('#searchForm').find("input[type='radio']").each(function() {
$(this).attr('checked', false);
});
reloadTable();
@ -416,8 +416,13 @@
}
//列表数据字典项格式化
function listDictFormat(value,dicts){
function listDictFormat(value,code,table){
if (!value) return '';
var dictKey = code;
if(code=="id"){
dictKey = table+code;
}
var dicts = ${entityName?uncap_first}ListdictsData[dictKey];
var valArray = value.split(',');
var showVal = '';
if (valArray.length > 1) {
@ -449,27 +454,43 @@
}
//加载字典数据
function initDictByCode(dictObj,code,callback){
function initDictByCode(dictObj,code,promiseArr,table,text){
var dictKey = code;
if(code=="id"){
//如果当前dictcode为id那么此处的字典对象对应的key为"表名+id"
dictKey = table+code;
}
if(!dictObj[code]){
jQuery.ajax({
url: "systemController.do?typeListJson&typeGroupName="+code,
var url = "systemController.do?typeListJson&typeGroupName="+code;
if(table){
url += "&dicTable="+table+"&dicText="+text;
}
var dictAjax = jQuery.ajax({
url:url,
type:"GET",
dataType:"JSON",
success: function (back) {
if(back.success){
dictObj[code]= back.obj;
dictObj[dictKey]= back.obj;
}
callback();
}
});
promiseArr.push(dictAjax);
}
}
//加载form查询数据字典项
function loadSearchFormDicts(obj,arr,type,name){
function loadSearchFormDicts(obj,table,code,type,name){
var html = "";
var dictKey = code;
if(code=="id"){
dictKey = table+code;
}
var arr = ${entityName?uncap_first}ListdictsData[dictKey];
for(var a = 0;a < arr.length;a++){
if("select"== type){
if(a==0){
html+="<option value = '' style='display: none'> 请选择"+name+"</option>";
}
html+="<option value = '"+arr[a].typecode+"'>"+arr[a].typename+"</option>";
}else{
if(!arr[a].typecode){

@ -477,11 +477,19 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -292,7 +292,11 @@ function resetTrNum(tableId) {
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -322,6 +322,14 @@ function resetTrNum(tableId) {
if (onclick_str.indexOf("#index#") >= 0){
$this.attr("onclick",onclick_str.replace(/#index#/g,i));
}else{
<#-- update--begin--author:zhoujf date:20180827 forTASK #3064 popup控件实现 -->
var s = onclick_str.indexOf("[");
var e = onclick_str.indexOf("]");
var new_onclick_str = onclick_str.substring(s+1,e);
if(new_onclick_str!=''){
$this.attr("onclick",onclick_str.replace(new_onclick_str,i));
}
<#-- update--end--author:jiaqiankun date:20180710 forTASK #3064 popup控件实现 -->
}
}
if(validtype_str!=null){

@ -460,15 +460,23 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -26,7 +26,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<div class="container" style="width:100%;">
@ -66,6 +66,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -127,6 +131,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span></span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -26,7 +26,7 @@
<#assign hasDateTime=1>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;">
<div class="container" style="width:100%;">
@ -66,6 +66,10 @@
<input name="${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${entityName?uncap_first}.${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#elseif po.showType=='file' || po.showType=='image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input name="${po.fieldName}" type="text" class="form-control" maxlength="${po.length?c}" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
@ -129,6 +133,10 @@
<span class="input-group-addon" ><span class="glyphicon glyphicon-calendar"></span> </span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value = "${'$'}{${entityName?uncap_first}.${po.fieldName}}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" value='${'$'}{${entityName?uncap_first}.${po.fieldName}}' type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -456,14 +456,22 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful方法封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}",method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2400 【功能不足】一对多restful接口不足目前只返回主表的数据应该把主子表的数据一起返回 -->
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -426,15 +426,23 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -594,14 +594,22 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful方法封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}",method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2400 【功能不足】一对多restful接口不足目前只返回主表的数据应该把主子表的数据一起返回 -->
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -124,7 +124,7 @@
<!-- 主表 margin-bottom:6px;border-bottom:2px solid rgb(0, 116, 101) 375 -->
<div title="${ftl_description}" data-options="iconCls:'icon-ok',selected:true" >
<div id="easyui_mainList" class="resize-y-iframe" style="height:286px;padding-bottom:6px;">
<iframe id="mainList" src="${entityName?uncap_first}Controller.do?mainList" height="99%" width="100%" frameborder="0"></iframe>
<iframe id="mainList" src="" height="99%" width="100%" frameborder="0"></iframe>
</div>
</div>
</div>
@ -151,7 +151,7 @@
<div id="tabsok" style="height:500px">
<#list subtables as key>
<div title="${subsG['${key}'].ftlDescription}" data-options="closable:false" style="overflow:hidden;box-sizing: border-box;">
<iframe id="${subsG['${key}'].entityName?uncap_first}Iframe" src="${subsG['${key}'].entityName?uncap_first}Controller.do?list" scrolling="yes" frameborder="0" height="100%" width="100%"></iframe>
<iframe id="${subsG['${key}'].entityName?uncap_first}Iframe" src="" scrolling="yes" frameborder="0" height="100%" width="100%"></iframe>
</div>
</#list>
</div>
@ -179,6 +179,7 @@
<script type="text/javascript">
$(function(){
$("#mainList").attr("src","${'$'}{webRoot}/${entityName?uncap_first}Controller.do?mainList");
initdivwidth();
$(window).resize(function(){
initdivwidth();

@ -487,14 +487,22 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful方法封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}",method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2400 【功能不足】一对多restful接口不足目前只返回主表的数据应该把主子表的数据一起返回 -->
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -421,25 +421,6 @@ function ExportXls() {
JeecgExcelExport("${entityName?uncap_first}Controller.do?exportXls","${entityName?uncap_first}List");
}
<#-- update--end--Author:gj_shaojc Date:20180608 forTASK #2779 【代码生成器模板】闫东版本代码生成器存在问题问题1 -->
//列表文件图片 列格式化方法
function listFileImgFormat(value,type){
var href='';
if(value==null || value.length==0){
return href;
}
var value1 = "img/server/"+value;
if("image"==type){
href+="<img src='"+value1+"' width=30 height=30 onmouseover='tipImg(this)' onmouseout='moveTipImg()' style='vertical-align:middle'/>";
}else{
if(value.indexOf(".jpg")>-1 || value.indexOf(".gif")>-1 || value.indexOf(".png")>-1){
href+="<img src='"+value1+"' onmouseover='tipImg(this)' onmouseout='moveTipImg()' width=30 height=30 style='vertical-align:middle'/>";
}else{
var value2 = "img/server/"+value+"?down=true";
href+="<a href='"+value2+"' class='ace_button' style='text-decoration:none;' target=_blank><u><i class='fa fa-download'></i>点击下载</u></a>";
}
}
return href;
}
</script>
</body>
</html>

@ -464,15 +464,23 @@ public class ${entityName}Controller extends BaseController {
<#if cgformConfig.supportRestful?? && cgformConfig.supportRestful == "1">
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -18,7 +18,7 @@
<#break>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;margin-top: 20px">
<form id="formobj" action="${entityName?uncap_first}Controller.do?doAdd" class="form-horizontal validform" role="form" method="post">
@ -44,6 +44,10 @@
</span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval=""/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -18,7 +18,7 @@
<#break>
</#if>
</#list>
<t:base type="bootstrap,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
<t:base type="bootstrap,bootstrap-table,layer,validform,<#if uploadFlag==1>webuploader,</#if>bootstrap-form"></t:base>
</head>
<body style="overflow:hidden;overflow-y:auto;margin-top: 20px">
<form id="formobj" action="${entityName?uncap_first}Controller.do?doUpdate" class="form-horizontal validform" role="form" method="post">
@ -51,6 +51,10 @@
</span>
<#elseif po.showType=='file' || po.showType == 'image'>
<@webuploadtag po = po defval="${'$'}{${entityName?uncap_first}Page.${po.fieldName}}"/>
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control input-sm" value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#else>
<input id="${po.fieldName}" name="${po.fieldName}" value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' type="text" maxlength="${po.length?c}" class="form-control input-sm" placeholder="请输入${po.content}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
</#if>

@ -124,8 +124,10 @@ $(function(){
<#assign optionCodes="">
<#list columns as po>
<#if po.showType=='checkbox' || po.showType=='radio' || po.showType=='select' || po.showType=='list'>
<#if optionCodes?index_of(po.dictField) lt 0>
<#assign optionCodes=optionCodes+","+po.dictField >
<#-- update-begin-Author:LiShaoQing date:20180823 for:多个控件只生成一个格式化,将po.dictField改为po.fileName -->
<#if optionCodes?index_of(po.fieldName) lt 0>
<#assign optionCodes=optionCodes+","+po.fieldName >
<#-- update-end-Author:LiShaoQing date:20180823 for:多个控件只生成一个格式化,将po.dictField改为po.fileName -->
<#if po.dictTable?if_exists?html!="">
<#if po.showType=='popup'><#rt/>
<#else><#rt/>
@ -407,26 +409,6 @@ function listDictFormat(value,code,table){
}
return showVal;
}
//列表文件图片 列格式化方法
function listFileImgFormat(value,type){
var href='';
if(value==null || value.length==0){
return href;
}
var value1 = "img/server/"+value;
if("image"==type){
href+="<img src='"+value1+"' width=30 height=30 onmouseover='tipImg(this)' onmouseout='moveTipImg()' style='vertical-align:middle'/>";
}else{
if(value.indexOf(".jpg")>-1 || value.indexOf(".gif")>-1 || value.indexOf(".png")>-1){
href+="<img src='"+value1+"' onmouseover='tipImg(this)' onmouseout='moveTipImg()' width=30 height=30 style='vertical-align:middle'/>";
}else{
var value2 = "img/server/"+value+"?down=true";
href+="<a href='"+value2+"' class='ace_button' style='text-decoration:none;' target=_blank><u><i class='fa fa-download'></i>点击下载</u></a>";
}
}
return href;
}
</script>
<#if (cgformConfig.listJs.cgJsStr)?? && cgformConfig.listJs.cgJsStr!="">
<script type="text/javascript">

@ -467,14 +467,22 @@ public class ${entityName}Controller extends BaseController {
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful方法封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}",method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2400 【功能不足】一对多restful接口不足目前只返回主表的数据应该把主子表的数据一起返回 -->
public ResponseMessage<List<${entityName}Page>> list() {
List<${entityName}Entity> list= ${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Page>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize>Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
List<${entityName}Page> pageList=new ArrayList<${entityName}Page>();
if(list!=null&&list.size()>0){
for(${entityName}Entity entity:list){

@ -41,8 +41,7 @@
</style>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<#if callbackFlag == true>
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
<t:base type="uploadify"></t:base>
</#if>
<script type="text/javascript">
$(document).ready(function(){

@ -41,8 +41,7 @@
</style>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<#if callbackFlag == true>
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
<t:base type="uploadify"></t:base>
</#if>
<script type="text/javascript">
$(document).ready(function(){

@ -461,15 +461,23 @@ public class ${entityName}Controller extends BaseController {
<#-- 列为文件类型的文件代码生成 -->
<#-- update--begin--author:zhangjiaqiang date:20171113 for:restful接口封装 -->
<#-- restful 通用方法生成 -->
@RequestMapping(method = RequestMethod.GET)
<#-- update-begin-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value="/list/{pageNo}/{pageSize}", method = RequestMethod.GET)
@ResponseBody
<#-- update--begin--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
@ApiOperation(value="${ftl_description}列表信息",produces="application/json",httpMethod="GET")
<#-- update--end--author:zhangjiaqiang date:20171031 for:TASK #2397 【新功能】代码生成器模板修改追加swagger-ui注解 -->
public ResponseMessage<List<${entityName}Entity>> list() {
List<${entityName}Entity> list${entityName}s=${entityName?uncap_first}Service.getList(${entityName}Entity.class);
public ResponseMessage<List<${entityName}Entity>> list(@PathVariable("pageNo") int pageNo, @PathVariable("pageSize") int pageSize, HttpServletRequest request) {
if(pageSize > Globals.MAX_PAGESIZE){
return Result.error("每页请求不能超过" + Globals.MAX_PAGESIZE + "条");
}
CriteriaQuery query = new CriteriaQuery(${entityName}Entity.class);
query.setCurPage(pageNo<=0?1:pageNo);
query.setPageSize(pageSize<1?1:pageSize);
List<${entityName}Entity> list${entityName}s = this.${entityName?uncap_first}Service.getListByCriteriaQuery(query,true);
return Result.success(list${entityName}s);
}
<#-- update-end-Author:LiShaoQing Date:20180828 for: TASK #3105 【代码生成器】代码生成rest接口 list获取改造 -->
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody

@ -20,8 +20,7 @@
<title>${ftl_description}</title>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<#if callbackFlag == true>
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
<t:base type="uploadify"></t:base>
</#if>
<#if cgformConfig.cgFormHead.isTree == 'Y'>
<style type="text/css">

@ -20,8 +20,7 @@
<title>${ftl_description}</title>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<#if callbackFlag == true>
<link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css" />
<script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.js"></script>
<t:base type="uploadify"></t:base>
</#if>
<#if cgformConfig.cgFormHead.isTree == 'Y'>
<style type="text/css">

@ -1,22 +1,22 @@
<#-- 表单列表当中每一列的处理 -->
<#macro formControl po namepre = "" valuepre = "" style="">
<#if po.showType == "text">
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> style="width:150px" maxlength="${po.length?c}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${namepre}id"/>/>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> style="width:150px" maxlength="${po.length?c}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${namepre}id"/>/>
<#rt/>
<#elseif po.showType=='password'>
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> style="width:150px" maxlength="${po.length?c}" type="password" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> style="width:150px" maxlength="${po.length?c}" type="password" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<#rt/>
<#elseif po.showType=='select' || po.showType=='list'>
<t:dictSelect field="${namepre}${po.fieldName}" type="${po.showType?if_exists?html}" extendJson="{class:'form-control',style:'width:150px !important'}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> <#if valuepre != ""> defaultVal="${'$'}{${valuepre}${po.fieldName}}" </#if> hasLabel="false" title="${po.content}"></t:dictSelect>
<t:dictSelect id="${namepre}${po.fieldName}" field="${namepre}${po.fieldName}" type="${po.showType?if_exists?html}" extendJson="{class:'form-control',style:'width:150px !important'}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> <#if valuepre != ""> defaultVal="${'$'}{${valuepre}${po.fieldName}}" </#if> hasLabel="false" title="${po.content}"></t:dictSelect>
<#rt/>
<#elseif po.showType=='radio' || po.showType=='checkbox'>
<t:dictSelect field="${namepre}${po.fieldName}" type="${po.showType?if_exists?html}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> <#if valuepre != ""> defaultVal="${'$'}{${valuepre}${po.fieldName}}" </#if> hasLabel="false" title="${po.content}"></t:dictSelect>
<t:dictSelect id="${namepre}${po.fieldName}" field="${namepre}${po.fieldName}" type="${po.showType?if_exists?html}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" /> <#if valuepre != ""> defaultVal="${'$'}{${valuepre}${po.fieldName}}" </#if> hasLabel="false" title="${po.content}"></t:dictSelect>
<#rt/>
<#elseif po.showType=='date'>
<input name="${namepre}${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" onClick="WdatePicker()" style="width:150px;background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value='<fmt:formatDate value='${'$'}{${valuepre}${po.fieldName}}' type="date" pattern="yyyy-MM-dd"/>'/>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" onClick="WdatePicker()" style="width:150px;background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value='<fmt:formatDate value='${'$'}{${valuepre}${po.fieldName}}' type="date" pattern="yyyy-MM-dd"/>'/>
<#rt/>
<#elseif po.showType=='datetime'>
<input name="${namepre}${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:150px;background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value='<fmt:formatDate value='${'$'}{${valuepre}${po.fieldName}}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>'/>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width:150px;background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value='<fmt:formatDate value='${'$'}{${valuepre}${po.fieldName}}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>'/>
<#rt/>
<#elseif po.showType=='popup'>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" type="text" class="form-control" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> style="width:150px" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /><#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if>/>
@ -24,7 +24,7 @@
<#elseif po.showType=='file' || po.showType == 'image'>
<#if style == "onetomany">
<input onclick="onetomanyUpload('${namepre}${po.fieldName}')" class="file-upload-btn" type="button" value="上传附件" />
<input type="hidden" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if>/>
<input id="${namepre}${po.fieldName}" type="hidden" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if>/>
<#if valuepre != "">
<a target="_blank" class="file-down-btn"<#rt/>
<c:if test="${'$'}{not empty ${valuepre}${po.fieldName}}"><#rt/>
@ -40,6 +40,6 @@
</#if>
<#rt/>
<#else>
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> maxlength="${po.length?c}" type="text" class="form-control" style="width:150px" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> maxlength="${po.length?c}" type="text" class="form-control" style="width:150px" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
</#if>
</#macro>

@ -1,36 +1,36 @@
<#-- bootstrap表单列表当中每一列的处理 TODO-后期可以和上面那个合并 -->
<#macro formControlbt po namepre = "" valuepre = "" tablestyle = "" tpl="">
<#if po.showType=='textarea'>
<textarea name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> class="form-control input-sm" rows="6" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>></textarea>
<textarea id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> class="form-control input-sm" rows="6" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>></textarea>
<#elseif po.showType=='text'>
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
<#elseif po.showType=='password'>
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="password" maxlength="${po.length?c}" class="form-control input-sm"<@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>/>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="password" maxlength="${po.length?c}" class="form-control input-sm"<@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>/>
<#elseif po.showType=='radio'>
<div style="padding-top:5px">
<t:dictSelect field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> <#if tpl=='1'>extendJson="{class:'i-checks-tpl'}"<#else>extendJson="{class:'i-checks'}"</#if> type="radio" hasLabel="false" title="${po.content}" <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
<t:dictSelect id="${namepre}${po.fieldName}" field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> <#if tpl=='1'>extendJson="{class:'i-checks-tpl'}"<#else>extendJson="{class:'i-checks'}"</#if> type="radio" hasLabel="false" title="${po.content}" <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
</div>
<#elseif po.showType=='select' || po.showType=='list'>
<t:dictSelect field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="select" hasLabel="false" title="${po.content}" extendJson="{class:'form-control input-sm'}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
<t:dictSelect id="${namepre}${po.fieldName}" field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="select" hasLabel="false" title="${po.content}" extendJson="{class:'form-control input-sm'}" <@datatype inputCheck="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
<#elseif po.showType=='checkbox'>
<div style="padding-top:5px">
<t:dictSelect field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> <#if tpl=='1'>extendJson="{class:'i-checks-tpl'}"<#else>extendJson="{class:'i-checks'}"</#if> type="checkbox" hasLabel="false" title="${po.content}" <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
<t:dictSelect id="${namepre}${po.fieldName}" field="${namepre}${po.fieldName}" <#if valuepre != "">defaultVal = "${'$'}{${valuepre}${po.fieldName}}"</#if> <#if tpl=='1'>extendJson="{class:'i-checks-tpl'}"<#else>extendJson="{class:'i-checks'}"</#if> type="checkbox" hasLabel="false" title="${po.content}" <@dictInfo dictTable="${po.dictTable}" dictField="${po.dictField}" dictText="${po.dictText}" />></t:dictSelect>
</div>
<#elseif po.showType=='date'>
<#if tablestyle=='1'>
<input name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#else>
<div class="input-group input-group-sm">
<input name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-date" value="<fmt:formatDate pattern='yyyy-MM-dd' type='date' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
</#if>
<#elseif po.showType=='datetime'>
<#if tablestyle=='1'>
<input name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<#else>
<div class="input-group input-group-sm">
<input name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" type="text" class="form-control input-sm laydate-datetime" value="<fmt:formatDate pattern='yyyy-MM-dd HH:mm:ss' type='both' value='${'$'}{${valuepre}${po.fieldName}}'/>" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> />
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
</#if>
@ -40,7 +40,7 @@
<@webuploadtag po = po defval="${'$'}{${valuepre}${po.fieldName}}"/>
<#else>
<input onclick="onetomanyUpload('${namepre}${po.fieldName}')" class="btn btn-default" type="button" value="上传附件" />
<input type="hidden" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if>/>
<input id="${namepre}${po.fieldName}" type="hidden" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if>/>
<#if valuepre != "">
<a target="_blank" class=".btn-default"<#rt/>
<c:if test="${'$'}{not empty ${valuepre}${po.fieldName}}"><#rt/>
@ -53,7 +53,11 @@
</#if>
</#if>
<#-- update--end--author:liushaoqian Date:20180720 for:TASK #2959 【代码生成器模板】新模板Bootstrap 版本等模板,明细不支持上传附件 (统一改造) -->
<#-- update--begin--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<#elseif po.showType=='popup'>
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> <#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictText}','${po.dictField}','${po.dictTable}')"</#if>/>
<#else>
<input name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
<#-- update--end--author:zhoujf Date:20180827 for:TASK #3064 popup控件实现 -->
<input id="${namepre}${po.fieldName}" name="${namepre}${po.fieldName}" <#if valuepre != "">value = "${'$'}{${valuepre}${po.fieldName}}"</#if> type="text" class="form-control input-sm" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> />
</#if>
</#macro>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save