Merge branch 'develop' of git@git2.tenwa.com.cn:ApzlDev/apzl_leasing.git into develop
This commit is contained in:
commit
e888dc3071
@ -28,6 +28,7 @@
|
||||
|
||||
if("ReadOnly".equals(rightType)){
|
||||
dwTemp.ReadOnly = "1";//Ö»¶Áģʽ
|
||||
doTemp.setColInnerBtEvent("LOCAL_ACCOUNT,ACCOUNT_INFO", "");
|
||||
}
|
||||
String acc_number = Sqlca.getString("select acc_number from OWN_ACCOUNT limit 0,1");
|
||||
String acc_bank = Sqlca.getString("select acc_bank from OWN_ACCOUNT limit 0,1");
|
||||
@ -43,10 +44,13 @@
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
window.onload=function(){
|
||||
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
|
||||
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
|
||||
setItemValue(0,0,"ACCOUNT_INFO",'<%=acc%>');
|
||||
setItemValue(0,0,"ACCOUNT",'<%=acco%>');
|
||||
var laccount = getItemValue(0,0,'LOCAL_ACCOUNT');
|
||||
if(!laccount){
|
||||
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
|
||||
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
|
||||
setItemValue(0,0,"ACCOUNT_INFO",'<%=acc%>');
|
||||
setItemValue(0,0,"ACCOUNT",'<%=acco%>');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +69,7 @@
|
||||
as_save("myiframe0","returnList()");
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenView("/DealerDeposit/DMarginChargeInfo_TempList.jsp", "FlowUnid="+sFlowUnid+"&ProjectName=<%=CurPage.getParameter("ProjectName")%>","_self","");
|
||||
parent.selectItem(1);
|
||||
}
|
||||
function selectaccount(){
|
||||
var disno = getItemValue(0, 0, "disno");
|
||||
|
||||
@ -23,6 +23,9 @@
|
||||
doTemp.setRequired("RETAIL_OPEN_DATE",true);//(0, "RETAIL_OPEN_DATE", true);
|
||||
doTemp.setReadOnly("",true);//先把页面所有字段设为只读状态
|
||||
doTemp.setReadOnly("RETAIL_OPEN_DATE",false);//唯独把这个字段设为必填
|
||||
doTemp.setColInnerBtEvent("PROVINCES", "");
|
||||
doTemp.setColInnerBtEvent("DISTRIBUTOR_ADDRESSNAME", "");
|
||||
doTemp.setColInnerBtEvent("SUBSIDIARY_COMPANY", "");
|
||||
}
|
||||
if("ReadOnly".equals(RightType)){
|
||||
//doTemp.setReadOnly("RETAIL_OPEN_DATE",false);//唯独把这个字段设为必填
|
||||
|
||||
@ -220,7 +220,7 @@
|
||||
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);
|
||||
as_delete(0,'updateTemp()');
|
||||
AsDebug.showMessage("提示","操作成功!","","",true);
|
||||
reloadSelf();
|
||||
}else{
|
||||
@ -229,7 +229,15 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function updateTemp(){
|
||||
var rows = getCheckedRows(0);
|
||||
var contractIds = "";
|
||||
for(var i in rows){
|
||||
contractIds += "@"+getItemValue(0,i,"ID");
|
||||
}
|
||||
contractIds = contractIds.substring(1);
|
||||
RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","updateTemp","contractIds="+contractIds+",flowunid=<%=flowunid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>,status=cancel");
|
||||
}
|
||||
function setColRequired(){
|
||||
if("<%=rightType%>" != "ReadOnly"){
|
||||
for(var i=0;i<DZ[0][2].length;i++){
|
||||
|
||||
@ -4,8 +4,6 @@ import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO;
|
||||
@ -13,7 +11,6 @@ import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO_TEMP;
|
||||
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO_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;
|
||||
@ -30,38 +27,15 @@ public class CopyDChargeTempToFormal extends BaseBussiness{
|
||||
Map<String,String> fromCondtion = new HashMap<String,String>();
|
||||
fromCondtion.put("FLOWUNID",flowunid);
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
//otherProperty.put("ID",id);
|
||||
DataOperatorUtil.copySingleJBO(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITCHARGE_INFO.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
BizObject dibo = JBOFactory.createBizObjectQuery(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
|
||||
BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
|
||||
BigDecimal total = new BigDecimal(dibo.getAttribute(DISTRIBUTOR_INFO_TEMP.TOTAL).getString());
|
||||
BizObject dibo = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, Sqlca).createQuery("flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
|
||||
BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
|
||||
String num = dibo.getAttribute("TOTAL")==null?"0":dibo.getAttribute("TOTAL").getString();//.getString();
|
||||
BigDecimal total = new BigDecimal(num==""?"0":num);
|
||||
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
|
||||
double num = total.add(cautionMoney).doubleValue();
|
||||
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
|
||||
double num1 = total.add(cautionMoney).doubleValue();
|
||||
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num1+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
|
||||
|
||||
return "true";
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
String flowunid = this.getAttribute("ObjectNo").toString();
|
||||
String id = this.getAttribute("ProjectId").toString();
|
||||
Map<String,String> fromCondtion = new HashMap<String,String>();
|
||||
fromCondtion.put("FLOWUNID",flowunid);
|
||||
Map<String,String> otherProperty = new HashMap<String,String>();
|
||||
otherProperty.put("ID",id);
|
||||
|
||||
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
|
||||
String disStatus = dst.getAttribute("id").toString();
|
||||
BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME,Sqlca);
|
||||
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
|
||||
deit.setAttributeValue("DISTRIBUTOR_ID", disStatus);
|
||||
dit.saveObject(deit);
|
||||
|
||||
DataOperatorUtil.copySingleJBO(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITCHARGE_INFO.CLASS_NAME, null, otherProperty, Sqlca);
|
||||
return "true";
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -237,11 +237,11 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
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(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 concat(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 +=" select fundplan.project_id,fundplan.project_plan_number,fundplan.contract_id,fundplan.contract_plan_number,fundplan.payment_number,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,':',format(fundplan.plan_money,2)),''), " ;
|
||||
sql +=" if(fundplan.pay_type='pay_type_out',fundplan.plan_money,0)flowout, " ;
|
||||
sql +=" if(fundplan.pay_type='pay_type_out',concat(tdd.itemname,':',format(fundplan.plan_money,2)),'')flowoutdetail, " ;
|
||||
sql +=" if(fundplan.pay_type='pay_type_in',fundplan.plan_money,-fundplan.plan_money) 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 + "'";
|
||||
|
||||
@ -189,6 +189,38 @@ public class FundIncomeMethod {
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
public String updateTemp(JBOTransaction tx) throws JBOException {
|
||||
try {
|
||||
Transaction sqlTran = Transaction.createTransaction(tx);
|
||||
ASResultSet rs = sqlTran.getResultSet(new SqlObject("select count(1) contract_count,IFNULL(sum(fact_money),0) total_money from lc_fund_income_temp where flowunid='"+flowunid+"' and pay_status='apply_pass' group by flowunid"));
|
||||
if(rs.next()){
|
||||
BigDecimal totalMoney = new BigDecimal(rs.getString("total_money"));
|
||||
int 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=CONCAT(substr(proj_name,1,instr(proj_name,'实际付款')-1),'实际付款,金额为:"+totalMoney+"') where flow_unid='"+flowunid+"'");
|
||||
sqlTran.executeSQL(so);
|
||||
}else{
|
||||
BigDecimal totalMoney = new BigDecimal("0");
|
||||
int contractCount = 0;
|
||||
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=CONCAT(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";
|
||||
}
|
||||
public String setFundDataToFundIncome(JBOTransaction tx) throws JBOException{
|
||||
try{
|
||||
boolean flag = false;
|
||||
@ -367,4 +399,29 @@ public class FundIncomeMethod {
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
public String updateFundIncomeStatus(JBOTransaction tx) throws JBOException{//target
|
||||
try{
|
||||
for(String contractId : contractIds.split("@")){
|
||||
JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME,tx).createQuery("update O set "+("cancel".equals(status)?"pay_status='apply_return'":"pay_status=null")+" where flowunid='"+flowunid+"' and contract_id='"+contractId+"'").executeUpdate();
|
||||
}
|
||||
Transaction sqlTran = Transaction.createTransaction(tx);
|
||||
ASResultSet rs = sqlTran.getResultSet(new SqlObject("select count(1) contract_count,IFNULL(sum(fact_money),0) total_money from lc_fund_income_temp where flowunid='"+flowunid+"' and pay_status<>'apply_return' group by flowunid"));
|
||||
if(rs.next()){
|
||||
BigDecimal totalMoney = new BigDecimal(rs.getString("total_money"));
|
||||
int 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=CONCAT(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";
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,9 @@ public class LBCustomerAccountTempToFormalBusiness extends BaseBussiness{
|
||||
fromCondtion.clear();
|
||||
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
|
||||
fromCondtion.put("Partner_", "Y");
|
||||
toCondtion.clear();
|
||||
toCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
|
||||
toCondtion.put("Partner_", "Y");
|
||||
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_FAMILY.CLASS_NAME, toCondtion, otherProperty,null, Sqlca);
|
||||
/* String contract_id="";
|
||||
Map<String,String> fromCondtion = new HashMap<String, String>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user