From 43adafd7b666ea49e134fced968c50845ac18780 Mon Sep 17 00:00:00 2001 From: shilei <798989044@qq.com> Date: Wed, 20 Mar 2024 17:12:53 +0800 Subject: [PATCH] =?UTF-8?q?#E10-09#=20=E8=87=AA=E5=8A=A9=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/HrmSelfHelpController.java | 155 ------------------ 1 file changed, 155 deletions(-) diff --git a/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java b/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java index e871e44..8c3778b 100644 --- a/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java +++ b/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java @@ -931,159 +931,4 @@ public class HrmSelfHelpController { return requestCountInfo; } - - @GetMapping("/testSapi80") - @WeaPermission(publicPermission = true) - public WeaResult testSapi80(HttpServletRequest request){ - - log.error("testSapi80"); - - String field_id = "977306579913818114" ; - - String groupId = "weaver-ebuilder-form-service"; - String sourceType = "LOGIC"; - - String employeeId = request.getParameter("employeeId"); - - if(StringUtils.isBlank(employeeId)){ - employeeId = String.valueOf(UserContext.getCurrentEmployeeId()); - } - - List> dataList = new ArrayList>(); - try{ - String sql = " select distinct taby from uf_zzfwrkpz where ry='"+employeeId+"' and qy is not null and taby is not null and delete_type=0 and tenant_key ='"+tenant_key+"'"; - log.error("sql:"+sql); - Map result = databaseUtils.execute(sourceType, groupId, sql); - List> 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); - }else{ - dataList = getDefaultServiceData(groupId,sourceType,field_id); - } - }catch (Exception e){ - log.error("testSapi51-Exception:"+e.getMessage()); - return WeaResult.fail(500,"程序执行异常"); - } - return WeaResult.success(dataList); - } - - - /*** - * - * @param groupId - * @param sourceType - * @return - */ - public Map getCustomServiceTypeName(String groupId,String sourceType,String employeeId){ - - Map optionMap = new HashMap(); - 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.error("getCustomServiceTypeName-sql:"+sql); - Map result = databaseUtils.execute(sourceType, groupId, sql); - List> recordList = databaseUtils.getDataSourceList(result); - for(int i=0;i 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; - } - - - public List> getCustomeServiceData(String groupId,String sourceType,String field_id,List> recordList,String employeeId){ - - Map optionMap = getCustomServiceTypeName(groupId,sourceType,employeeId); - - for(int i=0;i recordMap = recordList.get(i); - String taby = String.valueOf(recordMap.get("taby")); - log.error("getCustemSelfServiceType-taby:"+taby); - - String tabyName = optionMap.get(taby); - List> customList = getCustomeServiceDataByType(groupId,sourceType,taby,employeeId); - - log.error("getCustemSelfServiceType-tabyName:"+tabyName); - log.error("getCustemSelfServiceType-taby:"+taby); - recordMap.put("menus",customList); - recordMap.put("name",tabyName); - } - return recordList; - } - - - - - public List> getCustomeServiceDataByType(String groupId,String sourceType,String value,String employeeId){ - String sql = " select fwmc,fwdz,fwtb,taby from uf_zzfwrkpz where ry='"+employeeId+"' and qy is not null and taby is not null and taby="+value+" and delete_type=0 and tenant_key = '"+tenant_key+"'"; - log.info("getSelfServiceData--sql:"+sql); - Map result = databaseUtils.execute(sourceType, groupId, sql); - List> recordList = databaseUtils.getDataSourceList(result); - for(int i=0;i 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; - } - - - /*** - * 默认数据 - * @param groupId - * @param sourceType - * @return - */ - public List> getDefaultServiceData(String groupId,String sourceType,String field_id){ - - 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 result = databaseUtils.execute(sourceType, groupId, sql); - List> recordList = databaseUtils.getDataSourceList(result); - for(int i=0;i recordMap = recordList.get(i); - String taby = String.valueOf(recordMap.get("taby")); - List> defaultList = getDefaultServiceDataByType(groupId,sourceType,taby); - recordMap.put("menus",defaultList); - } - return recordList; - } - - /*** - * 默认数据 - * @param groupId - * @param sourceType - * @param value - * @return - */ - public List> getDefaultServiceDataByType(String groupId,String sourceType,String value){ - String sql =" select t.taby,t.fwtb,t.fwmc,t.fwdz\n" + - " from uf_zzfwcsh t \n" + - " where t.delete_type=0 \n" + - " and t.taby=" + value + - " and t.tenant_key = '"+tenant_key+"'"; - - log.error("getSelfServiceData--sql:"+sql); - Map result = databaseUtils.execute(sourceType, groupId, sql); - List> recordList = databaseUtils.getDataSourceList(result); - for(int i=0;i 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; - } - - - }