diff --git a/WebRoot/Admin/addPerson.jsp b/WebRoot/Admin/addPerson.jsp new file mode 100644 index 0000000..7af2dec --- /dev/null +++ b/WebRoot/Admin/addPerson.jsp @@ -0,0 +1,162 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + 添加维修人员 + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

认真填写哦!

+ +
+

添加维修人员

+
+

请填写维修人员信息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
姓名: + +
年龄: + +
性别: + +
选择分组: + +
备注: + +
   + +
+
+
+
+
+ +
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/WebRoot/Admin/dashboard.jsp b/WebRoot/Admin/dashboard.jsp new file mode 100644 index 0000000..2f1ebbf --- /dev/null +++ b/WebRoot/Admin/dashboard.jsp @@ -0,0 +1,143 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + Salesupport + + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

今日已完成维修订单300!

+ +
+ +

维修量一览

+
+
+ +
+ +
+
+

今天

+

1,876

+

Hits

+

2,103

+

Views

+
+
+

昨天

+

1,646

+

Hits

+

2,054

+

Views

+
+
+
+
+ +
+ + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/WebRoot/Admin/images/chart.png b/WebRoot/Admin/images/chart.png new file mode 100644 index 0000000..d9f3469 Binary files /dev/null and b/WebRoot/Admin/images/chart.png differ diff --git a/WebRoot/Admin/images/findd.png b/WebRoot/Admin/images/findd.png new file mode 100644 index 0000000..8e50d46 Binary files /dev/null and b/WebRoot/Admin/images/findd.png differ diff --git a/WebRoot/Admin/index.jsp b/WebRoot/Admin/index.jsp index df5eb13..e8b9188 100644 --- a/WebRoot/Admin/index.jsp +++ b/WebRoot/Admin/index.jsp @@ -6,7 +6,7 @@ pageEncoding="UTF-8"%> - Salesupport + 维修设备
-

刘路辉

+

@@ -79,29 +86,29 @@ pageEncoding="UTF-8"%>

系统管理

维修人员管理

-

这个地方可以放置提示信息!

+

优先审核提示信息!

@@ -118,7 +125,7 @@ pageEncoding="UTF-8"%> - 订单名 + 设备SN 维修人 维修开始时间 维修结束时间 @@ -127,15 +134,15 @@ pageEncoding="UTF-8"%> - + - - - - - - + + + + + + ')"> @@ -147,23 +154,27 @@ pageEncoding="UTF-8"%> - 订单名 - 订单描述 - 订单日期 - 申请用户 + 设备SN + 维修描述 + 申请时间 + 申请人 + 电话 操作 + - 餐饮设备维修 - 修理筷子 - 2016-11-5 - 王五 - + + + + + + + ')"> - + @@ -179,12 +190,7 @@ pageEncoding="UTF-8"%>

A Warning Alert

- -

An Error Message

- -

A Success Message

- - +
diff --git a/WebRoot/Admin/proControl.jsp b/WebRoot/Admin/proControl.jsp new file mode 100644 index 0000000..7c7b4be --- /dev/null +++ b/WebRoot/Admin/proControl.jsp @@ -0,0 +1,170 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + 过程监控 + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

加快进度吧!

+ +
+

维修订单列表

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
维修设备SN维修描述当前状态查看历史
">
+
+
+ +
+
+

维修历史

+
+
+ +

--

+

+
+ <%--

维修订单审核通过

+

2016-11-3

+

维修正在处理中······

+

2016-11-4

+

维修已完成

+

2016-11-5

+

用户已评论

+

2016-11-6

--%> +
+
+
+
+ + +
+
+ +
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/WebRoot/Admin/seePerson.jsp b/WebRoot/Admin/seePerson.jsp new file mode 100644 index 0000000..f540983 --- /dev/null +++ b/WebRoot/Admin/seePerson.jsp @@ -0,0 +1,145 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + 查看维修人员 + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

请谨慎操作!

+ +
+

维修人员列表

+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
维修人姓名所在分组维修量评价成绩操作
第二组55"> + ">
+
+
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/WebRoot/Admin/systemPlan.jsp b/WebRoot/Admin/systemPlan.jsp new file mode 100644 index 0000000..90315b1 --- /dev/null +++ b/WebRoot/Admin/systemPlan.jsp @@ -0,0 +1,153 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + 系统调度 + + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

请选择最合适的维修人员哦!

+ +
+

维修订单(审核已通过)

+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
设备SN故障描述审核通过时间调度维修人操作
+
+
+
+
+ + +
+ + +
+
+ + + + + \ No newline at end of file diff --git a/WebRoot/Admin/updatePerson.jsp b/WebRoot/Admin/updatePerson.jsp new file mode 100644 index 0000000..ce50b01 --- /dev/null +++ b/WebRoot/Admin/updatePerson.jsp @@ -0,0 +1,162 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" +pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags"%> + + + + + + 更新维修人员 + + + + + + + + + + + + + + + + +
+
+

+ +
+ +
+ + + +
+ +

认真填写哦!

+ +
+

添加维修人员

+
+

请更新维修人员信息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
姓名: + +
年龄: + +
性别: + +
选择分组: + +
备注: + +
   + +
+
+
+
+
+ +
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/aaaa.txt b/aaaa.txt new file mode 100644 index 0000000..e69de29 diff --git a/build/classes/com/xj/action/AdminAction.class b/build/classes/com/xj/action/AdminAction.class index a44eec8..33a36ef 100644 Binary files a/build/classes/com/xj/action/AdminAction.class and b/build/classes/com/xj/action/AdminAction.class differ diff --git a/build/classes/com/xj/action/MonitorAction.class b/build/classes/com/xj/action/MonitorAction.class new file mode 100644 index 0000000..c63e2ee Binary files /dev/null and b/build/classes/com/xj/action/MonitorAction.class differ diff --git a/build/classes/com/xj/action/PersonAction$personone.class b/build/classes/com/xj/action/PersonAction$personone.class new file mode 100644 index 0000000..4866fd0 Binary files /dev/null and b/build/classes/com/xj/action/PersonAction$personone.class differ diff --git a/build/classes/com/xj/action/PersonAction.class b/build/classes/com/xj/action/PersonAction.class new file mode 100644 index 0000000..39c925e Binary files /dev/null and b/build/classes/com/xj/action/PersonAction.class differ diff --git a/build/classes/com/xj/action/SystemAction.class b/build/classes/com/xj/action/SystemAction.class new file mode 100644 index 0000000..8cc8c4a Binary files /dev/null and b/build/classes/com/xj/action/SystemAction.class differ diff --git a/build/classes/com/xj/dao/impl/PersonnelDao.class b/build/classes/com/xj/dao/impl/PersonnelDao.class index 6e8941b..1b9e2fc 100644 Binary files a/build/classes/com/xj/dao/impl/PersonnelDao.class and b/build/classes/com/xj/dao/impl/PersonnelDao.class differ diff --git a/build/classes/com/xj/dao/impl/RepairDao.class b/build/classes/com/xj/dao/impl/RepairDao.class index 2a88f8e..2271cce 100644 Binary files a/build/classes/com/xj/dao/impl/RepairDao.class and b/build/classes/com/xj/dao/impl/RepairDao.class differ diff --git a/build/classes/com/xj/vo/Personnel.class b/build/classes/com/xj/vo/Personnel.class index 6e5e244..27742fb 100644 Binary files a/build/classes/com/xj/vo/Personnel.class and b/build/classes/com/xj/vo/Personnel.class differ diff --git a/build/classes/com/xj/vo/Record.class b/build/classes/com/xj/vo/Record.class new file mode 100644 index 0000000..08968cf Binary files /dev/null and b/build/classes/com/xj/vo/Record.class differ diff --git a/build/classes/com/xj/vo/Repair.class b/build/classes/com/xj/vo/Repair.class index dfe6b95..c3b6141 100644 Binary files a/build/classes/com/xj/vo/Repair.class and b/build/classes/com/xj/vo/Repair.class differ diff --git a/build/classes/com/xj/vo/Repair_order.class b/build/classes/com/xj/vo/Repair_order.class index 8bd4c08..4fc6553 100644 Binary files a/build/classes/com/xj/vo/Repair_order.class and b/build/classes/com/xj/vo/Repair_order.class differ diff --git a/build/classes/com/xj/vo/Repair_order_n.class b/build/classes/com/xj/vo/Repair_order_n.class new file mode 100644 index 0000000..3aea527 Binary files /dev/null and b/build/classes/com/xj/vo/Repair_order_n.class differ diff --git a/build/classes/struts.xml b/build/classes/struts.xml index 28fd81f..439282d 100644 --- a/build/classes/struts.xml +++ b/build/classes/struts.xml @@ -4,10 +4,21 @@ - index.jsp + dashboard.jsp login.jsp index.jsp + + systemPlan.jsp + + + proControl.jsp + + + + seePerson.jsp + updatePerson.jsp + diff --git a/src/com/xj/action/AdminAction.java b/src/com/xj/action/AdminAction.java index 9c80951..3d95e73 100644 --- a/src/com/xj/action/AdminAction.java +++ b/src/com/xj/action/AdminAction.java @@ -2,25 +2,57 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; + +import org.apache.struts2.interceptor.SessionAware; import com.xj.dao.service.AdminService; -import com.xj.dao.service.OrderService; import com.xj.dao.service.PersonnelService; import com.xj.dao.service.RepairService; import com.xj.vo.Admin; -import com.xj.vo.Order; import com.xj.vo.Personnel; import com.xj.vo.Repair; import com.xj.vo.Repair_order; +import com.xj.vo.Repair_order_n; + +public class AdminAction implements SessionAware { -public class AdminAction { private AdminService adService = new AdminService(); - private RepairService reServiec=new RepairService(); - private OrderService orService=new OrderService(); - private PersonnelService peService=new PersonnelService(); - private List list = new ArrayList(); + private RepairService reServiec = new RepairService(); + + private PersonnelService peService = new PersonnelService(); + private List listY = new ArrayList(); + private List listN = new ArrayList(); + private Repair arepair = new Repair(); + + private Map session; + + public Repair getArepair() { + return arepair; + } + + public void setArepair(Repair arepair) { + this.arepair = arepair; + } + + public List getListY() { + return listY; + } + + public void setListY(List listY) { + this.listY = listY; + } + + public List getListN() { + return listN; + } + + public void setListN(List listN) { + this.listN = listN; + } + private Admin ad = new Admin(); - + public Admin getAd() { return ad; } @@ -29,44 +61,76 @@ public void setAd(Admin ad) { this.ad = ad; } - public String checkPass(){ + public String checkPass() { Admin adcur; - adcur=adService.QueryAdmin(ad.getAdmin_Name()); - if(adcur.getAdmin_ID()==null||!adcur.getAdmin_Pass().equals(ad.getAdmin_Pass())){ - return "error"; - }else{ - //queryOrder(); + adcur = adService.QueryAdmin(ad.getAdmin_Name()); + if (adcur.getAdmin_ID() == null + || !adcur.getAdmin_Pass().equals(ad.getAdmin_Pass())) { + return "error"; + } else { + // queryOrder(); + this.session.put("USER_NAME", ad.getAdmin_Name()); return "index"; } } - public List getList() { - return list; + + public String queryOrder() { + List listRepair = new ArrayList(); + listRepair = reServiec.QueryAllRepair(); + for (int i = 0; i < listRepair.size(); i++) { + if (listRepair.get(i).getRepair_ISY() == 1) { + Repair_order ro = new Repair_order(); + ro.setRepairID(listRepair.get(i).getRepair_ID()); + ro.setStartTime(listRepair.get(i).getRepair_StartT()); + ro.setEndTime(listRepair.get(i).getRepair_EndT()); + ro.setState(listRepair.get(i).getRepair_State()); + ro.setOrderName(listRepair.get(i).getRepair_SN()); + + String pid = listRepair.get(i).getP_ID(); + Personnel po = peService.QueryPersonnel(pid); + ro.setPName(po.getP_Name()); + + listY.add(ro); + } else { + Repair_order_n ron = new Repair_order_n(); + + ron.setRepairID(listRepair.get(i).getRepair_ID()); + + ron.setOrderDes(listRepair.get(i).getRepair_Des()); + ron.setOrderName(listRepair.get(i).getRepair_SN()); + ron.setOrderTime(listRepair.get(i).getRepair_Odertime()); + ron.setPhone(listRepair.get(i).getRepair_Tel()); + String nameone = listRepair.get(i).getOrder_ID(); + + //System.out.println(nameone); + nameone = nameone.replace("user@", ""); + ron.setPname(nameone); + + listN.add(ron); + } + } + + return "listRepair"; } - public void setList(List list) { - this.list = list; + public String updaterepair() { + String repair_order_ID = arepair.getRepair_ID(); + Repair uprepair = reServiec.QueryRepair(repair_order_ID); + uprepair.setRepair_ISY(1);// ͨ + reServiec.UpdateRepair(uprepair); + queryOrder(); + return "listRepair"; } - public String queryOrder(){ - - List listRepair=new ArrayList(); - listRepair=reServiec.QueryAllRepair(); - for(int i=0;i listrepair = new ArrayList(); + private List listRecord = new ArrayList(); + + private Repair myrepair = new Repair(); + + public String querys() { + List currentlist = reServiec.QueryAllRepair(); + for (Repair a : currentlist) { + if (a.getRepair_ISY() == 1) {// ͨ + listrepair.add(a); + } + } + return "getall"; + } + + private String[] histor = { "ά޶", "ά޶ͨ", "ʼά", "άڴС", + "ά", "û" }; + + public String findhistory() { + String id = myrepair.getRepair_ID(); + Repair curepair = reServiec.QueryRepair(id); + String deviceSN=curepair.getRepair_SN(); + boolean flag = false; + if (curepair.getRepair_Odertime() != null) { + Record thisrecord0=new Record(); + thisrecord0.setCurrentname(histor[0]); + thisrecord0.setCurrenttime(curepair.getRepair_Odertime()); + thisrecord0.setDeviceSN(deviceSN); + listRecord.add(thisrecord0); + flag = true; + } + if (flag) { + Record thisrecordw=new Record(); + thisrecordw.setCurrentname(histor[1]); + thisrecordw.setCurrenttime(curepair.getRepair_Odertime()); + thisrecordw.setDeviceSN(deviceSN); + listRecord.add(thisrecordw); + } else { + flag = false; + } + + if (curepair.getRepair_StartT() != null && flag) { + Record thisrecord2=new Record(); + thisrecord2.setCurrentname(histor[2]); + thisrecord2.setCurrenttime(curepair.getRepair_StartT()); + thisrecord2.setDeviceSN(deviceSN); + listRecord.add(thisrecord2); + } else { + flag = false; + } + if (curepair.getRepair_State().equals("2") && flag) { + Record thisrecord3=new Record(); + thisrecord3.setCurrentname(histor[3]); + thisrecord3.setCurrenttime(curepair.getRepair_StartT()); + thisrecord3.setDeviceSN(deviceSN); + listRecord.add(thisrecord3); + } else { + flag = false; + } + if (curepair.getRepair_EndT() != null && flag) { + Record thisrecord4=new Record(); + thisrecord4.setCurrentname(histor[4]); + thisrecord4.setCurrenttime(curepair.getRepair_EndT()); + thisrecord4.setDeviceSN(deviceSN); + listRecord.add(thisrecord4); + } else { + flag = false; + } + if (flag) { + Record thisrecordq=new Record(); + thisrecordq.setCurrentname(histor[5]); + thisrecordq.setCurrenttime(curepair.getRepair_Odertime()); + thisrecordq.setDeviceSN(deviceSN); + listRecord.add(thisrecordq); + } + querys(); + return "getall"; + } + + public List getListRecord() { + return listRecord; + } + + public void setListRecord(List listRecord) { + this.listRecord = listRecord; + } + public Repair getMyrepair() { + return myrepair; + } + + public void setMyrepair(Repair myrepair) { + this.myrepair = myrepair; + } + + public List getListrepair() { + return listrepair; + } + + public void setListrepair(List listrepair) { + this.listrepair = listrepair; + } + +} diff --git a/src/com/xj/action/PersonAction.java b/src/com/xj/action/PersonAction.java new file mode 100644 index 0000000..a5b08bd --- /dev/null +++ b/src/com/xj/action/PersonAction.java @@ -0,0 +1,115 @@ +package com.xj.action; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import com.xj.dao.service.PersonnelService; +import com.xj.vo.Personnel; + +public class PersonAction { + + private personone myper =new personone(); + private PersonnelService peService=new PersonnelService(); + private List listPerson=new ArrayList(); + + public String queryAllPerson(){ + listPerson=peService.QueryAllPersonnel(); + return "ok"; + } + public String addPersonnel(){ + Personnel pp=new Personnel(); + pp.setP_ID(UUID.randomUUID().toString()); + pp.setP_Name(myper.getName()); + pp.setP_Pass("123456"); + peService.InsertPersonnel(pp); + queryAllPerson(); + return "ok"; + } + public String deletePersonnel(){ + String perid=myper.getId(); + peService.DeletePersonnel(perid); + queryAllPerson(); + return "ok"; + } + public String preupdate(){ + String perid=myper.getId(); + Personnel pp=peService.QueryPersonnel(perid); + myper.setName(pp.getP_Name()); + myper.setId(pp.getP_ID()); + myper.setGrade("ڶ"); + return "updateok"; + } + public String updatePersonnel(){ + String perid=myper.getId(); + Personnel pp=new Personnel(); + pp.setP_Name(myper.getName()); + queryAllPerson(); + return "ok"; + } + + + + + public List getListPerson() { + return listPerson; + } + public void setListPerson(List listPerson) { + this.listPerson = listPerson; + } + public personone getMyper() { + return myper; + } + public void setMyper(personone myper) { + this.myper = myper; + } + + class personone{ + private String id; + private String name; + private String age; + private String sex; + private String grade; + private String descr; + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getAge() { + return age; + } + public void setAge(String age) { + this.age = age; + } + public String getSex() { + return sex; + } + public void setSex(String sex) { + this.sex = sex; + } + public String getGrade() { + return grade; + } + public void setGrade(String grade) { + this.grade = grade; + } + public String getDescr() { + return descr; + } + public void setDescr(String descr) { + this.descr = descr; + } + + } + + +} diff --git a/src/com/xj/action/SystemAction.java b/src/com/xj/action/SystemAction.java new file mode 100644 index 0000000..4959241 --- /dev/null +++ b/src/com/xj/action/SystemAction.java @@ -0,0 +1,95 @@ +package com.xj.action; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import com.xj.dao.service.FeedBackService; +import com.xj.dao.service.PersonnelService; +import com.xj.dao.service.RepairService; +import com.xj.vo.FeedBack; +import com.xj.vo.Personnel; +import com.xj.vo.Repair; + +public class SystemAction { + private PersonnelService peService=new PersonnelService(); + private RepairService reServiec=new RepairService(); + private List listrepairMan=new ArrayList();//洢άԱ + private List relist = new ArrayList();//洢ά޶ + private Repair chooseRepair=new Repair(); + private Personnel repairper=new Personnel(); + + + /** + * ͨ˵δŵά޶ + */ + public String querySystemPlan(){ + + listrepairMan = peService.QueryAllPersonnel(); + + List rep = new ArrayList(); + rep=reServiec.QueryAllRepair(); + for(int i=0;i getListrepairMan() { + return listrepairMan; + } + + public void setListrepairMan(List listrepairMan) { + this.listrepairMan = listrepairMan; + } + + public List getRelist() { + return relist; + } + + public void setRelist(List relist) { + this.relist = relist; + } + + public Repair getChooseRepair() { + return chooseRepair; + } + + public void setChooseRepair(Repair chooseRepair) { + this.chooseRepair = chooseRepair; + } + + public Personnel getRepairper() { + return repairper; + } + + public void setRepairper(Personnel repairper) { + this.repairper = repairper; + } + + + +} diff --git a/src/com/xj/dao/impl/PersonnelDao.java b/src/com/xj/dao/impl/PersonnelDao.java index cc68812..3d98b2d 100644 --- a/src/com/xj/dao/impl/PersonnelDao.java +++ b/src/com/xj/dao/impl/PersonnelDao.java @@ -30,7 +30,7 @@ public List QueryAllPersonnel() { p.setP_Name(rs.getString("p_Name")); p.setP_Pass(rs.getString("P_Pass")); p.setP_Score(rs.getDouble("p_Score")); - p.setInGroup(rs.getString("inGroup")); + p.setInGroup(rs.getString("P_InGroup")); list.add(p); } } catch (SQLException e) { @@ -56,7 +56,7 @@ public Personnel QueryPersonnelByID(String id) { p.setP_Name(rs.getString("p_Name")); p.setP_Pass(rs.getString("p_Pass")); p.setP_Score(rs.getDouble("p_Score")); - p.setInGroup(rs.getString("inGroup")); + p.setInGroup(rs.getString("P_InGroup")); p.setP_ID(rs.getString("p_ID")); } } catch (SQLException e) { @@ -72,7 +72,7 @@ public Personnel QueryPersonnelByID(String id) { public void InsertPersonnel(Personnel p) { // TODO Auto-generated method stub util.getConnection(); - sql="insert into Personnel values(?,?,?,?)"; + sql="insert into Personnel values(?,?,?,?,?)"; List params=new ArrayList(); params.add(p.getP_ID()); params.add(p.getP_Name()); diff --git a/src/com/xj/dao/impl/RepairDao.java b/src/com/xj/dao/impl/RepairDao.java index 66efeea..b3dfc19 100644 --- a/src/com/xj/dao/impl/RepairDao.java +++ b/src/com/xj/dao/impl/RepairDao.java @@ -25,12 +25,17 @@ public List QueryAllRepair() { while(rs.next()){ Repair a=new Repair(); a.setRepair_ID(rs.getString("Repair_ID")); - a.setRepair_ISY(rs.getString("Repair_ISY")); - a.setRepair_StartT(rs.getDate("Repair_StartT")); - a.setRepair_EndT(rs.getDate("Repair_EndT")); + a.setRepair_ISY(rs.getInt("Repair_ISY")); + a.setRepair_StartT(rs.getTimestamp("Repair_StartT")); + a.setRepair_EndT(rs.getTimestamp("Repair_EndT")); a.setOrder_ID(rs.getString("Order_ID")); a.setP_ID(rs.getString("P_ID")); a.setRepair_State(rs.getString("Repair_State")); + a.setRepair_Odertime(rs.getTimestamp("Repair_Odertime")); + a.setRepair_SN(rs.getString("repair_SN")); + a.setRepair_Adress(rs.getString("repair_Adress")); + a.setRepair_Des(rs.getString("repair_Des")); + a.setRepair_Tel(rs.getString("repair_Tel")); list.add(a); } } catch (SQLException e) { @@ -53,13 +58,17 @@ public Repair QueryRepairByID(String id) { try { while(rs.next()){ a.setRepair_ID(id); - a.setRepair_ISY(rs.getString("repair_ISY")); - a.setRepair_StartT(rs.getDate("repair_StartT")); - a.setRepair_EndT(rs.getDate("repair_EndT")); + a.setRepair_ISY(rs.getInt("repair_ISY")); + a.setRepair_StartT(rs.getTimestamp("repair_StartT")); + a.setRepair_EndT(rs.getTimestamp("repair_EndT")); a.setOrder_ID(rs.getString("order_ID")); a.setP_ID(rs.getString("p_ID")); a.setRepair_State(rs.getString("repair_State")); - + a.setRepair_Odertime(rs.getTimestamp("Repair_Odertime")); + a.setRepair_SN(rs.getString("repair_SN")); + a.setRepair_Adress(rs.getString("repair_Adress")); + a.setRepair_Des(rs.getString("repair_Des")); + a.setRepair_Tel(rs.getString("repair_Tel")); } } catch (SQLException e) { // TODO Auto-generated catch block @@ -73,7 +82,7 @@ public Repair QueryRepairByID(String id) { public void InsertRepair(Repair r) { // TODO Auto-generated method stub util.getConnection(); - sql="insert into RepairTable values(?,?,?,?,?,?,?)"; + sql="insert into RepairTable values(?,?,?,?,?,?,?,?,?,?,?,?)"; List params=new ArrayList(); params.add(r.getRepair_ID()); params.add(r.getRepair_ISY()); @@ -82,6 +91,11 @@ public void InsertRepair(Repair r) { params.add(r.getOrder_ID()); params.add(r.getP_ID()); params.add(r.getRepair_State()); + params.add(r.getRepair_Odertime()); + params.add(r.getRepair_Tel()); + params.add(r.getRepair_Adress()); + params.add(r.getRepair_SN()); + params.add(r.getRepair_Des()); util.update(sql, params); util.close(); } @@ -99,7 +113,7 @@ public void DeleteRepair(String id) { public void UpdateRepair(Repair r) { // TODO Auto-generated method stub util.getConnection(); - sql="update RepairTable set Repair_ISY=?,Repair_StartT=?,Repair_EndT=?,Order_ID=?,P_Id=?,Repair_State=? where Repair_ID=?"; + sql="update RepairTable set Repair_ISY=?,Repair_StartT=?,Repair_EndT=?,Order_ID=?,P_Id=?,Repair_State=?,Repair_Odertime=?,Repair_Tel=?,Repair_Adress=?,Repair_SN=?,Repair_Des=? where Repair_ID=?"; List params=new ArrayList(); params.add(r.getRepair_ISY()); @@ -108,6 +122,12 @@ public void UpdateRepair(Repair r) { params.add(r.getOrder_ID()); params.add(r.getP_ID()); params.add(r.getRepair_State()); + params.add(r.getRepair_Odertime()); + params.add(r.getRepair_Tel()); + params.add(r.getRepair_Adress()); + params.add(r.getRepair_SN()); + params.add(r.getRepair_Des()); + params.add(r.getRepair_ID()); util.update(sql, params); util.close(); diff --git a/src/com/xj/vo/Personnel.java b/src/com/xj/vo/Personnel.java index 100653d..bbd05af 100644 --- a/src/com/xj/vo/Personnel.java +++ b/src/com/xj/vo/Personnel.java @@ -17,8 +17,8 @@ public void setP_ID(String p_ID) { public String getP_Name() { return P_Name; } - public void setP_Name(String p_Name) { - P_Name = p_Name; + public void setP_Name(String P_Name) { + this.P_Name = P_Name; } public String getP_Pass() { return P_Pass; diff --git a/src/com/xj/vo/Record.java b/src/com/xj/vo/Record.java new file mode 100644 index 0000000..1cb644c --- /dev/null +++ b/src/com/xj/vo/Record.java @@ -0,0 +1,28 @@ +package com.xj.vo; + +import java.sql.Timestamp; + +public class Record { + + private String currentname; + private Timestamp currenttime; + private String deviceSN; + public String getDeviceSN() { + return deviceSN; + } + public void setDeviceSN(String deviceSN) { + this.deviceSN = deviceSN; + } + public String getCurrentname() { + return currentname; + } + public void setCurrentname(String currentname) { + this.currentname = currentname; + } + public Timestamp getCurrenttime() { + return currenttime; + } + public void setCurrenttime(Timestamp currenttime) { + this.currenttime = currenttime; + } +} diff --git a/src/com/xj/vo/Repair.java b/src/com/xj/vo/Repair.java index f2f81c1..24dcf19 100644 --- a/src/com/xj/vo/Repair.java +++ b/src/com/xj/vo/Repair.java @@ -1,38 +1,74 @@ package com.xj.vo; import java.sql.Date; +import java.sql.Timestamp; public class Repair { private String Repair_ID; - private String Repair_ISY; - private Date Repair_StartT; - private Date Repair_EndT; + private int Repair_ISY; + private Timestamp Repair_StartT; + private Timestamp Repair_EndT; private String Order_ID; private String P_ID; private String Repair_State; + private Timestamp Repair_Odertime; + private String Repair_Tel; + private String Repair_Adress; + private String Repair_SN; + private String Repair_Des; + public String getRepair_Des() { + return Repair_Des; + } + public void setRepair_Des(String repair_Des) { + Repair_Des = repair_Des; + } + public Timestamp getRepair_Odertime() { + return Repair_Odertime; + } + public void setRepair_Odertime(Timestamp repair_Odertime) { + Repair_Odertime = repair_Odertime; + } + public String getRepair_Tel() { + return Repair_Tel; + } + public void setRepair_Tel(String repair_Tel) { + Repair_Tel = repair_Tel; + } + public String getRepair_Adress() { + return Repair_Adress; + } + public void setRepair_Adress(String repair_Adress) { + Repair_Adress = repair_Adress; + } + public String getRepair_SN() { + return Repair_SN; + } + public void setRepair_SN(String repair_SN) { + Repair_SN = repair_SN; + } public String getRepair_ID() { return Repair_ID; } public void setRepair_ID(String repair_ID) { Repair_ID = repair_ID; } - public String getRepair_ISY() { + public int getRepair_ISY() { return Repair_ISY; } - public void setRepair_ISY(String repair_ISY) { + public void setRepair_ISY(int repair_ISY) { Repair_ISY = repair_ISY; } - public Date getRepair_StartT() { + public Timestamp getRepair_StartT() { return Repair_StartT; } - public void setRepair_StartT(Date repair_StartT) { + public void setRepair_StartT(Timestamp repair_StartT) { Repair_StartT = repair_StartT; } - public Date getRepair_EndT() { + public Timestamp getRepair_EndT() { return Repair_EndT; } - public void setRepair_EndT(Date repair_EndT) { + public void setRepair_EndT(Timestamp repair_EndT) { Repair_EndT = repair_EndT; } public String getOrder_ID() { diff --git a/src/com/xj/vo/Repair_order.java b/src/com/xj/vo/Repair_order.java index a235d59..af1be3e 100644 --- a/src/com/xj/vo/Repair_order.java +++ b/src/com/xj/vo/Repair_order.java @@ -1,43 +1,64 @@ package com.xj.vo; import java.sql.Date; +import java.sql.Timestamp; public class Repair_order { + private String repairID; + private String OrderName; private String PName; - private Date startTime; - private Date endTime; + private Timestamp startTime; + private Timestamp endTime; private String state; + + public String getRepairID() { + return repairID; + } + + public void setRepairID(String repairID) { + this.repairID = repairID; + } + public String getOrderName() { return OrderName; } + public void setOrderName(String orderName) { OrderName = orderName; } + public String getPName() { return PName; } + public void setPName(String pName) { PName = pName; } - public Date getStartTime() { + + public Timestamp getStartTime() { return startTime; } - public void setStartTime(Date startTime) { + + public void setStartTime(Timestamp startTime) { this.startTime = startTime; } - public Date getEndTime() { + + public Timestamp getEndTime() { return endTime; } - public void setEndTime(Date endTime) { + + public void setEndTime(Timestamp endTime) { this.endTime = endTime; } + public String getState() { return state; } + public void setState(String state) { this.state = state; } - + } diff --git a/src/com/xj/vo/Repair_order_n.java b/src/com/xj/vo/Repair_order_n.java new file mode 100644 index 0000000..6910a19 --- /dev/null +++ b/src/com/xj/vo/Repair_order_n.java @@ -0,0 +1,53 @@ +package com.xj.vo; + +import java.sql.Timestamp; + +public class Repair_order_n { + + private String repairID; + + private String orderName; + private String orderDes; + private Timestamp orderTime; + private String pname; + private String phone; + + public String getPname() { + return pname; + } + public void setPname(String pname) { + this.pname = pname; + } + public String getPhone() { + return phone; + } + public void setPhone(String phone) { + this.phone = phone; + } + public String getRepairID() { + return repairID; + } + public void setRepairID(String repairID) { + this.repairID = repairID; + } + public String getOrderName() { + return orderName; + } + public void setOrderName(String orderName) { + this.orderName = orderName; + } + public String getOrderDes() { + return orderDes; + } + public void setOrderDes(String orderDes) { + this.orderDes = orderDes; + } + public Timestamp getOrderTime() { + return orderTime; + } + public void setOrderTime(Timestamp orderTime) { + this.orderTime = orderTime; + } + + +} diff --git a/src/struts.xml b/src/struts.xml index 28fd81f..439282d 100644 --- a/src/struts.xml +++ b/src/struts.xml @@ -4,10 +4,21 @@ - index.jsp + dashboard.jsp login.jsp index.jsp + + systemPlan.jsp + + + proControl.jsp + + + + seePerson.jsp + updatePerson.jsp +