#E10-09# 自助服务接口

main
shilei 1 year ago
parent 7e12cbe310
commit 6fb143ba04

@ -943,7 +943,6 @@ public class HrmSelfHelpController {
String groupId = "weaver-ebuilder-form-service";
String sourceType = "LOGIC";
String employeeId = request.getParameter("employeeId");
if(StringUtils.isBlank(employeeId)){
@ -980,13 +979,14 @@ public class HrmSelfHelpController {
Map<String,String> optionMap = new HashMap<String,String>();
String sql = " select id,tabymmc from uf_zzfwrktaby where qy is not null and ry='"+employeeId+"' and delete_type=0 and tenant_key = '"+tenant_key+"'";
log.info("sql:"+sql);
log.error("getCustomServiceTypeName-sql:"+sql);
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
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);
}
return optionMap;
@ -995,19 +995,15 @@ public class HrmSelfHelpController {
public List<Map<String,Object>> getCustomeServiceData(String groupId,String sourceType,String field_id,List<Map<String,Object>> recordList,String employeeId){
Map<String,String> optionMap = getCustomServiceTypeName(groupId,sourceType,field_id);
Map<String,String> optionMap = getCustomServiceTypeName(groupId,sourceType,employeeId);
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);
List<Map<String,Object>> customList = new ArrayList<Map<String,Object>>();
String tabyName = "";
if(StringUtils.isNotBlank(taby)){
tabyName = optionMap.get(taby);
customList = getCustomeServiceDataByType(groupId,sourceType,taby,employeeId);
}
String tabyName = optionMap.get(taby);
List<Map<String,Object>> customList = getCustomeServiceDataByType(groupId,sourceType,taby,employeeId);
log.error("getCustemSelfServiceType-tabyName:"+tabyName);
log.error("getCustemSelfServiceType-taby:"+taby);
@ -1025,6 +1021,15 @@ public class HrmSelfHelpController {
log.info("getSelfServiceData--sql:"+sql);
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
for(int i=0;i<recordList.size();i++){
Map<String,Object> recordMap = recordList.get(i);
String fwtb = String.valueOf(recordMap.get("fwtb"));
String fwtburl = "";
if(StringUtils.isNotBlank(fwtb)){
fwtburl = "/api/file/preview?fileId="+fwtb+"&module=ebuilderform&authModule=ebuilderform&type=imgs&source=form&fieldId="+fwtb+"&imgFormat=small";
}
recordMap.put("fwtburl",fwtburl);
}
return recordList;
}
@ -1037,14 +1042,14 @@ public class HrmSelfHelpController {
*/
public List<Map<String,Object>> getDefaultServiceData(String groupId,String sourceType,String field_id){
String sql = " select name,value_key from field_option where field_id='"+field_id+"' and delete_type=0 and tenant_key = '"+tenant_key+"'";
String sql = " select name,value_key as taby from field_option where field_id='"+field_id+"' and delete_type=0 and tenant_key = '"+tenant_key+"'";
log.info("sql:"+sql);
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
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("value_key"));
List<Map<String,Object>> defaultList = getDefaultServiceDataByType(groupId,sourceType,value);
String taby = String.valueOf(recordMap.get("taby"));
List<Map<String,Object>> defaultList = getDefaultServiceDataByType(groupId,sourceType,taby);
recordMap.put("menus",defaultList);
}
return recordList;
@ -1067,6 +1072,15 @@ public class HrmSelfHelpController {
log.error("getSelfServiceData--sql:"+sql);
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
for(int i=0;i<recordList.size();i++){
Map<String,Object> recordMap = recordList.get(i);
String fwtb = String.valueOf(recordMap.get("fwtb"));
String fwtburl = "";
if(StringUtils.isNotBlank(fwtb)){
fwtburl = "/api/file/preview?fileId="+fwtb+"&module=ebuilderform&authModule=ebuilderform&type=imgs&source=form&fieldId="+fwtb+"&imgFormat=small";
}
recordMap.put("fwtburl",fwtburl);
}
return recordList;
}

Loading…
Cancel
Save