Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhangjun
This commit is contained in:
commit
e290862350
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
debugger;
|
||||
var name = getItemValue(0,0,"name");
|
||||
var certid = getItemValue(0,0,"certid");
|
||||
var shukou = getItemValue(0,0,"shukou");
|
||||
var suname = getItemValue(0,0,"suname");
|
||||
var suphone = getItemValue(0,0,"suphone");
|
||||
var sposition = getItemValue(0,0,"sposition");
|
||||
var smincome = getItemValue(0,0,"smincome");
|
||||
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerFamilyJoin","saveCustomerFamily",
|
||||
"customerid=<%=UUIDUtil.getUUID()%>,flowunid=<%=FlowUnid%>,tel="+getItemValue(0,0,"tel")+",name="+getItemValue(0,0,"name")+",certid="+getItemValue(0,0,"certid")+",shukou="+getItemValue(0,0,"shukou")+",suname="+getItemValue(0,0,"suname")+",suphone="+getItemValue(0,getRow(0),"suphone")+",sposition="+getItemValue(0,getRow(0),"sposition")+",smincome="+getItemValue(0,getRow(0),"smincome"));
|
||||
if(sResult == "1"){
|
||||
alert("新增成功!");
|
||||
reloadSelf();
|
||||
}
|
||||
if(sResult == "2"){
|
||||
alert("已存在共同申请人!");
|
||||
reloadSelf();
|
||||
}
|
||||
if(sResult == "3"){
|
||||
alert("新增失败!");
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user