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

This commit is contained in:
高嵩
2023-03-31 18:45:57 +08:00
7 changed files with 217 additions and 10 deletions
@@ -449,3 +449,7 @@ ALTER TABLE `project_version_info`
ADD COLUMN `project_laws_inventory_id` varchar(255) NULL COMMENT '法规清单数据id' AFTER `verify_flow_status`; ADD COLUMN `project_laws_inventory_id` varchar(255) NULL COMMENT '法规清单数据id' AFTER `verify_flow_status`;
ALTER TABLE `project_version_info` ALTER TABLE `project_version_info`
ADD COLUMN `applicable_supplement` varchar(255) NULL COMMENT '适用增补件' AFTER `project_laws_inventory_id`; ADD COLUMN `applicable_supplement` varchar(255) NULL COMMENT '适用增补件' AFTER `project_laws_inventory_id`;
-- 虚拟认证清单-增加字段 2023-3-30 未同步生产环境
ALTER TABLE `auth_dummy_inventory_info`
ADD COLUMN `deliverable_template` varchar(500) NULL COMMENT '交付物模板' AFTER `auth_dummy_inventory_base_id`;
@@ -134,4 +134,12 @@ public class AuthDummyInventoryInfoEO implements Serializable {
/**值类型,对应SysCategoryValueTypeEnum中value**/ /**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false) @TableField(exist = false)
private String valueType; private String valueType;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 20)
private String deliverableTemplateName;
} }
@@ -27,6 +27,7 @@ import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum; import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
import com.jero.modules.dummy.service.impl.DummyLogEOServiceImpl; import com.jero.modules.dummy.service.impl.DummyLogEOServiceImpl;
import com.jero.modules.dummy.util.DeepCopyListUtil; import com.jero.modules.dummy.util.DeepCopyListUtil;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO; import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.enums.ProjectInventoryFieldEnum; import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
@@ -1302,6 +1303,8 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
if(CollectionUtils.isNotEmpty(datas)){ if(CollectionUtils.isNotEmpty(datas)){
List<SysCategory> categoryList = this.sysCategoryService.list(); List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll(); List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
String deliverableTemplates = datas.stream().map(AuthDummyInventoryInfoEO::getDeliverableTemplate).distinct().collect(Collectors.joining(","));
List<OSSFile> deliverableTemplateFileList = iOSSFileService.getFileInfos(deliverableTemplates);
for (AuthDummyInventoryInfoEO data : datas) { for (AuthDummyInventoryInfoEO data : datas) {
if(StringUtils.isNotEmpty(data.getDeliverableType())){ if(StringUtils.isNotEmpty(data.getDeliverableType())){
@@ -1312,6 +1315,20 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue()); String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritoryName(dutyTerritoryName); data.setDutyTerritoryName(dutyTerritoryName);
} }
if(StringUtils.isNotBlank(data.getDeliverableTemplate())){
String[] deliverableTemplateArr = data.getDeliverableTemplate().split(",");
String deliverableTemplateName = deliverableTemplateFileList.stream().filter(file -> {
boolean flag = false;
for (String deliverableTemplate : deliverableTemplateArr) {
if (StringUtils.equals(file.getId(),deliverableTemplate)) {
flag = true;
break;
}
}
return flag;
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
data.setDeliverableTemplateName(deliverableTemplateName);
}
} }
} }
@@ -1311,6 +1311,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList()); List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
List<SysUser> dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList); List<SysUser> dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList);
try { try {
// 给责任人分配待办中心的任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRTJRW.getKey());
// 更新数据状态为 审查退回 // 更新数据状态为 审查退回
this.updateBatchById(projectCertificationInventoryEOList); this.updateBatchById(projectCertificationInventoryEOList);
@@ -1494,7 +1505,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey());
detailUpdateWrap.eq(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList); detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
@@ -1580,7 +1591,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.eq(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList); detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
@@ -1686,11 +1697,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String itemName = (String) standNameAndItemName.get("itemName"); String itemName = (String) standNameAndItemName.get("itemName");
try { try {
List<String> certificationIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getId).distinct().collect(Collectors.toList());
// 将当前责任人的待办任务转为已办 // 将当前责任人的待办任务转为已办
LambdaUpdateWrapper<ProcessInfoDetailEO> detailUpdateWrap = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<ProcessInfoDetailEO> detailUpdateWrap = new LambdaUpdateWrapper<>();
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId()); detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey()); detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue()); detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap); this.processInfoDetailEOService.update(detailUpdateWrap);
@@ -145,6 +145,25 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate',index,true)">
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
||
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
</div> </div>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
@@ -154,12 +173,14 @@
</div> </div>
</a-drawer> </a-drawer>
<codeNumber ref="codeNumber" @regulation="regulation" /> <codeNumber ref="codeNumber" @regulation="regulation" />
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div> </div>
</template> </template>
<script> <script>
import codeNumber from './codeNumber' import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -167,7 +188,8 @@ export default {
name:"addModel", name:"addModel",
props: ['url'], props: ['url'],
components:{ components:{
codeNumber codeNumber,
uploadFile
}, },
data() { data() {
return { return {
@@ -299,7 +321,45 @@ export default {
this.formInline = {... this.formInline} this.formInline = {... this.formInline}
this.$refs.ruleForm.validateField(['serialNumber']) this.$refs.ruleForm.validateField(['serialNumber'])
}) })
} },
//交付物模板上传
clickButtonToUpload(item, index,isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue){
ids = this.formInline.dataList[index][item]
}else{
ids = this.formInline[item]
}
console.log(this.formInline,1111)
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
this.formInline = { ...this.formInline }
},
} }
} }
</script> </script>
@@ -366,4 +426,13 @@ export default {
font-size: 16px; font-size: 16px;
margin-right: 4px; margin-right: 4px;
} }
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
</style> </style>
@@ -127,6 +127,25 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="deliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('deliverableTemplate')">
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === ''
||
formInline.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
@@ -135,18 +154,21 @@
</div> </div>
</a-drawer> </a-drawer>
<codeNumber ref="codeNumber" @regulation="regulation" /> <codeNumber ref="codeNumber" @regulation="regulation" />
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div> </div>
</template> </template>
<script> <script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import codeNumber from './codeNumber' import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
export default { export default {
name:'editModel', name:'editModel',
props: ['url'], props: ['url'],
components:{ components:{
codeNumber codeNumber,
uploadFile
}, },
data() { data() {
return { return {
@@ -276,7 +298,44 @@ export default {
this.formInline = {... this.formInline} this.formInline = {... this.formInline}
this.$refs.ruleForm.validateField(['serialNumber']) this.$refs.ruleForm.validateField(['serialNumber'])
}) })
} },
//交付物模板
clickButtonToUpload(item, index,isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue){
ids = this.formInline.dataList[index][item]
}else{
ids = this.formInline[item]
}
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
this.formInline = { ...this.formInline }
},
} }
} }
</script> </script>
@@ -333,4 +392,13 @@ export default {
background: #fff; background: #fff;
border-radius: 0 0 2px 2px; border-radius: 0 0 2px 2px;
} }
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
</style> </style>
@@ -206,9 +206,17 @@
@change="tableOnChange" @change="tableOnChange"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"> :columns="columns">
<span slot="item" slot-scope="text,record"> <span slot="deliverableTemplate" slot-scope="text,result">
<a @click="itemClick(record)">{{text}}</a> <span class="viewFile"
@click="viewFileClick(result.deliverableTemplate)"
v-if="result.deliverableTemplate">
{{$t('viewFile')}}
</span>
<span v-else>--</span>
</span> </span>
<!-- <span slot="item" slot-scope="text,record">-->
<!-- <a @click="itemClick(record)">{{text}}</a>-->
<!-- </span>-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a v-if="isTrue" <a v-if="isTrue"
class="text-operation" class="text-operation"
@@ -236,6 +244,7 @@
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/> <addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model> <edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
<bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting> <bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting>
<viewFileModel ref="viewFileModelRef"/>
</div> </div>
</template> </template>
@@ -250,6 +259,7 @@
import addModel from '../components/addModel' import addModel from '../components/addModel'
import editModel from '../components/editModel' import editModel from '../components/editModel'
import batSetting from '../components/batSetting' import batSetting from '../components/batSetting'
import viewFileModel from '@/components/viewFileModel/index'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header' import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default { export default {
@@ -261,7 +271,8 @@
transferList, transferList,
addModel, addModel,
editModel, editModel,
batSetting batSetting,
viewFileModel
}, },
mixins: [ResizeHeader, ResizeColumnProvide], mixins: [ResizeHeader, ResizeColumnProvide],
data() { data() {
@@ -340,6 +351,14 @@
width: 330, width: 330,
ellipsis: true ellipsis: true
}, },
{
title: this.$t('deliverableTemplate'),
align: 'left',
dataIndex: 'deliverableTemplate',
width: 330,
ellipsis: true,
scopedSlots: { customRender: 'deliverableTemplate' }
},
{ {
title: this.$t('operation'), title: this.$t('operation'),
align: 'left', align: 'left',
@@ -536,6 +555,10 @@
}) })
} }
}) })
},
// 交付物模板
viewFileClick(item) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
} }
} }
} }
@@ -668,4 +691,9 @@
::v-deep .ant-table-placeholder { ::v-deep .ant-table-placeholder {
margin-top: 8px !important; margin-top: 8px !important;
} }
.viewFile {
color: #00B3BE;
cursor: pointer;
}
</style> </style>