经销商状态确认

This commit is contained in:
amarsoft 2018-08-28 10:13:43 +08:00
parent 527e923e29
commit 8f3eeb5bf4
2 changed files with 20 additions and 2 deletions

View File

@ -8,8 +8,9 @@
function newApply()
{
var CurOrgID=<%=CurOrg.getOrgID()%>;
var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Project/BusinessApplication/CheckDistributorStatus.jsp","CurOrgID="+CurOrgID);
if(sReturn!="true"){
//var sReturn = AsControl.RunJsp("/Tenwa/Lease/Flow/Project/BusinessApplication/CheckDistributorStatus.jsp","CurOrgID="+CurOrgID);
var sReturn = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDistributorStatus","id="+CurOrgID);
if(sReturn!="true"){
AsDebug.alert("警告","当前经销商未激活!");
return;
}

View File

@ -6,6 +6,7 @@ import jbo.app.tenwa.customer.CUSTOMER_FAMILY;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT;
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
@ -315,4 +316,20 @@ public class CustomerInfoCheck {
this.id = id;
}
public String checkDistributorStatus(JBOTransaction tx)throws Exception{
String mas="false";
Transaction Sqlca=null;
try {
Sqlca=Transaction.createTransaction(tx);
BizObjectManager disManage = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME, tx);
BizObject bo=disManage.createQuery("orgid=:orgid").setParameter("orgid",id).getSingleResult(false);
if(bo!=null&&"distributor_status04".equals(bo.getAttribute("distributor_status")==null?"":bo.getAttribute("distributor_status").getString())){
mas="true";
}
} catch (JBOException e) {
e.printStackTrace();
return "false";
}
return mas;
}
}