10 changed files with 180 additions and 8 deletions
@ -0,0 +1,23 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/5/17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HeaderOption { |
||||
|
|
||||
|
private String name; |
||||
|
private String width; |
||||
|
private String prefix; |
||||
|
private String suffix; |
||||
|
private Boolean isSum; |
||||
|
private Integer decimalLength; |
||||
|
|
||||
|
public HeaderOption(String name){ |
||||
|
this.name = name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.qs.serve.modules.bir.entity.vo; |
||||
|
|
||||
|
import com.qs.serve.common.model.dto.HeaderOption; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/6 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BirReportVo { |
||||
|
|
||||
|
private List<Map<String,Object>> itemList; |
||||
|
|
||||
|
private List<HeaderOption> headerList; |
||||
|
|
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
package com.qs.serve.modules.bir.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.bir.entity.BirBaseActivity; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsActivity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Options; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.apache.ibatis.annotations.Select; |
||||
|
import org.apache.ibatis.mapping.StatementType; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* ROI费率(活动档案) Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-06-05 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface BirReportAccountBookMapper { |
||||
|
|
||||
|
@Select("call get_report_header(#{result, mode=OUT, jdbcType=VARCHAR})") |
||||
|
@Options(statementType = StatementType.CALLABLE) |
||||
|
@InterceptorIgnore(tenantLine = "true") |
||||
|
void getReportHeader(@Param("result") String headerString); |
||||
|
|
||||
|
@Select("call get_tbs_report_region()") |
||||
|
@Options(statementType = StatementType.CALLABLE) |
||||
|
@InterceptorIgnore(tenantLine = "true") |
||||
|
List<Map<String, Object>> reportAccountBookRegion(); |
||||
|
|
||||
|
@Select("call get_tbs_report_customer()") |
||||
|
@Options(statementType = StatementType.CALLABLE) |
||||
|
@InterceptorIgnore(tenantLine = "true") |
||||
|
List<Map<String, Object>> reportAccountBookCustomer(); |
||||
|
|
||||
|
@Select("call get_tbs_report_bizregion()") |
||||
|
@Options(statementType = StatementType.CALLABLE) |
||||
|
@InterceptorIgnore(tenantLine = "true") |
||||
|
List<Map<String, Object>> reportAccountBookBizRegion(); |
||||
|
|
||||
|
@Select("call get_tbs_report_center()") |
||||
|
@Options(statementType = StatementType.CALLABLE) |
||||
|
@InterceptorIgnore(tenantLine = "true") |
||||
|
List<Map<String, Object>> reportAccountBookCenter(); |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
package com.qs.serve.modules.bir.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.qs.serve.modules.bir.entity.BirBaseActivity; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirReportVo; |
||||
|
|
||||
|
/** |
||||
|
* 台帐 服务接口 |
||||
|
* @author YenHex |
||||
|
* @date 2023-06-05 |
||||
|
*/ |
||||
|
public interface BirReportAccountBookService { |
||||
|
|
||||
|
BirReportVo getReportAccountBookData(String type); |
||||
|
} |
||||
|
|
@ -0,0 +1,59 @@ |
|||||
|
package com.qs.serve.modules.bir.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.qs.serve.common.util.CopierUtil; |
||||
|
import com.qs.serve.modules.bir.entity.BirRoiRate; |
||||
|
import com.qs.serve.modules.bir.entity.dto.BirRoiCostDTO; |
||||
|
import com.qs.serve.modules.bir.entity.so.BirCostRoiSo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirReportVo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.BirRoiCostItemVo; |
||||
|
import com.qs.serve.modules.bir.entity.vo.YtdQtdToOAVo; |
||||
|
import com.qs.serve.modules.bir.mapper.BirReportAccountBookMapper; |
||||
|
import com.qs.serve.modules.bir.mapper.BirRoiRateMapper; |
||||
|
import com.qs.serve.modules.bir.service.BirReportAccountBookService; |
||||
|
import com.qs.serve.modules.bir.service.BirRoiRateService; |
||||
|
import com.qs.serve.modules.bms.entity.BmsSupplier; |
||||
|
import com.qs.serve.modules.bms.mapper.BmsSupplierMapper; |
||||
|
import com.qs.serve.modules.erp.entity.dto.ErpDispatchSumVo; |
||||
|
import com.qs.serve.modules.erp.mapper.ErpDispatchDataMapper; |
||||
|
import com.qs.serve.modules.tbs.entity.TbsCostApply; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.math.RoundingMode; |
||||
|
import java.time.LocalDate; |
||||
|
import java.time.Month; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 服务实现类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-06-05 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@AllArgsConstructor |
||||
|
public class BirReportAccountBookServiceImpl implements BirReportAccountBookService { |
||||
|
|
||||
|
private final BirReportAccountBookMapper birReportAccountBookMapper; |
||||
|
|
||||
|
public BirReportVo getReportAccountBookData(String type){ |
||||
|
|
||||
|
BirReportVo vo = new BirReportVo(); |
||||
|
|
||||
|
String headerString = new String(); |
||||
|
birReportAccountBookMapper.getReportHeader(headerString); |
||||
|
|
||||
|
System.out.println(); |
||||
|
|
||||
|
return vo; |
||||
|
} |
||||
|
} |
||||
|
|
Loading…
Reference in new issue