Commit 12ac36afd4006a725df43f72ad75e7b98c19041d

Authored by 潘钊
1 parent 1be31d53

update...

src/main/java/com/bsth/server_rs/base_info/person/Personnel.java
@@ -70,17 +70,27 @@ public class Personnel implements Serializable { @@ -70,17 +70,27 @@ public class Personnel implements Serializable {
70 /** 70 /**
71 * RFID 人卡IC号 71 * RFID 人卡IC号
72 */ 72 */
73 - private String icRFID; 73 + private String icRfid;
74 74
75 /** 75 /**
76 * RFID 人卡ID号 76 * RFID 人卡ID号
77 */ 77 */
78 - private String idRFID; 78 + private String idRfid;
79 79
80 /** 80 /**
81 * RFID 标签号 81 * RFID 标签号
82 */ 82 */
83 - private String tagRFID; 83 + private String tagRfid;
  84 +
  85 + /**
  86 + * 线路名称
  87 + */
  88 + private String lineName;
  89 +
  90 + /**
  91 + * 线路编码
  92 + */
  93 + private String lineCode;
84 94
85 public String getCompanyCode() { 95 public String getCompanyCode() {
86 return companyCode; 96 return companyCode;
@@ -154,27 +164,43 @@ public class Personnel implements Serializable { @@ -154,27 +164,43 @@ public class Personnel implements Serializable {
154 this.telphone = telphone; 164 this.telphone = telphone;
155 } 165 }
156 166
157 - public String getIcRFID() {  
158 - return icRFID; 167 + public String getIcRfid() {
  168 + return icRfid;
  169 + }
  170 +
  171 + public void setIcRfid(String icRfid) {
  172 + this.icRfid = icRfid;
  173 + }
  174 +
  175 + public String getIdRfid() {
  176 + return idRfid;
  177 + }
  178 +
  179 + public void setIdRfid(String idRfid) {
  180 + this.idRfid = idRfid;
  181 + }
  182 +
  183 + public String getTagRfid() {
  184 + return tagRfid;
159 } 185 }
160 186
161 - public void setIcRFID(String icRFID) {  
162 - this.icRFID = icRFID; 187 + public void setTagRfid(String tagRfid) {
  188 + this.tagRfid = tagRfid;
163 } 189 }
164 190
165 - public String getIdRFID() {  
166 - return idRFID; 191 + public String getLineName() {
  192 + return lineName;
167 } 193 }
168 194
169 - public void setIdRFID(String idRFID) {  
170 - this.idRFID = idRFID; 195 + public void setLineName(String lineName) {
  196 + this.lineName = lineName;
171 } 197 }
172 198
173 - public String getTagRFID() {  
174 - return tagRFID; 199 + public String getLineCode() {
  200 + return lineCode;
175 } 201 }
176 202
177 - public void setTagRFID(String tagRFID) {  
178 - this.tagRFID = tagRFID; 203 + public void setLineCode(String lineCode) {
  204 + this.lineCode = lineCode;
179 } 205 }
180 } 206 }
src/main/java/com/bsth/server_rs/base_info/person/buffer/PersonBufferData.java
@@ -55,6 +55,6 @@ public class PersonBufferData implements CommandLineRunner { @@ -55,6 +55,6 @@ public class PersonBufferData implements CommandLineRunner {
55 55
56 @Override 56 @Override
57 public void run(String... strings) throws Exception { 57 public void run(String... strings) throws Exception {
58 - Application.mainServices.scheduleWithFixedDelay(personRefreshThread, 10, 60 * 60, TimeUnit.SECONDS); 58 + Application.mainServices.scheduleWithFixedDelay(personRefreshThread, 10, 60 * 30, TimeUnit.SECONDS);
59 } 59 }
60 } 60 }
src/main/java/com/bsth/server_rs/base_info/person/buffer/PersonRefreshThread.java
@@ -25,7 +25,8 @@ public class PersonRefreshThread extends Thread{ @@ -25,7 +25,8 @@ public class PersonRefreshThread extends Thread{
25 public void run() { 25 public void run() {
26 26
27 try { 27 try {
28 - List<Personnel> list = jdbcTemplate.query("select * from bsth_c_personnel",BeanPropertyRowMapper.newInstance(Personnel.class)); 28 + List<Personnel> list = jdbcTemplate.query("select t1.*,t2.name as line_name,t2.line_code from (SELECT company_code,branche_company_code,job_code,personnel_name,papers_code,ic_card_code,personnel_type,posts,card,telphone,ic_rfid,id_rfid,tag_rfid,e.xl FROM bsth_c_personnel p left JOIN bsth_c_s_ecinfo e on p.id=e.jsy) t1 LEFT JOIN bsth_c_line t2 on t1.xl=t2.id "
  29 + ,BeanPropertyRowMapper.newInstance(Personnel.class));
29 if(list != null && list.size() > 0) 30 if(list != null && list.size() > 0)
30 PersonBufferData.replaceAll(list); 31 PersonBufferData.replaceAll(list);
31 }catch (Exception e){ 32 }catch (Exception e){