• 大小: 48.46MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-20
  • 语言: Java
  • 标签: ssh框架  Java  

资源简介

Java设备管理系统,基于ssh框架

资源截图

代码片段和文件信息

package com.soft.action;

import java.io.IOException;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;
import net.sf.json.JSONobject;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.soft.model.Emp;
import com.soft.model.Repair;
import com.soft.model.ReportRepair;
import com.soft.service.DiaoDuGuanLiService;

public class DiaoDuAction extends ActionSupport implements ServletRequestAwareServletResponseAware{
private HttpServletRequest request;
private HttpServletResponse response;
private DiaoDuGuanLiService diaoDuGuanLiService;
private ReportRepair reportRepair;
private Repair repair;
/**
 * 
 */
private static final long serialVersionUID = 1L;

/*
 * 分页查询所有
 * 列出所有待分配任务
 * 查询报修记录表
 * 
 */
public void queryAllReportRepair(){


int page = Integer.valueOf(request.getParameter(“page“)==null?“1“:request.getParameter(“page“));
int pageSize = Integer.valueOf(request.getParameter(“rows“)==null?“5“:request.getParameter(“rows“));

List customList = diaoDuGuanLiService.queryAllReportRepair(pagepageSize);


Iterator iterator = customList.iterator();
JSONArray jsonArray = new JSONArray();
JSONobject finalObj = new JSONobject();
// 统计数据总行数 分页
finalObj.put(“total“ diaoDuGuanLiService.countAllTask());

while(iterator.hasNext())
{
JSONobject obj = new JSONobject();

ReportRepair rere =  iterator.next();
obj.put(“customName“ rere.getCustomName());
obj.put(“customId“ rere.getCustomId());
obj.put(“empKefuId“ rere.getEmpKefuId());
obj.put(“productType“ rere.getProductType());
obj.put(“customSentTime“ rere.getCustomSentTime());
obj.put(“customProperties“ rere.getCustomProperties());
obj.put(“machineBrand“ rere.getMachineBrand());
obj.put(“machineVersion“ rere.getMachineVersion());
obj.put(“machineBugPhenomenon“ rere.getMachineBugPhenomenon());
obj.put(“kefuName“ rere.getKefuName());
obj.put(“reportRepairId“ rere.getReportRepairId());




jsonArray.add(obj);
}
System.out.println(jsonArray.toString());
finalObj.put(“rows“ jsonArray);
System.out.println(“-----“+finalObj.toString()+“-----“);
  response.setContentType(“text/html;charset=UTF-8“);
  PrintWriter out = null;
try {
out = response.getWriter();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}   
   
   out.println(finalObj.toString());   
   out.flush();   
   out.close();   

}
/*
 * 选中某条待分配任务,为其分配工程师,修改
 * 报修 表,并且在维修记录表添加一条数据
 */
public void fenpeiWeixiushi(){
Simpl

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        913  2016-01-21 18:07  fiveApp\.classpath

     文件        294  2015-03-25 10:10  fiveApp\.mymetadata

     文件       1922  2015-03-14 16:51  fiveApp\.project

     文件        500  2015-03-11 14:26  fiveApp\.settings\.jsdtscope

     文件        306  2015-03-18 13:39  fiveApp\.settings\com.genuitec.eclipse.core.prefs

     文件        136  2015-03-13 09:05  fiveApp\.settings\com.genuitec.eclipse.core.prefs.mine

     文件        136  2015-03-13 09:05  fiveApp\.settings\com.genuitec.eclipse.core.prefs.r37

     文件        136  2015-03-13 09:05  fiveApp\.settings\com.genuitec.eclipse.core.prefs.r44

     文件        247  2016-01-21 18:07  fiveApp\.settings\com.genuitec.eclipse.migration.prefs

     文件         72  2015-03-22 22:18  fiveApp\.settings\org.eclipse.core.resources.prefs

     文件        395  2015-03-11 14:26  fiveApp\.settings\org.eclipse.jdt.core.prefs

     文件        483  2015-03-12 16:23  fiveApp\.settings\org.eclipse.wst.common.component

     文件        361  2016-01-21 18:07  fiveApp\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2015-03-11 14:26  fiveApp\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2015-03-11 14:26  fiveApp\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件          3  2015-03-13 14:49  fiveApp\.svn\entries

     文件          3  2015-03-13 14:49  fiveApp\.svn\format

     文件        767  2015-03-18 09:57  fiveApp\.svn\pristine\00\000036c14c2120846c328af76bac9356a961f768.svn-base

     文件        903  2015-03-13 14:49  fiveApp\.svn\pristine\00\00448dfff9a135d426547b6d55f89695fac90385.svn-base

     文件       1032  2015-03-13 14:49  fiveApp\.svn\pristine\00\007ca4d93d393a3a7c90d76a5920e7ff70c4515b.svn-base

     文件        191  2015-03-13 14:49  fiveApp\.svn\pristine\00\007d2527690783a878e3ec76cce9ac7fc88d3fe7.svn-base

     文件       1128  2015-03-13 14:49  fiveApp\.svn\pristine\00\0085482f4a9d17ec726e91da8ea664a844e88eec.svn-base

     文件      14968  2015-03-20 21:36  fiveApp\.svn\pristine\00\008fefdb370fd109f9039d0b7dcd8dc35cbe45d0.svn-base

     文件        229  2015-03-13 14:49  fiveApp\.svn\pristine\00\009a55297c78200bbdb0b690aaffd48c87e47445.svn-base

     文件    1021265  2015-03-13 14:49  fiveApp\.svn\pristine\00\00a53a6282ffb4a3df57bf91ee9cf4873d8a0194.svn-base

     文件       5011  2015-03-20 21:36  fiveApp\.svn\pristine\00\00e1aeb2d0b24b2799815358a0b49ad71ab06359.svn-base

     文件       5230  2015-03-13 14:49  fiveApp\.svn\pristine\00\00e22681e68af899d7fdb0a41c1cc3232533163c.svn-base

     文件      16183  2015-03-21 20:14  fiveApp\.svn\pristine\01\010e63c09e7f0aff5e8cf6dd3ee1d016fbf3ec9d.svn-base

     文件        716  2015-03-13 14:49  fiveApp\.svn\pristine\01\012984c34092c44cc0540e2b881394662236428e.svn-base

     文件        244  2015-03-13 14:49  fiveApp\.svn\pristine\01\0146248c0358eaae6a002fc7ad492483b60ff503.svn-base

............此处省略2287个文件信息

评论

共有 条评论