经销商批量审核
This commit is contained in:
parent
31e2f47d1b
commit
46121abe0d
@ -0,0 +1,32 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-22
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
String distributor_id = CurPage.getParameter("distributor_id");
|
||||
String sTempletNo = "DistributorAccountFirstTrialInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
//doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
|
||||
//{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 returnList(){
|
||||
var distributor_id = "<%=distributor_id%>";
|
||||
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountFirstTrialList.jsp", "distributor_no="+distributor_id,"_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,43 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("DistributorAccountFirstTrialList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
String distributor_id = CurPage.getParameter("distributor_no").toString();
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(distributor_id);
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var distributor_id="<%=distributor_id%>";
|
||||
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountFirstTrialInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'SerialNo=' +sPara+'&distributor_id='+distributor_id ,'_self','');
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoImportfirstTrial.jsp", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,43 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("DistributorAccountReCheckList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("distributor_no"));
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"},
|
||||
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "";
|
||||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||
}
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoImportRecheck.jsp", "","_self","");
|
||||
}
|
||||
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,31 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "DistributorInfoIBatchmportInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
//doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
|
||||
//{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "north";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoImportfirstTrial.jsp", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,31 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "DistributorInfoIBatchmportInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
//doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
|
||||
//{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 returnList(){
|
||||
AsControl.OpenView("/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoImportRecheck.jsp", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,94 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("DistributorInfoImportRecheck");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","经销商账户","经销商账户","distributorAccountS()","","","","",""},
|
||||
{"true","","Button","提交申请","提交申请","submitRecheck()","","","","",""},
|
||||
{"true","","Button","退回申请","退回申请","backRecheck()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoIReCheckInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
function submitRecheck(){
|
||||
if(confirm('确定要提交申请吗?')){
|
||||
var sParm = getItemValueArray(0,"ID");
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 )
|
||||
{
|
||||
alert("请选择查提交申请的数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
var ids = "";
|
||||
for(var i = 0;i < sParm.length; i++){
|
||||
ids += sParm[i] +"@";
|
||||
}
|
||||
ids = ids.substr(0,ids.length-1);
|
||||
//alert(ids);
|
||||
spara = "Ids="+ids+",CurUserID=<%=CurUser.getUserID()%>";
|
||||
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.apzl.distributor.DistributorImportManager","submitRecheck",spara);
|
||||
alert(returnValue);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
|
||||
function backRecheck(){
|
||||
if(confirm('确定要提交申请吗?')){
|
||||
var sParm = getItemValueArray(0,"ID");
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 )
|
||||
{
|
||||
alert("请选择查提交申请的数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
var ids = "";
|
||||
for(var i = 0;i < sParm.length; i++){
|
||||
ids += sParm[i] +"@";
|
||||
}
|
||||
ids = ids.substr(0,ids.length-1);
|
||||
//alert(Ids);
|
||||
spara = "Ids="+ids+",CurUserID=<%=CurUser.getUserID()%>";
|
||||
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.apzl.distributor.DistributorImportManager","BackRecheck",spara);
|
||||
alert(returnValue);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function distributorAccountS(){
|
||||
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountReCheckList.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'distributor_no');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
|
||||
AsControl.OpenView(sUrl,'distributor_no=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,73 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-11-21
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("DistributorInfoImportfirstTrial");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","经销商账户","经销商账户","distributorAccount()","","","","",""},
|
||||
{"true","","Button","提交申请","提交申请","submitFirstTrial()","","","","",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
function submitFirstTrial(){
|
||||
if(confirm('确定要提交申请吗?')){
|
||||
var sParm = getItemValueArray(0,"ID");
|
||||
//alert(sParm);
|
||||
if(typeof(sParm) == "undefined" || sParm.length == 0 )
|
||||
{
|
||||
alert("请选择查提交申请的数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
var ids = "";
|
||||
for(var i = 0;i < sParm.length; i++){
|
||||
ids += sParm[i] +"@";
|
||||
}
|
||||
ids = ids.substr(0,ids.length-1);
|
||||
//alert(ids);
|
||||
spara = "Ids="+ids+",CurUserID=<%=CurUser.getUserID()%>";
|
||||
var returnValue = AsControl.RunJavaMethodTrans("com.tenwa.apzl.distributor.DistributorImportManager","submitFirstTrial",spara);
|
||||
alert(returnValue);
|
||||
reloadSelf();
|
||||
}
|
||||
}
|
||||
function distributorAccount(){
|
||||
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorAccountFirstTrialList.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'distributor_no');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
|
||||
AsControl.OpenView(sUrl,'distributor_no=' +sPara ,'_self','');
|
||||
}
|
||||
function newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/DistributorManage/DistributorApproval/DistributorInfoFirstTrialInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,129 @@
|
||||
package com.tenwa.apzl.distributor;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
|
||||
public class DistributorImportManager {
|
||||
private String Ids;
|
||||
|
||||
public String getIds() {
|
||||
return Ids;
|
||||
}
|
||||
|
||||
public void setIds(String ids) {
|
||||
Ids = ids;
|
||||
}
|
||||
/**
|
||||
* 提交经销商初审
|
||||
* @param tx
|
||||
* @return
|
||||
*/
|
||||
public String submitFirstTrial(JBOTransaction tx){
|
||||
String[] ids = this.getIds().split("@");
|
||||
BizObjectManager distributorInfoManager=null;
|
||||
try {
|
||||
distributorInfoManager = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME, tx);
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
String id = ids[i];
|
||||
//修改为复审状态
|
||||
distributorInfoManager.createQuery("update O set import_status='recheck' where id=:id")
|
||||
.setParameter("id", id).executeUpdate();
|
||||
|
||||
}
|
||||
|
||||
return "提交成功!";
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
return "提交失败!";
|
||||
}finally{
|
||||
if(tx !=null){
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 复审提交后将经销商改为激活状态
|
||||
* @param tx
|
||||
* @return
|
||||
*/
|
||||
public String submitRecheck(JBOTransaction tx){
|
||||
String[] ids = this.getIds().split("@");
|
||||
BizObjectManager distributorInfoManager=null;
|
||||
try {
|
||||
distributorInfoManager = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME, tx);
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
String id = ids[i];
|
||||
//修改为激活状态
|
||||
distributorInfoManager.createQuery("update O set distributor_status='distributor_status04' where id=:id")
|
||||
.setParameter("id", id).executeUpdate();
|
||||
|
||||
}
|
||||
|
||||
return "提交成功!";
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
return "提交失败!";
|
||||
}finally{
|
||||
if(tx !=null){
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 复审退回后将改为初审状态
|
||||
*/
|
||||
public String BackRecheck(JBOTransaction tx){
|
||||
String[] ids = this.getIds().split("@");
|
||||
BizObjectManager distributorInfoManager=null;
|
||||
BizObject distributorInfo=null;
|
||||
String returnMsg="";
|
||||
try {
|
||||
distributorInfoManager = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME, tx);
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
String id = ids[i];
|
||||
//判断经销商是否已激活,激活的不能退回
|
||||
distributorInfo = distributorInfoManager.createQuery("id=:id").setParameter("id", id).getSingleResult(false);
|
||||
String distributorStatus = distributorInfo.getAttribute("distributor_status")==null?"":distributorInfo.getAttribute("distributor_status").toString();
|
||||
if("".equals(distributorStatus) || distributorStatus==null){
|
||||
//修改为初审状态
|
||||
distributorInfoManager.createQuery("update O set import_status='firstTrial' where id=:id")
|
||||
.setParameter("id", id).executeUpdate();
|
||||
returnMsg = "退回成功!";
|
||||
}else{
|
||||
returnMsg = "激活的经销商不能退回!";
|
||||
}
|
||||
|
||||
}
|
||||
return returnMsg;
|
||||
} catch (JBOException e1) {
|
||||
e1.printStackTrace();
|
||||
return "退回失败!";
|
||||
}finally{
|
||||
if(tx !=null){
|
||||
try {
|
||||
tx.commit();
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user