增加实际付款汽车

This commit is contained in:
luojian 2018-07-23 15:47:57 +08:00
parent d3a126dffe
commit 2aec762ac7
17 changed files with 1222 additions and 6 deletions

View File

@ -34,8 +34,12 @@ var AsDebug = {
d.showModal();
},
alert:function(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag) {
this.showMessage(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag);
},
showMessage:function(title,message,width,height,mask,time,okButton,openCallback,closeCallback,flag){
var d;
if(typeof(mask) == "undefined") mask = true;
if(!okButton){
d = top.dialog({
id: 'dialog-message',

View File

@ -50,7 +50,7 @@
<script type="text/javascript">
//组织机构验证码的的校验
function Checkfield(){
var businessLicenseNo = getItemValue(0,getRow(0),"BUSINESS_LICENSE_NO");
var businessLicenseNo = getItemValue(0,getRow(0),"BUSINESS_LICENSE_NO");
// if(businessLicenseNo==""){
// alert("组织机构代码不能为空!");
// return;
@ -59,7 +59,7 @@
return true;
}else{
//setErrorTips("BUSINESS_LICENSE_NO","组织机构代码格式不正确!");
alert("组织机构代码格式不正确!");
AsDebug.alert("提示","组织机构代码格式不正确!");
return false;
}
}
@ -68,7 +68,7 @@
var DISTRIBUTOR_CODING = getItemValue(0,0,'DISTRIBUTOR_CODING');
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","distributor_basic","DISTRIBUTOR_CODING="+DISTRIBUTOR_CODING);
if("false" ==sReturnInfo){
alert("经销商编码已存在,请重新输入!!!");
AsDebug.alert("提示","经销商编码已存在,请重新输入!!!");
return false;
}else{
return true;

View File

@ -0,0 +1,33 @@
<%@page import="com.tenwa.util.SerialNumberUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListStart.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newApply(){
var result = AsControl.RunJsp("/Tenwa/Lease/Flow/Fund/ActualPayment/CheckApplyPassContract.jsp","");
if("false" == result){
AsDebug.showMessage("提示","没有需要放款的合同","","",true);
return;
}
var projectName = '<%=CurUser.getUserName()+"在"+new SimpleDateFormat("yyyy年MM月dd日").format(new java.util.Date())+"发起实际付款"%>';
var sParams = "applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
var serialNumber = AsControl.RunJsp("/Tenwa/Lease/Flow/Fund/ActualPayment/GetActualPayNumber.jsp","");
sParams =sParams+",ProjectName="+projectName+",FlowKey="+serialNumber;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");
if(sReturnInfos[0]=="success")
{
var objectNo=sReturnInfos[1];
FlowFunction.openStartFlowPage(objectNo);
}
else
{
var mes=sReturnInfos[1];
alert(mes);
}
reloadSelf();
}
</script>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListEnd.jspf"%>

View File

@ -0,0 +1,350 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-06-06
Content:
History Log:
*/
String sFileSaveMode = CurConfig.getConfigure("FileSaveMode");
String sFileSavePath = CurConfig.getConfigure("FileSavePath");
String sFileNameType = CurConfig.getConfigure("FileNameType");
String phaseNo = CurPage.getParameter("PhaseNo");
String rightType = CurComp.getParameter("RightType");
String flowunid = CurPage.getParameter("FlowUnid");
String ishistory = CurPage.getParameter("IsHistory");
String contract_id = CurPage.getParameter("contract_id");
String projectId = CurPage.getParameter("ProjectId");
ASObjectModel doTemp = new ASObjectModel("ActualPaymentCarTempList");
/* if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataListHistory");
} */
String customertype = null;
String customer_id = null;
String project_id = null;
String product_id = null;
String contract_number = null;
ASResultSet rs = Sqlca.getASResultSet(new SqlObject("select customertype,contract_number,customer_id,LC_FUND_INCOME_TEMP.project_id,Product_Id from LC_FUND_INCOME_TEMP left join LB_CONTRACT_INFO lpi on lpi.PROJECT_ID=LC_FUND_INCOME_TEMP.PROJECT_ID left join LB_UNION_LESSEE ul on LC_FUND_INCOME_TEMP.contract_id=ul.contract_id and ul.is_main='Y' left join CUSTOMER_INFO cu on ul.customer_id=cu.customerid where LC_FUND_INCOME_TEMP.contract_id = "+contract_id));
if(rs.next()){
customertype = rs.getString("customertype");
customer_id = rs.getString("customer_id");
project_id = rs.getString("project_id");
product_id = rs.getString("Product_Id");
contract_number = rs.getString("contract_number");
}else{
customertype = "gaoxiao";
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.MultiSelect = true;
dwTemp.ReadOnly = "0";
dwTemp.ShowSummary = "1";
/* if("0030".equals(phaseNo)){
rightType = "ReadOnly";
dwTemp.ReadOnly = "1";
} */
if("ReadOnly".equals(rightType)){
dwTemp.MultiSelect = false;
}
dwTemp.setPageSize(pageSize == null?10:Integer.parseInt(pageSize));
ASDataObject ado = dwTemp.getDataObject();
ado.setLockCount(2);
ado.setReadOnly("PAYMENT_NUMBER", true);
ado.setReadOnly("PROJECT_NAME", true);
ado.setReadOnly("PLAN_ID", true);
ado.setReadOnly("FEE_TYPE", true);
ado.setReadOnly("SETTLE_METHOD", true);
ado.setReadOnly("PLAN_DATE", true);
ado.setReadOnly("ACCOUNT", true);
ado.setReadOnly("ACC_NUMBER", true);
if("0010".equals(phaseNo)){
ado.setReadOnly("FACT_DATE", true);
ado.setReadOnly("BANK", true);
}
if("0020".equals(phaseNo)||"0030".equals(phaseNo)){
ado.setReadOnly("BANK", true);
ado.setRequired("BANK", false);
}
ado.setHtmlEvent("FACT_MONEY", "onchange", "checkEquipAmtMoney");
ado.setHtmlEvent("FEE_ADJUST", "onchange", "checkEquipAmtMoney");
ado.setHtmlEvent("MEMO", "onmouseover", "showMemo");
ado.setHtmlEvent("MEMO", "onmouseout", "hideMemo");
ado.setHtmlEvent("MEMO", "onkeyup", "synchMemo");
dwTemp.genHTMLObjectWindow(flowunid);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String[][] sButtons = null;
if("ReadOnly".equals(rightType)){
sButtons = new String[][]{
};
}else if("0050".equals(phaseNo)){
sButtons = new String[][]{
{"true","","Button","删除","删除","doDelete()","","","","btn_icon_delete",""}
};
}else if("0010".equals(phaseNo)){
sButtons = new String[][]{
/* {"true","","Button","保存","保存","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""},
{"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""}, */
{"true","","Button","删除","删除","doDelete()","","","","btn_icon_delete",""}, };
}else if("0020".equals(phaseNo)||"0030".equals(phaseNo)){
sButtons = new String[][]{
{"true","","Button","保存","保存","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""} ,
{"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""}
};
}else{
sButtons = new String[][]{
{"true","","Button","保存","保存","as_save(0,'setColRequired()')","","","","btn_icon_saveNew",""},
{"true","","Button","批量修改","批量修改","batchModify()","","","","btn_icon_detail",""},
{"true","","Button","导出付款明细","导出付款明细","createFundIncomeExcel()","","","","btn_icon_up",""},
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
$(function(){
setColRequired();
})
function afterSearch(){
var rows = getRowCount(0);
for(var i=0;i<rows;i++){
var CONTRACT_ID = getItemValue(0,i,"CONTRACT_ID");
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","getContactId","CONTRACT_ID="+CONTRACT_ID);
var sPars= new Array();
var ps = i;
sPars=result.split("@"); //字符分割
sRun = "<a style='color:blue;font-size:15px;font-family:宋体;' onclick='opeTrigger("+ps+")'>" +sPars[1]+ "</a>";
getObj(0,i,"CONTRACT_ID").innerHTML = sRun;
}
}
function createFundIncomeExcel(){
var rows = getCheckedRows(0);
if(rows.length == 0){
AsDebug.showMessage("提示","请选择一行数据!","","",true);
return;
}
var id="";
var ids=getItemValueArray(0,'ID');
var ebankStatus=getItemValueArray(0,'Ebank_Status');
var rows = getSelRows(0);
var flag=false;
var nu="";
for(var i=0;i<ids.length;i++){
id+="△'"+ids[i]+"'";
if(eval(ebankStatus[i])>1){
flag=true;
nu+=","+eval(rows[i]+1);
}
}
if(flag){
nu="第"+nu.substring(1)+"行,已导出了,请选其中付款明细导出";
AsDebug.showMessage("提示:",nu,"","", true);
return;
}
var param={};
var tempParam={};
var sparam="";
param["templateNo"]="d7f8a7e3972940069b96018488f193d3";//选择的模板ID
tempParam["OBJECTTYPE"]="ActualPaymentCarApply";
tempParam["FLOW_UNID"]=new Date().Format("yyyyMMddhhmmssSS");
tempParam["CurUserId"]="<%=CurUser.getUserID()%>"
tempParam["fileSaveMode"]="<%=sFileSaveMode%>";
tempParam["fileSavePath"]="<%=sFileSavePath%>";
tempParam["fileNameType"]="<%=sFileNameType%>";
tempParam["ids"]=id.substring(1);
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
if(result!="success"){
alert("生成文件失败!");
return;
}else{
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
if(attributeID!=""){
RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createFundIncomeExcel","ids="+tempParam["ids"]);
downloadFile(attributeID);
reloadSelf();
}
}
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body"); reloadSelf();
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=CurPage.getParameter("CompClientID")%>&sqlString=save@"+id, "downloadTemplate");
}
function opeTrigger(ps){
var sUrl = "/Tenwa/Lease/Flow/Comm/LBContractTemplate/LBContractPrintList.jsp";
var sPara = getItemValue(0,ps,"CONTRACT_ID");
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","getContactId","CONTRACT_ID="+sPara);
var sPars= new Array();
sPars=result.split("@"); //字符分割
var customertype = sPars[0];
var contractNumber = sPars[1];
var customer_id = sPars[1];
var product_id = sPars[4];
var project_id = getItemValue(0,ps,"PROJECT_ID");
var sparm='&ContractId='+sPara+"&ProjectId="+project_id+"&CustomerType="+customertype+"&CustomerId="+customer_id+"&ProductId="+product_id;//+"&ShowType=flow_contract_sum&RightType=ReadOnly&IsHistory=false"
AsControl.OpenTab(sUrl,"contract_id="+sPara+sparm,{title:'合同基本信息【'+ contractNumber +'】'});
}
function doDelete(){
var rows = getCheckedRows(0);
if(rows.length == 0){
AsDebug.showMessage("提示","请选择一行数据!","","",true);
return;
}
var contractIds = "";
for(var i in rows){
contractIds += "@"+getItemValue(0,i,"ID");
}
contractIds = contractIds.substring(1);
if("0050" == <%=phaseNo%>){
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","updateFundIncomeStatus","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,status=cancel");
if("SUCCESS" == result){
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
}
}else{
contractIds = "";
for(var i in rows){
contractIds += "@"+getItemValue(0,i,"CONTRACT_ID");
}
contractIds = contractIds.substring(1);
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","delTemp","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,status=cancel");
if("SUCCESS" == result){
as_delete(0);
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
}
}
}
function setColRequired(){
if("<%=rightType%>" != "ReadOnly"){
for(var i=0;i<DZ[0][2].length;i++){
if("settlemethod11" == getItemValue(0,i,"SETTLE_METHOD")){
var tablename = "myiframe0";
setItemNoRequired(0,i,"FACT_OBJECT_NAME");
setItemNoRequired(0,i,"CLIENT_BANK");
setItemNoRequired(0,i,"CLIENT_ACCOUNT");
setItemNoRequired(0,i,"CLIENT_ACCNUMBER");
setItemNoRequired(0,i,"BANK");
setItemNoRequired(0,i,"ACCOUNT");
setItemNoRequired(0,i,"ACC_NUMBER");
}
}
}
}
function batchModify(){
var rows = getCheckedRows(0);
var phaseNo="<%=phaseNo%>";
if(rows.length == 0){
alert("请选择需要批量修改的数据!");
return;
}
if("0040"==phaseNo){
for(var y=0;y<rows.length;y++){
var ebankStatus=getItemValue(0,rows[y],"EBANK_STATUS");
if("01"==ebankStatus){
AsDebug.showMessage("提示","未导出的数据不允许修改!");
return;
}
}
}
AsDialog.PopView("/Tenwa/Lease/Flow/Fund/ActualPayment/ActualPaymentBatchModify.jsp","phaseNo="+phaseNo,"dialogWidth=800px;dialogHeight=350px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(data){
if(data.length==0){
return;
}
for(var i=0;i<rows.length;i++){
for (var key in data){
if(typeof(data[key])=="undefined"||""==data[key]){
continue;
}
setItemValue(0,rows[i],key,data[key]);
}
}
as_save(0,'setColRequired()');
},"批量修改");
}
function checkEquipAmtMoney(){
var colName = getInputInfo(this.id).colname.toUpperCase();
var position = getInputInfo(this.id).rowindex;
var oldValue = DZ[0][2][position][getColIndex(0,colName)];
var adjustMoney = eval(getItemValue(0,position,"FACT_MONEY") + "+" +getItemValue(0,position,"FEE_ADJUST"));
var paymoney = AsControl.RunJsp("/Tenwa/Lease/Flow/Fund/ActualPayment/GetApplyPassOverMoney.jsp","FlowUnid=<%=flowunid%>&PlanID="+getItemValue(0,position,"PLAN_ID"));
var money = eval(removeFomatedNumber(this.value));
if(colName == "FACT_MONEY" && money < 0){
if(oldValue == ".00"){
oldValue = "0.00";
}
this.value = oldValue;
alert("付款金额不能小于0");
return;
}
if(adjustMoney > paymoney){
if(oldValue == ".00"){
oldValue = "0.00";
}
this.value = oldValue;
alert("本次付款金额不能大于申请金额!");
return;
}
}
function SelectCustomerAccount(){
var position = getRow(0);
var customerID = getItemValue(0,position,"FACT_OBJECT");
if(!customerID){
alert("请先选择付款对象!");
return;
}
AsDialog.OpenSelector("SelectCustomerAccount","customerID,"+customerID,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,position,"CLIENT_BANK", sReturn[0]);
setItemValue(0,position,"CLIENT_ACCOUNT", sReturn[1]);
setItemValue(0,position,"CLIENT_ACCNUMBER", sReturn[2]);
},"请选择付款对象");
}
function SelectCustomer(){
var position = getRow(0);
AsDialog.OpenSelector("SelectCustomer","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,position,"FACT_OBJECT", sReturn[0]);
setItemValue(0,position,"FACT_OBJECT_NAME", sReturn[1]);
},"请选择付款对象");
}
function selectOwnAccount(){
var position = getRow(0);
AsDialog.OpenSelector("SelectOwnAccount","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
return;
}
sReturn = sReturn.split("@");
setItemValue(0,position,"ACC_NUMBER", sReturn[0]);
setItemValue(0,position,"BANK", sReturn[1]);
setItemValue(0,position,"ACCOUNT", sReturn[2]);
},"请选择本方账户信息");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,13 @@
<%@page import="jbo.app.tenwa.calc.LC_FUND_INCOME"%>
<%@page import="jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP"%>
<%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%>
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="java.math.BigDecimal"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
//String result = Sqlca.getString(new SqlObject("select case when count(1)>0 then 'true' else 'false' end from lc_fund_income O left join(select contract_id,sum(nvl(overmoney,0)) overmoney from vi_lc_fund_plan where fee_type in ('feetype1','feetype2','feetype27') group by contract_id) vlfp on vlfp.contract_id=O.contract_id where O.pay_status='apply_pass' and vlfp.overmoney = 0 and not exists (select 1 from lc_fund_income_temp where O.plan_id=plan_id and is_flowing='0')"));
String result = Sqlca.getString(new SqlObject("select case when count(1)>0 then 'true' else 'false' end from vi_actual_fund_plan"));
out.println(result);
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -0,0 +1,6 @@
<%@page import="com.tenwa.util.SerialNumberUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String serialNumber = SerialNumberUtil.getActualPayNumber(Sqlca);
out.println(serialNumber);
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -0,0 +1,22 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-12-28
Content: ʾÀýÏêÇéÒ³Ãæ
History Log:
*/
String flowunid = CurPage.getParameter("FlowUnid");
String sTempletNo = "LBActualPaymentInfoTemp";//--Ä£°åºÅ--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "1";//Ö»¶Áģʽ
dwTemp.genHTMLObjectWindow(flowunid);
String sButtons[][] = {
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,57 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-12-28
Content:
History Log:
*/
String flowunid = CurPage.getAttribute("FlowUnid");
String phaseNo = CurPage.getAttribute("PhaseNo");
String ishistory = CurPage.getAttribute("IsHistory");
ASObjectModel doTemp = new ASObjectModel("VIActualFundPlan");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
if(!ishistory.equals("true")&&"0010".equals(phaseNo)){
dwTemp.MultiSelect = true; //多选
}
dwTemp.ShowSummary="1"; //汇总
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(pageSize == null ? 30 : Integer.parseInt(pageSize));
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String[][] sButtons = null;
if(null!=ishistory&&ishistory.equals("true")){
sButtons = new String[][]{};
}else if("0010".equals(phaseNo)){
sButtons = new String[][]{
{"true","All","Button","生成本次付款明细","生成本次付款明细","createIncome()","","","","btn_icon_add",""}
};
}else{
sButtons = new String[][]{
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function createIncome(){
var rows = getCheckedRows(0);
if(rows.length == 0){
AsDebug.showMessage("提示","请选择一行数据","","",true);
return;
}
var contractIds = "";
for(var i in rows){
contractIds += "@"+getItemValue(0,rows[i],"ID");
}
contractIds = contractIds.substring(1);
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","createActualPayment","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>");
if("SUCCESS" == result){
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -1383,6 +1383,7 @@
<attribute name="BANK_ID" label="支付账户ID" type="STRING" length="32"/>
<attribute name="CMB_PAY_NO" label="支付流水号" type="STRING" length="32"/>
<attribute name="CMB_PAY_LOG" label="支付日志" type="STRING" length="32"/>
<attribute name="EBANK_STATUS" label="回盘状态" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -1446,6 +1447,7 @@
<attribute name="BANK_ID" label="支付账户ID" type="STRING" length="32"/>
<attribute name="CMB_PAY_NO" label="支付流水号" type="STRING" length="32"/>
<attribute name="CMB_PAY_LOG" label="支付日志" type="STRING" length="32"/>
<attribute name="EBANK_STATUS" label="回盘状态" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -3008,6 +3010,78 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</class>
<class name="LB_ACTUAL_PAYMENT_INFO" label="实际放款信息" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="CONTRACT_COUNT" label="CONTRACT_COUNT" type="INT" length="0"/>
<attribute name="TOTAL_MONEY" label="TOTAL_MONEY" type="DOUBLE" length="22" scale="2"/>
<attribute name="APPLY_DATE" label="APPLY_DATE" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="INPUTUSERID" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="INPUTORGID" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="INPUTTIME" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="UPDATEUSERID" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="UPDATEORGID" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="UPDATETIME" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_ACTUAL_PAYMENT_INFO" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_ACTUAL_PAYMENT_INFO_TEMP" label="实际放款信息临时表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="CONTRACT_COUNT" label="CONTRACT_COUNT" type="INT" length="0"/>
<attribute name="TOTAL_MONEY" label="TOTAL_MONEY" type="DOUBLE" length="22" scale="2"/>
<attribute name="APPLY_DATE" label="APPLY_DATE" type="STRING" length="32"/>
<attribute name="INPUTUSERID" label="INPUTUSERID" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="INPUTORGID" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="INPUTTIME" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="UPDATEUSERID" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="UPDATEORGID" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="UPDATETIME" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="FLOWUNID" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LB_ACTUAL_PAYMENT_INFO_TEMP" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="VI_ACTUAL_FUND_PLAN" label="实际付款计划视图" keyAttributes="">
<attributes>
<attribute name="id" label="标识" type="STRING"/>
<attribute name="contract_number" label="业务合同号" type="STRING"/>
<attribute name="product_id" label="产品编号" type="STRING"/>
<attribute name="customer_name" label="客户名称" type="STRING"/>
<attribute name="plan_id" label="计划编号" type="STRING"/>
<attribute name="payment_number" label="投放编号" type="STRING"/>
<attribute name="objectname" label="付款对象" type="STRING"/>
<attribute name="settle_method" label="结算方式" type="STRING"/>
<attribute name="fact_money" label="付款金额" type="STRING"/>
<attribute name="fact_date" label="付款日期" type="STRING"/>
<attribute name="username" label="申请人" type="STRING"/>
<attribute name="orgname" label="申请部门" type="STRING"/>
<attribute name="project_id" label="项目编号" type="STRING"/>
<attribute name="channel_name" label="渠道" type="STRING"/>
<attribute name="FACT_OBJECT" label="支付对象" type="STRING"/>
<attribute name="CLIENT_BANK" label="对方银行" type="STRING"/>
<attribute name="CLIENT_ACCOUNT" label="对方帐户" type="STRING"/>
<attribute name="CLIENT_ACCNUMBER" label="对方帐号" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="VI_ACTUAL_FUND_PLAN" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -104,6 +104,7 @@
<attribute name="VERSIONID" label="版本号" type="STRING" length="64"/>
<attribute name="BUSINESSTYPE" label="业务类型" type="STRING" length="64"/>
<attribute name="distributor_id" label="distributor_id" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>
@ -225,6 +226,7 @@
<attribute name="VERSIONID" label="版本号" type="STRING" length="64"/>
<attribute name="BUSINESSTYPE" label="业务类型" type="STRING" length="64"/>
<attribute name="distributor_id" label="distributor_id" type="STRING" length="32"/>
<attribute name="CONTRACT_NUMBER" label="合同编号" type="STRING" length="100"/>
</attributes>
<manager>
<managerProperties>

View File

@ -2,12 +2,18 @@ package com.tenwa.reckon.executor;
import java.io.InputStream;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import jbo.app.tenwa.calc.LC_CALC_CONDITION;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP;
@ -31,6 +37,7 @@ import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.json.JSONEncoder;
import com.amarsoft.are.util.json.JSONObject;
import com.amarsoft.awe.util.SqlObject;
import com.tenwa.comm.exception.BusinessException;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.officetempalte.util.ExcelVersionEnum;
@ -69,7 +76,17 @@ public class CreateTransactionExecutor implements Transaction {
private String plannumber;
private String productId;
private String planCName;
/**
private String startDate;
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
/**
* Õý³£²âËã
*/
@Override
@ -164,6 +181,109 @@ public class CreateTransactionExecutor implements Transaction {
}
}
/**
* 车贷起租测算
* @param Sqlca
* @return
* @throws Exception
*/
public String carRunOnhire(com.amarsoft.awe.util.Transaction Sqlca) throws Exception {
BizObjectManager Bm=JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME, Sqlca);
BizObject boLCC = Bm.createQuery("contract_id='" + contractId + "'").getSingleResult(true);
//获取期次
if(boLCC!=null){
int incomeNumber = boLCC.getAttribute("INCOME_NUMBER").getInt();
String periodType = boLCC.getAttribute("PERIOD_TYPE").getString();
String incomeIntervalMonth = boLCC.getAttribute("INCOME_INTERVAL_MONTH").getInt() + "";
List<String> planDateList = getPlanDateList(incomeNumber, periodType, incomeIntervalMonth, startDate);
Sqlca.executeSQL(new SqlObject("insert into lc_rent_plan select * from lc_pay_rent_plan where payment_number = '" + this.plannumber + "'"));
Connection conn = Sqlca.getConnection(Sqlca);
PreparedStatement ps = conn.prepareStatement("update lc_rent_plan set plan_date = ? where payment_number = '" + this.plannumber + "' and plan_list = ?");
for(int i = 0; i < planDateList.size(); i ++) {
ps.setString(1, planDateList.get(i));
ps.setString(2, (i + 1) + "");
ps.addBatch();
}
ps.executeBatch();
boLCC.setAttributeValue("start_date", startDate);
boLCC.setAttributeValue("lease_amt_date", startDate);
if(planDateList.size()>0)boLCC.setAttributeValue("first_plan_date", planDateList.get(0));
if(planDateList.size()>1)boLCC.setAttributeValue("second_plan_date", planDateList.get(1));
Bm.saveObject(boLCC);
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + planDateList.get(planDateList.size() - 1) + "' where payment_number = '" + this.plannumber + "' and pay_type = 'pay_type_out' and fee_type != 'feetype10'"));
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + startDate + "' where payment_number = '" + this.plannumber + "' and pay_type = 'pay_type_in' and fee_type != 'feetype4' and fee_type != 'feetype12'"));
Sqlca.executeSQL(new SqlObject("update lc_fund_plan set plan_date = '" + startDate + "' where payment_number = '" + this.plannumber + "' and fee_type = 'feetype10'"));
this.setCashFlow(this.plannumber, this.productId, Sqlca);
}
return "success";
}
public void setCashFlow(String paymentNumber, String productId, com.amarsoft.awe.util.Transaction Sqlca) throws Exception {
String sql = "";
sql += "INSERT INTO LC_CASH_FLOW (id,project_id,project_plan_number,contract_id,contract_plan_number,payment_number";
sql += ",plan_date";
sql += ",fund_in";
sql += ",fund_in_details";
sql += ",fund_out";
sql += ",fund_out_details";
sql += ",net_flow";
//sql += ",flowunid";//create_date,creator_ "+DateUtil.getSystemDate()+"' create_date ,'"+SecurityUtil.getPrincipal().getId()+"' creator_"
sql += " )";
sql +=" select sys_guid() id,max(t.project_id),max(t.project_plan_number),max(t.contract_id),max(t.contract_plan_number),max(t.payment_number),t.plan_date,sum(t.flowin) fundin,nvl(wmsys.wm_concat(case when t.flowindetail='' then null else t.flowindetail end ),'-') fundindetails, ";
sql +=" sum(t.flowout) fundout ,nvl(wmsys.wm_concat(case when t.flowoutdetail='' then null else t.flowoutdetail end),'-') fundoutdetails,sum(t.cleanfow)netflow " ;
sql +=" from (" ;
sql +=" select cfrp.project_id,cfrp.project_plan_number,cfrp.contract_id,cfrp.contract_plan_number,cfrp.payment_number,cfrp.plan_date,cfrp.rent flowin,'第'||cfrp.plan_list||'期租金:'||to_char(cfrp.rent,'FM9,999,999,999,999,999,999,999,990.00') flowindetail,0 flowout,'' flowoutdetail,cfrp.rent-0 cleanfow " ;
sql +=" from lc_rent_plan cfrp" ;
sql +=" where cfrp.payment_number='" + paymentNumber + "'" ;
sql +=" union all " ;
sql +=" select fundplan.project_id,fundplan.project_plan_number,fundplan.contract_id,fundplan.contract_plan_number,fundplan.payment_number,fundplan.plan_date,case when fundplan.pay_type='pay_type_in'then fundplan.plan_money else 0 end flowin, ";
sql +=" case when fundplan.pay_type='pay_type_in'then concat(concat(tdd.itemname,':'),to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00')) else ''end, " ;
sql +=" case when fundplan.pay_type='pay_type_out'then fundplan.plan_money else 0 end flowout, " ;
sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||to_char(fundplan.plan_money,'FM9,999,999,999,999,999,999,999,990.00') else ''end flowoutdetail, " ;
sql +=" case when fundplan.pay_type='pay_type_in' then fundplan.plan_money else -fundplan.plan_money end cleanfow " ;
sql +=" from lc_fund_plan fundplan " ;
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ;
sql +=" where fundplan.payment_number='" + paymentNumber + "'";
if(productId != null){
Map<String,Map<String,String>> productCashInIRRList = ProductParamUtil.getProductComponentType(productId, "PRD0315");
Set<Entry<String,Map<String,String>>> entry = productCashInIRRList.entrySet();
for(Entry<String,Map<String,String>> e : entry){
Map<String,String> parameMap = e.getValue();
boolean flag = false;
if("N".equals(parameMap.get("CostType10"))){
flag = true;
}
if(flag){
sql +=" and tdd.relativecode<>'"+e.getKey()+"' ";
}
}
}
sql +=" )t group by t.plan_date ";
Sqlca.executeSQL(new SqlObject(sql));
}
public static List<String> getPlanDateList(int incomeNumber, String periodType, String incomeIntervalMonth, String startDate) throws ParseException {
List<String> planDate = new ArrayList<String>();
Calendar calendar = Calendar.getInstance();
calendar.setTime(com.amarsoft.app.als.sys.tools.DateUtil.parseStringToDate(startDate, "yyyy/MM/dd"));
int day = calendar.get(Calendar.DAY_OF_MONTH);
int addMonth = Integer.parseInt(incomeIntervalMonth);
for(int i = 0; i < incomeNumber; i ++) {
if(!("period_type_1".equals(periodType) && i == 0)) {//期末加上还款间隔
calendar.add(Calendar.MONTH, addMonth);
if(day != calendar.get(Calendar.DAY_OF_MONTH)) {
if(day > calendar.getActualMaximum(Calendar.DAY_OF_MONTH)) {
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
} else {
calendar.set(Calendar.DAY_OF_MONTH, day);
}
}
}
planDate.add(com.amarsoft.app.als.sys.tools.DateUtil.formatDateToString(calendar.getTime(), "yyyy/MM/dd"));
}
return planDate;
}
/**
* ÖÐ;ÖÐÖ¹
*/

View File

@ -1,7 +1,9 @@
package com.amarsoft.app.als.sys.tools;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import com.amarsoft.are.lang.DateX;
/**
@ -12,6 +14,7 @@ import com.amarsoft.are.lang.DateX;
public class DateUtil {
public final static String BusinessDate="";
public final static SimpleDateFormat sdf = new SimpleDateFormat();
/**
* 获得当前日期
@ -52,4 +55,14 @@ public class DateUtil {
return theday;
}
public static Date parseStringToDate(String date, String format) throws ParseException {
sdf.applyPattern(format);
return sdf.parse(date);
}
public static String formatDateToString(Date date, String format) throws ParseException {
sdf.applyPattern(format);
return sdf.format(date);
}
}

View File

@ -36,7 +36,9 @@ public class SerialNumberUtil {
public static synchronized String getProjectSerialNumber(String orgId,JBOTransaction tx) throws Exception{
return SerialNumberUtil.getSerialNumber("P{year}{month}{day}{maxOrderNumber}",6,null, "项目编号"+orgId, null, tx);
}
public static synchronized String getActualPayNumber(JBOTransaction tx) throws Exception{
return SerialNumberUtil.getSerialNumber("PAY{year}{month}{day}{maxOrderNumber}",4,null, "实际放款号", null, tx);
}
public static synchronized String getEbankSerialNumber(String orgId,JBOTransaction tx) throws Exception{
return SerialNumberUtil.getSerialNumber("E-{year}{month}{maxOrderNumber}",3,null, "网银编号"+orgId, null, tx);
}

View File

@ -0,0 +1,115 @@
package com.tenwa.flow.bussinessapprove;
import java.text.SimpleDateFormat;
import java.util.Date;
import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.reckon.util.UUIDUtil;
/**
* 更新业务状态与业务详情表记录
* @author jianghd
*
*/
public class BussinessStatusAndDetailAction {
//1.后续随项目进行到一定阶段时对业务状态与详情的处理
public static String stageRun(JBOTransaction tx,String CurUserID,String ProjectIdOrContractId,String statusCode) throws Exception{
BizObjectManager bsBom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx);
Transaction tran = Transaction.createTransaction(tx);
ASUser user = ASUser.getUser(CurUserID, tran);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
String now = sdf.format(new Date(System.currentTimeMillis()));
SqlObject lpi = new SqlObject("SELECT LPI.CONTRACT_NUMBER FROM LB_PROJECT_INFO LPI WHERE LPI.ID='"+ProjectIdOrContractId+"'");
SqlObject lci = new SqlObject("SELECT LPI.CONTRACT_NUMBER FROM LB_CONTRACT_INFO LPI WHERE LPI.ID='"+ProjectIdOrContractId+"'");
ASResultSet ass = tran.getASResultSet(lpi);
String contractNumber = "";
SqlObject so;
String bStatus ="";
if(ass.next()){
contractNumber = ass.getString("CONTRACT_NUMBER");
bStatus = bsBom.createQuery("CONTRACT_NUMBER=:ContractNumber").setParameter("ContractNumber", contractNumber).getSingleResult(true).getAttribute("BUSINESS_STATUS").getString();
JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx)
.createQuery("UPDATE O SET BUSINESS_STATUS='"+statusCode+"',UPDATEUSERID='"+user.getUserID()+"',UPDATEORGID='"+user.getOrgID()+"',UPDATETIME='"+now+"' WHERE CONTRACT_NUMBER='"+contractNumber+"'").executeUpdate();
so = new SqlObject("INSERT INTO BUSINESS_DETAIL(ID,CONTRACT_NUMBER,BUSINESS_STATUS,INPUTUSERID,INPUTORGID,INPUTTIME,BEFORE_STATUS) SELECT SYS_GUID(),CONTRACT_NUMBER,'"+statusCode+"','"+user.getUserID()+"','"+user.getOrgID()+"','"+StringFunction.getTodayNow().replaceAll(":", "")+"','"+bStatus+"' FROM LB_PROJECT_INFO WHERE ID='"+ProjectIdOrContractId+"'");
so.setDebugSql(so.getDebugSql().replaceAll("", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("", ":"));
so.setRunSql(so.getRunSql().replaceAll("", ":"));
tran.executeSQL(so);
}else{
ass = tran.getASResultSet(lci);
if(ass.next()){contractNumber = ass.getString("CONTRACT_NUMBER");}
BizObject bo = bsBom.createQuery("CONTRACT_NUMBER=:ContractNumber").setParameter("ContractNumber", contractNumber).getSingleResult(true);
if(bo!=null){
bStatus = bo.getAttribute("BUSINESS_STATUS").getString();
}else{//初始化BussinessStatus
bo = bsBom.newObject();
bo.setAttributeValue("BUSINESS_STATUS","1");
bo.setAttributeValue("CONTRACT_NUMBER",contractNumber);
bo.setAttributeValue("INPUTUSERID",user.getUserID());
bo.setAttributeValue("INPUTORGID",user.getOrgID());
bo.setAttributeValue("INPUTTIME",now);
bsBom.saveObject(bo);
bStatus = "1";
}
JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx)
.createQuery("UPDATE O SET BUSINESS_STATUS='"+statusCode+"',UPDATEUSERID='"+user.getUserID()+"',UPDATEORGID='"+user.getOrgID()+"',UPDATETIME='"+now+"' WHERE CONTRACT_NUMBER='"+contractNumber+"'").executeUpdate();
so = new SqlObject("INSERT INTO BUSINESS_DETAIL(ID,CONTRACT_NUMBER,BUSINESS_STATUS,INPUTUSERID,INPUTORGID,INPUTTIME,BEFORE_STATUS) SELECT SYS_GUID(),CONTRACT_NUMBER,'"+statusCode+"','"+user.getUserID()+"','"+user.getOrgID()+"','"+StringFunction.getTodayNow().replaceAll(":", "")+"','"+bStatus+"' FROM LB_CONTRACT_INFO WHERE ID='"+ProjectIdOrContractId+"'");
so.setDebugSql(so.getDebugSql().replaceAll("", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("", ":"));
so.setRunSql(so.getRunSql().replaceAll("", ":"));
tran.executeSQL(so);
}
return "true";
}
//2.取消时的处理
public static String CancelRun(JBOTransaction tx,String CurUserID,String ProjectIdOrContractId,String delCode)throws Exception{
Transaction tran = Transaction.createTransaction(tx);
SqlObject lpi = new SqlObject("SELECT LPI.CONTRACT_NUMBER FROM LB_PROJECT_INFO LPI WHERE LPI.ID='"+ProjectIdOrContractId+"'");
SqlObject lci = new SqlObject("SELECT LPI.CONTRACT_NUMBER FROM LB_CONTRACT_INFO LPI WHERE LPI.ID='"+ProjectIdOrContractId+"'");
ASResultSet ass = tran.getASResultSet(lpi);
String contractNumber = "";
SqlObject so;
String bStatus ="";
if(ass.next()){
contractNumber = ass.getString("CONTRACT_NUMBER");
so = new SqlObject("select before_status from BUSINESS_DETAIL where CONTRACT_NUMBER='"+contractNumber+"' and BUSINESS_STATUS='"+delCode+"'");
ASResultSet rs = tran.getASResultSet(so);
if(rs.next()){
bStatus = rs.getString("before_status");
}
JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx)
.createQuery("UPDATE O SET BUSINESS_STATUS='"+bStatus+"' WHERE CONTRACT_NUMBER='"+contractNumber+"'").executeUpdate();
so = new SqlObject("DELETE FROM BUSINESS_DETAIL WHERE CONTRACT_NUMBER='"+contractNumber+"' AND BUSINESS_STATUS='"+delCode+"'");
tran.executeSQL(so);
}else{
ass = tran.getASResultSet(lci);
if(ass.next()){contractNumber = ass.getString("CONTRACT_NUMBER");}
contractNumber = ass.getString("CONTRACT_NUMBER");
so = new SqlObject("select before_status from BUSINESS_DETAIL where CONTRACT_NUMBER='"+contractNumber+"' and BUSINESS_STATUS='"+delCode+"'");
ASResultSet rs = tran.getASResultSet(so);
if(rs.next()){
bStatus = rs.getString("before_status");
}
JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME,tx)
.createQuery("UPDATE O SET BUSINESS_STATUS='"+bStatus+"' WHERE CONTRACT_NUMBER='"+contractNumber+"'").executeUpdate();
so = new SqlObject("DELETE FROM BUSINESS_DETAIL WHERE CONTRACT_NUMBER='"+contractNumber+"' AND BUSINESS_STATUS='"+delCode+"'");
tran.executeSQL(so);
}
return "true";
}
}

View File

@ -0,0 +1,37 @@
package com.tenwa.flow.fund.actualpayment;
import jbo.app.tenwa.calc.LB_ACTUAL_PAYMENT_INFO_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.Transaction;
import com.amarsoft.context.ASUser;
import com.tenwa.flow.baseBussion.BaseBussiness;
/**
* 拷贝申请通过的付款计划到临时表
* @author tenwapc
*/
public class CopyContractFundFormalToTemp extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception{
this.initBussinessParam(Sqlca.getTransaction());
String sFlowUnid = (String)this.getAttribute("ObjectNo");
String userId = (String)this.getAttribute("CurUserID");
String applyDate = (String)this.getAttribute("FlowKey");
ASUser user = ASUser.getUser(userId, Sqlca);
BizObjectManager bomLAPIT = JBOFactory.getBizObjectManager(LB_ACTUAL_PAYMENT_INFO_TEMP.CLASS_NAME,Sqlca);
BizObject boLAPIT = bomLAPIT.newObject();
boLAPIT.setAttributeValue("flowunid", sFlowUnid);
boLAPIT.setAttributeValue("contract_count", 0);
boLAPIT.setAttributeValue("total_money", 0);
boLAPIT.setAttributeValue("apply_date", applyDate);
boLAPIT.setAttributeValue("inputuserid", user.getUserID());
boLAPIT.setAttributeValue("inputorgid", user.getOrgID());
boLAPIT.setAttributeValue("inputtime", StringFunction.getTodayNow());
bomLAPIT.saveObject(boLAPIT);
String sMessage="true";
return sMessage;
}
}

View File

@ -0,0 +1,261 @@
package com.tenwa.flow.fund.actualpayment;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS;
import jbo.app.tenwa.calc.LC_CASH_FLOW;
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import com.amarsoft.app.awe.config.InitDBType;
import com.amarsoft.app.util.ProductParamUtil;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.reckon.executor.CreateTransactionExecutor;
/**
* 实际付款申请通过后根据付款日期修改租金计划
* @author zhulh
*
*/
public class FundIncomeEndRentPlanModify extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception{
this.initBussinessParam(Sqlca.getTransaction());
String sFlowUnid = (String)this.getAttribute("ObjectNo");
BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME);
Sqlca.join(bomLFIT);
//查询付款类型为车辆款的付款项的合同idcontract_id 条件为设备款,不为货扣,不为退回的,并且支付成功的数据才默认为放款成功!
@SuppressWarnings("unchecked")
List<BizObject> bos = bomLFIT.createQuery("flowunid=:flowunid and pay_type='pay_type_out' and fee_type='feetype10' and settle_method <> 'settlemethod11' and pay_status<>'apply_return' and ebank_status='05'")
.setParameter("flowunid", sFlowUnid).getResultList(false);
//SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
try{
if(bos.size() > 0){
for(BizObject bo:bos){
String payment_number=bo.getAttribute("payment_number").toString();
String contractId=bo.getAttribute("contract_id").toString();
String productId = Sqlca.getString("select product_id from lb_contract_info where id='"+contractId+"'");
String calType = "onHire_process";
CreateTransactionExecutor cre = new CreateTransactionExecutor();
cre.setCalType(calType);
cre.setContractId(contractId);
cre.setProductId(productId);
cre.setPlannumber(payment_number);
cre.setFlowunid(contractId);
cre.setStartDate(bo.getAttribute("fact_date").toString());
cre.carRunOnhire(Sqlca);
/* Date fact_date=df.parse(bo.getAttribute("fact_date").toString());
Date base_date=fact_date;
Calendar calendar = new GregorianCalendar();
//计算出第一期租金的日期
calendar.setTime(base_date);
int date=calendar.get(Calendar.DATE);
if(date<=20){
calendar.add(Calendar.MONTH, 1);
}else{
calendar.add(Calendar.MONTH, 2);
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM");
//取得年利率
BizObjectManager bomLCC = JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME);
Sqlca.join(bomLCC);
BizObject boc=bomLCC.createQuery("payment_number=:payment_number")
.setParameter("payment_number", payment_number).getSingleResult(true);
String first_date = sdf.format(calendar.getTime())+"/"+boc.getAttribute("rent_day").getString();
BigDecimal year_rate=new BigDecimal(boc.getAttribute("year_rate").toString());
//取出还款间隔
int income_interval_month = boc.getAttribute("income_interval_month").getInt();
//取得租金计算方式
String settle_method= boc.getAttribute("SETTLE_METHOD").toString();
boc.setAttributeValue("start_date", bo.getAttribute("fact_date").toString());
boc.setAttributeValue("first_plan_date", first_date);
bomLCC.saveObject(boc);
//获取lc_rent_plan表数据并进行修改
BizObjectManager bomLRP = JBOFactory.getBizObjectManager(LC_PAY_RENT_PLAN.CLASS_NAME);
BizObjectManager bomLR = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME,Sqlca);
Sqlca.join(bomLRP);
List<BizObject> bors = bomLRP.createQuery("payment_number=:payment_number order by plan_list")
.setParameter("payment_number", payment_number).getResultList(false);
if(bors.size() > 0){
for(int i = 0 ; i < bors.size() ; i++){
BizObject bor=bors.get(i);
list=bor.getAttribute("plan_list").getInt();
if((settle_method.equals("even_rent")||settle_method.equals("even_corpus"))&&list==1){
Date plan_date=df.parse(bor.getAttribute("plan_date").toString());
long betweendays = (long) ((fact_date.getTime() - plan_date.getTime())/
(24*3600*1000));// 天数间隔
//计算日利率
BigDecimal day_rate=year_rate.divide(new BigDecimal("360"),6,BigDecimal.ROUND_HALF_UP);
//计算实际利息差
BigDecimal otherinterest=day_rate.multiply(new BigDecimal(betweendays));
//计算出第一期利息
BigDecimal interest=new BigDecimal(bor.getAttribute("interest").toString()).add(otherinterest);
//计算出第一期业务利息
BigDecimal interest_business=new BigDecimal(bor.getAttribute("interest_business").toString()).add(otherinterest);
//计算出第一期租金
BigDecimal rent=new BigDecimal(bor.getAttribute("rent").toString()).add(otherinterest);
//回写租金计划
bor.setAttributeValue("interest", interest);
bor.setAttributeValue("interest_business", interest_business);
bor.setAttributeValue("rent", rent);
bor.setAttributeValue("plan_date", first_date);
BizObject bolr = bomLR.newObject();
DataOperatorUtil.coptyJBOPropertyNoKey(bor, bolr);
bomLR.saveObject(bolr);
}else{
Date fdate= df.parse(first_date);
calendar.setTime(fdate);
calendar.add(Calendar.MONTH, income_interval_month*i);
String datefact = df.format(calendar.getTime());
bor.setAttributeValue("plan_date", datefact);
BizObject bolr = bomLR.newObject();
DataOperatorUtil.coptyJBOPropertyNoKey(bor, bolr);
bomLR.saveObject(bolr);
}
}
}
this.delete(payment_number, Sqlca.getTransaction());
this.add(contract_id, payment_number, productId, Sqlca.getTransaction());*/
//插入起租层
BizObjectManager bm = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_STATUS.CLASS_NAME,Sqlca);
BizObject boLCCS=bm.newObject();
boLCCS.setAttributeValue("contract_id", contractId);
boLCCS.setAttributeValue("payment_number", payment_number);
boLCCS.setAttributeValue("PLAN_STATUS", "31");
bm.saveObject(boLCCS);
//修改合同状态也为31
BizObjectManager cibm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME,Sqlca);
BizObject cibo = cibm.createQuery("ID=:id").setParameter("id", contractId).getSingleResult(true);
cibo.setAttributeValue("CONTRACT_STATUS", "31");
cibm.saveObject(cibo);
}
}
}catch(Exception e){
e.printStackTrace();
throw new RuntimeException("起租导表异常");
}
String sMessage="true";
return sMessage;
}
private void add(String contractID,String paymentNumber,String productId,JBOTransaction tx) throws Exception{
String sql = "";
if("MYSQL".equals(InitDBType.DBTYPE)){
sql += "INSERT INTO lc_cash_flow (id,contract_id,payment_number";
sql += ",plan_date";
sql += ",fund_in";
sql += ",fund_in_details";
sql += ",fund_out";
sql += ",fund_out_details";
sql += ",net_flow";
sql += ",fund_in_company";
sql += ",fund_in_details_company";
sql += ",fund_out_company";
sql += ",fund_out_details_company";
sql += ",net_flow_company)";
sql +=" select replace(uuid(),'-','') id,'"+contractID+"' contract_id,'"+paymentNumber+"',t.plan_date,sum(t.flowin) fundin,ifnull(group_concat(if(t.flowindetail='',null,t.flowindetail)),'-') fundindetails, ";
sql +=" sum(t.flowout) fundout ,ifnull(group_concat(if(t.flowoutdetail='',null,t.flowoutdetail)),'-')fundoutdetails,sum(t.cleanfow)netflow " ;
sql+=",sum(t.flowin_compay) fundin_company,ifnull(group_concat(if(t.flowindetail_company='',null,t.flowindetail_company)),'-') fundindetails_company, ";
sql +=" sum(t.flowout_company) fundout_company ,ifnull(group_concat(if(t.flowoutdetail_company='',null,t.flowoutdetail_company)),'-')fundoutdetails_company,sum(t.cleanfow_company)netflow_company" ;
sql +=" from (" ;
sql +=" select cfrp.plan_date,cfrp.rent flowin,concat('第',cfrp.plan_list,'期租金:',cfrp.rent) flowindetail,0 flowout,'' flowoutdetail,cfrp.rent-0 cleanfow " ;
sql +=" ,cfrp.rent_company flowin_company,concat('第',cfrp.plan_list,'期租金:',cfrp.rent_company) flowindetail_company,0 flowout_company,'' flowoutdetail_company,cfrp.rent_company-0 cleanfow_company";
sql +=" from lc_rent_plan cfrp" ;
sql +=" where cfrp.payment_number = '"+paymentNumber+"'" ;
sql +=" union all " ;
sql +=" select fundplan.plan_date,if(fundplan.pay_type='pay_type_in',fundplan.plan_money,0)flowin, ";
sql +=" if(fundplan.pay_type='pay_type_in',concat(tdd.itemname,':',fundplan.plan_money),''), " ;
sql +=" if(fundplan.pay_type='pay_type_out',fundplan.plan_money,0)flowout, " ;
sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',fundplan.plan_money),'')flowoutdetail, " ;
sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money,-fundplan.plan_money) cleanfow " ;
sql+=",if(fundplan.pay_type='pay_type_in',fundplan.plan_money_company,0)flowin_company, ";
sql +=" if(fundplan.pay_type='pay_type_in',concat(tdd.itemname,':',fundplan.plan_money_company),''), " ;
sql +=" if(fundplan.pay_type='pay_type_out',fundplan.plan_money_company,0)flowout_company, " ;
sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',fundplan.plan_money_company),'')flowoutdetail_company, " ;
sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money_company,-fundplan.plan_money_company) cleanfow_company " ;
sql +=" from lc_fund_plan fundplan " ;
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ;
sql +=" where fundplan.payment_number = '"+paymentNumber+"'";
}else if("ORACLE".equals(InitDBType.DBTYPE)){
sql += "INSERT INTO lc_cash_flow (id,contract_id,payment_number";
sql += ",plan_date";
sql += ",fund_in";
sql += ",fund_in_details";
sql += ",fund_out";
sql += ",fund_out_details";
sql += ",net_flow";
sql += ",fund_in_company";
sql += ",fund_in_details_company";
sql += ",fund_out_company";
sql += ",fund_out_details_company";
sql += ",net_flow_company)";
sql +=" select sys_guid() id,'"+contractID+"' contract_id,'"+paymentNumber+"' payment_number,t.plan_date,sum(t.flowin) fundin,nvl(wmsys.wm_concat(case when t.flowindetail='' then null else t.flowindetail end ),'-') fundindetails, ";
sql +=" sum(t.flowout) fundout ,nvl(wmsys.wm_concat(case when t.flowoutdetail='' then null else t.flowoutdetail end),'-') fundoutdetails,sum(t.cleanfow)netflow ";
sql+=",sum(t.flowin_company) fundin_company,nvl(wmsys.wm_concat(case when t.flowindetail_company='' then null else t.flowindetail_company end ),'-') fundindetails_company, ";
sql +=" sum(t.flowout_company) fundout_company ,nvl(wmsys.wm_concat(case when t.flowoutdetail_company='' then null else t.flowoutdetail_company end),'-') fundoutdetails_company,sum(t.cleanfow_company)netflow_company ";
sql +=" from (" ;
sql +=" select cfrp.plan_date,cfrp.rent flowin,'第'||cfrp.plan_list||'期租金:'||cfrp.rent flowindetail,0 flowout,'' flowoutdetail,cfrp.rent-0 cleanfow " ;
sql +=" ,cfrp.rent_company flowin_company,'第'||cfrp.plan_list||'期租金:'||cfrp.rent_company flowindetail_company,0 flowout_company,'' flowoutdetail_company,cfrp.rent_company-0 cleanfow_company " ;
sql +=" from lc_rent_plan cfrp" ;
sql +=" where cfrp.payment_number = '"+paymentNumber+"'";
sql +=" union all " ;
sql +=" select fundplan.plan_date,case when fundplan.pay_type='pay_type_in'then fundplan.plan_money else 0 end flowin, ";
sql +=" case when fundplan.pay_type='pay_type_in'then concat(concat(tdd.itemname,':'),fundplan.plan_money) else ''end, " ;
sql +=" case when fundplan.pay_type='pay_type_out'then fundplan.plan_money else 0 end flowout, " ;
sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||fundplan.plan_money else ''end flowoutdetail, " ;
sql +=" case when fundplan.pay_type='pay_type_in' then fundplan.plan_money else -fundplan.plan_money end cleanfow " ;
sql +=" ,case when fundplan.pay_type='pay_type_in'then fundplan.plan_money_company else 0 end flowin_company, ";
sql +=" case when fundplan.pay_type='pay_type_in'then concat(concat(tdd.itemname,':'),fundplan.plan_money_company) else ''end, " ;
sql +=" case when fundplan.pay_type='pay_type_out'then fundplan.plan_money_company else 0 end flowout_company, " ;
sql +=" case when fundplan.pay_type='pay_type_out' then tdd.itemname||':'||fundplan.plan_money_company else ''end flowoutdetail_company, " ;
sql +=" case when fundplan.pay_type='pay_type_in' then fundplan.plan_money_company else -fundplan.plan_money_company end cleanfow_company " ;
sql +=" from lc_fund_plan fundplan " ;
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno " ;
sql +=" where fundplan.payment_number = '"+paymentNumber+"'";
}
if(productId != null){
Map<String,Map<String,String>> productCashInIRRList = ProductParamUtil.getProductComponentType(productId, "PRD0315");
Set<Entry<String,Map<String,String>>> entry = productCashInIRRList.entrySet();
for(Entry<String,Map<String,String>> e : entry){
Map<String,String> parameMap = e.getValue();
boolean flag = false;
if("N".equals(parameMap.get("CostType10"))){
flag = true;
}
if(flag){
sql +=" and tdd.relativecode<>'"+e.getKey()+"' ";
}
}
}
sql +=" )t group by t.plan_date ";
Transaction Sqlca =null;
Sqlca = Transaction.createTransaction(tx);
SqlObject asql = new SqlObject(sql);
Sqlca.executeSQL(asql);
}
private void delete(String paymentNumber,JBOTransaction tx) throws Exception{
BizObjectManager bm=JBOFactory.getBizObjectManager(LC_CASH_FLOW.CLASS_NAME, tx);
String sql = " delete from O where payment_number='"+paymentNumber+"'";
bm.createQuery(sql).executeUpdate();
}
}

View File

@ -1,7 +1,9 @@
package com.tenwa.flow.fund.fundcollection;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_EBANK_PROCESS;
import jbo.app.tenwa.calc.LC_EBANK_TEMP;
@ -9,12 +11,19 @@ import jbo.app.tenwa.calc.LC_FUND_INCOME;
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
import jbo.app.tenwa.calc.LC_FUND_PLAN;
import jbo.app.tenwa.calc.VI_LC_FUND_PLAN;
import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT;
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;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.bussinessapprove.BussinessStatusAndDetailAction;
public class FundIncomeMethod {
@ -27,6 +36,11 @@ public class FundIncomeMethod {
private String oldFactMoney;
private String newFactMoney;
private String isChanged;
private String CONTRACT_ID;
private String contractIds;
private String userId;
private String orgId;
private String status;
public String getIsChanged() {
return isChanged;
@ -100,6 +114,46 @@ public class FundIncomeMethod {
this.newFactMoney = newFactMoney;
}
public String getCONTRACT_ID() {
return CONTRACT_ID;
}
public void setCONTRACT_ID(String cONTRACT_ID) {
CONTRACT_ID = cONTRACT_ID;
}
public String getContractIds() {
return contractIds;
}
public void setContractIds(String contractIds) {
this.contractIds = contractIds;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String setFundDataToFundIncome(JBOTransaction tx) throws JBOException{
try{
boolean flag = false;
@ -225,4 +279,57 @@ public class FundIncomeMethod {
}
return "SUCCESS";
}
public String createActualPayment(JBOTransaction tx) throws JBOException{
try{
//获取本方账户
BizObject boOA = JBOFactory.getBizObjectManager(OWN_ACCOUNT.CLASS_NAME,tx)
.createQuery("account_purpose='default' and state_='0010'").getSingleResult(false);
for(String contractId : contractIds.split("@")){
@SuppressWarnings("unchecked")
List<BizObject> bos = JBOFactory.getBizObjectManager(LC_FUND_INCOME.CLASS_NAME)
.createQuery("contract_id='"+contractId+"' and pay_type='pay_type_out' and pay_status='apply_pass'")
.getResultList(false);
BigDecimal totalMoney = new BigDecimal("0");
int contractCount = 0;
if(bos.size() > 0){
Map<String,String> fromCondition = new HashMap<String,String>();
Map<String,String> otherProperty = new HashMap<String,String>();
for(BizObject bo:bos){
fromCondition.clear();
fromCondition.put("ID", bo.getAttribute("ID").getString());
fromCondition.put(LC_FUND_INCOME.SETTLE_METHOD, "settlemethod6");
otherProperty.clear();
otherProperty.put("FlowUnid", flowunid);
otherProperty.put("IS_FLOWING", "0");
otherProperty.put("ACCOUNTING_DATE", StringFunction.getTodayNow().split(" ")[0]);
otherProperty.put("BANK", boOA.getAttribute("ACC_BANK").getString());
otherProperty.put("ACCOUNT", boOA.getAttribute("ACC_NAME").getString());
otherProperty.put("ACC_NUMBER", boOA.getAttribute("ACC_NUMBER").getString());
otherProperty.put("INCOME_ID", bo.getAttribute("ID").getString());
otherProperty.put(LC_FUND_INCOME.EBANK_STATUS, "01");
DataOperatorUtil.copySingleJBO(LC_FUND_INCOME.CLASS_NAME, fromCondition,LC_FUND_INCOME_TEMP.CLASS_NAME, null, otherProperty,tx);
BussinessStatusAndDetailAction.stageRun( tx, userId, contractId, "30");
}
}
Transaction sqlTran = Transaction.createTransaction(tx);
ASResultSet rs = sqlTran.getResultSet(new SqlObject("select count(1) contract_count,sum(fact_money) total_money from lc_fund_income_temp where flowunid='"+flowunid+"' and pay_status<>'apply_return' group by flowunid"));
if(rs.next()){
totalMoney = new BigDecimal(rs.getString("total_money"));
contractCount = Integer.parseInt(rs.getString("contract_count"));
SqlObject so = new SqlObject("update lb_actual_payment_info_temp set contract_count='"+contractCount+"',total_money='"+totalMoney+"',updateuserid='"+userId+"',updateorgid='"+orgId+"',updatetime='"+StringFunction.getTodayNow().replaceAll(":", "@")+"' where flowunid='"+flowunid+"'");
so.setDebugSql(so.getDebugSql().replaceAll("@", ":"));
so.setOriginalSql(so.getOriginalSql().replaceAll("@", ":"));
so.setRunSql(so.getRunSql().replaceAll("@", ":"));
sqlTran.executeSQL(so);
so = new SqlObject("update flow_bussiness_object set proj_name=(substr(proj_name,1,instr(proj_name,'实际付款')-1)||'实际付款,金额为:"+totalMoney+"') where flow_unid='"+flowunid+"'");
sqlTran.executeSQL(so);
}
}
}catch(Exception e){
e.printStackTrace();
tx.rollback();
return "ERROR";
}
return "SUCCESS";
}
}