认证-参数项收集清单-修改消息中的跳转链接
This commit is contained in:
+68
-6
@@ -1294,6 +1294,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
||||||
@@ -1325,8 +1327,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
SysUser sysUser = sysUserService.getUserByName(dre);
|
SysUser sysUser = sysUserService.getUserByName(dre);
|
||||||
String[] thirdIds = new String[1];
|
String[] thirdIds = new String[1];
|
||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
|
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it.";
|
String content = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " and other parameter items, please enter the link to handle it.";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " please enter " + href + " to handle it.";
|
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length()-1) + " please enter " + href + " to handle it.";
|
||||||
String msgTitle = "You have a homo parameter task to complete";
|
String msgTitle = "You have a homo parameter task to complete";
|
||||||
@@ -1385,6 +1388,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
String[] paramsCollectManifestIdStr = paramsCollectManifestIds.split(",");
|
||||||
@@ -1450,8 +1455,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
SysUser sysUser = sysUserService.getUserByName(sdt);
|
SysUser sysUser = sysUserService.getUserByName(sdt);
|
||||||
String[] thirdIds = new String[1];
|
String[] thirdIds = new String[1];
|
||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
|
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
||||||
String msgTitle = "You have a homo parameter task to complete";
|
String msgTitle = "You have a homo parameter task to complete";
|
||||||
|
|
||||||
@@ -1509,6 +1515,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // 获取当前登录人
|
||||||
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
ParamsManifestVO projectInfo = paramsManifestEOService.getProjectById(projectId); // 获取项目信息
|
||||||
|
ParamsManifestEO paramsManifestEO = paramsManifestEOService.queryById(paramsManifestId); // 获取清单信息
|
||||||
|
paramsManifestEO.setProjectName(projectInfo.getProjectName());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
List<ParamsCollectManifestEO> updateEOList = new ArrayList<>();
|
||||||
@@ -1576,8 +1584,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
SysUser sysUser = sysUserService.getUserByName(sdt);
|
SysUser sysUser = sysUserService.getUserByName(sdt);
|
||||||
String[] thirdIds = new String[1];
|
String[] thirdIds = new String[1];
|
||||||
thirdIds[0] = sysUser.getThirdId();
|
thirdIds[0] = sysUser.getThirdId();
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId;
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String href = "<a href='/ParameterItemCollection?id=" + paramsManifestId + "&projectId=" + projectId + "'" + " target='_blank'>the link</a>,";
|
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||||
|
String href = "<a href='/ParameterItemCollection" + urlParamsStr + "'" + " target='_blank'>the link</a>,";
|
||||||
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
String contentInfo = connectBuilder.substring(0, connectBuilder.toString().length() - 1) + " and other parameter items, please enter " + href + " and fill in the relevant information.";
|
||||||
String msgTitle = "You have a homo parameter task to complete";
|
String msgTitle = "You have a homo parameter task to complete";
|
||||||
|
|
||||||
@@ -2446,6 +2455,59 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过实体类获取 URL Params
|
||||||
|
*
|
||||||
|
* @param clazz 实体类
|
||||||
|
* @return URL Params
|
||||||
|
*/
|
||||||
|
private String parseUrlParams(Object clazz) {
|
||||||
|
// 遍历属性类、属性值
|
||||||
|
List<Field> list = findAllFieldsOfSelfAndSuperClass(clazz.getClass());
|
||||||
|
|
||||||
|
StringBuilder requestURL = new StringBuilder();
|
||||||
|
try {
|
||||||
|
|
||||||
|
boolean flag = true;
|
||||||
|
String property, value, params;
|
||||||
|
for (Field field : list) {
|
||||||
|
// 允许访问私有变量
|
||||||
|
field.setAccessible(true);
|
||||||
|
// 过滤静态属性
|
||||||
|
if (Modifier.isStatic(field.getModifiers())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 属性名
|
||||||
|
property = field.getName();
|
||||||
|
// 属性值
|
||||||
|
if (field.get(clazz) != null) {
|
||||||
|
if (Date.class.equals(field.getType())) {
|
||||||
|
Date date = (Date) field.get(clazz);
|
||||||
|
String pattern = "";
|
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
SimpleDateFormat formatter=new SimpleDateFormat(pattern);
|
||||||
|
String time=formatter.format(date);
|
||||||
|
value = time;
|
||||||
|
} else {
|
||||||
|
value = field.get(clazz).toString();
|
||||||
|
}
|
||||||
|
params = property + "=" + value;
|
||||||
|
} else {
|
||||||
|
params = property + "=";
|
||||||
|
}
|
||||||
|
if (flag) {
|
||||||
|
requestURL.append("?").append(params);
|
||||||
|
flag = false;
|
||||||
|
} else {
|
||||||
|
requestURL.append("&").append(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("通过实体类获取URL出现异常:" + e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return requestURL.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实体对象转成Map
|
* 实体对象转成Map
|
||||||
* @param obj 实体对象
|
* @param obj 实体对象
|
||||||
|
|||||||
Reference in New Issue
Block a user