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 9f8daa3..2882b19 100644 --- a/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java +++ b/src/main/java/com/weaver/seconddev/jcldoor/controller/HrmSelfHelpController.java @@ -985,353 +985,353 @@ public class HrmSelfHelpController { // } - @GetMapping("/testSapi80") - @WeaPermission(publicPermission = true) - public WeaResult testSapi80(HttpServletRequest request){ - - log.error("testSapi80"); - - String pkey = "uf_zzfwcsh.taby.fieldId"; - String field_id = jucailinPortalUtils.getUfPropData(pkey,tenant_key); - log.error("field_id:"+field_id); - - 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{ - - if(StringUtils.isNotBlank(field_id)){ - String sql = " select distinct taby from uf_zzfwrkpz where ry=? and qy is not null and taby is not null and delete_type=0 and tenant_key ='"+tenant_key+"'"; - log.error("sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(employeeId); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - 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=? and delete_type=0 and tenant_key = '"+tenant_key+"'"; - log.error("getCustomServiceTypeName-sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(employeeId); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - - 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; - } - - - /*** - * - * @param groupId - * @param sourceType - * @param value - * @param employeeId - * @return - */ - public List> getCustomeServiceDataByType(String groupId,String sourceType,String value,String employeeId){ - String sql = " select fwmc,fwdz,fwtb,taby from uf_zzfwrkpz where ry=? 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); - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(employeeId); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - 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=? and delete_type=0 and tenant_key = '"+tenant_key+"'"; - log.error("getDefaultServiceData-sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(field_id); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - List> recordList = databaseUtils.getDataSourceList(result); - - log.error("getDefaultServiceData-recordList:"+recordList.size()); - - for(int i=0;i recordMap = recordList.get(i); - String taby = String.valueOf(recordMap.get("taby")); - log.error("getDefaultServiceData-taby:"+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= ? " + - " and t.tenant_key = '"+tenant_key+"'"; - - log.error("getDefaultServiceDataByType--sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(value); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - List> recordList = databaseUtils.getDataSourceList(result); - log.error("getDefaultServiceDataByType--recordList:"+recordList.size()); - - - 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; - } - - - @GetMapping("/testSapi90") - @WeaPermission(publicPermission = true) - public WeaResult testSapi90(HttpServletRequest request){ - - String groupId = "weaver-ebuilder-form-service"; - String sourceType = "LOGIC"; - - Map dataMap = new HashMap(); - dataMap.put("test","testSapi90"); - - try { - SimpleEmployee employee = UserContext.getCurrentUser(); - log.error("employee:"+employee.getEmployeeId()); - - long formdata = employee.getFormdata(); - dataMap.put("formdata",formdata); - log.error("formdata:"+formdata); - - String sql =" select field69,field69_obj from eteams.Hrmemployeedefined where form_data_id=? " ; - dataMap.put("sql",sql); - - log.error("getSelfServiceData--sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(String.valueOf(formdata)); - sqlparam.add(sqlParamEntity); - - Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - List> recordList = databaseUtils.getDataSourceList(result); - dataMap.put("data90",recordList); - - } catch (Exception e) { - e.printStackTrace(); - log.error("testSapi10:"+e); - dataMap.put("count","-1"); - } - return WeaResult.success(dataMap); - } - - - @GetMapping("/testSapi110") - @WeaPermission(publicPermission = true) - public WeaResult testSapi110(HttpServletRequest request){ - - String groupId = "weaver-hr-service"; - String sourceType = "LOGIC"; - - Map dataMap = new HashMap(); - dataMap.put("test","testSapi110"); - - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - try { - - String hip = "" ; - String nowDay = sdf.format(new Date()); - SimpleEmployee employee = UserContext.getCurrentUser(); - log.error("employee:"+employee.getEmployeeId()); - - long formdata = employee.getFormdata(); - dataMap.put("formdata",formdata); - String tip_id = "" ; - String sql =" select id " + - " from hr_tip\n" + - " where TIP_TYPE='birthday'\n" + - " and TENANT_KEY='t7akvdnf84'\n" + - " and DELETE_TYPE='0' " ; - dataMap.put("sql",sql); - log.error("--sql:"+sql); - Map result = databaseUtils.execute(sourceType, groupId, sql); - List> recordList = databaseUtils.getDataSourceList(result); - if(recordList.size()>0){ - Map recordMap = recordList.get(0); - tip_id = String.valueOf(recordMap.get("id")); - } - - String tip_target_id = "" ; - if(StringUtils.isNotBlank(tip_id)){ - sql = " select id from hr_tip_target \n" + - " where TIP_ID = ? \n" + - " and TARGET_TYPE='colleague' \n" + - " and tip_time_type='sameDay' "; - log.error("--sql:"+sql); - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(tip_id); - sqlparam.add(sqlParamEntity); - - Map result2 = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - List> recordList2 = databaseUtils.getDataSourceList(result2); - if(recordList2.size()>0){ - Map recordMap = recordList2.get(0); - tip_target_id = String.valueOf(recordMap.get("id")); - } - } - - if(StringUtils.isNotBlank(tip_id) && StringUtils.isNotBlank(tip_target_id)){ - sql = " select id \n" + - " from hr_tip_send_history\n" + - " where history_date = ? \n" + - " and tip_id = ? \n" + - " and tip_target_id= ? \n" + - " order by create_time desc " + - " limit 1 "; - log.error("--sql:"+sql); - - List sqlparam = new ArrayList(); - SqlParamEntity sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(nowDay); - sqlparam.add(sqlParamEntity); +// @GetMapping("/testSapi80") +// @WeaPermission(publicPermission = true) +// public WeaResult testSapi80(HttpServletRequest request){ +// +// log.error("testSapi80"); +// +// String pkey = "uf_zzfwcsh.taby.fieldId"; +// String field_id = jucailinPortalUtils.getUfPropData(pkey,tenant_key); +// log.error("field_id:"+field_id); +// +// 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{ +// +// if(StringUtils.isNotBlank(field_id)){ +// String sql = " select distinct taby from uf_zzfwrkpz where ry=? and qy is not null and taby is not null and delete_type=0 and tenant_key ='"+tenant_key+"'"; +// log.error("sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(employeeId); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// 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=? and delete_type=0 and tenant_key = '"+tenant_key+"'"; +// log.error("getCustomServiceTypeName-sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(employeeId); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// +// 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; +// } +// +// +// /*** +// * +// * @param groupId +// * @param sourceType +// * @param value +// * @param employeeId +// * @return +// */ +// public List> getCustomeServiceDataByType(String groupId,String sourceType,String value,String employeeId){ +// String sql = " select fwmc,fwdz,fwtb,taby from uf_zzfwrkpz where ry=? 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); +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(employeeId); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// 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=? and delete_type=0 and tenant_key = '"+tenant_key+"'"; +// log.error("getDefaultServiceData-sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(field_id); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// List> recordList = databaseUtils.getDataSourceList(result); +// +// log.error("getDefaultServiceData-recordList:"+recordList.size()); +// +// for(int i=0;i recordMap = recordList.get(i); +// String taby = String.valueOf(recordMap.get("taby")); +// log.error("getDefaultServiceData-taby:"+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= ? " + +// " and t.tenant_key = '"+tenant_key+"'"; +// +// log.error("getDefaultServiceDataByType--sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(value); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// List> recordList = databaseUtils.getDataSourceList(result); +// log.error("getDefaultServiceDataByType--recordList:"+recordList.size()); +// +// +// 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; +// } - sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(tip_id); - sqlparam.add(sqlParamEntity); - sqlParamEntity = new SqlParamEntity(); - sqlParamEntity.setParamType(SqlParamType.VARCHAR); - sqlParamEntity.setValue(tip_target_id); - sqlparam.add(sqlParamEntity); +// @GetMapping("/testSapi90") +// @WeaPermission(publicPermission = true) +// public WeaResult testSapi90(HttpServletRequest request){ +// +// String groupId = "weaver-ebuilder-form-service"; +// String sourceType = "LOGIC"; +// +// Map dataMap = new HashMap(); +// dataMap.put("test","testSapi90"); +// +// try { +// SimpleEmployee employee = UserContext.getCurrentUser(); +// log.error("employee:"+employee.getEmployeeId()); +// +// long formdata = employee.getFormdata(); +// dataMap.put("formdata",formdata); +// log.error("formdata:"+formdata); +// +// String sql =" select field69,field69_obj from eteams.Hrmemployeedefined where form_data_id=? " ; +// dataMap.put("sql",sql); +// +// log.error("getSelfServiceData--sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(String.valueOf(formdata)); +// sqlparam.add(sqlParamEntity); +// +// Map result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// List> recordList = databaseUtils.getDataSourceList(result); +// dataMap.put("data90",recordList); +// +// } catch (Exception e) { +// e.printStackTrace(); +// log.error("testSapi10:"+e); +// dataMap.put("count","-1"); +// } +// return WeaResult.success(dataMap); +// } - Map result3 = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); - List> recordList3 = databaseUtils.getDataSourceList(result3); - if(recordList3.size()>0){ - Map recordMap = recordList3.get(0); - hip = String.valueOf(recordMap.get("id")); - } - } - log.error("--hip:"+hip); - dataMap.put("hip",hip); - } catch (Exception e) { - e.printStackTrace(); - log.error("testSapi10:"+e); - dataMap.put("count","-1"); - } - return WeaResult.success(dataMap); - } +// @GetMapping("/testSapi110") +// @WeaPermission(publicPermission = true) +// public WeaResult testSapi110(HttpServletRequest request){ +// +// String groupId = "weaver-hr-service"; +// String sourceType = "LOGIC"; +// +// Map dataMap = new HashMap(); +// dataMap.put("test","testSapi110"); +// +// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); +// try { +// +// String hip = "" ; +// String nowDay = sdf.format(new Date()); +// SimpleEmployee employee = UserContext.getCurrentUser(); +// log.error("employee:"+employee.getEmployeeId()); +// +// long formdata = employee.getFormdata(); +// dataMap.put("formdata",formdata); +// String tip_id = "" ; +// String sql =" select id " + +// " from hr_tip\n" + +// " where TIP_TYPE='birthday'\n" + +// " and TENANT_KEY='t7akvdnf84'\n" + +// " and DELETE_TYPE='0' " ; +// dataMap.put("sql",sql); +// log.error("--sql:"+sql); +// Map result = databaseUtils.execute(sourceType, groupId, sql); +// List> recordList = databaseUtils.getDataSourceList(result); +// if(recordList.size()>0){ +// Map recordMap = recordList.get(0); +// tip_id = String.valueOf(recordMap.get("id")); +// } +// +// String tip_target_id = "" ; +// if(StringUtils.isNotBlank(tip_id)){ +// sql = " select id from hr_tip_target \n" + +// " where TIP_ID = ? \n" + +// " and TARGET_TYPE='colleague' \n" + +// " and tip_time_type='sameDay' "; +// log.error("--sql:"+sql); +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(tip_id); +// sqlparam.add(sqlParamEntity); +// +// Map result2 = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// List> recordList2 = databaseUtils.getDataSourceList(result2); +// if(recordList2.size()>0){ +// Map recordMap = recordList2.get(0); +// tip_target_id = String.valueOf(recordMap.get("id")); +// } +// } +// +// if(StringUtils.isNotBlank(tip_id) && StringUtils.isNotBlank(tip_target_id)){ +// sql = " select id \n" + +// " from hr_tip_send_history\n" + +// " where history_date = ? \n" + +// " and tip_id = ? \n" + +// " and tip_target_id= ? \n" + +// " order by create_time desc " + +// " limit 1 "; +// log.error("--sql:"+sql); +// +// List sqlparam = new ArrayList(); +// SqlParamEntity sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(nowDay); +// sqlparam.add(sqlParamEntity); +// +// sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(tip_id); +// sqlparam.add(sqlParamEntity); +// +// sqlParamEntity = new SqlParamEntity(); +// sqlParamEntity.setParamType(SqlParamType.VARCHAR); +// sqlParamEntity.setValue(tip_target_id); +// sqlparam.add(sqlParamEntity); +// +// Map result3 = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam); +// List> recordList3 = databaseUtils.getDataSourceList(result3); +// if(recordList3.size()>0){ +// Map recordMap = recordList3.get(0); +// hip = String.valueOf(recordMap.get("id")); +// } +// } +// log.error("--hip:"+hip); +// dataMap.put("hip",hip); +// +// } catch (Exception e) { +// e.printStackTrace(); +// log.error("testSapi10:"+e); +// dataMap.put("count","-1"); +// } +// return WeaResult.success(dataMap); +// } @@ -1742,4 +1742,55 @@ public class HrmSelfHelpController { } + @GetMapping("/testSapi188") + @WeaPermission(publicPermission = true) + public WeaResult testSapi188(HttpServletRequest request){ + + String groupId = "weaver-ebuilder-form-service"; + String sourceType = "LOGIC"; + + String code1 = ""; + String code2 = "" ; + Map dataMap = new HashMap(); + dataMap.put("test","testSapi188"); + try { + String sql = " update uf_nj_cyqltjb set delete_type = 1,is_delete=1 where tenant_key='"+tenant_key+"' and delete_type=0 "; + Map result = databaseUtils.execute(sourceType, groupId, sql); + Iterator> iterator2 = result.entrySet().iterator(); + while (iterator2.hasNext()){ + Map.Entry next = iterator2.next(); + log.error("insertCustomServiceData--key="+next.getKey()+" value="+String.valueOf(next.getValue())); + } + if(result.containsKey("code")){ + code1 = String.valueOf(result.get("code")); + } + + } catch (Exception e) { + e.printStackTrace(); + log.error("testSapi8:"+e); + } + + try { + String sql = " update uf_nj_pjmrdlhhsl set delete_type = 1,is_delete=1 where tenant_key='"+tenant_key+"' and delete_type=0 "; + Map result = databaseUtils.execute(sourceType, groupId, sql); + Iterator> iterator2 = result.entrySet().iterator(); + while (iterator2.hasNext()){ + Map.Entry next = iterator2.next(); + log.error("insertCustomServiceData--key="+next.getKey()+" value="+String.valueOf(next.getValue())); + } + if(result.containsKey("code")){ + code2 = String.valueOf(result.get("code")); + } + + } catch (Exception e) { + e.printStackTrace(); + log.error("testSapi8:"+e); + } + + dataMap.put("code1",code1); + dataMap.put("code2",code2); + + return WeaResult.success(dataMap); + } + }