fei.wang
2024-05-09 871d4095b07cedacb7fbef4c38d64982f539c404
src/main/java/com/flow/service/impl/ChongZhiServiceImpl.java
@@ -8,7 +8,10 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flow.mapper.ChongZhMapper;
import com.flow.mapper.CompanyMapper;
import com.flow.pojo.Chongzhi;
import com.flow.pojo.Company;
import com.flow.pojo.OperationLog;
import com.flow.service.ChongZhiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@@ -27,7 +30,9 @@
    public PageInfo<Chongzhi> FindChongzhiZi(String Zong, Integer page, Integer limit) throws Exception {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("none", "0");
        queryWrapper.eq("Company", Zong);
        queryWrapper.select().orderByDesc("CzDate");
        PageHelper.startPage(page, limit);
        List<Chongzhi> chongzhiList = ((ChongZhMapper)this.baseMapper).selectList(queryWrapper);
        PageInfo<Chongzhi> info = new PageInfo(chongzhiList);
@@ -36,6 +41,8 @@
    public PageInfo<Chongzhi> FindChongZhi(Integer page, Integer limit) throws Exception {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("none", "0");
        queryWrapper.select().orderByDesc("CzDate");
        PageHelper.startPage(page, limit);
        List<Chongzhi> chongzhiList = ((ChongZhMapper)this.baseMapper).selectList(queryWrapper);
        PageInfo<Chongzhi> info = new PageInfo(chongzhiList);
@@ -85,6 +92,18 @@
        return this.chongZhMapper.findChongZhiJine();
    }
    public int DeleteChongZhi(String chongZhiId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("num", chongZhiId);
        Chongzhi chongzhi = new Chongzhi();
        chongzhi.setNone("1");
//        Company company1 = (Company)((CompanyMapper)this.baseMapper).selectOne(queryWrapper);
//        OperationLog operationLog = new OperationLog();
//        operationLog.setCaozuotype("删除");
//        operationLog.setCaozuocontent("删除公司:"+company1.getCompanyname());
//        operationLogService.addOperationLog(operationLog);
        return ((ChongZhMapper)this.baseMapper).update(chongzhi, queryWrapper);
    }
    public String findChongZhiJine1(Chongzhi chongzhi) {
        return this.chongZhMapper.findChongZhiJine1(chongzhi);
    }