From 592720573d6b194bbac25b25b6c619376cb9c0a4 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期四, 13 十二月 2018 13:38:34 +0800
Subject: [PATCH] 修改电池查询面板中正则的验证
---
gx_tieta/src/com/fgkj/actions/Deverror_recordAction.java | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/gx_tieta/src/com/fgkj/actions/Deverror_recordAction.java b/gx_tieta/src/com/fgkj/actions/Deverror_recordAction.java
index 29f22f1..8f5373e 100644
--- a/gx_tieta/src/com/fgkj/actions/Deverror_recordAction.java
+++ b/gx_tieta/src/com/fgkj/actions/Deverror_recordAction.java
@@ -26,7 +26,8 @@
Deverror_record dev_record=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Deverror_record.class);
User_inf uinf=(User_inf) getUser();
dev_record.setUid(uinf.getUId());
- if(file.size()>0&&file!=null){
+ dev_record.setUname(uinf.getUName());
+ if(file!=null&&file.size()>0){
for (int i=0;i<file.size();i++) {
switch (i) {
case 0:
@@ -47,10 +48,41 @@
}
}
//dev_record.setPicture_num(file.size());
+ //System.out.println(dev_record);
ServiceModel model=service.add(dev_record);
result=tojson(model);
return SUCCESS;
}
+ //鐢ㄦ埛澶勭悊鐨勭粨鏋�
+ public String update(){
+ Deverror_record dev_record=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Deverror_record.class);
+ User_inf uinf=(User_inf) getUser();
+ dev_record.setSolve_uid(uinf.getUId());
+ dev_record.setSolve_uname(uinf.getUName());
+ if(file!=null&&file.size()>0){
+ for (int i=0;i<file.size();i++) {
+ switch (i) {
+ case 0:
+ dev_record.setSolve_picture_one(file.get(i));
+ break;
+ case 1:
+ dev_record.setSolve_picture_two(file.get(i));
+ break;
+ case 2:
+ dev_record.setSolve_picture_three(file.get(i));
+ break;
+ case 3:
+ dev_record.setSolve_picture_four(file.get(i));
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ ServiceModel model=service.update(dev_record);
+ result=tojson(model);
+ return SUCCESS;
+ }
//鏍规嵁stationid鏌ヨ璁惧鐨勯棶棰樿褰�
public String serchByCondition(){
BattInf binf=getGson().fromJson(json, BattInf.class);
--
Gitblit v1.9.1