租金休眠初版

This commit is contained in:
zhangbeibei 2021-04-12 13:37:37 +08:00
parent f42c8472c8
commit 3194c9160f
6 changed files with 445 additions and 0 deletions

View File

@ -0,0 +1,178 @@
<%@page import="com.amarsoft.awe.control.model.Parameter"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="com.tenwa.reckon.product.ASObjectWindowCalc" %>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2017-06-29
Content: 示例详情页面
History Log:
*/
String calType = CurPage.getParameter("calType");
String paymentNumber=CurPage.getParameter("payment_number");
String ishistory=CurPage.getParameter("IsHistory");
String nodeNo=CurPage.getParameter("NodeNo");
String flowunid = CurPage.getParameter("FlowUnid");
String ProductId = CurPage.getParameter("ProductId");
String sRightType= CurPage.getParameter("RightType");
String taskno = CurPage.getParameter("TaskNo");
String flowNo = CurPage.getParameter("FlowNo");
String settleMethod="";
String rentOrRate="";
BizObject condition=null;
if(paymentNumber==null){
condition=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP","flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
paymentNumber=condition.getAttribute("payment_number").getString();
settleMethod=condition.getAttribute("SETTLE_METHOD").getString();
rentOrRate=condition.getAttribute("RENT_OR_RATE").getString();
}
String sTempletNo = "LCRentDormantInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
String groupHidden="";
doTemp.setDefaultValue("flowunid", flowunid);
doTemp.setDefaultValue("payment_number", paymentNumber);
doTemp.setHtmlEvent("START_LIST","onchange","startListChange");
doTemp.appendJboWhere(" and payment_number='"+paymentNumber+"'");
if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.lease.flow.flowarchive.onhirechange.RentPlanChangeShow");//如果是历史则新显示历史数据
}
List<BizObject> rents=JBOFactory.createBizObjectQuery("jbo.app.tenwa.calc.LC_RENT_PLAN_TEMP","select * from O where flowunid='"+flowunid+"' and payment_number='"+paymentNumber+"' order by plan_list").getResultList(false);
int rentLists = rents.size();
if(rentLists>0){
doTemp.setDefaultValue("DORMANT_YEAR_RATE",rents.get(rentLists-1).getAttribute("YEAR_RATE").getString());
}
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
/*Parameter p=new Parameter("NodeNo",nodeNo+"_1");
Parameter p2=new Parameter("payment_number",paymentNumber);
Vector<Parameter> v=CurPage.parameterList;
v.add(p);
v.add(p2);*/
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
if((null!=sRightType&&sRightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//只读模式
isShowButton=false;
}else{
isShowButton=true;
}
dwTemp.setGroupHidden(groupHidden);
dwTemp.setAttr("inputWidth","120");
dwTemp.setAttr("spanWidth","107");
dwTemp.genHTMLObjectWindow(flowunid);
String compClientID = request.getParameter("CompClientID");
String url="/Accounting/LoanSimulation_change/LoanBasicInfo.jsp";
sRightType="ReadOnly";
dwTemp.replaceColumn("pay_condition", "<iframe type='iframe' id='pay_condition' name=\"pay_condition\" width=\"100%\" height=\"500px\" frameborder=\"0\" src=\""+sWebRootPath+url+"?CompClientID="+compClientID+"&flowunid="+flowunid+"&plannumber="+paymentNumber+"&IsHistory="+ishistory+"&NodeNo="+nodeNo+"&RightType="+sRightType+"&calType="+calType+"&TaskNo="+taskno+"\"></iframe>", CurPage.getObjectWindowOutput());
String sButtons[][] = {
{"true","","Button","休眠变更","休眠变更","saveRecord()","","","","btn_icon_rentchange"},
//{"true","","Button","休眠撤销","休眠撤销","cancelChange()","","","","btn_icon_delete"}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
$("#START_LIST").keyup(function(){
var startList = $("#START_LIST").val();
var endList = $("#END_LIST").val();
if(startList.indexOf("-")!=-1){
alert("此处不能输入负数!");
$("#START_LIST").val(startList.replace("-",""));
}
if(typeof(endList)!=undefined && endList !="" ){
if(Number(endList)<Number(startList)){
alert("结束期次不可以小于开始期次!");
setItemValue(0,0,"END_LIST","");
return;
}
if(Number(endList)==rentLists){
alert("休眠结束期次不可以为最大期次");
setItemValue(0,0,"END_LIST","");
return;
}
}
});
$("#END_LIST").change(function(){
var endList = $("#END_LIST").val();
var startList = $("#START_LIST").val();
if(endList.indexOf("-")!=-1){
alert("此处不能输入负数!");
$("#END_LIST").val(endList.replace("-",""));
}
if(typeof(startList)!=undefined && startList !="" ){
if(Number(endList)<Number(startList)){
alert("结束期次不可以小于开始期次!");
setItemValue(0,0,"END_LIST","");
return;
}
}
});
});
//保存数据
function saveRecord(sPostEvents)
{
/* if(!cheackFinalPayment()){
AsDebug.alert("提示","只有尾款的的项目并且大于还租次数才能展期变更!");
return;
} */
//检查是否进行过变更
as_save("myiframe0","run()");
<%-- var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","checkIsRentChange","flowunid=<%=flowunid%>,plannumber=<%=plannumber%>");
if(result == 'true'){
as_save("myiframe0","run()");
}else{
alert('请先撤销变更,再进行变更操作!!!');
} --%>
}
function cheackFinalPayment(){
var finalPayment=pay_condition.getItemValue(0,0,"FINAL_PAYMENT");
var incomeNumber=pay_condition.getItemValue(0,0,"INCOME_NUMBER");
var adjustList=getItemValue(0,0,"ADJUST_LIST");
var startList=getItemValue(0,0,"START_LIST");
if(parseFloat(finalPayment)>0&&parseFloat(adjustList)>parseFloat(incomeNumber)&&parseFloat(startList)==parseFloat(incomeNumber)){
return true;
}else{
return false;
}
}
function cancelChange(){
openDWDialog();
setTimeout(function(){
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","cancelRentChange","flowunid=<%=flowunid%>,plannumber=<%=paymentNumber%>");
if(message == 'true'){
resetDWDialog("变更撤销成功!!!",true);
window.location.href=window.location.href;
}else{
resetDWDialog("未进行过租金计划变更的操作!请先进行租金计划变更!!!",true);
}
}, 500);
}
function run()
{
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.CreateTransactionExecutor","runRentdormant","flowunid=<%=flowunid%>,plannumber=<%=paymentNumber%>,productId=<%=ProductId%>,calType=pay_process");
window.location.href=window.location.href;
}
function startListChange(){
var startList = getItemValue(0,getRow(),"START_LIST");
if(startList){
if(Number(startList) <= 0){
alert("输入期次范围错误,请检查后重新输入!!!");
setItemValue(0,0,"START_LIST","");
return;
}else{
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","findPlanDateByRentList","paymentnumber=<%=paymentNumber%>,startList="+startList);
if(result.result!= 'true'){
alert(result.message);
setItemValue(0,0,"START_LIST","");
return;
}
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,43 @@
<%@page import="com.tenwa.util.SerialNumberUtil"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListStart.jspf"%>
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=自定义函数;]~*/%>
<script type="text/javascript">
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newApply(){
var userID="<%=CurUser.getUserID()%>";
var businessType="1";
AsDialog.OpenSelector("selectContractOnhireChange","businessType,"+businessType,"dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
var contract_id=sReturn[0];
var project_id=sReturn[1];
var product_id=sReturn[2];
var contract_number = sReturn[3];
var project_name = sReturn[4];
var carType = sReturn[5];
var customerType = sReturn[6];
var payment_number = sReturn[7];
var sParams = "applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>";
sParams =sParams+",customertype="+customerType+",carAttributes="+carType+",ProjectId="+project_id+",FlowKey="+contract_number+",ProductId="+product_id+",ContractId="+contract_id+",ProjectName="+project_name+",payment_number="+payment_number;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.onhirechange.OnhireChangeFlowStartAction","initFLow",sParams);
if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return;
var sReturnInfos=sReturnInfo.split("@");
if(sReturnInfos[0]=="success")
{
var objectNo=sReturnInfos[1];
FlowFunction.openStartFlowPage(objectNo);
}
else
{
var mes=sReturnInfos[1];
alert(mes);
}
reloadSelf();
},"请选择合同");
}
</script>
<%@ include file="/Tenwa/Core/FlowManager/BaseFlowList/BaseFlowApplyListEnd.jspf"%>

View File

@ -4579,5 +4579,52 @@
</managerProperties>
</manager>
</class>
<class name="LC_DORMANT_RENT_ADJUST_TEMP" label="休眠租金临时表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING" length="32"/>
<attribute name="START_LIST" label="休眠开始期次" type="STRING" length="20"/>
<attribute name="END_LIST" label="休眠结束期次" type="STRING" length="20" />
<attribute name="DORMANT_YEAR_RATE" label="休眠年利率" type="STRING" length="200"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LC_DORMANT_RENT_ADJUST_TEMP" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LC_DORMANT_RENT_ADJUST" label="休眠租金" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
<attribute name="CONTRACT_ID" label="合同编号" type="STRING" length="32"/>
<attribute name="PAYMENT_NUMBER" label="投放编号" type="STRING" length="32"/>
<attribute name="START_LIST" label="休眠开始期次" type="STRING" length="20"/>
<attribute name="END_LIST" label="休眠结束期次" type="STRING" length="20" />
<attribute name="DORMANT_YEAR_RATE" label="休眠年利率" type="STRING" length="200"/>
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="LC_DORMANT_RENT_ADJUST" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -0,0 +1,37 @@
package com.tenwa.flow;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import jbo.app.tenwa.calc.LC_CALC_CONDITION;
import jbo.app.tenwa.calc.LC_CALC_CONDITION_HIS;
import jbo.app.tenwa.calc.LC_DORMANT_RENT_ADJUST;
import jbo.app.tenwa.calc.LC_DORMANT_RENT_ADJUST_TEMP;
import java.util.HashMap;
import java.util.Map;
public class CopyDormantRentTempToFormal extends BaseBussiness{
/**
* ×â½ðÐÝÃßÁÙʱ¿½Õýʽ
* @param Sqlca
* @return
* @throws Exception
*/
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
Map<String,String>fromCondtion=new HashMap<String, String>();
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
Map<String,String>fromCondtion2=new HashMap<String, String>();
fromCondtion.put("contract_id",this.getAttribute("ContractId").toString());
Map<String,String>otherProperty2=new HashMap<String, String>();
otherProperty2.put("flowunid",this.getAttribute("FlowUnid").toString());
DataOperatorUtil.copySingleJBO(LC_DORMANT_RENT_ADJUST_TEMP.CLASS_NAME, fromCondtion, LC_DORMANT_RENT_ADJUST.CLASS_NAME, null, null, Sqlca);
DataOperatorUtil.copySingleJBO(LC_CALC_CONDITION.CLASS_NAME, fromCondtion2, LC_CALC_CONDITION_HIS.CLASS_NAME, null, otherProperty2, Sqlca);
String sMessage="true";
return sMessage;
}
}

View File

@ -0,0 +1,68 @@
package jbo.app.tenwa.calc;
import java.lang.String;
/**
* 休眠租金 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LC_DORMANT_RENT_ADJUST{
/**
* 休眠租金<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_DORMANT_RENT_ADJUST";
/**
* 标识 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 项目编号 STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* 合同编号 STRING(32)<br>
*/
public static final String CONTRACT_ID = "CONTRACT_ID";
/**
* 投放编号 STRING(32)<br>
*/
public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER";
/**
* 休眠开始期次 STRING(20)<br>
*/
public static final String START_LIST = "START_LIST";
/**
* 休眠结束期次 STRING(20)<br>
*/
public static final String END_LIST = "END_LIST";
/**
* 休眠年利率 STRING(200)<br>
*/
public static final String DORMANT_YEAR_RATE = "DORMANT_YEAR_RATE";
/**
* 登记人 STRING(32)<br>
*/
public static final String INPUTUSERID = "INPUTUSERID";
/**
* 登记部门 STRING(32)<br>
*/
public static final String INPUTORGID = "INPUTORGID";
/**
* 登记时间 STRING(32)<br>
*/
public static final String INPUTTIME = "INPUTTIME";
/**
* 更新人 STRING(32)<br>
*/
public static final String UPDATEUSERID = "UPDATEUSERID";
/**
* 更新部门 STRING(32)<br>
*/
public static final String UPDATEORGID = "UPDATEORGID";
/**
* 更新时间 STRING(32)<br>
*/
public static final String UPDATETIME = "UPDATETIME";
}

View File

@ -0,0 +1,72 @@
package jbo.app.tenwa.calc;
import java.lang.String;
/**
* 休眠租金临时表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LC_DORMANT_RENT_ADJUST_TEMP{
/**
* 休眠租金临时表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.app.tenwa.calc.LC_DORMANT_RENT_ADJUST_TEMP";
/**
* 标识 STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 流程编号 STRING(32)<br>
*/
public static final String FLOWUNID = "FLOWUNID";
/**
* 项目编号 STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* 合同编号 STRING(32)<br>
*/
public static final String CONTRACT_ID = "CONTRACT_ID";
/**
* 投放编号 STRING(32)<br>
*/
public static final String PAYMENT_NUMBER = "PAYMENT_NUMBER";
/**
* 休眠开始期次 STRING(20)<br>
*/
public static final String START_LIST = "START_LIST";
/**
* 休眠结束期次 STRING(20)<br>
*/
public static final String END_LIST = "END_LIST";
/**
* 休眠年利率 STRING(200)<br>
*/
public static final String DORMANT_YEAR_RATE = "DORMANT_YEAR_RATE";
/**
* 登记人 STRING(32)<br>
*/
public static final String INPUTUSERID = "INPUTUSERID";
/**
* 登记部门 STRING(32)<br>
*/
public static final String INPUTORGID = "INPUTORGID";
/**
* 登记时间 STRING(32)<br>
*/
public static final String INPUTTIME = "INPUTTIME";
/**
* 更新人 STRING(32)<br>
*/
public static final String UPDATEUSERID = "UPDATEUSERID";
/**
* 更新部门 STRING(32)<br>
*/
public static final String UPDATEORGID = "UPDATEORGID";
/**
* 更新时间 STRING(32)<br>
*/
public static final String UPDATETIME = "UPDATETIME";
}