diff --git a/WebContent/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageList.jsp b/WebContent/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageList.jsp index 00dcbe4fc..d0ff6ade1 100644 --- a/WebContent/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageList.jsp +++ b/WebContent/Tenwa/Core/BussinessMessage/MessageInfo/BaseMessageList.jsp @@ -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 ) { diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp new file mode 100644 index 000000000..663f4ba37 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp @@ -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"%> +<% + /* + 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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/Change.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/Change.jsp index 2f58613bf..12776d142 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/Change.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/Change.jsp @@ -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"%> - +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/IncludeBegin.jsp"%><% + /* + Author: undefined 2018-07-30 + Content: + History Log: + */ +%><%@include file="/Resources/CodeParts/Frame02.jsp"%> + <%@ include file="/IncludeEnd.jsp"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp index f92cb882d..f7c7705e8 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfoForm.jsp @@ -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"%> - +<%@ 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"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp index 7258d15f4..860fa5899 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerInfo.jsp @@ -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); } } diff --git a/WebContent/Tenwa/wechat/WechatAdvanceSettleInfo.jsp b/WebContent/Tenwa/wechat/WechatAdvanceSettleInfo.jsp new file mode 100644 index 000000000..e54ba681d --- /dev/null +++ b/WebContent/Tenwa/wechat/WechatAdvanceSettleInfo.jsp @@ -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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/wechat/WechatBanknumberChangeInfo.jsp b/WebContent/Tenwa/wechat/WechatBanknumberChangeInfo.jsp new file mode 100644 index 000000000..5f9db5f17 --- /dev/null +++ b/WebContent/Tenwa/wechat/WechatBanknumberChangeInfo.jsp @@ -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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/wechat/WechatBasicChange.jsp b/WebContent/Tenwa/wechat/WechatBasicChange.jsp new file mode 100644 index 000000000..9742c4f8d --- /dev/null +++ b/WebContent/Tenwa/wechat/WechatBasicChange.jsp @@ -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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/etc/jbo/jbo_app.xml b/WebContent/WEB-INF/etc/jbo/jbo_app.xml index 2f1d5a6b5..dd7f679c8 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_app.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_app.xml @@ -4804,6 +4804,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/calc/com/tenwa/flow/ChangeWechatSubmitFlow.java b/calc/com/tenwa/flow/ChangeWechatSubmitFlow.java new file mode 100644 index 000000000..d0af1b4a5 --- /dev/null +++ b/calc/com/tenwa/flow/ChangeWechatSubmitFlow.java @@ -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"; + } +} diff --git a/calc/com/tenwa/flow/ChangeWechatSubmitStatus.java b/calc/com/tenwa/flow/ChangeWechatSubmitStatus.java new file mode 100644 index 000000000..e653ba8a3 --- /dev/null +++ b/calc/com/tenwa/flow/ChangeWechatSubmitStatus.java @@ -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"; + } +} diff --git a/calc/com/tenwa/flow/ChangeWechatSubmitStatusVeto.java b/calc/com/tenwa/flow/ChangeWechatSubmitStatusVeto.java new file mode 100644 index 000000000..f43e3a736 --- /dev/null +++ b/calc/com/tenwa/flow/ChangeWechatSubmitStatusVeto.java @@ -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); + } + } + + MapfromCondtion=new HashMap(); + fromCondtion.put("flowunid", flowunid); + Map otherProperty = new HashMap(); + 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"; + } +} diff --git a/src/com/tenwa/app/wechat/WechatCustomerInfoChange.java b/src/com/tenwa/app/wechat/WechatCustomerInfoChange.java new file mode 100644 index 000000000..a875f7275 --- /dev/null +++ b/src/com/tenwa/app/wechat/WechatCustomerInfoChange.java @@ -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 "系统异常!"; + } + } +} diff --git a/src_core/com/tenwa/flow/task/BaseFlowTaskDataService.java b/src_core/com/tenwa/flow/task/BaseFlowTaskDataService.java index 8846a3abf..48982383f 100644 --- a/src_core/com/tenwa/flow/task/BaseFlowTaskDataService.java +++ b/src_core/com/tenwa/flow/task/BaseFlowTaskDataService.java @@ -38,8 +38,8 @@ public class BaseFlowTaskDataService { public MapflowParam=new HashMap(); public String sFlowParam=""; public MapflowStepBeans=new HashMap(); - public ListcallBackBean=new ArrayList(); - + public ListcallBackBean=new ArrayList(); + public BaseFlowTaskDataService(JBOTransaction tx,String flowUnid,String flowNo,String taskNo,MapcParam)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;i5){ - 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,Mapcparam)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,Mapcparam)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(Mapnodes)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,Mapcparam) throws Exception { Map scriptMap = new HashMap(); - - 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 getFlowParam() { return flowParam; } @@ -322,5 +389,5 @@ public class BaseFlowTaskDataService { public void setFlowStepBeans(Map flowStepBeans) { this.flowStepBeans = flowStepBeans; } - + } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountFormalToChangeBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountFormalToChangeBusiness.java index e4932ccee..0bf805360 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountFormalToChangeBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountFormalToChangeBusiness.java @@ -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"; } } diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountHisToFormal.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountHisToFormal.java new file mode 100644 index 000000000..5a5333670 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerAccountHisToFormal.java @@ -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 fromCondtion = new HashMap(); + Map other = new HashMap(); + 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"; + } +}