给单据附件的数量进行限制,不能超出条数
This commit is contained in:
@@ -936,6 +936,14 @@ public class DepotHeadService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//校验附件的数量
|
||||
if(StringUtil.isNotEmpty(depotHead.getFileName())) {
|
||||
String[] fileArr = depotHead.getFileName().split(",");
|
||||
if(fileArr.length>4) {
|
||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_CODE,
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
|
||||
}
|
||||
}
|
||||
try{
|
||||
depotHeadMapper.insertSelective(depotHead);
|
||||
}catch(Exception e){
|
||||
@@ -1025,6 +1033,14 @@ public class DepotHeadService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//校验附件的数量
|
||||
if(StringUtil.isNotEmpty(depotHead.getFileName())) {
|
||||
String[] fileArr = depotHead.getFileName().split(",");
|
||||
if(fileArr.length>4) {
|
||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_CODE,
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
|
||||
}
|
||||
}
|
||||
try{
|
||||
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
|
||||
}catch(Exception e){
|
||||
|
||||
Reference in New Issue
Block a user