1.扣款复核代码改为存储过程。(辉总写的存储过程)
This commit is contained in:
parent
cf64fce9bc
commit
0b12270f6b
@ -2,6 +2,7 @@ package com.tenwa.collectaudit.cache;
|
||||
|
||||
import java.io.File;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.SQLException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -9,6 +10,8 @@ import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.springframework.jdbc.object.SqlCall;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_RENT_PLAN;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
|
||||
import jbo.com.tenwa.lease.comm.LB_BUCKLE_LOG;
|
||||
@ -415,9 +418,11 @@ public class CollectAuditInfoCache {
|
||||
* @param bo
|
||||
* @param rent
|
||||
* @return
|
||||
* @throws JBOException
|
||||
* @throws SQLException
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, String> handcraftsingleCollectMoeny(JBOTransaction tx,BizObjectManager bc,BizObject bo,String rent,String hire_list) throws Exception{
|
||||
public Map<String, String> handcraftsingleCollectMoeny(JBOTransaction tx,BizObjectManager bc,BizObject bo,String rent,String hire_list) throws JBOException, SQLException {
|
||||
String cerrentDate = DateAssistant.getToday();//获取当前日期,格式为:yyyy/MM/dd
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
//改为存储过程实现
|
||||
@ -447,25 +452,34 @@ public class CollectAuditInfoCache {
|
||||
transaction.commit();*/
|
||||
|
||||
Transaction Sqlca =null;
|
||||
Sqlca = Transaction.createTransaction(tx);
|
||||
String ln_contract_id = bo.getAttribute("contract_id").toString();
|
||||
String ln_plan_date = bo.getAttribute("plan_date").toString();
|
||||
String in_rent = rent;
|
||||
String in_hire_list = hire_list;
|
||||
String in_type = "1";
|
||||
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')} ";
|
||||
SqlObject asql = new SqlObject(SQL);
|
||||
ASResultSet rs = null;
|
||||
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
ASResultSet rs = null;
|
||||
try {
|
||||
|
||||
Sqlca = Transaction.createTransaction(tx);
|
||||
String ln_contract_id = bo.getAttribute("contract_id").toString();
|
||||
String ln_plan_date = bo.getAttribute("plan_date").toString();
|
||||
String in_rent = rent;
|
||||
String in_hire_list = hire_list;
|
||||
String in_type = "1";
|
||||
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')} ";
|
||||
SqlObject asql = new SqlObject(SQL);
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(rs != null) rs.close();
|
||||
if(Sqlca!=null)Sqlca.commit();
|
||||
}
|
||||
|
||||
BizObject bco = bc.createQuery("id=:id").setParameter("id", bo.getAttribute("id").toString()).getSingleResult(false);
|
||||
|
||||
|
||||
/*BizObject bco = bc.createQuery("id=:id").setParameter("id", bo.getAttribute("id").toString()).getSingleResult(false);
|
||||
String batch_number = bco.getAttribute("BATCH_NO").toString();
|
||||
if (batch_number.length() == 0) {
|
||||
batch_number += "手工付款金额:"+rent;
|
||||
}else{
|
||||
batch_number += ";手工付款金额:"+rent;
|
||||
}
|
||||
}*/
|
||||
//更新收付状态
|
||||
bc.createQuery("update O set O.COLLECT_STATUS=:COLLECT_STATUS ,O.COLLECT_MSG=:COLLECT_MSG where O.id=:id")
|
||||
.setParameter("COLLECT_STATUS", "收款成功")
|
||||
@ -840,16 +854,24 @@ public class CollectAuditInfoCache {
|
||||
transaction.commit();*/
|
||||
|
||||
Transaction Sqlca =null;
|
||||
Sqlca = Transaction.createTransaction(tx);
|
||||
String ln_contract_id = bo.getAttribute("contract_id").toString();
|
||||
String ln_plan_date = bo.getAttribute("plan_date").toString();
|
||||
String in_rent = rent;
|
||||
String in_hire_list = hire_list;
|
||||
String in_type = "1";
|
||||
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')} ";
|
||||
SqlObject asql = new SqlObject(SQL);
|
||||
ASResultSet rs = null;
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
ASResultSet rs = null;
|
||||
try {
|
||||
|
||||
Sqlca = Transaction.createTransaction(tx);
|
||||
String ln_contract_id = bo.getAttribute("contract_id").toString();
|
||||
String ln_plan_date = bo.getAttribute("plan_date").toString();
|
||||
String in_rent = rent;
|
||||
String in_hire_list = hire_list;
|
||||
String in_type = "2";
|
||||
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')} ";
|
||||
SqlObject asql = new SqlObject(SQL);
|
||||
rs = Sqlca.getASResultSet(asql);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(rs != null) rs.close();
|
||||
if(Sqlca!=null)Sqlca.commit();
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user