微信提交修改基本信息、银行卡信息、提前申请修改

This commit is contained in:
tangfutang 2019-11-08 20:13:33 +08:00
parent 48b63cd225
commit 3badefa879
16 changed files with 1126 additions and 107 deletions

View File

@ -30,6 +30,14 @@
}
function viewAndEdit(){
var sUrl = "/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageInfo.jsp";
var config = getItemValue(0,getRow(),"config_id");
if( "230f12df57324ad7b4f959b9ef52596a" == config){
sUrl = "/Tenwa/wechat/WechatBasicChange.jsp";
}else if ("7457fee6a7654054b0a214bf05d8c68e" == config){
sUrl = "/Tenwa/wechat/WechatAdvanceSettleInfo.jsp";
}else if ("b407c6f005f54319b8f3b3396efae620" == config){
sUrl = "/Tenwa/wechat/WechatBanknumberChangeInfo.jsp";
}
var ID = getItemValue(0,getRow(),"ID");
if(typeof(ID) == "undefined" || ID.length == 0 )
{

View File

@ -0,0 +1,133 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@page import="jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/bankBin.js"></script><%
/*
Author: undefined 2017-07-10
Content: 示例详情页面
History Log:
*/
String projectId = CurPage.getParameter("ProjectId");
String RightType=CurPage.getParameter("RightType");
String ishistory=CurPage.getParameter("IsHistory");
String ApplyType=CurPage.getParameter("ApplyType");
String CustomerType=CurPage.getParameter("CustomerType");
String customerId = CurPage.getParameter("customerId");
String FlowUnid=CurPage.getParameter("FlowUnid");
String contractId = CurPage.getParameter("ContractId");
String sTempletNo = "DebitCardInfoMcontract";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
RightType="ReadOnly";
isShowButton=false;
}else{
isShowButton=true;
}
dwTemp.genHTMLObjectWindow(projectId);
String sButtons[][] = {
{"true","","Button","保存","保存所有修改","save()","","","",""}
} ;
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
//根据选择的用户名选择对应的证件号
function autoSetCustId(){
var param1 = "";
var param2 = "";
if('AccountChangeApply'=='<%=ApplyType%>'){
param1 = "selectAccountForChange";
param2 = "ProjectId,<%=projectId%>,customerType,<%=CustomerType%>,ProjectId,<%=projectId%>,CustomerId,<%=customerId%>";
}else{
param1 = "selectAccountByCusts";
param2 = "flowunid,<%=FlowUnid%>";
}
param2=param2+",customerType,"+"<%=CustomerType%>";
AsDialog.OpenSelector(param1,param2,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
setItemValue(0,0,'CERTID',sReturn[0]);
setItemValue(0,0,'ACCOUNT',sReturn[1]);
setItemValue(0,0,'CUSTTYPE',sReturn[2]);
setItemValue(0,0,'MOBILE',sReturn[3]);
},"选择扣款卡名称");
}
function checkTel(){//校验预留手机号格式
var mobile = getItemValue(0,getRow(0),"MOBILE");
if(mobile==""){
//setErrorTips("mobile","手机号不能为空!");
// alert("预留手机号不能为空!");
return true;
}
var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
if(phone.test(mobile)){
setErrorTips("MOBILE","");
return true;
}else{
setErrorTips("MOBILE","手机号格式不正确!");
return false;
}
}
function save(){
var TelRes=checkTel();
if(TelRes==false){
return;
}
var number=getItemValue(0, getRow(0), "acc_number");
var reg = /^(\d{14}|\d{16}|\d{19})$/;
if(!reg.test(number)){
setErrorTips("acc_number","银行账号格式错误!");
return ;
}
setErrorTips("acc_number","");
setItemValue(0,0,"acc_type","Debit");
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>";
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "IsSignStatus", sparams);
if("Y"==meassge){
setItemValue(0,0,"sign_status","Y");
}else if("N"==meassge){
setItemValue(0,0,"sign_status","");
}
setItemValue(0,0,"ACC_NUMBER",allTrim(getItemValue(0,0,"ACC_NUMBER")));
as_save("0","re");
}
function re(){
var param="CompClientID=<%=sCompClientID%>&FlowUnid=<%=FlowUnid%>&RightType=<%=RightType%>&ishistory=<%=ishistory%>";
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp",param,"frame_list");
}
function getNameOfBank(){
var sflag=-1;
var number = getItemValue(0, getRow(0), "acc_number");
var cardbin = number.substring(0, 6);
for (var i=0;i<bankBin.length;i++) {
if(cardbin==bankBin[i]){
sflag = i;
}
}
if (sflag != -1) {
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
setItemValue(0,getRow(),"bank_name",name);
}
setErrorTips("acc_number","");
return true;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1,15 +1,15 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBegin.jsp"%><%
/*
Author: undefined 2018-07-30
Content:
History Log:
*/
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
<script type="text/javascript">
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp","","rightup","");
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp","","rightdown","");
setTitle("±ä¸üǰ",true);
setTitle("±ä¸üºó",false);
</script>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBegin.jsp"%><%
/*
Author: undefined 2018-07-30
Content:
History Log:
*/
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
<script type="text/javascript">
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp","","rightup","");
AsControl.OpenView("Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp","","rightdown","");
setTitle("±ä¸üǰ",true);
setTitle("±ä¸üºó",false);
</script>
<%@ include file="/IncludeEnd.jsp"%>

View File

@ -1,38 +1,38 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-07-30
Content: 示例详情页面
History Log:
*/
String ishistory = CurPage.getParameter("IsHistory");
String ContractId = CurPage.getParameter("ContractId");
String sPrevUrl = CurPage.getParameter("PrevUrl");
String flowName = CurPage.getParameter("FlowName");
String flowUnid = CurPage.getParameter("FlowUnid");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "DebitCardInfoForm";//--模板号--
if("扣款信息变更审核".equals(flowName)&& null!=ishistory&&ishistory.equals("true")){
sTempletNo = "DebitCardInfoFormHis";
ContractId = flowUnid;
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
// doTemp.setColTips("", "测试");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(ContractId);
String sButtons[][] = {
// {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
</script>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-07-30
Content: 示例详情页面
History Log:
*/
String ishistory = CurPage.getParameter("IsHistory");
String ContractId = CurPage.getParameter("ContractId");
String sPrevUrl = CurPage.getParameter("PrevUrl");
String flowName = CurPage.getParameter("FlowName");
String flowUnid = CurPage.getParameter("FlowUnid");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "DebitCardInfoForm";//--模板号--
if("扣款信息变更审核".equals(flowName)){
sTempletNo = "DebitCardInfoFormHis";
ContractId = flowUnid;
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
// doTemp.setColTips("", "测试");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(ContractId);
String sButtons[][] = {
// {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -121,10 +121,13 @@
function changeFamilyRequired(){//已婚时设置配偶信息必填,并将婚姻状况参数传递到子页面
var marriage = getItemValue(0,getRow(0),"MARRIAGE");
if("01" == marriage){
frame_list.window.changeFamilyRequiredTrue(marriage);
$("#frame_list")[0].contentWindow.changeFamilyRequiredTrue(marriage);
//frame_list.window.changeFamilyRequiredTrue(marriage);
//as_save("myiframe0","frame_list.window.as_save(0);");
}else{
frame_list.window.changeFamilyRequiredFalse(marriage);
$("#frame_list")[0].contentWindow.changeFamilyRequiredFalse(marriage);
//frame_list.window.changeFamilyRequiredFalse(marriage);
}
}

View File

@ -0,0 +1,51 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2019-11-04
Content: 示例详情页面
History Log:
*/
String sTempletNo = "WechatAdvanceSettle";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("AdvanceSettleId"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{"true","All","Button","否决","否决","returnList()","","","","btn_icon_close"},
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
var id = getItemValue(0,getRow(),"ID");
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isSubmit","id="+id+",type=advance");
if("success" != sReturnInfo ){
alert(sReturnInfo);
return ;
}
var opinions = getItemValue(0,getRow(),"opinions");
if(opinions.length<=0){
alert("请先填写申请意见!!!");
return;
};
var isopinions = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isopinions","id="+id+",type=advance");
if("success"!=isopinions){
alert(isopinions);
return;
};
if(confirm('确实要否决吗?')){
var vetoSubmitMessage = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","vetoSubmit","id="+id+",type=advance");
if("success" != vetoSubmitMessage ){
alert(vetoSubmitMessage);
return ;
}
alert("已否决!");
$(parent.document).find("div.tab_close")[0].click();
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,49 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2019-11-02
Content: 示例详情页面
History Log:
*/
String sTempletNo = "WechatBanknumberChange";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("bankinfoid"));
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
{"true","All","Button","否决","否决","returnList()","","","","btn_icon_close"},
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
var id = getItemValue(0,getRow(),"ID");
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isSubmit","id="+id+",type=bank");
if("success" != sReturnInfo ){
alert(sReturnInfo);
return ;
};
var opinions = getItemValue(0,getRow(),"opinions");
if(opinions.length<=0){
alert("请先填写申请意见!!!");
return;
};
var isopinions = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isopinions","id="+id+",type=bank");
if("success"!=isopinions){
alert(isopinions);
return;
};
if(confirm('确实要否决吗?')){
var vetoSubmitMessage = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","vetoSubmit","id="+id+",type=bank");
if("success" != vetoSubmitMessage ){
alert(vetoSubmitMessage);
return ;
};
alert("已否决!");
$(parent.document).find("div.tab_close")[0].click();
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,72 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2019-11-01
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "WechatBasicChange";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("changeId"));
String sButtons[][] = {
{"true","","Button","保存","审批意见","saveRecord('save')","","","","btn_icon_save"},
{"true","","Button","通过","通过","saveRecord('via')","","","","btn_icon_submit"},
{"true","","Button","否决","否决","saveRecord('refuse')","","","","btn_icon_close"}
};
sButtonPosition = "north";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function saveRecord(parameter){
var id = getItemValue(0,getRow(),"ID");
var isprocessed = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isProcessed","basicChangeId="+id);
if("success"!=isprocessed){
alert(isprocessed);
return;
}
if("save"==parameter){
var opinions = allTrim(getItemValue(0,getRow(),"opinions"));
setItemValue(0,0,"opinions",opinions);
as_save(0);
}else if("via"==parameter){
var customerId = getItemValue(0,getRow(),"CUSTOMER_ID");
if(confirm('确实要变更吗?')){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","saveChange","basicChangeId="+id+",customerId="+customerId);
if("true"==sReturnInfo){
alert("变更成功!");
$(parent.document).find("div.tab_close")[0].click();
return;
}
alert("变更失败,请联系管理员!");
}
}else if ("refuse"==parameter){
var opinions = getItemValue(0,getRow(),"opinions");
if(opinions.length<=0){
alert("请先填写申请意见!!!");
return;
}
var isopinions = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","isopinions","id="+id+",type=basic");
if("success"!=isopinions){
alert(isopinions);
return;
}
if(confirm('确实要否決吗?')){
var sReturnInfo = RunJavaMethodTrans("com.tenwa.app.wechat.WechatCustomerInfoChange","refuseChange","basicChangeId="+id);
if("true"==sReturnInfo){
alert("已否决!");
$(parent.document).find("div.tab_close")[0].click();
return;
}
alert("否决失败,请联系管理员!");
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -4804,6 +4804,107 @@
</managerProperties>
</manager>
</class>
<class name="WECHAT_BASIC_CHANGE" label="微信提交客户基本信息变更表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="openid" label="微信标识" type="STRING" length="32"/>
<attribute name="CUSTOMER_ID" label="承租人编号" type="STRING" length="32"/>
<attribute name="name" label="姓名" type="STRING" length="32"/>
<attribute name="certid" label="证件号" type="STRING" length="32"/>
<attribute name="btel" label="修改前手机号" type="STRING" length="20"/>
<attribute name="bWORKADD" label="修改前工作单位地址" type="STRING" length="200"/>
<attribute name="bworkname" label="修改前工作名称" type="STRING" length="200"/>
<attribute name="bFULLADDRESS" label="修改前居住地址" type="STRING" length="200"/>
<attribute name="atel" label="修改后手机号" type="STRING" length="20"/>
<attribute name="aWORKADD" label="修改后工作单位地址" type="STRING" length="200"/>
<attribute name="aworkname" label="修改后工作名称" type="STRING" length="200"/>
<attribute name="aFULLADDRESS" label="修改后居住地址" type="STRING" length="200"/>
<attribute name="applytype" label="申请类型" type="STRING" length="15"/>
<attribute name="opinions" label="审批意见" type="STRING" length="500"/>
<attribute name="status" label="审批状态" type="STRING" length="10"/>
<attribute name="opinionsuserid" label="审批人" type="STRING" length="32"/>
<attribute name="messgeId" 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="wechat_basic_change" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="WECHAT_BANKNUMBER_CHANGE" label="微信提交扣款卡变更表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="openid" label="微信标识" type="STRING" length="32"/>
<attribute name="contract_no" label="合同编号" type="STRING" length="32"/>
<attribute name="name" label="客户姓名" type="STRING" length="32"/>
<attribute name="tel" label="客户电话" type="STRING" length="32"/>
<attribute name="contract_id" label="合同ID" type="STRING" length="32"/>
<attribute name="bbankaccount" label="修改前客户名称" type="STRING" length="50"/>
<attribute name="bbanknumber" label="修改前银行账号" type="STRING" length="20"/>
<attribute name="bbankname" label="修改前银行名称" type="STRING" length="100"/>
<attribute name="bbanktel" label="修改前预留手机号" type="STRING" length="20"/>
<attribute name="abankaccount" label="修改后客户名称" type="STRING" length="50"/>
<attribute name="abanknumber" label="修改后银行账号" type="STRING" length="40"/>
<attribute name="abankname" label="修改后银行名称" type="STRING" length="100"/>
<attribute name="abanktel" label="修改后预留手机号" type="STRING" length="20"/>
<attribute name="applytype" label="申请类型" type="STRING" length="15"/>
<attribute name="opinions" label="审批意见" type="STRING" length="500"/>
<attribute name="STATUS" label="审批状态" type="STRING" length="10"/>
<attribute name="opinionsuserid" label="审批人" type="STRING" length="32"/>
<attribute name="messgeId" label="业务提醒id" type="STRING" length="32"/>
<attribute name="flowStatus" label="合同状态" type="STRING" length="10"/>
<attribute name="flowUnid" 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="wechat_banknumber_change" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="WECHAT_ADVANCE_SETTLE" label="微信提交提前结清表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="openid" label="微信标识" type="STRING" length="32"/>
<attribute name="contract_no" label="合同编号" type="STRING" length="32"/>
<attribute name="NAME" label="客户姓名" type="STRING" length="32"/>
<attribute name="tel" label="客户电话" type="STRING" length="32"/>
<attribute name="advanceDate" label="约定终止日" type="STRING" length="32"/>
<attribute name="applytype" label="申请类型" type="STRING" length="15"/>
<attribute name="opinions" label="审批意见" type="STRING" length="500"/>
<attribute name="STATUS" label="审批状态" type="STRING" length="10"/>
<attribute name="opinionsuserid" label="审批人" type="STRING" length="32"/>
<attribute name="messgeId" label="业务提醒id" type="STRING" length="32"/>
<attribute name="flowStatus" label="合同状态" type="STRING" length="10"/>
<attribute name="flowUnid" 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="wechat_advance_settle" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
<package name="jbo.guaranty">
<class name="GUARANTY_CONTRACT" label="担保合同信息" keyAttributes="SERIALNO">

View File

@ -0,0 +1,46 @@
package com.tenwa.flow;
import jbo.app.WECHAT_ADVANCE_SETTLE;
import jbo.app.WECHAT_BANKNUMBER_CHANGE;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
/*
* 修改微信公众号提交修改信息状态
*/
public class ChangeWechatSubmitFlow extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String flowName = this.getAttribute("FlowName").toString();
String ContractId = this.getAttribute("ContractId").toString();
BizObjectManager lciMange = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME,Sqlca);
BizObject lci = lciMange.createQuery("id=:id").setParameter("id", ContractId).getSingleResult(false);
String contractNo = lci.getAttribute("contract_no").toString();
if("扣款信息变更审核".equals(flowName)){
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME,Sqlca);
BizObject wbc = wbcMange.createQuery("contract_no=:contractNo and STATUS='处理中' " ).setParameter("contractNo", contractNo).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("flowUnid", flowunid);
wbc.setAttributeValue("flowStatus", "已提交");
wbcMange.saveObject(wbc);
}
}else if ("提前结清".equals(flowName)){
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME,Sqlca);
BizObject wbc = wasMange.createQuery("contract_no=:contractNo and STATUS='处理中' " ).setParameter("contractNo", contractNo).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("flowUnid", flowunid);
wbc.setAttributeValue("flowStatus", "已提交");
wasMange.saveObject(wbc);
}
}
return "true";
}
}

View File

@ -0,0 +1,83 @@
package com.tenwa.flow;
import java.text.SimpleDateFormat;
import java.util.Date;
import jbo.app.WECHAT_ADVANCE_SETTLE;
import jbo.app.WECHAT_BANKNUMBER_CHANGE;
import jbo.com.tenwa.entity.comm.message.BT_BUSSINESS_MESSAGE;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.sys.FLOW_OPINION;
import jbo.sys.FLOW_TASK;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
/*
* 修改微信公众号提交修改信息状态
*/
public class ChangeWechatSubmitStatus extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String flowName = this.getAttribute("FlowName").toString();
BizObjectManager ftManage = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME,Sqlca);
BizObjectManager foManager = JBOFactory.getBizObjectManager(FLOW_OPINION.CLASS_NAME,Sqlca);
BizObjectManager bumManager = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME,Sqlca);
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
if("扣款信息变更审核".equals(flowName)){
BizObject ft = ftManage.createQuery(" objectno=:flowunid and phaseno='0010' ").setParameter("flowunid", flowunid).getSingleResult(false);
BizObject fo = foManager.createQuery(" SerialNo=:SerialNo ").setParameter("SerialNo", ft == null ? "" : ft.getAttribute("SerialNo").toString()).getSingleResult(false);
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME,Sqlca);
BizObject wbc = wbcMange.createQuery("flowUnid=:flowUnid " ).setParameter("flowUnid", flowunid).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("STATUS", "通过");
wbc.setAttributeValue("flowStatus", "通过");
wbc.setAttributeValue("opinions", fo == null ? "" : fo.getAttribute("phaseopinion"));
wbcMange.saveObject(wbc);
BizObject bum = bumManager.createQuery(" id=:id").setParameter("id", wbc.getAttribute("messgeId").toString()).getSingleResult(true);
if(bum != null ){
bum.setAttributeValue("message_status", "has_process");
bum.setAttributeValue("is_read", "has_read");
bum.setAttributeValue("finish_time", date);
bum.setAttributeValue("read_time", date);
bumManager.saveObject(bum);
}
}
}else if ("提前结清".equals(flowName)){
BizObject ft = ftManage.createQuery(" objectno=:flowunid and phaseno='0030' ").setParameter("flowunid", flowunid).getSingleResult(false);
BizObject fo = foManager.createQuery(" SerialNo=:SerialNo ").setParameter("SerialNo", ft == null ? "" : ft.getAttribute("SerialNo").toString()).getSingleResult(false);
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME,Sqlca);
BizObject wbc = wasMange.createQuery(" flowUnid=:flowUnid " ).setParameter("contractNo", flowunid).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("STATUS", "通过");
wbc.setAttributeValue("flowStatus", "通过");
wbc.setAttributeValue("opinions", fo == null ? "" : fo.getAttribute("phaseopinion"));
wasMange.saveObject(wbc);
BizObject bum = bumManager.createQuery(" id=:id").setParameter("id", wbc.getAttribute("messgeId").toString()).getSingleResult(true);
if(bum != null ){
bum.setAttributeValue("message_status", "has_process");
bum.setAttributeValue("is_read", "has_read");
bum.setAttributeValue("finish_time", date);
bum.setAttributeValue("read_time", date);
bumManager.saveObject(bum);
}
}
}
return "true";
}
}

View File

@ -0,0 +1,94 @@
package com.tenwa.flow;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import jbo.app.WECHAT_ADVANCE_SETTLE;
import jbo.app.WECHAT_BANKNUMBER_CHANGE;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_HIS;
import jbo.com.tenwa.entity.comm.message.BT_BUSSINESS_MESSAGE;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import jbo.sys.FLOW_OPINION;
import jbo.sys.FLOW_TASK;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
/*
* 修改微信公众号提交修改信息状态
*/
public class ChangeWechatSubmitStatusVeto extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String flowName = this.getAttribute("FlowName").toString();
String ProjectId = this.getAttribute("ProjectId").toString();
BizObjectManager ftManage = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME,Sqlca);
BizObjectManager foManager = JBOFactory.getBizObjectManager(FLOW_OPINION.CLASS_NAME,Sqlca);
BizObjectManager bumManager = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME,Sqlca);
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
if("扣款信息变更审核".equals(flowName)){
BizObject ft = ftManage.createQuery(" objectno=:flowunid and phaseno='0010' ").setParameter("flowunid", flowunid).getSingleResult(false);
BizObject fo = foManager.createQuery(" SerialNo=:SerialNo ").setParameter("SerialNo", ft == null ? "" : ft.getAttribute("SerialNo").toString()).getSingleResult(false);
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME,Sqlca);
BizObject wbc = wbcMange.createQuery("flowUnid=:flowUnid " ).setParameter("flowUnid", flowunid).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("STATUS", "否决");
wbc.setAttributeValue("flowStatus", "否决");
wbc.setAttributeValue("opinions", fo == null ? "" : fo.getAttribute("phaseopinion"));
wbcMange.saveObject(wbc);
BizObject bum = bumManager.createQuery(" id=:id").setParameter("id", wbc.getAttribute("messgeId").toString()).getSingleResult(true);
if(bum != null ){
bum.setAttributeValue("message_status", "has_process");
bum.setAttributeValue("is_read", "has_read");
bum.setAttributeValue("finish_time", date);
bum.setAttributeValue("read_time", date);
bumManager.saveObject(bum);
}
}
Map<String,String>fromCondtion=new HashMap<String, String>();
fromCondtion.put("flowunid", flowunid);
Map<String,String> otherProperty = new HashMap<String, String>();
otherProperty.put("Project_Id", ProjectId);
DataOperatorUtil.copySingleJBO(CUSTOMER_ACCOUNT_HIS.CLASS_NAME, fromCondtion, CUSTOMER_ACCOUNT.CLASS_NAME, otherProperty, null, Sqlca);
}else if ("提前结清".equals(flowName)){
BizObject ft = ftManage.createQuery(" objectno=:flowunid and phaseno='0030' ").setParameter("flowunid", flowunid).getSingleResult(false);
BizObject fo = foManager.createQuery(" SerialNo=:SerialNo ").setParameter("SerialNo", ft == null ? "" : ft.getAttribute("SerialNo").toString()).getSingleResult(false);
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME,Sqlca);
BizObject wbc = wasMange.createQuery(" flowUnid=:flowUnid " ).setParameter("flowUnid", flowunid).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("STATUS", "否决");
wbc.setAttributeValue("flowStatus", "否决");
wbc.setAttributeValue("opinions", fo == null ? "" : fo.getAttribute("phaseopinion"));
wasMange.saveObject(wbc);
BizObject bum = bumManager.createQuery(" id=:id").setParameter("id", wbc.getAttribute("messgeId").toString()).getSingleResult(true);
if(bum != null ){
bum.setAttributeValue("message_status", "has_process");
bum.setAttributeValue("is_read", "has_read");
bum.setAttributeValue("finish_time", date);
bum.setAttributeValue("read_time", date);
bumManager.saveObject(bum);
}
}
}
return "true";
}
}

View File

@ -0,0 +1,260 @@
package com.tenwa.app.wechat;
import java.text.SimpleDateFormat;
import java.util.Date;
import jbo.app.WECHAT_ADVANCE_SETTLE;
import jbo.app.WECHAT_BANKNUMBER_CHANGE;
import jbo.app.WECHAT_BASIC_CHANGE;
import jbo.app.tenwa.customer.CUSTOMER_ADDRESS;
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.com.tenwa.entity.comm.message.BT_BUSSINESS_MESSAGE;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class WechatCustomerInfoChange {
private String basicChangeId;
private String customerId;
private String id;
private String type;
public String getBasicChangeId() {
return basicChangeId;
}
public void setBasicChangeId(String basicChangeId) {
this.basicChangeId = basicChangeId;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String saveChange(JBOTransaction tx) {
try {
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BASIC_CHANGE.CLASS_NAME, tx);
BizObject wbc = wbcMange.createQuery(" id=:id ").setParameter("id", basicChangeId).getSingleResult(true);
wbc.setAttributeValue("status", "通过");
wbcMange.saveObject(wbc);
BizObjectManager cpMange = JBOFactory.getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME, tx);
BizObjectManager caMange = JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS.CLASS_NAME, tx);
BizObject cp = cpMange.createQuery("customerid=:customerid ").setParameter("customerid", customerId).getSingleResult(true);
BizObject ca = caMange.createQuery("customerid=:customerid ").setParameter("customerid", customerId).getSingleResult(true);
cp.setAttributeValue("mobile", wbc.getAttribute("atel").toString());
cp.setAttributeValue("WORKADD", wbc.getAttribute("aWORKADD").toString());
cp.setAttributeValue("WORKCORP", wbc.getAttribute("aworkname").toString());
cpMange.saveObject(cp);
ca.setAttributeValue("FULLADDRESS", wbc.getAttribute("aFULLADDRESS").toString());
caMange.saveObject(ca);
BizObjectManager bbmMange = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME, tx);
BizObject bbm = bbmMange.createQuery(" id=:id ").setParameter("id", wbc.getAttribute("MESSGEID").toString()).getSingleResult(true);
bbm.setAttributeValue("message_status", "has_process");
bbm.setAttributeValue("is_read", "has_read");
bbm.setAttributeValue("finish_time", date);
bbm.setAttributeValue("read_time", date);
bbmMange.saveObject(bbm);
return "true";
} catch (JBOException e) {
e.printStackTrace();
return "false";
}
}
public String refuseChange(JBOTransaction tx) {
try {
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BASIC_CHANGE.CLASS_NAME, tx);
BizObject wbc = wbcMange.createQuery(" id=:id ").setParameter("id", basicChangeId).getSingleResult(true);
wbc.setAttributeValue("status", "拒绝");
wbcMange.saveObject(wbc);
BizObjectManager bbmMange = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME, tx);
BizObject bbm = bbmMange.createQuery(" id=:id ").setParameter("id", wbc.getAttribute("MESSGEID").toString()).getSingleResult(true);
bbm.setAttributeValue("message_status", "has_process");
bbm.setAttributeValue("is_read", "has_read");
bbm.setAttributeValue("finish_time", date);
bbm.setAttributeValue("read_time", date);
bbmMange.saveObject(bbm);
return "true";
} catch (JBOException e) {
e.printStackTrace();
return "false";
}
}
//校验是否已经提交流程
public String isSubmit(JBOTransaction tx){
try {
if("bank".equals(type)){
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME, tx);
BizObject wbc = wbcMange.createQuery(" id=:id and status='处理中' and (flowStatus <> '已提交' or flowStatus is null) ").setParameter("id", id).getSingleResult(false);
if(wbc == null ){
return "该申请在流程中或者已申请不能进行否决!";
}else {
return "success";
}
}else if("advance".equals(type)){
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME, tx);
BizObject was = wasMange.createQuery(" id=:id and status='处理中' and (flowStatus <> '已提交' or flowStatus is null) ").setParameter("id", id).getSingleResult(false);
if(was == null ){
return "该申请在流程中或者已申请不能进行否决!";
}else {
return "success";
}
}
return "未查询到对应的类型,请联系管理员!";
} catch (JBOException e) {
e.printStackTrace();
return "系统异常!";
}
}
//微信提交不需要走流程直接否决
public String vetoSubmit(JBOTransaction tx){
try {
Date date1 = new Date() ; //获取系统时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); //日期格式
String date = sdf.format(date1); //将系统时间转换成上方指定类型
BizObjectManager bbmMange = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME, tx);
if("bank".equals(type)){
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME, tx);
BizObject wbc = wbcMange.createQuery(" id=:id and status='处理中' and (flowStatus <> '已提交' or flowStatus is null) ").setParameter("id", id).getSingleResult(true);
if(wbc == null ){
return "该申请在流程中或者已申请不能进行否决!";
}else {
wbc.setAttributeValue("status", "否决");
wbcMange.saveObject(wbc);
BizObject bbm = bbmMange.createQuery(" id=:id ").setParameter("id", wbc.getAttribute("messgeId").toString()).getSingleResult(true);
if(bbm != null){
bbm.setAttributeValue("message_status", "has_process");
bbm.setAttributeValue("is_read", "has_read");
bbm.setAttributeValue("finish_time", date);
bbm.setAttributeValue("read_time", date);
bbmMange.saveObject(bbm);
}
return "success";
}
}else if("advance".equals(type)){
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME, tx);
BizObject was = wasMange.createQuery(" id=:id and status='处理中' and (flowStatus <> '已提交' or flowStatus is null) ").setParameter("id", id).getSingleResult(true);
if(was == null ){
return "该申请在流程中或者已申请不能进行否决!";
}else {
was.setAttributeValue("status", "否决");
wasMange.saveObject(was);
BizObject bbm = bbmMange.createQuery(" id=:id ").setParameter("id", was.getAttribute("messgeId").toString()).getSingleResult(true);
if(bbm != null){
bbm.setAttributeValue("message_status", "has_process");
bbm.setAttributeValue("is_read", "has_read");
bbm.setAttributeValue("finish_time", date);
bbm.setAttributeValue("read_time", date);
bbmMange.saveObject(bbm);
}
return "success";
}
}
return "未查询到对应的类型,请联系管理员!";
} catch (JBOException e) {
e.printStackTrace();
return "系统异常!";
}
}
//校验数据是否已处理
public String isProcessed(JBOTransaction tx){
try {
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BASIC_CHANGE.CLASS_NAME, tx);
BizObject wbc = wbcMange.createQuery(" id=:id and status='处理中' ").setParameter("id", basicChangeId).getSingleResult(false);
if(wbc == null ){
return "该数据已处理,无法操作!";
}else {
return "success";
}
} catch (JBOException e) {
e.printStackTrace();
return "系统异常!";
}
}
//校验数据是否已处理
public String isopinions(JBOTransaction tx){
try {
String opinions = null;
BizObjectManager wbcMange = null;
if("basic".equals(type)){
wbcMange = JBOFactory.getBizObjectManager(WECHAT_BASIC_CHANGE.CLASS_NAME, tx);
}else if("bank".equals(type)){
wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME, tx);
}else if ("advance".equals(type)){
wbcMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME, tx);
}else{
return "未查询到指定类型,请联系管理员!";
}
BizObject wbc = wbcMange.createQuery(" id=:id ").setParameter("id", id).getSingleResult(false);
opinions = wbc.getAttribute("opinions").toString();
if(opinions != null && opinions.length()>0){
return "success";
}else {
return "请先保存审批意见!";
}
} catch (JBOException e) {
e.printStackTrace();
return "系统异常!";
}
}
}

View File

@ -38,8 +38,8 @@ public class BaseFlowTaskDataService {
public Map<String,String>flowParam=new HashMap<String,String>();
public String sFlowParam="";
public Map<String,FlowStepBean>flowStepBeans=new HashMap<String,FlowStepBean>();
public List<FlowStepBean>callBackBean=new ArrayList<FlowStepBean>();
public List<FlowStepBean>callBackBean=new ArrayList<FlowStepBean>();
public BaseFlowTaskDataService(JBOTransaction tx,String flowUnid,String flowNo,String taskNo,Map<String,String>cParam)throws Exception{
this.flowUnid=flowUnid;
this.baseTx=tx;
@ -51,30 +51,55 @@ public class BaseFlowTaskDataService {
}
//初始化删除节点
public void initDeleteNodes()throws Exception{
}
//初始化归档节点
public void initPhaseNodes()throws Exception{
}
public void executeDeleteScript( String deleteScript ) throws Exception {
BizObject bo = JBOFactory.getBizObjectManager( "jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT", baseTx )
.createQuery( "flow_unid=:flowunid" )
.setParameter( "flowunid", this.flowUnid )
.getSingleResult( false );
ELContext context = new ELContext();
context.setJBOTransaction( baseTx );
for (String key : flowParam.keySet()) {
context.defineVarible("#" + key, flowParam.get(key));
}
context.defineVarible("#ObjectNo", this.flowUnid);
context.defineVarible("#FlowUnid", this.flowUnid);
context.defineBean( "flowBussinessObject", bo );
Any returnData = Expression.getExpressionValue(deleteScript, context);
}
public void exectueFlowDelete()throws Exception{
String deleteSctip=getFlowDeleteScript();
this.exectureGroovyScript(deleteSctip);
String deleteSctips=getFlowDeleteScript();
String [] deleteSctiparr =deleteSctips.split("\\+");
for(int i=0;i<deleteSctiparr.length;i++){
String deleteSctip=deleteSctiparr[i];
if ( !deleteSctip.startsWith( "!" ) ) {
this.exectureGroovyScript(deleteSctip);
} else {
executeDeleteScript( deleteSctip );
}
}
this.executeDeleteSql();
}
public void exectureGroovyScript(String groovyScript) throws Exception{
if(null!=groovyScript && groovyScript.length()>5){
ScriptEngineManager factory = new ScriptEngineManager();
//每次生成一个engine实例
ScriptEngine engine = factory.getEngineByName("groovy");
assert engine != null;
//javax.script.Bindings
Bindings binding = engine.createBindings();
binding.put("TreeView",this);
ScriptEngineManager factory = new ScriptEngineManager();
//每次生成一个engine实例
ScriptEngine engine = factory.getEngineByName("groovy");
assert engine != null;
//javax.script.Bindings
Bindings binding = engine.createBindings();
binding.put("TreeView",this);
binding.put("fixedParam", this.getFlowParam());
//如果script文本来自文件,请首先获取文件内容
engine.eval("def deleteFlowCheckNode(){"+groovyScript+"}",binding);
Object time = (Object)((Invocable)engine).invokeFunction("deleteFlowCheckNode", null);
//如果script文本来自文件,请首先获取文件内容
engine.eval("def deleteFlowCheckNode(){"+groovyScript+"}",binding);
Object time = (Object)((Invocable)engine).invokeFunction("deleteFlowCheckNode", null);
}
}
public void removeDeleteNode(String nodeno)throws Exception{
@ -109,13 +134,13 @@ public class BaseFlowTaskDataService {
this.callBackBean.add(new FlowStepBean("sql",this.sFlowParam,sql));
}
public void addCallBackScript(String script)throws Exception{
this.callBackBean.add(new FlowStepBean("script",this.sFlowParam,script));
this.callBackBean.add(new FlowStepBean("template",this.sFlowParam,script));
}
public void executeDeleteTemplateSQL(String tempNO,Map<String,String>cparam)throws Exception{
BizObjectManager prodNodeInfoManger = JBOFactory.getBizObjectManager(AWE_DO_CATALOG.CLASS_NAME);
BizObject template=prodNodeInfoManger.createQuery("SELECT jboclass,jbowhere FROM O WHERE dono=:dono and jboclass<>'jbo.app.tenwa.doc.LB_DOCRELATIVE' and jboclass<>'jbo.app.tenwa.doc.LB_DOCLIBRARY' ").setParameter("dono",tempNO).getSingleResult(false);
if(template!=null){
this.executeJboDeleteOrUpdateSQL(template.getAttribute("jboclass").getString(), "delete from O where O.FlowUnid=:FlowUnid", cparam);
this.executeJboDeleteOrUpdateSQL(template.getAttribute("jboclass").getString(), "delete from O where O.FlowUnid=:FlowUnid", cparam);
}
}
public void executeJboDeleteOrUpdateSQL(String jboClass,String sql,Map<String,String>cparam)throws Exception{
@ -141,11 +166,36 @@ public class BaseFlowTaskDataService {
}
}
}
public void phaseFlowStepData() throws Exception {
phaseFlowStepData ( null );
}
public void phaseFlowStepData() throws Exception{
String phaseSctip=this.getFlowPhaseScript();
this.exectureGroovyScript(phaseSctip);
this.callBackBean.addAll(this.flowStepBeans.values());
for(String nodes:this.flowStepBeans.keySet()){
String templateData="";
FlowStepBean stepBean=this.flowStepBeans.get(nodes);
Map paramMap=FileOperatorUtil.getJsonObjectToMap(JSONDecoder.decode(stepBean.getParam()));
paramMap.put("TaskNo", this.taskNo);
paramMap.put("NodeNo", nodes);
if(stepBean.getOperatorType().equals("template")){
FlowHitoryUtil tu=new FlowHitoryUtil(stepBean.getOperatorContent(),"",this.baseTx);
templateData=tu.loadJsonData(paramMap,"Y");
BizObjectManager bm=JBOFactory.getBizObjectManager(FLOW_PHASE_HIS.CLASS_NAME);
this.baseTx.join(bm);
BizObject boFPH=bm.newObject();
boFPH.setAttributeValue("flowNo",paramMap.get("FlowNo"));
boFPH.setAttributeValue("nodeNo",nodes);
boFPH.setAttributeValue("foobjecttype",paramMap.get("ObjectType"));
boFPH.setAttributeValue("foobjectno",paramMap.get("ObjectNo"));
boFPH.setAttributeValue("data",templateData);
boFPH.setAttributeValue("taskno", paramMap.get("TaskNo"));
bm.saveObject(boFPH);
}else if(stepBean.getOperatorType().equals("script")){
this.executeFlowScript(stepBean.getOperatorContent(), paramMap);
}
}
}
public void phaseFlowStepData( String phaseNo ) throws Exception{
String phaseSctip = null;
if (phaseNo == null) {
@ -190,7 +240,7 @@ public class BaseFlowTaskDataService {
key=key.replace(":","");
param.add(key);
}
return param;
return param;
}
public String getPageNodesId(Map<String,String>nodes)throws Exception{
@ -223,11 +273,30 @@ public class BaseFlowTaskDataService {
}
return "";
}
/**
* 获得第一步的归档脚本
* @param tx
* @param sObjectNo
* @throws Exception
*/
public String getFlowPhaseScript() throws Exception {
return getFlowPhaseScript( null );
Transaction Sqlca = null;
BizObject taskObject=JBOFactory.getFactory().getManager(FLOW_TASK.CLASS_NAME).createQuery("SELECT phaseno FROM o WHERE o.serialno =:taskno").setParameter("taskno", this.taskNo).getSingleResult(false);
BizObjectManager bm1 = null;
BizObjectQuery bq1 = null;
bm1 = JBOFactory.getFactory().getManager(FLOW_MODEL.CLASS_NAME);
bq1 = bm1.createQuery("SELECT o.PHASESCRIPT FROM O where O.phaseno=:phaseno and O.flowno=:flowno").setParameter("flowno",this.flowNo)
.setParameter("phaseno", taskObject.getAttribute("phaseno").getString());
BizObject stepConfig = bq1.getSingleResult(true);
if(stepConfig.getAttribute("PHASESCRIPT")==null){return "";}
String strScript = stepConfig.getAttribute("PHASESCRIPT").getString();
if (null != strScript && strScript.length() > 5) {
return strScript;
}
return "";
}
/**
* 获得第一步的归档脚本
* @param tx
@ -260,20 +329,18 @@ public class BaseFlowTaskDataService {
}
}
}
/**
* 执行行前沿检查
*
*
* @param tx
* @param sObjectNo
* @throws Exception
*/
public void executeFlowScript(String script,Map<String,String>cparam) throws Exception {
Map<String, String> scriptMap = new HashMap<String, String>();
if (null != script && script.length() > 5) {
if (null != script && script.length() > 5) {
ELContext context = new ELContext();
context.setJBOTransaction(this.baseTx);
for (String key : cparam.keySet()) {
@ -283,8 +350,8 @@ public class BaseFlowTaskDataService {
Any returnData = Expression.getExpressionValue(script, context);
}
}
public String getFlowUnid() {
return flowUnid;
}
@ -303,7 +370,7 @@ public class BaseFlowTaskDataService {
public void setBaseTx(JBOTransaction baseTx) {
this.baseTx = baseTx;
}
public Map<String, String> getFlowParam() {
return flowParam;
}
@ -322,5 +389,5 @@ public class BaseFlowTaskDataService {
public void setFlowStepBeans(Map<String, FlowStepBean> flowStepBeans) {
this.flowStepBeans = flowStepBeans;
}
}

View File

@ -1,29 +1,16 @@
package com.tenwa.lease.flow.project.commbusiness;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_HIS;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_TEMP;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
import com.tenwa.lease.flow.project.businessapply.CustomerCompare;
public class LBCustomerAccountFormalToChangeBusiness extends BaseBussiness{
@Override
@ -36,7 +23,7 @@ public class LBCustomerAccountFormalToChangeBusiness extends BaseBussiness{
other.put("flowunid",flowunid);
fromCondtion.put(CUSTOMER_ACCOUNT.contract_id, ContractId);
DataOperatorUtil.copySingleJBO(CUSTOMER_ACCOUNT.CLASS_NAME, fromCondtion, CUSTOMER_ACCOUNT_TEMP.CLASS_NAME, null, other, Sqlca);
String sMessage="true";
return sMessage;
DataOperatorUtil.copySingleJBO(CUSTOMER_ACCOUNT.CLASS_NAME, fromCondtion, CUSTOMER_ACCOUNT_HIS.CLASS_NAME, null, other, Sqlca);
return "true";
}
}

View File

@ -0,0 +1,65 @@
package com.tenwa.lease.flow.project.commbusiness;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.WECHAT_ADVANCE_SETTLE;
import jbo.app.WECHAT_BANKNUMBER_CHANGE;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_HIS;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT;
import jbo.com.tenwa.lease.comm.LB_EQUIPMENT_TEMP;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
import com.tenwa.lease.flow.project.businessapply.CustomerCompare;
public class LBCustomerAccountHisToFormal extends BaseBussiness{
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String flowName = this.getAttribute("FlowName").toString();
String ContractId = this.getAttribute("ContractId").toString();
Map<String,String> fromCondtion = new HashMap<String, String>();
Map<String,String> other = new HashMap<String, String>();
if("扣款信息变更审核".equals(flowName)){
fromCondtion.put("flowunid",flowunid);
other.put(CUSTOMER_ACCOUNT.contract_id, ContractId);
DataOperatorUtil.copySingleJBO(CUSTOMER_ACCOUNT_HIS.CLASS_NAME, fromCondtion, CUSTOMER_ACCOUNT.CLASS_NAME, other, null, Sqlca);
BizObjectManager wbcMange = JBOFactory.getBizObjectManager(WECHAT_BANKNUMBER_CHANGE.CLASS_NAME,Sqlca);
BizObject wbc = wbcMange.createQuery("flowUnid=:flowUnid " ).setParameter("flowUnid", flowunid).getSingleResult(true);
if(wbc != null){
wbc.setAttributeValue("flowStatus", "流程取消");
wbc.setAttributeValue("flowUnid", "");
wbcMange.saveObject(wbc);
}
}else if ("提前结清".equals(flowName)){
BizObjectManager wasMange = JBOFactory.getBizObjectManager(WECHAT_ADVANCE_SETTLE.CLASS_NAME,Sqlca);
BizObject aws = wasMange.createQuery(" flowUnid=:flowUnid " ).setParameter("flowUnid", flowunid).getSingleResult(true);
if(aws != null){
aws.setAttributeValue("flowStatus", "流程取消");
aws.setAttributeValue("flowUnid", "");
wasMange.saveObject(aws);
}
}
return "true";
}
}