From e9b0678ce9965c4f9202afd01ba8eca461c0fd37 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 28 Jun 2018 10:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E5=85=B1=E5=90=8C=E7=94=B3=E8=AF=B7=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerFamilyJoinTempInfo.jsp | 66 ++++++ .../businessapply/CustomerFamilyJoin.java | 216 ++++++++++++++++++ 2 files changed, 282 insertions(+) create mode 100644 WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp create mode 100644 src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerFamilyJoin.java diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp new file mode 100644 index 000000000..06aee6e49 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/CustomerFamilyJoinTempInfo.jsp @@ -0,0 +1,66 @@ +<%@page import="com.tenwa.reckon.util.UUIDUtil"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2018-06-27 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = ""; + + String sTempletNo = "CustomerFamilyJoinTempInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + doTemp.setColTips("", ""); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + String FlowUnid = CurPage.getParameter("FlowUnid"); + String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+FlowUnid+"'"); +// dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));flowunid + "," + customerid + String Partner = Sqlca.getString("select Partner_ from CUSTOMER_FAMILY_TEMP where flowunid='"+FlowUnid+"'"); + System.out.print("+++++++++++++++++++++++++++++"+Partner); + if(Partner.equals("Y")){ + dwTemp.genHTMLObjectWindow(FlowUnid + "," + customerid); + }else{ + dwTemp.genHTMLObjectWindow(FlowUnid); + } + + + String sButtons[][] = { + {"true","","Button","保存","保存","newRecord()","","","","btn_icon_add"}, + //{"true","All","Button","保存","保存所有修改","save(0)","","","",""}, + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerFamilyJoin.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerFamilyJoin.java new file mode 100644 index 000000000..930e5e000 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/CustomerFamilyJoin.java @@ -0,0 +1,216 @@ +package com.tenwa.lease.flow.project.businessapply; + +import java.util.UUID; + +import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.reckon.util.UUIDUtil; + +public class CustomerFamilyJoin { + + private String flowunid; + private String status; + private String relative; + private String tel; + private String name; + private String certid; + private String customerid; + private String certtype; + private String userid; + private String orgid; + private String leas_from; + private String idexpiry; + private String project_source; + private String suname; + private String partner; + private String sposition; + private String suphone; + private String smincome; + private String shukou; + + public String getFlowunid() { + return flowunid; + } + + public void setFlowunid(String flowunid) { + this.flowunid = flowunid; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRelative() { + return relative; + } + + public void setRelative(String relative) { + this.relative = relative; + } + + public String getTel() { + return tel; + } + + public void setTel(String tel) { + this.tel = tel; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCertid() { + return certid; + } + + public void setCertid(String certid) { + this.certid = certid; + } + + public String getCustomerid() { + return customerid; + } + + public void setCustomerid(String customerid) { + this.customerid = customerid; + } + + public String getCerttype() { + return certtype; + } + + public void setCerttype(String certtype) { + this.certtype = certtype; + } + + public String getUserid() { + return userid; + } + + public void setUserid(String userid) { + this.userid = userid; + } + + public String getOrgid() { + return orgid; + } + + public void setOrgid(String orgid) { + this.orgid = orgid; + } + + public String getLeas_from() { + return leas_from; + } + + public void setLeas_from(String leas_from) { + this.leas_from = leas_from; + } + + public String getIdexpiry() { + return idexpiry; + } + + public void setIdexpiry(String idexpiry) { + this.idexpiry = idexpiry; + } + + public String getProject_source() { + return project_source; + } + + public void setProject_source(String project_source) { + this.project_source = project_source; + } + + public String getSuname() { + return suname; + } + + public void setSuname(String suname) { + this.suname = suname; + } + + public String getPartner() { + return partner; + } + + public void setPartner(String partner) { + this.partner = partner; + } + + public String getSposition() { + return sposition; + } + + public void setSposition(String sposition) { + this.sposition = sposition; + } + + public String getSuphone() { + return suphone; + } + + public void setSuphone(String suphone) { + this.suphone = suphone; + } + + public String getSmincome() { + return smincome; + } + + public void setSmincome(String smincome) { + this.smincome = smincome; + } + + public String getShukou() { + return shukou; + } + + public void setShukou(String shukou) { + this.shukou = shukou; + } + + public String saveCustomerFamily(JBOTransaction tx){ + try{ + //String customerid = UUIDUtil.getUUID(); + BizObjectManager bom = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME,tx); + BizObject bo = bom.createQuery("flowunid=:flowunid and Partner_=:partner").setParameter("flowunid", flowunid).setParameter("partner","Y").getSingleResult(true); + if(bo == null){ + bo = bom.newObject(); + bo.setAttributeValue("Partner_", "Y"); + bo.setAttributeValue("customerid", customerid); + bo.setAttributeValue("flowunid", flowunid); + bo.setAttributeValue("tel", tel); + bo.setAttributeValue("suname", suname); + bo.setAttributeValue("name", name); + bo.setAttributeValue("certid", certid); + bo.setAttributeValue("sposition", sposition); + bo.setAttributeValue("suphone", suphone); + bo.setAttributeValue("smincome", smincome); + bo.setAttributeValue("shukou", shukou); + bom.saveObject(bo); + return "1"; + }else{ + return "2"; + } + }catch(Exception e){ + e.printStackTrace(); + return "3"; + } + } + +}