修改群内bug

This commit is contained in:
wanghao
2025-07-04 18:10:35 +08:00
parent 909c083e51
commit 7fb0ac6aa6
8 changed files with 43 additions and 19 deletions
@@ -58,7 +58,7 @@ public class ConDoctorVO {
private String doctorStatus;
@Excel(name = "医生是否开启咨询(z_doct_sta(1:开启 3:关闭))", width = 15)
@Dict(dicCode = "doc_accept_flag")
@Dict(dicCode = "z_doct_sta")
@Schema(title = "医生是否开启咨询(z_doct_sta(1:开启 3:关闭))")
private String isAccept;
@@ -1,5 +1,6 @@
package com.renkang.consultation.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.renkang.consultation.entity.ConDoctorCard;
@@ -62,6 +63,12 @@ public class ConDoctorCardController extends JeecgController<ConDoctorCard, ICon
// @RequiresPermissions("consultation:con_doctor_card:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ConDoctorCard conDoctorCard) {
if (StrUtil.isEmpty(conDoctorCard.getCardMsg())){
return Result.error("请填写开户行");
}
if (StrUtil.isEmpty(conDoctorCard.getCardNum())){
return Result.error("请填写银行卡号");
}
conDoctorCard.setCreateTime(new Date());
conDoctorCardService.save(conDoctorCard);
return Result.OK("添加成功!");
@@ -26,7 +26,7 @@
#{item}
</foreach>
)
and status = 1 and del_flag = 0
and status = 1 and del_flag = 0 and family_relation != '1'
GROUP BY group_id
</select>
<select id="selectFamilyGroupId" parameterType="list" resultType="com.renkang.consultation.vo.ConFamilyNumVO">
@@ -150,7 +150,7 @@ public class ConDoctorServiceImpl extends ServiceImpl<ConDoctorMapper, ConDoctor
conDoctor.setDoctorTitle(dto.getDoctorTitle());
}
// 通过Mapper查询并获取分页数据
if (dto.getDepartmentId() != null && !"".equals(dto.getDepartmentId())) {
if (dto.getDepartmentId() != null && !dto.getDepartmentId().isEmpty()) {
//查询出当前科室
ConDepartment conDepartment = conDepartmentMapper.selectById(dto.getDepartmentId());
List<ConDepartment> departments = new ArrayList<>();
@@ -1,5 +1,6 @@
package com.renkang.consultation.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -131,7 +132,7 @@ public class ConHealthInfoAnswerServiceImpl extends ServiceImpl<ConHealthInfoAns
List<ConSession> conSessions1 = collect.get(item.getFromAccount());
List<String> collect1 = conSessions1.stream()
.map(ConSession::getMemberId)
.filter(memberId -> memberId != null && !memberId.isEmpty())
.filter(memberId -> memberId != null && !memberId.isEmpty()).distinct()
.collect(Collectors.toList());
item.setMemberIds(collect1);
});
@@ -215,10 +216,13 @@ public class ConHealthInfoAnswerServiceImpl extends ServiceImpl<ConHealthInfoAns
vo.setWorkNo(loginUserNew.getWorkNo());
}
if (item.getGroupId() != null && !"".equals(item.getGroupId())) {
Integer count = Objects.requireNonNull(finalConFamilyNumVOList.stream()
.filter(ite -> ite.getGroupId().equals(item.getGroupId())).findFirst().orElse(null)).getCount();
vo.setFamilyNum(count);
if (item.getGroupId() != null && !item.getGroupId().isEmpty()) {
if (CollUtil.isNotEmpty(finalConFamilyNumVOList)){
ConFamilyNumVO conFamilyNumVO = finalConFamilyNumVOList.stream().filter(ite -> ite.getGroupId().equals(item.getGroupId())).findFirst().orElse(null);
if (conFamilyNumVO != null) {
vo.setFamilyNum(conFamilyNumVO.getCount());
}
}
}
vo.setId(item.getId());
voList.add(vo);
@@ -13,7 +13,6 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.aspect.annotation.PermissionData;
@@ -28,8 +27,10 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -73,11 +74,31 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
Page<WatchMqttNotice> page = new Page<WatchMqttNotice>(pageNo, pageSize);
IPage<WatchMqttNotice> pageList = watchMqttNoticeService.page(page, queryWrapper);
if(CollectionUtil.isNotEmpty(pageList.getRecords())){
String allUserIds = pageList.getRecords().stream()
.map(WatchMqttNotice::getUserId).distinct()
.collect(Collectors.joining(","));
List<String> userIdList = Arrays.stream(allUserIds.split(","))
.map(id -> id.replace("\"", "").trim()).distinct()
.collect(Collectors.toList());
List<LoginUser> loginUsers = sysBaseAPI.listUserByIdsNew(userIdList);
Map<String, String> userMap = loginUsers.stream().collect(Collectors.toMap(LoginUser::getId, LoginUser::getRealname));
for(WatchMqttNotice mn:pageList.getRecords()){
LoginUser loginUser = sysBaseAPI.getUserById(mn.getCreateBy());
if(loginUser!=null){
mn.setCreateByName(loginUser.getRealname());
}
String[] userIds = mn.getUserId().split(",");
List<String> nameList = new ArrayList<>();
for (String userId : userIds) {
String name = userMap.get(userId);
if (StrUtil.isNotEmpty(name)) {
nameList.add(name);
}
}
mn.setUserName(StrUtil.join(",", nameList));
}
}
return Result.OK(pageList);
@@ -91,7 +112,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
*/
@AutoLog(value = "watch_mqtt_notice-添加")
@Operation(summary = "watch_mqtt_notice-添加", description = "watch_mqtt_notice-添加")
@RequiresPermissions("watch:watch_mqtt_notice:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody WatchMqttNotice watchMqttNotice) {
//createBy保存为当前登录用户id
@@ -108,7 +128,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
* @return result
*/
@PostMapping(value = "/addMatchMsg")
@RequiresPermissions("watch:watch_mqtt_notice:add")
public Result<String> addMatchMsg(@RequestBody WatchMqttNotice watchMqttNotice) {
try {
watchMqttNotice.setNoticeStatus(WatchConstants.MSG_SEND_NO_0);
@@ -146,7 +165,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
* @return result
*/
@PostMapping(value = "/sendMatchMsgAgain")
@RequiresPermissions("watch:watch_mqtt_notice:send")
public Result<Object> sendMatchMsgAgain(@RequestBody WatchMqttNotice notice) {
if (StrUtil.isBlank(notice.getId())) {
return Result.error("参数缺失");
@@ -167,7 +185,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
*/
@AutoLog(value = "watch_mqtt_notice-编辑")
@Operation(summary = "watch_mqtt_notice-编辑", description = "watch_mqtt_notice-编辑")
@RequiresPermissions("watch:watch_mqtt_notice:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody WatchMqttNotice watchMqttNotice) {
watchMqttNoticeService.updateById(watchMqttNotice);
@@ -182,7 +199,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
*/
@AutoLog(value = "watch_mqtt_notice-通过id删除")
@Operation(summary = "watch_mqtt_notice-通过id删除", description = "watch_mqtt_notice-通过id删除")
@RequiresPermissions("watch:watch_mqtt_notice:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
watchMqttNoticeService.removeById(id);
@@ -197,7 +213,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
*/
@AutoLog(value = "watch_mqtt_notice-批量删除")
@Operation(summary = "watch_mqtt_notice-批量删除", description = "watch_mqtt_notice-批量删除")
@RequiresPermissions("watch:watch_mqtt_notice:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.watchMqttNoticeService.removeByIds(Arrays.asList(ids.split(",")));
@@ -243,7 +258,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
* @param request
* @param watchMqttNotice
*/
@RequiresPermissions("watch:watch_mqtt_notice:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, WatchMqttNotice watchMqttNotice) {
return super.exportXls(request, watchMqttNotice, WatchMqttNotice.class, "watch_mqtt_notice");
@@ -256,7 +270,6 @@ public class WatchMqttNoticeController extends JeecgController<WatchMqttNotice,
* @param response
* @return
*/
@RequiresPermissions("watch:watch_mqtt_notice:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, WatchMqttNotice.class);
@@ -412,7 +412,7 @@ public class HealthUserEmployeeEx implements Serializable {
*/
@Excel(name = "medicalWorkTypeCode", width = 15)
@Schema(title = "medicalWorkTypeCode")
@Dict(dicCode = "work_type")
@Dict(dicCode = "medical_worktype")
private String medicalWorkTypeCode;
@Excel(name = "medicalHazardFactorOther", width = 15)
@Schema(title = "medicalHazardFactorOther")
@@ -35,6 +35,7 @@ import org.jeecg.common.exception.ExceptionAssertsUtil;
import org.jeecg.common.export.PoiExportHandler;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.util.DictUtil;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.system.vo.SysUserModel;
import org.jeecg.common.util.*;
@@ -222,7 +223,6 @@ public class HealthUserEmployeeExServiceImpl extends ServiceImpl<HealthUserEmplo
if (CollUtil.isNotEmpty(membersList)) {
userEmployee.setFamilyNumSys(membersList.size());
}
//处理年龄
if (StrUtil.isNotEmpty(userEmployee.getIdCard())) {
//根据身份证号获取年龄