package com.changhong.epc.config.service;
|
|
import com.changhong.epc.bean.count.MeInfo;
|
import com.changhong.epc.bean.tenant.master.MasterEleValue;
|
import com.changhong.epc.bean.tenant.master.MasterValue;
|
import com.changhong.epc.constter.system.MasterConst;
|
import com.iemsoft.framework.cloud.core.tools.ObjectUtil;
|
|
import javax.servlet.http.HttpServletResponse;
|
import java.io.IOException;
|
import java.io.InputStream;
|
import java.io.OutputStream;
|
import java.util.*;
|
|
public interface MasterValueService extends MasterConst {
|
|
List<?> selectMasterValueListExtend(MasterValue masterValue);
|
|
MasterValue CodeConVal(MasterEleValue masterEleValue);
|
|
MasterValue ValConCode(MasterEleValue masterEleValue);
|
|
Object selectValue(MasterValue masterValue);
|
|
String getValString(String mdCode, String mecode, List params);
|
|
String getMasterCode(MasterValue masterValue);
|
|
Object selectValueSeache(MasterValue masterValue);
|
|
List<MasterValue> getSelectValue(String defineCode);
|
|
default Object getMasterValue(List<MasterValue> list){
|
Map<Integer, Map<String,String>> group = new TreeMap<>();
|
boolean flog = true;
|
if(ObjectUtil.empty(list) || list.size()<=0){
|
return new ArrayList<MasterValue>();
|
}
|
for (MasterValue mv : list) {
|
Map<String,String> temp;
|
if(null == (temp = group.get(mv.getRowNo()))){
|
temp = new HashMap<>();
|
group.put(mv.getRowNo(),temp );
|
}
|
if(flog){
|
// System.out.println("code");
|
temp.put("code", mv.getEleValue());
|
}else{
|
temp.put("value", mv.getEleValue());
|
// System.out.println("val");
|
}
|
// System.out.println(flog);
|
flog = !flog;
|
}
|
|
|
return group.values();
|
}
|
|
Map<String, Object> getMasterValString(Map<String, Object> parm);
|
|
/**
|
* 查询主数据二维表
|
* @param defMapTableName
|
* @param defMapTalbeField
|
* @param params
|
* @return
|
*/
|
String getValTwoDimensional(String defMapTableName, String defMapTalbeField, List<MeInfo> params);
|
|
Object seacheValues( MasterValue masterValue);
|
|
/**
|
* 导入excel
|
* @param inputStream
|
* @param defineCode
|
* @return
|
*/
|
int importExcel(InputStream inputStream, String name, String defineCode) throws IOException;
|
|
void outTemplate(String defineCode, OutputStream os) throws IOException;
|
}
|