提前结清合同添加新增表

This commit is contained in:
zzk 2022-04-19 08:47:31 +08:00
parent 68f8358fb3
commit ef0012d6c5
5 changed files with 43 additions and 3 deletions

View File

@ -340,8 +340,9 @@
if(SETTLE_METHOD == "SETTLE_METHOD02"){
ret = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","partSettlement","REPURCHASE_RATIO="+EQUIPMENT_RATIO+",flowunid=<%=flowunid%>,contractId=<%=contractId%>,START_DATE=<%=START_DATE%>,plannumber=<%=PAYMENT_NUMBER%>,calType=pay_process,PAYDAY_ADJUST="+PAYDAY_ADJUST+",SettleMethod="+SETTLE_METHOD);
}else{
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runTerminate","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>,productId=<%=productId%>,calType=pay_process,MAXIMUM_TOTAL=MAXIMUM_TOTAL,REPURCHASE_MONEY = REPURCHASE_MONEY");
ret = "操作成功"
AsControl.RunJavaMethod("com.tenwa.voucher.CreateVoucherProcess.EarlyContract","alterdata","flowunid=<%=flowunid%>");
AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runTerminate","flowunid=<%=flowunid%>,plannumber=<%=paymentnumber%>,productId=<%=productId%>,calType=pay_process,MAXIMUM_TOTAL=MAXIMUM_TOTAL,REPURCHASE_MONEY = REPURCHASE_MONEY");
ret = "²Ù×÷³É¹¦"
}
if(ret=="操作成功"){
alert("提前结清操作成功");

View File

@ -319,6 +319,26 @@ public class EarlyContract {
return ""+NOMINAL_PRICE+"";
}
//全部结清更新租赁物临时表
public void alterdata(JBOTransaction tx) {
Transaction Sqlca = null;
try {
Sqlca = Transaction.createTransaction(tx);
String sql="UPDATE LB_EQUIPMENT_CAR_TEMP SET SETTLE_STATUS='3' WHERE (TERMINATE_TYPE IS NULL OR TERMINATE_TYPE='1') AND FLOWUNID='"+flowunid+"' ";
Sqlca.executeSQL(sql);
Sqlca.commit();
}catch(Exception e) {
try {
Sqlca.rollback();
} catch (JBOException e1) {
e1.printStackTrace();
}
e.printStackTrace();
}
}
/**
* 全部结清将租赁物等于未结清的标记为本次结清如果是部分结清将选中租赁物标记为本次结清

View File

@ -2,7 +2,10 @@ package com.tenwa.lease.flow.contract.commbusiness;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
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.flow.baseBussion.BaseBussiness;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
@ -17,7 +20,21 @@ public class LBInitContractStatusBusiness extends BaseBussiness {
BizObjectManager bom=JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME);
Sqlca.join(bom);
bom.createQuery("update O set CONTRACT_STATUS=:contractstatus where id=:contractid").setParameter("contractstatus", contractStatus).setParameter("contractid", contractId).executeUpdate();
if(contractStatus.equals("100")) {
settle(Sqlca);
}
String sMessage="true";
return sMessage;
}
public void settle(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
String contractid = this.getAttribute("ContractId").toString(); //当前用户对象
String CurUser = this.getAttribute("CurUserID").toString(); //当前用户对象
String flowunid = this.getAttribute("ObjectNo").toString(); // 获取流程编号
String SQL="call settle_contract_info('"+contractid+"','"+flowunid+"','"+CurUser+"')";
SqlObject asql = new SqlObject(SQL);
Sqlca.executeSQL(asql);
}
}

View File

@ -40,7 +40,7 @@ public class LBEquipmentFormalToTempBusiness extends BaseBussiness {
String id01;
String id02;
String flowUnid=this.getAttribute("ObjectNo").toString();
String sql="select round(round(lect.EQUIP_PRICE / ifnull(t.num, 1), 4), 4) as PROPROTION_NUMBER,f.id as id01,lect.id as id02 from lb_equipment_car_temp lect left join (select CONTRACT_ID,sum(ifnull(EQUIP_PRICE, 0)) as num from apzl.lb_equipment_car group by CONTRACT_ID ) t on t.CONTRACT_ID = lect.CONTRACT_ID left join (select id from apzl.lb_equipment_car_temp a where FLOWUNID = '"+flowUnid+"'order by id desc limit 1) f on 1=1 where lect.FLOWUNID = '"+flowUnid+"' order by lect.id";
String sql="select ifnull(round(round(lect.EQUIP_PRICE / ifnull(t.num, 1), 4), 4),0) as PROPROTION_NUMBER,f.id as id01,lect.id as id02 from lb_equipment_car_temp lect left join (select CONTRACT_ID,sum(ifnull(EQUIP_PRICE, 0)) as num from apzl.lb_equipment_car group by CONTRACT_ID ) t on t.CONTRACT_ID = lect.CONTRACT_ID left join (select id from apzl.lb_equipment_car_temp a where FLOWUNID = '"+flowUnid+"'order by id desc limit 1) f on 1=1 where lect.FLOWUNID = '"+flowUnid+"' order by lect.id";
List<Map<String,String>> list=DataOperatorUtil.getDataBySql(Sqlca, sql, null);
for (Map<String,String> let : list) {
PROPROTION_NUMBER = let.get("PROPROTION_NUMBER");

View File

@ -21,6 +21,8 @@ public class LBEquipmentTempToFormalBusiness extends BaseBussiness {
Map<String,String>otherProperty=this.getDefaultOtherProperty();
if("ºÏͬÆð×âÁ÷³Ì".equals(flowname)){
otherProperty.put("status", "0010");
}else if("瓊품써헌".equals(flowname)) {
Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set TERMINATE_TYPE='2' where TERMINATE_TYPE = '3' and FLOWUNID='"+flowunid+"'"));
}
Sqlca.executeSQL(new SqlObject("update LB_EQUIPMENT_CAR_TEMP set IS_FLOW='N' where FLOWUNID='"+flowunid+"'"));
service.copyOrLoadLBEquipment(Sqlca, fromCondtion, toCondtion, otherProperty, ServiceOperatorEnum.TempToFormal, null);