修改保证金代偿校验
This commit is contained in:
parent
d4c16248a2
commit
868594b8d7
@ -272,7 +272,7 @@ public class AllinpayServlet extends BaseServlet {
|
||||
try {
|
||||
Sqlca = Transaction.createTransaction(JBOFactory.createJBOTransaction());
|
||||
String sql = "SELECT ca.account customername,ca.mobile phonenumber,ca.acc_number accNumber,ca.certid certId,ca.collect_type collectType FROM lb_project_info lpi JOIN customer_account ca ON ca.project_id=lpi.ID WHERE lpi.id=:Id limit 1";
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql));
|
||||
ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql).setParameter("Id", projectId));
|
||||
if (res.next()) {
|
||||
String userName = res.getString("customername");
|
||||
String phoneNumber = res.getString("phonenumber");
|
||||
|
||||
@ -42,9 +42,7 @@ public class SelectBalance {
|
||||
Map<String,String> params= new HashMap<String,String>();
|
||||
params.put("distributor_id", distributor_no);
|
||||
//params.put("caution_money", caution_money);
|
||||
String sql="SELECT O.sums AS money "
|
||||
+ "FROM DISTRIBUTOR_INFO O WHERE "
|
||||
+ "O.distributor_no=:distributor_id";
|
||||
String sql="select (IFNULL(dp.CAUTION_MONEY,0) - IFNULL(de.CAUTION_MONEY,0)) as money FROM (SELECT SUM(IFNULL(CAUTION_MONEY,0)) CAUTION_MONEY,DISTRIBUTOR_ID FROM D_DEPOSITCHARGE_INFO GROUP BY DISTRIBUTOR_ID ) dp LEFT JOIN (SELECT SUM(IFNULL(CAUTION_MONEY,0)) CAUTION_MONEY,DISTRIBUTOR_ID FROM D_DEPOSITRETURN_INFO GROUP BY DISTRIBUTOR_ID) de ON de.DISTRIBUTOR_ID = dp.DISTRIBUTOR_ID where dp.DISTRIBUTOR_ID=:distributor_id ";
|
||||
List<Map<String,String>> getSql = DataOperatorUtil.getDataBySql(scql, sql, params);
|
||||
BigDecimal mm = new BigDecimal("0");
|
||||
if(getSql.size()>0){
|
||||
|
||||
@ -701,7 +701,7 @@ public class CollectAuditInfoCache {
|
||||
int plan_list=Integer.parseInt(bom.getAttribute("plan_list").toString())-1;
|
||||
// 查询当前要代偿期次的上一期代偿记录, 有数据则联系代偿记录加1,没有数据则默认为1;
|
||||
BizObject ddi = bd.createQuery("SELECT O.COMPENSATORY_CON FROM O WHERE O.MONEY_TYPE='bondRepay' AND O.CONTRACT_ID='"+contract_id+"' AND O.PLAN_LIST='"+plan_list+"'").getSingleResult(false);
|
||||
if(ddi!=null && !"".equals(ddi)) {
|
||||
if(ddi!=null && !"".equals(ddi.getAttribute("COMPENSATORY_CON").getString())) {
|
||||
COMPENSATORY_CON=String.valueOf(Integer.parseInt(ddi.getAttribute("COMPENSATORY_CON").getString())+1);
|
||||
}else {
|
||||
COMPENSATORY_CON="1";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user