综合销售 处理查询调整 添加疗效分类
This commit is contained in:
@@ -2,12 +2,15 @@
|
|||||||
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext;
|
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.config.aspect.enhancereport.plugin.ReportAroundAdvicePlugin;
|
||||||
|
import com.lideeyunji.core.framework.entity.NewGrBiSaAggMonthCount;
|
||||||
import com.lideeyunji.core.framework.entity.NewGrBiSaAggYearCount;
|
import com.lideeyunji.core.framework.entity.NewGrBiSaAggYearCount;
|
||||||
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggMonthCountService;
|
||||||
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
||||||
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -20,6 +23,8 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.lideeyunji.core.framework.enhance.example.report.xtsy.ZhxsqkPlugin.setMonthOrderBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表-综合销售表_剂型-插件
|
* 报表-综合销售表_剂型-插件
|
||||||
*/
|
*/
|
||||||
@@ -30,54 +35,75 @@ public class ZhxsqkPluginJx implements ReportAroundAdvicePlugin {
|
|||||||
@Resource
|
@Resource
|
||||||
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
INewGrBiSaAggMonthCountService newGrBiSaAggMonthCountService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
||||||
log.info("进入=======>zhxsqkPluginJx=======>execute");
|
log.info("进入=======>zhxsqkPluginJx=======>execute");
|
||||||
List<String> groupFieldList = Arrays.asList("useYear","dosageName");
|
List<String> groupFieldList = ListUtil.toList("useYear","dosageName");
|
||||||
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService);
|
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService, newGrBiSaAggMonthCountService);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
static ResultDataModel zhxsqkFun(EnhanceReportContext enhanceContext, List<String> groupFieldList, INewGrBiSaAggYearCountService newGrBiSaAggYearCountService) {
|
static ResultDataModel zhxsqkFun(EnhanceReportContext enhanceContext, List<String> groupFieldList, INewGrBiSaAggYearCountService newGrBiSaAggYearCountService, INewGrBiSaAggMonthCountService newGrBiSaAggMonthCountService) {
|
||||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||||
Page<Object> page = PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()));
|
if(params.containsKey("useMonth")){
|
||||||
if(params.containsKey("column")){
|
groupFieldList.add("useMonth");
|
||||||
String orderBy = "";
|
params.put("useMonthStart", params.get("useMonth"));
|
||||||
if ("thisYearSaQty".equals(params.get("column"))) {
|
params.put("useMonthEnd", params.get("useMonth"));
|
||||||
orderBy = "this_year_sa_qty " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("saqty_yoy".equals(params.get("column"))) {
|
|
||||||
orderBy = "CAST(TRIM(REGEXP_SUBSTR(saqty_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisYearSaMoney".equals(params.get("column"))) {
|
|
||||||
orderBy = "this_year_sa_money " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("samoney_yoy".equals(params.get("column"))) {
|
|
||||||
orderBy = "CAST(TRIM(REGEXP_SUBSTR(samoney_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisYearProfit".equals(params.get("column"))) {
|
|
||||||
orderBy = "this_year_profit " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("profit_yoy".equals(params.get("column"))) {
|
|
||||||
orderBy = "CAST(TRIM(REGEXP_SUBSTR(profit_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisYearCost".equals(params.get("column"))) {
|
|
||||||
orderBy = "this_year_cost " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisYearSaMoneyShare".equals(params.get("column"))) {
|
|
||||||
orderBy = "this_year_sa_money_share " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisprofitshare".equals(params.get("column"))) {
|
|
||||||
orderBy = "thisprofitshare " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
if ("thisYearSaMoneyGrowth".equals(params.get("column"))) {
|
|
||||||
orderBy = "CAST(TRIM(REGEXP_SUBSTR(this_year_sa_money_growth, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
|
||||||
}
|
|
||||||
page.setUnsafeOrderBy(orderBy);
|
|
||||||
}
|
}
|
||||||
List<NewGrBiSaAggYearCount> newGrBiSaAggList = newGrBiSaAggYearCountService.selectNewGrBiSaAggGroupYearList(params, groupFieldList);
|
if(params.containsKey("useYear")){
|
||||||
PageInfo<NewGrBiSaAggYearCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
|
params.put("useYearStart", params.get("useYear"));
|
||||||
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());
|
params.put("useYearEnd", params.get("useYear"));
|
||||||
return ResultDataModel.fomat(pageInfo.getTotal(),list);
|
}
|
||||||
|
Page<Object> page = PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()));
|
||||||
|
if(groupFieldList.contains("useMonth") || params.containsKey("useMonth")){
|
||||||
|
setMonthOrderBy(params, page);
|
||||||
|
List<NewGrBiSaAggMonthCount> newGrBiSaAggList = newGrBiSaAggMonthCountService.selectNewGrBiSaAggGroupMonthList(params, groupFieldList);
|
||||||
|
PageInfo<NewGrBiSaAggMonthCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
|
||||||
|
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());
|
||||||
|
return ResultDataModel.fomat(pageInfo.getTotal(),list);
|
||||||
|
}else{
|
||||||
|
if(params.containsKey("column")){
|
||||||
|
String orderBy = "";
|
||||||
|
if ("thisYearSaQty".equals(params.get("column"))) {
|
||||||
|
orderBy = "this_year_sa_qty " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("saqty_yoy".equals(params.get("column"))) {
|
||||||
|
orderBy = "CAST(TRIM(REGEXP_SUBSTR(saqty_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisYearSaMoney".equals(params.get("column"))) {
|
||||||
|
orderBy = "this_year_sa_money " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("samoney_yoy".equals(params.get("column"))) {
|
||||||
|
orderBy = "CAST(TRIM(REGEXP_SUBSTR(samoney_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisYearProfit".equals(params.get("column"))) {
|
||||||
|
orderBy = "this_year_profit " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("profit_yoy".equals(params.get("column"))) {
|
||||||
|
orderBy = "CAST(TRIM(REGEXP_SUBSTR(profit_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisYearCost".equals(params.get("column"))) {
|
||||||
|
orderBy = "this_year_cost " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisYearSaMoneyShare".equals(params.get("column"))) {
|
||||||
|
orderBy = "this_year_sa_money_share " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisprofitshare".equals(params.get("column"))) {
|
||||||
|
orderBy = "thisprofitshare " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
if ("thisYearSaMoneyGrowth".equals(params.get("column"))) {
|
||||||
|
orderBy = "CAST(TRIM(REGEXP_SUBSTR(this_year_sa_money_growth, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString();
|
||||||
|
}
|
||||||
|
page.setUnsafeOrderBy(orderBy);
|
||||||
|
}
|
||||||
|
List<NewGrBiSaAggYearCount> newGrBiSaAggList = newGrBiSaAggYearCountService.selectNewGrBiSaAggGroupYearList(params, groupFieldList);
|
||||||
|
PageInfo<NewGrBiSaAggYearCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
|
||||||
|
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());
|
||||||
|
return ResultDataModel.fomat(pageInfo.getTotal(),list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
|
|
||||||
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext;
|
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.config.aspect.enhancereport.plugin.ReportAroundAdvicePlugin;
|
||||||
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggMonthCountService;
|
||||||
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
||||||
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.lideeyunji.core.framework.enhance.example.report.xtsy.ZhxsqkPluginJx.zhxsqkFun;
|
import static com.lideeyunji.core.framework.enhance.example.report.xtsy.ZhxsqkPluginJx.zhxsqkFun;
|
||||||
@@ -24,10 +25,14 @@ public class ZhxsqkPluginLxfl implements ReportAroundAdvicePlugin {
|
|||||||
@Resource
|
@Resource
|
||||||
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
INewGrBiSaAggMonthCountService newGrBiSaAggMonthCountService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
||||||
log.info("进入=======>zhxsqkPluginLxfl=======>execute");
|
log.info("进入=======>zhxsqkPluginLxfl=======>execute");
|
||||||
List<String> groupFieldList = Arrays.asList("useYear","effectName");
|
List<String> groupFieldList = ListUtil.toList("useYear","effectName");
|
||||||
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService);
|
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService, newGrBiSaAggMonthCountService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
|
|
||||||
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext;
|
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.config.aspect.enhancereport.plugin.ReportAroundAdvicePlugin;
|
||||||
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggMonthCountService;
|
||||||
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
import com.lideeyunji.core.framework.service.INewGrBiSaAggYearCountService;
|
||||||
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
import com.lideeyunji.tool.framework.yunji.model.ResultDataModel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.lideeyunji.core.framework.enhance.example.report.xtsy.ZhxsqkPluginJx.zhxsqkFun;
|
import static com.lideeyunji.core.framework.enhance.example.report.xtsy.ZhxsqkPluginJx.zhxsqkFun;
|
||||||
@@ -24,10 +25,14 @@ public class ZhxsqkPluginXslx implements ReportAroundAdvicePlugin {
|
|||||||
@Resource
|
@Resource
|
||||||
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
INewGrBiSaAggYearCountService newGrBiSaAggYearCountService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
INewGrBiSaAggMonthCountService newGrBiSaAggMonthCountService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
public ResultDataModel executeAround(EnhanceReportContext enhanceContext) {
|
||||||
log.info("进入=======>zhxsqkPluginXslx=======>execute");
|
log.info("进入=======>zhxsqkPluginXslx=======>execute");
|
||||||
List<String> groupFieldList = Arrays.asList("useYear","saleTypeName");
|
List<String> groupFieldList = ListUtil.toList("useYear","saleTypeName");
|
||||||
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService);
|
return zhxsqkFun(enhanceContext, groupFieldList, newGrBiSaAggYearCountService, newGrBiSaAggMonthCountService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -658,6 +658,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
current_month.dosage_id,
|
current_month.dosage_id,
|
||||||
current_month.dosage_name,
|
current_month.dosage_name,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
current_month.effect_id,
|
||||||
|
current_month.effect_name,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('stdGoodsName') || params.containsKey('stdGoodsName')">
|
<if test="groupFieldList.contains('stdGoodsName') || params.containsKey('stdGoodsName')">
|
||||||
current_month.std_goods_name,
|
current_month.std_goods_name,
|
||||||
</if>
|
</if>
|
||||||
@@ -756,7 +760,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
dosage_id,
|
dosage_id,
|
||||||
dosage_name,
|
dosage_name,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
effect_name,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
saler_name,
|
saler_name,
|
||||||
@@ -799,6 +806,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{name}
|
#{name}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="saAggParam.effectName != null and saAggParam.effectName != ''"> and effect_name in
|
||||||
|
<foreach collection="saAggParam.effectName" item="name" open="(" separator="," close=")">
|
||||||
|
#{name}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and goods_name in
|
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and goods_name in
|
||||||
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
@@ -846,6 +858,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
dosage_id,
|
dosage_id,
|
||||||
dosage_name,
|
dosage_name,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
effect_name,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
saler_name,
|
saler_name,
|
||||||
@@ -873,6 +889,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
dosage_id,
|
dosage_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -902,6 +921,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
dosage_id,
|
dosage_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -926,6 +948,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
AND current_month.dosage_id = last_month_data.dosage_id
|
AND current_month.dosage_id = last_month_data.dosage_id
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
AND current_month.effect_id = last_month_data.effect_id
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
AND current_month.saler_id = last_month_data.saler_id
|
AND current_month.saler_id = last_month_data.saler_id
|
||||||
</if>
|
</if>
|
||||||
@@ -950,6 +975,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
dosage_id,
|
dosage_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -981,6 +1009,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{name}
|
#{name}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="saAggParam.effectName != null and saAggParam.effectName != ''"> and effect_name in
|
||||||
|
<foreach collection="saAggParam.effectName" item="name" open="(" separator="," close=")">
|
||||||
|
#{name}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and goods_name in
|
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and goods_name in
|
||||||
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
@@ -1024,6 +1057,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
dosage_id,
|
dosage_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
effect_id,
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
saler_id,
|
saler_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -1050,6 +1086,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
<if test="groupFieldList.contains('dosageName') || params.containsKey('dosageName')">
|
||||||
AND yoy_month.dosage_id = current_month.dosage_id
|
AND yoy_month.dosage_id = current_month.dosage_id
|
||||||
</if>
|
</if>
|
||||||
|
<if test="groupFieldList.contains('effectName') || params.containsKey('effectName')">
|
||||||
|
AND yoy_month.effect_id = current_month.effect_id
|
||||||
|
</if>
|
||||||
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
<if test="groupFieldList.contains('salerName') || params.containsKey('salerName')">
|
||||||
AND yoy_month.saler_id = current_month.saler_id
|
AND yoy_month.saler_id = current_month.saler_id
|
||||||
</if>
|
</if>
|
||||||
@@ -1091,6 +1130,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{name}
|
#{name}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="saAggParam.effectName != null and saAggParam.effectName != ''"> and current_month.effect_name in
|
||||||
|
<foreach collection="saAggParam.effectName" item="name" open="(" separator="," close=")">
|
||||||
|
#{name}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and current_month.goods_name in
|
<if test="saAggParam.goodsName != null and saAggParam.goodsName != ''"> and current_month.goods_name in
|
||||||
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
<foreach collection="saAggParam.goodsName" item="name" open="(" separator="," close=")">
|
||||||
#{name}
|
#{name}
|
||||||
|
|||||||
Reference in New Issue
Block a user