|
|
|
@ -165,7 +165,7 @@ public class UploadService extends IntentService {
|
|
|
|
//计划
|
|
|
|
//计划
|
|
|
|
Request<String> request = NoHttp.createStringRequest(Contans.IP+Contans.DJJHSC, RequestMethod.POST);
|
|
|
|
Request<String> request = NoHttp.createStringRequest(Contans.IP+Contans.DJJHSC, RequestMethod.POST);
|
|
|
|
request.setDefineRequestBodyForJson(json);
|
|
|
|
request.setDefineRequestBodyForJson(json);
|
|
|
|
NohttpUtils.getInstance().add(null, 0, request, callback, false, false, "");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 0, request, callback);
|
|
|
|
|
|
|
|
|
|
|
|
//缺陷工单,如果缺陷工单为空,就没有上传
|
|
|
|
//缺陷工单,如果缺陷工单为空,就没有上传
|
|
|
|
List<QxgdInfo> infos = DataSupport.findAll(QxgdInfo.class);
|
|
|
|
List<QxgdInfo> infos = DataSupport.findAll(QxgdInfo.class);
|
|
|
|
@ -175,7 +175,7 @@ public class UploadService extends IntentService {
|
|
|
|
String qxgdjson = "{\"Rows\":" + GsonUtils.GsonString(infos) + ",\"Total\": " + infos.size() + "}";
|
|
|
|
String qxgdjson = "{\"Rows\":" + GsonUtils.GsonString(infos) + ",\"Total\": " + infos.size() + "}";
|
|
|
|
// Logger.json(qxgdjson);
|
|
|
|
// Logger.json(qxgdjson);
|
|
|
|
request1.setDefineRequestBodyForJson(qxgdjson);
|
|
|
|
request1.setDefineRequestBodyForJson(qxgdjson);
|
|
|
|
NohttpUtils.getInstance().add(null, 1, request1, callback, false, false, "");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 1, request1, callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//现场记事
|
|
|
|
//现场记事
|
|
|
|
List<XcjsInfo> xcjss = DataSupport.findAll(XcjsInfo.class);
|
|
|
|
List<XcjsInfo> xcjss = DataSupport.findAll(XcjsInfo.class);
|
|
|
|
@ -185,7 +185,7 @@ public class UploadService extends IntentService {
|
|
|
|
"&jhid=" + xcjss.get(i).getJhid() + "&pointnum=" + xcjss.get(i).getPointnum() +
|
|
|
|
"&jhid=" + xcjss.get(i).getJhid() + "&pointnum=" + xcjss.get(i).getPointnum() +
|
|
|
|
"&djr=" + xcjss.get(i).getDjr(), RequestMethod.POST);
|
|
|
|
"&djr=" + xcjss.get(i).getDjr(), RequestMethod.POST);
|
|
|
|
xcjs.add(Contans.FILEPS, new FileBinary(new File(xcjss.get(i).getFilename())));
|
|
|
|
xcjs.add(Contans.FILEPS, new FileBinary(new File(xcjss.get(i).getFilename())));
|
|
|
|
NohttpUtils.getInstance().add(null, 2, xcjs, callback, false, false, "");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 2, xcjs, callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -210,7 +210,7 @@ public class UploadService extends IntentService {
|
|
|
|
String json = "{\"Rows\":" + GsonUtils.GsonString(infos) + ",\"Total\": " + infos.size() + "}";
|
|
|
|
String json = "{\"Rows\":" + GsonUtils.GsonString(infos) + ",\"Total\": " + infos.size() + "}";
|
|
|
|
Request<String> request = NoHttp.createStringRequest(Contans.IP+Contans.AJHSC, RequestMethod.POST);
|
|
|
|
Request<String> request = NoHttp.createStringRequest(Contans.IP+Contans.AJHSC, RequestMethod.POST);
|
|
|
|
request.setDefineRequestBodyForJson(json);
|
|
|
|
request.setDefineRequestBodyForJson(json);
|
|
|
|
NohttpUtils.getInstance().add(null, 0, request, callback, false, false, "");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 0, request, callback);
|
|
|
|
|
|
|
|
|
|
|
|
for (String jhid : jhids) {
|
|
|
|
for (String jhid : jhids) {
|
|
|
|
List<Ajhxcjs> xcjs = DataSupport.where("jhid = ?", jhid).find(Ajhxcjs.class);
|
|
|
|
List<Ajhxcjs> xcjs = DataSupport.where("jhid = ?", jhid).find(Ajhxcjs.class);
|
|
|
|
@ -222,7 +222,7 @@ public class UploadService extends IntentService {
|
|
|
|
"&areacode=" + UiUtlis.encoder(ajhxcjs.getAreacode()) +
|
|
|
|
"&areacode=" + UiUtlis.encoder(ajhxcjs.getAreacode()) +
|
|
|
|
"&jsr=" + UiUtlis.encoder(App.getInstance().getUserInfo().getManid()), RequestMethod.POST);
|
|
|
|
"&jsr=" + UiUtlis.encoder(App.getInstance().getUserInfo().getManid()), RequestMethod.POST);
|
|
|
|
request1.add(Contans.FILEPS, new FileBinary(new File(ajhxcjs.getFile())));
|
|
|
|
request1.add(Contans.FILEPS, new FileBinary(new File(ajhxcjs.getFile())));
|
|
|
|
NohttpUtils.getInstance().add(null, 1, request1, callback, false, false, "");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 1, request1, callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Request<String> request2 = NoHttp.createStringRequest(Contans.IP+Contans.YHPC, RequestMethod.POST);
|
|
|
|
Request<String> request2 = NoHttp.createStringRequest(Contans.IP+Contans.YHPC, RequestMethod.POST);
|
|
|
|
@ -231,7 +231,7 @@ public class UploadService extends IntentService {
|
|
|
|
requestCount++;
|
|
|
|
requestCount++;
|
|
|
|
String json1 = "{\"Rows\":" + GsonUtils.GsonString(info) + ",\"Total\": " + info.size() + "}";
|
|
|
|
String json1 = "{\"Rows\":" + GsonUtils.GsonString(info) + ",\"Total\": " + info.size() + "}";
|
|
|
|
request.setDefineRequestBodyForJson(json1);
|
|
|
|
request.setDefineRequestBodyForJson(json1);
|
|
|
|
NohttpUtils.getInstance().add(null, 3, request2, callback, false, false, "上传中...");
|
|
|
|
NohttpUtils.getInstance().addNoProgress(this, 3, request2, callback);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|