Merge branch 'dailyfix' into release20211231

This commit is contained in:
yjf 2022-02-28 10:37:58 +08:00
commit 48cb79735a
17 changed files with 1590 additions and 416 deletions

View File

@ -36,13 +36,16 @@
String phaseNo = CurPage.getParameter("PhaseNo");
String settleMethod="";
String rentOrRate="";
BizObject condition=null;
if(paymentNumber==null){
condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String zcContractNum="";
BizObject condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
if(paymentNumber==null ){
paymentNumber=condition.getAttribute("payment_number").getString();
settleMethod=condition.getAttribute("SETTLE_METHOD").getString();
rentOrRate=condition.getAttribute("RENT_OR_RATE").getString();
}
String contractId = condition.getAttribute("CONTRACT_ID").getString();
BizObject contract = JBOFactory.createBizObjectQuery("jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO","ID=:CONTRACT_ID").setParameter("CONTRACT_ID", contractId).getSingleResult(false);
zcContractNum=contract.getAttribute("ZC_CONTRACT_NUMBER").getString();
String sTempletNo = "LCRentDormantInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
@ -93,6 +96,10 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
var zcContractNum=getItemValue(0,0,"zc_contract_num");
if(zcContractNum == undefined || zcContractNum == '' ){
setItemValue(0,0,"zc_contract_num","<%=zcContractNum%>");
}
$("#START_LIST").keyup(function(){
var startList = $("#START_LIST").val();
var endList = $("#END_LIST").val();
@ -134,9 +141,21 @@ $(function(){
function saveRecord(sPostEvents)
{
/* if(!cheackFinalPayment()){
AsDebug.alert("提示","只有尾款的的项目并且大于还租次数才能展期变更!");
AsDebug.alert("提示","只有尾款的的项十二条目并且大于还租次数才能展期变更!");
return;
} */
var zcContractNum=getItemValue(0,0,"zc_contract_num");
var contract_date=getItemValue(0,0,"contract_date");
if(zcContractNum == undefined || zcContractNum == '' ){
alert("中车合同编号不能为空!");
return;
}
if(contract_date == undefined || contract_date == '' ){
alert("合同签署时间不能为空!");
return;
}
var result = AsControl.RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.RentDormantAction","saveRentDormantAction","flowUnid=<%=flowunid%>,contractDate="+contract_date+",zcContractNum="+zcContractNum);
// alert("休眠还款协议编号为:" + result);
//检查是否进行过变更
as_save("myiframe0","run()");

View File

@ -0,0 +1,194 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.*" %>
<%
String userId = CurUser.getUserID();
String orgId =CurUser.getOrgID();
System.out.print(orgId);
String falg = "true";
String flowunid = CurPage.getParameter("FlowUnid");
BizObject condition = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String projectId = condition.getAttribute("PROJECT_ID").getString();
String contractId = condition.getAttribute("CONTRACT_ID").getString();
BizObject lrdBo = JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LB_RENT_DORMANT","FLOWUNID=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
String contractNo = "";
if(lrdBo != null){
contractNo = lrdBo.getAttribute("rent_dormant_num").getString();
}
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel("RentDormantFile");
doTemp.setDefaultValue("FlowUnid", flowunid);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(15);
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
// {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{falg,"All","Button","休眠还款协议生成","休眠还款协议生成","generateQuotation()","","","","btn_icon_generate"},
// {"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
// {falg,"All","Button","公司盖章","公司盖章","stamp()","","","",""},
};
%>
<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%>
<%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%/*~END~*/%>
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
<div style="display:none">
<input id="sqlString" name="sqlString" value="">
</div>
</form>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"ID")+'\')><font color="blue">'+"下载&nbsp&nbsp&nbsp&nbsp&nbsp"+'</font></a>';
getObj(0,i,"FILENAME").innerHTML=html+'<font >'+getObj(0,i,"FILENAME").innerHTML+'</font>';
};
}
function downloadFile(id){
if(typeof(id)==undefined || id=='') {
alert("请先生成休眠还款协议再下载!");
return;
}
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function lotdown(){
var attrids=getItemValueArray(0,"ID");
if(typeof(attrids)=="undefined"||attrids==null||attrids==""){alert("请选择");return;}
for( var i=0;i<attrids.length;i++){
if(typeof(attrids[i])=="undefined"||attrids[i]==null||attrids[i]==""){
alert("请先生成保险理赔委托书再下载!");
return;
}
}
lotdownloadFile(attrids);
}
function lotdownloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
}
/**
* 生成休眠还款协议
*/
function generateQuotation(){
var contract_no="<%=contractNo%>";
if(contract_no == ''){
alert("请先进行休眠调整,生成休眠还款协议编号!");
return;
}
var param={};
var tempParam={};
var sparam="";
//模板号
var tempId = "11b12cbfd98611eb970e00163e0ad611";
var flowUnid = "<%=flowunid%>";
param["templateNo"]= tempId;
//文件类型:保险授权委托书
var objectType = "contractRentDormant";
//生成文件关联关系
tempParam["OBJECTTYPE"]=objectType;
tempParam["contract_no"]=contract_no;
tempParam["contract_id"]=contract_no;
tempParam["project_id"]=contract_no;
tempParam["PROJ_ID"]="<%=projectId%>";//注意变量名,不要改
tempParam["CONTRACT_ID"]="<%=contractId%>";//注意变量名,不要改
tempParam["CUST_ID"]=contract_no;//注意变量名,不要改
tempParam["PLAN_NUMBER"]=contract_no;//注意变量名,不要改
tempParam["FLOW_UNID"]=flowUnid;
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var deleteresult=RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.RentDormantDeleteAction", "deleteRentDormant", "planNumber="+contract_no+",objectType="+objectType);
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate", sparam);
// word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.RentDormantSignAction","wordToPdfRentDormant","contractNo="+contract_no+",contractId="+contract_no+",projectId="+contract_no+",planNumber="+contract_no);
if(typeof(id)=="undefined" || id.length <= 0 || id==""){
RunJavaMethodTrans("com.tenwa.channelportal.action.alpha.RentDormantDeleteAction", "deleteRentDormant", "planNumber="+contract_no+",objectType="+objectType);
}else{
alert("生成成功!!!");
}
reloadSelf();
}
function stamp(){
var tempId = "2df36e40437211eb808300163e0e11e6";
var flie = getItemValue(0,getRow(0),"FILENAME");
if(typeof(flie)=="undefined"||flie==null||flie==""){
alert("请先生成保险委托授权书!");
return;
}
var number = 0;
var contract_nos=getItemValueArray(0,"contract_no");
var project_ids=getItemValueArray(0,"project_id");
var customer_ids=getItemValueArray(0,"customer_id");
var subject_ids=getItemValueArray(0,"subject_id");
var contract_ids=getItemValueArray(0,"contract_id");
var subject_ids=getItemValueArray(0,"subject_id");
var insurance_ids=getItemValueArray(0,"insurance_id");
for(var i=0;i<contract_nos.length;i++){
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractInsuranceSignAction","claimSignInsuranceTwo",
"contractNo="+contract_nos[i]+",contractId="+contract_ids[i]+",projectId="+project_ids[i]+",subjectId="+subject_ids[i]
+",flagType=start,tempId="+tempId+",planNumber="+insurance_ids[i]);
if("success"==result){
number++;
}
}
if(contract_nos.length==0){
alert("请先选择数据!!!");
return;
}else if(number==0){
alert("盖章失败!!!");
}else if(number==contract_nos.length){
alert("盖章成功!!!");
}else{
alert("部分盖章成功!!!");
}
location.reload();
}
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
<script type="text/javascript">
</script>
<%/*~END~*/%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -17,7 +17,7 @@
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
boolean flag = CurUser.hasRole("800R00000070");// 2021/02/26 作废(汽车业务部总监)角色改用(汽车业务部前台副总监)
boolean flag = CurUser.hasRole("800R00000070")||CurUser.hasRole("800R00000077");// 2021/02/26 作废(汽车业务部总监)角色改用(汽车业务部前台副总监)
String sButtons[][] =null;
if(flag){
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格

View File

@ -22,7 +22,7 @@
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(15);
dwTemp.setPageSize(pageSize==null?50:Integer.parseInt(pageSize));
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow(userId);

View File

@ -0,0 +1,149 @@
<%@page import="jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.*" %>
<%
/*
Author: undefined 2016-09-01
Content: 起诉状-加速到期 IndictmentAcceleration.jsp
History Log:
*/
String userId = CurUser.getUserID();
String orgId =CurUser.getOrgID();
System.out.print(orgId);
String falg = "true";
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel("IndictmentAcceleration");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(pageSize==null?50:Integer.parseInt(pageSize));
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow(userId);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","All","Button","生成起诉状","生成起诉状","generateQuotation()","","","","btn_icon_generate"},
{"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
{"false","All","Button","公司盖章","公司盖章","stamp()","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"attrid")+'\')><font color="blue">'+"下载&nbsp&nbsp&nbsp&nbsp&nbsp"+'</font></a>';
getObj(0,i,"FILENAME").innerHTML=html+'<font >'+getObj(0,i,"FILENAME").innerHTML+'</font>';
};
}
function downloadFile(id){
if(typeof(id)==undefined || id=='') {
alert("请先生成起诉状再下载!");
return;
}
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function generateQuotation(){
var projectId=getItemValueArray(0,"PROJECT_ID");
//var contractNos=getItemValueArray(0,"CONTRACT_NUMBER");
// var subjectIds=getItemValueArray(0,"SUBJECTID");
var number = 0;
if(typeof(projectId)=="undefined"||projectId==null||projectId==""){alert("请选择数据");return;}
for(var i=0;i<projectId.length;i++){
var param={};
var tempParam={};
var sparam="";
param["templateNo"]="20220207f984a46128292fbd557f";
//生成文件关联关系
tempParam["OBJECTTYPE"]="IndictmentAcceleration";
tempParam["PROJECTID"]=projectId[i];
tempParam["PROJ_ID"]=projectId[i];
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+projectId[i]+",objecttype=IndictmentAcceleration");
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
number++;
}
if(projectId.length==0){
alert("请先选择数据!!!");
return;
}else if(number==0){
alert("生成失败!!!");
}else if(number==projectId.length){
alert("生成成功!!!");
}else{
alert("部分生成成功!!!");
}
reloadSelf();
}
function lotdown(){
var attrids=getItemValueArray(0,"attrid");
if(typeof(attrids)=="undefined"||attrids==null||attrids==""){alert("请选择");return;}
for( var i=0;i<attrids.length;i++){
if(typeof(attrids[i])=="undefined"||attrids[i]==null||attrids[i]==""){
alert("请先生成起诉状再下载!");
return;
}
}
lotdownloadFile(attrids);
}
function lotdownloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
}
function stamp(){
var flie = getItemValue(0,getRow(0),"FILENAME");
if(typeof(flie)=="undefined"||flie==null||flie==""){
alert("请先生成起诉状!");
return;
}
var number = 0;
var projectIds=getItemValueArray(0,"ID");
for(var i=0;i<projectIds.length;i++){
var projectId=projectIds[i];
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","TcollectionSignA","ProjectId="+projectId+",flagType=IndictmentAcceleration");
if("success"==result){
number++;
}
}
if(projectIds.length==0){
alert("请先选择数据!!!");
return;
}else if(number==0){
alert("盖章失败!!!");
}else if(number==projectIds.length){
alert("盖章成功!!!");
}else{
alert("部分盖章成功!!!");
}
location.reload();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,149 @@
<%@page import="jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.amarsoft.app.util.*" %>
<%
/*
Author: undefined 2016-09-01
Content: 起诉状-解除合同 IndictmentCancelContract.jsp
History Log:
*/
String userId = CurUser.getUserID();
String orgId =CurUser.getOrgID();
System.out.print(orgId);
String falg = "true";
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel("IndictmentCancelContract");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(pageSize==null?50:Integer.parseInt(pageSize));
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow(userId);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
sButtons=new String[][]{
{"true","All","Button","生成起诉状","生成起诉状","generateQuotation()","","","","btn_icon_generate"},
{"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
{"false","All","Button","公司盖章","公司盖章","stamp()","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var html="";
html+='<a onclick=downloadFile(\''+getItemValue(0,i,"attrid")+'\')><font color="blue">'+"下载&nbsp&nbsp&nbsp&nbsp&nbsp"+'</font></a>';
getObj(0,i,"FILENAME").innerHTML=html+'<font >'+getObj(0,i,"FILENAME").innerHTML+'</font>';
};
}
function downloadFile(id){
if(typeof(id)==undefined || id=='') {
alert("请先生成起诉状再下载!");
return;
}
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function generateQuotation(){
var projectId=getItemValueArray(0,"PROJECT_ID");
//var contractNos=getItemValueArray(0,"CONTRACT_NUMBER");
// var subjectIds=getItemValueArray(0,"SUBJECTID");
var number = 0;
if(typeof(projectId)=="undefined"||projectId==null||projectId==""){alert("请选择数据");return;}
for(var i=0;i<projectId.length;i++){
var param={};
var tempParam={};
var sparam="";
param["templateNo"]="20220207f984a46128292fbd558f";
//生成文件关联关系
tempParam["OBJECTTYPE"]="IndictmentCancelContract";
tempParam["PROJECTID"]=projectId[i];
tempParam["PROJ_ID"]=projectId[i];
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","projectId="+projectId[i]+",objecttype=IndictmentCancelContract");
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
number++;
}
if(projectId.length==0){
alert("请先选择数据!!!");
return;
}else if(number==0){
alert("生成失败!!!");
}else if(number==projectId.length){
alert("生成成功!!!");
}else{
alert("部分生成成功!!!");
}
reloadSelf();
}
function lotdown(){
var attrids=getItemValueArray(0,"attrid");
if(typeof(attrids)=="undefined"||attrids==null||attrids==""){alert("请选择");return;}
for( var i=0;i<attrids.length;i++){
if(typeof(attrids[i])=="undefined"||attrids[i]==null||attrids[i]==""){
alert("请先生成起诉状再下载!");
return;
}
}
lotdownloadFile(attrids);
}
function lotdownloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
}
function stamp(){
var flie = getItemValue(0,getRow(0),"FILENAME");
if(typeof(flie)=="undefined"||flie==null||flie==""){
alert("请先生成起诉状!");
return;
}
var number = 0;
var projectIds=getItemValueArray(0,"ID");
for(var i=0;i<projectIds.length;i++){
var projectId=projectIds[i];
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","TcollectionSignA","ProjectId="+projectId+",flagType=IndictmentCancelContract");
if("success"==result){
number++;
}
}
if(projectIds.length==0){
alert("请先选择数据!!!");
return;
}else if(number==0){
alert("盖章失败!!!");
}else if(number==projectIds.length){
alert("盖章成功!!!");
}else{
alert("部分盖章成功!!!");
}
location.reload();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -22,7 +22,7 @@
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.setPageSize(15);
dwTemp.setPageSize(pageSize==null?50:Integer.parseInt(pageSize));
dwTemp.MultiSelect = true;
dwTemp.genHTMLObjectWindow(userId);

View File

@ -4622,6 +4622,23 @@
</managerProperties>
</manager>
</class>
<class name="LB_RENT_DORMANT" label="休眠还款协议信息表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="rent_dormant_num" label="休眠还款协议编号" type="STRING" length="32"/>
<attribute name="zc_contract_num" label="中车合同编号" type="STRING" length="32"/>
<attribute name="contract_date" label="合同签署时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_RENT_DORMANT" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_DORMANT_RENT_ADJUST_TEMP" label="休眠租金临时表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>

View File

@ -1,170 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbo>
<package name="jbo.app.tenwa.doc" >
<class name="LB_DOCCONFIG" label="文件清单配置" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="名称" type="STRING" length="200"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="32"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="DOC_RELATION_ID" label="资料关联ID" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCCONFIG" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCRELATIVE" label="文档关联对象表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="18" />
<attribute name="PROJ_ID" label="项目id" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同id" type="STRING" length="32"/>
<attribute name="PLAN_NUMBER" label="方案编号" type="STRING" length="32"/>
<attribute name="PLAN_LIST" label="期次" type="STRING" length="32"/>
<attribute name="CUST_ID" label="客户id" type="STRING" length="32"/>
<attribute name="FLOW_UNID" label="流程号" type="STRING" length="32"/>
<attribute name="TEMPLATE_ID" label="合同列表ID" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCRELATIVE" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCLIBRARY" label="资料清单" keyAttributes="ID">
<attributes>
<attribute name="ID" label="id主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="资料名称" type="STRING" length="200"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="64"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="BUSINESS_CHECK" label="业务检查" type="STRING" length="32"/>
<attribute name="IS_HANDOVER" label="档案交接" type="STRING" length="32"/>
<attribute name="OPERATE_CHECK" label="运营确认" type="STRING" length="32"/>
<attribute name="REVIEW_CHECK" label="评审复核" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="RELATIVE_ID" label="关联ID" type="STRING" length="32"/>
<attribute name="CONFIG_ID" label="资料清单配置ID" type="STRING" length="32"/>
<attribute name="IS_INIT" label="是否初始化过" type="STRING" length="10"/>
<attribute name="IS_FILE_LIST" label="是否文件清单" type="STRING" length="32"/>
<attribute name="IS_BORROWING" label="借阅状态" type="STRING" length="32"/>
<attribute name="BORROWID" label="借阅单流水号" type="STRING" length="32"/>
<attribute name="LIBCOPIES" label="份数" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCLIBRARY" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCATTRIBUTE" label="文档附件详情" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32" />
<attribute name="LIBRARY_ID" label="附件编号" type="STRING" length="32" />
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500" />
<attribute name="FULLPATH" label="文档全路径" type="STRING" length="600" />
<attribute name="FILENAME" label="文件名" type="STRING" length="250" />
<attribute name="FILESIZE" label="内容长度" type="STRING" length="32" />
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32" />
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32" />
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32" />
<attribute name="REMARK" label="备注" type="STRING" length="200" />
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="32" />
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200" />
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="createKey" value="true" />
<property name="table" value="LB_DOCATTRIBUTE" />
</managerProperties>
</manager>
</class>
<class name="LB_DOC_CONTRACT_LIST" label="生成合同列表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="contract_id" label="合同标识" type="STRING" length="32"/>
<attribute name="contract_no" label="业务合同号+后缀" type="STRING" length="250"/>
<attribute name="filename" label="文件名" type="STRING" length="250"/>
<attribute name="attribute_id" label="附件明细表标识" type="STRING" length="32"/>
<attribute name="file_type" label="文件类型" type="STRING" length="32"/>
<attribute name="file_flag" label="是否有效" type="STRING" length="32"/>
<attribute name="sign_type" label="签约状态" type="STRING" length="32"/>
<attribute name="project_id" label="项目标识" type="STRING" length="32"/>
<attribute name="prodect_id" label="产品标识" type="STRING" length="32"/>
<attribute name="library_id" label="资料清单标识" type="STRING" length="32"/>
<attribute name="doc_name" label="资料名称" type="STRING" length="64"/>
<attribute name="document_id" label="契约锁合同文件id" type="STRING" length="32"/>
<attribute name="customername" label="客户名称" type="STRING" length="64"/>
<attribute name="telephone" label="电话号码" type="STRING" length="32"/>
<attribute name="ids" label="客户id/担保人id" type="STRING" length="32"/>
<attribute name="filepath" label="文档路径" type="STRING" length="500"/>
<attribute name="fullpath" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="inputuserid" label="创建人" type="STRING" length="100"/>
<attribute name="inputorgid" label="创建人所属部门" type="STRING" length="100"/>
<attribute name="inputtime" label="创建时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="修改人" type="STRING" length="100"/>
<attribute name="updateorgid" label="修改人所属部门" type="STRING" length="100"/>
<attribute name="updatetime" label="修改时间" type="STRING" length="100"/>
<attribute name="config_id" label="文件清单配置标识" type="STRING" length="100"/>
<attribute name="doc_class_itemno" label="资料分类编号" type="STRING" length="100"/>
<attribute name="singcontract_id" label="契约锁合同id" type="STRING" length="64"/>
<attribute name="content_type" label="文件格式" type="STRING" length="100"/>
<attribute name="flow_unid" label="流程id" type="STRING" length="32"/>
<attribute name="process" label="合同制作过程" type="STRING" length="32"/>
<attribute name="sendprocess" label="契约锁发送过程" type="STRING" length="32"/>
<attribute name="message" label="记录作废1、退回0、记录最后一次错误信息" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_doc_contract_list" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<?xml version="1.0" encoding="UTF-8"?>
<jbo>
<package name="jbo.app.tenwa.doc" >
<class name="LB_DOCCONFIG" label="文件清单配置" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="名称" type="STRING" length="200"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="32"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="DOC_RELATION_ID" label="资料关联ID" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCCONFIG" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCRELATIVE" label="文档关联对象表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="18" />
<attribute name="PROJ_ID" label="项目id" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同id" type="STRING" length="32"/>
<attribute name="PLAN_NUMBER" label="方案编号" type="STRING" length="32"/>
<attribute name="PLAN_LIST" label="期次" type="STRING" length="32"/>
<attribute name="CUST_ID" label="客户id" type="STRING" length="32"/>
<attribute name="FLOW_UNID" label="流程号" type="STRING" length="32"/>
<attribute name="TEMPLATE_ID" label="合同列表ID" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCRELATIVE" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCLIBRARY" label="资料清单" keyAttributes="ID">
<attributes>
<attribute name="ID" label="id主键" type="STRING" length="32"/>
<attribute name="SERIAL_NUM" label="序号" type="STRING" length="32"/>
<attribute name="DOC_NAME" label="资料名称" type="STRING" length="200"/>
<attribute name="DOC_NATURE" label="资料性质" type="STRING" length="64"/>
<attribute name="REMARK" label="备注" type="STRING" length="200"/>
<attribute name="BUSINESS_CHECK" label="业务检查" type="STRING" length="32"/>
<attribute name="IS_HANDOVER" label="档案交接" type="STRING" length="32"/>
<attribute name="OPERATE_CHECK" label="运营确认" type="STRING" length="32"/>
<attribute name="REVIEW_CHECK" label="评审复核" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="创建人所属部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DOC_TYPE" label="资料类型" type="STRING" length="32"/>
<attribute name="ONE_CLASSIFY" label="一级分类" type="STRING" length="100"/>
<attribute name="TWO_CLASSIFY" label="二级分类" type="STRING" length="100"/>
<attribute name="THREE_CLASSIFY" label="三级分类" type="STRING" length="100"/>
<attribute name="FOUR_CLASSIFY" label="四级分类" type="STRING" length="100"/>
<attribute name="DOC_CLASS_ITEMNO" label="资料分类编号" type="STRING" length="32"/>
<attribute name="RELATIVE_ID" label="关联ID" type="STRING" length="32"/>
<attribute name="CONFIG_ID" label="资料清单配置ID" type="STRING" length="32"/>
<attribute name="IS_INIT" label="是否初始化过" type="STRING" length="10"/>
<attribute name="IS_FILE_LIST" label="是否文件清单" type="STRING" length="32"/>
<attribute name="IS_BORROWING" label="借阅状态" type="STRING" length="32"/>
<attribute name="BORROWID" label="借阅单流水号" type="STRING" length="32"/>
<attribute name="LIBCOPIES" label="份数" type="STRING" length="10"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_DOCLIBRARY" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_DOCATTRIBUTE" label="文档附件详情" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32" />
<attribute name="LIBRARY_ID" label="附件编号" type="STRING" length="32" />
<attribute name="FILEPATH" label="文档路径" type="STRING" length="500" />
<attribute name="FULLPATH" label="文档全路径" type="STRING" length="600" />
<attribute name="FILENAME" label="文件名" type="STRING" length="250" />
<attribute name="FILESIZE" label="内容长度" type="STRING" length="32" />
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32" />
<attribute name="INPUTORGID" label="登记单位" type="STRING" length="32" />
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32" />
<attribute name="REMARK" label="备注" type="STRING" length="200" />
<attribute name="OBJECTTYPE" label="对象类别" type="STRING" length="32" />
<attribute name="CONTENT_TYPE" label="文件格式" type="STRING" length="200" />
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="修改人所属部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="DELETEED" label="是否已删除" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
</attributes>
<manager>
<managerProperties>
<property name="createKey" value="true" />
<property name="table" value="LB_DOCATTRIBUTE" />
</managerProperties>
</manager>
</class>
<class name="LB_DOC_CONTRACT_LIST" label="生成合同列表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="contract_id" label="合同标识" type="STRING" length="32"/>
<attribute name="contract_no" label="业务合同号+后缀" type="STRING" length="250"/>
<attribute name="filename" label="文件名" type="STRING" length="250"/>
<attribute name="attribute_id" label="附件明细表标识" type="STRING" length="32"/>
<attribute name="file_type" label="文件类型" type="STRING" length="32"/>
<attribute name="file_flag" label="是否有效" type="STRING" length="32"/>
<attribute name="sign_type" label="签约状态" type="STRING" length="32"/>
<attribute name="project_id" label="项目标识" type="STRING" length="32"/>
<attribute name="prodect_id" label="产品标识" type="STRING" length="32"/>
<attribute name="library_id" label="资料清单标识" type="STRING" length="32"/>
<attribute name="doc_name" label="资料名称" type="STRING" length="64"/>
<attribute name="document_id" label="契约锁合同文件id" type="STRING" length="32"/>
<attribute name="customername" label="客户名称" type="STRING" length="64"/>
<attribute name="telephone" label="电话号码" type="STRING" length="32"/>
<attribute name="ids" label="客户id/担保人id" type="STRING" length="32"/>
<attribute name="filepath" label="文档路径" type="STRING" length="500"/>
<attribute name="fullpath" label="文档全路径文件名" type="STRING" length="600"/>
<attribute name="inputuserid" label="创建人" type="STRING" length="100"/>
<attribute name="inputorgid" label="创建人所属部门" type="STRING" length="100"/>
<attribute name="inputtime" label="创建时间" type="STRING" length="100"/>
<attribute name="updateuserid" label="修改人" type="STRING" length="100"/>
<attribute name="updateorgid" label="修改人所属部门" type="STRING" length="100"/>
<attribute name="updatetime" label="修改时间" type="STRING" length="100"/>
<attribute name="config_id" label="文件清单配置标识" type="STRING" length="100"/>
<attribute name="doc_class_itemno" label="资料分类编号" type="STRING" length="100"/>
<attribute name="singcontract_id" label="契约锁合同id" type="STRING" length="64"/>
<attribute name="content_type" label="文件格式" type="STRING" length="100"/>
<attribute name="flow_unid" label="流程id" type="STRING" length="32"/>
<attribute name="process" label="合同制作过程" type="STRING" length="32"/>
<attribute name="sendprocess" label="契约锁发送过程" type="STRING" length="32"/>
<attribute name="message" label="记录作废1、退回0、记录最后一次错误信息" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_doc_contract_list" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_ONEDIMENSIONALCODE" label="一维码表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
@ -186,7 +186,7 @@
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="40"/>
<attribute name="STANDBY" label="备用" type="STRING" length="40"/>
<attribute name="STANDBY" label="备用" type="STRING" length="40"/>
<attribute name="DESCRIBE" label="描述" type="STRING" length="40"/>
</attributes>
<manager>
@ -195,23 +195,23 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_COPYFILE_LOG" label="文件拷贝日志表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="BATCH_NO" label="批次号" type="STRING" length="32"/>
<attribute name="COPY_TYPE" label="拷贝类型" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_copyfile_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_COPYFILE_LOG" label="文件拷贝日志表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_NO" label="合同编号" type="STRING" length="32"/>
<attribute name="BATCH_NO" label="批次号" type="STRING" length="32"/>
<attribute name="COPY_TYPE" label="拷贝类型" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="上传人" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="上传时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lc_copyfile_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_FILE_MAILARCHIVING_INFO" label="" keyAttributes="ID">
<attributes>
@ -223,8 +223,8 @@
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
@ -233,11 +233,11 @@
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
@ -258,8 +258,8 @@
<attribute name="ARCHIVING_CABINET_NO" label="档案柜号" type="STRING" length="32"/>
<attribute name="ALLSTATUS" label="总邮寄状态" type="STRING" length="32"/>
<attribute name="ALLHANDOVERSTATUS" label="总接收状态" type="STRING" length="32"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="EXPCOMPANY" label="快递公司" type="STRING" length="32"/>
<attribute name="EXPNUMBER" label="快递单号" type="STRING" length="100"/>
<attribute name="DEMO" label="备注" type="STRING" length="1000"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
@ -268,12 +268,12 @@
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
<attribute name="FILE_NUMBER" label="档案编号" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="IS_FLOWING" label="是否在流程中" type="STRING" length="32"/>
<attribute name="REMARKS" label="备注" type="STRING" length="32"/>
<attribute name="IS_FLOWING" label="是否在流程中" type="STRING" length="32"/>
<attribute name="opinion_comments" label="意见解释" type="STRING" length="255"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPSTRATDATE" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="EXPENDDATE" label="档案收到时间" type="STRING" length="32"/>
<attribute name="is_delay" label="档案邮寄时间" type="STRING" length="32"/>
<attribute name="delay_date" label="档案收到时间" type="STRING" length="32"/>
</attributes>
<manager>
@ -381,5 +381,19 @@
</managerProperties>
</manager>
</class>
</package>
</jbo>
<class name="REMINDER_LETTER" label="" keyAttributes="ID">
<attributes>
<attribute name="ID" label="主键" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同ID" type="STRING" length="64"/>
<attribute name="TYPE" label="类型" type="STRING" length="4"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="reminder_letter" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -0,0 +1,141 @@
package com.tenwa.channelportal.action.alpha;
import com.amarsoft.app.util.StringUtil;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.reckon.util.UUIDUtil;
import com.tenwa.util.SerialNumberUtil;
import jbo.app.tenwa.calc.LB_RENT_DORMANT;
import jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP;
import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* 休眠还款申请-信息保存
*/
public class RentDormantAction {
String flowUnid;;//流程编号
String contractDate;;//合同签署日期
String zcContractNum;;//合同签署日期
public String getZcContractNum() {
return zcContractNum;
}
public void setZcContractNum(String zcContractNum) {
this.zcContractNum = zcContractNum;
}
public String getContractDate() {
return contractDate;
}
public void setContractDate(String contractDate) {
this.contractDate = contractDate;
}
public String getFlowUnid() {
return flowUnid;
}
public void setFlowUnid(String flowUnid) {
this.flowUnid = flowUnid;
}
/**
* 休眠还款信息保存
* @param tx
* @throws Exception
*/
public String saveRentDormantAction(JBOTransaction tx) throws Exception{
String res = "";
try {
System.out.println("saveRentDormantAction-----------------------flowUnid="+flowUnid);
BizObjectManager lcctBm = JBOFactory.getBizObjectManager(jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP.CLASS_NAME);
BizObject lcctBo = lcctBm.createQuery("FLOWUNID=:FLOWUNID ")
.setParameter("FLOWUNID", flowUnid).getSingleResult(false);
String contractId = lcctBo.getAttribute("CONTRACT_ID").getString();
BizObjectManager lciBm = JBOFactory.getBizObjectManager(jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO.CLASS_NAME);
BizObject lciBo = lciBm.createQuery("ID=:CONTRACT_ID ")
.setParameter("CONTRACT_ID", contractId).getSingleResult(false);
String contractNo = lciBo.getAttribute("CONTRACT_NO").getString();
String projectId = lciBo.getAttribute("PROJECT_ID").getString();
System.out.println("saveRentDormantAction-----------------------contractNo="+contractNo);
System.out.println("saveRentDormantAction-----------------------contractNo2="+contractNo);
String rentDormantNum = null;
String contractDate2 = null;
String zcContractNum2 = null;
String rentDormantId = null;
// TODO: 2022/2/15 休眠还款信息保存
BizObjectManager bomLRD = JBOFactory.getFactory().getManager(LB_RENT_DORMANT.CLASS_NAME,tx);
BizObject bolLRD = bomLRD.createQuery("FLOWUNID=:FLOWUNID ")
.setParameter("FLOWUNID", flowUnid).getSingleResult(true);
if(bolLRD != null){
rentDormantNum = bolLRD.getAttribute("rent_dormant_num").getString();
contractDate2 = bolLRD.getAttribute("contract_date").getString();
zcContractNum2 = bolLRD.getAttribute("zc_contract_num").getString();
rentDormantId = bolLRD.getAttribute("ID").getString();
if(rentDormantNum != null){
if(contractDate2 == null || StringUtils.isEmpty(contractDate2) || !contractDate2.equals(contractDate)
|| zcContractNum2 == null || StringUtils.isEmpty(zcContractNum2) || !zcContractNum2.equals(zcContractNum)){
bolLRD.setAttributeValue("contract_date", contractDate);
bolLRD.setAttributeValue("zc_contract_num", zcContractNum);
bomLRD.saveObject(bolLRD);//修改数据
}
return rentDormantNum;
}
}
rentDormantNum = createContractNo(lciBo, tx);
bolLRD = bomLRD.newObject();
bolLRD.setAttributeValue("ID", UUIDUtil.getUUID());
bolLRD.setAttributeValue("PROJECT_ID", projectId);
bolLRD.setAttributeValue("CONTRACT_ID", contractId);
bolLRD.setAttributeValue("FLOWUNID", flowUnid);
bolLRD.setAttributeValue("rent_dormant_num", rentDormantNum);
bolLRD.setAttributeValue("contract_date", contractDate);
bolLRD.setAttributeValue("zc_contract_num", zcContractNum);
bomLRD.saveObject(bolLRD);
res = rentDormantNum;
}catch (Exception e){
e.printStackTrace();
}
return res;
}
/**
* 休眠还款协议生成
* @return
*/
private String createContractNo(BizObject lciBo, JBOTransaction tx) throws Exception{
String area_code=lciBo.getAttribute("AREA_CODE").getString();
String subjectid=lciBo.getAttribute("subjectid").getString();
String dept="BQAP(";
if(area_code.equals(null)||area_code.equals("")){
area_code="0";
}
dept+="A";
if(lciBo.getAttribute("LEAS_FORM").toString().equals("01")){//直租
dept+="Z";
}else{//回租
dept+="H";
}
if("d989246c11c111eaaa0000163e0e11e6".equals(subjectid)){
dept+=")TJ";
}else{
dept+=")SZ";
}
return SerialNumberUtil.getContractSerialNaumber(dept,area_code, tx);
}
}

View File

@ -0,0 +1,97 @@
package com.tenwa.channelportal.action.alpha;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import java.util.HashMap;
import java.util.Map;
/**
* 删除征信合同记录
*/
public class RentDormantDeleteAction {
String objectType;//文件类型
String planNumber;//项目编号
String flowUnid;;//流程编号
public String getFlowUnid() {
return flowUnid;
}
public void setFlowUnid(String flowUnid) {
this.flowUnid = flowUnid;
}
public String getObjectType() {
return objectType;
}
public void setObjectType(String objectType) {
this.objectType = objectType;
}
public String getPlanNumber() {
return planNumber;
}
public void setPlanNumber(String planNumber) {
this.planNumber = planNumber;
}
/**
* 删除征信授权文件
* @param tx
* @throws Exception
*/
public void deleteRentDormant(JBOTransaction tx) throws Exception{
BizObjectManager bom = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
BizObject lbDocBiz = bom.createQuery("OBJECTTYPE='contractRentDormant' and plan_number=:planNumber ")
.setParameter("objectType",objectType).setParameter("planNumber",planNumber).getSingleResult(false);
if(null != lbDocBiz){
String lbDocBizId = lbDocBiz.getAttribute("id").toString();
BizObjectManager bom1 = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME);
String lbDocLibraryId = bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", lbDocBizId).getSingleResult(false).getAttribute("id").toString();
BizObjectManager bom2 = JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME);
String docAttributeId = bom2.createQuery("library_id=:library_id").setParameter("library_id", lbDocLibraryId).getSingleResult(false).getAttribute("id").toString();
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, tx);
// 查询lb_doc_contract_list表
// BizObject bo = contBom.createQuery("attribute_id=:attributeId and file_flag='yes' and sendprocess='1' ")
BizObject bo = contBom.createQuery("attribute_id=:attributeId")
.setParameter("attributeId", docAttributeId).getSingleResult(false);
// if(null == bo){
if(null != bo){
Map<String,String> condtion= new HashMap<String,String>();
condtion.put("id", lbDocBizId);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("id", lbDocLibraryId);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME, condtion, tx);
condtion.clear();
condtion.put("id", docAttributeId);
DataOperatorUtil.deleteJBOByCondtion(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME, condtion, tx);
}
}
}
/**
* 判断担保人是否为法人
* @param tx
* @throws Exception
*/
public String checkCreditAuth(JBOTransaction tx) throws Exception{
BizObjectManager pbm = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, tx);
BizObject pbo = pbm.createQuery("FLOWUNID=:flowUnid")
.setParameter("flowUnid", flowUnid).getSingleResult(true);
if(null == pbo){
return "";
}
return pbo.getAttribute("CERTTYPE").toString();
}
}

View File

@ -0,0 +1,191 @@
package com.tenwa.channelportal.action.alpha;
import com.alibaba.fastjson.JSONObject;
import com.amarsoft.are.jbo.*;
import com.tenwa.app.dao.ContractSignInfo;
import com.tenwa.app.manage.qiyuesuo.v2.ContractSignEnums;
import com.tenwa.app.manage.qiyuesuo.v2.ContractSignVtwoUtils;
import com.tenwa.app.manage.qiyuesuo.v2.QYSParams;
import com.tenwa.channelportal.action.generativecontract.WordToPDFUtil;
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
import jbo.app.tenwa.doc.LB_DOCLIBRARY;
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
import org.apache.log4j.Logger;
import java.io.File;
public class RentDormantSignAction {
private static Logger logger=Logger.getLogger(RentDormantSignAction.class);
private String projectId;
private String planNumber;;
private String contractNo;
private String contractId;
private String subjectId;
private String tempId;
public String getPlanNumber() {
return planNumber;
}
public void setPlanNumber(String planNumber) {
this.planNumber = planNumber;
}
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getContractId() {
return contractId;
}
public void setContractId(String contractId) {
this.contractId = contractId;
}
public String getSubjectId() {
return subjectId;
}
public void setSubjectId(String subjectId) {
this.subjectId = subjectId;
}
public String getTempId() {
return tempId;
}
public void setTempId(String tempId) {
this.tempId = tempId;
}
/**
* 保险委托授权书附件用LibreOffice实现word转换pdf
* word转换pdf
* @throws JBOException
*/
@SuppressWarnings({ "unchecked", "static-access" })
public String wordToPdfRentDormant(JBOTransaction tx) throws JBOException {
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE=bom.createQuery(" OBJECTTYPE='contractRentDormant' and plan_number=:planNumber ").setParameter("planNumber", planNumber).getSingleResult(false);
BizObjectManager attrBom=JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME);
BizObject attrBo=null;
WordToPDFUtil wordTopdf = new WordToPDFUtil();
File file = null;
Boolean result = null;
String sql = "";
try {
if (DOCRELATIVE != null) {
String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString();
BizObjectManager bom1=JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
String DOCLIBRARYid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString();
attrBo = attrBom.createQuery("library_id=:library_id").setParameter("library_id", DOCLIBRARYid).getSingleResult(true);
String path = attrBo.getAttribute("FULLPATH").toString();
String lastFilePath = path.replace(".docx", ".pdf");
File filePath = new File(path);
if(!filePath.exists()){
logger.info("word转换pdf的源文件不存在");
}
String lastFilePathpdf = filePath.getParent();
try {
result = wordTopdf.Word2Pdf(path, lastFilePathpdf);
} catch (Exception e) {
result = false;
e.printStackTrace();
}
if (result) {
file =new File(lastFilePath);
attrBo.setAttributeValue("FULLPATH",attrBo.getAttribute("FULLPATH").toString().replace(".docx", ".pdf"));
attrBo.setAttributeValue("FILENAME",attrBo.getAttribute("FILENAME").toString().replace(".docx", ".pdf"));
attrBo.setAttributeValue("FILEPATH",attrBo.getAttribute("FILEPATH").toString().replace(".docx", ".pdf"));
attrBo.setAttributeValue("FileSize",file.length());
attrBo.setAttributeValue("CONTENT_TYPE","application/pdf");
attrBom.saveObject(attrBo);
}
}
} catch (JBOException e) {
e.printStackTrace();
}
return attrBo.getAttribute("ID").toString();
}
/**
* 休眠还款协议盖章:对接契约锁2.0
* @param tx
* @return
* @throws Exception
*/
public String claimSignRentDormantTwo(JBOTransaction tx) throws Exception {
logger.info("claimSignRentDormantTwo 休眠还款协议盖章:对接契约锁2.0 开始 0126");
String libraryid="";
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_DOCRELATIVE.CLASS_NAME);
BizObject DOCRELATIVE=bom.createQuery("OBJECTTYPE='contractRentDormant' and CONTRACT_ID=:contractid ").setParameter("contractid", contractId).getSingleResult(false);
logger.info("claimSignRentDormantTwo 查询文件关联信息");
if (DOCRELATIVE != null) {
logger.info("claimSignRentDormantTwo 查询文件关联信息不为空时");
String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString();
BizObjectManager bom1=JBOFactory.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
libraryid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString();
logger.info("claimSignRentDormantTwo 查询文件关联信息libraryid="+libraryid);
}
BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx);
ContractSignInfo con = null;
BizObject bo = null;
String info="";
try{
bo = contBom.createQuery("library_id=:libraryid").setParameter("libraryid", libraryid).getSingleResult(true);
logger.info("claimSignRentDormantTwo 查询文件信息");
if(bo != null){
logger.info("claimSignRentDormantTwo 查询文件信息不为空时");
String fileName = bo.getAttribute("FILENAME").toString();
String filePath = bo.getAttribute("FULLPATH").toString();
logger.info("claimSignRentDormantTwo fileName="+fileName);
logger.info("claimSignRentDormantTwo filePath="+filePath);
ContractSignVtwoUtils contractSignVtwoUtils = new ContractSignVtwoUtils();
logger.info("claimSignRentDormantTwo 发起公司盖章");
QYSParams qysParams = new QYSParams();
qysParams.setList(null);//手签无需传承租人共同申请人担保人信息
qysParams.setContractSignTypeEnum(ContractSignEnums.ContractSignTypeEnum.SIGNATURE_DEFAULT);//客户手签
qysParams.setFileName(fileName);
qysParams.setFilePath(filePath);
qysParams.setSubjectId(subjectId);
qysParams.setTempId(tempId);//合同模板id
JSONObject resJson = contractSignVtwoUtils.sign(qysParams);
if (null == resJson) {
logger.warn("claimSignRentDormantTwo 20210415 调用契约锁盖章异常,返回盖章失败");
return "error";
}
logger.info("claimSignRentDormantTwo 20210415 调用契约锁盖章成功res=" + resJson.toJSONString());
return "success";
} else {
return "error";
}
} catch (Exception e) {
logger.error("claimSignInsuranceTwo 系统错误,错误信息: ", e);
e.printStackTrace();
return "error";
}
}
}

View File

@ -75,7 +75,7 @@ public class CmbToPayController extends BaseFlowStartAction {
JSONObject jsonObj = JSONObject.fromObject(map);
return jsonObj.toString();
}*/
List<String> contract_id_list = java.util.Arrays.asList(contract_ids.split("@"));
List<String> contract_id_list = Arrays.asList(contract_ids.split("@"));
if(contract_id_list==null || contract_id_list.size()<=0) {
map.put("code", "1") ;
map.put("msg", "尚未选择合同,请检查") ;
@ -352,8 +352,19 @@ public class CmbToPayController extends BaseFlowStartAction {
String BNKFLG = checkCMB(BANK_NAME);
//NUSAGE = "客户["+CRTACC+"]发起申请";
String BUSNAR = "[实际付款][客户:"+CRTACC+"][支付金额:"+TRSAMT+"]";
/*
*银企直连此字符串的规则
* 0.此字段在银企直连中最大为62
* 1.字符串长度为N那么最多可输入汉字数为N-2/2
* 2.如果中文中夹杂英文字符或数字那么要做分段处理每段汉字长度都要+2中国TCL集团 (2*2+2)+(3)+(2*2+2)=15
* */
//cusLength:customerName最大长度以银企直连算法
int cusLength = 62-(2+contractNoZC.length()+contractNo.length());
customerName = getCMBlength(customerName,cusLength);
NUSAGE = customerName+"-"+contractNoZC+"-"+contractNo;
pay_detail = new SDKDcPayReqxVO();
pay_detail.setYURREF(YURREF);
pay_detail.setDBTACC(DBTACC);
@ -564,4 +575,40 @@ public class CmbToPayController extends BaseFlowStartAction {
return "N";
}
}
private String getCMBlength(String str,int length){
int count = 0;
boolean ChineseFlag = false;
char[] c = str.toCharArray();
for(int i = 0; i < c.length; i ++){
//二进制超过8位则为汉字
String len = Integer.toBinaryString(c[i]);
if(ChineseFlag){
if(len.length() > 8){
count=count+2;
ChineseFlag = true;
}else{
count ++;
ChineseFlag = false;
}
}else{
if(len.length() > 8){
count=count+2+2;
ChineseFlag = true;
}else{
count ++;
ChineseFlag = false;
}
}
if(count==length){
str = str.substring(0,i+1);
break;
}else if(count>length){
str = str.substring(0,i);
break;
}
}
return str;
}
}

View File

@ -82,6 +82,10 @@ public class RentNotinyDeleteAction {
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='ReminderLetter'").setParameter("projectId",projectId).getSingleResult(false);
}else if("AttorneyLetter".equals(objecttype)){//´ßÊÕ·þÎñίÍÐÊé
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='AttorneyLetter'").setParameter("projectId",projectId).getSingleResult(false);
}else if("IndictmentAcceleration".equals(objecttype)){//起诉状-加速到期
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='IndictmentAcceleration'").setParameter("projectId",projectId).getSingleResult(false);
}else if("IndictmentCancelContract".equals(objecttype)){//起诉状-解除合同
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='IndictmentCancelContract'").setParameter("projectId",projectId).getSingleResult(false);
}else if("contractInsurance".equals(objecttype)){
DOCRELATIVE=bom.createQuery(" PROJ_ID=:projectId and OBJECTTYPE='contractInsurance' and PLAN_NUMBER=:plan_number").setParameter("projectId",projectId).setParameter("plan_number",plan_number).getSingleResult(false);
}

View File

@ -0,0 +1,44 @@
package jbo.app.tenwa.calc;
/**
* 休眠还款协议信息表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_RENT_DORMANT {
/**
* 休眠租金临时表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.calc.LB_RENT_DORMANT";
/**
* 标识 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 流程编号 STRING(32)<br>
*/
public static final String FLOWUNID = "FLOWUNID";
/**
* 项目编号 STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* 合同编号 STRING(32)<br>
*/
public static final String CONTRACT_ID = "CONTRACT_ID";
/**
* 中车合同编号 STRING(32)<br>
*/
public static final String zc_contract_num = "zc_contract_num";
/**
* 休眠还款协议编号 STRING(32)<br>
*/
public static final String rent_dormant_num = "rent_dormant_num";
/**
* 合同签署时间 STRING(32)<br>
*/
public static final String contract_date = "contract_date";
}

View File

@ -0,0 +1,27 @@
package jbo.app.tenwa.doc;
/**
* 文档附件详情 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface REMINDER_LETTER {
/**
* 文档附件详情<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.doc.REMINDER_LETTER";
/**
* 主键 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 附件编号 STRING(32)<br>
*/
public static final String LIBRARY_ID = "CONTRACT_ID";
/**
* 文档路径 STRING(500)<br>
*/
public static final String FILEPATH = "TYPE";
}

View File

@ -5,7 +5,9 @@ import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.dict.als.cache.CacheLoaderFactory;
import com.tenwa.lease.app.quartzmession.audit.AuditOrderEnums;
import com.tenwa.reckon.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.quartz.Job;
@ -24,11 +26,16 @@ public class CreditAuditHolidayBatch implements Job{
private static final Logger logger = LogManager.getLogger(CreditAuditHolidayBatch.class);// 引入logger日志
public void execute(JobExecutionContext arg0) throws JobExecutionException {
logger.info("【信审考核统计】【CreditAuditHolidayBatch】【开始】<<<<<<<<<<<<<: 2020062022");
insertStOrder();
deleteCreditAudit();
initDetail();
updateDetail();
logger.info("【信审考核统计】【CreditAuditHolidayBatch】【开始】<<<<<<<<<<<<<: CreditAuditHolidayBatch20211118");
long beginTime = System.currentTimeMillis();
String begin = DateUtil.getSystemDateDetailTime();
// insertStOrder();
int preDayCount = 30;//增量更新30天前数据
// int preDayCount = 345;//增量更新345天前数据
logger.info("【信审考核统计】【CreditAuditHolidayBatch】【开始】<<<<<<<<<<<<<: CreditAuditHolidayBatch20211124preDayCount=" + preDayCount);
deleteCreditAudit(preDayCount);
initDetail(preDayCount);
updateDetail(preDayCount);
initOrderAuditDay();
saveOrderAuditDay();
updateOrderAuditDay();
@ -36,7 +43,9 @@ public class CreditAuditHolidayBatch implements Job{
savePaymentOrderAuditDay();
updatePaymentOrderAuditDay();
updateCreditAuditType();
logger.info("【信审考核统计】【CreditAuditHolidayBatch】【完成】<<<<<<<<<<<<<: ");
long excuteTime = System.currentTimeMillis() - beginTime;
logger.info("【信审考核统计】【CreditAuditHolidayBatch】【完成】<<<<<<<<<<<<<: beginTime=【" + begin + "】 endTime=【" + DateUtil.getSystemDateDetailTime() +
"】 CreditAuditHolidayBatch20211118 -- excuteTime=" + excuteTime/60000);
}
/**
@ -187,13 +196,14 @@ public class CreditAuditHolidayBatch implements Job{
* 添加审核流程记录明细
* @return
*/
private void deleteCreditAudit(){
private void deleteCreditAudit(int preDayCount){
Transaction Sqlca=null;
try{
logger.info("【信审考核统计】【deleteCreditAudit】数据清空执行开始<<<<<<<<<<<<<");
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
//初始化信审考核明细表
String delSql="truncate table st_credit_audit_order_detail";
String stBeginTime = queryStBeginTime(preDayCount);
String delSql="delete from st_credit_audit_order_detail where begintime > '"+ stBeginTime +"'";
String delSql2="truncate table st_credit_audit_order";
String delSql3="truncate table st_payment_audit_order";
Sqlca.executeSQL(new SqlObject(delSql));
@ -263,16 +273,17 @@ public class CreditAuditHolidayBatch implements Job{
* 添加审核流程记录明细
* @return
*/
private void initDetail(){
private void initDetail(int preDayCount){
Transaction Sqlca=null;
try{
logger.info("【信审考核统计】【initDetail】初始化订单明细记录执行开始<<<<<<<<<<<<<");
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
Map<String, String> listHoliday = listHoliday(Sqlca);
logger.info("【考核统计】【initDetail】汇总假期信息列表<<<< listHoliday.size : " + listHoliday.keySet().size());
//初始化信审考核明细表
List<AuditOrderEnums.AuditTypeEnum> typeEnumList = AuditOrderEnums.AuditTypeEnum.findCreditTypeList();
for(AuditOrderEnums.AuditTypeEnum auditTypeEnum : AuditOrderEnums.AuditTypeEnum.values()){
logger.info("【考核统计】【initDetail】初始化订单明细记录执行开始<<【"+auditTypeEnum.getFlowName()+"】<< :" + auditTypeEnum.getDesc());
initDetail(Sqlca, auditTypeEnum);
initDetail(Sqlca, auditTypeEnum, preDayCount, listHoliday);
}
Sqlca.commit();
logger.info("【信审考核统计】【initDetail】初始化订单明细记录执行完成<<<<<<<<<<<<");
@ -302,7 +313,7 @@ public class CreditAuditHolidayBatch implements Job{
* 修改审核明细的创建时间
* @return
*/
private void updateDetail(){
private void updateDetail(int preDayCount){
Transaction Sqlca=null;
try{
logger.info("【信审考核统计】【updateDetail】修改订单明细中的创建时间执行开始<<<<<<<<<<<<<");
@ -311,9 +322,9 @@ public class CreditAuditHolidayBatch implements Job{
List<AuditOrderEnums.AuditTypeEnum> typeEnumList = AuditOrderEnums.AuditTypeEnum.findCreditTypeList();
for(AuditOrderEnums.AuditTypeEnum auditTypeEnum : typeEnumList){
logger.info("【信审考核统计】【updateDetail】修改订单明细中的--创建时间开始<<【信审部分】");
updateDetail(Sqlca, auditTypeEnum);
updateDetail(Sqlca, auditTypeEnum, preDayCount);
logger.info("【信审考核统计】【updateDetail】修改订单明细中的--审核时间开始<<【信审部分】");
updateDetailAuditDay(Sqlca, auditTypeEnum);
updateDetailAuditDay(Sqlca, auditTypeEnum, preDayCount);
}
Sqlca.commit();
logger.info("【信审考核统计】【updateDetail】修改订单明细中的创建时间执行完成<<<<<<<<<<<<<");
@ -445,16 +456,43 @@ public class CreditAuditHolidayBatch implements Job{
}
/**
* 添加审核流程记录明细
* @return
* @throws Exception
*/
public String initDetail(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum) throws Exception {
public String initDetail(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum, int preDayCount, Map<String, String> listHoliday) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
String ftBeginTime = queryFtBeginTime(preDayCount);
int con=0;
String nextAuditFlowType = ""; // 下阶段流程审核类型
String create_day = ""; // 流程创建日期
String audit_day = ""; // 流程审核日期
String auditTime = ""; // 审核时间
String jump_begintime = ""; // 跳过节假日之后流程开始时间
String jump_endtime = ""; // 跳过节假日之后流程结束时间
String createtime = ""; // 流程创建时间第二个定时器进行修改
String begintime = ""; // 流程开始时间
String endtime = ""; // 流程结束时间
String remark = "";
String auditOrderSts = "";
String auditOrderStsDes = "";
String uuidDetail = "";
String projectId = ""; // 用户id
String userid = ""; // 用户id
String username = ""; // 用户姓名
String objectno = ""; // 流程编号
String serialno = ""; // 流程处理流水
String auditFlowType = ""; // 流程审核类型
String auditFlowTypeDes = ""; // 流程审核类型说明
String auditResSts = ""; // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
String auditChoiceSts = ""; // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
String auditResStsDes = ""; // 流程审核结果说明
// 查询所有需要发送还款提醒的数据
String selSql="SELECT \n" +
" FBO.proj_id as project_id,\n" +
@ -476,37 +514,37 @@ public class CreditAuditHolidayBatch implements Job{
"LEFT JOIN flow_bussiness_object FBO ON FT.objectno=FBO.flow_unid \n" +
"WHERE FT.flowname = '" + auditTypeEnum.getFlowName() +"'" +
" AND FT.phaseno='" + auditTypeEnum.getPhaseNo() +"'" +
" AND FT.begintime > '" + ftBeginTime +"'" +
" AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'')";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
con++;
String nextAuditFlowType = rs.getString("nextAuditFlowType"); // 下阶段流程审核类型
nextAuditFlowType = rs.getString("nextAuditFlowType"); // 下阶段流程审核类型
create_day = ""; // 流程创建日期
audit_day = ""; // 流程审核日期
auditTime = ""; // 审核时间
jump_begintime = ""; // 跳过节假日之后流程开始时间
jump_endtime = ""; // 跳过节假日之后流程结束时间
createtime = ""; // 流程创建时间第二个定时器进行修改
begintime = rs.getString("begintime"); // 流程开始时间
endtime = rs.getString("endtime"); // 流程结束时间
String create_day = ""; // 流程创建日期
String audit_day = ""; // 流程审核日期
String auditTime = ""; // 审核时间
String jump_begintime = ""; // 跳过节假日之后流程开始时间
String jump_endtime = ""; // 跳过节假日之后流程结束时间
String createtime = ""; // 流程创建时间第二个定时器进行修改
String begintime = rs.getString("begintime"); // 流程开始时间
String endtime = rs.getString("endtime"); // 流程结束时间
remark = "";
auditOrderSts = "";
auditOrderStsDes = "";
uuidDetail = UUID.randomUUID().toString().replace("-", "");
projectId = rs.getString("project_id"); // 用户id
userid = rs.getString("userid"); // 用户id
username = rs.getString("username"); // 用户姓名
objectno = rs.getString("objectno"); // 流程编号
serialno = rs.getString("serialno"); // 流程处理流水
auditFlowType = rs.getString("auditFlowType"); // 流程审核类型
auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程审核类型说明
String remark = "";
String auditOrderSts = "";
String auditOrderStsDes = "";
String uuidDetail = UUID.randomUUID().toString().replace("-", "");
String projectId = rs.getString("project_id"); // 用户id
String userid = rs.getString("userid"); // 用户id
String username = rs.getString("username"); // 用户姓名
String objectno = rs.getString("objectno"); // 流程编号
String serialno = rs.getString("serialno"); // 流程处理流水
String auditFlowType = rs.getString("auditFlowType"); // 流程审核类型
String auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程审核类型说明
String auditResSts = rs.getString("auditResSts"); // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
String auditChoiceSts = rs.getString("auditChoiceSts"); // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
String auditResStsDes = rs.getString("auditResStsDes"); // 流程审核结果说明
auditResSts = rs.getString("auditResSts"); // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
auditChoiceSts = rs.getString("auditChoiceSts"); // 审核最终结果状态0,审核中1,审核通过2,审核拒绝3,退回到经销商
auditResStsDes = rs.getString("auditResStsDes"); // 流程审核结果说明
if(AuditOrderEnums.CREDIT_AUDIT_TYPE.equals(auditTypeEnum.getFlowNo())){
// logger.info("【信审考核统计】【initDetail】信审统计明细--serialno=" + serialno);
if(StringUtils.isEmpty(endtime)){
@ -604,7 +642,7 @@ public class CreditAuditHolidayBatch implements Job{
//开始时间处理
if(StringUtils.isNotEmpty(begintime)){
create_day = dayFormat.format(simpleDateFormat.parse(begintime));
jump_begintime = resJumpHoliday(Sqlca, begintime); // 跳过节假日之后流程开始时间
jump_begintime = resJumpHoliday(Sqlca, begintime, listHoliday); // 跳过节假日之后流程开始时间
jump_begintime = sdf.format(simpleDateFormat.parse(jump_begintime));//格式化时间格式
createtime = sdf.format(simpleDateFormat.parse(begintime));
begintime = createtime;
@ -616,11 +654,11 @@ public class CreditAuditHolidayBatch implements Job{
if (StringUtils.isNotEmpty(endtime)){
// 2020-06-05 审核数量记录为当前时间不跳过节假日
audit_day = dayFormat.format(simpleDateFormat.parse(endtime));
jump_endtime = resJumpHoliday(Sqlca, endtime); // 跳过节假日之后流程结束时间
jump_endtime = resJumpHoliday(Sqlca, endtime, listHoliday); // 跳过节假日之后流程结束时间
jump_endtime = sdf.format(simpleDateFormat.parse(jump_endtime));
endtime = sdf.format(simpleDateFormat.parse(endtime));
//信审考核时间累加
auditTime = diffTime(Sqlca, jump_begintime, jump_endtime);
auditTime = diffTime(Sqlca, jump_begintime, jump_endtime, listHoliday);
if("0".equals(auditTime)){//审核时间不足一分钟按一分钟算
auditTime = "1";
}
@ -675,6 +713,7 @@ public class CreditAuditHolidayBatch implements Job{
")";
Sqlca.executeSQL(new SqlObject(insertSql));
}
logger.info("【initDetail】明细初始化完成--auditTypeEnum.getFlowName()=【" + auditTypeEnum.getFlowName() +"】 --countNum=" + con);
return String.valueOf(con);
}
@ -683,31 +722,37 @@ public class CreditAuditHolidayBatch implements Job{
* @return
* @throws Exception
*/
public String updateDetail(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum) throws Exception {
public String updateDetail(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum, int preDayCount) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
String ftBeginTime = queryFtBeginTime(preDayCount);
int con=0;
// 查询当前最小的审批时间
String selSql="SELECT \n" +
" FT.userid,\n" +
" FT.objectno,\n" +
" min(FT.begintime) AS begintime\n" +
"FROM FLOW_TASK FT\n" +
"LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
"WHERE FT.flowname = '" + auditTypeEnum.getFlowName() +"'" +
" FROM FLOW_TASK FT\n" +
" LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
" WHERE FT.flowname = '" + auditTypeEnum.getFlowName() +"'" +
" AND FT.phaseno='" + auditTypeEnum.getPhaseNo() +"'" +
"AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'') group by FT.objectno";
" AND FT.begintime > '" + ftBeginTime +"'" +
" AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'') group by FT.objectno";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
String begintime = ""; // 流程编号
String objectno = ""; // 流程创建时间
String createtime = "";
//2020-06-05 进单时间不跳过节假日
String create_day = "";
while(rs.next()) {
// 获取接口推送所需数据
con++;
String begintime = rs.getString("begintime"); // 流程编号
String objectno = rs.getString("objectno"); // 流程创建时间
String createtime = sdf.format(simpleDateFormat.parse(begintime));
// String create_day = dayFormat.format(simpleDateFormat.parse(resJumpHoliday(Sqlca, begintime)));
begintime = rs.getString("begintime"); // 流程编号
objectno = rs.getString("objectno"); // 流程创建时间
createtime = sdf.format(simpleDateFormat.parse(begintime));
//2020-06-05 进单时间不跳过节假日
String create_day = dayFormat.format(simpleDateFormat.parse(begintime));
create_day = dayFormat.format(simpleDateFormat.parse(begintime));
String updSql="UPDATE st_credit_audit_order_detail SET create_day='"+create_day+"', createtime='"+createtime+"'," +
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE objectno='"+objectno+"' ";
Sqlca.executeSQL(new SqlObject(updSql));
@ -720,21 +765,23 @@ public class CreditAuditHolidayBatch implements Job{
* @return
* @throws Exception
*/
public String updateDetailAuditDay(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum) throws Exception {
public String updateDetailAuditDay(Transaction Sqlca, AuditOrderEnums.AuditTypeEnum auditTypeEnum, int preDayCount) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
String ftBeginTime = queryFtBeginTime(preDayCount);
int con=0;
// 查询当前最大的审批时间
String selSql="SELECT \n" +
" FT.userid,\n" +
" FT.objectno,\n" +
" max(FT.endtime) AS endtime\n" +
"FROM FLOW_TASK FT\n" +
"LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
"WHERE FT.flowname = '" + auditTypeEnum.getFlowName() +"'" +
" FROM FLOW_TASK FT\n" +
" LEFT JOIN FLOW_OPINION_BUSINESS FOB ON FT.SERIALNO=FOB.SERIALNO \n" +
" WHERE FT.flowname = '" + auditTypeEnum.getFlowName() +"'" +
" AND FT.phaseno='" + auditTypeEnum.getPhaseNo() +"'" +
"AND (FT.endtime IS NOT NULL OR FT.endtime <>'') AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'') group by FT.objectno, FT.userid";
" AND FT.begintime > '" + ftBeginTime +"'" +
" AND (FT.endtime IS NOT NULL OR FT.endtime <>'') AND (FT.USERNAME IS NOT NULL OR FT.USERNAME <>'') group by FT.objectno, FT.userid";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
@ -869,7 +916,7 @@ public class CreditAuditHolidayBatch implements Job{
String username = rs.getString("username"); // 流程创建时间
String auditFlowType = rs.getString("auditFlowType"); // 流程创建时间
String auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程创建时间
// TODO: 2021/11/10 可优化提取到循环外边
String selSql2="SELECT count(1) as countNum FROM st_payment_audit_order " +
"WHERE every_day ='" + every_day +"' and userid='" + userid +"' and auditFlowType='" + auditFlowType +"'";
ASResultSet rs2 = Sqlca.getASResultSet(new SqlObject(selSql2));
@ -920,10 +967,8 @@ public class CreditAuditHolidayBatch implements Job{
String selSql="SELECT id, every_day, userid, auditFlowType, count_audit FROM st_payment_audit_order ";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
while(rs.next()) {
// 获取接口推送所需数据
con++;
logger.info("【付款申请考核统计】【updateOrderAuditDay】付款申请考核统计订单执行 con=" + con);
String id = rs.getString("id"); // 流程编号
String count_audit = rs.getString("count_audit"); // 审核数量
String auditFlowType = rs.getString("auditFlowType"); // 流程类型
@ -981,6 +1026,7 @@ public class CreditAuditHolidayBatch implements Job{
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE id='"+id+"' ";
Sqlca.executeSQL(new SqlObject(updSql));
}
logger.info("【付款申请考核统计】【updateOrderAuditDay】付款申请考核统计订单执行 con=" + con);
return String.valueOf(con);
}
@ -1000,26 +1046,34 @@ public class CreditAuditHolidayBatch implements Job{
" group by auditFlowType, userid, objectno, create_day " +
" ) as a group by auditFlowType, userid, create_day" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
String every_day = ""; // 流程编号
String order_count = ""; // 流程创建时间
String userid = ""; // 流程创建时间
String username = ""; // 流程创建时间
String auditFlowType = ""; // 流程创建时间
String auditFlowTypeDes = ""; // 流程创建时间
// TODO: 2021/11/10 可优化提取到循环外边
// String selSql2="SELECT count(1) as countNum FROM st_credit_audit_order " +
// "WHERE auditFlowType='" + auditFlowType +"' group by every_day, userid";
while(rs.next()) {
// 获取接口推送所需数据
con++;
String every_day = rs.getString("every_day"); // 流程编号
String order_count = rs.getString("order_count"); // 流程创建时间
String userid = rs.getString("userid"); // 流程创建时间
String username = rs.getString("username"); // 流程创建时间
String auditFlowType = rs.getString("auditFlowType"); // 流程创建时间
String auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程创建时间
every_day = rs.getString("every_day"); // 流程编号
order_count = rs.getString("order_count"); // 流程创建时间
userid = rs.getString("userid"); // 流程创建时间
username = rs.getString("username"); // 流程创建时间
auditFlowType = rs.getString("auditFlowType"); // 流程创建时间
auditFlowTypeDes = rs.getString("auditFlowTypeDes"); // 流程创建时间
// TODO: 2021/11/10 可优化提取到循环外边
String selSql2="SELECT count(1) as countNum FROM st_credit_audit_order " +
"WHERE every_day ='" + every_day +"' and userid='" + userid +"' and auditFlowType='" + auditFlowType +"'";
ASResultSet rs2 = Sqlca.getASResultSet(new SqlObject(selSql2));
if(rs2.next()) {
if(rs2.getInt("countNum") > 0){
if(rs2.getInt("countNum") > 0 ){
String updSql="UPDATE st_credit_audit_order SET order_count='"+order_count+"', " +
"UPDATETIME=DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') WHERE every_day='"+every_day +"' and userid='"
+ userid +"' and auditFlowType='" + auditFlowType +"'";
Sqlca.executeSQL(new SqlObject(updSql));
logger.info("【信审考核统计】【saveOrderCreateDay】更新记录保存进单数量<<<<<<<<<<<<<");
}else {
String insertSql = "INSERT INTO st_credit_audit_order(\n" +
" every_day,\n" +
@ -1042,7 +1096,6 @@ public class CreditAuditHolidayBatch implements Job{
"DATE_FORMAT(NOW(),'%Y/%m/%d %H:%i:%s') " +
")";
Sqlca.executeSQL(new SqlObject(insertSql));
logger.info("【信审考核统计】【saveOrderCreateDay】新增记录保存进单数量<<<<<<<<<<<<<");
}
}
}
@ -1060,11 +1113,23 @@ public class CreditAuditHolidayBatch implements Job{
// 查询所有需要发送还款提醒的数据
String selSql="SELECT id, every_day, userid, auditFlowType, count_audit FROM st_credit_audit_order ";
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
Set<String> passSet = new HashSet<>();
Set<String> rejectSet = new HashSet<>();
Set<String> rejectSet1 = new HashSet<>();//拒绝数量信用不良0010
Set<String> rejectSet2 = new HashSet<>();//拒绝数量法院执行0020
Set<String> rejectSet3 = new HashSet<>();//拒绝数量虚假信息0030
Set<String> rejectSet4 = new HashSet<>();//拒绝数量身份核实异常0040
Set<String> rejectSet5 = new HashSet<>();//拒绝数量购车目的异常0050
Set<String> rejectSet6 = new HashSet<>();//拒绝数量综合评分不足0060
//排除同一条订单多种意见的情况
Map<String, String> resMap = new HashMap<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
int audittime = 0;
while(rs.next()) {
// 获取接口推送所需数据
con++;
logger.info("【信审考核统计】【updateOrderAuditDay】信审考核统计订单执行 con=" + con);
// logger.info("【信审考核统计】【updateOrderAuditDay】信审考核统计订单执行 con=" + con);
String id = rs.getString("id"); // 流程编号
String count_audit = rs.getString("count_audit"); // 审核数量
String auditFlowType = rs.getString("auditFlowType"); // 流程类型
@ -1082,41 +1147,35 @@ public class CreditAuditHolidayBatch implements Job{
" AND auditFlowType='" + auditFlowType +"'" +
" AND auditType ='BusinessApplyFlow'" ;
ASResultSet rs2 = Sqlca.getASResultSet(new SqlObject(selSql2));
Set<String> passSet = new HashSet<>();
Set<String> rejectSet = new HashSet<>();
Set<String> rejectSet1 = new HashSet<>();//拒绝数量信用不良0010
Set<String> rejectSet2 = new HashSet<>();//拒绝数量法院执行0020
Set<String> rejectSet3 = new HashSet<>();//拒绝数量虚假信息0030
Set<String> rejectSet4 = new HashSet<>();//拒绝数量身份核实异常0040
Set<String> rejectSet5 = new HashSet<>();//拒绝数量购车目的异常0050
Set<String> rejectSet6 = new HashSet<>();//拒绝数量综合评分不足0060
passSet = new HashSet<>();
rejectSet = new HashSet<>();
rejectSet1 = new HashSet<>();//拒绝数量信用不良0010
rejectSet2 = new HashSet<>();//拒绝数量法院执行0020
rejectSet3 = new HashSet<>();//拒绝数量虚假信息0030
rejectSet4 = new HashSet<>();//拒绝数量身份核实异常0040
rejectSet5 = new HashSet<>();//拒绝数量购车目的异常0050
rejectSet6 = new HashSet<>();//拒绝数量综合评分不足0060
//排除同一条订单多种意见的情况
Map<String, String> resMap = new HashMap<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
int audittime = 0;
resMap = new HashMap<>();
audittime = 0;
while(rs2.next()) {
String objectno = rs2.getString("objectno");
String endtime = rs2.getString("endtime");
if(StringUtils.isEmpty(endtime) || "null".equals(endtime)){
logger.info("【信审考核统计】【updateOrderAuditDay】endtime异常-当前订单为--objectno=" +objectno);
logger.warn("【信审考核统计】【updateOrderAuditDay】endtime异常-当前订单为--objectno=" +objectno);
continue;
}
//取值
String audittimeStr = rs2.getString("audittime"); // 审核时间
//审核时间计算
if(StringUtils.isNotEmpty(audittimeStr) && !"null".equals(audittimeStr)){
audittime = audittime + Integer.parseInt(audittimeStr);
}
if(resMap.containsKey(objectno)){
String endtimeBak = resMap.get(objectno);
logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--objectno=" +objectno);
logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--endtimeBak=" +endtimeBak);
logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--endtime=" +endtime);
// logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--objectno=" +objectno);
// logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--endtimeBak=" +endtimeBak);
// logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-当前订单为--endtime=" +endtime);
Date endtimeBakDate = sdf.parse(endtimeBak);
Date endtimeDate = sdf.parse(endtime);
//以最新结果为准
if(endtimeBakDate.getTime() > endtimeDate.getTime()){//如果已处理的订单时间大于当前的时间则不处理当前结果
logger.info("【信审考核统计】【updateOrderAuditDay】双结果订单-以最新结果为准,不处理当前结果--objectno=" +objectno);
logger.warn("【信审考核统计】【updateOrderAuditDay】双结果订单-以最新结果为准,不处理当前结果--objectno=" +objectno);
continue;
}else {//如果当前状态为最新状态则清除之前的数量
passSet.remove(objectno);
@ -1129,10 +1188,19 @@ public class CreditAuditHolidayBatch implements Job{
rejectSet6.remove(objectno);
}
}
logger.info("【信审考核统计】【updateOrderAuditDay】当前订单为--objectno=" +objectno);
// logger.info("【信审考核统计】【updateOrderAuditDay】当前订单为--objectno=" +objectno);
resMap.put(objectno, endtime);
//大状态// 0,审核中1,任意退回2,审核拒绝3,审核通过
String auditOrderSts = rs2.getString("auditOrderSts");
if(StringUtils.isNotEmpty(auditOrderSts) && !"null".equals(auditOrderSts)
&& !"0".equals(auditOrderSts) && !"1".equals(auditOrderSts)){
//取值
String audittimeStr = rs2.getString("audittime"); // 审核时间
//审核时间计算
if(StringUtils.isNotEmpty(audittimeStr) && !"null".equals(audittimeStr)){
audittime = audittime + Integer.parseInt(audittimeStr);
}
}
//小状态信用不良0010,法院执行0020,虚假信息0030,身份核实异常0040,购车目的异常0050,综合评分不足0060
String auditResSts = rs2.getString("auditResSts");
@ -1189,111 +1257,67 @@ public class CreditAuditHolidayBatch implements Job{
* @param date
* @return
*/
private String resJumpHoliday(Transaction Sqlca, String date) throws SQLException, ParseException {
private String resJumpHoliday(Transaction Sqlca, String date, Map<String, String> listHoliday) throws SQLException, ParseException {
//查询当前时间是否在工作时间
// logger.info("===================当前时间date=" + date);
// logger.info("resJumpHoliday --【开始】--查询当前时间是否在工作时间date=" + date);
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
int hour = Integer.parseInt(date.substring(11, 13));
int minute = Integer.parseInt(date.substring(14, 16));
if(hour < 9){//时间小于当天9点则调整时间为上午九点
date = date.substring(0, 11) + "09:00:00";
}else if((hour == 17 && minute > 30) || (hour > 17)){//时间小于当天17:30点则调整时间为第二天的上午九点
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
}
//查询当前时间是否在节假日时间
String day = date.substring(0, 10);
int count = 0;
while (count < 15){
count ++;
String selSql="SELECT count(1) as countNum " +
" FROM st_credit_audit_holiday st" +
" WHERE st.c_date='" + day +"'" +
" AND st.otype='休'" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
int countNum = 0;
if(rs.next()){
countNum = rs.getInt("countNum");
}
if(countNum > 0){
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
day = date.substring(0, 10);
}else {
break;
}
}
return date;
int hour = Integer.parseInt(date.substring(11, 13));
int minute = Integer.parseInt(date.substring(14, 16));
if(hour < 9){//时间小于当天9点则调整时间为上午九点
date = date.substring(0, 11) + "09:00:00";
}else if((hour == 17 && minute > 30) || (hour > 17)){//时间小于当天17:30点则调整时间为第二天的上午九点
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
}
//查询当前时间是否在节假日时间
String day = date.substring(0, 10);
//logger.info("resJumpHoliday 查询当前时间是否在节假日时间 day=" + day);
int count = 0;
while (listHoliday.containsKey(day) && count < 15) {
//logger.info("resJumpHoliday 节假日时间 day=" + day);
count ++;
Date time = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
date = simpleDateFormat.format(calendar.getTime()).substring(0, 11) + "09:00:00";
day = date.substring(0, 10);
logger.info("resJumpHoliday 节假日时间 + 1 day=" + day);
}
//logger.info("resJumpHoliday --【结束】--查询当前时间是否在工作时间date=" + date);
return date;
}
/**
* 查询所有节假日
* @param Sqlca
* @return
* @throws SQLException
*/
private Map<String, String> listHoliday(Transaction Sqlca) throws SQLException {
String selSql="SELECT c_date " +
" FROM st_credit_audit_holiday st" +
" WHERE st.otype='休'" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
Map<String, String> holidayMap = new HashMap<>();
while(rs.next()) {
holidayMap.put(rs.getString("c_date"), "1");
}
return holidayMap;
}
/**
* 根据时间段相差时间获得跳过节假日的工作日时间
* @param begintime 开始时间
* @param endtime 结束时间
* @return
*/
private String resDiffJumpHoliday(Transaction Sqlca, String begintime, String endtime) throws SQLException, ParseException {
//获取开始时间结束时间跳过节假日的时间
begintime = resJumpHoliday(Sqlca, begintime);
endtime = resJumpHoliday(Sqlca, endtime);
//确认开始时间到结束时间中间隔的时间并排除节假日时间
//如果结束时间小于或者等于开始时间
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date beginDate = simpleDateFormat.parse(begintime);
Date endDate = simpleDateFormat.parse(endtime);
long diff = 0;
if(beginDate.getTime() >= endDate.getTime()){
return "0";
}else if (begintime.substring(0, 10).equals(endtime.substring(0, 10))){
diff = diffMinute(beginDate.getTime(), endDate.getTime());
return String.valueOf(diff);
}else {
long diffBeginAfter = diffBeginDateAfter(begintime, beginDate);
long diffEndDateBefore = diffEndDateBefore(endtime, endDate);
diff = diffBeginAfter + diffEndDateBefore;
//得到相差的天数 betweenDate
beginDate = dayFormat.parse(dayFormat.format(beginDate));
endDate = dayFormat.parse(dayFormat.format(endDate));
long betweenDate = (endDate.getTime() - beginDate.getTime())/(60*60*24*1000);
if (betweenDate == 1){
return String.valueOf(diff);
}else {//中间相隔大于一天查询数据库相隔天数中有几天是假期
begintime = dayFormat.format(beginDate);
endtime = dayFormat.format(endDate);
String selSql="SELECT COUNT(1) as countNum FROM (\n" +
" SELECT c_date\n" +
" FROM st_credit_audit_holiday st\n" +
" WHERE st.c_date BETWEEN '"+begintime+"' AND '"+endtime+"'\n" +
" AND st.otype='休'\n" +
" GROUP BY st.c_date\n" +
" ) AS s" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
int countNum = 0;
if(rs.next()){
countNum = rs.getInt("countNum");
}
diff += (betweenDate - countNum - 1)*8*60;
return String.valueOf(diff);
}
}
}
/**
* 根据时间段相差时间获得跳过节假日的工作日时间
* @param begintime 开始时间
* @param endtime 结束时间
* @return
*/
private String diffTime(Transaction Sqlca, String begintime, String endtime) throws SQLException, ParseException {
private String diffTime(Transaction Sqlca, String begintime, String endtime, Map<String, String> listHoliday) throws SQLException, ParseException {
//如果结束时间小于或者等于开始时间
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
@ -1302,7 +1326,8 @@ public class CreditAuditHolidayBatch implements Job{
long diff = 0;
if(beginDate.getTime() >= endDate.getTime()){//开始时间大于结束时间
return "0";
}else if (begintime.substring(0, 10).equals(endtime.substring(0, 10))){//开始时间和结束时间年月日相同
}else if (dayFormat.format(beginDate).equals(dayFormat.format(endDate))){//开始时间和结束时间年月日相同
logger.info("diffTime2111182 开始时间和结束时间年月日相同 beginDate=" + dayFormat.format(beginDate) + "--> endDate=" + dayFormat.format(endDate));
diff = diffMinute(beginDate.getTime(), endDate.getTime());
return String.valueOf(diff);
}else {
@ -1313,29 +1338,56 @@ public class CreditAuditHolidayBatch implements Job{
beginDate = dayFormat.parse(dayFormat.format(beginDate));
endDate = dayFormat.parse(dayFormat.format(endDate));
long betweenDate = (endDate.getTime() - beginDate.getTime())/(60*60*24*1000);
logger.info("diffTime211118 begintime=" + begintime + "相差天数betweenDateCX" + betweenDate);
if (betweenDate == 1){
return String.valueOf(diff);
}else {//中间相隔大于一天查询数据库相隔天数中有几天是假期
begintime = dayFormat.format(beginDate);
endtime = dayFormat.format(endDate);
String selSql="SELECT COUNT(1) as countNum FROM (\n" +
" SELECT c_date\n" +
" FROM st_credit_audit_holiday st\n" +
" WHERE st.c_date BETWEEN '"+begintime+"' AND '"+endtime+"'\n" +
" AND st.otype='休'\n" +
" GROUP BY st.c_date\n" +
" ) AS s" ;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject(selSql));
int countNum = 0;
if(rs.next()){
countNum = rs.getInt("countNum");
}
//时间段内假期天数
int countNum = holidayNum(begintime, endtime, listHoliday);
logger.info("diffTime211118 begintime=" + begintime + "非工作天数holidayNumCX" + countNum);
diff += (betweenDate - countNum - 1)*8*60;
return String.valueOf(diff);
}
}
}
/**
* 计算该时间中间的假期时间
* @param beginDate yyyy/MM/dd
* @param endDate yyyy/MM/dd
* @param listHoliday yyyy/MM/dd1
* @return
*/
private int holidayNum(String beginDate, String endDate, Map<String, String> listHoliday) throws ParseException {
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy/MM/dd");
int hilidayNum = 0;
if(beginDate.equals(endDate)){
return hilidayNum;
}
Date begin = dayFormat.parse(beginDate);
Date end = dayFormat.parse(endDate);
if(end.getTime() <= begin.getTime()){
return hilidayNum;
}
String tempDate = beginDate;
//日期加一不等于结束日期
while (!tempDate.equals(endDate)){
//当前日期存在于假期之中,假期加1
if(listHoliday.containsKey(tempDate)){
hilidayNum++;
}
Date time = dayFormat.parse(tempDate);
Calendar calendar = Calendar.getInstance();
calendar.setTime(time);
calendar.add(Calendar.DAY_OF_MONTH, 1);
tempDate = dayFormat.format(calendar.getTime());
}
return hilidayNum;
}
private long diffEndDateBeforeNew(String endTime, Date endDate) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String endtimeBefore = endTime.substring(0, 8) + "090000";
@ -1399,10 +1451,39 @@ public class CreditAuditHolidayBatch implements Job{
return res <= 0 ? 1 : res;
}
// private long diffMinute(long begin, long end){
// if(begin > end){
// return -1;
// }
// return (end - begin)/1000/60;
// }
/**
* 查询st相关表中时间
* @param preDayCount 多少天前数据增量更新
* @return
* @throws Exception
*/
private String queryStBeginTime(int preDayCount) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date date = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DATE, -preDayCount);
logger.info("queryStBeginTime 查询st相关表中时间" + sdf.format(cal.getTime()));
return sdf.format(cal.getTime()) + "000000";
}
/**
* 查询flow相关表中时间
* @param preDayCount 多少天前数据增量更新
* @return
* @throws Exception
*/
private String queryFtBeginTime(int preDayCount) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
Date date = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DATE, -preDayCount);
logger.info("queryFtBeginTime 查询flow相关表中时间" + sdf.format(cal.getTime()));
return sdf.format(cal.getTime());
}
}