自动卡扣取消设置增加重复检验
This commit is contained in:
parent
b5aa6e3574
commit
e63b736d8d
@ -17,12 +17,20 @@
|
||||
};
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function goBack(){
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord(sPostEvents) {
|
||||
as_save("myiframe0", "goBack()");
|
||||
function goBack(){
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord(sPostEvents) {
|
||||
|
||||
var dealersnumber = getItemValue(0,0,"dealers_number");
|
||||
var id = getItemValue(0,0,"ID");
|
||||
var checkMessage = RunJavaMethodTrans("com.tenwa.customer.controller.group.CheckMessageWay","checkMessageWay","id="+id+",dealersnumber="+dealersnumber);
|
||||
if(checkMessage != "true" ){
|
||||
alert(checkMessage);
|
||||
return;
|
||||
}
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
|
||||
// 扣款方式;
|
||||
function selectdeductions(){
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
package com.tenwa.customer.controller.group;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.reckon.util.Conn;
|
||||
|
||||
public class CheckMessageWay {
|
||||
|
||||
private String dealersnumber;//渠道编号
|
||||
private String id;
|
||||
|
||||
|
||||
|
||||
public String getDealersnumber() {
|
||||
return dealersnumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDealersnumber(String dealersnumber) {
|
||||
this.dealersnumber = dealersnumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//校验自动卡扣取消设置渠道商是否重复
|
||||
public String checkMessageWay(JBOTransaction tx) throws Exception{
|
||||
Conn conn = new Conn(tx);
|
||||
String sql = "select id from DEDUCTIONS_WAY where dealers_number=? ";
|
||||
List<Map<String, String>> results = conn.executeQuery(sql, dealersnumber);
|
||||
if(id==null&&results.size()>0){
|
||||
return "渠道商已存在!!!";
|
||||
}else if (id != null ){
|
||||
for (Map<String, String> map : results) {
|
||||
if(!id.equals(map.get("id"))){
|
||||
return "渠道商已存在!!!";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "true";
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user