法人查询

自然人查询

handler.initdisplayedit方法
This commit is contained in:
liujiaji 2018-07-29 15:16:33 +08:00
parent da44eb8836
commit b6d0cd1438
4 changed files with 201 additions and 2 deletions

View File

@ -36,7 +36,6 @@ public class SupplementBO implements Serializable{
ProductId = fieldMap.get("product_id") == null ? "" : fieldMap.get("product_id").toString();
ContractId = fieldMap.get("id") == null ? "" : fieldMap.get("id").toString();
ProjectName = fieldMap.get("project_name") == null ? "" : fieldMap.get("project_name").toString();
Map<String, Object> map = new HashMap<String, Object>();
BaseFlowStartAction action = new BaseFlowStartAction();
map.put("ApplyType", ApplyType);

View File

@ -0,0 +1,100 @@
package apx.com.amarsoft.als.base.awe.execute.manage;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import jbo.app.tenwa.customer.CUSTOMER_INFO;
import jbo.app.tenwa.customer.CUSTOMER_TYPE;
import apx.com.amarsoft.als.base.awe.AbstractAweDoQueryManage;
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.are.lang.StringX;
import com.amarsoft.awe.util.Transaction;
import com.base.util.ReturnMapUtil;
public class CustomerCompanyDoQueryManage extends AbstractAweDoQueryManage {
private String sAddWhere;
private String dono;
private Map<String, Object> fieldMap;
protected void initDisplayForAdd(BizObject bo) throws JBOException {
String customerId = fieldMap.get("customerId").toString();
BizObject cust = JBOFactory
.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME)
.createQuery("customerid=:customerid ")
.setParameter("customerid", customerId).getSingleResult(false);
BizObject custtype = JBOFactory
.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME)
.createQuery(
"customerid=:customerid and custtype='cust_type.cust'")
.setParameter("customerid", customerId).getSingleResult(false);
// 将客户注册信息带初始化至客户基本信息中
bo.setAttributeValue("customerid", customerId);
bo.setAttributeValue("status", custtype.getAttribute("custstatus")
.getString());
bo.setAttributeValue("enterprisename", cust
.getAttribute("customername").getString());
bo.setAttributeValue("certtype", cust.getAttribute("certtype")
.getString());
bo.setAttributeValue("certid", cust.getAttribute("certid").getString());
bo.setAttributeValue("countrycode", cust.getAttribute("nationcode")
.getString());
// super.initDisplayForEdit(bo);
}
protected void initDisplayForEdit(BizObject bo) throws JBOException {
String customerId = fieldMap.get("customerId").toString();
BizObject cust = JBOFactory
.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME)
.createQuery("customerid=:customerid ")
.setParameter("customerid", customerId).getSingleResult(false);
BizObject custtype = JBOFactory
.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME)
.createQuery(
"customerid=:customerid and custtype='cust_type.cust'")
.setParameter("customerid", customerId).getSingleResult(false);
// 将客户注册信息带初始化至客户基本信息中
bo.setAttributeValue("customerid", customerId);
bo.setAttributeValue("status", custtype.getAttribute("custstatus")
.getString());
bo.setAttributeValue("enterprisename", cust
.getAttribute("customername").getString());
bo.setAttributeValue("certtype", cust.getAttribute("certtype")
.getString());
bo.setAttributeValue("certid", cust.getAttribute("certid").getString());
bo.setAttributeValue("countrycode", cust.getAttribute("nationcode")
.getString());
// super.initDisplayForEdit(bo);
}
public void setFieldMap(Map<String, Object> fieldMap) {
this.fieldMap = fieldMap;
}
public void setDono(String dono) {
this.dono = dono;
}
public void getGroupId() {
sGroupId = this.dono;
}
public void getOtherWhere() {
super.sOtherWhere = StringX.isSpace(sAddWhere) ? "" : this.sAddWhere;
}
public void setsAddWhere(String sAddWhere) {
this.sAddWhere = sAddWhere;
}
public Map<String, Object> queryDefaultDo(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception {
setParamMap(fieldMap);
return getData(request, sqlca, tx, ReturnMapUtil);
}
}

View File

@ -0,0 +1,100 @@
package apx.com.amarsoft.als.base.awe.execute.manage;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import jbo.app.tenwa.customer.CUSTOMER_INFO;
import jbo.app.tenwa.customer.CUSTOMER_TYPE;
import apx.com.amarsoft.als.base.awe.AbstractAweDoQueryManage;
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.are.lang.StringX;
import com.amarsoft.awe.util.Transaction;
import com.base.util.ReturnMapUtil;
public class CustomerPersonDoQueryManage extends AbstractAweDoQueryManage {
private String sAddWhere;
private String dono;
private Map<String, Object> fieldMap;
protected void initDisplayForAdd(BizObject bo) throws JBOException {
String customerId = this.fieldMap.get("customerId").toString();
BizObject cust = JBOFactory
.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME)
.createQuery("customerid=:customerid ")
.setParameter("customerid", customerId).getSingleResult(false);
BizObject custtype = JBOFactory
.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME)
.createQuery(
"customerid=:customerid and custtype='cust_type.cust'")
.setParameter("customerid", customerId).getSingleResult(false);
// 将客户注册信息带初始化至客户基本信息中
bo.setAttributeValue("CUSTOMERID", customerId);
bo.setAttributeValue("FULLNAME", cust.getAttribute("customername")
.getString());
bo.setAttributeValue("status", custtype.getAttribute("custstatus")
.getString());
bo.setAttributeValue("CERTTYPE", cust.getAttribute("certtype")
.getString());
bo.setAttributeValue("CERTID", cust.getAttribute("certid").getString());
bo.setAttributeValue("COUNTRY", cust.getAttribute("nationcode")
.getString());
}
protected void initDisplayForEdit(BizObject bo) throws JBOException {
String customerId = this.fieldMap.get("customerId").toString();
BizObject cust = JBOFactory
.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME)
.createQuery("customerid=:customerid ")
.setParameter("customerid", customerId).getSingleResult(false);
BizObject custtype = JBOFactory
.getBizObjectManager(CUSTOMER_TYPE.CLASS_NAME)
.createQuery(
"customerid=:customerid and custtype='cust_type.cust'")
.setParameter("customerid", customerId).getSingleResult(false);
// 将客户注册信息带初始化至客户基本信息中
bo.setAttributeValue("CUSTOMERID", customerId);
bo.setAttributeValue("FULLNAME", cust.getAttribute("customername")
.getString());
bo.setAttributeValue("status", custtype.getAttribute("custstatus")
.getString());
bo.setAttributeValue("CERTTYPE", cust.getAttribute("certtype")
.getString());
bo.setAttributeValue("CERTID", cust.getAttribute("certid").getString());
bo.setAttributeValue("COUNTRY", cust.getAttribute("nationcode")
.getString());
}
public void setFieldMap(Map<String, Object> fieldMap) {
this.fieldMap = fieldMap;
}
public void setDono(String dono) {
this.dono = dono;
}
public void getGroupId() {
sGroupId = this.dono;
}
public void getOtherWhere() {
super.sOtherWhere = StringX.isSpace(sAddWhere) ? "" : this.sAddWhere;
}
public void setsAddWhere(String sAddWhere) {
this.sAddWhere = sAddWhere;
}
public Map<String, Object> queryDefaultDo(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception {
setParamMap(fieldMap);
return getData(request, sqlca, tx, ReturnMapUtil);
}
}

View File

@ -18,7 +18,7 @@ public class SelectContractServiceImpl implements SelectContractService {
public Map<String, Object> selectContract(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception {
String sSelName = "SelectContract";
String sSelName = "SelectContractForSupport";
SelectCatalogWin select = new SelectCatalogWin(sSelName, tx, sqlca,
request);
ASUser curUser = new ASUser((String) request.getSession().getAttribute(