From 40b64d2711713795a278aea79127cf720c3784f0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 31 Aug 2022 10:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E7=A7=AF=E5=88=86=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PointAdditiveRuleServiceImpl.java | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdditiveRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdditiveRuleServiceImpl.java index 6b76e2aff6..1e7fecf8ce 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdditiveRuleServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdditiveRuleServiceImpl.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.SystemMessageType; import com.epmet.dao.PointAdditiveRuleDao; import com.epmet.dao.PointApplyDao; import com.epmet.dto.CategorydetailResultDTO; @@ -212,8 +213,12 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl result = baseDao.selectList4tree(dto); if (CollectionUtils.isNotEmpty(result)) { result.forEach(item -> { - if (item.getId().equals(rule.getId()) || item.getPid().equals(rule.getId())) { - item.setEditFlag(NumConstant.ZERO_STR); + if (null != rule) { + if (item.getId().equals(rule.getId()) || item.getPid().equals(rule.getId())) { + item.setEditFlag(NumConstant.ZERO_STR); + } else { + item.setEditFlag(NumConstant.ONE_STR); + } } else { item.setEditFlag(NumConstant.ONE_STR); } @@ -335,7 +340,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "支部委员会"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.ZBWYH); PointAdditiveRuleEntity zbdyh = baseDao.selectOne(wrapper); if (null == zbdyh) { zbdyh = new PointAdditiveRuleEntity(); @@ -343,7 +348,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "支部党员大会"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.ZBDYDH); PointAdditiveRuleEntity zbdydh = baseDao.selectOne(wrapper); if (null == zbdydh) { zbdydh = new PointAdditiveRuleEntity(); @@ -361,7 +366,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "党小组会"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.DXZH); PointAdditiveRuleEntity dxzh = baseDao.selectOne(wrapper); if (null == dxzh) { dxzh = new PointAdditiveRuleEntity(); @@ -379,7 +384,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "党课"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.DANGKE); PointAdditiveRuleEntity dk = baseDao.selectOne(wrapper); if (null == dk) { dk = new PointAdditiveRuleEntity(); @@ -397,7 +402,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "主题党日"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.ZTDR); PointAdditiveRuleEntity ztdr = baseDao.selectOne(wrapper); if (null == ztdr) { ztdr = new PointAdditiveRuleEntity(); @@ -415,7 +420,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl(); wrapper.eq(PointAdditiveRuleEntity::getCustomerId, customerId); wrapper.eq(PointAdditiveRuleEntity::getCategoryCode, "party_building"); - wrapper.eq(PointAdditiveRuleEntity::getCategoryName, "为民服务活动"); + wrapper.eq(PointAdditiveRuleEntity::getCategoryName, SystemMessageType.WMFWHD); PointAdditiveRuleEntity wmfwhd = baseDao.selectOne(wrapper); if (null == wmfwhd) { wmfwhd = new PointAdditiveRuleEntity(); @@ -433,7 +438,7 @@ public class PointAdditiveRuleServiceImpl extends BaseServiceImpl