opt:刻字输送线任务下发控制
This commit is contained in:
@@ -90,7 +90,7 @@ public class GenUtil {
|
||||
List<Map<String, Object>> genList = new ArrayList<>();
|
||||
// 获取后端模版
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
for (String templateName : templates) {
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl");
|
||||
@@ -116,7 +116,7 @@ public class GenUtil {
|
||||
// String tempPath =SYS_TEM_DIR + "nladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
String tempPath = SYS_TEM_DIR + "nladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator;
|
||||
Map<String, Object> genMap = getGenMap(columns, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
@@ -153,7 +153,7 @@ public class GenUtil {
|
||||
|
||||
public static void generatorCode(List<ColumnInfo> columnInfos, GenConfig genConfig) throws IOException {
|
||||
Map<String, Object> genMap = getGenMap(columnInfos, genConfig);
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
// 生成后端代码
|
||||
List<String> templates = getAdminTemplateNames();
|
||||
for (String templateName : templates) {
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
package org.nl.modules.wql.core.bean;//package org.nl.module.wql.core.bean;
|
||||
//
|
||||
//import java.sql.Connection;
|
||||
//
|
||||
//import javax.transaction.UserTransaction;
|
||||
//
|
||||
//import org.hibernate.Session;
|
||||
//import org.jbpm.api.cmd.Environment;
|
||||
//import org.jbpm.pvm.internal.env.EnvironmentImpl;
|
||||
//import org.jbpm.pvm.internal.hibernate.DbSessionImpl;
|
||||
//import org.jbpm.pvm.internal.session.DbSession;
|
||||
//import org.nl.module.wql.WQLCore;
|
||||
//import org.nl.module.wql.core.db.DBConnection;
|
||||
//
|
||||
//
|
||||
//public class ConnectBean {
|
||||
// private String dbname = "";
|
||||
// private Connection conn = null;
|
||||
// private UserTransaction utx = null;
|
||||
//
|
||||
// private ConnectBean() {
|
||||
// // TODO Auto-generated constructor stub
|
||||
// }
|
||||
//// public ConnectBean(Connection conn) {
|
||||
//// this.conn = conn;
|
||||
//// }
|
||||
// public static ConnectBean getConnectBean(){
|
||||
// ConnectBean conb = new ConnectBean();
|
||||
// conb.conn = DBConnection.getConnection(WQLCore.defalutDBName);
|
||||
// conb.dbname = WQLCore.defalutDBName;
|
||||
// return conb;
|
||||
// }
|
||||
// public static ConnectBean getConnectBean(Environment environment){
|
||||
// return getConnectBean((EnvironmentImpl)environment);
|
||||
// }
|
||||
// public static ConnectBean getConnectBean(EnvironmentImpl environmentImpl){
|
||||
// DbSessionImpl dbSession = (DbSessionImpl) environmentImpl.getFromCurrent(DbSession.class);
|
||||
// Session session = dbSession.getSession();
|
||||
// ConnectBean conb = ConnectBean.getConnectBean(session.connection(),WQLCore.defalutDBName);
|
||||
// return conb;
|
||||
// }
|
||||
//
|
||||
// public static ConnectBean getConnectBean(Connection conn,String dbname){
|
||||
// if(null==dbname||"".equals(dbname)){
|
||||
// dbname = WQLCore.defalutDBName;
|
||||
// }
|
||||
// ConnectBean conb = new ConnectBean();
|
||||
// conb.conn = conn;
|
||||
// conb.dbname = dbname;
|
||||
// return conb;
|
||||
// }
|
||||
// public boolean beginTransation(){
|
||||
// boolean isSuccess = false;
|
||||
// if(null!=this.conn){
|
||||
// DBConnection.openTransation(this.conn);
|
||||
// this.utx = DBConnection.getTransaction(this.dbname);
|
||||
// if(null!=this.utx){
|
||||
// try {
|
||||
// this.utx.begin();
|
||||
// isSuccess = true;
|
||||
// } catch (Exception e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return isSuccess;
|
||||
// }
|
||||
//
|
||||
// public boolean commitTransation(){
|
||||
// boolean isSuccess = false;
|
||||
// if(null!=this.utx){
|
||||
// try {
|
||||
// this.utx.commit();
|
||||
// isSuccess = true;
|
||||
// } catch (Exception e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// try {
|
||||
// this.utx.rollback();
|
||||
// } catch (Exception e1) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e1.printStackTrace();
|
||||
// }
|
||||
// }finally{
|
||||
// DBConnection.freeConnection(this.conn);
|
||||
// this.conn = null;
|
||||
// this.utx=null;
|
||||
// }
|
||||
// }else{
|
||||
// DBConnection.freeConnection(this.conn);
|
||||
// }
|
||||
//
|
||||
// return isSuccess;
|
||||
// }
|
||||
// public boolean rollbackTransation(){
|
||||
// boolean isSuccess = false;
|
||||
// if(null!=this.utx){
|
||||
// try {
|
||||
// this.utx.rollback();
|
||||
// isSuccess = true;
|
||||
// } catch (Exception e1) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e1.printStackTrace();
|
||||
// }finally{
|
||||
// DBConnection.freeConnection(this.conn);
|
||||
// this.conn = null;
|
||||
// this.utx=null;
|
||||
// }
|
||||
// }else{
|
||||
// DBConnection.freeConnection(this.conn);
|
||||
// }
|
||||
//
|
||||
// return isSuccess;
|
||||
// }
|
||||
//
|
||||
// public String getDbname() {
|
||||
// return dbname;
|
||||
// }
|
||||
// public void setDbname(String dbname) {
|
||||
// this.dbname = dbname;
|
||||
// }
|
||||
// public Connection getConn() {
|
||||
// return conn;
|
||||
// }
|
||||
// public void setConn(Connection conn) {
|
||||
// this.conn = conn;
|
||||
// }
|
||||
// public UserTransaction getUtx() {
|
||||
// return utx;
|
||||
// }
|
||||
// public void setUtx(UserTransaction utx) {
|
||||
// this.utx = utx;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//}
|
||||
@@ -39,14 +39,12 @@ public class SysQuartzJobController {
|
||||
|
||||
private final ISysQuartzJobService quartzJobService;
|
||||
|
||||
//("查询定时任务")
|
||||
@GetMapping
|
||||
@SaCheckPermission("timing:list")
|
||||
public ResponseEntity<Object> query(JobQuery criteria, PageQuery pageable) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(quartzJobService.queryAll(criteria, pageable)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
//("查询任务执行日志")
|
||||
@GetMapping(value = "/logs")
|
||||
@SaCheckPermission("timing:list")
|
||||
public ResponseEntity<Object> queryJobLog(JobQuery criteria, PageQuery pageable) {
|
||||
@@ -54,7 +52,6 @@ public class SysQuartzJobController {
|
||||
}
|
||||
|
||||
@Log("新增定时任务")
|
||||
//("新增定时任务")
|
||||
@PostMapping
|
||||
@SaCheckPermission("timing:add")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody SysQuartzJob resources) {
|
||||
@@ -66,7 +63,6 @@ public class SysQuartzJobController {
|
||||
}
|
||||
|
||||
@Log("修改定时任务")
|
||||
//("修改定时任务")
|
||||
@PutMapping
|
||||
@SaCheckPermission("timing:edit")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody SysQuartzJob resources) {
|
||||
@@ -75,7 +71,6 @@ public class SysQuartzJobController {
|
||||
}
|
||||
|
||||
@Log("更改定时任务状态")
|
||||
//("更改定时任务状态")
|
||||
@PutMapping(value = "/{id}")
|
||||
@SaCheckPermission("timing:edit")
|
||||
public ResponseEntity<Object> update(@PathVariable String id) {
|
||||
@@ -84,7 +79,6 @@ public class SysQuartzJobController {
|
||||
}
|
||||
|
||||
@Log("执行定时任务")
|
||||
//("执行定时任务")
|
||||
@PutMapping(value = "/exec/{id}")
|
||||
@SaCheckPermission("timing:edit")
|
||||
public ResponseEntity<Object> execution(@PathVariable String id) {
|
||||
@@ -93,7 +87,6 @@ public class SysQuartzJobController {
|
||||
}
|
||||
|
||||
@Log("删除定时任务")
|
||||
//("删除定时任务")
|
||||
@DeleteMapping
|
||||
@SaCheckPermission("timing:del")
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
|
||||
Reference in New Issue
Block a user