库存全品种统计表 排序问题调整,和增加后置处理器
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
|
||||
package com.lideeyunji.core.framework.enhance.example.report.xtsy;
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhancereport.plugin.ReportAfterAdvicePlugin;
|
||||
import com.lideeyunji.core.framework.utils.Func;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 报表-库存全品种统计表-插件
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("kcqmltjPlugin")
|
||||
public class KcqmltjPlugin implements ReportAfterAdvicePlugin {
|
||||
|
||||
@Override
|
||||
public void execute(EnhanceReportContext enhanceContext) {
|
||||
List<Map<String, Object>> records = enhanceContext.getResult().getRecords();
|
||||
if (Func.isEmpty(records)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(Map<String, Object> record : records){
|
||||
if(!record.containsKey("remmoney")){
|
||||
record.put("remmoney","-");
|
||||
}
|
||||
if(!record.containsKey("monthsamoney")){
|
||||
record.put("monthsamoney","-");
|
||||
}
|
||||
if(!record.containsKey("sksa")){
|
||||
record.put("sksa","-");
|
||||
}
|
||||
if(!record.containsKey("thissamoney")){
|
||||
record.put("thissamoney","-");
|
||||
}
|
||||
if(!record.containsKey("thisprofit")){
|
||||
record.put("thisprofit","-");
|
||||
}
|
||||
if(!record.containsKey("thisprofitrate")){
|
||||
record.put("thisprofitrate","-");
|
||||
}
|
||||
if(!record.containsKey("maxage")){
|
||||
record.put("maxage","-");
|
||||
}
|
||||
if(!record.containsKey("goodsid")){
|
||||
record.put("goodsid","-");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user