Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2022-04-25 17:15:11 +08:00
6 changed files with 136 additions and 83 deletions
@@ -1471,7 +1471,7 @@ public class SysUserController {
name = "/%"; name = "/%";
} }
LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SysUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.like(SysUser::getRealname,name); lambdaQueryWrapper.like(SysUser::getUsername,name);
List<SysUser> sysUserList = sysUserService.list(lambdaQueryWrapper); List<SysUser> sysUserList = sysUserService.list(lambdaQueryWrapper);
LambdaQueryWrapper<SysDepart> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SysDepart> wrapper = new LambdaQueryWrapper<>();
@@ -1491,7 +1491,7 @@ public class SysUserController {
for (SysUser sysUser : sysUserList) { for (SysUser sysUser : sysUserList) {
SysUserDepartVO sysUserDepartVO = new SysUserDepartVO(); SysUserDepartVO sysUserDepartVO = new SysUserDepartVO();
sysUserDepartVO.setKey(sysUser.getId()); sysUserDepartVO.setKey(sysUser.getId());
sysUserDepartVO.setTitle(sysUser.getRealname()); sysUserDepartVO.setTitle(sysUser.getUsername());
list.add(sysUserDepartVO); list.add(sysUserDepartVO);
} }
} }
@@ -1526,7 +1526,8 @@ public class SysUserController {
SysDepartUserTreeModel target = new SysDepartUserTreeModel(); SysDepartUserTreeModel target = new SysDepartUserTreeModel();
BeanUtils.copyProperties(sysUser, target); BeanUtils.copyProperties(sysUser, target);
target.setKey(sysUser.getId()); target.setKey(sysUser.getId());
target.setTitle(sysUser.getRealname()+"("+sysUser.getUsername()+")"); target.setTitle(sysUser.getUsername());
// target.setTitle(sysUser.getRealname()+"("+sysUser.getUsername()+")");
target.setChildren(null); target.setChildren(null);
target.setIsLeaf(true); target.setIsLeaf(true);
treeList.add(target); treeList.add(target);
@@ -215,8 +215,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameList, ",")); List<SysUser> userList = sysUserMapper.getUserListByNames(StringUtils.join(userNameList, ","));
List<String> userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList()); List<String> userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
String content = sysUser.getUsername() + "删除了" + StringUtils.join(serialNumberList, ",") + "请知晓"; String content = sysUser.getUsername() + " delete " + StringUtils.join(serialNumberList, ",") + ",Please pay attention to check.";
String contentInfo = sysUser.getUsername() + "删除了" + sbStr + "请知晓"; String contentInfo = sysUser.getUsername() + " delete " + sbStr + ",Please pay attention to check.";
//封装消息的实体类 //封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo); SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -879,7 +879,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//处理树形数据字典 //处理树形数据字典
dataList.get(0).entrySet().forEach(entry -> { dataList.get(0).entrySet().forEach(entry -> {
//下拉选处理数据字典 //下拉选处理数据字典
treeDictItem(categoryList, entry, treeFieldList, cut); treeDictItem(categoryList, entry, treeFieldList, cut,null);
}); });
//下拉单选和下拉多选数据字典处理 //下拉单选和下拉多选数据字典处理
@@ -887,7 +887,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
dataList.get(0).entrySet().forEach(entry -> { dataList.get(0).entrySet().forEach(entry -> {
if (fieldPullList.contains(entry.getKey())) { if (fieldPullList.contains(entry.getKey())) {
//下拉选处理数据字典 //下拉选处理数据字典
dictItem(sysDictItems, entry, cut, finalFieldList); dictItem(sysDictItems, entry, cut, finalFieldList,null);
} }
}); });
@@ -1551,8 +1551,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String title = (String) map.get("title"); String title = (String) map.get("title");
String serialNumber = (String) map.get("serial_number"); String serialNumber = (String) map.get("serial_number");
String href = backUrl + "/docManage/library/detail?id=" + idTemp; String href = backUrl + "/docManage/library/detail?id=" + idTemp;
String content = sysUser.getUsername() + "新增了" + serialNumber + ",请及时查看"; String content = sysUser.getUsername() + " add " + serialNumber + ",Please pay attention to check.";
String contentInfo = sysUser.getUsername() + "新增了" + href + ",请及时查看"; String contentInfo = sysUser.getUsername() + " add " + href + ",Please pay attention to check.";
//封装消息的实体类 //封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo); SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -1988,7 +1988,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<OnlCgformField> fieldFileList, List<OnlCgformField> fieldFileList,
List<OnlCgformField> fieldPullList, List<OnlCgformField> fieldPullList,
String cut) { String cut) {
StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, cut); StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, cut,null);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
if (StringUtils.isNotBlank(sb)) { if (StringUtils.isNotBlank(sb)) {
String content = sb.substring(0, sb.length() - 1); String content = sb.substring(0, sb.length() - 1);
@@ -2001,7 +2001,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} }
@NotNull @NotNull
private StringBuilder getUpdateInfo(Map<String, Object> map, List<Map<String, Object>> dataList, List<OnlCgformField> fieldList, List<OnlCgformField> fieldDateList, List<OnlCgformField> fieldFileList, List<OnlCgformField> fieldPullList, String cut) { private StringBuilder getUpdateInfo(Map<String, Object> map, List<Map<String, Object>> dataList,
List<OnlCgformField> fieldList, List<OnlCgformField> fieldDateList,
List<OnlCgformField> fieldFileList, List<OnlCgformField> fieldPullList,
String cut,String flag) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//调整dataList中map中字段顺序与表单中的一致 //调整dataList中map中字段顺序与表单中的一致
Map<String, Object> mapNew = new LinkedHashMap<>(); Map<String, Object> mapNew = new LinkedHashMap<>();
for (OnlCgformField onlCgformField : fieldList) { for (OnlCgformField onlCgformField : fieldList) {
@@ -2033,13 +2037,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//下拉选处理数据字典 //下拉选处理数据字典
for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) { for (Map.Entry<String, Object> entry : dataList.get(0).entrySet()) {
//下拉选处理数据字典 //下拉选处理数据字典
dictItem(sysDictItems, entry, cut, fieldList); dictItem(sysDictItems, entry, cut, fieldList,flag);
treeDictItem(categoryList, entry, treeFieldList, cut); treeDictItem(categoryList, entry, treeFieldList, cut,flag);
} }
for (Map.Entry<String, Object> entry : mapTemp.entrySet()) { for (Map.Entry<String, Object> entry : mapTemp.entrySet()) {
//下拉选处理数据字典 //下拉选处理数据字典
dictItem(sysDictItems, entry, cut, fieldList); dictItem(sysDictItems, entry, cut, fieldList,flag);
treeDictItem(categoryList, entry, treeFieldList, cut); treeDictItem(categoryList, entry, treeFieldList, cut,flag);
} }
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -2051,6 +2055,11 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (fields.size() != 0) { if (fields.size() != 0) {
String dbFieldTxt = fields.get(0).getDbFieldTxt(); String dbFieldTxt = fields.get(0).getDbFieldTxt();
if("1".equals(flag)){
dbFieldTxt = fields.get(0).getDbFieldEnName();
}else{
dbFieldTxt = fields.get(0).getDbFieldTxt();
}
dbFieldTxt = "<text class='highlight-class'>" + dbFieldTxt + "</text>"; dbFieldTxt = "<text class='highlight-class'>" + dbFieldTxt + "</text>";
if (value == null) { if (value == null) {
value = ""; value = "";
@@ -2077,14 +2086,27 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//处理时间类型字段 //处理时间类型字段
if (ObjectUtils.isNotEmpty(value)) { if (ObjectUtils.isNotEmpty(value)) {
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt +" "+ value + " to " + valueTemp + ",");
}else{
sb.append(dbFieldTxt + "由" + value + "改为" + valueTemp + ","); sb.append(dbFieldTxt + "由" + value + "改为" + valueTemp + ",");
}
} else if (ObjectUtils.isEmpty(valueTemp)) { } else if (ObjectUtils.isEmpty(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " "+value + " to empty " + ",");
}else{
sb.append(dbFieldTxt + "由" + value + "改为空" + ","); sb.append(dbFieldTxt + "由" + value + "改为空" + ",");
} }
}
} else { } else {
if (ObjectUtils.isNotEmpty(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + valueTemp + ",");
}else{
sb.append(dbFieldTxt + "由空改为" + valueTemp + ","); sb.append(dbFieldTxt + "由空改为" + valueTemp + ",");
} }
}
} }
} else if (fieldFile.contains(key)) { } else if (fieldFile.contains(key)) {
@@ -2106,14 +2128,29 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
boolean checkDiffrent = checkDiffrent(fileNameList, fileNameListTemp); boolean checkDiffrent = checkDiffrent(fileNameList, fileNameListTemp);
if (fileNameListTemp.size() != 0 && !checkDiffrent) { if (fileNameListTemp.size() != 0 && !checkDiffrent) {
if("1".equals(flag)){
//sysUser
sb.append(dbFieldTxt +" "+ StringUtils.join(fileNameList, ",") + " to " + StringUtils.join(fileNameListTemp, ",") + ",");
}else{
sb.append(dbFieldTxt + "由" + StringUtils.join(fileNameList, ",") + "改为" + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt + "由" + StringUtils.join(fileNameList, ",") + "改为" + StringUtils.join(fileNameListTemp, ",") + ",");
}
} else if (fileNameListTemp.size() == 0) { } else if (fileNameListTemp.size() == 0) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " "+StringUtils.join(fileNameList, ",") + " to empty " + ",");
}else{
sb.append(dbFieldTxt + "由" + StringUtils.join(fileNameList, ",") + "改为空" + ","); sb.append(dbFieldTxt + "由" + StringUtils.join(fileNameList, ",") + "改为空" + ",");
} }
}
} else { } else {
if (fileNameListTemp.size() != 0) { if (fileNameListTemp.size() != 0) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + StringUtils.join(fileNameListTemp, ",") + ",");
}else{
sb.append(dbFieldTxt + "由空改为" + StringUtils.join(fileNameListTemp, ",") + ","); sb.append(dbFieldTxt + "由空改为" + StringUtils.join(fileNameListTemp, ",") + ",");
} }
}
} }
} else { } else {
if ("replace_standard".equals(key) || "corresponding_standard".equals(key)) { if ("replace_standard".equals(key) || "corresponding_standard".equals(key)) {
@@ -2128,12 +2165,23 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
if (!"replaced_standard".equals(key)) { if (!"replaced_standard".equals(key)) {
if (ObjectUtils.isNotEmpty(value)) { if (ObjectUtils.isNotEmpty(value)) {
if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp) && !value.equals(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt +" "+ value + " to " + valueTemp + ",");
}else{
sb.append(dbFieldTxt + "由" + value + "改为" + valueTemp + ","); sb.append(dbFieldTxt + "由" + value + "改为" + valueTemp + ",");
}
} else if (ObjectUtils.isEmpty(valueTemp)) { } else if (ObjectUtils.isEmpty(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " "+value + " to empty " + ",");
}else{
sb.append(dbFieldTxt + "由" + value + "改为空" + ","); sb.append(dbFieldTxt + "由" + value + "改为空" + ",");
} }
}
} else { } else {
if (ObjectUtils.isNotEmpty(valueTemp)) { if (ObjectUtils.isNotEmpty(valueTemp)) {
if("1".equals(flag)){
sb.append(dbFieldTxt + " empty to " + valueTemp + ",");
}else{
sb.append(dbFieldTxt + "由空改为" + valueTemp + ","); sb.append(dbFieldTxt + "由空改为" + valueTemp + ",");
} }
} }
@@ -2143,6 +2191,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} }
} }
} }
}
}); });
return sb; return sb;
} }
@@ -2174,7 +2223,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String cut) { String cut) {
//1. 处理订阅的发送消息 //1. 处理订阅的发送消息
//修改的内容 //修改的内容
StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, cut); String flag ="1";//消息的标识(英文)
StringBuilder sb = getUpdateInfo(map, dataList, fieldList, fieldDateList, fieldFileList, fieldPullList, null,flag);
String sbStr = ""; String sbStr = "";
if (ObjectUtils.isNotEmpty(sb)) { if (ObjectUtils.isNotEmpty(sb)) {
sbStr = sb.substring(0, sb.length() - 1); sbStr = sb.substring(0, sb.length() - 1);
@@ -2202,8 +2252,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String url = backUrl + "/docManage/library/detail?id=" + id; String url = backUrl + "/docManage/library/detail?id=" + id;
if (StringUtils.isNotBlank(sbStr.toString())) { if (StringUtils.isNotBlank(sbStr.toString())) {
String content = sysUser.getUsername() + "对" + serialNumber + "进行了修改,请及时查看"; //您订阅的XXX已被修改
String contentInfo = sysUser.getUsername() + "修改标准" + href + "中" + sbStr.toString(); String content = "In the standard "+serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
// String content = sysUser.getUsername() + " update " + serialNumber + ",Please pay attention to check.";
//您订阅的GB 7258-2021 中,由张三将技术领域"车身"改为"车门"
String contentInfo = "In the standard "+serialNumber+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href+ sbStr.toString();
// String contentInfo = sysUser.getUsername() + " update " + href + sbStr.toString();
//封装消息的实体类 //封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo); SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -2211,7 +2266,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
} }
//飞书 //飞书
try { try {
String content = sysUser.getUsername() + "对" + serialNumber + "进行了修改,请及时查看"; String content = sysUser.getUsername() + " update " + serialNumber + ",Please pay attention to check.";
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), content, MessageTypeEnum.READ.getName(), url); iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), content, MessageTypeEnum.READ.getName(), url);
} catch (IOException e) { } catch (IOException e) {
log.error("文档新增飞书消息推送失败"); log.error("文档新增飞书消息推送失败");
@@ -2364,7 +2419,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
for (Object record : records) { for (Object record : records) {
Map<String, Object> record1 = (Map) record; Map<String, Object> record1 = (Map) record;
for (Map.Entry<String, Object> entry : record1.entrySet()) { for (Map.Entry<String, Object> entry : record1.entrySet()) {
treeDictItem(categoryList, entry, treeFieldList, (String) parameter.get("cut")); treeDictItem(categoryList, entry, treeFieldList, (String) parameter.get("cut"),null);
if ("state".equals(entry.getKey())) { if ("state".equals(entry.getKey())) {
List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList()); List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList());
//状态数据字典 //状态数据字典
@@ -2551,8 +2606,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
idList.add((String) record1.get("id")); idList.add((String) record1.get("id"));
for (Map.Entry<String, Object> entry : record1.entrySet()) { for (Map.Entry<String, Object> entry : record1.entrySet()) {
//下拉选处理数据字典 //下拉选处理数据字典
dictItem(sysDictItems, entry, cut, fieldList); dictItem(sysDictItems, entry, cut, fieldList,null);
treeDictItem(categoryList, entry, treeFieldList, cut); treeDictItem(categoryList, entry, treeFieldList, cut,null);
if(fileList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())){ if(fileList.contains(entry.getKey()) && StringUtils.isNotBlank((String)entry.getValue())){
fileIdLidt.add((String)entry.getValue()); fileIdLidt.add((String)entry.getValue());
} }
@@ -2702,7 +2757,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
* @param sysDictItems * @param sysDictItems
* @param entry * @param entry
*/ */
public void dictItem(List<SysDictItem> sysDictItems, Map.Entry<String, Object> entry, String cut, List<OnlCgformField> fieldList) { public void dictItem(List<SysDictItem> sysDictItems, Map.Entry<String, Object> entry, String cut, List<OnlCgformField> fieldList,String flag) {
//通过dictField判断字段是否为下拉选(不为空则为下拉选) //通过dictField判断字段是否为下拉选(不为空则为下拉选)
List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList()); List<OnlCgformField> onlCgformFieldList = fieldList.stream().filter(e -> entry.getKey().equals(e.getDbFieldName())).collect(Collectors.toList());
//数据字典中文 //数据字典中文
@@ -2726,7 +2781,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<String> itemText = new ArrayList<>(); List<String> itemText = new ArrayList<>();
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
itemText = dictItems.stream().map(SysDictItem::getItemText).collect(Collectors.toList()); itemText = dictItems.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
} else { } else if(CutEnum.EN.getValue().equals(cut)) {
itemText = dictItems.stream().map(SysDictItem::getEnName).collect(Collectors.toList());
}else if("1".equals(flag)){
itemText = dictItems.stream().map(SysDictItem::getEnName).collect(Collectors.toList()); itemText = dictItems.stream().map(SysDictItem::getEnName).collect(Collectors.toList());
} }
dictItemsCh.addAll(itemText); dictItemsCh.addAll(itemText);
@@ -2744,7 +2801,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|| FieldTypeEnum.PULL_MORE.getValue().equals(onlCgformFieldList.get(0).getFieldShowType())){ || FieldTypeEnum.PULL_MORE.getValue().equals(onlCgformFieldList.get(0).getFieldShowType())){
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
entry.setValue(StringUtils.join(dictItemsCh, ",")); entry.setValue(StringUtils.join(dictItemsCh, ","));
} else { } else if(CutEnum.EN.getValue().equals(cut)){
entry.setValue(StringUtils.join(dictItemsEn, ","));
}else if("1".equals(flag)){
entry.setValue(StringUtils.join(dictItemsEn, ",")); entry.setValue(StringUtils.join(dictItemsEn, ","));
} }
} }
@@ -3067,9 +3126,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
for (Map.Entry<String, Object> entry : data.entrySet()) { for (Map.Entry<String, Object> entry : data.entrySet()) {
//下拉选处理数据字典 //下拉选处理数据字典
dictItem(sysDictItems, entry, cut, fieldList); dictItem(sysDictItems, entry, cut, fieldList,null);
//处理树形数据字典 //处理树形数据字典
treeDictItem(categoryList, entry, treeFieldList, cut); treeDictItem(categoryList, entry, treeFieldList, cut,null);
} }
@@ -3679,7 +3738,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
* @param treeFieldList * @param treeFieldList
* @param cut * @param cut
*/ */
public void treeDictItem(List<SysCategory> categoryList, Map.Entry<String, Object> entry, List<OnlCgformField> treeFieldList, String cut) { public void treeDictItem(List<SysCategory> categoryList, Map.Entry<String, Object> entry, List<OnlCgformField> treeFieldList, String cut,String flag) {
List<String> treeFields = treeFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList()); List<String> treeFields = treeFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
String key = entry.getKey(); String key = entry.getKey();
if (treeFields.contains(entry.getKey())) { if (treeFields.contains(entry.getKey())) {
@@ -3691,7 +3750,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<String> nameEnList = sysCategoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList()); List<String> nameEnList = sysCategoryList.stream().map(SysCategory::getEnName).collect(Collectors.toList());
if (CutEnum.CN.getValue().equals(cut)) { if (CutEnum.CN.getValue().equals(cut)) {
entry.setValue(StringUtils.join(nameList, ",")); entry.setValue(StringUtils.join(nameList, ","));
} else { } else if(CutEnum.EN.getValue().equals(cut)){
entry.setValue(StringUtils.join(nameEnList, ","));
}else if("1".equals(flag)){
entry.setValue(StringUtils.join(nameEnList, ",")); entry.setValue(StringUtils.join(nameEnList, ","));
} }
} }
@@ -229,11 +229,11 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
List<OSSFile> fileList = new ArrayList<>(); List<OSSFile> fileList = new ArrayList<>();
mapTemp.entrySet().forEach(entry -> { mapTemp.entrySet().forEach(entry -> {
//下拉选处理数据字典 //下拉选处理数据字典
bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, (String) map.get("cut")); bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, (String) map.get("cut"),null);
//下拉单选和下拉多选数据字典处理 //下拉单选和下拉多选数据字典处理
if (fieldPullList.contains(entry.getKey())) { if (fieldPullList.contains(entry.getKey())) {
bussDocumentLibraryEOService.dictItem(sysDictItems, entry, (String) map.get("cut"), fieldList); bussDocumentLibraryEOService.dictItem(sysDictItems, entry, (String) map.get("cut"), fieldList,null);
} }
//处理文件 //处理文件
if (FieldFileList.contains(entry.getKey())) { if (FieldFileList.contains(entry.getKey())) {
@@ -11,6 +11,12 @@
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
> >
<span slot="prcType" slot-scope="text,record">
{{prcTypeName[text]}}
</span>
<span slot="isEnd" slot-scope="text,record">
{{text && text == 0 ? '未完成':'已完成'}}
</span>
<span slot="operation" slot-scope="record"> <span slot="operation" slot-scope="record">
<a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a> <a @click="classAdd(record)" style="margin-right:8px">{{$t('See')}}</a>
</span> </span>
@@ -42,12 +48,16 @@
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
selectedRowKeys: [], selectedRowKeys: [],
prcTypeName: {
1: '任务确认流程'
},
columns: [ columns: [
{ {
title: this.$t('ProcessType'), title: this.$t('ProcessType'),
dataIndex: 'prcType', dataIndex: 'prcType',
align: 'center', align: 'center',
ellipsis: true ellipsis: true,
scopedSlots: { customRender: 'prcType' }
}, },
{ {
title: this.$t('Sponsor'), title: this.$t('Sponsor'),
@@ -83,7 +93,8 @@
title: this.$t('ProcessStatus'), title: this.$t('ProcessStatus'),
dataIndex: 'isEnd', dataIndex: 'isEnd',
align: 'center', align: 'center',
ellipsis: true ellipsis: true,
scopedSlots: { customRender: 'isEnd' }
}, },
{ {
title: this.$t('cutoffTime'), title: this.$t('cutoffTime'),
@@ -191,4 +202,9 @@
position: relative; position: relative;
top: 1px; top: 1px;
} }
.page {
text-align: right;
margin-top: 20px;
}
</style> </style>
@@ -33,6 +33,7 @@
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'ProcessCenter', name: 'ProcessCenter',
data() { data() {
@@ -41,7 +42,7 @@
total: 0, total: 0,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
selectedRowKeys:[], selectedRowKeys: [],
columns: [ columns: [
{ {
title: this.$t('RelatedItems'), title: this.$t('RelatedItems'),
@@ -100,13 +101,13 @@
} }
], ],
loading: false, loading: false,
dataSource:[], dataSource: []
} }
}, },
computed: {}, computed: {},
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
onSelectChange(){ onSelectChange() {
}, },
queryProcess() { queryProcess() {
@@ -115,7 +116,7 @@
parmes.current = this.pageNo parmes.current = this.pageNo
parmes.size = this.pageSize parmes.size = this.pageSize
parmes.userId = this.userInfo().userId parmes.userId = this.userInfo().userId
postAction('task/todoTaskList',parmes).then((res)=>{ postAction('task/todoTaskList', parmes).then((res) => {
this.dataSource = res.list || [] this.dataSource = res.list || []
this.total = res.count this.total = res.count
this.loading = false this.loading = false
@@ -124,40 +125,9 @@
dealWith(row) { dealWith(row) {
let index = row.taskIds.lastIndexOf(',') let index = row.taskIds.lastIndexOf(',')
row.taskIds = row.taskIds.slice(0, index) row.taskIds = row.taskIds.slice(0, index)
if (row.prcType == '2') { if (row.prcType == '1') {
this.$router.push({ this.$router.push({
path: '/regulationUpdate', path: '/handshakeProcess',
query: row
})
} else if (row.prcType == '3') {
this.$router.push({
path: '/businessReviseTopicProjectEstablishment',
query: row
})
} else if (row.prcType == '4') {
this.$router.push({
path: '/businessReviseTopicProjectEstablishment',
query: row
})
} else if (row.prcType == '1') {
console.log('跳转更改')
this.$router.push({
path: '/projectLcaListListing',
query: row
})
} else if (row.prcType == '7') {
this.$router.push({
path: '/fileAssessFlowDetails',
query: row
})
} else if (row.prcType == '5') {
this.$router.push({
path: '/businessRevisedStandardListingDetails',
query: row
})
} else if (row.prcType == '6') {
this.$router.push({
path: '/subBusinessRevisedStandardListingDetails',
query: row query: row
}) })
} }
@@ -170,7 +140,7 @@
this.pageNo = 1 this.pageNo = 1
this.pageSize = pageSize this.pageSize = pageSize
this.queryProcess() this.queryProcess()
}, }
}, },
mounted() { mounted() {
this.queryProcess() this.queryProcess()
@@ -831,7 +831,7 @@
startProcess(value) { startProcess(value) {
let query = { let query = {
type: 1, type: 1,
msg: JSON.stringify(value) msg: value
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) { if (res.success) {
@@ -847,7 +847,12 @@
} }
postAction('/workFlow/completeTask', query).then((res) => { postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) { if (res.success) {
this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.$route
} else {
this.$message.warning(this.$t('operationFailed'))
} }
}) })
}, },