package com.moral.api.service.impl;
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
import com.moral.api.entity.FileTable;
|
import com.moral.api.entity.YcGenerateReport;
|
import com.moral.api.pojo.enums.FileTableEnum;
|
import com.moral.api.pojo.ext.ycgeneratereport.YcGenerateReportExt;
|
import com.moral.api.pojo.ext.ycgeneratereport.YcGenerateReportListExt;
|
import com.moral.api.pojo.ext.ycgeneratereport.YcGenerateReportPageExt;
|
import com.moral.api.mapper.YcGenerateReportMapper;
|
import com.moral.api.pojo.query.ycgeneratereport.*;
|
import com.moral.api.pojo.vo.file.FileVo;
|
import com.moral.api.service.FileTableService;
|
import com.moral.api.service.YcGenerateReportService;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 盐城报告表 服务实现类
|
* </p>
|
* deyt template generate
|
* @author JI
|
* @since 2024-03-26
|
*/
|
@Service
|
public class YcGenerateReportServiceImpl extends ServiceImpl<YcGenerateReportMapper, YcGenerateReport> implements YcGenerateReportService {
|
|
private final FileTableService fileTableService;
|
|
public YcGenerateReportServiceImpl(FileTableService fileTableService) {
|
this.fileTableService = fileTableService;
|
}
|
|
@Override
|
public boolean removeByIdWithFill(Integer id) {
|
return SqlHelper.retBool(this.baseMapper.deleteByIdWithFill(new YcGenerateReport().setId(id)));
|
}
|
|
@Override
|
public YcGenerateReportExt extOne(Integer id) {
|
return this.baseMapper.extOne(id);
|
}
|
|
@Override
|
public List<YcGenerateReportListExt> extList(YcGenerateReportListCond ycGenerateReportListCond) {
|
return this.baseMapper.extList(ycGenerateReportListCond);
|
}
|
|
@Override
|
public Page<YcGenerateReportPageExt> extPage(YcGenerateReportPageCond ycGenerateReportPageCond) {
|
Page<YcGenerateReportPageExt> pageExtPage = this.baseMapper.extPage(ycGenerateReportPageCond.getPage().convertPage(), ycGenerateReportPageCond);
|
return pageExtPage;
|
}
|
|
@Override
|
public boolean save(YcGenerateReportAddCond ycGenerateReportAddCond) {
|
return this.save(ycGenerateReportAddCond.convert());
|
}
|
|
@Override
|
public boolean update(YcGenerateReportUpdateCond ycGenerateReportUpdateCond) {
|
return this.updateById(ycGenerateReportUpdateCond.convert());
|
}
|
|
@Override
|
@Transactional
|
public boolean fileUpload(YcGenerateReportUploadCond uploadCond) {
|
|
fileTableService.upDateResult(uploadCond.getList(),uploadCond.getId(), FileTableEnum.YC_GENERATEEXCEL.value);
|
|
return true;
|
}
|
}
|