经销商添加影像资料清单
This commit is contained in:
parent
75df22d142
commit
0db4302044
@ -52,7 +52,7 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function invoiceOrcDo(){
|
||||
let sResult = RunJavaMethodTrans("com.ample.icms.service.ImageOcrService","invoiceOrcDo","contractId=<%=ContractId%>,flowNo=FundPaymentCarFlow");
|
||||
let sResult = RunJavaMethodTrans("com.ample.icms.service.ImageOcrService","invoiceOrcOfInvoice","contractId=<%=ContractId%>,flowNo=FundPaymentCarFlow");
|
||||
if(sResult!=null&&sResult.error_code==0&&sResult.result.发票号码!=''){
|
||||
const resultList = sResult.result;
|
||||
let Invoice_code = resultList.发票号码;
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||||
String PhaseNo=CurPage.getParameter("PhaseNo");
|
||||
String RightType=CurPage.getParameter("RightType");
|
||||
String sPhaseNo=CurPage.getParameter("PhaseNo");//阶段号
|
||||
String FlowNo = CurPage.getParameter("FlowNo");//流程编号
|
||||
// String PhaseNo=CurPage.getParameter("PhaseNo");
|
||||
// System.out.print("==============="+RightType);
|
||||
if(sFlowUnid == null) sFlowUnid="";
|
||||
@ -54,7 +56,8 @@
|
||||
temp="false";
|
||||
};
|
||||
String sButtons[][] = {
|
||||
{temp,"All","Button","保存","保存所有修改","save()","","","",""}
|
||||
{temp,"All","Button","保存","保存所有修改","save()","","","",""},
|
||||
{"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}
|
||||
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
*/ };
|
||||
sButtonPosition = "north";
|
||||
@ -69,7 +72,7 @@ $(function(){
|
||||
if(checkORGRight(businessLicenseNo)){
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","checkBusinessLicenseNo","businessLicenseNo="+businessLicenseNo+",id="+getItemValue(0,0,'ID'));
|
||||
if("false" ==sReturnInfo){
|
||||
setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码已存在!");;
|
||||
setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码已存在!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("BUSINESS_LICENSE_NO","");
|
||||
@ -295,5 +298,47 @@ $(function(){
|
||||
},"请选择地区",'');
|
||||
}
|
||||
}
|
||||
function openFileList(){
|
||||
let appInfo = getAppInfo();
|
||||
let index = appInfo.indexOf("@");
|
||||
if(index==-1){
|
||||
alert(appInfo);
|
||||
return;
|
||||
}
|
||||
let appCode = appInfo.substr(0,index);
|
||||
let appName = appInfo.substr(index+1,appInfo.length);
|
||||
if(appCode=='0000'){
|
||||
alert(appName);
|
||||
return;
|
||||
}
|
||||
openAppointFileList(appCode,appName);
|
||||
}
|
||||
function openAppointFileList(appCode,appName){
|
||||
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
|
||||
let code = getCode();
|
||||
let params = getRequestParam(appCode,appName,code);
|
||||
if(params!=null){
|
||||
AsControl.postICMS(url,params);
|
||||
}
|
||||
}
|
||||
function getAppInfo(){
|
||||
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowNoRJM", "flowNo=<%=FlowNo%>");
|
||||
return appInfo;
|
||||
}
|
||||
function getCode(){
|
||||
let code = 'ECM0002';
|
||||
if(
|
||||
"<%=FlowNo%>"=="DistributorApprovalFlow"&&("<%=sPhaseNo%>"=="0010")||
|
||||
"<%=FlowNo%>"=="DistributorChangeFlow"&&("<%=sPhaseNo%>"=="0010")
|
||||
){
|
||||
code = 'ECM0001';
|
||||
}
|
||||
return code;
|
||||
}
|
||||
function getRequestParam(appCode,appName,code){
|
||||
let busiNo = getItemValue(0,0,'DISTRIBUTOR_NO');
|
||||
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
|
||||
return param;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号
|
||||
String RightType=CurPage.getParameter("RightType");
|
||||
if(sFlowUnid == null) sFlowUnid="";
|
||||
|
||||
String sPhaseNo=CurPage.getParameter("PhaseNo");//쌓뙈뵀
|
||||
String FlowNo = CurPage.getParameter("FlowNo");//직넋긍뵀
|
||||
ASObjectModel temp = new ASObjectModel("LDistributorChangeInfoHis"); //获取法人原始信息
|
||||
ASObjectWindow wtemp = new ASObjectWindow(CurPage, temp,request);
|
||||
ASResultSet rs = Sqlca.getResultSet(new SqlObject(wtemp.getDataObject().getJboSql().replaceAll("v\\.", "").replaceAll("jbo\\.[\\w+\\.]+\\.","").replaceAll(" O ", " "+temp.getJboClass().replaceAll("jbo\\.[\\w+\\.]+\\.","")+" O ")).setParameter("FlowUnid", sFlowUnid));
|
||||
@ -49,7 +50,8 @@
|
||||
dwTemp.replaceColumn("beforechange", "<iframe type='iframe' name=\"frame_list_invoice\" width=\"100%\" height=\"450\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/DistributorManage/DistributorChange/LDistributorChangeInfoHis.jsp?CompClientID="+compClientID+"&FlowUnid="+sFlowUnid+"&DISTRIBUTOR_NO="+DISTRIBUTOR_NO+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","save()","","","",""}
|
||||
{"true","All","Button","괏닸","괏닸杰唐錦맣","save()","","","",""},
|
||||
{"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""}
|
||||
/* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
*/ };
|
||||
sButtonPosition = "north";
|
||||
@ -211,6 +213,47 @@ function saveproj_name(){
|
||||
setItemRequired(0,'LIMIT_END_DATE',true);
|
||||
}
|
||||
}
|
||||
|
||||
function openFileList(){
|
||||
let appInfo = getAppInfo();
|
||||
let index = appInfo.indexOf("@");
|
||||
if(index==-1){
|
||||
alert(appInfo);
|
||||
return;
|
||||
}
|
||||
let appCode = appInfo.substr(0,index);
|
||||
let appName = appInfo.substr(index+1,appInfo.length);
|
||||
if(appCode=='0000'){
|
||||
alert(appName);
|
||||
return;
|
||||
}
|
||||
openAppointFileList(appCode,appName);
|
||||
}
|
||||
function openAppointFileList(appCode,appName){
|
||||
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
|
||||
let code = getCode();
|
||||
let params = getRequestParam(appCode,appName,code);
|
||||
if(params!=null){
|
||||
AsControl.postICMS(url,params);
|
||||
}
|
||||
}
|
||||
function getAppInfo(){
|
||||
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowNoRJM", "flowNo=<%=FlowNo%>");
|
||||
return appInfo;
|
||||
}
|
||||
function getCode(){
|
||||
let code = 'ECM0002';
|
||||
if(
|
||||
"<%=FlowNo%>"=="DistributorApprovalFlow"&&("<%=sPhaseNo%>"=="0010")||
|
||||
"<%=FlowNo%>"=="DistributorChangeFlow"&&("<%=sPhaseNo%>"=="0010")
|
||||
){
|
||||
code = 'ECM0001';
|
||||
}
|
||||
return code;
|
||||
}
|
||||
function getRequestParam(appCode,appName,code){
|
||||
let busiNo = getItemValue(0,0,'DISTRIBUTOR_NO');
|
||||
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
|
||||
return param;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -58,7 +58,7 @@
|
||||
//因为要传到付款阶段的合同套系,所以这里的flowNo固定为FundPaymentCarFlow
|
||||
var sParams="ProjectId=<%=projectId%>,flowUnid=<%=flowunid%>,projectNo=<%=ProjectNo%>,flowNo=FundPaymentCarFlow";
|
||||
var sReturn = RunJavaMethodTrans("com.ample.icms.service.ImageUploadService","upload",sParams);
|
||||
// alert(sReturn);
|
||||
alert(sReturn);
|
||||
}
|
||||
//测试电子签约
|
||||
function sign(){
|
||||
|
||||
@ -107,7 +107,8 @@
|
||||
String sButtons[][] =null;
|
||||
sButtons= new String[][]{
|
||||
{ShowButton,"All","Button","±£´æ","±£´æËùÓÐÐÞ¸Ä","saveRecord()","","","",""},
|
||||
{"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""}
|
||||
{"true","","Button","资料清单","资料清单","openFileList()","","","","btn_icon_saveNew",""},
|
||||
{"true","","Button","尽职信审报告","尽职信审报告","openAppointFileList('APZLCTYWXSCL','传统业务信审资料')","","","","btn_icon_saveNew",""}
|
||||
};
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
@ -213,14 +214,7 @@ init();
|
||||
}
|
||||
|
||||
function openFileList(){
|
||||
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
|
||||
let params = getRequestParam();
|
||||
if(params!=null){
|
||||
post(url,params);
|
||||
}
|
||||
}
|
||||
function getRequestParam(){
|
||||
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
|
||||
let appInfo = getAppInfo();
|
||||
let index = appInfo.indexOf("@");
|
||||
if(index==-1){
|
||||
alert(appInfo);
|
||||
@ -228,10 +222,35 @@ init();
|
||||
}
|
||||
let appCode = appInfo.substr(0,index);
|
||||
let appName = appInfo.substr(index+1,appInfo.length);
|
||||
if(appCode=='0000'){
|
||||
alert(appName);
|
||||
return;
|
||||
}
|
||||
openAppointFileList(appCode,appName);
|
||||
}
|
||||
function openAppointFileList(appCode,appName){
|
||||
let url = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestUrl","");
|
||||
let code = getCode();
|
||||
let params = getRequestParam(appCode,appName,code);
|
||||
if(params!=null){
|
||||
AsControl.postICMS(url,params);
|
||||
}
|
||||
}
|
||||
function getAppInfo(){
|
||||
let appInfo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getAppInfoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
|
||||
return appInfo;
|
||||
}
|
||||
function getCode(){
|
||||
let code = 'ECM0002';
|
||||
if("<%=sPhaseNo%>"=="0010"){
|
||||
if(
|
||||
"<%=FlowNo%>"=="ProjectApprovalFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040"||"<%=sPhaseNo%>"=="0050")||
|
||||
"<%=FlowNo%>"=="ProjectCreditFlow"&&("<%=sPhaseNo%>"=="0010"||"<%=sPhaseNo%>"=="0040")
|
||||
){
|
||||
code = 'ECM0001';
|
||||
}
|
||||
return code;
|
||||
}
|
||||
function getRequestParam(appCode,appName,code){
|
||||
let busiNo = '<%=projectNo%>';
|
||||
if(busiNo==null||busiNo==""||busiNo=="null"){
|
||||
busiNo = RunJavaMethod("com.ample.icms.util.GetInfoUtil", "getProjectNoByFlowUnidRJM", "flowUnid=<%=sFlowUnid%>");
|
||||
@ -239,26 +258,7 @@ init();
|
||||
let param = RunJavaMethod("com.ample.icms.query.ImageQuery","getRequestParam","appCode="+appCode+",appName="+appName+",code="+code+",busiNo="+busiNo);
|
||||
return param;
|
||||
}
|
||||
/**
|
||||
* 考虑防止一些浏览器的弹窗被阻止,不用ajax,而是用form表单提交的方式
|
||||
* @param URL
|
||||
* @param PARAMS
|
||||
*/
|
||||
function post(URL, param) {
|
||||
let temp_form = document.createElement("form");
|
||||
temp_form.action = URL;
|
||||
temp_form.target = "_blank";
|
||||
temp_form.method = "post";
|
||||
temp_form.style.display = "none";
|
||||
|
||||
let opt = document.createElement("textarea");
|
||||
opt.name = 'data';
|
||||
opt.value = param;
|
||||
temp_form.appendChild(opt);
|
||||
|
||||
document.body.appendChild(temp_form);
|
||||
temp_form.submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -61,8 +61,7 @@
|
||||
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",""},
|
||||
{"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""},
|
||||
{"true","","Button","끓틔斤口","끓틔斤口","product()","","","","btn_icon_saveNew",""}
|
||||
{"true","","Button","栗죕헌데","栗죕헌데","openFileList()","","","","btn_icon_saveNew",""}
|
||||
};
|
||||
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
|
||||
@ -16,10 +16,10 @@ public class ImageInfoService {
|
||||
private String projectNo;
|
||||
private String flowNo;
|
||||
|
||||
public String getFileUrl(JBOTransaction tx) throws Exception {
|
||||
public String getFileUrl(String folderNo ,JBOTransaction tx) throws Exception {
|
||||
String result = this.getResponseResult(tx);
|
||||
//APZLJJ000400 APZLJJ000060
|
||||
String FileUrl = this.getFileUrlByResultAnalysis(result,"APZLJJ000060");
|
||||
String FileUrl = this.getFileUrlByResultAnalysis(result,folderNo);
|
||||
return FileUrl;
|
||||
}
|
||||
public String getResponseResult(JBOTransaction tx) throws SQLException, JBOException {
|
||||
|
||||
@ -8,14 +8,18 @@ public class ImageOcrService {
|
||||
private String contractId;
|
||||
private String projectNo;
|
||||
private String flowNo;
|
||||
public String invoiceOrcDo(JBOTransaction tx) throws Exception {
|
||||
public String invoiceOrcOfInvoice(JBOTransaction tx) throws Exception {
|
||||
|
||||
return this.invoiceOrc("APZLJJ000060",ImageOcr.ocrType.vehicle_invoice_ocr,tx);
|
||||
}
|
||||
public String invoiceOrc(String floder,ImageOcr.ocrType ocrType,JBOTransaction tx) throws Exception {
|
||||
ImageInfoService iis = new ImageInfoService();
|
||||
iis.setContractId(contractId);
|
||||
iis.setFlowNo(flowNo);
|
||||
String fileUrl = iis.getFileUrl(tx);
|
||||
String fileUrl = iis.getFileUrl(floder,tx);
|
||||
|
||||
ImageOcr io = new ImageOcr();
|
||||
String result = io.doPost(fileUrl, ImageOcr.ocrType.vehicle_invoice_ocr);
|
||||
String result = io.doPost(fileUrl, ocrType);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class GetInfoUtil {
|
||||
String appInfo = getAppInfoByProjectNo(projectNo,flowNo,Sqlca);
|
||||
return appInfo;
|
||||
}
|
||||
public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException, JBOException {
|
||||
public String getAppInfoByProjectNo(String projectNo, String flowNo, Transaction Sqlca) throws SQLException {
|
||||
String sql = "select app_code,app_name from icms_rela where flow_no='" + flowNo + "' and project_no='" + projectNo + "'";
|
||||
SqlObject sql_icms = new SqlObject(sql);
|
||||
ASResultSet rs = Sqlca.getASResultSet(sql_icms);
|
||||
@ -310,7 +310,31 @@ public class GetInfoUtil {
|
||||
String productId = Sqlca.getString(new SqlObject(sql));
|
||||
return productId;
|
||||
}
|
||||
|
||||
public String getAppInfoByFlowNoRJM() throws SQLException {
|
||||
Transaction Sqlca = Transaction.createTransaction("als");
|
||||
return getAppInfoByFlowNo(flowNo,Sqlca);
|
||||
}
|
||||
public String getAppInfoByFlowNo(String flowNo, Transaction Sqlca) throws SQLException {
|
||||
String sql = "select app_code,app_name from icms_prd_rela where flowno='" + flowNo + "'";
|
||||
SqlObject sql_icms = new SqlObject(sql);
|
||||
ASResultSet rs = Sqlca.getASResultSet(sql_icms);
|
||||
String appCode = null;
|
||||
String appName = null;
|
||||
while (rs.next()) {
|
||||
appCode = rs.getString("app_code");
|
||||
appName = rs.getString("app_name");
|
||||
}
|
||||
if (appCode == null) {
|
||||
return "0000@未找到初始化的影像信息配置,请联系管理员";
|
||||
}
|
||||
String appInfo = appCode + "@" + appName;
|
||||
return appInfo;
|
||||
}
|
||||
public String getDistributorIdByFlowUnid(String flowUnid, Transaction Sqlca) throws SQLException {
|
||||
String sql = "select distributor_no from distributor_info_temp where flowunid='" + flowUnid + "'";
|
||||
String distributorNo = Sqlca.getString(new SqlObject(sql));
|
||||
return distributorNo;
|
||||
}
|
||||
public String getFlowUnid() {
|
||||
return flowUnid;
|
||||
}
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package com.tenwa.lease.flow.project.commcheck;
|
||||
|
||||
import com.amarsoft.app.alarm.AlarmBiz;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.ample.icms.check.ImageCheck;
|
||||
import com.ample.icms.util.GetInfoUtil;
|
||||
|
||||
/**
|
||||
* ×ÊÁÏÇåµ¥¼ì²é
|
||||
* @author 20170524
|
||||
*
|
||||
*/
|
||||
public class IcmsDocListCheckOfDistributor extends AlarmBiz {
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
String flowUnid = this.getAttribute("ObjectNo").toString();
|
||||
GetInfoUtil gif = new GetInfoUtil();
|
||||
String busiNo = gif.getDistributorIdByFlowUnid(flowUnid,Sqlca);
|
||||
String flowNo = gif.getFlowNoByFlowUnid(flowUnid,Sqlca);
|
||||
String app = gif.getAppInfoByFlowNo(flowNo,Sqlca);
|
||||
String [] appInfo = app.split("@");
|
||||
String appCode = appInfo[0];
|
||||
String appName = appInfo[1];
|
||||
if("0000".equals(appCode)){
|
||||
setPass(false);
|
||||
putMsg(appName);
|
||||
return null;
|
||||
}
|
||||
ImageCheck ic= new ImageCheck();
|
||||
ic.setAppCode(appCode);
|
||||
ic.setAppName(appName);
|
||||
ic.setBusiNo(busiNo);
|
||||
String result =ic.resultAnalysis(ic.getResult());
|
||||
String[] resultInfo = result.split("@");
|
||||
if("true".equals(resultInfo[0])){
|
||||
setPass(true);
|
||||
}else{
|
||||
setPass(false);
|
||||
}
|
||||
putMsg(resultInfo[1]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user