综合销售查询,下钻 添加查询字段 产品名称

This commit is contained in:
king
2026-04-10 16:57:16 +08:00
parent 81c7c96ba2
commit fc05eea975
7 changed files with 142 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lideeyunji.core.framework.enhance.example.report.xtsy.zhxsqkPlugin;
import com.lideeyunji.core.framework.entity.NewGrBiSaAgg;
import com.lideeyunji.core.framework.entity.NewGrBiSaAggMonthCount;
import com.lideeyunji.core.framework.entity.NewGrBiSaAggYearCount;
import com.lideeyunji.core.framework.params.SaAggParam;
@@ -115,8 +116,8 @@ public class NewGrBiSaAggMonthCountController extends BaseController
Map<String, Object> params = FuncWeb.getParameterBodyMap(req);
Page<Object> page = PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()));
zhxsqkPlugin.setMonthOrderBy(params, page);
List<NewGrBiSaAggMonthCount> newGrBiSaAggList = newGrBiSaAggService.selectNewGrBiSaAggList(params);
PageInfo<NewGrBiSaAggMonthCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
List<NewGrBiSaAgg> newGrBiSaAggList = newGrBiSaAggService.selectNewGrBiSaAggList(params);
PageInfo<NewGrBiSaAgg> pageInfo = new PageInfo<>(newGrBiSaAggList);
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());
return ResultDataModel.fomat(pageInfo.getTotal(),list);
}

View File

@@ -7,6 +7,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext;
import com.lideeyunji.core.framework.config.aspect.enhancereport.plugin.ReportAroundAdvicePlugin;
import com.lideeyunji.core.framework.entity.NewGrBiSaAgg;
import com.lideeyunji.core.framework.entity.NewGrBiSaAggMonthCount;
import com.lideeyunji.core.framework.entity.NewGrBiSaAggYearCount;
import com.lideeyunji.core.framework.service.INewGrBiSaAggMonthCountService;
@@ -103,8 +104,8 @@ public class zhxsqkPlugin implements ReportAroundAdvicePlugin {
}else {
Page<Object> page = PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()));
setMonthOrderBy(params, page);
List<NewGrBiSaAggMonthCount> newGrBiSaAggList = newGrBiSaAggService.selectNewGrBiSaAggList(params);
PageInfo<NewGrBiSaAggMonthCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
List<NewGrBiSaAgg> newGrBiSaAggList = newGrBiSaAggService.selectNewGrBiSaAggList(params);
PageInfo<NewGrBiSaAgg> pageInfo = new PageInfo<>(newGrBiSaAggList);
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());
return ResultDataModel.fomat(pageInfo.getTotal(),list);
}

View File

@@ -29,6 +29,8 @@ public class NewGrBiSaAgg implements Serializable
@TableField(value = "use_month")
private int useMonth;
@TableField(value = "ny")
private String ny;
@TableField(value = "zone_id")
private String zoneId;
@@ -105,6 +107,82 @@ public class NewGrBiSaAgg implements Serializable
private String thisMonthProfit;
@TableField(value = "last_month_sa_qty")
private String lastMonthSaQty;
@TableField(value = "yoy_month_sa_qty")
private String yoyMonthSaQty;
@TableField(value = "last_month_sa_money")
private String lastMonthSaMoney;
@TableField(value = "yoy_month_sa_money")
private String yoyMonthSaMoney;
@TableField(value = "last_month_profit")
private String lastMonthProfit;
@TableField(value = "yoy_month_profit")
private String yoyMonthProfit;
@TableField(value = "last_month_cost")
private String lastMonthCost;
@TableField(value = "yoy_month_cost")
private String yoyMonthCost;
@TableField(value = "this_month_profit_rate")
private String thisMonthProfitRate;
@TableField(value = "last_month_profit_rate")
private String lastMonthProfitRate;
@TableField(value = "last_month_profit_share")
private String lastMonthProfitShare;
@TableField(value = "this_month_sa_money_share")
private String thisMonthSaMoneyShare;
@TableField(value = "this_month_profit_share")
private String thisMonthProfitShare;
@TableField(value = "thissamoney_s")
private String thisMonthSaMoney_s;
@TableField(value = "thisprofit_s")
private String thisMonthProfit_s;
@TableField(value = "monthsaqty_yoy")
private String monthsaqty_yoy;
@TableField(value = "monthsamoney_yoy")
private String monthsamoney_yoy;
@TableField(value = "lastMonthSaMoney_yoy")
private String lastMonthSaMoney_yoy;
@TableField(value = "this_month_cost_yoy")
private String this_month_cost_yoy;
@TableField(value = "monthprofit_yoy")
private String monthprofit_yoy;

View File

@@ -72,7 +72,7 @@ public interface NewGrBiSaAggMapper extends BaseMapper<NewGrBiSaAgg>
*/
@DataPermission(enable = false)
@DS(value = "#dataSourceType")
public List<NewGrBiSaAggMonthCount> selectNewGrBiSaAggList(@Param("dataSourceType") String dataSourceType, @Param("saAggParam")SaAggParam saAggParam, @Param("params") Map<String, Object> params);
public List<NewGrBiSaAgg> selectNewGrBiSaAggList(@Param("dataSourceType") String dataSourceType, @Param("saAggParam")SaAggParam saAggParam, @Param("params") Map<String, Object> params);
/**
* 新增综合销售情况明细

View File

@@ -1,12 +1,11 @@
package com.lideeyunji.core.framework.service;
import com.lideeyunji.core.framework.entity.NewGrBiSaAgg;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import com.lideeyunji.core.framework.entity.NewGrBiSaAgg;
import com.lideeyunji.core.framework.entity.NewGrBiSaAggMonthCount;
import org.apache.ibatis.annotations.Param;
/**
* 综合销售情况明细Service接口
*
@@ -31,7 +30,7 @@ public interface INewGrBiSaAggService
* @param params 综合销售情况明细
* @return 综合销售情况明细集合
*/
public List<NewGrBiSaAggMonthCount> selectNewGrBiSaAggList(Map<String, Object> params);
public List<NewGrBiSaAgg> selectNewGrBiSaAggList(Map<String, Object> params);
/**
* 新增综合销售情况明细

View File

@@ -139,7 +139,7 @@ public class NewGrBiSaAggServiceImpl extends ServiceImpl<NewGrBiSaAggMapper, New
* @return 综合销售情况明细
*/
@Override
public List<NewGrBiSaAggMonthCount> selectNewGrBiSaAggList(Map<String, Object> params)
public List<NewGrBiSaAgg> selectNewGrBiSaAggList(Map<String, Object> params)
{
SaAggParam saAggParam = createParam(params);
return this.baseMapper.selectNewGrBiSaAggList(lideeYunJiBaseConstant.DS_ERP_BI_DATA, saAggParam, params);
@@ -172,6 +172,9 @@ public class NewGrBiSaAggServiceImpl extends ServiceImpl<NewGrBiSaAggMapper, New
if (params.containsKey("stdGoodsName")) {
saAggParam.setStdGoodsName(Arrays.asList(params.get("stdGoodsName").toString().split( ",")));
}
if (params.containsKey("goodsName")) {
saAggParam.setGoodsName(Arrays.asList(params.get("goodsName").toString().split( ",")));
}
if (params.containsKey("zoneName")) {
saAggParam.setZoneName(Arrays.asList(params.get("zoneName").toString().split( ",")));
}

View File

@@ -42,6 +42,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dosageId" column="dosage_id" />
<result property="dosageName" column="dosage_name" />
<result property="stdGoodsName" column="std_goods_name" />
<result property="stdGoodsName" column="std_goods_name" />
<result property="provinceId" column="province_id" />
<result property="provinceName" column="province_name" />
<result property="salerId" column="saler_id" />
<result property="salerName" column="saler_name" />
<result property="thisMonthSaQty" column="this_month_sa_qty" />
<result property="lastMonthSaQty" column="last_month_sa_qty" />
<result property="yoyMonthSaQty" column="yoy_month_sa_qty" />
<result property="thisMonthSaMoney" column="this_month_sa_money" />
<result property="lastMonthSaMoney" column="last_month_sa_money" />
<result property="yoyMonthSaMoney" column="yoy_month_sa_money" />
<result property="thisMonthProfit" column="this_month_profit" />
<result property="lastMonthProfit" column="last_month_profit" />
<result property="yoyMonthProfit" column="yoy_month_profit" />
<result property="thisMonthCost" column="this_month_cost" />
<result property="lastMonthCost" column="last_month_cost" />
<result property="yoyMonthCost" column="yoy_month_cost" />
<result property="thisMonthProfitRate" column="this_month_profit_rate" />
<result property="lastMonthProfitRate" column="last_month_profit_rate" />
<result property="lastMonthProfitShare" column="last_month_profit_share" />
<result property="thisMonthSaMoneyShare" column="this_month_sa_money_share" />
<result property="thisMonthProfitShare" column="this_month_profit_share" />
<result property="thisMonthSaMoney_s" column="thissamoney_s" />
<result property="thisMonthProfit_s" column="thisprofit_s" />
<result property="monthsaqty_yoy" column="monthsaqty_yoy" />
<result property="monthsamoney_yoy" column="monthsamoney_yoy" />
<result property="lastMonthSaMoney_yoy" column="lastMonthSaMoney_yoy" />
<result property="this_month_cost_yoy" column="this_month_cost_yoy" />
<result property="monthprofit_yoy" column="monthprofit_yoy" />
</resultMap>
<resultMap type="com.lideeyunji.core.framework.entity.NewGrBiSaAgg" id="NewGrBiSaAggCountResult">
<result property="id" column="id" />
<result property="ny" column="ny" />
<result property="useYear" column="use_year" />
<result property="useMonth" column="use_month" />
<result property="zoneId" column="zone_id" />
<result property="zoneName" column="zone_name" />
<result property="saleTypeId" column="sale_type_id" />
<result property="saleTypeName" column="sale_type_name" />
<result property="customId" column="custom_id" />
<result property="customName" column="custom_name" />
<result property="dosageId" column="dosage_id" />
<result property="dosageName" column="dosage_name" />
<result property="stdGoodsName" column="std_goods_name" />
<result property="goodsName" column="goods_name" />
<result property="goodsId" column="goods_id" />
<result property="stdGoodsName" column="std_goods_name" />
<result property="provinceId" column="province_id" />
<result property="provinceName" column="province_name" />
<result property="salerId" column="saler_id" />
@@ -555,7 +603,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
END,
this_year_profit_change = ( this_year_profit - last_year_profit);
</update>
<select id="selectNewGrBiSaAggList" resultMap="NewGrBiSaAggMonthCountResult">
<select id="selectNewGrBiSaAggList" resultMap="NewGrBiSaAggCountResult">
SELECT
ANY_VALUE (tbl_lgbsa.id) id,
tbl_lgbsa.use_year,