Merge remote-tracking branch 'origin/apps_dev' into apps_dev

This commit is contained in:
Mr-wang 2023-08-11 10:37:00 +08:00
commit 068fbeb0b6
7 changed files with 30 additions and 19 deletions

View File

@ -111,12 +111,13 @@ public class CooperationQueryAPIManager {
// 获取符合权限的子流程 // 获取符合权限的子流程
List<PALRepositoryModel> childrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, pid); List<PALRepositoryModel> childrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, pid);
CooperationUtil.sortByLevelAndOrderIndex(childrenList); CooperationUtil.sortByLevelAndOrderIndex(childrenList);
Map<String, Integer> grandChildrenCountMap = new HashMap<>();
for (PALRepositoryModel chlidModel : childrenList) { // Map<String, Integer> grandChildrenCountMap = new HashMap<>();
List<PALRepositoryModel> grandChildrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, chlidModel.getId()); // for (PALRepositoryModel chlidModel : childrenList) {
grandChildrenCountMap.put(chlidModel.getId(), grandChildrenList.size()); // List<PALRepositoryModel> grandChildrenList = getUsedPalRepositoryModelsByPidNew(wsId, teamId, chlidModel.getId());
} // grandChildrenCountMap.put(chlidModel.getId(), grandChildrenList.size());
JSONArray result = list2JsonNew(childrenList, grandChildrenCountMap); // }
JSONArray result = list2JsonNew(childrenList);
return result; return result;
} }
@ -188,7 +189,7 @@ public class CooperationQueryAPIManager {
* @param childrenCountMap list中的model是否具有子节点map记录 * @param childrenCountMap list中的model是否具有子节点map记录
* @return * @return
*/ */
private JSONArray list2JsonNew(List<PALRepositoryModel> list, Map<String, Integer> childrenCountMap) { private JSONArray list2JsonNew(List<PALRepositoryModel> list) {
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
for (PALRepositoryModel model : list) { for (PALRepositoryModel model : list) {
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
@ -216,7 +217,7 @@ public class CooperationQueryAPIManager {
} }
object.put("icon", icon); object.put("icon", icon);
List<PALRepositoryModel> children = null; List<PALRepositoryModel> children = null;
if (childrenCountMap.containsKey(model.getId()) && childrenCountMap.get(model.getId()) > 0) { if (PALRepositoryCache.getByPid(model.getWsId(), model.getId()).hasNext()) {
object.put("leaf", false);// 非叶子节点 object.put("leaf", false);// 非叶子节点
} else { } else {
object.put("leaf", true);// 叶子节点 object.put("leaf", true);// 叶子节点

View File

@ -820,6 +820,11 @@ function openTextareaDialog(obj, title,id) {
if (parent.isParentShow) { if (parent.isParentShow) {
parent.$("#textarea-dialog textarea").val(obj.val()); parent.$("#textarea-dialog textarea").val(obj.val());
parent.$("#textarea-dialog").attr("title", title); parent.$("#textarea-dialog").attr("title", title);
// 只读
if (id){
var textarea = parent.$('#textarea-dialog textarea');
textarea.prop('readonly', true);
}
// parent.$("#textarea-dialog textarea").blur(); // parent.$("#textarea-dialog textarea").blur();
parent.$("#textarea-dialog").dialog({ parent.$("#textarea-dialog").dialog({
draggable: true, draggable: true,
@ -849,6 +854,11 @@ function openTextareaDialog(obj, title,id) {
} else { } else {
$("#textarea-dialog textarea").val(obj.val()); $("#textarea-dialog textarea").val(obj.val());
$("#textarea-dialog").attr("title", title); $("#textarea-dialog").attr("title", title);
// 只读
if (id){
var textarea = $('#textarea-dialog textarea');
textarea.prop('readonly', true);
}
// $("#textarea-dialog textarea").blur(); // $("#textarea-dialog textarea").blur();
$("#textarea-dialog").dialog({ $("#textarea-dialog").dialog({
buttons : [{ buttons : [{

View File

@ -113,14 +113,14 @@ public class DocumentsToReadController {
return HtmlPageTemplate.merge("com.awspaas.user.apps.docview", html, map); return HtmlPageTemplate.merge("com.awspaas.user.apps.docview", html, map);
} }
private void setArrayWfc(String fileId,JSONArray jsonArray,String uid) { private void setArrayWfc(String fileId,JSONArray jsonArray,String uid) {
String sqlAll = "SELECT * FROM BO_EU_PAL_DOC_VIEW WHERE ID = '"+fileId+"'"; String sqlAll = "SELECT FILEID,FILENAME,FILEURL,FILECREATEDATE FROM BO_EU_PAL_DOC_VIEW WHERE ID = '"+fileId+"'";
List<RowMap> map1 = DBSql.getMaps(sqlAll); List<RowMap> map1 = DBSql.getMaps(sqlAll);
if (map1.size()!=0) { if (map1.size()!=0) {
getWFC(jsonArray, map1, uid); getWFC(jsonArray, map1, uid);
} }
} }
private void setArrayWfh(String fileId,JSONArray jsonArray,String uid) { private void setArrayWfh(String fileId,JSONArray jsonArray,String uid) {
String sqlAll = "SELECT * FROM BO_EU_PAL_DOC_VIEW WHERE ID = '"+fileId+"'"; String sqlAll = "SELECT FILEID,FILENAME,FILEURL,FILECREATEDATE FROM BO_EU_PAL_DOC_VIEW WHERE ID = '"+fileId+"'";
List<RowMap> map1 = DBSql.getMaps(sqlAll); List<RowMap> map1 = DBSql.getMaps(sqlAll);
if (map1.size()!=0) { if (map1.size()!=0) {
getWFH(jsonArray, map1, uid); getWFH(jsonArray, map1, uid);
@ -228,7 +228,7 @@ public class DocumentsToReadController {
public JSONArray getWFC(JSONArray jsonArray, List<RowMap> maps, String uid) { public JSONArray getWFC(JSONArray jsonArray, List<RowMap> maps, String uid) {
for (RowMap rowMap : maps) { for (RowMap rowMap : maps) {
String id = rowMap.getString("FILEID"); String id = rowMap.getString("FILEID");
String sqlt = "SELECT * FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME =?"; String sqlt = "SELECT ID FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME =?";
RowMap mapt = DBSql.getMap(sqlt, new Object[] { id, uid }); RowMap mapt = DBSql.getMap(sqlt, new Object[] { id, uid });
if (mapt == null) { if (mapt == null) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@ -333,7 +333,7 @@ public class DocumentsToReadController {
for (RowMap rowMap : maps) { for (RowMap rowMap : maps) {
String id = rowMap.getString("FILEID"); String id = rowMap.getString("FILEID");
String fileName = rowMap.getString("FILENAME"); String fileName = rowMap.getString("FILENAME");
RowMap map = DBSql.getMap("SELECT * FROM BO_ACT_DATAID WHERE READSTATE = '已读' AND TITLE LIKE '%"+fileName+"%' AND USER_ID = '"+uid+"'"); RowMap map = DBSql.getMap("SELECT ID FROM BO_ACT_DATAID WHERE READSTATE = '已读' AND TITLE LIKE '%"+fileName+"%' AND USER_ID = '"+uid+"'");
if(map!=null) { if(map!=null) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
String fileUrl = rowMap.getString("FILEURL"); String fileUrl = rowMap.getString("FILEURL");
@ -356,7 +356,7 @@ public class DocumentsToReadController {
for (RowMap rowMap : maps) { for (RowMap rowMap : maps) {
try { try {
String id = rowMap.getString("FILEID"); String id = rowMap.getString("FILEID");
String sqlt = "SELECT * FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME =?"; String sqlt = "SELECT ID FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME =?";
RowMap mapt = DBSql.getMap(sqlt, new Object[] { id, uid }); RowMap mapt = DBSql.getMap(sqlt, new Object[] { id, uid });
if (mapt != null) { if (mapt != null) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
@ -395,7 +395,7 @@ public class DocumentsToReadController {
String fileName = split[1]; String fileName = split[1];
String uid = UserContext.fromSessionId(sid).getUID(); String uid = UserContext.fromSessionId(sid).getUID();
System.err.println("阅读文件===========》"+uid); System.err.println("阅读文件===========》"+uid);
String sql = "SELECT * FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?"; String sql = "SELECT READFILECOUNT FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?";
RowMap map = DBSql.getMap(sql, new Object[] { id, uid }); RowMap map = DBSql.getMap(sql, new Object[] { id, uid });
int num = 0; int num = 0;
if (null != map) { if (null != map) {

View File

@ -740,8 +740,8 @@ public class TaskController {
//门户待阅同步更新 //门户待阅同步更新
public String setRecord(String uid, String id, String fileName) { public String setRecord(String uid, String id, String fileName) {
String sql = "SELECT * FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?"; String sql = "SELECT READFILECOUNT FROM BO_EU_PAL_RECORD WHERE FILEID = ? AND READFILENAME = ?";
RowMap map = DBSql.getMap(sql, new Object[]{id, uid}); RowMap map= DBSql.getMap(sql, new Object[]{id, uid});
int num = 0; int num = 0;
if (null != map) { if (null != map) {
String readCount = map.getString("READFILECOUNT"); String readCount = map.getString("READFILECOUNT");

View File

@ -325,7 +325,7 @@ public class DataViewService extends ActionWeb {
ro.put("nodes", UoPProcessMaps); ro.put("nodes", UoPProcessMaps);
linksMaps = new LinkedList<Map>(); linksMaps = new LinkedList<Map>();
ro.put("links", linksMaps); ro.put("links", linksMaps);
ro.info("您所查询的岗位暂无需执行的流程"); ro.info("您所在的组织,暂无配置可发起的流程");
} else { } else {
for (Map uoPProcessMap : UoPProcessMaps) { for (Map uoPProcessMap : UoPProcessMaps) {
@ -581,7 +581,7 @@ public class DataViewService extends ActionWeb {
ro.put("nodes", UoPProcessMaps); ro.put("nodes", UoPProcessMaps);
linksMaps = new LinkedList<Map>(); linksMaps = new LinkedList<Map>();
ro.put("links", linksMaps); ro.put("links", linksMaps);
ro.info("您所查询的岗位暂无需执行的流程"); ro.info("您所在的组织,暂无配置可发起的流程");
} }
} }
@ -1452,7 +1452,7 @@ public class DataViewService extends ActionWeb {
ro.put("nodes", UoPProcessMaps); ro.put("nodes", UoPProcessMaps);
linksMaps = new LinkedList<Map>(); linksMaps = new LinkedList<Map>();
ro.put("links", linksMaps); ro.put("links", linksMaps);
ro.info("您所查询的岗位暂无需执行的流程"); ro.info("您所在的组织,暂无配置可发起的流程");
} }
} }