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"%>
系统管理
维修人员管理
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"%>
+
+
+
+
+
+ 过程监控
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 加快进度吧!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+
维修正在处理中······
+
2016-11-4
+
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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"%>
+
+
+
+
+
+ 查看维修人员
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请谨慎操作!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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