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