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