Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-04-25 18:04:53 +08:00
13 changed files with 296 additions and 81 deletions
@@ -1106,13 +1106,33 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
map.put("corresponding_standard", map.get("corresponding_standard_id"));
}
//字段属性
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
//过滤所有人员选择类型的字段
List<OnlCgformField> personnelOnlCgformFieldList = fieldList.stream()
.filter(e -> FieldTypeEnum.PERSON.getValue().equals(e.getFieldShowType())).collect(Collectors.toList());
if(personnelOnlCgformFieldList.size() != 0){
List<String> collect = personnelOnlCgformFieldList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
List<String> personnelList = new ArrayList<>();
for (Map.Entry<String, Object> entry : map.entrySet()) {
String key = entry.getKey();
if(collect.contains(key)){
personnelList.add(key);
}
}
if(personnelList.size() != 0){
for (String personnel : personnelList) {
map.put(personnel, map.get(personnel+"_id"));
map.remove(personnel+"_id");
}
}
}
//代替标准不为空,需要向被替代标准的法规工程师发送站内通知和飞书信息,提醒内容:"新标准编号"已实施,请注意更新“替代标准编号”状态
String cut = (String) map.get("cut");
map.remove("cut");
map.remove("replace_standard_id");
map.remove("corresponding_standard_id");
//字段属性
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
//获取搜索中心字段
List<OnlCgformField> searchFieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(e.getIsShowSearch())).collect(Collectors.toList());
//文件类型字段
@@ -2597,16 +2617,59 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
.filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
List<String> fileList = onlCgformFieldFileList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
//过滤出人员选择字段
List<OnlCgformField> personnelPnlCgformFieldFileList = fieldList.stream()
.filter(e -> FieldTypeEnum.PERSON.getValue().equals(e.getFieldShowType()))
.collect(Collectors.toList());
List<String> personnelList = personnelPnlCgformFieldFileList.stream().map(OnlCgformField::getDbFieldName).collect(Collectors.toList());
List<String> personnelValue = new ArrayList<>();
List<Map> records = infoPage.getRecords();
for (Map record : records) {
Map<String, Object> record1 = (Map) record;
for (Map.Entry<String, Object> entry : record1.entrySet()) {
//过滤出人员选择的数据
if(personnelList.size() != 0 && personnelList.contains(entry.getKey())){
String value = (String) entry.getValue();
if(ObjectUtils.isNotEmpty(value)){
personnelValue.addAll(Arrays.asList(value.split(",")));
}
}
}
}
List<SysUser> userList = new ArrayList<>();
if(personnelValue.size() != 0){
//查询用户信息(根据用户名)
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>();
wrapper.in(SysUser::getId,personnelValue);
userList = sysUserService.list(wrapper);
}
//数据字典
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
//下拉选处理数据字典
List<Map> records = infoPage.getRecords();
List<String> idList = new ArrayList<>();
List<String> fileIdLidt = new ArrayList<>();
for (Map record : records) {
Map<String, Object> record1 = (Map) record;
idList.add((String) record1.get("id"));
for (Map.Entry<String, Object> entry : record1.entrySet()) {
String key = entry.getKey();
String value = (String) entry.getValue();
//处理人员选择
if(personnelList.contains(key) && StringUtils.isNotBlank(value)){
StringBuilder sb = new StringBuilder();
for (String userId : value.split(",")) {
List<SysUser> sysUserList = userList.stream().filter(e -> userId.equals(e.getId())).collect(Collectors.toList());
if(sysUserList.size() != 0){
sb.append(sysUserList.get(0).getUsername()+",");
}
}
if(StringUtils.isNotBlank(sb)){
String substring = sb.substring(0, sb.length() - 1);
entry.setValue(substring);
}
}
//下拉选处理数据字典
dictItem(sysDictItems, entry, cut, fieldList,null);
treeDictItem(categoryList, entry, treeFieldList, cut,null);
@@ -2615,6 +2678,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
}
}
}
if(fileIdLidt.size() != 0){
List<OSSFile> fileInfos = iOSSFileService.getFileInfos(StringUtils.join(fileIdLidt, ","));
if(fileInfos.size() != 0){
@@ -114,6 +114,8 @@ public class TaskController {
@ApiOperation(value="已办流程", notes="已办流程")
@PostMapping("/doneProcess")
public Page doneProcess(@RequestBody TaskCommonQuery taskCommonQuery){
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
taskCommonQuery.setUserId(sysUser.getId());
return taskFeignClient.doneProcess(taskCommonQuery);
}
@@ -361,6 +361,17 @@ eureka:
fetch-registry: true
service-url:
defaultZone: http://127.0.0.1:8123/eureka/
#解决eureka注册的时候使用ip 而不是hostName问题(使用hostName,可能调用延迟 甚至调用失败)
instance:
prefer-ip-address: true
# feign调用超时时间配置
feign:
client:
config:
default:
connectTimeout: 10000
readTimeout: 600000
## people 2.0
people:
appId: 100679
+2 -1
View File
@@ -716,5 +716,6 @@ module.exports = {
result: 'result',
opinion: 'opinion',
operationNode: 'operation node',
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty'
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
selectIssuer:'Select issuer',
}
+1
View File
@@ -722,4 +722,5 @@ module.exports = {
result:'结果',
opinion:'意见',
operationNode:'操作节点',
selectIssuer:'选择下发人',
}
@@ -639,8 +639,10 @@
loadFormInfo(){
getAction(`split/sarFileSplitItems/getSplitItemsById`,{id:this.itemId}).then(res=>{
if(res.success){
this.formInline=[...res.result]
// todo
console.log(res,'res...')
this.formInline=[...res.result]
}
})
},
@@ -691,22 +693,6 @@
// todo
this.$refs.splitEditForm.validate(valid=>{
if(valid){
// 标准编号 -- 选取或者填写的
let _formInlinevalueItem = this.formInline[this.valueItem].split(',')
// 标准编号的id临时变量
let _valueItemArr = []
if(this.formArrayName.length > 0) {
this.formArrayName.forEach((item, index) => {
_formInlinevalueItem.forEach((itemlabel, indexlabel) => {
if(itemlabel === item) {
_valueItemArr.push(this.formArrayId[index])
}
})
})
}
if(_valueItemArr.length > 0) {
this.formInline[this.valueItem + '_id'] = _valueItemArr.join(',')
}
this.loading = true
if(!this.submitFlag){
this.submitFlag=true
@@ -715,6 +701,24 @@
url = this.url.updateInfo
} else {
url = this.url.addInfo
// 标准编号 -- 选取或者填写的
let _formInlinevalueItem = this.formInline[this.valueItem].split(',')
// 标准编号的id临时变量
let _valueItemArr = []
if(this.formArrayName.length > 0) {
this.formArrayName.forEach((item, index) => {
_formInlinevalueItem.forEach((itemlabel, indexlabel) => {
if(itemlabel === item) {
_valueItemArr.push(this.formArrayId[index])
}
})
})
}
if(_valueItemArr.length > 0) {
this.formInline[this.valueItem + '_id'] = _valueItemArr.join(',')
} else {
this.formInline[this.valueItem + '_id'] = ''
}
}
let params = JSON.parse(JSON.stringify(this.formInline))
@@ -6,14 +6,15 @@
</div>
</div>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-row :gutter="24" v-if="isFlag">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('reviewResults')">{{$t('reviewResults')}}</span>
</div>
<a-form-model-item class="itemModel" prop="standard">
<a-radio-group style="margin-top: 2px" class="box-input" v-model="formInline.resource">
<a-form-model-item class="itemModel" prop="flag">
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.flag">
<a-radio value="1">
{{$t('agree')}}
</a-radio>
@@ -28,29 +29,47 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="isTrue">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('selectIssuer')">{{$t('selectIssuer')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dreUserIdName">
<PersonnelSelection class="box-input"
:personneQuery="formInline"
:query="{db_field_name:'dreUserId',db_field_txt:$t('selectIssuer')}"
:isInput="true"
@change="PersonnelSelectionChange"
v-model="formInline.dreUserIdName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="isApprovalOpinion">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
</div>
<a-form-model-item class="itemModel" prop="standard">
<a-textarea placeholder="Basic usage" v-model="formInline.desc" :rows="4" />
<a-textarea placeholder="Basic usage" v-model="formInline.approvalOpinion" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="isViewUploadedFiles">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('enclosure')">{{$t('enclosure')}}</span>
</div>
<a-form-model-item class="itemModel" prop="enclosure">
<a-form-model-item class="itemModel" prop="approvalFile">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('enclosure')">
{{ (formInline.enclosure === 'null' || formInline.enclosure === '' ||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
@click="clickButtonToUpload('approvalFile')">
{{ (formInline.approvalFile === 'null' || formInline.approvalFile === '' ||
formInline.approvalFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
@@ -65,20 +84,53 @@
<script>
import { getAction, postAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
import PersonnelSelection from '@/components/PersonnelSelection/index'
export default {
name: 'examineInformation',
components:{
uploadFile
props: {
isFlag:{
type:Boolean,
default:false,
},
isViewUploadedFiles:{
type:Boolean,
default:false,
},
isApprovalOpinion:{
type:Boolean,
default:false,
},
},
components: {
uploadFile,
PersonnelSelection
},
data() {
return {
formInline: {},
rules: {}
isTrue: false,
rules: {
flag: [
{
required: true,
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
dreUserIdName: [
{
required: true,
message: this.$t('selectIssuer') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
mounted() {
},
methods:{
methods: {
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
@@ -103,7 +155,25 @@
this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline }
},
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
flagChange(event) {
if (event.target.value == 3) {
this.isTrue = true
} else {
this.isTrue = false
}
},
submit(callBack) {
this.$refs.ruleForm.validate(valid => {
if (valid) {
callBack(this.formInline)
}
})
}
}
}
</script>
@@ -133,7 +203,7 @@
}
.title-text {
width: 57px;
width: 88px;
text-align: right;
display: inline-block;
font-weight: 500;
@@ -172,6 +242,7 @@
.formAdd {
margin-bottom: 40px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
@@ -8,7 +8,7 @@
<div class="content-text">
<div class="text-field" v-for="(item,index) in projectInformationList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right"
<span class="text-field-right" :title="queryForm[item.value]"
>{{queryForm[item.value]}}</span>
</div>
</div>
@@ -8,7 +8,7 @@
<div class="content-text">
<div class="text-field" v-for="(item,index) in standardContentList" :key="index">
<span class="text-field-left" :title="item.title">{{item.title}}</span>
<span class="text-field-right"
<span class="text-field-right" :title="queryForm[item.value]"
>{{queryForm[item.value]}}</span>
</div>
</div>
@@ -31,30 +31,20 @@
type: Object,
default: {}
},
standardContentId: {
type: String,
default: ''
standardContentQuery: {
type: Object,
default: {}
}
},
data() {
return {
queryForm: {},
queryForm: {}
}
},
mounted() {
// this.getQueryForm()
this.queryForm = this.standardContentQuery
},
methods: {
getQueryForm() {
getAction(this.url.urlFrom, { id: this.projectInformationId }).then((res) => {
if (res.success) {
this.queryForm = res.result[0] || {}
} else {
this.queryForm = {}
}
})
}
}
methods: {}
}
</script>
@@ -74,6 +74,12 @@
export default {
name: 'standardContentList',
props: {
standardContentListQuery: {
type: Object,
default: {}
}
},
data() {
return {
dataSource: [],
@@ -159,7 +165,7 @@
],
loading: false,
dataSourceFile: [],
visibleFile:false,
visibleFile: false,
columnsFile: [
{
title: this.$t('deliverableTemplate'),
@@ -178,6 +184,8 @@
}
},
mounted() {
this.dataSource = []
this.dataSource.push(this.standardContentListQuery)
},
methods: {
pdfPreview(fileQuery) {
@@ -7,21 +7,35 @@
@terminationProcess="terminationProcess"
@submit="submit"
/>
<div class="detail-box">
<div class="detail-content" style="height: 100%">
<projectInformation
:projectInformationList="projectInformationList"
:url="url"
:projectInformationId="'1517332232949133313'"
/>
<standardContent
:standardContentList="standardContentList"
:url="url"
/>
<standardContentList :url="url"/>
<examineInformation :url="url"/>
<circulationHistory :url="url"/>
<a-spin tip="加载中..." :spinning="loading">
<div class="detail-box" v-if="!loading">
<div class="detail-content" style="height: 100%">
<projectInformation
:projectInformationList="projectInformationList"
:url="url"
:projectInformationId="this.queryBy.projectLibraryId"
/>
<standardContent
:standardContentList="standardContentList"
:url="url"
:standardContentQuery="queryProject"
/>
<standardContentListTable
:standardContentListQuery="queryProject"
:url="url
"/>
<examineInformation
isFlag
isViewUploadedFiles
isApprovalOpinion
ref="examineInformationRef"
:url="url"/>
<circulationHistory :url="url"/>
</div>
</div>
</a-spin>
<div>
</div>
</div>
</template>
@@ -30,9 +44,11 @@
import headerProcess from '../../components/headerProcess'
import projectInformation from '../../components/projectInformation'
import standardContent from '../../components/standardContent'
import standardContentList from '../../components/standardContentList'
import standardContentListTable from '../../components/standardContentList'
import examineInformation from '../../components/examineInformation'
import circulationHistory from '../../components/circulationHistory'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'handshakeProcess',
@@ -40,7 +56,7 @@
headerProcess,
projectInformation,
standardContent,
standardContentList,
standardContentListTable,
examineInformation,
circulationHistory
},
@@ -133,16 +149,64 @@
}
],
url: {
urlFrom: 'project/projectLibraryBase/queryById'
}
urlFrom: 'project/projectLibraryBase/queryById',
queryProjectLawsInventoryInfoById: 'project/projectLawsInventoryEO/queryProjectLawsInventoryInfoById'
},
queryBy: {},
queryProject: {},
loading: false
}
},
mounted() {
if (this.$route.query.mes) {
this.queryBy = eval('(' + JSON.parse(this.$route.query.mes) + ')')
}
this.queryProjectLawsInventoryInfo()
},
methods: {
...mapGetters(['userInfo']),
terminationProcess() {
},
submit() {
this.$refs.examineInformationRef.submit(function(res) {
this.completeTask(res)
})
},
completeTask(value) {
let json = Object.assign({}, value, this.queryBy)
let data = JSON.stringify(json).replace(/\"/g, '\'')
let query = {
userid: this.userInfo().id,
taskId: this.$route.query.taskId || this.$route.query.taskIds,
json: data
}
postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({
path: '/ProcessCenter'
})
} else {
this.$message.warning(this.$t('operationFailed'))
}
})
},
queryProjectLawsInventoryInfo() {
this.loading = true
let query = {
id: this.queryBy.id,
operatorType: 'taskAffirmQuery'
}
getAction(this.url.queryProjectLawsInventoryInfoById, query).then((res) => {
if (res.success) {
this.queryProject = res.result.projectLawsInventory || {}
this.loading = false
} else {
this.queryProject = {}
this.loading = false
}
})
}
}
}
@@ -143,12 +143,9 @@
},
// 打开查看
classAdd(row) {
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
path: '/ProcessDetail',
query: {
prcNum: row.prcNum
}
path: '/handshakeProcess',
query: row
})
}
},
@@ -850,7 +850,9 @@
this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.$route
this.$router.push({
path: '/ProcessCenter'
})
} else {
this.$message.warning(this.$t('operationFailed'))
}