修改群内bug
This commit is contained in:
+20
-4
@@ -1,6 +1,7 @@
|
||||
package com.renkang.consultation.api.service.impl;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.renkang.consultation.api.service.ConDoctorSchedulingDateApiService;
|
||||
import com.renkang.consultation.entity.ConDoctor;
|
||||
import com.renkang.consultation.entity.ConDoctorSchedulingDateListDO;
|
||||
@@ -8,14 +9,14 @@ import com.renkang.consultation.mapper.ConDoctorMapper;
|
||||
import com.renkang.consultation.mapper.ConDoctorSchedulingDateMapper;
|
||||
import com.renkang.consultation.mapper.ConServiceMapper;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Service("conDoctorSchedulingDateApiService")
|
||||
public class ConDoctorSchedulingDateApiServiceImpl implements ConDoctorSchedulingDateApiService {
|
||||
@@ -29,6 +30,9 @@ public class ConDoctorSchedulingDateApiServiceImpl implements ConDoctorSchedulin
|
||||
@Autowired
|
||||
private ConServiceMapper conServiceMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
public Result<List<ConDoctorSchedulingDateListDO>> selectSchedulingDateListByDoctorId(String doctorId) {
|
||||
|
||||
@@ -57,7 +61,19 @@ public class ConDoctorSchedulingDateApiServiceImpl implements ConDoctorSchedulin
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
|
||||
if ("1".equals(conDoctor.getTfJumpHoliday())){
|
||||
Object o = redisUtil.get(CommonConstant.CONSULT_HOLIDAY_KEY + Calendar.getInstance().get(Calendar.YEAR));
|
||||
List<String> holidayList = new ArrayList<>();
|
||||
if (o instanceof List<?>) {
|
||||
List<?> tempList = (List<?>) o;
|
||||
for (Object item : tempList) {
|
||||
if (item instanceof String) {
|
||||
holidayList.add((String) item);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 将list匹配到的数据数量置0
|
||||
}
|
||||
Iterator<ConDoctorSchedulingDateListDO> iterator = list.iterator();
|
||||
|
||||
Date date = DateUtils.formatDateToAnother(new Date(), "yyyy-MM-dd");
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public class HolidayManager {
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
//@Scheduled(cron = "0 0 0 1 1 ? *")
|
||||
@Scheduled(cron = "0 0 0 1 1 ? *")
|
||||
@Scheduled(cron = "0 0 0 1 1 ?")
|
||||
@PostConstruct
|
||||
public void setRedisHoliday() throws IOException {
|
||||
//获取当前年份
|
||||
|
||||
+8
-1
@@ -17,6 +17,8 @@ import com.renkang.consultation.entity.*;
|
||||
import com.renkang.consultation.manager.ConsultCloudManager;
|
||||
import com.renkang.consultation.mapper.*;
|
||||
import com.renkang.consultation.service.IConDoctorChangeLogService;
|
||||
import com.renkang.consultation.service.IConDoctorSchedulingDateService;
|
||||
import com.renkang.consultation.service.IConDoctorSchedulingService;
|
||||
import com.renkang.consultation.service.IConDoctorService;
|
||||
import com.renkang.consultation.vo.*;
|
||||
import com.renkang.im.api.IMHelloApi;
|
||||
@@ -109,6 +111,9 @@ public class ConDoctorServiceImpl extends ServiceImpl<ConDoctorMapper, ConDoctor
|
||||
@Autowired
|
||||
private ConSessionServiceImpl conSessionServiceImpl;
|
||||
|
||||
@Autowired
|
||||
private IConDoctorSchedulingDateService conDoctorSchedulingDateService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -1042,7 +1047,9 @@ public class ConDoctorServiceImpl extends ServiceImpl<ConDoctorMapper, ConDoctor
|
||||
public Integer updateJumpHoliday(DoctorJumpHolidayDTO dto) {
|
||||
LambdaUpdateWrapper<ConDoctor> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ConDoctor::getId, dto.getId()).set(ConDoctor::getTfJumpHoliday, dto.getTfJumpHoliday());
|
||||
return conDoctorMapper.update(null, updateWrapper);
|
||||
int update = conDoctorMapper.update(null, updateWrapper);
|
||||
conDoctorSchedulingDateService.generateDoctorSchedulingDate(dto.getId());
|
||||
return update;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
||||
+2
-2
@@ -325,8 +325,8 @@ public class WatchDeviceServiceImpl extends ServiceImpl<WatchDeviceMapper, Watch
|
||||
LoginUser userById = sysBaseAPI.getUserById(dto.getBindUserId());
|
||||
// 此处修改 只有是职工的是才赋值单位信息
|
||||
if (dto.getIsEmployee()){
|
||||
SysDepart secondDepart = sysCache.getDepartByOrgCode(GlobalUtils.getSecondDepartOrgCode(userById.getOrgCode()));
|
||||
dto.setOrgCode(secondDepart.getOrgCode());
|
||||
SysDepart inDepart = sysCache.getDepartByOrgCode(userById.getOrgCode());
|
||||
dto.setOrgCode(inDepart.getOrgCode());
|
||||
SysDepart thirdDepart = sysCache.getDepartByOrgCode(GlobalUtils.getThirdDepartOrgCode(userById.getOrgCode()));
|
||||
dto.setDeptId(thirdDepart.getId());
|
||||
}
|
||||
|
||||
+8
-8
@@ -351,14 +351,14 @@ public class WatchMonitorDataServiceImpl extends ServiceImpl<WatchMonitorDataMap
|
||||
.orElse("未知"));
|
||||
|
||||
// 音频
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("请注意,").append(departName).append("下的员工").append(userNew.getRealname());
|
||||
if (socketVo.getEventType_dictText().equals("一键告警")) {
|
||||
sb.append("触发一键告警");
|
||||
} else {
|
||||
sb.append(socketVo.getEventType_dictText()).append(",").append("值为").append(socketVo.getDataValue());
|
||||
}
|
||||
socketVo.setAudioUrl(speechUntil.generateVoice(sb.toString()));
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// sb.append("请注意,").append(departName).append("下的员工").append(userNew.getRealname());
|
||||
// if (socketVo.getEventType_dictText().equals("一键告警")) {
|
||||
// sb.append("触发一键告警");
|
||||
// } else {
|
||||
// sb.append(socketVo.getEventType_dictText()).append(",").append("值为").append(socketVo.getDataValue());
|
||||
// }
|
||||
// socketVo.setAudioUrl(speechUntil.generateVoice(sb.toString()));
|
||||
log.info("构建socket信息完成 => {}", JSONObject.toJSONString(socketVo));
|
||||
return socketVo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user