Browse Source

fix:[资源库发放记录]统计

master
15881625488@163.com 2 weeks ago
parent
commit
fc2c5e218a
10 changed files with 109 additions and 8 deletions
  1. +10
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java
  2. +10
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java
  3. +8
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java
  4. +8
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java
  5. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java
  6. +6
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java
  7. +19
    -6
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java
  8. +17
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java
  9. +10
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml
  10. +10
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/MjyFfjlMapper.xml

+ 10
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/GyzjFfjlController.java View File

@ -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)

+ 10
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/MjyFfjlController.java View File

@ -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)

+ 8
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GyzjFfjlMapper.java View File

@ -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<FfjlListDto> queryList(@Param("ew") Wrapper<GyzjFfjl> queryWrapper);
/**
* 用量统计
* @param queryWrapper
* @return
*/
List<Map> yltj(@Param("ew") Wrapper<GyzjFfjl> queryWrapper);
/**
* 查询详情
* @param id
* @return

+ 8
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/MjyFfjlMapper.java View File

@ -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<FfjlListDto> queryList(@Param("ew") Wrapper<MjyFfjl> queryWrapper);
/**
* 用量统计
* @param queryWrapper
* @return
*/
List<Map> yltj(@Param("ew") Wrapper<MjyFfjl> queryWrapper);
/**
* 查询详情
* @param id
* @return

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IGyzjFfjlService.java View File

@ -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<FfjlListDto> queryList(FfjlSearchForm form);
public List<Map> yltj(FfjlSearchForm form);
public QueryWrapper<GyzjFfjl> getListCondition(FfjlSearchForm form);
/**
* 详情
*

+ 6
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IMjyFfjlService.java View File

@ -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<FfjlListDto> queryList(FfjlSearchForm form);
public List<Map> yltj(FfjlSearchForm form);
public QueryWrapper<MjyFfjl> getListCondition(FfjlSearchForm form);
/**
* 详情
*

+ 19
- 6
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjFfjlServiceImpl.java View File

@ -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<FfjlListDto> queryList(FfjlSearchForm form) {
QueryWrapper<GyzjFfjl> queryWrapper = getListCondition(form);
queryWrapper.orderByDesc("t.id");
return baseMapper.queryList(queryWrapper);
}
@Override
public List<Map> yltj(FfjlSearchForm form){
QueryWrapper<GyzjFfjl> queryWrapper = getListCondition(form);
queryWrapper.groupBy("t.ckldw,t.rkldw,t.syldw");
return baseMapper.yltj(queryWrapper);
}
@Override
public QueryWrapper<GyzjFfjl> getListCondition(FfjlSearchForm form) {
QueryWrapper<GyzjFfjl> 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
*

+ 17
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyFfjlServiceImpl.java View File

@ -73,6 +73,21 @@ public class MjyFfjlServiceImpl extends ServiceImpl impl
*/
@Override
public List<FfjlListDto> queryList(FfjlSearchForm form) {
QueryWrapper<MjyFfjl> queryWrapper = getListCondition(form);
queryWrapper.orderByDesc("t.id");
return baseMapper.queryList(queryWrapper);
}
@Override
public List<Map> yltj(FfjlSearchForm form){
QueryWrapper<MjyFfjl> queryWrapper = getListCondition(form);
queryWrapper.groupBy("t.syldw,t.jsldw,t.rkldw,t.ckldw");
return baseMapper.yltj(queryWrapper);
}
@Override
public QueryWrapper<MjyFfjl> getListCondition(FfjlSearchForm form) {
QueryWrapper<MjyFfjl> 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
*

+ 10
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/GyzjFfjlMapper.xml View File

@ -17,6 +17,16 @@
</if>
</select>
<select id="yltj" resultType="java.util.Map">
select count(1) as `count`,sum(t.basic_rkl) as rkl,sum(t.basic_ckl) ckl,sum(basic_syl) as syl,t.ckldw,t.rkldw,t.syldw
FROM `t_gyzj_ffjl` t
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
<select id="queryInfo" resultType="com.hxhq.business.dto.gyzj.FfjlDetailDto">
select t.*,
(select GROUP_CONCAT(s.name) from t_study s where find_in_set(s.id, t.`md_ids`)) as mdMcs

+ 10
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/MjyFfjlMapper.xml View File

@ -17,6 +17,16 @@
</if>
</select>
<select id="yltj" resultType="java.util.Map">
select count(1) as `count`,sum(t.basic_ckl) as ckl,sum(t.basic_rkl) rkl,sum(basic_jsl) as jsl,sum(basic_syl) as syl,t.syldw,t.jsldw,t.rkldw,t.ckldw
FROM `t_mjy_ffjl` t
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
<select id="queryInfo" resultType="com.hxhq.business.dto.mjy.FfjlDetailDto">
select t.*,
(select GROUP_CONCAT(s.name) from t_study s where find_in_set(s.id, t.`md_ids`)) as mdMcs

Loading…
Cancel
Save