影像平台开发
This commit is contained in:
parent
d191cd805a
commit
b41242fd31
@ -44,6 +44,7 @@
|
||||
{btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""},
|
||||
{btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""},
|
||||
{signs,"","Button","公司盖章","公司盖章","sign()","","","","btn_icon_refresh",""},
|
||||
{"true","","Button","上传合同","上传合同","uploadContract()","","","","btn_icon_refresh",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<style>
|
||||
@ -52,7 +53,11 @@
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function uploadContract(){
|
||||
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,FlowUnid=<%=flowunid%>,CurUserID=<%=CurUser.getUserID()%>,SubjectId=<%=SubjectId%>";
|
||||
var operationType = "<%=operationType%>";
|
||||
sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignActionNewUtils","contractSignStatus",sParams+",operationType="+operationType);
|
||||
}
|
||||
//测试电子签约
|
||||
function sign(){
|
||||
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sign","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
|
||||
@ -116,7 +121,7 @@
|
||||
|
||||
}else if(eval(result)==4){
|
||||
alert("word文件正在转换PDF文件格式");
|
||||
|
||||
|
||||
}else if(eval(result)==5){
|
||||
wordToPdf();
|
||||
alert("word文件没有转换PDF文件格式");
|
||||
|
||||
@ -59,7 +59,8 @@
|
||||
dwTemp.replaceColumn("customer_info", "<iframe type='iframe' id='frame_list' name=\"frame_list\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+userll+compClientID+"&sPhaseNo="+sPhaseNo+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
String sButtons[][] = {
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æ","save()","","","","btn_icon_saveNew",""},
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""}
|
||||
{"ReadOnly".equals(rightType)?"false":"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""},
|
||||
{"true","","Button","끓틔斤口","끓틔斤口","product()","","","","btn_icon_saveNew",""}
|
||||
};
|
||||
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
@ -213,7 +214,9 @@
|
||||
document.body.appendChild(temp_form);
|
||||
temp_form.submit();
|
||||
}
|
||||
|
||||
function product(){
|
||||
RunJavaMethod("com.tenwa.util.test","product","");
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,4 +1,5 @@
|
||||
url=http://192.168.7.71:8081/SunICMS/servlet/RouterServlet
|
||||
service_ip=192.168.7.71
|
||||
#链接有效时间,单位为秒
|
||||
useful_life=360
|
||||
#业务系统授权密钥
|
||||
|
||||
@ -22,10 +22,10 @@ public class ImageBaseData {
|
||||
//²Ù×÷Ô±½ÇÉ«
|
||||
@XStreamAlias("ROLE_CODE")
|
||||
private String roleCode;
|
||||
//イルラ<EFBFBD>アスヌノォ
|
||||
//批量扫描标记 0-批量,1-单笔
|
||||
@XStreamAlias("ONE_BATCH")
|
||||
private String oneBatch;
|
||||
//イルラ<EFBFBD>アスヌノォ
|
||||
//操作类型 1新增,0修改
|
||||
@XStreamAlias("NEW_BATCH")
|
||||
private String newBatch;
|
||||
|
||||
|
||||
@ -1,20 +1,50 @@
|
||||
package com.ample.icms.scan;
|
||||
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.ample.icms.service.ImageService;
|
||||
import com.ample.icms.util.PropertiesUtil;
|
||||
import com.sunyard.insurance.ecm.socket.client.AutoScanApi;
|
||||
|
||||
public class ImageUpload {
|
||||
public class ImageUpload extends ImageService {
|
||||
private String zipPath ;
|
||||
|
||||
public void doUpload(){
|
||||
String zipPath = "C:/Users/ivanl/Desktop/影像系统/ECM4.0Demo/ECM4.0Demo/第三方上传/1111.zip";
|
||||
try {
|
||||
// " sunyard#licenseKey" :sunyard为接入系统ID,licenseKey为接入系统授权密钥
|
||||
AutoScanApi autoScanApi = new AutoScanApi("192.168.7.71",8081,"anpeng#IU2VHdejDpUFzhoeT7tUSII3");
|
||||
// // "10I" : 业务类型
|
||||
// // zipPath :要上传批次文件的zip包的路径
|
||||
// // returnMsg : 第三方上传的返回状态
|
||||
String returnMsg = autoScanApi.ScanImageFile("FBO2022031100000001", zipPath);
|
||||
System.out.println(returnMsg);
|
||||
AutoScanApi autoScanApi = new AutoScanApi(PropertiesUtil.get("service_ip"),8088,PropertiesUtil.get("secret_id")+"#"+PropertiesUtil.get("secret_key"));
|
||||
String result = autoScanApi.ScanImageFile(appCode, zipPath);
|
||||
String returnCode = result.substring(0,result.indexOf("@"));
|
||||
String returnMsg = result.substring(result.indexOf("@")+1,result.length()+1);
|
||||
intoLog(returnCode,returnMsg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void intoLog(String code ,String msg) {
|
||||
Transaction transaction = null;
|
||||
Transaction.createTransaction("als");
|
||||
SqlObject so = null;
|
||||
try {
|
||||
so = new SqlObject("insert into icms_upload_log (id,flowunid,path,code,msg,inputtime) values ()");
|
||||
transaction.executeSQL(so);
|
||||
transaction.commit();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void upload(){
|
||||
/**
|
||||
* 1.找出需要上传的影像
|
||||
* 2.复制到指定路径
|
||||
* 3.在指定路径添加对应xml文件
|
||||
* 4.打包上传
|
||||
* 5.删除复制文件和打包文件
|
||||
*/
|
||||
}
|
||||
public void copyFile(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@ public class ImageService {
|
||||
XStream xs = new XStream();
|
||||
xs.processAnnotations(ImageRoot.class);
|
||||
String xml = xs.toXML(createData());
|
||||
//XStream的老毛病,转译会将_转成__,所以在这里转回来
|
||||
xml = xml.replace("__","_");
|
||||
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xml;
|
||||
logger.info("\n"+xml+"\n");
|
||||
@ -86,7 +87,7 @@ public class ImageService {
|
||||
httpClient = new HttpClient();
|
||||
// Ö´ÐÐpostMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("结果状态:"+statusCode);
|
||||
System.out.println("结果状态码:"+statusCode);
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
byte[] bodydata = postMethod.getResponseBody();
|
||||
//È¡µÃ·µ»ØÖµ
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user