Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhouyh2
This commit is contained in:
commit
4a2fac8c4d
@ -40,19 +40,21 @@
|
||||
setItemReadOnly(0,0,"effect_end",false);
|
||||
setItemReadOnly(0,0,"product_id",true);
|
||||
setItemReadOnly(0,0,"dis_attribute",true);
|
||||
setItemReadOnly(0,0,"fix_amount",true);
|
||||
setItemReadOnly(0,0,"dis_ratio",true);
|
||||
setItemRequired(0,"effect_end",true);
|
||||
}
|
||||
|
||||
var fix_amount = getItemValue(0,0,"fix_amount");
|
||||
var dis_ratio = getItemValue(0,0,"dis_ratio");
|
||||
if(fix_amount!=""){
|
||||
/* if(fix_amount!=""){
|
||||
setItemReadOnly(0,0,"fix_amount",false);
|
||||
setItemReadOnly(0,0,"dis_ratio",true);
|
||||
}
|
||||
if(dis_ratio !=""){
|
||||
setItemReadOnly(0,0,"dis_ratio",false);
|
||||
setItemReadOnly(0,0,"fix_amount",true);
|
||||
}
|
||||
} */
|
||||
|
||||
function selectcommission(){
|
||||
var commission = getItemValue(0,0,"dis_attribute");
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function checkphone(){
|
||||
/* function checkphone(){
|
||||
var DISTRIBUTOR_TEL = getItemValue(0,getRow(0),"DISTRIBUTOR_TEL");
|
||||
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
|
||||
if(phone.test(DISTRIBUTOR_TEL)){
|
||||
@ -111,8 +111,8 @@
|
||||
alert("电话号格式不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function telnumber(){
|
||||
} */
|
||||
/* function telnumber(){
|
||||
var DEALER_PHONE = getItemValue(0,getRow(0),"DEALER_PHONE");
|
||||
var phone = /^[1][3,4,5,7,8][0-9]{9}$/;
|
||||
if(phone.test(DEALER_PHONE)){
|
||||
@ -123,7 +123,7 @@
|
||||
alert("电话号格式不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} */
|
||||
function save() {
|
||||
var result = false;
|
||||
var distributor_coding = getItemValue(0,0,'DISTRIBUTOR_CODING');
|
||||
@ -136,14 +136,14 @@
|
||||
if(TelResult==false){
|
||||
return;
|
||||
}
|
||||
var Tel = checkphone();
|
||||
/* var Tel = checkphone();
|
||||
if(Tel==false){
|
||||
return;
|
||||
}
|
||||
var phone = telnumber();
|
||||
if(phone==false){
|
||||
return;
|
||||
}
|
||||
} */
|
||||
var result1 = Checkfield();
|
||||
//if(result==true){
|
||||
if(result==true && result1==true){
|
||||
|
||||
@ -35,7 +35,11 @@
|
||||
}
|
||||
|
||||
function saveRecord(){
|
||||
debugger;
|
||||
var projectid = getItemValue(0,0,"PROJECT_ID");
|
||||
if(projectid.length==0){
|
||||
alert("请先选择数据!");
|
||||
return;
|
||||
}
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setDefaultValue("PAYMENT_NUMBER", paymentnumber);
|
||||
doTemp.setHtmlEvent("PAYDAY_ADJUST","onchange","getTerminateInfo");
|
||||
doTemp.setHtmlEvent("ADJUST_TYPE","onchange","changeInfo");
|
||||
doTemp.setHtmlEvent("REPURCHASE_RATIO","onchange","getRepurchaseMoney");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
@ -50,19 +51,27 @@
|
||||
}
|
||||
|
||||
function getTerminateInfo(){
|
||||
var adjusttype = getItemValue(0,0,"ADJUST_TYPE");
|
||||
if(adjusttype.length==0){
|
||||
alert("请先选择变更类型!!!");
|
||||
return;
|
||||
}
|
||||
//检查约定终止日是否合法
|
||||
var paydayAdjust = getItemValue(0,getRow(),"PAYDAY_ADJUST");
|
||||
var result = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","checkPaydayAdjust","contractId=<%=contractId%>,paymentnumber=<%=paymentnumber%>,paydayAdjust="+paydayAdjust);
|
||||
if(result.result != "true"){
|
||||
alert(result.msg);
|
||||
setItemValue(0,getRow(),"PAYDAY_ADJUST","");
|
||||
}else{
|
||||
}else{
|
||||
var terminateInfo = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","getTerminateInfo","contractId=<%=contractId%>,paymentnumber=<%=paymentnumber%>,paydayAdjust="+paydayAdjust);
|
||||
var remaincorpus = terminateInfo.remaincorpus;
|
||||
var remaininterest = terminateInfo.remaininterest;
|
||||
var overduerent = terminateInfo.overduerent;
|
||||
var remainfpenalty = terminateInfo.remainfpenalty;
|
||||
var surplusinterest = terminateInfo.remaininterest;
|
||||
//逾期利息暂时赋值为0
|
||||
setItemValue(0,getRow(),"DUN_PENALTY","0");
|
||||
// setItemValue(0,getRow(),"DUN_PENALTY","0");
|
||||
setItemValue(0,getRow(),"DUN_PENALTY",remainfpenalty);
|
||||
setItemValue(0,getRow(),"AGREED_PENALTY","0");
|
||||
//已到期租金
|
||||
setItemValue(0,getRow(),"DUN_RENT",overduerent);
|
||||
@ -84,8 +93,19 @@
|
||||
setItemValue(0,getRow(),"SDHANDLING_CHARGE","0");
|
||||
|
||||
//计算合同债券总计
|
||||
setItemValue(0,getRow(),"CONTRACT_TOTAL",getContractBondTotal());
|
||||
|
||||
// setItemValue(0,getRow(),"CONTRACT_TOTAL",getContractBondTotal());
|
||||
if(adjusttype=="02"){
|
||||
var fessMoney = AsControl.RunJavaMethod("com.tenwa.reckon.executor.RentCalHelper","getLcCarDispose","contractId=<%=contractId%>");
|
||||
if(fessMoney.length>0){
|
||||
var fessMoneys = fessMoney.split("@");
|
||||
setItemValue(0,getRow(),"COLLECT_FEES",fessMoneys[0]);
|
||||
setItemValue(0,getRow(),"DISPOSE_MONEY",fessMoneys[1]);
|
||||
setItemValue(0,getRow(),"SURPLUSINTEREST",surplusinterest);
|
||||
setItemValue(0,getRow(),"CONTRACT_TOTAL",parseFloat(getItemValue(0,getRow(),"DUN_RENT"))+parseFloat(fessMoneys[0]));
|
||||
}
|
||||
}else{
|
||||
setItemValue(0,getRow(),"CONTRACT_TOTAL",getItemValue(0,getRow(),"DUN_RENT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
//计算债券总计
|
||||
@ -179,6 +199,20 @@
|
||||
setItemValue(0,getRow(),p,result[p]);
|
||||
}
|
||||
}
|
||||
changeInfo();
|
||||
});
|
||||
|
||||
function changeInfo(){
|
||||
var adjusttype = getItemValue(0,0,"ADJUST_TYPE");
|
||||
if(adjusttype=="02"){
|
||||
$("#A_div_1698").attr("style","display:block;");
|
||||
$("#A_div_1896").attr("style","display:block;");
|
||||
$("#A_div_2094").attr("style","display:block;");
|
||||
}else{
|
||||
$("#A_div_1698").attr("style","display:none;");
|
||||
$("#A_div_1896").attr("style","display:none;");
|
||||
$("#A_div_2094").attr("style","display:none;");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -18,7 +18,10 @@
|
||||
String flowstate = CurPage.getParameter("flowstate");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
String flowName = CurPage.getParameter("FlowName");//获取流程名称
|
||||
String projectId = CurPage.getParameter("ProjectId");//获取项目id
|
||||
String clean_lease_money = Sqlca.getString("select CLEAN_LEASE_MONEY from LC_CALC_CONDITION_TEMP where flowunid='"+flowunid+"'");
|
||||
//获取合同状态
|
||||
String projectstatus = Sqlca.getString("select PROJECT_STATUS from lb_project_info where id='"+projectId+"'");
|
||||
//int money = Integer.parseInt(clean_lease_money);
|
||||
if(clean_lease_money==null){
|
||||
clean_lease_money="0";
|
||||
@ -188,6 +191,13 @@
|
||||
$("#A_div_1170").attr("style","display:none;");
|
||||
$("#A_div_1180").attr("style","display:none;");
|
||||
$("#A_div_1250").attr("style","display:none;");
|
||||
$("#A_Group_0020").attr("style","display:none;");
|
||||
if("13"==<%=projectstatus%>){
|
||||
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
|
||||
}else{
|
||||
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
|
||||
}
|
||||
$("#A_Group_0010").append(html);
|
||||
}
|
||||
_user_validator[0]['rules']['SECONDCHOICE']['required0'] = true;
|
||||
_user_validator[0]['messages']['SECONDCHOICE']['required0'] = '请输入复审意见';
|
||||
@ -214,6 +224,13 @@
|
||||
$("#A_div_1170").attr("style","display:none;");
|
||||
$("#A_div_1180").attr("style","display:none;");
|
||||
$("#A_div_1250").attr("style","display:none;");
|
||||
$("#A_Group_0020").attr("style","display:none;");
|
||||
if("13"==<%=projectstatus%>){
|
||||
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
|
||||
}else{
|
||||
html='<tr id="contractsign" class="test"><td>业务审批结果: 通过</td></tr>';
|
||||
}
|
||||
$("#A_Group_0010").append(html);
|
||||
}
|
||||
_user_validator[0]['rules']['THIRDCHOICE']['required0'] = true;
|
||||
_user_validator[0]['messages']['THIRDCHOICE']['required0'] = '请输入部门负责人意见';
|
||||
@ -302,6 +319,20 @@
|
||||
$("#SECONDOPINION").attr("disabled","disabled");
|
||||
$("#THIRDOPINION").attr("disabled","disabled");
|
||||
}
|
||||
if("<%=CurUser.getUserID()%>".indexOf("8006")>=0){
|
||||
$("#A_div_1130").attr("style","display:none;");
|
||||
$("#A_div_1140").attr("style","display:none;");
|
||||
$("#A_div_1210").attr("style","display:none;");
|
||||
$("#A_div_1150").attr("style","display:none;");
|
||||
$("#A_div_1160").attr("style","display:none;");
|
||||
$("#A_div_1230").attr("style","display:none;");
|
||||
$("#A_div_1170").attr("style","display:none;");
|
||||
$("#A_div_1180").attr("style","display:none;");
|
||||
$("#A_div_1250").attr("style","display:none;");
|
||||
$("#A_Group_0020").attr("style","display:none;");
|
||||
$("#A_Group_0040").attr("style","display:none;");
|
||||
$("#A_Group_0030").attr("style","display:none;");
|
||||
}
|
||||
})
|
||||
|
||||
function checkCertId(){//校验证件号
|
||||
|
||||
@ -314,6 +314,7 @@
|
||||
<attribute name="REPAYMENT_INTEREST" label="还款日差利息" type="DOUBLE" length="22" scale="2"/>
|
||||
<attribute name="COLLECT_FEES" label="催收费用" type="STRING" length="32"/>
|
||||
<attribute name="DISPOSE_MONEY" label="处置金额" type="STRING" length="32"/>
|
||||
<attribute name="SurplusINTEREST" label="剩余利息" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
@ -363,6 +364,7 @@
|
||||
<attribute name="REPAYMENT_INTEREST" label="还款日差利息" type="DOUBLE" length="22" scale="2"/>
|
||||
<attribute name="COLLECT_FEES" label="催收费用" type="STRING" length="32"/>
|
||||
<attribute name="DISPOSE_MONEY" label="处置金额" type="STRING" length="32"/>
|
||||
<attribute name="SurplusINTEREST" label="剩余利息" type="STRING" length="32"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -1342,7 +1342,7 @@
|
||||
<attribute name="EQUIP_DELIVERY_DATE" label="交付时间" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_PLACE" label="设备设置地址" type="STRING" length="100"/>
|
||||
<attribute name="MEMO" label="备注" type="STRING" length="1000"/>
|
||||
<attribute name="DATA_STATE" label="数据状态" type="STRING" length="32"/>
|
||||
<!-- <attribute name="DATA_STATE" label="数据状态" type="STRING" length="32"/> -->
|
||||
<attribute name="IS_FLOW" label="是否在流程中" type="STRING" length="1000"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="1000"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
@ -3051,7 +3051,7 @@
|
||||
<attribute name="remain_interest" label="剩余利息" type="STRING" length="32"/>
|
||||
<attribute name="unreceive_pay" label="未收罚息" type="STRING" length="32"/>
|
||||
<attribute name="collect_fees" label="催收费用" type="STRING" length="32"/>
|
||||
<attribute name="collect_fees" label="催收费用" type="STRING" length="32"/>
|
||||
<!-- <attribute name="collect_fees" label="催收费用" type="STRING" length="32"/> -->
|
||||
<attribute name="contract_no" label="合同编号" type="STRING" length="32"/>
|
||||
<attribute name="dispose_money" label="处置金额" type="STRING" length="32"/>
|
||||
<attribute name="park_money" label="停车费" type="STRING" length="32"/>
|
||||
|
||||
@ -23,6 +23,13 @@
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
|
||||
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
|
||||
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserName()%>");
|
||||
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgName()%>");
|
||||
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
|
||||
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -191,22 +191,37 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
BizObjectManager Bm=JBOFactory.getBizObjectManager(LC_CALC_CONDITION.CLASS_NAME, Sqlca);
|
||||
BizObject boLCC = Bm.createQuery("contract_id='" + contractId + "'").getSingleResult(true);
|
||||
//获取期次
|
||||
if(boLCC!=null){
|
||||
if(boLCC != null) {
|
||||
String settleMethod = boLCC.getAttribute("SETTLE_METHOD").getString();
|
||||
String defaultDueDay = ProductParamUtil.getProductParameterValue(productId, "PRD0301", settleMethod, "DefaultDueDay");
|
||||
int incomeNumber = boLCC.getAttribute("INCOME_NUMBER").getInt();
|
||||
String periodType = boLCC.getAttribute("PERIOD_TYPE").getString();
|
||||
String incomeIntervalMonth = boLCC.getAttribute("INCOME_INTERVAL_MONTH").getInt() + "";
|
||||
List<String> planDateList = getPlanDateList(incomeNumber, periodType, incomeIntervalMonth, startDate);
|
||||
List<String> planDateList = null;
|
||||
if("01".equals(defaultDueDay)) {
|
||||
planDateList = getPlanDateListFixed(incomeNumber, periodType, incomeIntervalMonth, startDate);
|
||||
} else {
|
||||
planDateList = getPlanDateList(incomeNumber, periodType, incomeIntervalMonth, startDate);
|
||||
}
|
||||
String insertSql="insert into lc_rent_plan(id,quot_id,cust_id, project_id, project_plan_number,contract_id,contract_plan_number,payment_number,plan_list,plan_date,plan_status,rent,corpus,interest,penalty,corpus_business,interest_business,rent_adjust,all_remain_corpus,settle_method,coin,year_rate,memo,flowunid,inputuserid,inputorgid,inputtime,updateuserid,updateorgid,updatetime,interest_date) select id,quot_id,cust_id, project_id, project_plan_number,contract_id,contract_plan_number,payment_number,plan_list,plan_date,plan_status,rent,corpus,interest,penalty,corpus_business,interest_business,rent_adjust,all_remain_corpus,settle_method,coin,year_rate,memo,flowunid,inputuserid,inputorgid,inputtime,updateuserid,updateorgid,updatetime,interest_date from lc_pay_rent_plan where payment_number = '" + this.plannumber + "'";
|
||||
Sqlca.executeSQL(new SqlObject(insertSql));
|
||||
Connection conn = Sqlca.getConnection(Sqlca);
|
||||
//实际租金计划日期(开始)
|
||||
PreparedStatement ps = conn.prepareStatement("update lc_rent_plan set plan_date = ? where payment_number = '" + this.plannumber + "' and plan_list = ?");
|
||||
for(int i = 0; i < planDateList.size(); i ++) {
|
||||
ps.setString(1, planDateList.get(i));
|
||||
ps.setString(2, (i + 1) + "");
|
||||
ps.addBatch();
|
||||
PreparedStatement ps = null;
|
||||
try {
|
||||
ps = conn.prepareStatement("update lc_rent_plan set plan_date = ? where payment_number = '" + this.plannumber + "' and plan_list = ?");
|
||||
for(int i = 0; i < planDateList.size(); i ++) {
|
||||
ps.setString(1, planDateList.get(i));
|
||||
ps.setString(2, (i + 1) + "");
|
||||
ps.addBatch();
|
||||
}
|
||||
ps.executeBatch();
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("存储数据异常");
|
||||
} finally {
|
||||
if(ps != null) ps.close();
|
||||
}
|
||||
ps.executeBatch();
|
||||
boLCC.setAttributeValue("start_date", startDate);
|
||||
boLCC.setAttributeValue("lease_amt_date", startDate);
|
||||
if(planDateList.size()>0)boLCC.setAttributeValue("first_plan_date", planDateList.get(0));
|
||||
@ -265,6 +280,52 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
Sqlca.executeSQL(new SqlObject(sql));
|
||||
}
|
||||
|
||||
//固定还款日
|
||||
public static List<String> getPlanDateListFixed(int incomeNumber, String periodType, String incomeIntervalMonth, String startDate) throws ParseException {
|
||||
List<String> planDate = new ArrayList<String>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(com.amarsoft.app.als.sys.tools.DateUtil.parseStringToDate(startDate, "yyyy/MM/dd"));
|
||||
int day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
boolean flag = false;
|
||||
if("period_type_0".equals(periodType)) {
|
||||
if(day >= 1 && day <= 9) {
|
||||
day = 5;
|
||||
} else if(day >= 10 && day <= 19) {
|
||||
day = 15;
|
||||
} else {
|
||||
day = 25;
|
||||
}
|
||||
} else {
|
||||
if(day >= 6 && day <= 15) {
|
||||
day = 15;
|
||||
} else if(day >= 16 && day <= 25) {
|
||||
day = 25;
|
||||
} else {
|
||||
if(day >= 26 && day <= 31) {
|
||||
flag = true;
|
||||
}
|
||||
day = 5;
|
||||
}
|
||||
}
|
||||
int addMonth = Integer.parseInt(incomeIntervalMonth);
|
||||
for(int i = 0; i < incomeNumber; i ++) {
|
||||
if(!("period_type_1".equals(periodType) && i == 0 && !flag)) {//期末加上还款间隔
|
||||
calendar.add(Calendar.MONTH, addMonth);
|
||||
if(day != calendar.get(Calendar.DAY_OF_MONTH)) {
|
||||
if(day > calendar.getActualMaximum(Calendar.DAY_OF_MONTH)) {
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
} else {
|
||||
calendar.set(Calendar.DAY_OF_MONTH, day);
|
||||
}
|
||||
}
|
||||
}
|
||||
planDate.add(com.amarsoft.app.als.sys.tools.DateUtil.formatDateToString(calendar.getTime(), "yyyy/MM/dd"));
|
||||
}
|
||||
return planDate;
|
||||
}
|
||||
|
||||
|
||||
//起租日即为还款日
|
||||
public static List<String> getPlanDateList(int incomeNumber, String periodType, String incomeIntervalMonth, String startDate) throws ParseException {
|
||||
List<String> planDate = new ArrayList<String>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
@ -9,6 +9,7 @@ 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 com.amarsoft.app.awe.config.InitDBType;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -129,6 +130,15 @@ public class RentCalHelper {
|
||||
}
|
||||
return JSONEncoder.encode(jsonObject);
|
||||
}
|
||||
|
||||
public String getLcCarDispose() throws Exception{
|
||||
BizObjectManager lcdManage = JBOFactory.getBizObjectManager(LC_CAR_DISPOSE.CLASS_NAME);
|
||||
BizObject lcd = lcdManage.createQuery("select * from O left join jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO lci on lci.contract_no=O.contract_no where lci.id=:id ").setParameter("id", contractId).getSingleResult(false);
|
||||
if(lcd!=null){
|
||||
return lcd.getAttribute("collect_fees").getString()+"@"+lcd.getAttribute("dispose_money").getString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* ¸ù¾ÝÖÐÖ¹ÈÕÆÚËã½ð¶î
|
||||
* @return
|
||||
@ -144,6 +154,7 @@ public class RentCalHelper {
|
||||
String sql = "select sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.remaincorpus else 0 end ) remaincorpus,"
|
||||
+ " sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.remaininterest else 0 end ) remaininterest, "
|
||||
+" sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.corpus else 0 end ) remainfincorpus,"
|
||||
+ "sum(case when DATE_FORMAT(t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.penalty else 0 end ) remainfpenalty,"
|
||||
+" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') > DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.interest else 0 end ) remainfininterest,"
|
||||
+" sum(case when DATE_FORMAT( t.plandate,'%Y/%m/%d') < DATE_FORMAT('"+this.paydayAdjust+"','%Y/%m/%d') then t.overduerent else 0 end ) overduerent,sum(case when t.cou< t.planlist and t.planlist-t.cou<=12-t.cou then t.interest else 0 end) fist_rent,"
|
||||
+ " sum(case when t.cou< t.planlist and t.planlist-t.cou>12-t.cou then t.corpus else 0 end) fist_corpus,"
|
||||
@ -155,6 +166,7 @@ public class RentCalHelper {
|
||||
+ " t1.rent - ifnull(t2.sumincomerent,0) overduerent, t1.rent,"
|
||||
+ " t1.corpus,"
|
||||
+ " t1.interest,"
|
||||
+ " IFNULL(t1.penalty,0)-ifnull(t2.sumincomepenalty,0) penalty,"
|
||||
+ " t1.plandate,"
|
||||
+ " t1.planlist,IFNULL(t2.planlist,0) cou"
|
||||
+ " from ("
|
||||
@ -163,6 +175,7 @@ public class RentCalHelper {
|
||||
+ " cfrp.rent,"
|
||||
+ " cfrp.interest,"
|
||||
+ " cfrp.corpus,"
|
||||
+ " cfrp.penalty,"
|
||||
+ " cfrp.corpus_business corpusbusiness,"
|
||||
+ " cfrp.interest_business interestbusiness,"
|
||||
+ " cfrp.contract_id contractid"
|
||||
@ -173,6 +186,7 @@ public class RentCalHelper {
|
||||
+ " (select sum( cfri.corpus ) sumincomecorpus"
|
||||
+ " ,sum(cfri.interest ) sumincomeinterest,"
|
||||
+ " sum( cfri.rent ) sumincomerent,"
|
||||
+ " sum( cfri.penalty ) sumincomepenalty,"
|
||||
+ " min(cfri.contract_id) contractid,"
|
||||
+ " cfri.plan_list planlist "
|
||||
+ " from LC_RENT_INCOME cfri "
|
||||
|
||||
@ -14,11 +14,17 @@ import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.ASResultSet;
|
||||
import com.amarsoft.awe.util.SqlObject;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author liuzhao
|
||||
*
|
||||
*/
|
||||
public class commissionSet {
|
||||
|
||||
public String effectStart;
|
||||
public String leasForm;
|
||||
public String endDate;
|
||||
public String startDate;
|
||||
|
||||
public String getEffectStart() {
|
||||
return effectStart;
|
||||
@ -36,15 +42,28 @@ public class commissionSet {
|
||||
this.leasForm = leasForm;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(String startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public String commissionSet() throws Exception{
|
||||
JBOTransaction tx=null;
|
||||
Transaction Sqlca=null;
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
|
||||
/*BizObjectManager lpsManager = JBOFactory.getBizObjectManager(LB_PRODUCT_SALVAGE.CLASS_NAME);
|
||||
BizObject lpsObject = lpsManager.createQuery("id=:id").setParameter("id", this.getId()).getSingleResult(false);
|
||||
String leasForm = lpsObject.getAttribute("product_id").toString();*/
|
||||
int end = 0;
|
||||
String sql="SELECT MAX(effect_end) AS effect_end FROM LB_PRODUCT_SALVAGE where product_id=:product_id";
|
||||
SqlObject asql = new SqlObject(sql).setParameter("product_id", leasForm);
|
||||
@ -68,4 +87,35 @@ public class commissionSet {
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
|
||||
public String editEnd() throws Exception{
|
||||
JBOTransaction tx=null;
|
||||
Transaction Sqlca=null;
|
||||
tx= JBOFactory.createJBOTransaction();
|
||||
Sqlca=Transaction.createTransaction(tx);
|
||||
|
||||
int start = 0;
|
||||
String sql="SELECT MIN(effect_start) AS effect_start FROM LB_PRODUCT_SALVAGE WHERE product_id=:product_id AND effect_start>:effect_start";
|
||||
SqlObject asql = new SqlObject(sql).setParameter("product_id", leasForm).setParameter("effect_start", startDate);
|
||||
try {
|
||||
ASResultSet rs = Sqlca.getResultSet(asql);
|
||||
if(rs.next()){
|
||||
String effectStart = rs.getString(1);
|
||||
effectStart = effectStart.replaceAll("/", "");
|
||||
start = Integer.parseInt(effectStart);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String endDate = this.getEndDate();
|
||||
endDate = endDate.replaceAll("/", "");
|
||||
int end = Integer.parseInt(endDate);
|
||||
|
||||
if(end>=start){
|
||||
return "fail";
|
||||
}else{
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,13 @@
|
||||
package com.tenwa.flow.fund.actualpayment;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS;
|
||||
import jbo.app.tenwa.calc.LC_CASH_FLOW;
|
||||
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
|
||||
|
||||
import com.amarsoft.app.awe.config.InitDBType;
|
||||
import com.amarsoft.app.util.ProductParamUtil;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user