|
|
@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.IcExportItemListFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.form.IcExportTemplateSaveFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
@ -120,6 +121,12 @@ public class IcExportTemplateServiceImpl extends BaseServiceImpl<IcExportTemplat |
|
|
|
if (formDTO.getIsSaveTemp()) { |
|
|
|
List<IcExportTemplateDTO> templist = baseDao.selectByAgencyId(agencyInfo.getId()); |
|
|
|
if (!CollectionUtils.isEmpty(templist)) { |
|
|
|
//增加校验 同组织内模板名不能重复
|
|
|
|
templist.forEach(t -> { |
|
|
|
if (formDTO.getName().equals(t.getName())) { |
|
|
|
throw new EpmetException(9999, "当前组织下已存在相同名称的模板!", "当前组织下已存在相同名称的模板!"); |
|
|
|
} |
|
|
|
}); |
|
|
|
sort = templist.get(NumConstant.ZERO).getSort() + NumConstant.ONE; |
|
|
|
} |
|
|
|
tempId = UUID.randomUUID().toString().replace("-", ""); |
|
|
|