From fc2c5e218a682e8ea1e0fdbf886a79f6e300853c Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 3 Apr 2026 11:34:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E8=B5=84=E6=BA=90=E5=BA=93=E5=8F=91?= =?UTF-8?q?=E6=94=BE=E8=AE=B0=E5=BD=95]=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/controller/GyzjFfjlController.java | 10 +++++++++ .../business/controller/MjyFfjlController.java | 10 +++++++++ .../com/hxhq/business/mapper/GyzjFfjlMapper.java | 8 +++++++ .../com/hxhq/business/mapper/MjyFfjlMapper.java | 8 +++++++ .../hxhq/business/service/IGyzjFfjlService.java | 11 ++++++++++ .../com/hxhq/business/service/IMjyFfjlService.java | 6 ++++++ .../business/service/impl/GyzjFfjlServiceImpl.java | 25 ++++++++++++++++------ .../business/service/impl/MjyFfjlServiceImpl.java | 19 ++++++++++++++-- .../resources/mapper/business/GyzjFfjlMapper.xml | 10 +++++++++ .../resources/mapper/business/MjyFfjlMapper.xml | 10 +++++++++ 10 files changed, 109 insertions(+), 8 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java index d3dc6af..9a0e85e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java @@ -45,6 +45,16 @@ public class GyzjFfjlController extends BaseController } /** + * 列表 + */ + @GetMapping("/yltj") + @RequiresPermissions("business:resource:gyzj:ffjllist") + public AjaxResult yltj(FfjlSearchForm form) + { + return AjaxResult.success(gyzjFfjlService.yltj(form)); + } + + /** * 详细信息 */ @RequiresPermissions(value={"business:resource:gyzj:ffjlxq","business:archive:gyzj:ffjlxq"}, logical= Logical.OR) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java index edde151..73271ca 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java @@ -45,6 +45,16 @@ public class MjyFfjlController extends BaseController } /** + * 列表 + */ + @GetMapping("/yltj") + @RequiresPermissions("business:resource:mjy:ffjllist") + public AjaxResult yltj(FfjlSearchForm form) + { + return AjaxResult.success(mjyFfjlService.yltj(form)); + } + + /** * 详细信息 */ @RequiresPermissions(value={"business:resource:mjy:ffjlxq","business:archive:mjy:ffjlxq"}, logical= Logical.OR) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java index 70c706b..b6dc5db 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java @@ -8,6 +8,7 @@ import com.hxhq.business.dto.gyzj.FfjlListDto; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 给药制剂-发放记录Mapper接口 @@ -25,6 +26,13 @@ public interface GyzjFfjlMapper extends BaseMapper List queryList(@Param("ew") Wrapper queryWrapper); /** + * 用量统计 + * @param queryWrapper + * @return + */ + List yltj(@Param("ew") Wrapper queryWrapper); + + /** * 查询详情 * @param id * @return diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java index dfd1ded..d14dd13 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java @@ -8,6 +8,7 @@ import com.hxhq.business.dto.mjy.FfjlListDto; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 麻精药-发放记录Mapper接口 @@ -25,6 +26,13 @@ public interface MjyFfjlMapper extends BaseMapper List queryList(@Param("ew") Wrapper queryWrapper); /** + * 用量统计 + * @param queryWrapper + * @return + */ + List yltj(@Param("ew") Wrapper queryWrapper); + + /** * 查询详情 * @param id * @return diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java index 81e36a0..b04a82c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java @@ -2,13 +2,18 @@ package com.hxhq.business.service; import java.util.Date; import java.util.List; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.Gyzj; import com.hxhq.business.domain.GyzjFfjl; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.domain.MjyFfjl; import com.hxhq.business.dto.gyzj.FfjlDetailDto; import com.hxhq.business.dto.gyzj.FfjlListDto; import com.hxhq.business.form.gyzj.*; +import com.hxhq.common.core.utils.StringUtils; import com.hxhq.system.api.domain.SysUser; import org.springframework.web.bind.annotation.RequestBody; @@ -37,6 +42,12 @@ public interface IGyzjFfjlService extends IService { */ public List queryList(FfjlSearchForm form); + + public List yltj(FfjlSearchForm form); + + + public QueryWrapper getListCondition(FfjlSearchForm form); + /** * 详情 * diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java index db77258..276eccf 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java @@ -2,7 +2,9 @@ package com.hxhq.business.service; import java.util.Date; import java.util.List; +import java.util.Map; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.hxhq.business.domain.Mjy; import com.hxhq.business.domain.MjyFfjl; import com.baomidou.mybatisplus.extension.service.IService; @@ -39,6 +41,10 @@ public interface IMjyFfjlService extends IService { */ public List queryList(FfjlSearchForm form); + public List yltj(FfjlSearchForm form); + + public QueryWrapper getListCondition(FfjlSearchForm form); + /** * 详情 * diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java index 3f264c0..24a83f3 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java @@ -6,9 +6,7 @@ import java.util.stream.Collectors; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.Gyzj; -import com.hxhq.business.domain.GyzjFfjlJcgj; -import com.hxhq.business.domain.StudyGyzj; +import com.hxhq.business.domain.*; import com.hxhq.business.dto.gyzj.FfjlDetailDto; import com.hxhq.business.dto.gyzj.FfjlListDto; import com.hxhq.business.dto.gyzj.ListDto; @@ -28,7 +26,6 @@ import com.hxhq.system.service.ISysUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.GyzjFfjlMapper; -import com.hxhq.business.domain.GyzjFfjl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; @@ -75,6 +72,22 @@ public class GyzjFfjlServiceImpl extends ServiceImpl i */ @Override public List queryList(FfjlSearchForm form) { + QueryWrapper queryWrapper = getListCondition(form); + queryWrapper.orderByDesc("t.id"); + return baseMapper.queryList(queryWrapper); + } + + + @Override + public List yltj(FfjlSearchForm form){ + QueryWrapper queryWrapper = getListCondition(form); + queryWrapper.groupBy("t.ckldw,t.rkldw,t.syldw"); + return baseMapper.yltj(queryWrapper); + } + + + @Override + public QueryWrapper getListCondition(FfjlSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("t.del_flag", "0"); if (form.getJyzt() != null && form.getJyzt().intValue() > 0) { @@ -106,10 +119,10 @@ public class GyzjFfjlServiceImpl extends ServiceImpl i .or().apply(" exists(select s.* from t_study s where find_in_set(s.id, t.`md_ids`) and s.name like CONCAT('%', {0}, '%'))",form.getMdMc()) ); } - queryWrapper.orderByDesc("t.id"); - return baseMapper.queryList(queryWrapper); + return queryWrapper; } + /** * 加签 ok * diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java index 330ffbe..f435ac5 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java @@ -73,6 +73,21 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl */ @Override public List queryList(FfjlSearchForm form) { + QueryWrapper queryWrapper = getListCondition(form); + queryWrapper.orderByDesc("t.id"); + return baseMapper.queryList(queryWrapper); + } + + + @Override + public List yltj(FfjlSearchForm form){ + QueryWrapper queryWrapper = getListCondition(form); + queryWrapper.groupBy("t.syldw,t.jsldw,t.rkldw,t.ckldw"); + return baseMapper.yltj(queryWrapper); + } + + @Override + public QueryWrapper getListCondition(FfjlSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("t.del_flag", "0"); if (form.getJyzt() != null && form.getJyzt().intValue() > 0) { @@ -104,10 +119,10 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl .or().apply(" exists(select s.* from t_study s where find_in_set(s.id, t.`md_ids`) and s.name like CONCAT('%', {0}, '%'))",form.getMdMc()) ); } - queryWrapper.orderByDesc("t.id"); - return baseMapper.queryList(queryWrapper); + return queryWrapper; } + /** * 加签 ok * diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml index 0e1ce19..af71f30 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml @@ -17,6 +17,16 @@ + + + +