lxw
2022-06-13 f29af40a15451cb15d399130c887fcfc95026411
src/com/fgkj/actions/ram/Server_stateAction.java
@@ -3,14 +3,18 @@
import com.fgkj.actions.ActionUtil;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.ram.Server_state;
import com.fgkj.services.Process_surveyService;
import com.fgkj.services.ram.Server_stateService;
import org.apache.struts2.json.annotations.JSON;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class Server_stateAction extends ActionUtil{
   private Server_stateService service = new Server_stateService();
   private Process_surveyService serviceP=new Process_surveyService();
   private String result;
   private String json;
@@ -38,8 +42,19 @@
       ServiceModel model = service.serchByCondition(server_state);
       result = tojson(model);
       return SUCCESS;   
   }
   }
   //查询服务器信息和线程信息 serverState:服务器信息,processSurvey:进程信息
   public String serchServerManageInfo() {
      Map dataMap = new HashMap();
      //查询服务器信息
      ServiceModel serverModel = service.searchAll();
      dataMap.put("serverState", serverModel);
      //查询线程状态
      ServiceModel processModel = serviceP.searchAll();
      dataMap.put("processSurvey", processModel);
      return SUCCESS;
   }
   /**查询系统的硬件状态-通过数据库*/
    public String searchAll(){
       ServiceModel model = service.searchAll();