新增病例新增开关、病例修改开关、首页弹窗
This commit is contained in:
+21
@@ -321,6 +321,27 @@ public class ExpertController {
|
||||
return ResponseDTO.app_ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "病例新增开关")
|
||||
@GetMapping("/user/getCaseNewSwitch")
|
||||
public ResponseDTO<String> getCaseNewSwitch() {
|
||||
ConfigVO configVO = configService.getConfig(ConfigKeyEnum.CaseNewSwitch);
|
||||
return ResponseDTO.app_ok(configVO.getConfigValue());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "病例修改开关")
|
||||
@GetMapping("/user/getCaseUpdateSwitch")
|
||||
public ResponseDTO<String> getCaseUpdateSwitch() {
|
||||
ConfigVO configVO = configService.getConfig(ConfigKeyEnum.CaseUpdateSwitch);
|
||||
return ResponseDTO.app_ok(configVO.getConfigValue());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "首页弹窗内容")
|
||||
@GetMapping("/user/getIndexNotice")
|
||||
public ResponseDTO<String> getIndexNotice() {
|
||||
ConfigVO configVO = configService.getConfig(ConfigKeyEnum.IndexNotice);
|
||||
return ResponseDTO.app_ok(configVO.getConfigValue());
|
||||
}
|
||||
|
||||
@NoNeedLogin
|
||||
@ApiOperation(value = "操作说明")
|
||||
@GetMapping("/user/getRubric")
|
||||
|
||||
+13
-2
@@ -41,8 +41,7 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.NO_PERMISSION_EDIT;
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.PROJECT_CLOSE;
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.*;
|
||||
|
||||
@Service
|
||||
public class MedicalRecordService {
|
||||
@@ -104,6 +103,12 @@ public class MedicalRecordService {
|
||||
|
||||
@Transactional
|
||||
public ResponseDTO<String> add(MedicalRecordAddForm addForm){
|
||||
|
||||
ConfigVO caseSwitch = configService.getConfig(ConfigKeyEnum.CaseNewSwitch);
|
||||
if(caseSwitch.getConfigValue().equals("false")){
|
||||
return ResponseDTO.error(CASE_NEW_CLOSE);
|
||||
}
|
||||
|
||||
ConfigVO caseNum = configService.getConfig(ConfigKeyEnum.CaseNum);
|
||||
int total = medicalRecorDao.getTotal();
|
||||
if(Integer.parseInt(caseNum.getConfigValue()) <= total){
|
||||
@@ -279,6 +284,12 @@ public class MedicalRecordService {
|
||||
|
||||
@Transactional
|
||||
public ResponseDTO<String> update(MedicalRecordUpdateForm updateForm){
|
||||
|
||||
ConfigVO caseSwitch = configService.getConfig(ConfigKeyEnum.CaseUpdateSwitch);
|
||||
if(caseSwitch.getConfigValue().equals("false")){
|
||||
return ResponseDTO.error(CASE_UPDATE_CLOSE);
|
||||
}
|
||||
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
Long medicalRecordId = updateForm.getId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user