配偶手机校验,经销商留言修改

This commit is contained in:
zzk 2023-09-13 12:11:49 +08:00
parent f28cca0d0a
commit 158c5d925c
4 changed files with 61 additions and 29 deletions

View File

@ -10,6 +10,9 @@
String orgid = CurPage.getUser().getOrgID();//当前登录部门
String communicationid = Sqlca.getString("select id from communication where flowunid = '"+flowunid+"' and phaseno = '"+phaseNo+"'");
if(communicationid==null){
communicationid = "null";
}
ASObjectModel doTemp = new ASObjectModel("COMMUNICATION_LIST");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
@ -32,7 +35,7 @@
function newRecord(){
var communicationid = "<%=communicationid%>";
if(communicationid == "" || communicationid == null){
if(communicationid=="null"){
var param = "flowunid=<%=flowunid%>&phaseNo=<%=phaseNo%>&taskno=<%=taskno%>&userid=<%=userid%>&orgid=<%=orgid%>";
var sUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_info.jsp";
AsDialog.PopView(sUrl,param,"resizable=yes;dialogWidth=1000px;dialogHeight=400px;center:yes;status:no;statusbar:no",function(){
@ -61,7 +64,15 @@
return ;
}
if(confirm('确实要删除吗?')){
as_delete(0);
var param = "flowunid=<%=flowunid%>,phaseNo=<%=phaseNo%>,taskno=<%=taskno%>,userid=<%=userid%>,orgid=<%=orgid%>,id="+id+",type=delete";
var Return = AsControl.RunJavaMethodTrans("com.tenwa.voucher.CreateVoucherProcess.Communicationsave","soleVerify",param);
if(Return=="true"){
alert("删除成功! ");
goBack();
}else{
alert("删除失败,请联系管理员! ");
return;
}
}
}
</script>

View File

@ -536,11 +536,12 @@
return;
}
}
RepeatReault = frame_list.checkRepeat(emergencyTel);//传参校验基本信息手机号和配偶是否重复
if(RepeatReault=="false"){
alert("紧急联系人1和配偶手机号有重复!");
return;
}
//2023/09/11 新增逻辑自然人承租人有配偶,配偶必须为紧急联系人
// RepeatReault = frame_list.checkRepeat(emergencyTel);//传参校验基本信息手机号和配偶是否重复
// if(RepeatReault=="false"){
// alert("紧急联系人1和配偶手机号有重复!");
// return;
// }
}
//检验紧急联系人2手机号重复
if(typeof(remark)!=undefined && remark != ''){
@ -558,11 +559,13 @@
return;
}
}
RepeatReault = frame_list.checkRepeat(remark);//传参校验基本信息手机号和配偶是否重复
if(RepeatReault=="false"){
alert("紧急联系人2和配偶手机号有重复!");
return;
}
// 123213
// 2023/09/11 新增逻辑自然人承租人有配偶,配偶必须为紧急联系人
// RepeatReault = frame_list.checkRepeat(remark);//传参校验基本信息手机号和配偶是否重复
// if(RepeatReault=="false"){
// alert("紧急联系人2和配偶手机号有重复!");
// return;
// }
}

View File

@ -8,6 +8,16 @@ import com.amarsoft.awe.util.Transaction;
public class Communicationsave {
private String type;
public String getType() {
return type;
}
public void setType(String id) {
this.type = type;
}
private String id;
public String getId() {
@ -76,6 +86,7 @@ public class Communicationsave {
tx= JBOFactory.createJBOTransaction();
String returns="true";
String id = this.id;
String type = this.type;
String taskno = this.taskno;
String flowunid = this.flowunid;
String phaseNo = this.phaseNo;
@ -84,9 +95,18 @@ public class Communicationsave {
String remark = this.remark;
try {
Transaction sqlca = Transaction.createTransaction(tx);
String ssql = "insert into communication(id,taskno,flowunid,phaseno,inputuser,inputorg,inputtime,remark)"+
"VALUES(replace(uuid(),'-',''),'"+taskno+"','"+flowunid+"','"+phaseNo+"','"+userid+"','"+orgid+"',replace(now(),'-','/'),'"+remark+"')";
String ssql = "";
if("null".equals(id)){
ssql = "insert into communication(id,taskno,flowunid,phaseno,inputuser,inputorg,inputtime,remark)"+
"VALUES(replace(uuid(),'-',''),'"+taskno+"','"+flowunid+"','"+phaseNo+"','"+userid+"','"+orgid+"',replace(now(),'-','/'),'"+remark+"')";
}else {
if ("delete".equals(type)){
ssql = "delete from communication where id = '"+id+"'";
}else {
ssql= "update communication set remark = '"+remark+"' where id = '"+id+"'";
}
}
SqlObject sqlObject = new SqlObject(ssql);
sqlca.executeSQL(sqlObject);
tx.commit();

View File

@ -148,8 +148,7 @@ public class CustomerInfoCheck {
//BizObject mobileLU=JBOFactory.createBizObjectQuery(LB_GUARANTEE_UNIT.CLASS_NAME,"MOBILE=:mobile").setParameter("mobile", this.mobile).getSingleResult(false);
//BizObject mobileLUT=JBOFactory.createBizObjectQuery(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,"FLOWUNID=:flowunid and MOBILE=:mobile").setParameter("flowunid", this.flowunid).setParameter("mobile", this.mobile).getSingleResult(false);
//if(mobileP==null && mobilePT==null && mobileF==null && mobileFT==null && mobileLU==null && mobileLUT==null){
//if(mobilePT==null && mobileFT==null && emergencycontacttel==null && remark==null && mobileFTSpouse==null)
if(mobilePT==null && mobileFT==null && mobileFTSpouse==null)
if(mobilePT==null && mobileFT==null && emergencycontacttel==null && remark==null && mobileFTSpouse==null)
{
return "SUCCESS";
}else{
@ -176,19 +175,18 @@ public class CustomerInfoCheck {
return "手机号跟承租人手机号重复!";
}
}
//2023/09/11 新增逻辑自然人承租人有配偶,配偶必须为紧急联系人
// else if(emergencycontacttel!=null){
// String id = emergencycontacttel.getAttribute("ID").getString();
// if(!id.equals(certId)){
// return "手机号跟紧急联系人1手机号重复";
// }
// }
// else if(remark!=null){
// String id = remark.getAttribute("ID").getString();
// if(!id.equals(certId)){
// return "手机号跟紧急联系人2手机号重复";
// }
// }
else if(emergencycontacttel!=null){
String id = emergencycontacttel.getAttribute("ID").getString();
if(!id.equals(certId)){
return "手机号跟紧急联系人1手机号重复";
}
}
else if(remark!=null){
String id = remark.getAttribute("ID").getString();
if(!id.equals(certId)){
return "手机号跟紧急联系人2手机号重复";
}
}
/*if(mobileLUT!=null){
String id = mobileLUT.getAttribute("ID").getString();
if(!id.equals(certId)){