|
|
|
@ -74,7 +74,7 @@ public class SelfServiceInfoCmd {
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if(recordList.size()>0){
|
|
|
|
|
// /api/file/preview?type=redirect&imgFormat=small&fileId=977697615197618177&module=ebuilderform&authModule=ebuilderform&source=form&fieldId=977686869110833154&customParam=%7B%22dataId%22%3A%22977697666574729218%22%7D&refId=977697666574729218&folderId=8120831157448215424
|
|
|
|
|
dataList = getCustomeServiceData(groupId,sourceType,field_id,recordList,employeeId);
|
|
|
|
|
dataList = getCustomeServiceData(groupId,sourceType,employeeId);
|
|
|
|
|
record = getCustomeServiceRecord(groupId,sourceType,employeeId);
|
|
|
|
|
type = "1";
|
|
|
|
|
}else{
|
|
|
|
@ -92,27 +92,46 @@ public class SelfServiceInfoCmd {
|
|
|
|
|
return recordMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Map<String,Object>> getCustomeServiceData(String groupId,String sourceType,String field_id,List<Map<String,Object>> recordList,String employeeId){
|
|
|
|
|
public List<Map<String,Object>> getCustomeServiceData(String groupId,String sourceType,String employeeId){
|
|
|
|
|
List<Map<String,Object>> dataList = new ArrayList<Map<String,Object>>();
|
|
|
|
|
|
|
|
|
|
Map<String,String> optionMap = getCustomServiceTypeName(groupId,sourceType,employeeId);
|
|
|
|
|
|
|
|
|
|
log.error("getCustemSelfServiceType-recordList:"+recordList.size());
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<recordList.size();i++){
|
|
|
|
|
Map<String,Object> recordMap = recordList.get(i);
|
|
|
|
|
String taby = String.valueOf(recordMap.get("taby"));
|
|
|
|
|
log.error("getCustemSelfServiceType-taby:"+taby);
|
|
|
|
|
Map<String,String> optionMap = new HashMap<String,String>();
|
|
|
|
|
|
|
|
|
|
String tabyName = optionMap.get(taby);
|
|
|
|
|
List<Map<String,Object>> customList = getCustomeServiceDataByType(groupId,sourceType,taby,employeeId);
|
|
|
|
|
List<String> tbyList = new ArrayList<String>();
|
|
|
|
|
try{
|
|
|
|
|
String sql = " select id,tabymmc from uf_zzfwrktaby where qy is not null and ry=? and delete_type=0 and tenant_key = ? order by ifnull(xssx,0) ";
|
|
|
|
|
log.error("getCustomServiceTypeName-sql:"+sql);
|
|
|
|
|
List<String> strlist = new ArrayList<>(100);
|
|
|
|
|
strlist.add(employeeId);
|
|
|
|
|
strlist.add(tenant_key);
|
|
|
|
|
List<SqlParamEntity> sqlparam = databaseUtils.getSqlParamEntity(strlist);
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
for(int i=0;i<recordList.size();i++){
|
|
|
|
|
Map<String,Object> recordMap = recordList.get(i);
|
|
|
|
|
String value = String.valueOf(recordMap.get("id"));
|
|
|
|
|
String name = String.valueOf(recordMap.get("tabymmc"));
|
|
|
|
|
log.error("getCustomServiceTypeName-value:"+value+" name:"+name);
|
|
|
|
|
optionMap.put(value,name);
|
|
|
|
|
tbyList.add(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getCustemSelfServiceType-tabyName:"+tabyName);
|
|
|
|
|
recordMap.put("menus",customList);
|
|
|
|
|
recordMap.put("name",tabyName);
|
|
|
|
|
dataList.add(recordMap);
|
|
|
|
|
log.error("getCustemSelfServiceType-tbyList:"+tbyList.size());
|
|
|
|
|
|
|
|
|
|
for(int i=0;i<tbyList.size();i++){
|
|
|
|
|
Map<String,Object> recordMap = new HashMap<String,Object>();
|
|
|
|
|
String taby = String.valueOf(tbyList.get(i));
|
|
|
|
|
log.error("getCustemSelfServiceType-taby:"+taby);
|
|
|
|
|
String tabyName = optionMap.get(taby);
|
|
|
|
|
List<Map<String,Object>> customList = getCustomeServiceDataByType(groupId,sourceType,taby,employeeId);
|
|
|
|
|
log.error("getCustemSelfServiceType-tabyName:"+tabyName);
|
|
|
|
|
recordMap.put("menus",customList);
|
|
|
|
|
recordMap.put("name",tabyName);
|
|
|
|
|
dataList.add(recordMap);
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
log.error("getCustomServiceTypeName-e:"+e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getCustemSelfServiceType-dataList:"+dataList.size());
|
|
|
|
|
return dataList;
|
|
|
|
|
}
|
|
|
|
|