diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java index e8d64b0..1f39fee 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/GspFfjlMapper.java @@ -39,10 +39,11 @@ public interface GspFfjlMapper extends BaseMapper /** * 出库量、入库量、使用量 出现频率最高的单位 - * @param queryWrapper * @return */ - Map getStatisticsUnit(@Param("ew") Wrapper queryWrapper1, @Param("ew2") Wrapper queryWrapper2, @Param("ew3") Wrapper queryWrapper3); + String getCklUnit(@Param("ew") Wrapper queryWrapper); + String getSylUnit(@Param("ew") Wrapper queryWrapper); + String getRklUnit(@Param("ew") Wrapper queryWrapper); Map getStatistics(@Param("ew") Wrapper queryWrapper, @Param("rkldw") String rkldw, @Param("ckldw") String ckldw, @Param("syldw") String syldw); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java index cd73e20..8ee4d5d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspFfjlServiceImpl.java @@ -871,19 +871,30 @@ public class GspFfjlServiceImpl extends ServiceImpl impl @Override public Map getStatisticsUnit(GspSearchListForm form) { + Map result = new HashMap<>(); + result.put("ckldw", ""); + result.put("syldw", ""); + result.put("rkldw", ""); + QueryWrapper queryWrapper1 = getListCondition(form); queryWrapper1.isNotNull("ckldw") .ne("ckldw", ""); + String cklUnit = baseMapper.getCklUnit(queryWrapper1); + result.put("ckldw", cklUnit); QueryWrapper queryWrapper2 = getListCondition(form); queryWrapper2.isNotNull("syldw") .ne("syldw", ""); + String syldw = baseMapper.getSylUnit(queryWrapper2); + result.put("syldw", syldw); QueryWrapper queryWrapper3 = getListCondition(form); queryWrapper3.isNotNull("rkldw") .ne("rkldw", ""); + String rkldw = baseMapper.getRklUnit(queryWrapper3); + result.put("rkldw", rkldw); - return baseMapper.getStatisticsUnit(queryWrapper1, queryWrapper2, queryWrapper3); + return result; } @Override diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml index 5681472..455fa7f 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/GspFfjlMapper.xml @@ -19,33 +19,6 @@ (select GROUP_CONCAT(s.name) from t_study s where find_in_set(s.id, t.`md_ids`)) as mdMcs FROM `t_gsp_ffjl` t WHERE id = #{id} - - + + + \ No newline at end of file