Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
@@ -15,6 +15,8 @@ public class SysCategoryTreeVO {
|
||||
|
||||
private String key;
|
||||
|
||||
private String value;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String title;
|
||||
|
||||
+2
@@ -57,6 +57,8 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
*/
|
||||
IPage<SysUser> getUserByDepIds(Page page, @Param("departIds") List<String> departIds, @Param("username") String username);
|
||||
|
||||
List<SysUser> getUserListByDepIds(@Param("departIds") List<String> departIds);
|
||||
|
||||
/**
|
||||
* 根据角色Id查询用户信息
|
||||
* @param page
|
||||
|
||||
+12
@@ -57,6 +57,18 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getUserListByDepIds" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user where del_flag = 0
|
||||
<if test="departIds!=null and departIds.size()>0">
|
||||
and id in (select dru.user_id from sys_depart_role dr, sys_depart_role_user dru where dr.id = dru.drole_id and dr.depart_id in
|
||||
<foreach collection="departIds" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 根据角色Id查询 -->
|
||||
<select id="getUserByRoleId" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user where del_flag = 0 and id in (select user_id from sys_user_role where role_id=#{roleId})
|
||||
|
||||
+15
-8
@@ -59,17 +59,17 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
public boolean deleteBatchUsers(String userIds);
|
||||
|
||||
|
||||
public SysUser getUserByName(String username);
|
||||
|
||||
|
||||
/**
|
||||
* 添加用户和用户角色关系
|
||||
* @param user
|
||||
* @param roles
|
||||
*/
|
||||
public void addUserWithRole(SysUser user,String roles);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改用户和用户角色关系
|
||||
* @param user
|
||||
@@ -83,7 +83,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
public List<String> getRole(String username);
|
||||
|
||||
|
||||
/**
|
||||
* 查询用户信息包括 部门信息
|
||||
* @param username
|
||||
@@ -105,6 +105,13 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
*/
|
||||
public IPage<SysUser> getUserByDepIds(Page<SysUser> page, List<String> departIds, String username);
|
||||
|
||||
/**
|
||||
* 部门下用户
|
||||
* @param departIds
|
||||
* @return
|
||||
*/
|
||||
public List<SysUser> getUserListByDepIds(List<String> departIds);
|
||||
|
||||
/**
|
||||
* 根据 userIds查询,查询用户所属部门的名称(多个部门名逗号隔开)
|
||||
* @param
|
||||
@@ -154,14 +161,14 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return 权限集合
|
||||
*/
|
||||
Set<String> getUserPermissionsSet(String username);
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户名设置部门ID
|
||||
* @param username
|
||||
* @param orgCode
|
||||
*/
|
||||
void updateUserDepart(String username,String orgCode);
|
||||
|
||||
|
||||
/**
|
||||
* 根据手机号获取用户名和密码
|
||||
*/
|
||||
@@ -187,7 +194,7 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @param departs
|
||||
*/
|
||||
void editUserWithDepart(SysUser user, String departs);
|
||||
|
||||
|
||||
/**
|
||||
* 校验用户是否有效
|
||||
* @param sysUser
|
||||
|
||||
+12
-7
@@ -41,7 +41,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
@Autowired
|
||||
@@ -116,8 +116,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
public SysUser getUserByName(String username) {
|
||||
return userMapper.getUserByName(username);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addUserWithRole(SysUser user, String roles) {
|
||||
@@ -152,7 +152,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
public List<String> getRole(String username) {
|
||||
return sysUserRoleMapper.getRoleByUserName(username);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过用户名获取用户角色集合
|
||||
* @param username 用户名
|
||||
@@ -196,7 +196,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
// SysUser user = userMapper.getUserByName(username);
|
||||
// info.setSysUserCode(user.getUsername());
|
||||
// info.setSysUserName(user.getRealname());
|
||||
|
||||
|
||||
|
||||
LoginUser user = sysBaseAPI.getUserByName(username);
|
||||
if(user!=null) {
|
||||
@@ -204,7 +204,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
info.setSysUserName(user.getRealname());
|
||||
info.setSysOrgCode(user.getOrgCode());
|
||||
}
|
||||
|
||||
|
||||
//多部门支持in查询
|
||||
List<SysDepart> list = sysDepartMapper.queryUserDeparts(user.getId());
|
||||
List<String> sysMultiOrgCode = new ArrayList<String>();
|
||||
@@ -220,7 +220,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
}
|
||||
info.setSysMultiOrgCode(sysMultiOrgCode);
|
||||
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -235,6 +235,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
return userMapper.getUserByDepIds(page, departIds,username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> getUserListByDepIds(List<String> departIds) {
|
||||
return userMapper.getUserListByDepIds(departIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getDepNamesByUserIds(List<String> userIds) {
|
||||
List<SysUserDepVo> list = this.baseMapper.getDepNamesByUserIds(userIds);
|
||||
|
||||
+2
@@ -26,6 +26,7 @@ public class TreeUtils {
|
||||
SysCategoryTreeVO sysCategoryTreeVO = new SysCategoryTreeVO();
|
||||
sysCategoryTreeVO.setId(sysCategory.getId());
|
||||
sysCategoryTreeVO.setKey(sysCategory.getId());
|
||||
sysCategoryTreeVO.setValue(sysCategory.getId());
|
||||
sysCategoryTreeVO.setDictId(sysCategory.getSysDictId());
|
||||
sysCategoryTreeVO.setTitle(sysCategory.getName());
|
||||
sysCategoryTreeVO.setParentId(sysCategory.getPid());
|
||||
@@ -44,6 +45,7 @@ public class TreeUtils {
|
||||
sysCategoryTreeVO.setDictId(sysCategory.getSysDictId());
|
||||
sysCategoryTreeVO.setId(sysCategory.getId());
|
||||
sysCategoryTreeVO.setKey(sysCategory.getId());
|
||||
sysCategoryTreeVO.setValue(sysCategory.getId());
|
||||
sysCategoryTreeVO.setTitle(sysCategory.getName());
|
||||
sysCategoryTreeVO.setParentId(sysCategory.getPid());
|
||||
sysCategoryTreeVO.setChildren(getSysCategoryTreeChild(sysCategory.getId(), sysCategoryList));
|
||||
|
||||
+4
-1
@@ -443,7 +443,10 @@ public class BussDocumentLibraryEOController extends JeroController<BussDocument
|
||||
|
||||
@ApiOperation(value = "推送")
|
||||
@GetMapping(value = "/pullMessage")
|
||||
public Result<?> pullMessage(String ids) {
|
||||
public Result<?> pullMessage(String departIds,String userIds,String documentIds) {
|
||||
|
||||
bussDocumentLibraryEOService.pullMessage(departIds,userIds,documentIds);
|
||||
|
||||
return Result.OK("推送成功");
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -171,4 +171,6 @@ public interface IBussDocumentLibraryEOService extends IService<BussDocumentLibr
|
||||
*/
|
||||
List<Map<String, Object>> getHeaderOrConditionForOcr(String flag, String cut);
|
||||
|
||||
String pullMessage(String departIds,String ids,String documentIds);
|
||||
|
||||
}
|
||||
|
||||
+66
-4
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
@@ -34,6 +35,8 @@ import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.tag.entity.OnlCgformArea;
|
||||
@@ -113,6 +116,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
private DomainUserRelService domainUserRelService;
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -193,9 +200,18 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//过滤出搜索条件()
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsQuery()))).collect(Collectors.toList());
|
||||
}
|
||||
//树形数据字典
|
||||
List<SysCategoryTreeVO> sysCategoryTree = sysCategoryService.getSysCategoryTree();
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if("technology_territory".equals(onlCgformField.getDbFieldName())){
|
||||
List<SysCategoryTreeVO> sysCategoryTreeVOList = sysCategoryTree.stream().filter(e -> onlCgformField.getDictId().equals(e.getDictId())).collect(Collectors.toList());
|
||||
map.put("tree",sysCategoryTreeVOList);
|
||||
}else{
|
||||
map.put("tree",new ArrayList<>());
|
||||
}
|
||||
|
||||
map.put("field_show_type", onlCgformField.getFieldShowType());//类型(判断是下拉还是输入框,等等)
|
||||
map.put("dict_field", onlCgformField.getDictField());
|
||||
map.put("db_field_name", onlCgformField.getDbFieldName());//字段
|
||||
@@ -495,10 +511,16 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
} else if (fileInfos.size() == 1) {
|
||||
//单个文件处理
|
||||
map.put("value", fileInfos.get(0));
|
||||
mapPut(cut, map, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
resultTemp.add(map);
|
||||
Map<String, Object> mapNew = new HashMap<>();
|
||||
mapNew.put("value", fileInfos.get(0));
|
||||
mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
resultTemp.add(mapNew);
|
||||
}
|
||||
}else{
|
||||
Map<String, Object> mapNew = new HashMap<>();
|
||||
mapNew.put("value", "");
|
||||
mapPut(cut, mapNew, "field_show_type", onlCgformField.getFieldShowType(), "dict_field", onlCgformField.getDictField(), "db_field_name", onlCgformField.getDbFieldName(), "db_field_txt", onlCgformField.getDbFieldTxt(), "db_field_en_name", onlCgformField.getDbFieldEnName(), "area", areaName,null);
|
||||
resultTemp.add(mapNew);
|
||||
}
|
||||
} else {
|
||||
//处理字段类型为文件之外的字段
|
||||
@@ -729,7 +751,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (fieldFile.size() != 0 && ObjectUtils.isNotEmpty(value)) {
|
||||
|
||||
//判断文件是否修改
|
||||
if (!dataList.get(0).get(key).equals(value)) {
|
||||
if (ObjectUtils.isNotEmpty(dataList.get(0).get(key)) && !dataList.get(0).get(key).equals(value)) {
|
||||
String valueTemp = UUID.randomUUID().toString().replace("-", "");
|
||||
//修改文件表关联信息connect_id
|
||||
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||
@@ -2085,4 +2107,44 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送
|
||||
* @param userIds
|
||||
* @param documentIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String pullMessage(String departIds,String userIds,String documentIds) {
|
||||
departIds ="c6d7cb4deeac411cb3384b1b31278596";
|
||||
// if(StringUtils.isBlank(documentIds)){
|
||||
// return "请选择文档";
|
||||
// }
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(departIds)){
|
||||
//查询部门下的人员
|
||||
List<SysUser> userList = sysUserService.getUserListByDepIds(Arrays.asList(departIds.split(",")));
|
||||
if(userList.size() != 0){
|
||||
userIdList = userList.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
userIdList.addAll(Arrays.asList(userIds.split(",")));
|
||||
//查询文档
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> lambdaQueryWrapper = new LambdaQueryWrapper();
|
||||
lambdaQueryWrapper.in(BussDocumentLibraryEO::getId,Arrays.asList(documentIds.split(",")));
|
||||
List<Map<String, Object>> mapList = this.listMaps(lambdaQueryWrapper);
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
for (Map<String, Object> map : mapList) {
|
||||
serialNumberList.add((String) map.get("serial_number"));
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = sysUser.getRealname()+"向内推送了"+StringUtils.join(serialNumberList,",")+",请注意查看。";
|
||||
String contentInfo = sysUser.getRealname()+"向内推送了"+StringUtils.join(serialNumberList,",")+",请注意查看。";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, content, contentInfo);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
return "推送成功" ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,9 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': function(val) {
|
||||
console.log(val)
|
||||
if (val.meta.title == '首页') {
|
||||
this.Navigation = val.meta.title
|
||||
'$route': function(to,form) {
|
||||
if (to.meta.title == '首页') {
|
||||
this.Navigation = to.meta.title
|
||||
this.subNavigation = null
|
||||
} else {
|
||||
this.updateMenu()
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-tree-select
|
||||
v-model="formInline[item.db_field_name]"
|
||||
style="width: 100%"
|
||||
:maxTagCount="1"
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@@ -282,7 +282,7 @@
|
||||
text: this.$t('relatedInformation'),
|
||||
content: []
|
||||
}
|
||||
],
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -349,7 +349,7 @@
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.formInline[this.uploadName] = attIdList.join(',')
|
||||
this.formInline = {...this.formInline }
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
@@ -369,9 +369,9 @@
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
})
|
||||
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||
} else if (res.field_show_type === '4' || res.field_show_type === '6' ||
|
||||
res.field_show_type === '5' || res.field_show_type === '7'
|
||||
) {
|
||||
) {
|
||||
rule.push({
|
||||
required: true,
|
||||
message: res.db_field_txt + this.$t('cannotEmpty'),
|
||||
@@ -425,6 +425,7 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
console.log(this.headerText)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
expandedKeys: [],
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
selectedKey: []
|
||||
selectedKey: [],
|
||||
tableKey:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -85,6 +86,7 @@
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
//String departIds,String userIds,String documentIds
|
||||
handleSubmit() {
|
||||
getAction(this.url.pullMessage, {}).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -3,6 +3,19 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8" v-for="(item,index) in searchList" :key="index" style="line-height: 48px">
|
||||
<template>
|
||||
<div class="box-title-text" v-if="item.field_show_type == '0'">
|
||||
<div class="title-text" :title="item.db_field_txt">
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-tree-select
|
||||
class="box-input"
|
||||
v-model="queryParam[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
/>
|
||||
</div>
|
||||
<div class="box-title-text" v-if="item.field_show_type == '1'">
|
||||
<div class="title-text" :title="item.db_field_txt">
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<a-tabs>
|
||||
<a-tab-pane :tab="msg1Title" key="1">
|
||||
<a-list>
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement1">
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
||||
<div style="margin-left: 5%;width: 80%;">
|
||||
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
|
||||
<a :title="record.msgContent" @click="showAnnouncement(record)">{{ record.msgContent }}</a>
|
||||
|
||||
@@ -301,6 +301,15 @@
|
||||
localStorage.setItem('language', 'en-us')
|
||||
break
|
||||
}
|
||||
router.beforeEach((to,from,next)=>{
|
||||
console.log(to)
|
||||
console.log(from)
|
||||
return
|
||||
if(to.meta.title){
|
||||
document.title=to.meta.title
|
||||
}
|
||||
next()
|
||||
})
|
||||
store.dispatch('GetPermissionList').then(res => {
|
||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||
this.isLoading = false
|
||||
|
||||
@@ -182,9 +182,14 @@
|
||||
},
|
||||
//推送
|
||||
handleCompare() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.libraryPushRef.visible = true
|
||||
})
|
||||
if (this.idList.length > 0){
|
||||
this.$nextTick(() => {
|
||||
this.$refs.libraryPushRef.visible = true
|
||||
this.$refs.libraryPushRef.tableKey = this.idList
|
||||
})
|
||||
}else{
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//导入
|
||||
handleImport() {
|
||||
|
||||
Reference in New Issue
Block a user