81,092
社区成员
发帖
与我相关
我的任务
分享
Map<String, Object> attributes = new HashMap<String, Object>();
attributes.put("success", result);
if(result){
attributes.put("fileName",forderName + "/"+ newName.toString() + extName);
attributes.put("shrinkFileName", forderName + "/" + newName.toString() + "_shrink" + extName);
if(highSpeedVendor.equals(BizConstants.HIGH_SPEED_VENDOR_NANTIAN)
&& scanGenerateSingleIdPic && isIdScan){
attributes.put("idCardFront", forderName + "/" + newName.toString() + "_idCardFront" +extName);
attributes.put("idCardFrontShrink", forderName + "/" + newName.toString() + "_idCardFront_shrink" + extName);
attributes.put("idCardBack", forderName + "/" + newName.toString() + "_idCardBack" + extName);
attributes.put("idCardBackShrink", forderName + "/" + newName.toString() + "_idCardBack_shrink" + extName);
}
}else{
attributes.put("errorMsg", checkMsg);
}
JSONObject jsonobj = new JSONObject();
jsonobj.accumulateAll(attributes);
PrintWriter out = response.getWriter();
System.out.println("-----------------------------"+jsonobj.toString());
out.print(jsonobj.toString());
out.flush();
out.close();
return null;
function plugin()
{
return document.getElementById('view1');
}
function jsReadIDCByHS(basePath){
var idcardpro = plugin().Global_GetIdCardImage(1);
if(idcardpro == 0){
alert("未放卡或卡没放置好!");
return;
}
var idcard = plugin().Global_GetIdCardImage(4);
document.getElementById("analysistype").value = '<%=DictionaryConstants.SCAN_ANALYSIS_TYPE_IDCARD %>';
idcardinfo();
document.getElementById("fileToUpload").value = basePath+"\\temp\\idcard_portrait.bmp";
document.getElementById("fileToUpload").outerHTML=
document.getElementById("fileToUpload").outerHTML.replace(/(value=\").+\"/i,"$1\"");
document.getElementById("custname").value = plugin().Global_GetIdCardData(1);
document.getElementById("sex").value = plugin().Global_GetIdCardData(2);
document.getElementById("identityno").value = plugin().Global_GetIdCardData(8);
document.getElementById("idvaliddate").value = plugin().Global_GetIdCardData(13)+"-"+plugin().Global_GetIdCardData(14)+"-"+plugin().Global_GetIdCardData(15);
document.getElementById("birthday").value = plugin().Global_GetIdCardData(4)+"-"+plugin().Global_GetIdCardData(5)+"-"+plugin().Global_GetIdCardData(6);
document.getElementById("address").value = plugin().Global_GetIdCardData(7);
document.getElementById("custtype").value = "1";
custTypeChange(document.getElementById("custtype"));
var responseinfo = uploadImageByNT(idcardpro,basePath+"\\temp\\idcard_portrait.bmp");
console.log(responseinfo); //在这里尝试了输出
var callbackobj = eval('(' + responseinfo + ')'); //这里报错了
refreshImage(callbackobj.fileName,callbackobj.shrinkFileName);
<%if(!scanForceBelongContract){%>
document.getElementById("relationtype").value='1';
$("#imagetype option[l_relationno!='1']").remove();
<%}%>
document.getElementById("identitytype").value = "0";
if(autoRelative){
doQueryClientInfo();
}
responseinfo = uploadImageByNT(idcard,basePath+"\\temp\\idcard.bmp");
callbackobj = eval('(' + responseinfo + ')');
refreshImage(callbackobj.fileName,callbackobj.shrinkFileName);
}
function uploadImageByNT(img,name){
var uploadServerUrl='<%=basePath%>/scanImage4NT.do?method=doUpload';
if(img){
try
{
var http = plugin().Global_CreateHttp(uploadServerUrl);
if(http){
var ret = plugin().Http_UploadImage(http, img, 2, 0, name);
if(ret){
return plugin().Http_GetServerInfo(http);
}
plugin().Http_Release(http);
}
}
catch(e)
{
window.alert(e); //"加载DLL错误!");
return null;
}
}
}