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

This commit is contained in:
wangzhijiang
2022-09-30 15:56:53 +08:00
11 changed files with 169 additions and 21 deletions
@@ -21,6 +21,7 @@ import com.jero.common.system.util.JwtUtil;
import com.jero.common.system.vo.LoginUser;
import com.jero.common.system.vo.SysDepartTreeModel;
import com.jero.common.system.vo.SysDepartUserTreeModel;
import com.jero.common.system.vo.SysUserTreeModel;
import com.jero.common.util.ImportExcelUtil;
import com.jero.common.util.PasswordUtil;
import com.jero.common.util.RedisUtil;
@@ -63,6 +64,7 @@ import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
* 用户表 前端控制器
@@ -1533,7 +1535,53 @@ public class SysUserController {
result.setSuccess(true);
return result;
}
/**
* 查询数据 查出所有部门及其用户
*
* @return
*/
@ApiOperation(value = "用户管理-查出所有部门及其用户")
@RequestMapping(value = "/queryUserTreeList", method = RequestMethod.GET)
public Result<List<DepartUserTree>> queryUserTreeList(String cut) {
Result<List<DepartUserTree>> result = new Result<>();
List<DepartUserTree> dutList = new ArrayList<>();
List<SysDepartTreeModel> departTreeModelList = sysDepartService.queryTreeList(cut);
for (SysDepartTreeModel sdtm: departTreeModelList) {
dutList.addAll(findChildNode(sdtm));
}
result.setResult(dutList);
result.setSuccess(true);
return result;
}
private List<DepartUserTree> findChildNode(SysDepartTreeModel sdtModel) {
List<DepartUserTree> resList = new ArrayList<>();
DepartUserTree dut = new DepartUserTree();
dut.setId(sdtModel.getId());
dut.setName(sdtModel.getDepartName());
dut.setParentId(sdtModel.getParentId());
dut.setType("Depart");
resList.add(dut);
List<String> departIds = new ArrayList<>();
departIds.add(sdtModel.getId());
List<SysUser> sysUserList = sysUserService.getUserListByDepIds(departIds);
for (SysUser user: sysUserList) {
DepartUserTree dut1 = new DepartUserTree();
dut1.setId(user.getId());
dut1.setName(user.getUsername());
dut1.setParentId(sdtModel.getId());
dut1.setType("User");
resList.add(dut1);
}
if (sdtModel.getChildren() != null && sdtModel.getChildren().size() > 0) {
for (SysDepartTreeModel sdtModel1 : sdtModel.getChildren()) {
resList.addAll(findChildNode(sdtModel1));
}
}
return resList;
}
@AutoLog(value = "文档库推送部门和人员的模糊搜索")
@ApiOperation(value="文档库推送部门和人员的模糊搜索", notes="文档库推送部门和人员的模糊搜索")
@@ -0,0 +1,50 @@
package com.jero.modules.system.entity;
public class DepartUserTree {
private String id;
private String parentId;
private String name;
private String type;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return "DepartUserTree{" +
"id='" + id + '\'' +
", parentId='" + parentId + '\'' +
", name='" + name + '\'' +
", type='" + type + '\'' +
'}';
}
}
@@ -338,7 +338,6 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
queryMap.put(key, queryMapTemp);
map.put("match",queryMap);
}
must.add(map);
}
}
@@ -360,7 +359,8 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
map1.put("wildcard",map);
should.add(map1);
}
must.add(should);
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, should);
must.add(jsonObject);
}else{
Map<String, Object> map = new HashMap<>();
Map<String, Object> queryMap = new HashMap<>();
@@ -526,6 +526,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
}
JSONObject sort = new JSONObject();
// JSONObject sort = new JSONObject(new LinkedHashMap<>());
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
Map<String,Object> createTime = new HashMap<>();
Map<String,Object> createTime1 = new HashMap<>();
@@ -537,7 +538,12 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
Map<String,Object> score1 = new HashMap<>();
score.put("order","desc");
score1.put("_score",score);
// Map<String,Object> score2 = new HashMap<>();
// Map<String,Object> score3 = new HashMap<>();
// score2.put("order","desc");
// score3.put("_id",score2);
sort.putAll(score1);
// sort.putAll(score3);
}
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
@@ -563,13 +569,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
if("serial_number".equals(field)){
map31.put("boost",10);
}else if("title".equals(field)){
map31.put("boost",10);
map31.put("boost",8);
}else if("file_text".equals(field)){
map31.put("boost",0.01);
}else if("content".equals(field)){
map31.put("boost",0.01);
}else if("file_name".equals(field)){
map31.put("boost",10);
map31.put("boost",5);
}
map31.put("value", selectValue);
map21.put(field + ".keyword", map31);
@@ -583,13 +589,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
if("serial_number".equals(field)){
map32.put("boost",10);
}else if("title".equals(field)){
map32.put("boost",10);
map32.put("boost",8);
}else if("file_text".equals(field)){
map32.put("boost",0.01);
}else if("content".equals(field)){
map32.put("boost",0.01);
}else if("file_name".equals(field)){
map32.put("boost",10);
map32.put("boost",5);
}
map32.put("query", selectValue);
map22.put(field, map32);
@@ -604,13 +610,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
if("serial_number".equals(field)){
map33.put("boost",10);
}else if("title".equals(field)){
map33.put("boost",10);
map33.put("boost",8);
}else if("file_text".equals(field)){
map33.put("boost",0.01);
}else if("content".equals(field)){
map33.put("boost",0.01);
}else if("file_name".equals(field)){
map33.put("boost",10);
map33.put("boost",5);
}
map33.put("query", selectValue);
map23.put(field, map33);
@@ -621,7 +627,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
//情况举例:用户只记得中间那段字
Map<String, Object> map24 = new HashMap<>();
Map<String, Object> map44 = new HashMap<>();
map24.put(field, "*" + selectValue + "*");
Map<String, Object> map55 = new HashMap<>();
map55.put("value","*" + selectValue + "*");
if("serial_number".equals(field)){
map55.put("boost",10);
}else if("title".equals(field)){
map55.put("boost",8);
}else if("file_text".equals(field)){
map55.put("boost",0.01);
}else if("content".equals(field)){
map55.put("boost",0.01);
}else if("file_name".equals(field)){
map55.put("boost",5);
}
map24.put(field, map55);
map44.put("wildcard",map24);
queryMapJson.add(map44);
}
+1
View File
@@ -47,6 +47,7 @@
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vue-virtual-scroll-list": "^2.3.4",
"vuedraggable": "^2.20.0",
"vuex": "^3.1.0",
"vxe-table": "2.9.13",
+1
View File
@@ -1316,4 +1316,5 @@ module.exports = {
viewConsistentAssessment:'View Consistent Assessment',
viewAll:'View All',
endProcess:'End Process',
thereForTheCurrentlySelectedData:'There is no standard breakdown for the currently selected data',
}
+1
View File
@@ -1417,4 +1417,5 @@ module.exports = {
viewConsistentAssessment:'查看一致评估',
viewAll:'查看全部',
endProcess:'结束流程',
thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单',
}
@@ -24,7 +24,10 @@
<span style='padding-right: 20px'>{{ item.db_field_txt }} </span>
<a-button @click='onClickSee(item)'>{{$t('See')}}</a-button>
</div>
<span slot="ParameterDescription" slot-scope="text,record" :title="text">
<a-button @click='onClickTitle(record)'>{{$t('See')}}</a-button>
</span>
<!-- <span slot="operationbtn" slot-scope="record">-->
<!-- <span v-if='currentPersonRole === "homo"'>-->
<!--&lt;!&ndash; 认证工程师 &ndash;&gt;-->
@@ -130,6 +133,17 @@
</div>
</div>
</a-modal>
<!-- 参数说明--->
<a-modal v-model="seeVisibleView" :title="$t('ParameterDescription')" width='550px' :footer="null">
<div class="content-text">
<div class="textfield">
<span class="textfield-left" :title="$t('ParameterDescription')">{{$t('ParameterDescription')}}:</span>
<span class="textfield-right"
:title="this.description"
>{{this.description}}</span>
</div>
</div>
</a-modal>
</div>
</template>
@@ -232,6 +246,7 @@
sdt: 0, // 工程接口人
dre: 0, // 填写人
areaVisible: false,
seeVisibleView:false,
form: {},
rules: {
querySdt: [
@@ -278,6 +293,12 @@
return 'rowClassRed'
}
},
onClickTitle(val){
console.log(val)
this.description = val.description
this.seeVisibleView = true
},
pageOnChange(page, pageSize) {
this.pageNo = page
// this.$emit('handlePreservation')
@@ -492,6 +513,11 @@
customRender: 'operationbtn'
}
}
if(res.click2){
this.columns[index].scopedSlots = {
customRender: 'ParameterDescription'
}
}
}
})
this.columns = [...this.columns]
@@ -76,7 +76,7 @@
type: Array
},
echoData: {
type: Array
type: String
},
keeps: {
type: Number,
@@ -213,7 +213,6 @@
}, [])
},
getInitCheckedKeys(datas) {
console.log(datas)
let keys = datas.reduce((conn, data) => {
if (data.checked != null && data.checked === true) {
conn.push(data[this.nodeKey])
@@ -233,11 +232,6 @@
},
getNodeKey(node) {
console.log(node)
console.log(this.echoData)
if (this.echoData.includes(node.id)) {
node.checked = true
}
return getNodeKey(this.nodeKey, node.data)
},
@@ -589,6 +583,9 @@
::v-deep .el-tree-node:hover {
background: #fff !important;
}
::v-deep .is-focus .el-checkbox__inner{
border-color: #21c9cc !important;
}
</style>
<style>
.el-tree {
@@ -491,7 +491,11 @@
},
standardDecompositionDocumentClick() {
if (this.standardDecomposition && this.standardDecomposition.length > 0) {
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.standardDecomposition[0])), this.standardList)
if (this.standardDecomposition[0].sarFileSplitInfoList && this.standardDecomposition[0].sarFileSplitInfoList.length > 0) {
this.$refs.standardDecompositionSheetRef.getData(JSON.parse(JSON.stringify(this.standardDecomposition[0])), this.standardList)
} else {
this.$message.warning(this.$t('thereForTheCurrentlySelectedData'))
}
} else {
this.$message.warning(this.$t('pleaseSelectStandardFirst'))
}
@@ -226,7 +226,7 @@
this.sarFileSplitInfoList = this.standData.sarFileSplitInfoList || []
this.sarFileSplitInfoList = [...this.sarFileSplitInfoList]
this.queryParam = {}
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : null
this.visible = true
if (this.queryParam.info_id) {
this.pageNo = 1
@@ -251,7 +251,7 @@
},
searchReset() {
this.queryParam = {}
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : ''
this.queryParam.info_id = this.sarFileSplitInfoList && this.sarFileSplitInfoList.length > 0 ? this.sarFileSplitInfoList[0].id : null
if (this.queryParam.info_id) {
this.pageNo = 1
this.replacePage()
@@ -343,7 +343,7 @@
serialNumber: val.serialNumber,
TaskKey: val.prehomoTaskDefinitionKey,
flowType: 3,
isDisplay: isTrue,
isDisplay: isDisplay,
id: val.projectLibraryId,
Sponsor: 'prehomoInitiatorName',
personLiable: 'prehomoDutyName',
@@ -374,7 +374,7 @@
projectTaskInventoryId: val.projectLawsInventoryId,
TaskKey: val.verifyTaskDefinitionKey,
flowType: 4,
isDisplay: isTrue,
isDisplay: isDisplay,
Sponsor: 'verifyInitiatorName',
personLiable: 'verifyDutyName',
typeOfDeliverables: 'verifyDeliverableTypeName',