gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Thread_utilAction.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAO.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BaseDAOFactory.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/ProcessServerDao.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Thread_utilImpl.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dto/Thread_util.classBinary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Thread_utilService.classBinary files differ
gx_tieta/src/com/fgkj/actions/Thread_utilAction.java
New file @@ -0,0 +1,30 @@ package com.fgkj.actions; import com.fgkj.dto.ServiceModel; import com.fgkj.dto.Thread_util; import com.fgkj.services.Thread_utilService; public class Thread_utilAction extends ActionUtil{ private Thread_utilService service=new Thread_utilService(); private String json; private String result; //启动线程 public String update() { Thread_util util=getGson().fromJson(json, Thread_util.class); ServiceModel model=service.update(util); result=tojson(model); return SUCCESS; } public String getResult() { return result; } public void setJson(String json) { this.json = json; } } gx_tieta/src/com/fgkj/dao/BaseDAO.java
@@ -206,6 +206,8 @@ public static final int APP_BTS_BATTGROUP=101; public static final int THREAD_UTIL=102; public boolean add(Object obj); // 添加 public boolean update(Object obj); // 更新 gx_tieta/src/com/fgkj/dao/BaseDAOFactory.java
@@ -54,6 +54,7 @@ import com.fgkj.dao.impl.Positiomap_usrImpl; import com.fgkj.dao.impl.Process_surveyImpl; import com.fgkj.dao.impl.StationtrafficImpl; import com.fgkj.dao.impl.Thread_utilImpl; import com.fgkj.dao.impl.UserDAOImpl; import com.fgkj.dao.impl.User_ChartImpl; import com.fgkj.dao.impl.User_battgroup_baojigroupImpl; @@ -212,6 +213,7 @@ case 99:return new App_bts_comm_taskImpl(); case 100:return new Battinf_applyImpl(); case 101:return new App_bts_battgroupImpl(); case 102:return new Thread_utilImpl(); default :return null; } } gx_tieta/src/com/fgkj/dao/ProcessServerDao.java
@@ -18,4 +18,8 @@ //默认重启密码 public static String RESTART_PWD="123456"; //进程id public static Integer THREAD_XUHANG=2019001;//机房续航线程 public static Integer THREAD_LUOHOU=2019002;//落后单体线程 } gx_tieta/src/com/fgkj/dao/impl/Thread_utilImpl.java
New file @@ -0,0 +1,58 @@ package com.fgkj.dao.impl; import java.sql.ResultSet; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.CallBack; import com.fgkj.dao.DAOHelper; import com.fgkj.db.DBUtil; import com.fgkj.dto.Thread_util; public class Thread_utilImpl implements BaseDAO,CallBack{ @Override public List getResults(ResultSet rs) { // TODO Auto-generated method stub return null; } @Override public boolean add(Object obj) { // TODO Auto-generated method stub return false; } //启动线程 @Override public boolean update(Object obj) { Thread_util util=(Thread_util) obj; String sql=" update web_site.tb_thread_util set thread_en=? where thread_id=? "; boolean bl=DAOHelper.executeUpdate( DBUtil.getConn(), sql,new Object[] {util.getThread_en(),util.getThread_id()}); return bl; } @Override public boolean del(Object obj) { // TODO Auto-generated method stub return false; } @Override public List searchAll() { // TODO Auto-generated method stub return null; } @Override public List serchByCondition(Object obj) { // TODO Auto-generated method stub return null; } @Override public List serchByInfo(Object obj) { // TODO Auto-generated method stub return null; } } gx_tieta/src/com/fgkj/dto/Thread_util.java
New file @@ -0,0 +1,59 @@ package com.fgkj.dto; import java.io.Serializable; import java.util.Date; import com.fgkj.dao.CallBack; public class Thread_util implements Serializable{ private int num; private int thread_id; private String thread_name; private Date thread_starttime; private int thread_en; private String note; public int getNum() { return num; } public void setNum(int num) { this.num = num; } public int getThread_id() { return thread_id; } public void setThread_id(int thread_id) { this.thread_id = thread_id; } public String getThread_name() { return thread_name; } public void setThread_name(String thread_name) { this.thread_name = thread_name; } public Date getThread_starttime() { return thread_starttime; } public void setThread_starttime(Date thread_starttime) { this.thread_starttime = thread_starttime; } public int getThread_en() { return thread_en; } public void setThread_en(int thread_en) { this.thread_en = thread_en; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } @Override public String toString() { return "Thread_util [num=" + num + ", thread_id=" + thread_id + ", thread_name=" + thread_name + ", thread_starttime=" + thread_starttime + ", thread_en=" + thread_en + ", note=" + note + "]"; } } gx_tieta/src/com/fgkj/services/Thread_utilService.java
New file @@ -0,0 +1,29 @@ package com.fgkj.services; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.dto.ServiceModel; public class Thread_utilService { private BaseDAO dao; private ServiceModel model; public Thread_utilService() { super(); model=new ServiceModel(); dao=BaseDAOFactory.getBaseDAO(BaseDAO.THREAD_UTIL); } //启动线程 public ServiceModel update(Object obj) { boolean bl=dao.update(obj); if(bl) { model.setCode(1); model.setMsg("修改成功!"); }else { model.setData(0); model.setMsg("修改失败!"); } return model; } }