From b3170201c592386b1145f9409bc7728034b7ad44 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Thu, 20 Feb 2020 14:54:25 +0800 Subject: [PATCH] game startGame --- .../main/java/com/ccsens/game/service/ScreenService.java | 5 ++++- game/src/main/resources/application.yml | 4 ++-- .../main/java/com/ccsens/ht/service/DoctorService.java | 9 ++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/game/src/main/java/com/ccsens/game/service/ScreenService.java b/game/src/main/java/com/ccsens/game/service/ScreenService.java index e217a260..0b983b8d 100644 --- a/game/src/main/java/com/ccsens/game/service/ScreenService.java +++ b/game/src/main/java/com/ccsens/game/service/ScreenService.java @@ -687,7 +687,10 @@ public class ScreenService implements IScreenService{ switch (gameRecord.getGameStatus().byteValue()) { case GameConstant.GAME_PREPARATION: throw new BaseException(CodeEnum.GAME_PREPARATION); case GameConstant.GAME_PROCESSING: throw new BaseException(CodeEnum.GAME_PROCESSING); -// case GameConstant.GAME_COMPLETED: throw new BaseException(CodeEnum.GAME_COMPLETED); + case GameConstant.GAME_COMPLETED: + if (start.getStartStatus() == null || start.getStartStatus().byteValue() != GameConstant.GAME_RESTART_STATUS) { + throw new BaseException(CodeEnum.GAME_COMPLETED); + } } //更新状态和时间 diff --git a/game/src/main/resources/application.yml b/game/src/main/resources/application.yml index 5c2cd5c4..5889ff7f 100644 --- a/game/src/main/resources/application.yml +++ b/game/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: common, util-dev \ No newline at end of file + active: test + include: common, util-test \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java index 6b10a0d0..3b8afa29 100644 --- a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java @@ -181,9 +181,9 @@ public class DoctorService implements IDoctorService { if (position.getHasAudit()!=null && Constant.Ht.Position.HAS_AUDIT == position.getHasAudit()) { roles.add(Constant.Ht.Doctor.AUDIT); } - if (position.getHasManage()!=null && Constant.Ht.Position.HAS_MANAGE == position.getHasManage()) { - roles.add(Constant.Ht.Doctor.MANAGE); - } +// if (position.getHasManage()!=null && Constant.Ht.Position.HAS_MANAGE == position.getHasManage()) { +// roles.add(Constant.Ht.Doctor.MANAGE); +// } JsonResponse result; if (Constant.Ht.Doctor.CHECK_SUCCESS == audit.getAuditState()) { @@ -235,6 +235,7 @@ public class DoctorService implements IDoctorService { @Override public void run() { + log.info("添加审核通知:{}", maps); // 删除旧的审核通知 HtDoctorAuditExample auditExample = new HtDoctorAuditExample(); auditExample.createCriteria().andDoctorIdEqualTo(htDoctor.getId()); @@ -244,6 +245,7 @@ public class DoctorService implements IDoctorService { //添加新的通知 List audits = new ArrayList<>(); maps.forEach(map -> { + log.info("职位ID:{}", map); HtDoctorExample example1 = new HtDoctorExample(); example1.createCriteria().andPositionIdEqualTo(map.getLong("id")).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); //查找上级职务对应的医生 @@ -256,6 +258,7 @@ public class DoctorService implements IDoctorService { audit.setId(snowflake.nextId()); audit.setDoctorId(htDoctor.getId()); audit.setAuditorId(superior.getId()); + log.info("审核医生ID:{}", audit); audits.add(audit); }); });