档案柜号导入修改

This commit is contained in:
zhangjun 2020-04-13 17:56:04 +08:00
parent 17b9503ed4
commit 168b82726f
2 changed files with 12 additions and 8 deletions

View File

@ -20,11 +20,11 @@
<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%>
<%
String sButtons[][] = {
//{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
//{"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
//{"true","","Button","excel导入","excel导入","importExcel()","","","","btn_icon_import"},
//{"true","","Button","模版下载","模版下载","DiscountDownload()","","","","btn_icon_down",""},
{"true","","Button","excel导入","excel导入","importExcel()","","","","btn_icon_import"},
{"true","","Button","模版下载","模版下载","DiscountDownload()","","","","btn_icon_down",""},
};
%>
<%/*~END~*/%>
@ -43,12 +43,11 @@
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
function newRecord(){
var sUrl = "/Tenwa/Lease/Flow/Comm/LBImportPage/FileInformationImportInfo.jsp";
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=900px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(){
reloadSelf();},"新增信息");
}
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/Flow/Comm/LBImportPage/FileInformationImportInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){

View File

@ -44,6 +44,7 @@ public class MailingContainerNumberImport extends BaseImportExcelCallBack{
List<Map<String, String>> list = new ArrayList<Map<String,String>>();
Map<String, String> map = new HashMap<String, String>();
List<String> arrayList = new ArrayList<String>();
List<String> exclarrayList = new ArrayList<String>();
for(BizObject bo:importObjects){
ARCHIVING_CABINET_NO=bo.getAttribute("ARCHIVING_CABINET_NO").getString();
arrayList.add(ARCHIVING_CABINET_NO);
@ -52,13 +53,17 @@ public class MailingContainerNumberImport extends BaseImportExcelCallBack{
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(Sqlca, sql1, null);
// Óнá¹û¼¯, ˵Ã÷ÖØ¸´
if(dataList.size()>0){
error=",【邮寄柜号: "+ARCHIVING_CABINET_NO+"";
//error=",【邮寄柜号: "+ARCHIVING_CABINET_NO+"";
if(! exclarrayList.contains(ARCHIVING_CABINET_NO) ){
exclarrayList.add(ARCHIVING_CABINET_NO);
}
flag=true;
}
}
if(flag) {
error = error.substring(1);
throw new BusinessException(error+"已存在 ");
//error = error.substring(1);
//throw new BusinessException(error+"已存在 ");
throw new BusinessException("excl中的邮寄柜号:"+String.join(", ", exclarrayList)+"已存在 ");
}
long count = arrayList.stream().distinct().count();
boolean isRepeat = count < arrayList.size();