合同信息查询本次付款明细
This commit is contained in:
parent
f4e9f58b9a
commit
7cf5739bd1
@ -0,0 +1,48 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2019-01-25
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
String ishistory = CurPage.getParameter("IsHistory");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String phaseNo = CurPage.getParameter("PhaseNo");
|
||||
String productId = CurPage.getParameter("ProductId");
|
||||
String contractId = CurPage.getParameter("ContractId");
|
||||
System.out.print(contractId);
|
||||
String sTempletNo = "LCFundPaymentTempInfoSelect";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
//doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(contractId);
|
||||
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var relines=getItemValue(0,0,"relines");
|
||||
if(relines<0){
|
||||
$("#RELINES").css("color","red");
|
||||
}
|
||||
var phaseNo="<%=phaseNo%>";
|
||||
if(phaseNo=='0010'){
|
||||
setItemReadOnly(0, 0, "LENDING_TYPE", true);
|
||||
}else{
|
||||
setItemReadOnly(0, 0, "LENDING_TYPE", false);
|
||||
}
|
||||
lendingType();
|
||||
});
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
101
src_tenwa/com/tenwa/handler/LCFundPaymentTempInfoSelect.java
Normal file
101
src_tenwa/com/tenwa/handler/LCFundPaymentTempInfoSelect.java
Normal file
@ -0,0 +1,101 @@
|
||||
package com.tenwa.handler;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_CALC_CONDITION;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP;
|
||||
|
||||
import com.amarsoft.app.util.ProductParamUtil;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
|
||||
import com.amarsoft.dict.als.cache.CodeCache;
|
||||
import com.amarsoft.dict.als.object.Item;
|
||||
|
||||
public class LCFundPaymentTempInfoSelect extends CommonHandler {
|
||||
@Override
|
||||
protected void initDisplayForEdit(BizObject bo) throws Exception {
|
||||
String productId = this.asPage.getParameter("ProductId");
|
||||
String ContractId = this.asPage.getParameter("ContractId");
|
||||
System.out.print(ContractId);
|
||||
|
||||
//获取坐扣项
|
||||
Map<String, Map<String, String>> params = ProductParamUtil.getProductComponentType(productId, "PRD0315");
|
||||
List<String> deductFeeType = new ArrayList<String>();
|
||||
for(Entry<String, Map<String, String>> feeTypes : params.entrySet()) {
|
||||
if(!feeTypes.getValue().containsKey("isBalance")) {
|
||||
continue;
|
||||
}
|
||||
String isBalance = feeTypes.getValue().get("isBalance");
|
||||
if("yes".equals(isBalance)) {
|
||||
deductFeeType.add(feeTypes.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
Item[] items = CodeCache.getItems("FeeType");
|
||||
String fundList = "";
|
||||
for(Item item : items) {
|
||||
for(String feetype : deductFeeType) {
|
||||
if(feetype.equals(item.getRelativeCode())) {
|
||||
if(fundList.length() != 0) {
|
||||
fundList += ",";
|
||||
}
|
||||
fundList += "'" + item.getItemNo() + "'";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(fundList==null||"".equals(fundList)){
|
||||
fundList="0";
|
||||
}
|
||||
//安鹏贴息不抵扣
|
||||
//北汽的有的产品可以贴息差额放款
|
||||
/*if(fundList.length() > 0) {
|
||||
fundList += ",";
|
||||
}
|
||||
fundList += "'feetype27'";*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<BizObject> boLFITs = JBOFactory.createBizObjectQuery(LC_CALC_CONDITION.CLASS_NAME,
|
||||
"SELECT o.CONTRACT_ID,lf.FACT_MONEY,O.CLEAN_LEASE_MONEY,O.HANDLING_CHARGE_MONEY,O.CAUTION_MONEY,o.GPS_FEE,lf.fee_type FROM o LEFT JOIN jbo.app.tenwa.calc.LC_FUND_INCOME lf ON o.PROJECT_ID=lf.PROJECT_ID where o.CONTRACT_ID = '" + ContractId + "' and lf.fee_type in (" + fundList + ") ").getResultList(false);
|
||||
BigDecimal cleanLeaseMoney = new BigDecimal("0");
|
||||
cleanLeaseMoney = cleanLeaseMoney.add(new BigDecimal(bo.getAttribute("CLEAN_LEASE_MONEY").getString()));
|
||||
for(BizObject boLFIT : boLFITs) {
|
||||
BigDecimal factMoney = new BigDecimal(boLFIT.getAttribute("FACT_MONEY").getString());
|
||||
String feeType = boLFIT.getAttribute("FEE_TYPE").getString();
|
||||
if(factMoney.compareTo(BigDecimal.ZERO) > 0) {
|
||||
switch(feeType) {
|
||||
case "feetype1":
|
||||
cleanLeaseMoney = cleanLeaseMoney.subtract(factMoney);
|
||||
bo.setAttributeValue("HANDLING_CHARGE_MONEY", factMoney);
|
||||
this.asDataObject.setVisible("HANDLING_CHARGE_MONEY", true);
|
||||
break;
|
||||
case "feetype2":
|
||||
cleanLeaseMoney = cleanLeaseMoney.subtract(factMoney);
|
||||
bo.setAttributeValue("CAUTION_MONEY", factMoney);
|
||||
this.asDataObject.setVisible("CAUTION_MONEY", true);
|
||||
break;
|
||||
case "feetype24":
|
||||
cleanLeaseMoney = cleanLeaseMoney.subtract(factMoney);
|
||||
bo.setAttributeValue("GPS_FEE", factMoney);
|
||||
this.asDataObject.setVisible("GPS_FEE", true);
|
||||
break;
|
||||
case "feetype27":
|
||||
cleanLeaseMoney = cleanLeaseMoney.add(factMoney);
|
||||
bo.setAttributeValue("DEALER_DISCOUNT", factMoney);
|
||||
this.asDataObject.setVisible("DEALER_DISCOUNT", true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
bo.setAttributeValue("FACT_MONEY", cleanLeaseMoney);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user