From a012dbb7655372c3a6dd2d64e8965cec5f0a470a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 16:28:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF-heart=E8=81=94?= =?UTF-8?q?=E8=B0=83bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/work/CanceledActResultDTO.java | 5 +++ .../dto/result/work/FinishedActResultDTO.java | 5 +++ .../result/work/InProgressActResultDTO.java | 5 +++ .../dto/result/work/JoinedUserResultDTO.java | 6 +++ .../epmet/controller/WorkActController.java | 2 +- .../service/impl/GrantPointsServiceImpl.java | 3 ++ .../service/impl/WorkActDraftServiceImpl.java | 2 + .../service/impl/WorkActServiceImpl.java | 29 +++++++++++++-- .../service/impl/WorkActUserServiceImpl.java | 37 ++++++++++++++++--- .../resources/db/migration/epmet_heart.sql | 3 +- .../src/main/resources/mapper/ActInfoDao.xml | 11 ++++-- 11 files changed, 91 insertions(+), 17 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java index 887a457b4e..4c8b013287 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java @@ -52,4 +52,9 @@ public class CanceledActResultDTO implements Serializable { * 活动取消的原因 */ private String cancelReason; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java index 25f9d7e46b..6a23d0498b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java @@ -53,4 +53,9 @@ public class FinishedActResultDTO implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date actualEndTime; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java index 5e25e5fab0..c7c73f6a96 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java @@ -77,4 +77,9 @@ public class InProgressActResultDTO implements Serializable { @JsonIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date signUpStartTime; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java index 821364850a..aae8d212e7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java @@ -51,6 +51,12 @@ public class JoinedUserResultDTO implements Serializable { */ private Boolean signInFlag; + /** + * 已签到:signed_in; 默认"" + */ + @JsonIgnore + private String signInFlagStr; + /** * true: 是志愿者 false : 不是志愿者 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 7deae2b1af..81fd46ce1e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -73,7 +73,7 @@ public class WorkActController { * @return com.epmet.commons.tools.utils.Result * @param formDTO * @author yinzuomei - * @description 进行中活动列表 + * @description 进行中-活动列表 * @Date 2020/7/23 21:24 **/ @PostMapping("inprogresslist") diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java index ccdab4e19e..d761445c55 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; @@ -104,6 +105,7 @@ public class GrantPointsServiceImpl implements GrantPointsService { * @Date 2020/7/24 13:34 **/ @Override + @Transactional(rollbackFor = Exception.class) public void agree(GrantPointsFormDTO formDTO) { //是否是待处理 ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); @@ -148,6 +150,7 @@ public class GrantPointsServiceImpl implements GrantPointsService { * @Date 2020/7/24 15:03 **/ @Override + @Transactional(rollbackFor = Exception.class) public void deny(GrantPointsFormDTO formDTO) { //是否是待处理 ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index a1b008430e..1af9e0522b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java @@ -16,6 +16,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -92,6 +93,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { * @Date 2020/7/21 14:00 **/ @Override + @Transactional(rollbackFor = Exception.class) public SaveActDraftResultDTO saveAct(DraftActInfoFormDTO formDTO) { //保存活动属性 LatestActInfoDTO latestActInfoDTO=this.constructLatestActInfoDTO(formDTO); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 0a78b35470..39f8bc5226 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -534,28 +534,41 @@ public class WorkActServiceImpl implements WorkActService { // 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == -1 || nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 0) { + logger.info(String.format("当前时间%s报名截止时间%s处于报名中", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN))); //截止报名时间之前(包含报名时间截止时间点) if (!inProgressActResultDTO.getActQuotaCategory()) { //如果是不限制名额,则显示报名中 inProgressActResultDTO.setStatus("signing_up"); + logger.info("活动不限制名额,界面显示 报名中"); continue; } else { //固定名额,且已报名人数<活动需要人数显示报名中 if (inProgressActResultDTO.getActQuota() > inProgressActResultDTO.getSignedUp()) { + logger.info("活动限制名额,未报满,界面显示报名中"); inProgressActResultDTO.setStatus("signing_up"); continue; } else if (inProgressActResultDTO.getActQuota().equals(inProgressActResultDTO.getSignedUp())) { inProgressActResultDTO.setStatus("enough"); + logger.info("活动限制名额,且已报满,界面显示已报满"); continue; } } } else if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 1 - || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { + &&nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { + logger.info(String.format("当前时间%s报名截止时间%s活动预计开始时间%s界面显示截止报名", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); //活动报名截止-活动预计开始之间显示截止报名 inProgressActResultDTO.setStatus("end_sign_up"); continue; } else if (nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 1 || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 0) { + logger.info(String.format("当前时间%s活动预计开始时间%s界面显示已开始", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); //活动预计开始时间点之后,包含活动预计开始时间点,显示 已开始 inProgressActResultDTO.setStatus("in_progress"); continue; @@ -596,6 +609,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 17:26 **/ @Override + @Transactional(rollbackFor = Exception.class) public void cancelAct(CancelActFormDTO formDTO) { ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); if(null==actInfoDTO){ @@ -671,6 +685,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 19:49 **/ @Override + @Transactional(rollbackFor = Exception.class) public void saveActualTime(SaveActualTimeFormDTO formDTO) { if(formDTO.getActualStartTime().compareTo(formDTO.getActualEndTime())!=-1){ throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode()); @@ -736,6 +751,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 21:48 **/ @Override + @Transactional(rollbackFor = Exception.class) public void finishAct(String actId) { ActInfoDTO actInfoDTO=actInfoService.get(actId); if(null==actInfoDTO){ @@ -862,10 +878,13 @@ public class WorkActServiceImpl implements WorkActService { if(!actInfoDTO.getCreatedBy().equals(loginUserUtil.getLoginUserId())){ throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode()); } + //如果活动设置的分支大于0,需要判断是否已经处理完毕 //待处理事项为空时才可以结束活动 - List list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); - if(null!=list&&list.size()>0){ - throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); + if(actInfoDTO.getReward()>0){ + List list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); + if(null!=list&&list.size()>0){ + throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); + } } //先填写实际开始时间、实际结束时间 if(null==actInfoDTO.getActualStartTime()||null==actInfoDTO.getActualEndTime()){ @@ -882,6 +901,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/27 10:45 **/ @Override + @Transactional(rollbackFor = Exception.class) public void summaryAct(SummaryActFormDTO formDTO) { ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); if(null==actInfoDTO){ @@ -958,6 +978,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/27 13:55 **/ @Override + @Transactional(rollbackFor = Exception.class) public PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO) { ActInfoDTO originalActInfo=actInfoService.get(rePublishFormDTO.getActId()); if(null==originalActInfo){ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java index c2f121e972..87d8575e03 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java @@ -13,11 +13,15 @@ import com.epmet.constant.ReadFlagConstant; import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserLogDao; import com.epmet.dao.ActUserRelationDao; +import com.epmet.dto.ActInfoDTO; import com.epmet.dto.ActUserLogDTO; import com.epmet.dto.ActUserRelationDTO; import com.epmet.dto.HeartUserInfoDTO; import com.epmet.dto.form.UserMessageFormDTO; -import com.epmet.dto.form.work.*; +import com.epmet.dto.form.work.AactUserDetailFormDTO; +import com.epmet.dto.form.work.ActIdFormDTO; +import com.epmet.dto.form.work.AuditUserFormDTO; +import com.epmet.dto.form.work.UserHistoricalActFormDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.work.*; import com.epmet.entity.ActInfoEntity; @@ -25,6 +29,7 @@ import com.epmet.entity.ActUserLogEntity; import com.epmet.entity.ActUserRelationEntity; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; import com.epmet.service.HeartUserInfoService; import com.epmet.service.WorkActUserService; @@ -32,6 +37,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -62,6 +68,8 @@ public class WorkActUserServiceImpl implements WorkActUserService { private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; @Autowired private LoginUserUtil loginUserUtil; + @Autowired + private ActInfoService actInfoService; /** * @param formDTO * @return java.util.List @@ -358,6 +366,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { * @Date 2020/7/23 17:30 **/ @Override + @Transactional(rollbackFor = Exception.class) public void auditPass(String actUserRelationId) { ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(actUserRelationId); if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ @@ -404,6 +413,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { * @Date 2020/7/23 18:14 **/ @Override + @Transactional(rollbackFor = Exception.class) public void auditRefuse(AuditUserFormDTO formDTO) { ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(formDTO.getActUserRelationId()); if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ @@ -451,6 +461,11 @@ public class WorkActUserServiceImpl implements WorkActUserService { **/ @Override public List queryJoinUserList(ActIdFormDTO formDTO) { + ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); + if(null==actInfoDTO){ + logger.error("act_info is null"); + return new ArrayList<>(); + } List list=actInfoDao.queryJoinUserList(formDTO.getActId()); if(null!=list&&list.size()>0){ //查询已通过审核的人员id集合 @@ -458,11 +473,21 @@ public class WorkActUserServiceImpl implements WorkActUserService { //根据已通过的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfoList(userIdList); for(JoinedUserResultDTO joinedUserResultDTO:list){ - //积分描述赋值 - if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ - joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); - }else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ - joinedUserResultDTO.setPointsDes("积分+0"); + if(actInfoDTO.getActStatus().equals(ActConstant.ACT_STATUS_FINISHED)){ + //积分描述赋值 + if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ + joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); + }else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ + joinedUserResultDTO.setPointsDes("积分+0"); + } + }else{ + logger.info("当前活动未结束,活动状态:"+actInfoDTO.getActStatus()); + joinedUserResultDTO.setPointsDes(StrConstant.EPMETY_STR); + } + if(ActConstant.ACT_USER_STATUS_SIGNED_IN.equals(joinedUserResultDTO.getSignInFlagStr())){ + joinedUserResultDTO.setSignInFlag(true); + }else{ + joinedUserResultDTO.setSignInFlag(false); } //志愿者标识赋值 joinedUserResultDTO.setVolunteerFlag(this.getVolunteerFlag(joinedUserResultDTO.getUserId())); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql index c2b485aaf5..67ee2b23de 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql @@ -11,7 +11,7 @@ Target Server Version : 50728 File Encoding : 65001 - Date: 28/07/2020 13:38:27 + Date: 28/07/2020 15:17:47 */ SET NAMES utf8mb4; @@ -175,7 +175,6 @@ CREATE TABLE `act_point_log` ( `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(给分或者不给分,以及重新处理插入本表)', `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', - `POINT_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '加积分:add ; 减积分:subtract', `POINTS` int(11) NOT NULL COMMENT '积分值', `OPERATE_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型:\r\n同意给分agree; 不给分:deny;重新处理: reset', `REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注:拒绝给分和重新处理时录入的理由', diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 2c83ec6ded..3828a814f8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -483,7 +483,8 @@ AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) ) AS signedUp, ai.SIGN_UP_END_TIME as signUpEndTime, - ai.SIGN_UP_START_TIME as signUpStartTime + ai.SIGN_UP_START_TIME as signUpStartTime, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -502,7 +503,8 @@ ai.ACT_START_TIME AS actStartTime, ai.ACT_END_TIME AS actEndTime, ai.CANCEL_TIME AS cancelTime, - ai.CANCEL_REASON AS cancelReason + ai.CANCEL_REASON AS cancelReason, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -522,7 +524,8 @@ ai.ACT_START_TIME AS actStartTime, ai.ACT_END_TIME AS actEndTime, ai.ACTUAL_START_TIME as actualStartTime, - ai.ACTUAL_END_TIME as actualEndTime + ai.ACTUAL_END_TIME as actualEndTime, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -539,7 +542,7 @@ aur.id as actUserRelationId, aur.ACT_ID , aur.USER_ID , - aur.SIGN_IN_FLAG, + aur.SIGN_IN_FLAG as signInFlagStr, aur.CREATED_TIME as signUpTime, ai.REWARD, aur.REWARD_FLAG,