From 258aa9de7057b1fecf33ae6d3495d5dfc3f7f56e Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Tue, 8 Dec 2020 16:31:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=BD=91=E6=A0=BC=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E5=8C=96=E8=BF=90=E4=BD=9C=E6=89=93=E5=88=86=E3=80=91=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E8=AE=B0=E5=BD=95=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?-=E7=8E=8B=E5=85=AC=E5=B3=B0-2020-12-08?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SubCheckDictionaryServiceImpl.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java b/esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java index bbb876b69..eb1b06bfa 100644 --- a/esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/SubCheckDictionaryServiceImpl.java @@ -102,6 +102,12 @@ public class SubCheckDictionaryServiceImpl extends BaseServiceImpl 0) { + throw new RenException("您输入的考核编码已存在!"); + } + } SubCheckDictionaryEntity entity = ConvertUtils.sourceToTarget(dto, SubCheckDictionaryEntity.class); insert(entity); } @@ -115,6 +121,12 @@ public class SubCheckDictionaryServiceImpl extends BaseServiceImpl 0) { + throw new RenException("您输入的考核编码已存在!"); + } + } SubCheckDictionaryEntity entity = ConvertUtils.sourceToTarget(dto, SubCheckDictionaryEntity.class); updateById(entity); } @@ -126,7 +138,21 @@ public class SubCheckDictionaryServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); - wrapper.eq("checkLabel", dto.getCheckLabel()); + wrapper.eq("CHECK_LABEL", dto.getCheckLabel()); + String id = dto.getId(); + wrapper.ne(id != null, "id", dto.getId()); + wrapper.eq("del_flag", "0"); + return baseDao.selectCount(wrapper); + } + + /** + * 统计考核项code数量 + * @param dto + * @return + */ + public Integer getCheckCodeCount(SubCheckDictionaryDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("CHECK_CODE", dto.getCheckCode()); String id = dto.getId(); wrapper.ne(id != null, "id", dto.getId()); wrapper.eq("del_flag", "0");