diff --git a/calc/com/tenwa/reckon/executor/RentCalHelper.java b/calc/com/tenwa/reckon/executor/RentCalHelper.java index 591e0c95c..532599db4 100644 --- a/calc/com/tenwa/reckon/executor/RentCalHelper.java +++ b/calc/com/tenwa/reckon/executor/RentCalHelper.java @@ -1,29 +1,23 @@ package com.tenwa.reckon.executor; +import com.amarsoft.app.awe.config.InitDBType; +import com.amarsoft.are.jbo.*; +import com.amarsoft.are.lang.StringX; +import com.amarsoft.are.util.json.JSONEncoder; +import com.amarsoft.are.util.json.JSONObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.reckon.util.Conn; +import com.tenwa.reckon.util.DateUtil; +import jbo.app.tenwa.calc.LC_CALC_CONDITION; +import jbo.app.tenwa.calc.LC_RENT_INCOME; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.com.tenwa.lease.comm.LC_CAR_DISPOSE; +import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST; + import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; - -import jbo.app.tenwa.calc.LC_CALC_CONDITION; -import jbo.app.tenwa.calc.LC_RENT_INCOME; -import jbo.app.tenwa.calc.LC_RENT_PLAN; -import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT; -import jbo.com.tenwa.lease.comm.LC_CAR_DISPOSE; -import jbo.com.tenwa.lease.comm.LC_OCCUPY_RENT_LIST; - -import com.amarsoft.app.awe.config.InitDBType; -import com.amarsoft.are.jbo.BizObject; -import com.amarsoft.are.jbo.BizObjectManager; -import com.amarsoft.are.jbo.BizObjectQuery; -import com.amarsoft.are.jbo.JBOException; -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.tenwa.reckon.util.Conn; -import com.tenwa.reckon.util.DateUtil; -import com.tenwa.reckon.util.DateUtils; /** * 合同中途中止 * @author tenwapc @@ -414,6 +408,18 @@ public class RentCalHelper { //校验合同是否有正在卡扣中 public String isAutoBuckleByPlanId() throws Exception{ String [] planIds = planId.split("@"); + Transaction sqlCa = null; + try { + sqlCa= Transaction.createTransaction(JBOFactory.createJBOTransaction()); + String num = sqlCa.getString("select count(1) as num from lb_card_buckle_status where status = 'Y'"); + sqlCa.commit(); + if(!StringX.isEmpty(num) && Integer.valueOf(num)>0){ + return "false"; + } + }catch (Exception e){ + if (sqlCa != null) sqlCa.rollback(); + throw e; + } BizObjectManager lrpManage = JBOFactory.getBizObjectManager(LC_RENT_PLAN.CLASS_NAME); for(int i= 0;i lrps = lrpManage.createQuery(" id=:planId AND batch_status='process' and (collect_status in ('代偿','未收款','部分收款','') or collect_status is null)").setParameter("planId", planIds[i]).getResultList(false); diff --git a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java index 910882247..32b86ad25 100644 --- a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java +++ b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java @@ -244,8 +244,8 @@ public class OperateOfCGBController { sb.append("").append("").append(""); //收款银行地址 sb.append("").append("").append(""); //联行号 跨行时 [必输] 广发自动根据银行名称匹配--技术回复 sb.append("").append(payObj.getAttribute("fact_money").getString()).append(""); //金额 单位:元 [必输] - sb.append("").append(remark).append(""); //备注 客户名+合作方合同号+安鹏合同号 - sb.append("").append(payObj.getAttribute("id").getString()).append(""); //附言 绑定支付对象主键 + sb.append("").append(payObj.getAttribute("id").getString()).append(""); //备注 绑定支付对象主键 + sb.append("").append(remark).append(""); //附言 客户名+合作方合同号+安鹏合同号 sb.append(""); payObj.setAttributeValue("CMB_PAY_NO", customerSalarySeq); }