This commit is contained in:
yjf 2021-12-09 17:51:44 +08:00
parent c855e8926f
commit fd410fc82e
11 changed files with 251 additions and 40 deletions

View File

@ -58,6 +58,9 @@
if(customFilter!=null){
asObj.appendJboWhere(customFilter.getWhereClauses(asObj, request));
}
int filter_count = 0;
if(asObj.Filters!=null){
for(int k=0;k<asObj.Filters.size();k++){
ASDataObjectFilter asFilter = (ASDataObjectFilter)asObj.Filters.get(k);
@ -109,6 +112,7 @@
parameters.add(DataElement.valueOf("DOFILTER_DF_"+ sColName +"_2_VALUE", value2));
} */
}
filter_count++;
}
if(option.equalsIgnoreCase("Like")) option="BeginsWith";
asFilter.sOperator = option;//设置查询操作符
@ -167,6 +171,9 @@
aServerCountTableNames[iCol] = asObj.getColumnAttribute(iCol, "ColTableName");
}
list.setRowCount(iRowCount);
if (filter_count == 0 && asObj.getCurPage().getAttribute("flowRowCount") != null) {
list.setRowCount(Integer.parseInt(asObj.getCurPage().getAttribute("flowRowCount")));
}
list.setServerCounts(bServerCounts,aServerCountActualNames,aServerCountTableNames);
//统计信息设置结束
list.setWebRootPath(request.getContextPath());

View File

@ -34,8 +34,9 @@
String soft = CurPage.getParameter("soft");
String userId = CurUser.getUserID();
//ASObjectModel doTemp = new ASObjectModel("FlowInstanceTrack");
ASObjectModel doTemp = new ASObjectModel("FlowInstanceTrack3");
doTemp.setDataQueryClass("com.amarsoft.awe.dw.ui.list.FlowMonitorListHtmlGenerator");
String ros = "true";
if("业务申请分担".equals(soft)){
ros = "false";
@ -45,6 +46,10 @@
ros = "false";
doTemp.appendJboWhere(" O.flow_name='付款申请(汽车)' and O.PHASENAME='订单初审'");
};
if(!"false".equals(ros)){
String rowCount = Sqlca.getString("select count(1) from flow_object");
CurPage.setAttribute("flowRowCount", rowCount == null ? "-1" : rowCount);
}
String button = "true";
if("administrator".equals(userId)){
button="false";

View File

@ -9,15 +9,16 @@
String flowunid = CurPage.getParameter("FlowUnid");
String rightType = CurPage.getParameter("RightType");
String applytype = CurPage.getParameter("ApplyType");
BizObject boLET = JBOFactory.createBizObjectQuery(LC_EBANK_TEMP.CLASS_NAME, "flowunid=:flowunid")
.setParameter("flowunid", flowunid).getSingleResult(false);
String ownNumber = boLET.getAttribute("ownacc_number").getString();
BizObject boOA = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME, "acc_number=:ownNumber")
.setParameter("ownNumber", ownNumber).getSingleResult(false);
String ownId = boOA.getAttribute("own_id").getString();
BizObject boCL = JBOFactory.createBizObjectQuery(CODE_LIBRARY.CLASS_NAME, "CODENO='ManySubject' and bankno=:ownId")
.setParameter("ownId", ownId).getSingleResult(false);
String subjectId = boCL.getAttribute("itemno").getString();
// BizObject boLET = JBOFactory.createBizObjectQuery(LC_EBANK_TEMP.CLASS_NAME, "flowunid=:flowunid")
// .setParameter("flowunid", flowunid).getSingleResult(false);
// String ownNumber = boLET.getAttribute("ownacc_number").getString();
// BizObject boOA = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME, "acc_number=:ownNumber")
// .setParameter("ownNumber", ownNumber).getSingleResult(false);
// String ownId = boOA.getAttribute("own_id").getString();
// BizObject boCL = JBOFactory.createBizObjectQuery(CODE_LIBRARY.CLASS_NAME, "CODENO='ManySubject' and bankno=:ownId")
// .setParameter("ownId", ownId).getSingleResult(false);
// String subjectId = boCL.getAttribute("itemno").getString();
String subjectId = Sqlca.getString("select itemno from LC_EBANK_TEMP LET join OWN_ACCOUNT oc on LET.OWNACC_NUMBER = oc.acc_number left join code_library cl on codeno = 'ManySubject' and oc.own_id = cl.bankno where LET.FLOWUNID = '"+flowunid+"' limit 1");
//判断业务类型
String businessType="";
String orgId=CurUser.getOrgID().substring(0,7);
@ -33,6 +34,8 @@
}
}
ASObjectModel doTemp = new ASObjectModel("VILCFundPlanListtradition");
doTemp.setDataQueryClass("com.amarsoft.awe.dw.ui.list.FlowMonitorListHtmlGenerator");
CurPage.setAttribute("flowRowCount","100");
//检验客户名称是否为经销商
IsNullCheck inc = new IsNullCheck();
inc.setFlowUnid(flowunid);

View File

@ -36,6 +36,8 @@
}
}
ASObjectModel doTemp = new ASObjectModel("VILCRentPlanList");
doTemp.setDataQueryClass("com.amarsoft.awe.dw.ui.list.FlowMonitorListHtmlGenerator");
CurPage.setAttribute("flowRowCount","100");
//检验客户名称是否为经销商
IsNullCheck inc = new IsNullCheck();
inc.setFlowUnid(flowunid);

View File

@ -1979,6 +1979,28 @@
</managerProperties>
</manager>
</class>
<class name="VI_LC_RENT_PLAN_NEW" label="租金计划视图表(新)" keyAttributes="">
<attributes>
<attribute name="id" label="租金计划编号" type="STRING"/>
<attribute name="project_id" label="项目id" type="STRING"/>
<attribute name="contract_id" label="合同号" type="STRING"/>
<attribute name="payment_number" label="投放编号" type="STRING"/>
<attribute name="plan_list" label="期次" type="STRING"/>
<attribute name="plan_date" label="计划日期" type="STRING"/>
<attribute name="rent_over" label="租金余额" type="STRING"/>
<attribute name="corpus_over" label="本金余额" type="STRING"/>
<attribute name="interest_over" label="利息余额" type="STRING"/>
<attribute name="PROJECT_PLAN_NUMBER" label="项目方案编号" type="STRING"/>
<attribute name="CONTRACT_PLAN_NUMBER" label="合同方案编号" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_lc_rent_plan_new" />
</managerProperties>
</manager>
</class>
<class name="LC_CALC_SUBSECTION_TEMP" label="分段测算" keyAttributes="ID">
<attributes>
<attribute name="ID" label="标识" type="STRING" length="32"/>

View File

@ -3230,6 +3230,7 @@
<attribute name="SERIALNO" label="流水号" type="STRING"/>
<attribute name="RELATIVESERIALNO" label="上一流水号" type="STRING"/>
<attribute name="USERID" label="承办人编号" type="STRING"/>
<attribute name="DISTRIBUTOR_NAME" label="渠道商名称" type="STRING"/>
</attributes>
<manager>
<managerProperties>

View File

@ -0,0 +1,20 @@
package com.amarsoft.awe.dw.ui.list;
import com.amarsoft.awe.dw.ASDataObject;
import com.amarsoft.awe.dw.ui.htmlfactory.imp.DefaultListHtmlGenerator;
import javax.servlet.http.HttpServletRequest;
public class FlowMonitorListHtmlGenerator extends DefaultListHtmlGenerator {
@Override
public void initConstructParams(ASDataObject asObj, String indexName, String paramstr, int pageSize, int curPage, HttpServletRequest request) {
super.initConstructParams(asObj, indexName, paramstr, pageSize, curPage, request);
try {
this.rowCount = Integer.parseInt(asObj.getCurPage().getAttribute("flowRowCount") == null ? "-1" : asObj.getCurPage().getAttribute("flowRowCount"));
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -7,6 +7,7 @@ import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.ASResultSet;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
@ -174,7 +175,43 @@ public class ColRelativeInfo {
return "ÒÑÊÕ¿î";
}
}
}
public static String getFundPlanPayStatusNew(String planID) throws Exception {
Transaction sqlca = null;
String result = null;
try {
sqlca = Transaction.createTransaction(JBOFactory.createJBOTransaction());
ASResultSet asResultSet2 = sqlca.getASResultSet2("select plan_money,getSumFundMoney(payment_number,plan_list,fee_type,pay_type) as fact_money,pay_type from lc_fund_plan where id = '" + planID + "'");
if (asResultSet2.next()) {
double factMOney = asResultSet2.getDouble("fact_money");
double planmoney = asResultSet2.getDouble("plan_money");
String paytype = asResultSet2.getString("pay_type");
if ("pay_type_out".equals(paytype)) {
if (factMOney == 0) {
result = "灌마운";
} else if (planmoney - factMOney > 0) {
result = "꼬롸마운";
} else {
result = "綠마운";
}
} else {
if (factMOney == 0) {
result = "灌澗운";
} else if (planmoney - factMOney > 0) {
result = "꼬롸澗운";
} else {
result = "綠澗운";
}
}
}
asResultSet2.close();
sqlca.commit();
} catch (Exception e) {
e.printStackTrace();
if (sqlca != null) sqlca.rollback();
}
return result;
}
public static String getRentPlanPayStatus(String planID) throws Exception{

View File

@ -316,4 +316,123 @@ public class NameManager
Sqlca.disConnect();
return addressName;
}*/
public static String getCustomerName(String flowUnid, String flowNo, String contractId) throws Exception {
boolean state = false;
if ("BusinessApplyFlow,BusinessChangeFlow,BusinessCancelFlow".indexOf(flowNo) < 0) {
state = true;
}
if (state && contractId.length() == 0) {
return "";
} else {
Transaction Sqlca = null;
String customerName = "";
try {
Sqlca = Transaction.createTransaction("als");
String quySql = "select customer_name from lb_union_lessee_temp where FLOWUNID = '" + flowUnid + "' and is_main = 'Y' limit 1";
if (state) {
quySql = "select customer_name from lb_union_lessee where contract_id = '" + contractId + "' and is_main = 'Y' limit 1";
}
customerName = Sqlca.getString(quySql);
Sqlca.commit();
} catch (Exception e) {
Sqlca.rollback();
}
return customerName == null ? "" : customerName;
}
}
public static String getDistributorName(String flowUnid, String flowNo, String contractId) throws Exception {
boolean state = false;
if ("BusinessApplyFlow,BusinessChangeFlow,BusinessCancelFlow".indexOf(flowNo) < 0) {
state = true;
}
if (state && contractId.length() == 0) {
return "";
} else {
Transaction Sqlca = null;
String distirbutorName = "";
try {
Sqlca = Transaction.createTransaction("als");
String quySql = "select DISTRIBUTOR_NAME from lb_project_info_temp lpit join distributor_info di on lpit.distributor_id = di.distributor_no where FLOWUNID = '" + flowUnid + "'";
if (state) {
quySql = "select DISTRIBUTOR_NAME from lb_contract_info lci join distributor_info di on lci.distributor_id = di.distributor_no where lci.id = '" + contractId + "'";
}
distirbutorName = Sqlca.getString(quySql);
Sqlca.commit();
} catch (Exception e) {
Sqlca.rollback();
}
return distirbutorName == null ? "" : distirbutorName;
}
}
public static String getTelphone(String flowUnid, String flowNo, String contractId) throws Exception {
boolean state = false;
if ("BusinessApplyFlow,BusinessChangeFlow,BusinessCancelFlow".indexOf(flowNo) < 0) {
state = true;
}
if (state && contractId.length() == 0) {
return "";
} else {
Transaction Sqlca = null;
String tel = "";
try {
Sqlca = Transaction.createTransaction("als");
String quySql = "select ifnull(cct.tel,cpt.mobile) from lb_union_lessee_temp lult left join customer_company_temp cct on lult.FLOWUNID = cct.flowunid left join customer_person_temp cpt on lult.FLOWUNID = cpt.flowunid where lult.FLOWUNID = '" + flowUnid + "' and lult.IS_MAIN = 'Y' limit 1";
if (state) {
quySql = "select ifnull(cc.tel, cp.mobile) from lb_union_lessee lul left join customer_company cc on lul.CUSTOMER_ID = cc.customerid left join customer_person cp on lul.CUSTOMER_ID = cp.CUSTOMERID where lul.CONTRACT_ID = '" + contractId + "' and lul.IS_MAIN = 'Y' limit 1";
}
tel = Sqlca.getString(quySql);
Sqlca.commit();
} catch (Exception e) {
Sqlca.rollback();
}
return tel == null ? "" : tel;
}
}
public static String getFrameNumber(String flowUnid, String flowNo, String contractId) throws Exception {
boolean state = false;
if ("BusinessApplyFlow,BusinessChangeFlow,BusinessCancelFlow".indexOf(flowNo) < 0) {
state = true;
}
if (state && contractId.length() == 0) {
return "";
} else {
Transaction Sqlca = null;
String frameNum = "";
try {
Sqlca = Transaction.createTransaction("als");
String quySql = "select case when length(group_concat(FRAME_NUMBER)) < 5 then null else group_concat(FRAME_NUMBER) end from lb_equipment_car_temp where flowunid = '" + flowUnid + "'";
if (state) {
quySql = "select case when length(group_concat(FRAME_NUMBER)) < 5 then null else group_concat(FRAME_NUMBER) end from lb_equipment_car where contract_id = '" + contractId + "'";
}
frameNum = Sqlca.getString(quySql);
Sqlca.commit();
} catch (Exception e) {
Sqlca.rollback();
}
return frameNum == null ? "" : frameNum;
}
}
public static String getPlateNumber(String contractId) throws Exception {
Transaction Sqlca = null;
String plateNum = "";
try {
Sqlca = Transaction.createTransaction("als");
String quySql = "select group_concat(distinct lcl.plate_number) from LB_EQUIPMENT_CAR LEC join LB_CAR_LICENSE_PLATE_INFO lcl on LEC.CONTRACT_ID = lcl.contract_id and LEC.FRAME_NUMBER = lcl.frame_number where LEC.CONTRACT_ID = '" + contractId + "' and LEC.car_attribute = 'head'";
plateNum = Sqlca.getString(quySql);
Sqlca.commit();
} catch (Exception e) {
Sqlca.rollback();
}
return plateNum == null ? "" : plateNum;
}
}

View File

@ -326,29 +326,19 @@ public class AllinpayPaymentQueryRun implements Runnable{
}
}
public void insertMessage(BizObject boLRP,String finishAmount,JBOTransaction tx) throws Exception{
Transaction Sqlca =null;
ASResultSet rs = null;
ASResultSet rs2 = null;
Sqlca = Transaction.createTransaction(tx);
Transaction Sqlca = Transaction.createTransaction(tx);
String ln_contract_id = boLRP.getAttribute("contract_id").toString();
String ln_plan_date = boLRP.getAttribute("plan_date").toString();
String plan_list = boLRP.getAttribute("plan_list").toString();
String in_rent = finishAmount;
String sql2 = "select IFNULL(max(hire_list),0) as hire_list from lc_rent_income where contract_id='"+ln_contract_id+"' and plan_list = '"+plan_list+"'";
SqlObject asq2 = new SqlObject(sql2);
rs2 = Sqlca.getASResultSet(asq2);
String in_hire_list ="";
if(rs2.next()){
in_hire_list =Integer.parseInt(rs2.getString("hire_list"))+1+"";
}
String in_type = "5";
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','"+in_hire_list+"','"+in_type+"')}";
String SQL="{call proc_insert_hexiao('"+ln_contract_id+"','"+ln_plan_date+"','"+in_rent+"','1','5')}";
SqlObject asql = new SqlObject(SQL);
rs = Sqlca.getASResultSet(asql);
// ´ú³¥ºì³å´¦Àí
CollectAuditInfoCache caic = new CollectAuditInfoCache();
caic.writeBackDistributor(boLRP.getAttribute("ID").toString(), finishAmount, Sqlca);
ASResultSet rs = Sqlca.getASResultSet(asql);
if(rs.next()){
in_rent = rs.getString(1);
// 代偿红冲处理
CollectAuditInfoCache caic = new CollectAuditInfoCache();
caic.writeBackDistributor(boLRP.getAttribute("ID").toString(), in_rent, Sqlca);
}
rs.close();
}
}

View File

@ -11,6 +11,8 @@ import com.base.util.DateUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.voucher.CreateVoucherProcess.CreateVoucherDepositDeductionToMoney2;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@ -25,6 +27,10 @@ import com.base.util.QuartzUtil;
/**保证金抵扣租金*/
public class MarginDeduction implements Job{
private static Log logger = LogFactory.getLog(MarginDeduction.class);
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
@ -37,7 +43,7 @@ public class MarginDeduction implements Job{
BizObjectManager lriBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_RENT_INCOME");
BizObjectManager lfiBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_FUND_INCOME");
BizObjectManager lfpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.LC_FUND_PLAN");
BizObjectManager vlrpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.VI_LC_RENT_PLAN");
BizObjectManager vlrpBm = JBOFactory.getBizObjectManager("jbo.app.tenwa.calc.VI_LC_RENT_PLAN_NEW");
List<Map<String,String>> listData = DataOperatorUtil.getDataBySql("select cast(lfp.PLAN_MONEY as decimal(18,2))-cast(ifnull(lfit.fact_money,'0') as decimal(18,2))-cast(IfNULL(lfi.fact_money,'0') as decimal(18,2)) as fact_money,lci.id as contractId " +
"from lc_fund_plan lfp left join lb_contract_info lci on lci.id=lfp.CONTRACT_ID " +
" left join (select sum(fact_money) fact_money,PAYMENT_NUMBER from lc_fund_income_temp where FEE_TYPE='feetype16' and is_flowing='0' and ROLL_BACK='0' group by PAYMENT_NUMBER) lfit on lfp.PAYMENT_NUMBER=lfit.PAYMENT_NUMBER " +
@ -93,15 +99,14 @@ public class MarginDeduction implements Job{
money=money.subtract(corpusOver);
}
BizObject lrp = lrpBm.createQuery(" id=:id ").setParameter("id",vlrpBo.getAttribute("ID").toString()).getSingleResult(true);
BigDecimal drent = new BigDecimal(lriBo.getAttribute("CORPUS").toString()).add( new BigDecimal( lriBo.getAttribute("INTEREST").toString() ) );
BigDecimal rentOver = new BigDecimal(vlrpBo.getAttribute("rent_over").toString());
String fundIncomeId = UUID.randomUUID().toString().replaceAll("-","");
lriBo.setAttributeValue("PROJECT_ID",vlrpBo.getAttribute("PROJECT_ID"));
lriBo.setAttributeValue("PROJECT_PLAN_NUMBER",lrp.getAttribute("PROJECT_PLAN_NUMBER"));
lriBo.setAttributeValue("PROJECT_PLAN_NUMBER",vlrpBo.getAttribute("PROJECT_PLAN_NUMBER"));
lriBo.setAttributeValue("CONTRACT_ID",vlrpBo.getAttribute("CONTRACT_ID"));
lriBo.setAttributeValue("CONTRACT_PLAN_NUMBER",lrp.getAttribute("CONTRACT_PLAN_NUMBER"));
lriBo.setAttributeValue("CONTRACT_PLAN_NUMBER",vlrpBo.getAttribute("CONTRACT_PLAN_NUMBER"));
lriBo.setAttributeValue("PAYMENT_NUMBER",vlrpBo.getAttribute("PAYMENT_NUMBER"));
lriBo.setAttributeValue("PLAN_ID",vlrpBo.getAttribute("ID"));
lriBo.setAttributeValue("PLAN_LIST",vlrpBo.getAttribute("PLAN_LIST"));
@ -148,11 +153,11 @@ public class MarginDeduction implements Job{
lfiBm.saveObject(lfiBo);
if( drent.compareTo(rentOver) == 0 ){//如果租金等于应该租金修改租金计划表中的状态
lrp.setAttributeValue("COLLECT_STATUS","±£Ö¤½ðµÖ¿Û");
lrp.setAttributeValue("COLLECT_MSG","±£Ö¤½ðµÖ¿Û");
lrpBm.saveObject(lrp);
Sqlca.executeSQL("update lc_rent_plan set collect_status='±£Ö¤½ðµÖ¿Û',collect_msg='±£Ö¤½ðµÖ¿Û' where id = '" + vlrpBo.getAttribute("ID").toString() + "'");
}
logger.warn("contract_id:" + contractId + " plan_id:" + vlrpBo.getAttribute("ID").toString() + " fact_money:" + listData.get(i).get("fact_money"));
/**
* 生成凭证
*/
@ -166,7 +171,7 @@ public class MarginDeduction implements Job{
} catch (Exception e1) {
try {
if(tx!=null)tx.rollback();
if (tx != null) tx.rollback();
} catch (JBOException e) {
e.printStackTrace();
}