自定义报表代码提交
This commit is contained in:
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.harmonic.pojo.param.ReportSearchParam;
|
||||
import com.njcn.harmonic.pojo.po.ExcelRptTemp;
|
||||
import com.njcn.harmonic.pojo.vo.ReportTemplateVO;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -22,5 +23,5 @@ public interface ExcelRptTempMapper extends BaseMapper<ExcelRptTemp> {
|
||||
|
||||
List<ReportTemplateVO> getReportTemplateList(@Param("reportSearchParam")ReportSearchParam reportSearchParam);
|
||||
|
||||
List<ReportTemplateVO> getReportTemplateByDept(@Param("deptId")String deptId);
|
||||
List<ReportTemplateVO> getReportTemplateByDept(@Param("list") List<DeptDTO> list);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
LEFT JOIN sys_dept_temp b ON a.Id = b.temp_id
|
||||
WHERE
|
||||
a.state = 1
|
||||
and b.dept_id = #{deptId}
|
||||
and b.dept_id in
|
||||
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -31,6 +31,8 @@ import com.njcn.influxdb.param.InfluxDBTableConstant;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.utils.WebUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -150,7 +152,9 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
|
||||
@Override
|
||||
public List<ReportTemplateVO> getTemplateByDept(String id) {
|
||||
return excelRptTempMapper.getReportTemplateByDept(id);
|
||||
//获取子孙部门,去重
|
||||
List<DeptDTO> depts = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData().stream().distinct().collect(Collectors.toList());
|
||||
return excelRptTempMapper.getReportTemplateByDept(depts);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user