邱宇豪
2023-10-18 9f36ffe17c4415d12e14928998e0e18a41047199
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.thhy.secure.modules.biz.pipereport.service.impl;
 
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.thhy.general.common.BasicResult;
import com.thhy.general.config.SysUserInfo;
import com.thhy.general.utils.UserInfoUtils;
import com.thhy.secure.modules.biz.pipereport.entity.PipeReportEntity;
import com.thhy.secure.modules.biz.pipereport.mapper.PipeReportMapper;
import com.thhy.secure.modules.biz.pipereport.service.PipeReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * @Author QiuYuHao
 * @CreateDate 2023-10-18 9:22:33
 * 管片和钢筋笼报表实现
 */
@Service
public class PipeReportServiceImpl implements PipeReportService
{
 
    @Autowired
    private PipeReportMapper pipeReportMapper;
 
    @Override
    public BasicResult getPipeReportList(Map<String,Object> map) {
        SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo();
        String companyId = sysUserInfo.getCompanyId();
        map.put("companyId",companyId);
        PageHelper.startPage((Integer) map.get("pageNum"),(Integer)map.get("pageSize"));
        List<PipeReportEntity> pipeReportList = pipeReportMapper.getPipeReportList(map);
        return BasicResult.success(new PageInfo<PipeReportEntity>(pipeReportList));
    }
 
    @Override
    public BasicResult getSteelReportList(Map<String, Object> map) {
        SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo();
        String companyId = sysUserInfo.getCompanyId();
        map.put("companyId",companyId);
        PageHelper.startPage((Integer) map.get("pageNum"),(Integer)map.get("pageSize"));
        List<PipeReportEntity> steelReportList = pipeReportMapper.getSteelReportList(map);
        return BasicResult.success(new PageInfo<PipeReportEntity>(steelReportList));
    }
}