付款申请退回在提交显示“再次提交”标识,经销额度池不足不允许发起付款申请

This commit is contained in:
tangfutang 2019-11-17 18:39:54 +08:00
parent 54e321218f
commit 6cc15d00c1
4 changed files with 82 additions and 4 deletions

View File

@ -30,6 +30,13 @@
var proj_name = sReturn[4];
var contract_no = sReturn[5];
var customername = sReturn[6];
//校验经销商额度是否充足
var checkTotal = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","checkTotal","contractId="+contract_id);
if("true" !=checkTotal ){
alert(checkTotal);
return ;
}
var gpsVendor = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.GpsVendorCheck","getGpsVendor","productId="+productId);
var sParams = "ContractId="+contract_id+",FlowKey="+contract_no+",ProjectId="+proj_id+",ProductId="+productId+",contract_number="+contract_number+",ProjectName="+(contract_no+"-"+customername)+",applyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>,gpsVendor="+gpsVendor;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.flow.action.comm.BaseFlowStartAction","initFLow",sParams);

View File

@ -1,11 +1,15 @@
package com.tenwa.customer.controller.group;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_GROUP_COMPANY;
import jbo.app.tenwa.customer.DISTRIBUTOR_GROUP_COMPANY;
import jbo.app.tenwa.customer.DISTRIBUTOR_GROUP_RELATION;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.own.COUNTRY_DISTRICT_INFO;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
import jbo.sys.CODE_LIBRARY;
import com.amarsoft.are.jbo.BizObject;
@ -13,6 +17,8 @@ import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.BizObjectQuery;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.dw.ui.page.body.imp.Integer;
import com.tenwa.reckon.util.Conn;
public class CustomerGroupCompanyController {
@ -23,6 +29,7 @@ public class CustomerGroupCompanyController {
private String flowunid;
private String ITEMNO = "";
private String SORTNO = "";
private String contractId;
public String getITEMNO() {
return ITEMNO;
@ -81,6 +88,15 @@ public class CustomerGroupCompanyController {
this.group_no = group_no;
}
public String getContractId() {
return contractId;
}
public void setContractId(String contractId) {
this.contractId = contractId;
}
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param tx
@ -216,8 +232,18 @@ public class CustomerGroupCompanyController {
}
}
//校验经销商额度是否足够
public String checkTotal(JBOTransaction tx) throws Exception{
Conn conn = new Conn(tx);
String sql = "SELECT IFNULL(di.total,0)-IFNULL(lcc.CLEAN_LEASE_MONEY,0) total FROM lb_contract_info lci LEFT JOIN DISTRIBUTOR_INFO di ON di.distributor_no=lci.distributor_id LEFT JOIN LC_CALC_CONDITION lcc ON lcc.contract_id=lci.id WHERE lci.id=? ";
List<Map<String, String>> results = conn.executeQuery(sql, this.contractId);
String istotal = results.get(0).get("total");
if(new Double(istotal)>0){
return "true";
}
return "经销商额度不足!";
}

View File

@ -0,0 +1,46 @@
package com.tenwa.flow.fund.flowpayment;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.sys.FLOW_TASK;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.lang.DataElement;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.comm.service.LeaseFlowBaseService;
import com.tenwa.lease.flow.comm.service.ServiceOperatorEnum;
import com.tenwa.lease.flow.comm.serviceImp.LeaseFlowBaseServiceImp;
/**
* 拷贝合同数据到临时表
* @author zhulh
*
*/
public class SubmitAgainLabel extends BaseBussiness{
public Object run(Transaction Sqlca) throws Exception{
this.initBussinessParam(Sqlca.getTransaction());
String sFlowUnid = (String)this.getAttribute("ObjectNo");
BizObjectManager ftManage = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME);
List<BizObject> resultList = ftManage.createQuery(" objectno=:flowUnid and phaseno='0010' ").setParameter("flowUnid", sFlowUnid).getResultList(false);
if(resultList.size()>1){
BizObjectManager fboManage = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
BizObject fbo = fboManage.createQuery("flow_unid=:flowUnid ").setParameter("flowUnid", sFlowUnid).getSingleResult(true);
if( fbo!= null){
String proj_name = fbo.getAttribute("proj_name").toString();
if(proj_name.indexOf("再次提交")<0){
fbo.setAttributeValue("proj_name", proj_name+"_再次提交");
fboManage.saveObject(fbo);
}
}
}
return "true";
}
}

View File

@ -34,7 +34,6 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness {
this.initBussinessParam(Sqlca);
Map<String,String>fromCondtion=new HashMap<String,String>();
fromCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
String customerType = this.getAttribute("customertype").toString();
String flowName = this.getAttribute("FlowName").toString();
Map<String,String> other=new HashMap<String, String>();
@ -49,7 +48,7 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness {
fromCondtion.put("customerid", union.getAttribute("customer_id").getString());
if("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowName)&&"01".equals(this.getAttribute("customertype").toString())){
DataOperatorUtil.copyJBOSet(CUSTOMER_COMPANY.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY_TEMP.CLASS_NAME, null, other, null, Sqlca);
}else if ("03".equals(customerType)){
}else{
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca);
}
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondtion, CUSTOMER_CERT_TEMP.CLASS_NAME, null, other, null, Sqlca);