jeecg 3.7.3 新春版本发布

jeecg_3.7.3
zhangdaiscott@163.com 7 years ago
parent e9c7b2f8f6
commit cfe18083af

@ -1,7 +1,7 @@
JEECG 微云快速开发平台
===============
当前最新版本: 3.7.2发布日期20180125
当前最新版本: 3.7.3发布日期20180313
前言:
-----------------------------------
@ -74,7 +74,7 @@ JEECG
* <b>技术点二十一:</b>支持二级管理员,权限细化管理</br>
* <b>技术点二十二:</b>代码生成器支持resutful接口生成</br>
* JEECG V3.7.2, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* JEECG V3.7.3, 经过了专业压力测试,性能测试,保证后台数据的准确性和页面访问速度</br>
* 支持多种浏览器: IE, 火狐, Google 等</br>
* 支持数据库: Mysql,Oracle10g,Postgre,SqlServer等</br>
* 基础权限: 用户,角色,菜单权限,按钮权限,数据权限</br>

Binary file not shown.

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.2_oracle11g.dmp
imp scott/tiger@orcl file=jeecg_3.7.3_oracle11g.dmp
导入其他用户的表
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_3.7.2_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
imp jeecgos/jeecgos@orcl file=/opt/datatmp/jeecg_3.7.3_oracle11g.dmp fromuser=scott touser=jeecgos ignore=y commit=y buffer=300000000 feedback=10000
2. oracle、SqlServer脚步索引会有部分丢失为了系统性能请自行补加索引。

@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jeecgframework</groupId>
<artifactId>jeecg</artifactId>
<version>3.7.2</version>
<version>3.7.3</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<codegenerate.version>3.6.2</codegenerate.version>
<minidao.version>1.6.1</minidao.version>
<minidao.version>1.6.2</minidao.version>
<guava.version>16.0.1</guava.version>
<spring.version>4.0.9.RELEASE</spring.version>
@ -929,7 +929,7 @@
<dependency>
<groupId>org.p3framework</groupId>
<artifactId>jeecg-p3-biz-chat</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
<!-- begin 腾讯云-->
@ -1002,7 +1002,7 @@
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<!-- JWT end -->
<!-- JWT end -->
</dependencies>
<organization>
@ -1011,7 +1011,7 @@
</organization>
<build>
<plugins>
<!-- 多war开发Maven支持
<!-- 多war开发Maven支持-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@ -1025,7 +1025,7 @@
,%regex[^plug-in/Validform.+(?:(?&lt;!(?:-|\.)min)\.css)]
</warSourceExcludes>
</configuration>
</plugin>-->
</plugin>
<!-- tomcat插件 -->
<plugin>
@ -1091,8 +1091,8 @@
<skipTests>true</skipTests>
</configuration>
</plugin>
<!--<plugin>
YUI Compressor Maven压缩插件
<plugin>
<!-- YUI Compressor Maven压缩插件 -->
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.3.0</version>
@ -1105,21 +1105,21 @@
</execution>
</executions>
<configuration>
读取js,css文件采用UTF-8编码
<!-- 读取js,css文件采用UTF-8编码 -->
<encoding>UTF-8</encoding>
不显示js可能的错误
<!-- 不显示js可能的错误 -->
<jswarn>false</jswarn>
若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩
<!-- 若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩 -->
<force>false</force>
在指定的列号后插入新行
<!-- 在指定的列号后插入新行 -->
<linebreakpos>-1</linebreakpos>
压缩之前先执行聚合文件操作
<!-- 压缩之前先执行聚合文件操作 -->
<preProcessAggregates>true</preProcessAggregates>
压缩后保存文件后缀 无后缀
<!-- 压缩后保存文件后缀 无后缀 -->
<nosuffix>true</nosuffix>
源目录,即需压缩的根目录
<!-- 源目录,即需压缩的根目录 -->
<sourceDirectory>src/main/webapp/plug-in</sourceDirectory>
压缩js和css文件
<!-- 压缩js和css文件 -->
<includes>
<include>plug-in/**/*.js</include>
<include>plug-in/accordion/css/*.css</include>
@ -1128,7 +1128,7 @@
<include>plug-in/easyui/themes/default/*.css</include>
<include>plug-in/Validform/**/*.css</include>
</includes>
以下目录和文件不会被压缩
<!-- 以下目录和文件不会被压缩 -->
<excludes>
<exclude>plug-in/**/*.min.js</exclude>
<exclude>plug-in/**/*.dev.js</exclude>
@ -1136,7 +1136,7 @@
</excludes>
</configuration>
</plugin>-->
</plugin>
</plugins>
<finalName>jeecg</finalName>
<resources>

@ -71,7 +71,13 @@ public class JeecgFormDemoController extends BaseController {
public ModelAndView uitag(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_uitag");
}
@RequestMapping(params = "qrcode")
public ModelAndView qrcode(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_QRCode");
}
@RequestMapping(params = "formValidDemo")
public ModelAndView formValidDemo(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/form_valid");

@ -172,6 +172,234 @@ public class JeecgListDemoController extends BaseController {
return new ModelAndView("com/jeecg/demo/form_querysBuilder");
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "InstrumentDiagram")
public ModelAndView InstrumenDtiagram(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/InstrumentDiagram");
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "Schedule")
public ModelAndView Schedule(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/Schedule");
}
/**
* 1
* @param request
* @return
*/
@RequestMapping(params = "BarGraph1")
public ModelAndView BarGraph1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/BarGraph1");
}
/**
* 2
* @param request
* @return
*/
@RequestMapping(params = "BarGraph2")
public ModelAndView BarGraph2(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/BarGraph2");
}
/**
* 3
* @param request
* @return
*/
@RequestMapping(params = "BarGraph3")
public ModelAndView BarGraph3(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/BarGraph3");
}
/**
* 4
* @param request
* @return
*/
@RequestMapping(params = "BarGraph4")
public ModelAndView BarGraph4(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/BarGraph4");
}
/**
* 1
* @param request
* @return
*/
@RequestMapping(params = "funnelPlot1")
public ModelAndView funnelPlot1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/funnelPlot1");
}
/**
* 2
* @param request
* @return
*/
@RequestMapping(params = "funnelPlot2")
public ModelAndView funnelPlot2(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/funnelPlot2");
}
/**
* 线1
* @param request
* @return
*/
@RequestMapping(params = "lineChart1")
public ModelAndView lineChart1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/lineChart1");
}
/**
* 线2
* @param request
* @return
*/
@RequestMapping(params = "lineChart2")
public ModelAndView lineChart2(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/lineChart2");
}
/**
* 线3
* @param request
* @return
*/
@RequestMapping(params = "lineChart3")
public ModelAndView lineChart3(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/lineChart3");
}/**
* 线4
* @param request
* @return
*/
@RequestMapping(params = "lineChart4")
public ModelAndView lineChart4(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/lineChart4");
}/**
* 线5
* @param request
* @return
*/
@RequestMapping(params = "lineChart5")
public ModelAndView lineChart5(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/lineChart5");
}
/**
* 1
* @param request
* @return
*/
@RequestMapping(params = "PieChart1")
public ModelAndView PieChart1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/PieChart1");
}
/**
* 2
* @param request
* @return
*/
@RequestMapping(params = "PieChart2")
public ModelAndView PieChart2(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/PieChart2");
}
/**
* 1
* @param request
* @return
*/
@RequestMapping(params = "PointChart1")
public ModelAndView PointChart1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/PointChart1");
}
/**
* 2
* @param request
* @return
*/
@RequestMapping(params = "PointChart2")
public ModelAndView PointChart2(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/PointChart2");
}
/**
* 3
* @param request
* @return
*/
@RequestMapping(params = "PointChart3")
public ModelAndView PointChart3(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/PointChart3");
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "RectangularGraph")
public ModelAndView RectangularGraph(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/RectangularGraph");
}
/**
* 1
* @param request
* @return
*/
@RequestMapping(params = "other1")
public ModelAndView other1(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/other1");
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "TotalReport")
public ModelAndView TotalReport(HttpServletRequest request) {
return new ModelAndView("com/jeecg/demo/echartsDemo/TotalReport");
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "getTotalReport")
@ResponseBody
public String getTotalReport(HttpServletRequest request) {
List<Map<String,Object>> maplist=systemService.findForJdbc("select l.broswer broswer ,count(broswer) broswercount from t_s_log l group by l.broswer", null);
Long countSutent = systemService.getCountForJdbc("select count(*) from t_s_log where 1=1");
for(Map map:maplist){
Long personcount = Long.parseLong(map.get("broswercount").toString());
Double percentage = 0.0;
if (personcount != null && personcount.intValue() != 0) {
percentage = new Double(personcount)/countSutent;
}
map.put("rate", String.format("%.2f", percentage*100)+"%");
}
Long count = 0L;
if(JdbcDao.DATABSE_TYPE_SQLSERVER.equals(DBTypeUtil.getDBType())){
count = systemService.getCountForJdbcParam("select count(0) from (select l." +
" broswer ,count(broswer) broswercount from t_s_log l group by l.broswer) as t( broswer, broswercount)",null);
}else{
count = systemService.getCountForJdbcParam("select count(0) from (select l.broswer broswer ,count(broswer) broswercount from t_s_log l group by l.broswer)t",null);
}
StringBuffer strb =new StringBuffer();
strb.append("{\"title\": {\"text\": \"浏览器登录次数统计\",\"subtext\": \"测试数据\"},\"toolbox\": {\"show\": true,\"feature\": {\"restore\": {\"show\": true,\"title\": \"还原\"},\"saveAsImage\": {\"show\": true,\"title\": \"保存为图片\",\"type\": \"png\",\"lang\": [\"点击保存\"]},}},\"series\": [{\"data\": [");
for (Map map:maplist) {
strb.append("{\"value\": \" " +map.get("broswercount")+
"\",\"name\": \"" +map.get("broswer")+
"\"},");
}
strb.append("],\"type\": \"pie\"}]}");
String option =strb.toString();
return option;
}
/**
* datagrid
@ -193,7 +421,8 @@ public class JeecgListDemoController extends BaseController {
}
Long count = 0L;
if(JdbcDao.DATABSE_TYPE_SQLSERVER.equals(DBTypeUtil.getDBType())){
count = systemService.getCountForJdbcParam("select count(0) from (select l.broswer broswer ,count(broswer) broswercount from t_s_log l group by l.broswer) as t( broswer, broswercount)",null);
count = systemService.getCountForJdbcParam("select count(0) from (select l." +
" broswer ,count(broswer) broswercount from t_s_log l group by l.broswer) as t( broswer, broswercount)",null);
}else{
count = systemService.getCountForJdbcParam("select count(0) from (select l.broswer broswer ,count(broswer) broswercount from t_s_log l group by l.broswer)t",null);
}
@ -828,4 +1057,10 @@ public class JeecgListDemoController extends BaseController {
j.setMsg(message);
return j;
}
@RequestMapping(params = "echartDemo")
public ModelAndView echartDemo(HttpServletRequest req) {
return new ModelAndView("com/jeecg/demo/echartsDemo");
}
}

@ -68,7 +68,7 @@ import com.jeecg.superquery.util.SuperQueryUtil;
* @version V1.0
*
*/
@Api(value="JfromOrder",description="订单列表",tags="jfromOrderController")
//@Api(value="JfromOrder",description="订单列表",tags="jfromOrderController")
@Controller
@RequestMapping("/jfromOrderController")
public class JfromOrderController extends BaseController {
@ -382,7 +382,7 @@ public class JfromOrderController extends BaseController {
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="订单列表列表信息",produces="application/json",httpMethod="GET")
//@ApiOperation(value="订单列表列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<JfromOrderPage>> list() {
List<JfromOrderEntity> list= jfromOrderService.getList(JfromOrderEntity.class);
List<JfromOrderPage> pageList=new ArrayList<JfromOrderPage>();
@ -406,7 +406,7 @@ public class JfromOrderController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="根据ID获取订单列表信息",notes="根据ID获取订单列表信息",httpMethod="GET",produces="application/json")
//@ApiOperation(value="根据ID获取订单列表信息",notes="根据ID获取订单列表信息",httpMethod="GET",produces="application/json")
public ResponseMessage<?> get(@ApiParam(required=true,name="id",value="ID")@PathVariable("id") String id) {
JfromOrderEntity task = jfromOrderService.get(JfromOrderEntity.class, id);
if (task == null) {
@ -427,7 +427,7 @@ public class JfromOrderController extends BaseController {
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
@ApiOperation(value="创建订单列表")
//@ApiOperation(value="创建订单列表")
public ResponseMessage<?> create(@ApiParam(name="订单列表对象")@RequestBody JfromOrderPage jfromOrderPage, UriComponentsBuilder uriBuilder) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<JfromOrderPage>> failures = validator.validate(jfromOrderPage);
@ -452,7 +452,7 @@ public class JfromOrderController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
@ApiOperation(value="更新订单列表",notes="更新订单列表")
//@ApiOperation(value="更新订单列表",notes="更新订单列表")
public ResponseMessage<?> update(@RequestBody JfromOrderPage jfromOrderPage) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<JfromOrderPage>> failures = validator.validate(jfromOrderPage);
@ -478,7 +478,7 @@ public class JfromOrderController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
@ApiOperation(value="删除订单列表")
//@ApiOperation(value="删除订单列表")
public ResponseMessage<?> delete(@ApiParam(name="id",value="ID",required=true)@PathVariable("id") String id) {
logger.info("delete[{}]" + id);
// 验证

@ -76,7 +76,7 @@ import com.jeecg.superquery.util.SuperQueryUtil;
* @version V1.0
*
*/
@Api(value="SuperQueryMain",description="高级查询",tags="superQueryMainController")
//@Api(value="SuperQueryMain",description="高级查询",tags="superQueryMainController")
@Controller
@RequestMapping("/superQueryMainController")
public class SuperQueryMainController extends BaseController {
@ -431,7 +431,7 @@ public class SuperQueryMainController extends BaseController {
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="高级查询列表信息",produces="application/json",httpMethod="GET")
//@ApiOperation(value="高级查询列表信息",produces="application/json",httpMethod="GET")
public ResponseMessage<List<SuperQueryMainPage>> list() {
List<SuperQueryMainEntity> list= superQueryMainService.getList(SuperQueryMainEntity.class);
List<SuperQueryMainPage> pageList=new ArrayList<SuperQueryMainPage>();
@ -459,7 +459,7 @@ public class SuperQueryMainController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="根据ID获取高级查询信息",notes="根据ID获取高级查询信息",httpMethod="GET",produces="application/json")
//@ApiOperation(value="根据ID获取高级查询信息",notes="根据ID获取高级查询信息",httpMethod="GET",produces="application/json")
public ResponseMessage<?> get(@ApiParam(required=true,name="id",value="ID")@PathVariable("id") String id) {
SuperQueryMainEntity task = superQueryMainService.get(SuperQueryMainEntity.class, id);
if (task == null) {
@ -484,7 +484,7 @@ public class SuperQueryMainController extends BaseController {
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
@ApiOperation(value="创建高级查询")
//@ApiOperation(value="创建高级查询")
public ResponseMessage<?> create(@ApiParam(name="高级查询对象")@RequestBody SuperQueryMainPage superQueryMainPage, UriComponentsBuilder uriBuilder) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<SuperQueryMainPage>> failures = validator.validate(superQueryMainPage);
@ -510,7 +510,7 @@ public class SuperQueryMainController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
@ApiOperation(value="更新高级查询",notes="更新高级查询")
//@ApiOperation(value="更新高级查询",notes="更新高级查询")
public ResponseMessage<?> update(@RequestBody SuperQueryMainPage superQueryMainPage) {
//调用JSR303 Bean Validator进行校验如果出错返回含400错误码及json格式的错误信息.
Set<ConstraintViolation<SuperQueryMainPage>> failures = validator.validate(superQueryMainPage);
@ -537,7 +537,7 @@ public class SuperQueryMainController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseStatus(HttpStatus.NO_CONTENT)
@ApiOperation(value="删除高级查询")
//@ApiOperation(value="删除高级查询")
public ResponseMessage<?> delete(@ApiParam(name="id",value="ID",required=true)@PathVariable("id") String id) {
logger.info("delete[{}]" + id);
// 验证

@ -22,6 +22,17 @@ public final class Globals {
public static final Short User_Normal=1;//正常
public static final Short User_Forbidden=0;//禁用
public static final Short User_ADMIN=-1;//超级管理员
/**
* 1
*/
public static final String USER_TYPE_SYSTEM = "1";
/**
* 2
*
*/
public static final String USER_TYPE_INTERFACE = "2";
/**
*

@ -79,7 +79,7 @@ public enum SysThemesEnum {
public static SysThemesEnum toEnum(String style) {
if (StringUtil.isEmpty(style)) {
//默认风格
return FINEUI_STYLE;
return HPLUS;
}
for(SysThemesEnum item : SysThemesEnum.values()) {
if(item.getStyle().equals(style)) {
@ -87,7 +87,7 @@ public enum SysThemesEnum {
}
}
//默认风格
return FINEUI_STYLE;
return HPLUS;
}
public String toString() {

@ -1,13 +1,16 @@
package org.jeecgframework.core.timer;
import java.io.IOException;
import java.net.UnknownHostException;
import java.text.ParseException;
import java.util.List;
import javax.annotation.Resource;
import org.apache.http.client.ClientProtocolException;
import org.apache.log4j.Logger;
import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.util.HttpRequest;
import org.jeecgframework.core.util.IpUtil;
import org.jeecgframework.core.util.MyClassLoader;
import org.jeecgframework.p3.core.common.utils.StringUtil;
@ -22,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.CronTriggerBean;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject;
/**
@ -111,19 +116,88 @@ public class DynamicTask {
boolean isSuccess = start ? startTask(task) : endTask(task);
if(isSuccess){
task.setIsStart(start?"1":"0");
task.setIsEffect("1");
timeTaskService.updateEntitie(task);
systemService.addLog((start?"开启任务":"停止任务")+task.getTaskId(), Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
logger.info((start?"开启任务":"停止任务")+"-------TaskId:"+task.getTaskId()+"-------Describe:"+task.getTaskDescribe()+"-----ClassName:"+task.getClassName() );
}
return isSuccess;
}
/**
*
* @param task
* @return
*/
public boolean updateCronExpression(TSTimeTaskEntity task) {
try {
String newExpression = task.getCronExpression();
task = timeTaskService.get(TSTimeTaskEntity.class, task.getId());
//任务运行中
if("1".equals(task.getIsStart())){
CronTriggerBean trigger = (CronTriggerBean)schedulerFactory.getTrigger("cron_" + task.getId(), Scheduler.DEFAULT_GROUP);
String originExpression = trigger.getCronExpression();
//检查运行中的任务触发规则是否与新规则一致
if (!originExpression.equalsIgnoreCase(newExpression)) {
trigger.setCronExpression(newExpression);
schedulerFactory.rescheduleJob("cron_" + task.getId(), Scheduler.DEFAULT_GROUP, trigger);
}
}else{
//立即生效
List<String> ipList = IpUtil.getLocalIPList();
String runServerIp = task.getRunServerIp();
boolean isStart = task.getIsStart().equals("0");
boolean isSuccess = false;
if(ipList.contains(runServerIp) || StringUtil.isEmpty(runServerIp) || "本地".equals(runServerIp)){//当前服务器IP匹配成功
isSuccess = this.startOrStop(task ,isStart);
}else{
try {
String url = "http://" + task.getRunServer() + "/timeTaskController.do?remoteTask";//spring-mvc.xml
String param = "id=" + task.getId() + "&isStart=" + (isStart ? "1" : "0");
String jsonstr = HttpRequest.httpPost(url, param, false);
if (null != jsonstr && jsonstr.length() > 0) {
JSONObject json = (JSONObject) JSONObject.parse(jsonstr);
isSuccess = json.getBooleanValue("success");
}
} catch (ClientProtocolException e) {
logger.info("远程主机‘" + task.getRunServer() + "’响应超时");
return false;
} catch (IOException e) {
logger.info("远程主机‘"+task.getRunServer() + "’响应超时");
return false;
}
}
if(isSuccess){
/*task.setIsEffect("1");
task.setIsStart("1");
timeTaskService.updateEntitie(task);*/
systemService.addLog(("立即生效开启任务成功任务ID:") + task.getTaskId(), Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
logger.info(("立即生效开启任务成功任务ID:") + "-------TaskId:" + task.getTaskId() + "-------Describe:" + task.getTaskDescribe() + "-----ClassName:" + task.getClassName() );
return true;
}else{
systemService.addLog(("立即生效开启任务失败任务ID:") + task.getTaskId(), Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
logger.info(("立即生效开启任务失败任务ID:") + "-------TaskId:" + task.getTaskId() + "-------Describe:" + task.getTaskDescribe() + "-----ClassName:" + task.getClassName() );
return false;
}
}
} catch (SchedulerException e) {
logger.error("updateCronExpression SchedulerException" + " cron_" + task.getId() + e.getMessage());
} catch (ParseException e) {
logger.error("updateCronExpression ParseException" + " cron_" + task.getId() + e.getMessage());
}
return false;
}
/**
*
* @param task
* @return
*/
public boolean updateCronExpression(TSTimeTaskEntity task) {
/*public boolean updateCronExpression(TSTimeTaskEntity task) {
try {
String newExpression = task.getCronExpression();
@ -157,8 +231,8 @@ public class DynamicTask {
}
return false;
}
}*/
/**
*

@ -2,11 +2,9 @@ package org.jeecgframework.core.util;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.jeecgframework.core.enums.SysACEIconEnum;
import org.jeecgframework.web.system.pojo.base.TSFunction;
import org.jeecgframework.web.system.service.MutiLangServiceI;
/**
@ -732,7 +730,7 @@ public class ListtoMenu {
return dataString.toString();
}
/**
* @Title: getMutiLang
* @Description:
@ -741,10 +739,7 @@ public class ListtoMenu {
* @throws
*/
private static String getMutiLang(String functionName){
MutiLangServiceI mutiLangService = ApplicationContextUtil.getContext().getBean(MutiLangServiceI.class);
String lang_context = mutiLangService.getLang(functionName);
String lang_context = MutiLangUtil.getLang(functionName);
return lang_context;
}

@ -26,7 +26,7 @@ public class MutiLangSqlCriteriaUtil {
public static void assembleCondition(List<String> fieldLangKeyList, CriteriaQuery cq, String fieldName, String fieldValue) {
Map<String,String> fieldLangMap = new HashMap<String, String>();
for (String nameKey : fieldLangKeyList) {
String name = MutiLangUtil.getMutiLangInstance().getLang(nameKey);
String name = MutiLangUtil.getLang(nameKey);
fieldLangMap.put(nameKey, name);
}

@ -3,11 +3,11 @@ package org.jeecgframework.core.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jeecgframework.core.common.model.json.ComboTree;
import org.jeecgframework.web.system.pojo.base.MutiLangEntity;
import org.jeecgframework.web.system.service.MutiLangServiceI;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
/**
@ -15,8 +15,7 @@ import java.util.List;
* @author
*/
public class MutiLangUtil {
private static Log logger = LogFactory.getLog(StringUtil.class);
private static Log logger = LogFactory.getLog(MutiLangUtil.class);
/**
*
*
@ -24,7 +23,7 @@ public class MutiLangUtil {
* @return XXX
*/
public static String paramDelSuccess(String param_lang_key) {
String message = getMutiLangInstance().getLang("common.delete.success.param", param_lang_key);
String message = getLang("common.delete.success.param", param_lang_key);
return message;
}
@ -35,7 +34,7 @@ public class MutiLangUtil {
* @return XXX使
*/
public static String paramDelFail(String param_lang_key) {
String message = getMutiLangInstance().getLang("common.delete.fail.param", param_lang_key);
String message = getLang("common.delete.fail.param", param_lang_key);
return message;
}
@ -47,7 +46,7 @@ public class MutiLangUtil {
* @return XXX
*/
public static String paramUpdSuccess(String param_lang_key) {
String message = getMutiLangInstance().getLang("common.edit.success.param", param_lang_key);
String message = getLang("common.edit.success.param", param_lang_key);
return message;
}
@ -58,7 +57,7 @@ public class MutiLangUtil {
* @return XXX
*/
public static String paramUpdFail(String param_lang_key) {
String message = getMutiLangInstance().getLang("common.edit.fail.param", param_lang_key);
String message = getLang("common.edit.fail.param", param_lang_key);
return message;
}
@ -69,7 +68,7 @@ public class MutiLangUtil {
* @return XXX
*/
public static String paramAddSuccess(String param_lang_key) {
String message = getMutiLangInstance().getLang("common.add.success.param", param_lang_key);
String message = getLang("common.add.success.param", param_lang_key);
return message;
}
@ -86,7 +85,7 @@ public class MutiLangUtil {
{
ReflectHelper reflectHelper = new ReflectHelper(treeItem);
String lang_key = (String)reflectHelper.getMethodValue("text"); //treeItem.getText();
String lang_context = getMutiLangInstance().getLang(lang_key);
String lang_context = getLang(lang_key);
reflectHelper.setMethodValue("text", lang_context);
}
}
@ -97,7 +96,7 @@ public class MutiLangUtil {
* */
public static void setMutiComboTree(List<ComboTree> treeList){
for (ComboTree index : treeList) {
index.setText(getMutiLangInstance().getLang(index.getText()));
index.setText(getLang(index.getText()));
if (index.getChildren()!= null && index.getChildren().size() > 0 )
{
setMutiComboTree(index.getChildren());
@ -111,10 +110,9 @@ public class MutiLangUtil {
* @param lang_key
* @return truefalse
*/
public static boolean existLangKey(String lang_key)
{
List<MutiLangEntity> langKeyList = getMutiLangInstance().findByProperty(MutiLangEntity.class, "langKey", lang_key);
if(!langKeyList.isEmpty())
public static boolean existLangKey(String lang_key){
String langContext = ResourceUtil.mutiLangMap.get(lang_key + "_" + "zh-cn");
if(oConvertUtils.isNotEmpty(langContext))
{
return true;
}
@ -128,51 +126,73 @@ public class MutiLangUtil {
* @param lang_key
* @return truefalse
*/
public static boolean existLangKey(String lang_key,String langCode)
{
String hql = "from MutiLangEntity where langKey = '"+lang_key+"' and langCode = '"+langCode+"'";
List<MutiLangEntity> langKeyList = getMutiLangInstance().findByQueryString(hql);
if(!langKeyList.isEmpty())
public static boolean existLangKey(String lang_key,String langCode){
String langContext = ResourceUtil.mutiLangMap.get(lang_key + "_" + langCode);
if(oConvertUtils.isNotEmpty(langContext))
{
return true;
}
return false;
}
public static String doMutiLang(String title, String langArg){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long start = System.currentTimeMillis();
logger.info("================================ doMutiLang 开始时间:"+sdf.format(new Date())+"==============================");
String context = getLang(title, langArg);
long end = System.currentTimeMillis();
logger.info("=============================== doMutiLang 结束时间:"+sdf.format(new Date())+"==============================");
logger.info("================================ doMutiLang 耗时:"+(end-start)+"ms==============================");
return context;
}
/**
* context
*
* @param lang_context
* @return truefalse
* ()
* @param lanKey
* @param langArg
* @return
*/
public static boolean existLangContext(String lang_context)
{
List<MutiLangEntity> langContextList = getMutiLangInstance().findByProperty(MutiLangEntity.class, "langContext", lang_context);
if(!langContextList.isEmpty())
{
return true;
public static String getLang(String lanKey, String langArg) {
String langContext = "";
if(StringUtil.isEmpty(langArg)){
langContext = getLang(lanKey);
} else{
String[] argArray = langArg.split(",");
langContext = getLang(lanKey);
for(int i=0; i< argArray.length; i++){
String langKeyArg = argArray[i].trim();
String langKeyContext = getLang(langKeyArg);
langContext = StringUtil.replace(langContext, "{" + i + "}", langKeyContext);
}
}
return false;
return langContext;
}
/**
* MutiLangService
*
* @return mutiLangService
*
* @param langKey
* @return
*/
public static MutiLangServiceI getMutiLangInstance()
{
MutiLangServiceI mutiLangService = ApplicationContextUtil.getContext().getBean(MutiLangServiceI.class);
return mutiLangService;
}
public static String doMutiLang(String title, String langArg){
String context = getMutiLangInstance().getLang(title, langArg);
return context;
public static String getLang(String langKey){
//如果为空返回空串防止返回null
if(langKey==null){
return "";
}
HttpServletRequest request = ContextHolderUtils.getRequest();
String language = BrowserUtils.getBrowserLanguage(request);
if(request.getSession().getAttribute("lang") != null){
language = (String)request.getSession().getAttribute("lang");
}
String langContext = ResourceUtil.mutiLangMap.get(langKey + "_" + language);
if(StringUtil.isEmpty(langContext)){
langContext = ResourceUtil.mutiLangMap.get("common.notfind.langkey" + "_" + language);
if("null".equals(langContext)||langContext==null ||langKey.startsWith("?")){
langContext = "";
}
langContext = langContext + langKey;
}
return langContext;
}
/**
@ -201,7 +221,7 @@ public class MutiLangUtil {
ReflectHelper reflectHelper = new ReflectHelper(cloneObj);
for (String attribute : attributes) {
String lang_key = (String) reflectHelper.getMethodValue(attribute);
String lang_context = getMutiLangInstance().getLang(lang_key);
String lang_context = getLang(lang_key);
reflectHelper.setMethodValue(attribute, lang_context);
}
newList.add(cloneObj);

@ -9,8 +9,8 @@ import com.qcloud.cos.sign.Credentials;
public class QCloudUtils {
private static long appId = 1251108935;
private static String secretId = "?";
private static String secretKey = "?";
private static String secretId = "AKIDeCYoxueSxIQW0PHzVqz3NhuwoYN34Y7W";
private static String secretKey = "NkARfmtpcDnIgssupY7Zs0zpeMwCJJ9q";
private static String bucketName="jeecg";
private static Credentials cred=new Credentials(appId, secretId, secretKey);
private static ClientConfig clientConfig = new ClientConfig();

@ -55,13 +55,13 @@ public class ChooseTag extends TagSupport {
}
public StringBuffer end() {
String confirm = MutiLangUtil.getMutiLangInstance().getLang("common.confirm");
String cancel = MutiLangUtil.getMutiLangInstance().getLang("common.cancel");
String confirm = MutiLangUtil.getLang("common.confirm");
String cancel = MutiLangUtil.getLang("common.cancel");
String methodname = UUIDGenerator.generate().replaceAll("-", "");
StringBuffer sb = new StringBuffer();
sb.append("<a href=\"#\" class=\"easyui-linkbutton\" plain=\"true\" icon=\"" + icon + "\" onClick=\"choose_"+methodname+ StringUtil.replace("()\">{0}</a>", "{0}", MutiLangUtil.getMutiLangInstance().getLang("common.select", langArg)));
sb.append("<a href=\"#\" class=\"easyui-linkbutton\" plain=\"true\" icon=\"" + icon + "\" onClick=\"choose_"+methodname+ StringUtil.replace("()\">{0}</a>", "{0}", MutiLangUtil.getLang("common.select", langArg)));
if (isclear&&StringUtil.isNotEmpty(textname)) {
sb.append("<a href=\"#\" class=\"easyui-linkbutton\" plain=\"true\" icon=\"icon-redo\" onClick=\"clearAll_"+methodname+ StringUtil.replace("();\">{0}</a>", "{0}", MutiLangUtil.getMutiLangInstance().getLang("common.clear", langArg)));
sb.append("<a href=\"#\" class=\"easyui-linkbutton\" plain=\"true\" icon=\"icon-redo\" onClick=\"clearAll_"+methodname+ StringUtil.replace("();\">{0}</a>", "{0}", MutiLangUtil.getLang("common.clear", langArg)));
}
sb.append("<script type=\"text/javascript\">");
//--authorscott-----start----date:20170407--------for: 异常捕获避免js报错-------------

@ -32,7 +32,7 @@ public class DataGridConfOptTag extends TagSupport {
Tag t = findAncestorWithClass(this, DataGridTag.class);
DataGridTag parent = (DataGridTag) t;
parent.setConfUrl(url,MutiLangUtil.getMutiLangInstance().getLang(title),MutiLangUtil.getMutiLangInstance().getLang(message),exp,operationCode,urlStyle,urlclass,urlfont);
parent.setConfUrl(url,MutiLangUtil.getLang(title),MutiLangUtil.getLang(message),exp,operationCode,urlStyle,urlclass,urlfont);
return EVAL_PAGE;
}

@ -164,9 +164,9 @@ public class DepartSelectTag extends TagSupport {
}
sb.append("/>");
String commonDepartmentList = MutiLangUtil.getMutiLangInstance().getLang("common.department.list");
String commonConfirm = MutiLangUtil.getMutiLangInstance().getLang("common.confirm");
String commonCancel = MutiLangUtil.getMutiLangInstance().getLang("common.cancel");
String commonDepartmentList = MutiLangUtil.getLang("common.department.list");
String commonConfirm = MutiLangUtil.getLang("common.confirm");
String commonCancel = MutiLangUtil.getLang("common.cancel");
sb.append("<script type=\"text/javascript\">");
sb.append("function openDepartmentSelect() {");

@ -155,7 +155,7 @@ public class DictSelectTag extends TagSupport {
if (typeGroup != null) {
if (hasLabel) {
if (StringUtils.isBlank(this.title)) {
this.title = MutiLangUtil.getMutiLangInstance().getLang(typeGroup.getTypegroupname());
this.title = MutiLangUtil.getLang(typeGroup.getTypegroupname());
}
sb.append(this.title + ":");
sb.append("</label>");
@ -213,7 +213,7 @@ public class DictSelectTag extends TagSupport {
*/
private void text(String name, String code, StringBuffer sb) {
if (code.equals(this.defaultVal)) {
sb.append("<input name='"+field+"'"+" id='"+id+"' value='" + MutiLangUtil.getMutiLangInstance().getLang(name) + "' readOnly = 'readOnly' />");
sb.append("<input name='"+field+"'"+" id='"+id+"' value='" + MutiLangUtil.getLang(name) + "' readOnly = 'readOnly' />");
} else {
}
}
@ -253,7 +253,7 @@ public class DictSelectTag extends TagSupport {
this.datatype(sb);
sb.append(" />");
}
sb.append(MutiLangUtil.getMutiLangInstance().getLang(name));
sb.append(MutiLangUtil.getLang(name));
}
/**
@ -304,7 +304,7 @@ public class DictSelectTag extends TagSupport {
this.datatype(sb);
sb.append(" />");
}
sb.append(MutiLangUtil.getMutiLangInstance().getLang(name));
sb.append(MutiLangUtil.getLang(name));
}
/**
@ -322,7 +322,7 @@ public class DictSelectTag extends TagSupport {
} else {
sb.append(" <option value=\"" + code + "\">");
}
sb.append(MutiLangUtil.getMutiLangInstance().getLang(name));
sb.append(MutiLangUtil.getLang(name));
sb.append(" </option>");
}

@ -164,9 +164,9 @@ public class OrgSelectTag extends TagSupport {
}
sb.append("/>");
String commonDepartmentList = MutiLangUtil.getMutiLangInstance().getLang("common.department.list");
String commonConfirm = MutiLangUtil.getMutiLangInstance().getLang("common.confirm");
String commonCancel = MutiLangUtil.getMutiLangInstance().getLang("common.cancel");
String commonDepartmentList = MutiLangUtil.getLang("common.department.list");
String commonConfirm = MutiLangUtil.getLang("common.confirm");
String commonCancel = MutiLangUtil.getLang("common.cancel");
sb.append("<script type=\"text/javascript\">");
sb.append("function openOrgSelect() {");

@ -156,7 +156,7 @@ public class UploadTag extends JeecgTag {
+"var m = new Map();"
+ "$(function(){"
+"$(\'#"+id+"\').uploadify({"
+"buttonText:\'"+MutiLangUtil.getMutiLangInstance().getLang(buttonText)+"\',"
+"buttonText:\'"+MutiLangUtil.getLang(buttonText)+"\',"
+"auto:"+auto+","
+"progressData:\'speed\',"
+"multi:"+multi+","

@ -176,8 +176,8 @@ public class UserSelectTag extends TagSupport {
sb.append("/>");
}
String commonConfirm = MutiLangUtil.getMutiLangInstance().getLang("common.confirm");
String commonCancel = MutiLangUtil.getMutiLangInstance().getLang("common.cancel");
String commonConfirm = MutiLangUtil.getLang("common.confirm");
String commonCancel = MutiLangUtil.getLang("common.cancel");
sb.append("<script type=\"text/javascript\">");
sb.append("function openUserSelect() {");

@ -346,7 +346,7 @@ public class CgAutoListController extends BaseController{
// }
for(DictEntity dictEntity:dicDataList){
if(value.equalsIgnoreCase(dictEntity.getTypecode())){
r.put(bean.getFieldName(),MutiLangUtil.getMutiLangInstance().getLang(dictEntity.getTypename()));
r.put(bean.getFieldName(),MutiLangUtil.getLang(dictEntity.getTypename()));
break;
}
}

@ -11,7 +11,6 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.jeecgframework.core.common.exception.BusinessException;
import org.jeecgframework.core.util.JSONHelper;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.web.cgform.entity.config.CgFormHeadEntity;
import org.jeecgframework.web.cgform.service.autolist.CgTableServiceI;
@ -19,12 +18,22 @@ import org.jeecgframework.web.cgform.service.build.DataBaseService;
import org.jeecgframework.web.cgform.service.config.CgFormFieldServiceI;
import org.jeecgframework.web.cgform.util.TableJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Controller
@RequestMapping("/api/cgFormDataController")
@RequestMapping("/cgFormDataController")
@Api(value = "online表单服务", description = "online表单接口", tags = "onlineFormAPI")
public class CgFormDataController {
@Autowired
private DataBaseService dataBaseService;
@ -32,32 +41,32 @@ public class CgFormDataController {
private CgTableServiceI cgTableService;
@Autowired
private CgFormFieldServiceI cgFormFieldService;
/**
* key
*/
private static final String SIGN_KEY = "26F72780372E84B6CFAED6F7B19139CC47B1912B6CAED753";
///**签名密钥key*/
//private static final String SIGN_KEY = "26F72780372E84B6CFAED6F7B19139CC47B1912B6CAED753";
/**
* onlinegetFormInfo
*
* @return
*/
@RequestMapping(params = "getFormInfo")
//@RequestMapping(params = "getFormInfo")
@ApiOperation(value = "根据tableName和记录ID获取online表单详细信息", produces = "application/json", httpMethod = "GET")
@RequestMapping(value="/get/{tableName}/{id}",method = RequestMethod.GET)
@ResponseBody
public TableJson getFormInfo(String body, HttpServletRequest request, HttpServletResponse response) {
Map map = JSONHelper.json2Map(body);
public TableJson getFormInfo(@PathVariable("tableName") String tableName,@PathVariable("id") String id,HttpServletRequest request, HttpServletResponse response) {
//Map map = JSONHelper.json2Map(body);
TableJson j = new TableJson();
try {
// 参数校验
if (oConvertUtils.isEmpty(map.get("tableName"))) {
if (oConvertUtils.isEmpty(tableName)) {
throw new BusinessException("tableName不能为空");
}
if (oConvertUtils.isEmpty(map.get("id"))) {
if (oConvertUtils.isEmpty(id)) {
throw new BusinessException("id不能为空");
}
// 校验该表是否是online表单
String tableName = oConvertUtils.getString(map.get("tableName"));
String id = oConvertUtils.getString(map.get("id"));
//String tableName = oConvertUtils.getString(map.get("tableName"));
//String id = oConvertUtils.getString(map.get("id"));
CgFormHeadEntity head = cgFormFieldService.getCgFormHeadByTableName(tableName);
if (head == null) {
throw new BusinessException("该表单不是online表单");
@ -102,21 +111,23 @@ public class CgFormDataController {
*
* @return
*/
@RequestMapping(params = "deleteFormInfo")
//@RequestMapping(params = "deleteFormInfo")
@ApiOperation(value = "根据tableName和记录ID删除一条记录")
@RequestMapping(value="/delete/{tableName}/{id}",method = RequestMethod.DELETE)
@ResponseBody
public TableJson deleteFormInfo(String body, HttpServletRequest request, HttpServletResponse response) {
Map map = JSONHelper.json2Map(body);
public TableJson deleteFormInfo(@PathVariable("tableName") String tableName,@PathVariable("id") String id, HttpServletRequest request, HttpServletResponse response) {
//Map map = JSONHelper.json2Map(body);
TableJson j = new TableJson();
try {
// 参数校验
if (oConvertUtils.isEmpty(map.get("tableName"))) {
if (oConvertUtils.isEmpty(tableName)) {
throw new BusinessException("tableName不能为空");
}
if (oConvertUtils.isEmpty(map.get("id"))) {
if (oConvertUtils.isEmpty(id)) {
throw new BusinessException("id不能为空");
}
String tableName = oConvertUtils.getString(map.get("tableName"));
String id = oConvertUtils.getString(map.get("id"));
// String tableName = oConvertUtils.getString(map.get("tableName"));
//String id = oConvertUtils.getString(map.get("id"));
// 校验该表是否是online表单
CgFormHeadEntity head = cgFormFieldService.getCgFormHeadByTableName(tableName);
if (head == null) {
@ -142,10 +153,12 @@ public class CgFormDataController {
*
* @return
*/
@RequestMapping(params = "addFormInfo")
@ResponseBody
public TableJson addFormInfo(String body, HttpServletRequest request, HttpServletResponse response) {
Map map = JSONHelper.json2Map(body);
@RequestMapping(value = "add",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ApiOperation(value="增加一条记录")
@ResponseBody
public TableJson addFormInfo(@RequestBody JSONObject body,HttpServletRequest request, HttpServletResponse response) {
//Map map = JSONHelper.json2Map(body);
Map map = JSONObject.toJavaObject(body, Map.class);
TableJson j = new TableJson();
try {
// 参数校验
@ -222,10 +235,12 @@ public class CgFormDataController {
*
* @return
*/
@RequestMapping(params = "updateFormInfo")
@RequestMapping(value = "update",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ApiOperation(value="修改一条记录")
@ResponseBody
public TableJson updateFormInfo(String body, HttpServletRequest request, HttpServletResponse response) {
Map map = JSONHelper.json2Map(body);
public TableJson updateFormInfo(@RequestBody JSONObject body, HttpServletRequest request, HttpServletResponse response) {
//Map map = JSONHelper.json2Map(body);
Map map = JSONObject.toJavaObject(body, Map.class);
TableJson j = new TableJson();
try {
// 参数校验
@ -295,3 +310,4 @@ public class CgFormDataController {
return j;
}
}

@ -626,7 +626,7 @@ public class CgFormHeadController extends BaseController {
req.setAttribute("cgFormHeadPage", cgFormHead);
}
List<TSType> typeList = ResourceUtil.allTypes.get(MutiLangUtil.getMutiLangInstance().getLang("bdfl"));
List<TSType> typeList = ResourceUtil.allTypes.get(MutiLangUtil.getLang("bdfl"));
req.setAttribute("typeList", typeList);
return new ModelAndView("jeecg/cgform/config/cgFormHead");

@ -117,6 +117,7 @@ public class ExcelTempletController extends BaseController {
}
}
handlePageDic(beans, result);
//处理字典项
dealDic(result, beans);
//表的中文名称
sheetName = (String) configs.get(CgAutoListConstant.CONFIG_NAME);
@ -319,6 +320,10 @@ public class ExcelTempletController extends BaseController {
}
map.put("$mainTable$id", mainId);//为子表准备
if (isMainData) {
//处理字典项
dealDicForImport(mainData, lists);
mainData.put("id", mainId);//主表数据
dataBaseService.insertTable(configId, mainData);
}
@ -351,6 +356,10 @@ public class ExcelTempletController extends BaseController {
}
//设置子表记录ID
if (isSubData) {
//处理字典项
dealDicForImport(subData, subLists);
subData.put("id", UUIDGenerator.generate());
dataBaseService.insertTable(subConfigId, subData);
}
@ -435,7 +444,7 @@ public class ExcelTempletController extends BaseController {
String value = String.valueOf(r.get(bean.getFieldName()));
for (DictEntity dictEntity : dicDataList) {
if (value.equalsIgnoreCase(dictEntity.getTypecode())) {
r.put(bean.getFieldName(), MutiLangUtil.getMutiLangInstance().getLang(dictEntity.getTypename()));
r.put(bean.getFieldName(), MutiLangUtil.getLang(dictEntity.getTypename()));
}
}
}
@ -444,7 +453,36 @@ public class ExcelTempletController extends BaseController {
}
}
/**
*
* @param result
* @param beans
*/
@SuppressWarnings("unchecked")
private void dealDicForImport(Map result,List<CgFormFieldEntity> beans) {
for (CgFormFieldEntity bean : beans) {
String dicTable = bean.getDictTable();//字典Table
String dicCode = bean.getDictField();//字典Code
String dicText = bean.getDictText();//字典text
if (StringUtil.isEmpty(dicTable) && StringUtil.isEmpty(dicCode)) {
//不需要处理字典
continue;
} else {
if (!bean.getShowType().equals("popup")) {
List<DictEntity> dicDataList = queryDic(dicTable, dicCode, dicText);
String value = String.valueOf(result.get(bean.getFieldName()));
for (DictEntity dictEntity : dicDataList) {
if (value.equals(dictEntity.getTypename())) {
result.put(bean.getFieldName(), dictEntity.getTypecode());
}
}
}
}
}
}
private class CgFormExcelHandler extends ExcelDataHandlerDefaultImpl {
Map<String, CgFormFieldEntity> fieldMap;

@ -387,7 +387,7 @@ public class GenerateController extends BaseController {
if(listJsCopy!=null){
listJsCopy.setCgJsStr(listJsCopy.getCgJsStr().replace(fieldName, JeecgReadTable.formatField(fieldName)));
}
if(formJsCopy!=null){
if(formJsCopy!=null&&formJsCopy.getCgJsStr()!=null){
formJsCopy.setCgJsStr(formJsCopy.getCgJsStr().replace(fieldName, JeecgReadTable.formatField(fieldName)));
}
//online代码生成popup对应的字典字段进行java命名转换

@ -61,7 +61,13 @@
type="java.lang.String"
<#break>
<#case "Text">
type="text"
<#-- update--begin--author:scott Date:20180227 for:针对oracle情况下text类型采用clob转换 -->
<#if dataType=='ORACLE'>
type="clob"
<#else>
type="text"
</#if>
<#-- update--end--author:scott Date:20180227 for:针对oracle情况下text类型采用clob转换 -->
<#break>
<#case "int">
type="java.lang.Integer"

@ -63,7 +63,7 @@ public class DictDataTag implements TemplateDirectiveModel {
}
for(TSType s:dataList){
String names = s.getTypename();
s.setTypename(MutiLangUtil.getMutiLangInstance().getLang(names));
s.setTypename(MutiLangUtil.getLang(names));
}
env.setGlobalVariable(var, new SimpleCollection(dataList));
} else {

@ -127,8 +127,8 @@ public class CgformFtlEntity implements java.io.Serializable {
this.ftlVersion = ftlVersion;
}
/**
*: byte[]
*@return: byte[]
*:
*@return:
*/
@Lob
@Column(name ="FTL_CONTENT",nullable=true)
@ -137,8 +137,8 @@ public class CgformFtlEntity implements java.io.Serializable {
}
/**
*: byte[]
*@param: byte[]
*:
*@param:
*/
public void setFtlContent(String ftlContent){
this.ftlContent = ftlContent;

@ -32,6 +32,8 @@ public class DbTableOracleHandleImpl implements DbTableHandleI {
String result ="";
if (dataType.equalsIgnoreCase("varchar2")) {
result="string";
}if (dataType.equalsIgnoreCase("nvarchar2")) {
result="string";
} else if(dataType.equalsIgnoreCase("double")){
result="double";
}else if (dataType.equalsIgnoreCase("number") && digits==0) {
@ -44,6 +46,10 @@ public class DbTableOracleHandleImpl implements DbTableHandleI {
result="date";
}else if (dataType.equalsIgnoreCase("Datetime")) {
result="date";
}else if (dataType.equalsIgnoreCase("blob")) {
result="blob";
}else if (dataType.equalsIgnoreCase("clob")) {
result="text";
}
return result;
}
@ -86,8 +92,7 @@ public class DbTableOracleHandleImpl implements DbTableHandleI {
if (!datacolumnMeta.getIsNullable().equals(cgformcolumnMeta.getIsNullable())) {
isnull=(cgformcolumnMeta.getIsNullable().equals("Y")?"NULL":"NOT NULL");
}
if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("string")||cgformcolumnMeta.getColunmType().equalsIgnoreCase("text")){
if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("string")){
result = cgformcolumnMeta.getColumnName()+" varchar2("+cgformcolumnMeta.getColumnSize()+")"+isnull;
}else if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("date")){
@ -100,6 +105,10 @@ public class DbTableOracleHandleImpl implements DbTableHandleI {
result = cgformcolumnMeta.getColumnName()+" NUMBER("+cgformcolumnMeta.getColumnSize()+","+cgformcolumnMeta.getDecimalDigits()+") "+isnull;
}else if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("bigdecimal")){
result = cgformcolumnMeta.getColumnName()+" NUMBER("+cgformcolumnMeta.getColumnSize()+","+cgformcolumnMeta.getDecimalDigits()+") "+isnull;
}else if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("blob")){
result = cgformcolumnMeta.getColumnName()+" BLOB "+isnull;
}else if(cgformcolumnMeta.getColunmType().equalsIgnoreCase("text")){
result = cgformcolumnMeta.getColumnName()+" CLOB "+isnull;
}
result += (StringUtils.isNotEmpty(cgformcolumnMeta.getFieldDefault())?" DEFAULT "+cgformcolumnMeta.getFieldDefault():" ");
result += isnull;

@ -44,7 +44,9 @@ public class QueryParamUtil {
//单条件组装方式
String value = request.getParameter(b.getFieldName());
if(StringUtil.isEmpty(value)){
if(StringUtil.isEmpty(value)||"请输入关键字".equals(value)){
return;
}

@ -47,6 +47,116 @@ public class JformGraphreportHeadEntity implements java.io.Serializable {
@Excel(name = "扩展JS")
private String xpageJs;
/**创建时间*/
private java.util.Date createDate;
/**创建人ID*/
private java.lang.String createBy;
/**创建人名称*/
private java.lang.String createName;
/**修改时间*/
private java.util.Date updateDate;
/**修改人*/
private java.lang.String updateBy;
/**修改人名称*/
private java.lang.String updateName;
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="create_date",nullable=true)
public java.util.Date getCreateDate(){
return this.createDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setCreateDate(java.util.Date createDate){
this.createDate = createDate;
}
/**
*: java.lang.String
*@return: java.lang.String ID
*/
@Column(name ="create_by",nullable=true,length=32)
public java.lang.String getCreateBy(){
return this.createBy;
}
/**
*: java.lang.String
*@param: java.lang.String ID
*/
public void setCreateBy(java.lang.String createBy){
this.createBy = createBy;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="create_name",nullable=true,length=32)
public java.lang.String getCreateName(){
return this.createName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateName(java.lang.String createName){
this.createName = createName;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="update_date",nullable=true)
public java.util.Date getUpdateDate(){
return this.updateDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setUpdateDate(java.util.Date updateDate){
this.updateDate = updateDate;
}
/**
*: java.lang.String
*@return: java.lang.String ID
*/
@Column(name ="update_by",nullable=true,length=32)
public java.lang.String getUpdateBy(){
return this.updateBy;
}
/**
*: java.lang.String
*@param: java.lang.String ID
*/
public void setUpdateBy(java.lang.String updateBy){
this.updateBy = updateBy;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="update_name",nullable=true,length=32)
public java.lang.String getUpdateName(){
return this.updateName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateName(java.lang.String updateName){
this.updateName = updateName;
}
/**
*: java.lang.String
*@return: java.lang.String id

@ -171,7 +171,7 @@ public class DepartController extends BaseController {
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}else{
message = MutiLangUtil.getMutiLangInstance().getLang("common.department.hasuser");
message = MutiLangUtil.getLang("common.department.hasuser");
}
} else {

@ -171,7 +171,7 @@ public class FunctionController extends BaseController {
}
e.printStackTrace();
message=MutiLangUtil.getMutiLangInstance().getLang("common.menu.del.fail");
message=MutiLangUtil.getLang("common.menu.del.fail");
}
systemService.addLog(message, Globals.Log_Type_DEL,

@ -193,7 +193,7 @@ public class LogController extends BaseController {
Long count = systemService.getCountForJdbc("SELECT COUNT(1) FROM T_S_Log WHERE 1=1");
List lt = new ArrayList();
hc = new Highchart();
hc.setName(MutiLangUtil.getMutiLangInstance().getLang(USER_BROWSER_ANALYSIS));
hc.setName(MutiLangUtil.getLang(USER_BROWSER_ANALYSIS));
hc.setType(reportType);
Map<String, Object> map;
if (userBroswerList.size() > 0) {

@ -24,8 +24,10 @@ import org.jeecgframework.core.constant.Globals;
import org.jeecgframework.core.enums.SysThemesEnum;
import org.jeecgframework.core.util.ContextHolderUtils;
import org.jeecgframework.core.util.IpUtil;
import org.jeecgframework.core.util.JSONHelper;
import org.jeecgframework.core.util.ListtoMenu;
import org.jeecgframework.core.util.LogUtil;
import org.jeecgframework.core.util.MutiLangUtil;
import org.jeecgframework.core.util.NumberComparator;
import org.jeecgframework.core.util.PasswordUtil;
import org.jeecgframework.core.util.PropertiesUtil;
@ -49,6 +51,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
@ -57,6 +60,8 @@ import com.baomidou.kisso.SSOHelper;
import com.baomidou.kisso.SSOToken;
import com.baomidou.kisso.common.util.HttpUtil;
/**
*
* @author
@ -561,6 +566,84 @@ public class LoginController extends BaseController{
}
}
/**
*
*/
@RequestMapping(params = "getAutocomplete",method ={RequestMethod.GET, RequestMethod.POST})
public void getAutocomplete(HttpServletRequest request, HttpServletResponse response) {
String searchVal = request.getParameter("q");
//获取到session中的菜单列表
HttpSession session = ContextHolderUtils.getSession();
Client client = ClientManager.getInstance().getClient(session.getId());
//获取到的是一个map集合
Map<Integer, List<TSFunction>> map=client.getFunctionMap();
//声明list用来存储菜单
List<TSFunction>autoList = new ArrayList<TSFunction>();
//循环map集合取到菜单
for(int t=0;t<map.size();t++){
//根据map键取到菜单的TSFuction 用List接收
List<TSFunction> list = map.get(t);
//循环List取到TSFuction中的functionname
for(int i =0;i<list.size();i++){
//由于functionname中的一些参数没有被国际化所以还是字母需要MutiLangUtil中的getLang()方法来
String name=MutiLangUtil.getLang(list.get(i).getFunctionName());
if(name.indexOf(searchVal)!= -1 ){
TSFunction ts =new TSFunction();
ts.setFunctionName(MutiLangUtil.getLang(list.get(i).getFunctionName()));
autoList.add(ts);
}
}
}
try {
response.setContentType("application/json;charset=UTF-8");
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
response.getWriter().write(JSONHelper.listtojson(new String[]{"functionName"},1,autoList));
response.getWriter().flush();
} catch (Exception e1) {
e1.printStackTrace();
}finally{
try {
response.getWriter().close();
} catch (IOException e) {
}
}
}
/**
*
* @param request
* @return
*/
@RequestMapping(params = "getUrlpage")
@ResponseBody
public String getUrlpage(HttpServletRequest request,HttpServletResponse response) {
String urlname = request.getParameter("urlname");
HttpSession session = ContextHolderUtils.getSession();
Client client = ClientManager.getInstance().getClient(session.getId());
Map<Integer, List<TSFunction>> map=client.getFunctionMap();
List<TSFunction>autoList = new ArrayList<TSFunction>();
for(int t=0;t<map.size();t++){
List<TSFunction> list = map.get(t);
for(int i =0;i<list.size();i++){
String funname=MutiLangUtil.getLang(list.get(i).getFunctionName());
if(urlname.equals(funname)){
TSFunction ts =new TSFunction();
ts.setFunctionUrl(list.get(i).getFunctionUrl());
autoList.add(ts);
}
}
}
if(autoList.size()==0){
return null;
}else{
String name =autoList.get(0).getFunctionUrl();
return name;
}
}
/**
*
*

@ -107,9 +107,9 @@ public class NoticeController extends BaseController{
Map<String,Object> attrs = new HashMap<String, Object>();
attrs.put("noticeList", result);
String tip = MutiLangUtil.getMutiLangInstance().getLang("notice.tip");
String tip = MutiLangUtil.getLang("notice.tip");
attrs.put("tip", tip);
String seeAll = MutiLangUtil.getMutiLangInstance().getLang("notice.seeAll");
String seeAll = MutiLangUtil.getLang("notice.seeAll");
attrs.put("seeAll", seeAll);
j.setAttributes(attrs);

@ -303,7 +303,7 @@ public class OrganzationController extends BaseController {
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}else{
message = MutiLangUtil.getMutiLangInstance().getLang("common.department.hasuser");
message = MutiLangUtil.getLang("common.department.hasuser");
}
} else {

@ -168,7 +168,7 @@ public class TSInterfaceController extends BaseController {
try {
if (findByQueryString!=null&&findByQueryString.size()>0||ts!=null&&ts.size()>0) {
message = MutiLangUtil.getMutiLangInstance().getLang("common.menu.del.fail");
message = MutiLangUtil.getLang("common.menu.del.fail");
}
else{
systemService.updateBySqlString("delete from t_s_interface where id='"+ tsInterface.getId() + "'");
@ -179,7 +179,7 @@ public class TSInterfaceController extends BaseController {
parent.getTSInterfaces().add(tsInterface);
}
e.printStackTrace();
message = MutiLangUtil.getMutiLangInstance().getLang("common.menu.del.fail");
message = MutiLangUtil.getLang("common.menu.del.fail");
}
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
j.setMsg(message);

@ -413,6 +413,8 @@ public class UserController extends BaseController {
cq.in("status", userstate);
cq.eq("deleteFlag", Globals.Delete_Normal);
cq.eq("userType", Globals.USER_TYPE_SYSTEM);
String orgIds = request.getParameter("orgIds");
List<String> orgIdList = extractIdListByComma(orgIds);
// 获取 当前组织机构的用户信息
@ -1353,7 +1355,10 @@ public class UserController extends BaseController {
tsUser.setDeleteFlag(new Short("0"));
String roleCodes = tsUser.getUserKey();
String deptCodes = tsUser.getDepartid();
tsUser.setPassword(PasswordUtil.encrypt(username, "123456", PasswordUtil.getStaticSalt()));
tsUser.setUserType(Globals.USER_TYPE_SYSTEM);//导入用户 在用户管理列表不显示
if((roleCodes==null||roleCodes.equals(""))||(deptCodes==null||deptCodes.equals(""))){
List<TSUser> users = systemService.findByProperty(TSUser.class,"userName",username);
if(users.size()!=0){

@ -7,8 +7,15 @@ public enum InterfaceEnum {
blacklist_get("blacklist_get", "黑名单单条数据查询", "/rest/tsBlackListController/{id}", "GET", 2),
blacklist_add("blacklist_add", "黑名单添加", "/rest/tsBlackListController", "POST", 3),
blacklist_edit("blacklist_edit", "黑名单编辑", "/rest/tsBlackListController", "PUT", 4),
blacklist_delete("blacklist_delete", "黑名单删除", "/rest/tsBlackListController/{id}", "DELETE", 5);
/**
blacklist_delete("blacklist_delete", "黑名单删除", "/rest/tsBlackListController/{id}", "DELETE", 5) ,
onlineform_get("onlineform_get", "根据tableName和记录ID获取online表单详细信息", "/rest/cgFormDataController/get/{tableName}/{id}", "GET", 1),
onlineform_add("onlineform_add", "online表单增加一条记录", "/rest/cgFormDataController/add", "POST", 2),
onlineform_update("onlineform_update", "online表单修改一条记录", "/rest/cgFormDataController/update", "POST", 3),
onlineform_delete("onlineform_delete", "online表单删除一条记录", "/rest/cgFormDataController/delete/{tableName}/{id}", "DELETE", 4)
;
/**
*
*/
private String code;

@ -12,6 +12,8 @@ import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.jeecgframework.core.common.controller.CustomJsonDateDeserializer;
import org.jeecgframework.core.common.entity.IdEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
@ -23,6 +25,24 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@Table(name = "t_s_depart")
public class TSDepart extends IdEntity implements java.io.Serializable {
private TSDepart TSPDepart;//上级部门
/**创建人名称*/
private java.lang.String createName;
/**创建人登录名称*/
private java.lang.String createBy;
/**创建日期*/
private java.util.Date createDate;
/**更新人名称*/
private java.lang.String updateName;
/**更新人登录名称*/
private java.lang.String updateBy;
/**更新日期*/
private java.util.Date updateDate;
/**所属部门*/
private java.lang.String sysOrgCode;
/**所属公司*/
private java.lang.String sysCompanyCode;
@Excel(name = "部门名称" ,width = 20)
private String departname;//部门名称
@Excel(name = "部门描述",width = 20)
@ -52,6 +72,146 @@ public class TSDepart extends IdEntity implements java.io.Serializable {
this.TSPDepart = TSPDepart;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_NAME",nullable=true,length=50)
public java.lang.String getCreateName(){
return this.createName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateName(java.lang.String createName){
this.createName = createName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="CREATE_BY",nullable=true,length=50)
public java.lang.String getCreateBy(){
return this.createBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setCreateBy(java.lang.String createBy){
this.createBy = createBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="CREATE_DATE",nullable=true,length=20)
public java.util.Date getCreateDate(){
return this.createDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
@JsonDeserialize(using = CustomJsonDateDeserializer.class)
public void setCreateDate(java.util.Date createDate){
this.createDate = createDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_NAME",nullable=true,length=50)
public java.lang.String getUpdateName(){
return this.updateName;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateName(java.lang.String updateName){
this.updateName = updateName;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="UPDATE_BY",nullable=true,length=50)
public java.lang.String getUpdateBy(){
return this.updateBy;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setUpdateBy(java.lang.String updateBy){
this.updateBy = updateBy;
}
/**
*: java.util.Date
*@return: java.util.Date
*/
@Column(name ="UPDATE_DATE",nullable=true,length=20)
@JsonDeserialize(using = CustomJsonDateDeserializer.class)
public java.util.Date getUpdateDate(){
return this.updateDate;
}
/**
*: java.util.Date
*@param: java.util.Date
*/
public void setUpdateDate(java.util.Date updateDate){
this.updateDate = updateDate;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_ORG_CODE",nullable=true,length=50)
public java.lang.String getSysOrgCode(){
return this.sysOrgCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysOrgCode(java.lang.String sysOrgCode){
this.sysOrgCode = sysOrgCode;
}
/**
*: java.lang.String
*@return: java.lang.String
*/
@Column(name ="SYS_COMPANY_CODE",nullable=true,length=50)
public java.lang.String getSysCompanyCode(){
return this.sysCompanyCode;
}
/**
*: java.lang.String
*@param: java.lang.String
*/
public void setSysCompanyCode(java.lang.String sysCompanyCode){
this.sysCompanyCode = sysCompanyCode;
}
@Column(name = "departname", nullable = false, length = 100)
public String getDepartname() {
return this.departname;

@ -6,20 +6,16 @@ import javax.servlet.http.HttpServletRequest;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.jeecgframework.core.util.BrowserUtils;
import org.jeecgframework.core.util.ContextHolderUtils;
import org.jeecgframework.core.util.ResourceUtil;
import org.jeecgframework.core.util.StringUtil;
import org.jeecgframework.core.util.oConvertUtils;
import org.jeecgframework.web.system.pojo.base.MutiLangEntity;
import org.jeecgframework.web.system.service.MutiLangServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("mutiLangService")
@Transactional
public class MutiLangServiceImpl extends CommonServiceImpl implements MutiLangServiceI {
@Autowired
private HttpServletRequest request;
/**初始化语言信息TOMCAT启动时直接加入到内存中**/
public void initAllMutiLang() {
@ -48,18 +44,20 @@ public class MutiLangServiceImpl extends CommonServiceImpl implements MutiLangSe
/**取 o_muti_lang.lang_key 的值返回当前语言的值**/
public String getLang(String langKey)
{
String language = BrowserUtils.getBrowserLanguage(request);
if(request.getSession().getAttribute("lang") != null)
{
language = (String)request.getSession().getAttribute("lang");
//如果为空返回空串防止返回null
if(langKey==null){
return "";
}
HttpServletRequest request = ContextHolderUtils.getRequest();
String language = oConvertUtils.getString(request.getSession().getAttribute("lang"));
if(oConvertUtils.isEmpty(language)){
language = BrowserUtils.getBrowserLanguage(request);
}
String langContext = ResourceUtil.mutiLangMap.get(langKey + "_" + language);
if(StringUtil.isEmpty(langContext))
{
langContext = ResourceUtil.mutiLangMap.get("common.notfind.langkey" + "_" + request.getSession().getAttribute("lang"));
langContext = ResourceUtil.mutiLangMap.get("common.notfind.langkey" + "_" + language);
if("null".equals(langContext)||langContext==null ||langKey.startsWith("?")){
langContext = "";
}
@ -69,7 +67,7 @@ public class MutiLangServiceImpl extends CommonServiceImpl implements MutiLangSe
}
public String getLang(String lanKey, String langArg) {
String langContext = StringUtil.getEmptyString();
String langContext = "";
if(StringUtil.isEmpty(langArg))
{
langContext = getLang(lanKey);

@ -57,7 +57,7 @@ public class SystemServiceImpl extends CommonServiceImpl implements SystemServic
if(StringUtil.isEmpty(dicTable)){
dictList = jeecgDictDao.querySystemDict(dicCode);
for(DictEntity t:dictList){
t.setTypename(MutiLangUtil.getMutiLangInstance().getLang(t.getTypename()));
t.setTypename(MutiLangUtil.getLang(t.getTypename()));
}
}else {
dicText = StringUtil.isEmpty(dicText, dicCode);

@ -483,9 +483,9 @@ public class TSSmsController extends BaseController {
Map<String,Object> attrs = new HashMap<String, Object>();
attrs.put("messageList", result);
String tip = MutiLangUtil.getMutiLangInstance().getLang("message.tip");
String tip = MutiLangUtil.getLang("message.tip");
attrs.put("tip", tip);
String seeAll = MutiLangUtil.getMutiLangInstance().getLang("message.seeAll");
String seeAll = MutiLangUtil.getLang("message.seeAll");
attrs.put("seeAll", seeAll);
j.setAttributes(attrs);
}

@ -1 +1,2 @@
domain=http://localhost:8080/jeecg
domain=http://localhost:8080/jeecg
local_path=D://upFiles

@ -7,6 +7,7 @@
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
hostName=localhost,
multicastGroupPort=4446, timeToLive=32"/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"

@ -92,7 +92,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -5,7 +5,7 @@ function resetTrNum(tableId) {
$tbody = $("#"+tableId+"");
$tbody.find('>tr').each(function(i){
$(':input, select,button,a', this).each(function(){
var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
var $this = $(this), validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
if(name!=null){
if (name.indexOf("#index#") >= 0){
$this.attr("name",name.replace('#index#',i));
@ -32,6 +32,13 @@ function resetTrNum(tableId) {
}else{
}
}
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
if(validtype_str!=null){
if(validtype_str.indexOf("#index#") >= 0){
$this.attr("validType",validtype_str.replace('#index#',i));
}
}
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
});
$(this).find('div[name=\'xh\']').html(i+1);
});

@ -77,8 +77,10 @@
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id"/>/>
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
@ -98,7 +100,9 @@
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" value="${'$'}{poVal.${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--begin--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="form-control" value="${'$'}{poVal.${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:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
@ -143,7 +147,7 @@
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[${'$'}{stuts.index }].id"/> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -164,7 +168,9 @@
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--begin--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" type="text" class="form-control" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--end--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<input type="hidden" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>

@ -43,7 +43,9 @@ $(document).ready(function(){
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id" />/>
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -125,10 +127,12 @@ $(document).ready(function(){
<b>${po.content}:</b>
</td>
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id" /> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>

@ -148,12 +148,16 @@
<div class="col-xs-3">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> />
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" /> />
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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--begin--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@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:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='textarea'>
@ -592,7 +596,7 @@
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> type="text" class="form-control" style="width:120px;" />
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id"/> type="text" class="form-control" style="width:120px;" />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -143,12 +143,16 @@
<div class="col-xs-3">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:baiyu Date:20171031 for:popup方法支持返回多个字段-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> <#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictField}','${po.dictTable}')"</#if> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> <#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictField}','${po.dictTable}')"</#if> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--end--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='textarea'>
@ -589,8 +593,10 @@
<#if check==0>
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype showType="2" validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id"/>/>
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -615,7 +621,9 @@
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--begin--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 150px" class="form-control" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--end--author:gj_shaojc Date:20180302 for:TASK #2548 【代码生成器】样式问题-->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->

@ -88,7 +88,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -84,7 +84,7 @@
<div class="col-xs-3">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
<#-- update--end--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -85,7 +85,7 @@
<div class="col-xs-3">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control"<@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control"<@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -88,7 +88,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -123,7 +123,7 @@
}"/>
<#elseif po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -125,7 +125,7 @@
} "/>
<#elseif po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -86,7 +86,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -80,7 +80,7 @@
<td class="value">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/>/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -80,7 +80,7 @@
<td class="value">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -89,7 +89,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -13,25 +13,25 @@
<#if po.isShowList == 'N'>
<t:dgCol title="${po.content}" field="${po.fieldName}" hidden="true" ></t:dgCol>
<#elseif po.showType == 'date'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> formatter="yyyy-MM-dd" extendParams="editor:'datebox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> formatter="yyyy-MM-dd" extendParams="editor:'datebox'" width="100"></t:dgCol>
<#elseif po.showType == 'textarea'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'textarea'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'textarea'" width="100"></t:dgCol>
<#elseif po.showType == 'checkbox' >
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<#elseif po.showType == 'radio'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}"<#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}"<#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<#elseif po.showType == 'datetime'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> formatter="yyyy-MM-dd hh:mm:ss" extendParams="editor:'datebox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> formatter="yyyy-MM-dd hh:mm:ss" extendParams="editor:'datebox'" width="100"></t:dgCol>
<#elseif po.showType == 'list'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'combobox'" width="100"></t:dgCol>
<#elseif po.type == 'int'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<#elseif po.type == 'double'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<#elseif po.type == 'BigDecimal'>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'numberbox'" width="100"></t:dgCol>
<#else>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField != "">dictionary="${po.dictField}"</#if> extendParams="editor:'text'" width="100"></t:dgCol>
<t:dgCol title="${po.content}" field="${po.fieldName}" queryMode="${po.queryMode}" <#if po.isQuery == 'Y'>query="true"</#if> <#if po.dictField??><#if po.dictField != "">dictionary="${po.dictField}"</#if></#if> extendParams="editor:'text'" width="100"></t:dgCol>
</#if>
</#list>
<#--//update-end--Author:zhangjiaqiang Date:20160925 forTASK #1344 [链接图标] online功能测试的按钮链接图标修改 -->

@ -92,7 +92,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -5,7 +5,7 @@ function resetTrNum(tableId) {
$tbody = $("#"+tableId+"");
$tbody.find('>tr').each(function(i){
$(':input, select,button,a', this).each(function(){
var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
var $this = $(this),validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
if(name!=null){
if (name.indexOf("#index#") >= 0){
$this.attr("name",name.replace('#index#',i));
@ -32,6 +32,11 @@ function resetTrNum(tableId) {
}else{
}
}
if(validtype_str!=null){
if(validtype_str.indexOf("#index#") >= 0){
$this.attr("validType",validtype_str.replace('#index#',i));
}
}
});
$(this).find('div[name=\'xh\']').html(i+1);
});

@ -93,7 +93,7 @@
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -114,7 +114,9 @@
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" value="${'$'}{poVal.${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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width:120px;" class="form-control" value="${'$'}{poVal.${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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
@ -140,7 +142,7 @@
<#else>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/>/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -161,7 +163,9 @@
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" value="${'$'}{poVal.${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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" class="form-control" style="width:120px;" value="${'$'}{poVal.${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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<#-- update--begin--author:zhangjiaqiang date:20170531 for:增加图片和文件的支持 -->
@ -215,7 +219,7 @@
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[${'$'}{stuts.index }].id"/> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -236,7 +240,9 @@
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" style="120px;" type="text" class="form-control" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--end--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<input type="hidden" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>
@ -265,7 +271,7 @@
<#else>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}"/> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="form-control" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" isNull="${po.isNull}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[${'$'}{stuts.index }].id"/> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -286,7 +292,9 @@
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" style="120px;" type="text" class="form-control" <@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> value="${'$'}{poVal.${po.fieldName} }" />
<#-- update--end--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
<input type="hidden" id="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" value="${'$'}{poVal.${po.fieldName} }"/>

@ -43,7 +43,7 @@ $(document).ready(function(){
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id" />/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -80,7 +80,9 @@ $(document).ready(function(){
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" value="${'$'}{poVal.${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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 120px" class="form-control" value="${'$'}{poVal.${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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#else>
@ -127,7 +129,7 @@ $(document).ready(function(){
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" style="width:120px;" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id" /> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -147,7 +149,9 @@ $(document).ready(function(){
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" value="${'$'}{poVal.${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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input id="${entityName?uncap_first}List[0].${po.fieldName}" name="${entityName?uncap_first}List[0].${po.fieldName}" type="text" style="width: 120px" class="form-control" value="${'$'}{poVal.${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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType=='image'>

@ -293,7 +293,7 @@
<td>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> type="text" class="form-control" style="width:120px;" />
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id" /> type="text" class="form-control" style="width:120px;" />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -315,7 +315,9 @@
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 120px" class="form-control" <@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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>
@ -342,7 +344,7 @@
<#else>
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> type="text" class="form-control" style="width:120px;" />
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id" /> type="text" class="form-control" style="width:120px;" />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -364,7 +366,9 @@
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@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--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" type="text" style="width: 150px" class="form-control" <@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:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#elseif po.showType=='file' || po.showType == 'image'>

@ -7,6 +7,11 @@
.conc-wrapper input:not([type='radio']){
width:95%;
}
<#-- update--begin--author:Yandong-- date:20180309--for:TASK #2549 【代码生成器】多tab生成的样式有问题 --->
.conc-wrapper input[type='checkbox'],input[type='radio']{
width:auto;
}
<#-- update--end--author:Yandong-- date:20180309--for:TASK #2549 【代码生成器】多tab生成的样式有问题 --->
.conc-wrapper select{
width:95% !important;
}
@ -44,12 +49,16 @@ width:95% !important;
<div class="col-xs-2">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}' />
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#-- update--begin--author:baiyu Date:20171031 for:popup方法支持返回多个字段-->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="searchbox-inputtext" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> <#if po.dictTable?if_exists?html!=""> onclick="popupClick(this,'${po.dictField}','${po.dictTable}')"</#if> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--begin--author:Yandong-- date:20180309--for:TASK #2550 【代码生成器】多tab风格生成的代码popup有问题 --->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" class="form-control" <@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> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--end--author:Yandong-- date:20180309--for:TASK #2550 【代码生成器】多tab风格生成的代码popup有问题 --->
<#-- update--end--author:gj_shaojc Date:20180308 for:TASK #2548 【代码生成器】样式问题 -->
<#-- update--end--author:baiyu Date:20171031 for:popupClick支持返回多个字段 -->
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='textarea'>

@ -87,7 +87,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -5,7 +5,7 @@ function resetTrNum(tableId) {
$tbody = $("#"+tableId+"");
$tbody.find('>tr').each(function(i){
$(':input, select,button,a', this).each(function(){
var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
var $this = $(this),validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
if(name!=null){
if (name.indexOf("#index#") >= 0){
$this.attr("name",name.replace('#index#',i));
@ -32,6 +32,11 @@ function resetTrNum(tableId) {
}else{
}
}
if(validtype_str!=null){
if(validtype_str.indexOf("#index#") >= 0){
$this.attr("validType",validtype_str.replace('#index#',i));
}
}
});
$(this).find('div[name=\'xh\']').html(i+1);
});

@ -82,7 +82,7 @@
<#if check==0>
<td align="left">
<#if po.showType == "text">
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id" />>
<#elseif po.showType=='password'>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="password" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />>
<#elseif po.showType=='radio' || po.showType=='select' || po.showType=='checkbox' || po.showType=='list'>
@ -133,7 +133,7 @@
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[${'$'}{stuts.index }].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[${'$'}{stuts.index }].id" /> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -42,7 +42,7 @@ $(document).ready(function(){
<td class="value">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id"/>/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
@ -125,7 +125,7 @@ $(document).ready(function(){
<td class="value">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value="${'$'}{poVal.${po.fieldName} }"/>
<input name="${entityName?uncap_first}List[0].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${entityName?uncap_first}List[0].id"/> value="${'$'}{poVal.${po.fieldName} }"/>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiang Date:20170509 for:修订生成页面乱 -->

@ -80,7 +80,7 @@
<td class="value">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" />/>
<#-- update--end--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
@ -406,7 +406,7 @@
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id" />/>
<#-- update--end--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -80,7 +80,7 @@
<td class="value">
<#if po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
@ -407,7 +407,7 @@
<td align="left">
<#if po.showType == "text">
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input name="${sub.entityName?uncap_first}List[#index#].${po.fieldName}" maxlength="${po.length?c}" type="text" class="inputxt" style="width:120px;" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}" idFieldName="${sub.entityName?uncap_first}List[#index#].id" />/>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='password'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -88,7 +88,9 @@ import io.swagger.annotations.ApiParam;
<#-- 列为文件类型的文件代码生成 -->
<#assign fileFlag = false />
<#list columns as filePo>
<#if filePo.showType=='file'>
<#-- update--begin--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#if filePo.showType=='file' || filePo.showType == 'image'>
<#-- update--end--author:gj_shaojc date:20180302 forTASK #2551 【bug】网友问题验证确认 -->
<#assign fileFlag = true />
</#if>
</#list>

@ -142,7 +142,7 @@
}"/>
<#elseif po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" />/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/>/>
<#-- update--end--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -144,7 +144,7 @@
>
<#elseif po.showType=='text'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" /> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<input id="${po.fieldName}" name="${po.fieldName}" type="text" style="width: 150px" class="inputxt" <@datatype validType="${po.fieldValidType!''}" isNull="${po.isNull}" type="${po.type}" mustInput="${po.fieldMustInput!''}" tableName="${po.table.tableName}" fieldName="${po.oldFieldName}"/> value='${'$'}{${entityName?uncap_first}Page.${po.fieldName}}'/>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->
<#elseif po.showType=='popup'>
<#-- update--begin--author:zhangjiaqiangDate:20170509 for:修订生成代码不美观 -->

@ -1,11 +1,20 @@
<#--
showType: 作废
inputCheck 1/生成ignore2:不生成ignore
tableName:DB表名
fieldNameDB列名
idFieldNameDB表中ID列名
-->
<#macro datatype showType="1" type="" validType="" isNull="" mustInput="" inputCheck="1">
<#macro datatype showType="1" type="" validType="" isNull="" mustInput="" inputCheck="1" tableName="" fieldName="" idFieldName="id">
<#-- validType逻辑 -->
<#if validType?if_exists?html != ''><#rt/>
datatype="${validType?if_exists?html}" <#rt/>
<#-- update--begin--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题-->
<#if validType?if_exists?html=='only'><#rt/>
validType="${tableName},${fieldName},${idFieldName}" datatype="*"<#rt/>
<#else><#rt/>
datatype="${validType?if_exists?html}"<#rt/>
</#if><#rt/>
<#-- update--end--author:Yandong Date:20180226 for:TASK #2513 【bug】代码生成器新添加的online唯一校验生成代码问题 -->
<#elseif type == 'java.lang.Integer'><#rt/>
datatype="n" <#rt/>
<#elseif type=='java.lang.Double'><#rt/>

@ -26,5 +26,5 @@ jeecg_filed_convert=true
#ui_filter_fields \u8fc7\u6ee4\u4e0d\u9700\u8981\u9875\u9762\u751f\u6210\u7684\u8868\u5b57\u6bb5
ui_filter_fields=create_date,create_datetime,create_by,create_key,create_name,create_realname,create_departmentid,create_departmentname,update_date,update_datetime,update_by,update_key,update_name,update_realname,update_departmentid,update_departmentname
#\
project_path=E:\\workspace-JEECGONE\\jeecg-framework-2017
project_path=D:\\workspace-JEECGONE\\jeecg-framework-os

@ -14,7 +14,7 @@
return false;
});
$('#delBtn_${sub}').bind('click', function(){
$("#add_${sub}_table").find("input:checked").parent().parent().remove();
$("#add_${sub}_table").find("input[name$='ck']:checked").parent().parent().remove();
resetTrNum('add_${sub}_table');
return false;
});
@ -66,7 +66,12 @@
<#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
<#if subTableField.operationCodesReadOnly?exists> readonly = "readonly"</#if>
<#if subTableField.field_valid_type?if_exists?html != ''>
datatype="${subTableField.field_valid_type?if_exists?html}"
<#if subTableField.field_valid_type=='only'>
validType="${sub},${subTableField.field_name},${sub}[${subTableData_index}].id"
datatype="*"
<#else>
datatype="${subTableField.field_valid_type?if_exists?html}"
</#if>
<#else>
<#if subTableField.type == 'int'>
datatype="n"
@ -270,7 +275,13 @@
<#if subTableField.field_must_input?if_exists?html != ''><#if subTableField.field_must_input == 'Y' || subTableField.is_null != 'Y'>ignore="checked"<#else>ignore="ignore"</#if><#elseif subTableField.is_null != 'Y'> ignore="checked"<#else>ignore="ignore"</#if>
<#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
<#if subTableField.field_valid_type?if_exists?html != ''>
datatype="${subTableField.field_valid_type?if_exists?html}"
<#if subTableField.field_valid_type=='only'>
validType="${sub},${subTableField.field_name},${sub}[0].id"
datatype="*"
<#else>
datatype="${subTableField.field_valid_type?if_exists?html}"
</#if>
<#else>
<#if subTableField.type == 'int'>
datatype="n"

@ -20,7 +20,12 @@
<#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
<#if subTableField.operationCodesReadOnly?exists> readonly = "readonly"</#if>
<#if subTableField.field_valid_type?if_exists?html != ''>
datatype="${subTableField.field_valid_type?if_exists?html}"
<#if subTableField.field_valid_type=='only'>
validType="${sub},${subTableField.field_name},${sub}[#index#].id"
datatype="*"
<#else>
datatype="${subTableField.field_valid_type?if_exists?html}"
</#if>
<#else>
<#if subTableField.type == 'int'>
datatype="n"

@ -31,7 +31,13 @@
<#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
<#if subTableField.operationCodesReadOnly?exists> readonly = "readonly"</#if>
<#if subTableField.field_valid_type?if_exists?html != ''>
datatype="${subTableField.field_valid_type?if_exists?html}"
<#if subTableField.field_valid_type=='only'>
validType="${sub},${subTableField.field_name},${sub}[${subTableData_index}].id"
datatype="*"
<#else>
datatype="${subTableField.field_valid_type?if_exists?html}"
</#if>
<#else>
<#if subTableField.type == 'int'>
datatype="n"
@ -271,7 +277,12 @@
<#-- update--end--author:zhangjiaqiang Date:20170417 for:增加校验必填项 -->
<#if subTableField.operationCodesReadOnly?exists> readonly = "readonly"</#if>
<#if subTableField.field_valid_type?if_exists?html != ''>
datatype="${subTableField.field_valid_type?if_exists?html}"
<#if subTableField.field_valid_type=='only'>
validType="${sub},${subTableField.field_name},${sub}[0].id"
datatype="*"
<#else>
datatype="${subTableField.field_valid_type?if_exists?html}"
</#if>
<#else>
<#if subTableField.type == 'int'>
datatype="n"

@ -43,7 +43,7 @@
$tbody.find('>tr').each(function(i){
<#-- update--begin--author:zhangjiaqiang date:20170607 for:修订初始化下标当中涉及的下标内容 -->
$(':input, select, button, a', this).each(function(){
var $this = $(this), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
var $this = $(this),validtype_str = $this.attr('validType'), name = $this.attr('name'),id=$this.attr('id'),onclick_str=$this.attr('onclick'), val = $this.val();
if(name!=null){
if (name.indexOf("#index#") >= 0){
$this.attr("name",name.replace('#index#',i));
@ -71,6 +71,11 @@
}
}
<#-- update--end--author:zhangjiaqiang date:20170607 for:修订初始化下标当中涉及的下标内容 -->
if(validtype_str!=null){
if(validtype_str.indexOf("#index#") >= 0){
$this.attr("validType",validtype_str.replace('#index#',i));
}
}
});
$(this).find('div[name=\'xh\']').html(i+1);
});

@ -15,7 +15,7 @@
return false;
});
$('#delBtn_${sub}').bind('click', function(){
$("#add_${sub}_table").find("input:checked").parent().parent().remove();
$("#add_${sub}_table").find("input[name$='ck']:checked").parent().parent().remove();
resetTrNum('add_${sub}_table');
return false;
});

@ -15,7 +15,7 @@
return false;
});
$('#delBtn_${sub}').bind('click', function(){
$("#add_${sub}_table").find("input:checked").parent().parent().remove();
$("#add_${sub}_table").find("input[name$='ck']:checked").parent().parent().remove();
resetTrNum('add_${sub}_table');
return false;
});

@ -15,7 +15,7 @@
return false;
});
$('#delBtn_${sub}').bind('click', function(){
$("#add_${sub}_table").find("input:checked").parent().parent().remove();
$("#add_${sub}_table").find("input[name$='ck']:checked").parent().parent().remove();
resetTrNum('add_${sub}_table');
return false;
});

@ -14,7 +14,7 @@
return false;
});
$('#delBtn_${sub}').bind('click', function(){
$("#add_${sub}_table").find("input:checked").parent().parent().remove();
$("#add_${sub}_table").find("input[name$='ck']:checked").parent().parent().remove();
resetTrNum('add_${sub}_table');
return false;
});

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

Loading…
Cancel
Save