diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index 40e3ff5..696851e 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -23,20 +23,12 @@
@Path("pgInPerson")
public class PgInPgPersonRs {
+ @Resource
private PgInPgPersonManager pgInPgPersonManager;
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
- @Resource
- public void setPgInPgPersonManager(PgInPgPersonManager pgInPgPersonManager) {
- this.pgInPgPersonManager = pgInPgPersonManager;
- }
-
- @Resource
- public void setPgInPgStatusManager(PgInPgStatusManager pgInPgStatusManager) {
- this.pgInPgStatusManager = pgInPgStatusManager;
- }
-
/**
* 派发工作证(新增入廊记录)
*/
@@ -44,6 +36,7 @@
@Path("addInPgPerson")
@Produces(MediaType.APPLICATION_JSON)
public Map addInPgPerson(@FormParam("userName") String userName,
+ @FormParam("userCode") String userCode,
@FormParam("phoneNumber") String phoneNumber,
@FormParam("personType") String personType,
@FormParam("assetCode") String assetCode) throws Exception {
@@ -59,13 +52,14 @@
PgInPgPerson pgInPgPerson1=new PgInPgPerson();
pgInPgPerson1.setUserName(userName);
+ pgInPgPerson1.setUserCode(userCode);
pgInPgPerson1.setPhoneNumber(phoneNumber);
pgInPgPerson1.setPersonType(personType);
pgInPgPerson1.setIsInPg(1);
pgInPgPerson1.setAssetCode(assetCode);
pgInPgPersonManager.save(pgInPgPerson1);
- String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,"",userName,personType);
+ String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,userCode,userName,personType);
result = "true";
msg = "人员注册保存成功"+syResult;
}
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index 40e3ff5..696851e 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -23,20 +23,12 @@
@Path("pgInPerson")
public class PgInPgPersonRs {
+ @Resource
private PgInPgPersonManager pgInPgPersonManager;
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
- @Resource
- public void setPgInPgPersonManager(PgInPgPersonManager pgInPgPersonManager) {
- this.pgInPgPersonManager = pgInPgPersonManager;
- }
-
- @Resource
- public void setPgInPgStatusManager(PgInPgStatusManager pgInPgStatusManager) {
- this.pgInPgStatusManager = pgInPgStatusManager;
- }
-
/**
* 派发工作证(新增入廊记录)
*/
@@ -44,6 +36,7 @@
@Path("addInPgPerson")
@Produces(MediaType.APPLICATION_JSON)
public Map addInPgPerson(@FormParam("userName") String userName,
+ @FormParam("userCode") String userCode,
@FormParam("phoneNumber") String phoneNumber,
@FormParam("personType") String personType,
@FormParam("assetCode") String assetCode) throws Exception {
@@ -59,13 +52,14 @@
PgInPgPerson pgInPgPerson1=new PgInPgPerson();
pgInPgPerson1.setUserName(userName);
+ pgInPgPerson1.setUserCode(userCode);
pgInPgPerson1.setPhoneNumber(phoneNumber);
pgInPgPerson1.setPersonType(personType);
pgInPgPerson1.setIsInPg(1);
pgInPgPerson1.setAssetCode(assetCode);
pgInPgPersonManager.save(pgInPgPerson1);
- String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,"",userName,personType);
+ String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,userCode,userName,personType);
result = "true";
msg = "人员注册保存成功"+syResult;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java b/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
deleted file mode 100644
index e8daabc..0000000
--- a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.casic.PgInterface.rs;
-
-import com.casic.PgInterface.devData.manager.PgLocationManager;
-import com.casic.PgInterface.devTable.manager.PgDeviceManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import javax.ws.rs.Path;
-
-/**
- * Created by yxw on 2017/12/11.
- */
-@Component
-@Path("location")
-public class PgLocationRs {
-
- private static Logger logger = LoggerFactory.getLogger(PgLocationRs.class);
-
- private PgDeviceManager pgDeviceManager;
-
- private PgLocationManager pgLocationManager;
-
- @Resource
- public void setPgDeviceManager(PgDeviceManager pgDeviceManager) {
- this.pgDeviceManager = pgDeviceManager;
- }
-
- @Resource
- public void setPgLocationManager(PgLocationManager pgLocationManager) {
- this.pgLocationManager = pgLocationManager;
- }
-
-
-
-
-
-}
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index 40e3ff5..696851e 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -23,20 +23,12 @@
@Path("pgInPerson")
public class PgInPgPersonRs {
+ @Resource
private PgInPgPersonManager pgInPgPersonManager;
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
- @Resource
- public void setPgInPgPersonManager(PgInPgPersonManager pgInPgPersonManager) {
- this.pgInPgPersonManager = pgInPgPersonManager;
- }
-
- @Resource
- public void setPgInPgStatusManager(PgInPgStatusManager pgInPgStatusManager) {
- this.pgInPgStatusManager = pgInPgStatusManager;
- }
-
/**
* 派发工作证(新增入廊记录)
*/
@@ -44,6 +36,7 @@
@Path("addInPgPerson")
@Produces(MediaType.APPLICATION_JSON)
public Map addInPgPerson(@FormParam("userName") String userName,
+ @FormParam("userCode") String userCode,
@FormParam("phoneNumber") String phoneNumber,
@FormParam("personType") String personType,
@FormParam("assetCode") String assetCode) throws Exception {
@@ -59,13 +52,14 @@
PgInPgPerson pgInPgPerson1=new PgInPgPerson();
pgInPgPerson1.setUserName(userName);
+ pgInPgPerson1.setUserCode(userCode);
pgInPgPerson1.setPhoneNumber(phoneNumber);
pgInPgPerson1.setPersonType(personType);
pgInPgPerson1.setIsInPg(1);
pgInPgPerson1.setAssetCode(assetCode);
pgInPgPersonManager.save(pgInPgPerson1);
- String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,"",userName,personType);
+ String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,userCode,userName,personType);
result = "true";
msg = "人员注册保存成功"+syResult;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java b/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
deleted file mode 100644
index e8daabc..0000000
--- a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.casic.PgInterface.rs;
-
-import com.casic.PgInterface.devData.manager.PgLocationManager;
-import com.casic.PgInterface.devTable.manager.PgDeviceManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import javax.ws.rs.Path;
-
-/**
- * Created by yxw on 2017/12/11.
- */
-@Component
-@Path("location")
-public class PgLocationRs {
-
- private static Logger logger = LoggerFactory.getLogger(PgLocationRs.class);
-
- private PgDeviceManager pgDeviceManager;
-
- private PgLocationManager pgLocationManager;
-
- @Resource
- public void setPgDeviceManager(PgDeviceManager pgDeviceManager) {
- this.pgDeviceManager = pgDeviceManager;
- }
-
- @Resource
- public void setPgLocationManager(PgLocationManager pgLocationManager) {
- this.pgLocationManager = pgLocationManager;
- }
-
-
-
-
-
-}
\ No newline at end of file
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
new file mode 100644
index 0000000..aa51af1
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index 40e3ff5..696851e 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -23,20 +23,12 @@
@Path("pgInPerson")
public class PgInPgPersonRs {
+ @Resource
private PgInPgPersonManager pgInPgPersonManager;
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
- @Resource
- public void setPgInPgPersonManager(PgInPgPersonManager pgInPgPersonManager) {
- this.pgInPgPersonManager = pgInPgPersonManager;
- }
-
- @Resource
- public void setPgInPgStatusManager(PgInPgStatusManager pgInPgStatusManager) {
- this.pgInPgStatusManager = pgInPgStatusManager;
- }
-
/**
* 派发工作证(新增入廊记录)
*/
@@ -44,6 +36,7 @@
@Path("addInPgPerson")
@Produces(MediaType.APPLICATION_JSON)
public Map addInPgPerson(@FormParam("userName") String userName,
+ @FormParam("userCode") String userCode,
@FormParam("phoneNumber") String phoneNumber,
@FormParam("personType") String personType,
@FormParam("assetCode") String assetCode) throws Exception {
@@ -59,13 +52,14 @@
PgInPgPerson pgInPgPerson1=new PgInPgPerson();
pgInPgPerson1.setUserName(userName);
+ pgInPgPerson1.setUserCode(userCode);
pgInPgPerson1.setPhoneNumber(phoneNumber);
pgInPgPerson1.setPersonType(personType);
pgInPgPerson1.setIsInPg(1);
pgInPgPerson1.setAssetCode(assetCode);
pgInPgPersonManager.save(pgInPgPerson1);
- String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,"",userName,personType);
+ String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,userCode,userName,personType);
result = "true";
msg = "人员注册保存成功"+syResult;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java b/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
deleted file mode 100644
index e8daabc..0000000
--- a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.casic.PgInterface.rs;
-
-import com.casic.PgInterface.devData.manager.PgLocationManager;
-import com.casic.PgInterface.devTable.manager.PgDeviceManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import javax.ws.rs.Path;
-
-/**
- * Created by yxw on 2017/12/11.
- */
-@Component
-@Path("location")
-public class PgLocationRs {
-
- private static Logger logger = LoggerFactory.getLogger(PgLocationRs.class);
-
- private PgDeviceManager pgDeviceManager;
-
- private PgLocationManager pgLocationManager;
-
- @Resource
- public void setPgDeviceManager(PgDeviceManager pgDeviceManager) {
- this.pgDeviceManager = pgDeviceManager;
- }
-
- @Resource
- public void setPgLocationManager(PgLocationManager pgLocationManager) {
- this.pgLocationManager = pgLocationManager;
- }
-
-
-
-
-
-}
\ No newline at end of file
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
new file mode 100644
index 0000000..aa51af1
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ
diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
index 6070ba0..441bf12 100644
--- "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 72d6c08..c71da56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,39 +7,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -82,10 +61,10 @@
-
+
-
+
@@ -94,7 +73,7 @@
-
+
@@ -106,7 +85,7 @@
-
+
@@ -115,10 +94,10 @@
-
+
-
+
@@ -131,49 +110,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -232,9 +173,6 @@
-
-
-
@@ -254,7 +192,6 @@
-
@@ -282,7 +219,11 @@
+
+
+
+
@@ -321,7 +262,7 @@
-
+
@@ -391,47 +332,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -468,7 +369,7 @@
-
+
@@ -477,7 +378,7 @@
-
+
@@ -923,7 +824,7 @@
-
+
1521168093758
@@ -1272,7 +1173,7 @@
-
+
@@ -1284,10 +1185,10 @@
-
+
-
+
@@ -1299,7 +1200,7 @@
-
+
@@ -1439,64 +1340,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1814,10 +1657,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -1829,17 +1733,31 @@
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java b/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
deleted file mode 100644
index 3a9144b..0000000
--- a/src/main/java/com/casic/PgInterface/devData/domain/PgLocation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.casic.PgInterface.devData.domain;
-
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import com.casic.PgInterface.patroler.domain.PgUser;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-import javax.persistence.*;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Entity
-@Table(name = "PG_LOCATION")
-@SequenceGenerator(name = "SEQ_PG_LOCATION_ID", sequenceName = "SEQ_PG_LOCATION_ID",allocationSize=1,initialValue=1)
-public class PgLocation implements Serializable {
- private static final long serialVersionUID = 1L;
- private long id;
- private PgDevice pgDeviceId;//设备
- private PgUser pgPatrolerId;//人员信息
- private Date intoTime;//进入时间
- private Date outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
-
- @Id
- @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PG_LOCATION_ID")
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- @Column(name = "INTO_TIME")
- public Date getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(Date intoTime) {
- this.intoTime = intoTime;
- }
-
- @Column(name = "OUT_TIME")
- public Date getOutTime() {
- return outTime;
- }
-
- public void setOutTime(Date outTime) {
- this.outTime = outTime;
- }
-
- @Column(name = "POSITION")
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGDEVICEID")
- public PgDevice getPgDeviceId() {
- return pgDeviceId;
- }
-
- public void setPgDeviceId(PgDevice pgDeviceId) {
- this.pgDeviceId = pgDeviceId;
- }
-
- @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST})
- @NotFound(action = NotFoundAction.IGNORE)
- @JoinColumn(name = "PGPATROLERID")
- public PgUser getPgPatrolerId() {
- return pgPatrolerId;
- }
-
- public void setPgPatrolerId(PgUser pgPatrolerId) {
- this.pgPatrolerId = pgPatrolerId;
- }
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java b/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
deleted file mode 100644
index 88efde7..0000000
--- a/src/main/java/com/casic/PgInterface/devData/dto/PgLocationDto.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.casic.PgInterface.devData.dto;
-
-import com.casic.PgInterface.devData.domain.PgLocation;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-public class PgLocationDto{
-
- private String id;
- private String intoTime;//进入时间
- private String outTime;//预计出去时间
- private String position;//当前位置,暂定;未拿到具体数据格式
- private String device;//设备
- private String userName;//用户名
- private String department;//部门
- private String post;//职务
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getIntoTime() {
- return intoTime;
- }
-
- public void setIntoTime(String intoTime) {
- this.intoTime = intoTime;
- }
-
- public String getOutTime() {
- return outTime;
- }
-
- public void setOutTime(String outTime) {
- this.outTime = outTime;
- }
-
- public String getPosition() {
- return position;
- }
-
- public void setPosition(String position) {
- this.position = position;
- }
-
- public String getDevice() {
- return device;
- }
-
- public void setDevice(String device) {
- this.device = device;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getDepartment() {
- return department;
- }
-
- public void setDepartment(String department) {
- this.department = department;
- }
-
- public String getPost() {
- return post;
- }
-
- public void setPost(String post) {
- this.post = post;
- }
-
- public PgLocationDto(PgLocation pgLocation) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
- this.setId(String.valueOf(pgLocation.getId()));
- this.setUserName(pgLocation.getPgPatrolerId().getUserName());
- this.setDepartment(pgLocation.getPgPatrolerId().getDepartment());
- this.setPost(pgLocation.getPgPatrolerId().getPost());
- this.setDevice(pgLocation.getPgDeviceId().getAssetName());
- if (pgLocation.getIntoTime() != null)
- this.setIntoTime(sdf.format(pgLocation.getIntoTime()));
- else
- this.setIntoTime("");
- if (pgLocation.getOutTime() != null)
- this.setOutTime(sdf.format(pgLocation.getOutTime()));
- else
- this.setOutTime("");
- this.setPosition(pgLocation.getPosition());
- }
-}
diff --git a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java b/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
deleted file mode 100644
index b1d63a4..0000000
--- a/src/main/java/com/casic/PgInterface/devData/manager/PgLocationManager.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.casic.PgInterface.devData.manager;
-
-import com.casic.PgInterface.core.hibernate.HibernateEntityDao;
-import com.casic.PgInterface.core.util.DateUtils;
-import com.casic.PgInterface.core.util.StringUtils;
-import com.casic.PgInterface.devData.domain.PgCo;
-import com.casic.PgInterface.devData.domain.PgLocation;
-import com.casic.PgInterface.devData.dto.PgCoDto;
-import com.casic.PgInterface.devData.dto.PgLocationDto;
-import com.casic.PgInterface.devTable.domain.PgDevice;
-import org.hibernate.Criteria;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * Created by yxw on 2017/11/2.
- */
-@Service
-public class PgLocationManager extends HibernateEntityDao {
-
- //获取设备时间段内所有的监测数据
-
-}
diff --git a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
index 98c3f34..f623961 100644
--- a/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
+++ b/src/main/java/com/casic/PgInterface/devTable/domain/PgDevice.java
@@ -34,7 +34,6 @@
private List pgAlarms;
private List pgCh4s;
private List pgCos;
- private List pgLocations;
private List pgO2s;
private List pgShs;
private List pgTempHums;
@@ -203,15 +202,6 @@
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
- public List getPgLocations() {
- return pgLocations;
- }
-
- public void setPgLocations(List pgLocations) {
- this.pgLocations = pgLocations;
- }
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "pgDeviceId")
public List getPgO2s() {
return pgO2s;
}
@@ -237,4 +227,4 @@
public void setPgTempHums(List pgTempHums) {
this.pgTempHums = pgTempHums;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
index 9bbeb14..812b108 100644
--- a/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
+++ b/src/main/java/com/casic/PgInterface/patroler/domain/PgInPgPerson.java
@@ -15,8 +15,9 @@
private static final long serialVersionUID = 1L;
private long id;
private String userName;//入廊人员
+ private String userCode;//人员编号
private String phoneNumber;//联系方式
- private String personType;//人员类别:监控人员、外巡人员和内巡(维修)人员
+ private String personType;//人员类别:工作人员、临时人员
private int isInPg;//是否在廊内
private String assetCode;//资产编号
private List pgInPgStatuses;
@@ -40,6 +41,15 @@
this.userName = userName;
}
+ @Column(name = "USERCODE")
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
@Column(name = "PHONENUMBER")
public String getPhoneNumber() {
return phoneNumber;
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
index 796de5c..e0cfa5f 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgInfoDto.java
@@ -12,6 +12,7 @@
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;//是否在廊内
private String lastInTime;//最后入廊时间
@@ -27,6 +28,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -87,6 +96,7 @@
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setIsInPg(String.valueOf(pgInPgPerson.getIsInPg()));
this.setPersonType(pgInPgPerson.getPersonType());
diff --git a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
index c158f88..6a1f60c 100644
--- a/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
+++ b/src/main/java/com/casic/PgInterface/patroler/dto/PgInPgPersonDto.java
@@ -10,6 +10,7 @@
private String id;
private String userName;//入廊人员
private String phoneNumber;//联系方式
+ private String userCode;//人员编号
private String personType;//人员类别
private String isInPg;
private String assetCode;
@@ -31,6 +32,14 @@
this.userName = userName;
}
+ public String getUserCode() {
+ return userCode;
+ }
+
+ public void setUserCode(String userCode) {
+ this.userCode = userCode;
+ }
+
public String getPhoneNumber() {
return phoneNumber;
}
@@ -75,6 +84,7 @@
this.setId(String.valueOf(pgInPgPerson.getId()));
this.setUserName(pgInPgPerson.getUserName());
+ this.setUserCode(pgInPgPerson.getUserCode());
this.setPhoneNumber(pgInPgPerson.getPhoneNumber());
this.setPersonType(pgInPgPerson.getPersonType());
this.setAssetCode(pgInPgPerson.getAssetCode());
diff --git a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
index 40e3ff5..696851e 100644
--- a/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
+++ b/src/main/java/com/casic/PgInterface/rs/PgInPgPersonRs.java
@@ -23,20 +23,12 @@
@Path("pgInPerson")
public class PgInPgPersonRs {
+ @Resource
private PgInPgPersonManager pgInPgPersonManager;
+ @Resource
private PgInPgStatusManager pgInPgStatusManager;
- @Resource
- public void setPgInPgPersonManager(PgInPgPersonManager pgInPgPersonManager) {
- this.pgInPgPersonManager = pgInPgPersonManager;
- }
-
- @Resource
- public void setPgInPgStatusManager(PgInPgStatusManager pgInPgStatusManager) {
- this.pgInPgStatusManager = pgInPgStatusManager;
- }
-
/**
* 派发工作证(新增入廊记录)
*/
@@ -44,6 +36,7 @@
@Path("addInPgPerson")
@Produces(MediaType.APPLICATION_JSON)
public Map addInPgPerson(@FormParam("userName") String userName,
+ @FormParam("userCode") String userCode,
@FormParam("phoneNumber") String phoneNumber,
@FormParam("personType") String personType,
@FormParam("assetCode") String assetCode) throws Exception {
@@ -59,13 +52,14 @@
PgInPgPerson pgInPgPerson1=new PgInPgPerson();
pgInPgPerson1.setUserName(userName);
+ pgInPgPerson1.setUserCode(userCode);
pgInPgPerson1.setPhoneNumber(phoneNumber);
pgInPgPerson1.setPersonType(personType);
pgInPgPerson1.setIsInPg(1);
pgInPgPerson1.setAssetCode(assetCode);
pgInPgPersonManager.save(pgInPgPerson1);
- String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,"",userName,personType);
+ String syResult=pgInPgPersonManager.synchorizedInPgInfo(assetCode,userCode,userName,personType);
result = "true";
msg = "人员注册保存成功"+syResult;
}
diff --git a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java b/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
deleted file mode 100644
index e8daabc..0000000
--- a/src/main/java/com/casic/PgInterface/rs/PgLocationRs.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.casic.PgInterface.rs;
-
-import com.casic.PgInterface.devData.manager.PgLocationManager;
-import com.casic.PgInterface.devTable.manager.PgDeviceManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import javax.ws.rs.Path;
-
-/**
- * Created by yxw on 2017/12/11.
- */
-@Component
-@Path("location")
-public class PgLocationRs {
-
- private static Logger logger = LoggerFactory.getLogger(PgLocationRs.class);
-
- private PgDeviceManager pgDeviceManager;
-
- private PgLocationManager pgLocationManager;
-
- @Resource
- public void setPgDeviceManager(PgDeviceManager pgDeviceManager) {
- this.pgDeviceManager = pgDeviceManager;
- }
-
- @Resource
- public void setPgLocationManager(PgLocationManager pgLocationManager) {
- this.pgLocationManager = pgLocationManager;
- }
-
-
-
-
-
-}
\ No newline at end of file
diff --git "a/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
new file mode 100644
index 0000000..aa51af1
--- /dev/null
+++ "b/~$\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ
diff --git "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
index 6070ba0..441bf12 100644
--- "a/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ "b/\346\216\245\345\217\243\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ
diff --git "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx" "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
index bf04e32..a28c34e 100644
--- "a/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
+++ "b/\347\256\241\345\273\212\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\350\257\264\346\230\216\346\226\260\351\234\200\346\261\202.docx"
Binary files differ