Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop
This commit is contained in:
@@ -3,6 +3,7 @@ package com.openhis.web.appointmentmanage.appservice.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.appointmentmanage.domain.DoctorSchedule;
|
||||
import com.openhis.appointmentmanage.mapper.DoctorScheduleMapper;
|
||||
import com.openhis.appointmentmanage.service.IDoctorScheduleService;
|
||||
import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -14,6 +15,9 @@ import java.util.List;
|
||||
public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
|
||||
@Resource
|
||||
private IDoctorScheduleService doctorScheduleService;
|
||||
|
||||
@Resource
|
||||
private DoctorScheduleMapper doctorScheduleMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -27,8 +31,35 @@ public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
|
||||
if (ObjectUtil.isEmpty(doctorSchedule)) {
|
||||
return R.fail("医生排班不能为空");
|
||||
}
|
||||
boolean save = doctorScheduleService.save(doctorSchedule);
|
||||
return R.ok(save);
|
||||
// 创建新对象,排除id字段(数据库id列是GENERATED ALWAYS,由数据库自动生成)
|
||||
DoctorSchedule newSchedule = new DoctorSchedule();
|
||||
newSchedule.setWeekday(doctorSchedule.getWeekday());
|
||||
newSchedule.setTimePeriod(doctorSchedule.getTimePeriod());
|
||||
newSchedule.setDoctor(doctorSchedule.getDoctor());
|
||||
newSchedule.setClinic(doctorSchedule.getClinic());
|
||||
newSchedule.setStartTime(doctorSchedule.getStartTime());
|
||||
newSchedule.setEndTime(doctorSchedule.getEndTime());
|
||||
newSchedule.setLimitNumber(doctorSchedule.getLimitNumber());
|
||||
// call_sign_record 字段不能为null,设置默认值为空字符串
|
||||
newSchedule.setCallSignRecord(doctorSchedule.getCallSignRecord() != null ? doctorSchedule.getCallSignRecord() : "");
|
||||
newSchedule.setRegisterItem(doctorSchedule.getRegisterItem() != null ? doctorSchedule.getRegisterItem() : "");
|
||||
newSchedule.setRegisterFee(doctorSchedule.getRegisterFee() != null ? doctorSchedule.getRegisterFee() : 0);
|
||||
newSchedule.setDiagnosisItem(doctorSchedule.getDiagnosisItem() != null ? doctorSchedule.getDiagnosisItem() : "");
|
||||
newSchedule.setDiagnosisFee(doctorSchedule.getDiagnosisFee() != null ? doctorSchedule.getDiagnosisFee() : 0);
|
||||
newSchedule.setIsOnline(doctorSchedule.getIsOnline() != null ? doctorSchedule.getIsOnline() : false);
|
||||
newSchedule.setIsStopped(doctorSchedule.getIsStopped() != null ? doctorSchedule.getIsStopped() : false);
|
||||
newSchedule.setStopReason(doctorSchedule.getStopReason() != null ? doctorSchedule.getStopReason() : "");
|
||||
newSchedule.setDeptId(doctorSchedule.getDeptId());
|
||||
// 不设置id字段,让数据库自动生成
|
||||
// 使用自定义的insertWithoutId方法,确保INSERT语句不包含id字段
|
||||
int result = doctorScheduleMapper.insertWithoutId(newSchedule);
|
||||
boolean save = result > 0;
|
||||
if (save) {
|
||||
// 返回保存后的实体对象,包含数据库生成的ID
|
||||
return R.ok(newSchedule);
|
||||
} else {
|
||||
return R.fail("保存失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -114,8 +114,10 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
Integer pricingFlag, List<Integer> adviceTypes) {
|
||||
// 医嘱定价来源
|
||||
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
||||
// 如果配置为空,使用retailPrice作为默认值
|
||||
if (StringUtils.isEmpty(orderPricingSource)) {
|
||||
throw new ServiceException("租户配置项【医嘱定价来源】未配置");
|
||||
// throw new ServiceException("租户配置项【医嘱定价来源】未配置");
|
||||
orderPricingSource = "retailPrice";
|
||||
}
|
||||
// 构建查询条件
|
||||
QueryWrapper<AdviceBaseDto> queryWrapper = HisQueryUtils.buildQueryWrapper(adviceBaseDto, searchKey,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.openhis.web.triageandqueuemanage.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
|
||||
public interface CallNumberVoiceConfigAppService {
|
||||
R<?> addCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig);
|
||||
|
||||
R<?> updateCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.openhis.web.triageandqueuemanage.appservice.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
import com.openhis.triageandqueuemanage.service.CallNumberVoiceConfigService;
|
||||
import com.openhis.web.triageandqueuemanage.appservice.CallNumberVoiceConfigAppService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class CallNumberVoiceConfigAppServiceImpl implements CallNumberVoiceConfigAppService {
|
||||
|
||||
@Resource
|
||||
private CallNumberVoiceConfigService callNumberVoiceConfigService;
|
||||
|
||||
@Override
|
||||
public R<?> addCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig) {
|
||||
if(ObjectUtil.isNull(callNumberVoiceConfig)){
|
||||
return R.fail("叫号语音设置实体不能为空");
|
||||
}
|
||||
boolean save = callNumberVoiceConfigService.save(callNumberVoiceConfig);
|
||||
return R.ok(save);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig) {
|
||||
if(ObjectUtil.isNull(callNumberVoiceConfig)){
|
||||
return R.fail("叫号语音设置实体不能为空");
|
||||
}
|
||||
boolean updateById = callNumberVoiceConfigService.updateById(callNumberVoiceConfig);
|
||||
return R.ok(updateById);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.web.triageandqueuemanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
import com.openhis.web.triageandqueuemanage.appservice.CallNumberVoiceConfigAppService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/CallNumberVoice")
|
||||
public class CallNumberVoiceConfigController {
|
||||
|
||||
@Resource
|
||||
private CallNumberVoiceConfigAppService callNumberVoiceConfigAppService;
|
||||
|
||||
/**
|
||||
* 新增叫号语音设置实体
|
||||
*
|
||||
* @param callNumberVoiceConfig 叫号语音设置实体
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public R<?> addCallNumberVoiceConfig(@RequestBody CallNumberVoiceConfig callNumberVoiceConfig) {
|
||||
return R.ok(callNumberVoiceConfigAppService.addCallNumberVoiceConfig(callNumberVoiceConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改叫号语音设置实体
|
||||
*
|
||||
* @param callNumberVoiceConfig 叫号语音设置实体
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public R<?> updateCallNumberVoiceConfig(@RequestBody CallNumberVoiceConfig callNumberVoiceConfig) {
|
||||
return R.ok(callNumberVoiceConfigAppService.updateCallNumberVoiceConfig(callNumberVoiceConfig));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.openhis.web.triageandqueuemanage.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface CallNumberVoiceConfigAppMapper {
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.openhis.appointmentmanage.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -15,7 +17,8 @@ import java.time.LocalTime;
|
||||
@TableName(value = "adm_doctor_schedule")
|
||||
@Accessors(chain = true)
|
||||
public class DoctorSchedule {
|
||||
/** id */
|
||||
/** id - 数据库GENERATED ALWAYS,由数据库自动生成,插入时不应包含此字段 */
|
||||
@TableId(type = IdType.NONE)
|
||||
private Integer id;
|
||||
|
||||
/** 星期 */
|
||||
|
||||
@@ -2,8 +2,12 @@ package com.openhis.appointmentmanage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.appointmentmanage.domain.DoctorSchedule;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface DoctorScheduleMapper extends BaseMapper<DoctorSchedule> {
|
||||
/**
|
||||
* 自定义插入方法,排除id字段(数据库GENERATED ALWAYS)
|
||||
*/
|
||||
int insertWithoutId(DoctorSchedule doctorSchedule);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.openhis.triageandqueuemanage.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "call_number_voice")
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CallNumberVoiceConfig {
|
||||
/** id */
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/** 播放次数(1-5次) */
|
||||
private Integer playCount;
|
||||
|
||||
/** 叫号前缀 */
|
||||
private String callPrefix;
|
||||
|
||||
/** 叫号后缀 */
|
||||
private String callSuffix;
|
||||
|
||||
/** 语速(较慢/正常/较快) */
|
||||
private String speed;
|
||||
|
||||
/** (音量0-100%) */
|
||||
private Integer volume;
|
||||
|
||||
/** 播报间隔 */
|
||||
private Integer intervalSeconds;
|
||||
|
||||
/** 是否循环播报 */
|
||||
private Boolean cycleBroadcast;
|
||||
|
||||
/** 创建时间 */
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 更新时间 */
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.openhis.triageandqueuemanage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface CallNumberVoiceConfigMapper extends BaseMapper<CallNumberVoiceConfig> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.openhis.triageandqueuemanage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
|
||||
public interface CallNumberVoiceConfigService extends IService<CallNumberVoiceConfig> {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.triageandqueuemanage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.triageandqueuemanage.domain.CallNumberVoiceConfig;
|
||||
import com.openhis.triageandqueuemanage.mapper.CallNumberVoiceConfigMapper;
|
||||
import com.openhis.triageandqueuemanage.service.CallNumberVoiceConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class CallNumberVoiceConfigServiceImpl extends ServiceImpl<CallNumberVoiceConfigMapper, CallNumberVoiceConfig> implements CallNumberVoiceConfigService {
|
||||
}
|
||||
Reference in New Issue
Block a user