Merge branch 'open_bohai' into 'master'

对百盛上传图片返回进行控制,防止上传失败

See merge request !434
This commit is contained in:
2022-11-10 11:51:50 +08:00
4 changed files with 11 additions and 22 deletions
@@ -1845,7 +1845,7 @@ public class DataUtil {
//
// System.out.println(FourUpSixInto("258.393", 2));
String href = encodePicUrl("62afd81d303c3f827833bb03", "o", "upload");
String href = encodePicUrl("636b079c303c3f7093fd952a", "o", "upload");
String link = "http://static.fangjia.com/stc/fs/"+href;
System.out.println(link);
}
@@ -1364,7 +1364,12 @@ public class WeiXinEvaluationController {
System.out.println(link);
}
if(uploadfiles.size()>0){
BHBankUtils.inquireUploadFiles2(usersDetail.getName(),model.getQueryId(), model.getFileClass(), uploadfiles);
JSONObject jsonObj = BHBankUtils.inquireUploadFiles2(usersDetail.getName(),model.getQueryId(), model.getFileClass(), uploadfiles);
if(jsonObj!=null && (Integer)jsonObj.get("errCode")!=0) {
mav.setModel(BasicModel.buildServerErrorModel().setMsg((String) jsonObj.get("errMsg")));
}else{
mav.setModel(BasicModel.buildServerErrorModel().setMsg(("文件上传成功!")));
}
}
} catch (Exception e) {
e.printStackTrace();
@@ -349,7 +349,7 @@ public class BHBankUtils {
}
public static Integer inquireUploadFiles2(String name, String queryId, Integer fileClass , List<File> uploadfiles){
public static JSONObject inquireUploadFiles2(String name, String queryId, Integer fileClass , List<File> uploadfiles){
Map params = new HashMap();
params.put("queryId",queryId);
params.put("userName",name);
@@ -420,10 +420,7 @@ public class BHBankUtils {
String content = response.body().string();
JSONObject jsonObj = JSONObject.fromObject(content);
System.out.println("上传接口返回:"+jsonObj.toString());
Integer code = (Integer) jsonObj.get("errCode");
if(code == 0){
return code;
}
return jsonObj;
}catch (Exception e){
e.printStackTrace();
}
@@ -499,23 +499,10 @@
contentType: false,
processData: false,
success: function (data) {
if(data == null){
if(data.msg && data.msg.indexOf("成功")>-1){
alert("上传成功");
window.location.reload();
// $("#file_wrap_list").remove();
// var boxes = $("input[name=reportFiles]")
// if(boxes.length>1){
// var i = 0;
// boxes.forEach(function(element) {
// i++;
// if(i>2){
// element.remove();
// }
// });
// }
// $("a.create-actions08").empty().text("请选择类型")
// $("#fileClass").val("")
// $("a.create-actions08").removeClass("selected")
}else{
alert(data.msg);
}