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

This commit is contained in:
wangzhijiang
2022-07-12 09:38:23 +08:00
13 changed files with 83 additions and 44 deletions
@@ -1571,13 +1571,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
String serialNumber = StringUtils.valueOf(map.get("serial_number"));
//String serialNumber = StringUtils.valueOf(map.get("serial_number"));
//编码验重
List<BussDocumentLibraryEO> list = this.list();
if(list.size() != 0){
List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
if(serialNumberList.contains(serialNumber)){
throw new JeroBootException("编号已存在不能重复添加");
}
}
// List<BussDocumentLibraryEO> list = this.list();
// if(list.size() != 0){
// List<String> serialNumberList = list.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
// if(serialNumberList.contains(serialNumber)){
// throw new JeroBootException("编号已存在不能重复添加");
// }
// }
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String issueTime = (String) (map.get("issue_time"));
@@ -3144,7 +3144,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
//您订阅的XXX已被修改
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
String msgTitle = "The" + technologyTerritoryNameEn + "technical field you subscribed to has been updated";
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
// 封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList, msgTitle, contentInfoFei, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -3166,7 +3166,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//您订阅的XXX已被修改
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
String msgTitle = serialNumber + "you subsribed to has been updated";
String msgTitle = serialNumber + " you subsribed to has been updated";
//封装消息的实体类
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
@@ -4766,9 +4766,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
}
});
String contentTemp = sysUser.getUsername() + " pushed " + StringUtils.join(list, ",") + " to you. Please be reminded to check it out.";
FeishuMsgVo feishuMsgVo = getFeishuMsgVo(MessageTypeEnum.PUSH.getName(),MessageTypeEnum.PUSH.getName(), contentTemp, encode);
iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
// FeishuMsgVo feishuMsgVo = getFeishuMsgVo(MessageTypeEnum.PUSH.getName(),null, contentTemp, encode);
// iFeishuService.sendCardMsg(thirdIdList.toArray(new String[]{}), feishuMsgVo);
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentTemp, MessageTypeEnum.PUSH.getName(), encode);
}
} catch (IOException e) {
log.error("飞书推送失败");
@@ -5453,6 +5453,27 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
FileUnZip.deleteDir(saveDirectory);
throw new JeroBootException(html);
} else {
//验证重复的标准号
List<String> serialNumberList = new ArrayList<>();
if (mapList.size() != 0) {
for (Map<String, Object> map : mapList) {
serialNumberList.add(StringUtils.valueOf(map.get("serial_number")));
}
}
List<BussDocumentLibraryEO> list = this.list();
if(list.size() != 0){
List<BussDocumentLibraryEO> serialNumberListTemp = list.stream()
.filter(e -> serialNumberList.contains(e.getSerialNumber())).collect(Collectors.toList());
if(serialNumberListTemp.size() != 0){
List<String> collect = serialNumberListTemp.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList());
if(CutEnum.CN.getValue().equals(cut)){
throw new JeroBootException(StringUtils.join(collect,",")+" 编号已存在不能重复添加");
}else{
throw new JeroBootException(StringUtils.join(collect,",")+" already exists and cannot be added again");
}
}
}
if (mapList.size() != 0) {
for (Map<String, Object> map : mapList) {
this.addInfo(map);
@@ -265,7 +265,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
lawName.append(lawEngineerName).append(",");
}
projectRelatedPersonnel.setLawEngineerName(lawName.substring(0,lawName.toString().length()-3));
projectRelatedPersonnel.setLawEngineerName(lawName.substring(0,lawName.toString().length()-1));
}
}
@@ -291,7 +291,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
engineeringName.append(engineeringInterfacePersonName).append(",");
}
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringName.substring(0,engineeringName.toString().length()-3));
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringName.substring(0,engineeringName.toString().length()-1));
}
}
@@ -316,7 +316,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
}
certificationName.append(certificationEngineerName).append(",");
}
projectRelatedPersonnel.setCertificationEngineerName(certificationName.substring(0,certificationName.toString().length()-3));
projectRelatedPersonnel.setCertificationEngineerName(certificationName.substring(0,certificationName.toString().length()-1));
}
}
+1 -1
View File
@@ -32,7 +32,7 @@
return{
visible:false,
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static',
downLoadFileUrl:window._CONFIG['domianPreviewURL']+'/sys/common/static',
myfileList:[],
fileList:[],
fileTypeSatus:false,
@@ -50,7 +50,7 @@
visible:false,
// uploadAction:"http://10.0.1.25:8080/split/sarFileSplitItems/importSplitItems",
uploadAction:window._CONFIG['domianURL']+"/split/sarFileSplitItems/importSplitItems",
downLoadFileUrl:window._CONFIG['domianURL']+'/sys/common/static',
downLoadFileUrl:window._CONFIG['domianPreviewURL']+'/sys/common/static',
myfileList:[],
fileList:[],
fileTypeSatus:false,
@@ -37,7 +37,7 @@
visible: false,
uploadAction: window._CONFIG['domianURL'] + '/split/sarFileSplitItems/upload',
upDataList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static',
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/static',
fileList: [],
myfileList: [],
isLoding: false,
@@ -34,7 +34,7 @@
return {
visible: false,
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static',
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/static',
myfileList: [],
fileList: [],
fileTypeSatus: false,
@@ -106,7 +106,7 @@ export default {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
let url = window._CONFIG['domianPreviewURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
@@ -188,17 +188,17 @@ export default {
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
// if (fileSuffix === '.pdf') {
// window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id+'&userName='+this.userInfo().username))
// } else if (fileSuffix === '.docx') {
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
// window.open(url, '_blank')
// } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
// window.open(url, '_blank')
// } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
// }
}
}
}
@@ -129,7 +129,7 @@ import { mapGetters } from 'vuex'
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
let url = window._CONFIG['domianPreviewURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
@@ -211,17 +211,17 @@ import { mapGetters } from 'vuex'
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
// if (fileSuffix === '.pdf') {
// window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
// } else if (fileSuffix === '.docx') {
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
// window.open(url, '_blank')
// } else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
// let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
// window.open(url, '_blank')
// } else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
// }
}
}
}
@@ -2,6 +2,7 @@
<a-modal
:title="$t('viewFile')"
:width="600"
style="z-index: 1007"
:visible="visibleFile"
:maskClosable="false"
@cancel="visibleFile = false"
@@ -107,6 +107,7 @@
conList: [],
total: 0,
pageSize: 10,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1,
queryParam: {}
}
@@ -162,6 +162,12 @@
{{text}}
</span>
</span>
<span slot="standard" slot-scope="text,record" :title="text">
<a class="textName" @click="standardClick(record)">
{{text}}
</a>
</span>
<span slot="designDeliverableTemplateName" slot-scope="text,record">
<span>{{record.designDeliverableTypeName}}</span><br v-if="record.designDeliverableTypeName">
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
@@ -306,7 +312,7 @@
dataIndex: 'serialNumber',
width: 180,
fixed: 'left',
scopedSlots: { customRender: 'titleName' }
scopedSlots: { customRender: 'standard' }
},
{
title: this.$t('title'),
@@ -840,6 +846,15 @@
this.loading = false
}
})
},
standardClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.bussDocumentLibraryId
}
})
window.open(newUrl.href, '_blank')
}
}
}
@@ -84,7 +84,8 @@
{},
{
title: this.$t('standard'),
value: 'serialNumber'
value: 'serialNumber',
type: '4'
},
{
title: this.$t('title'),
@@ -1503,7 +1503,7 @@
}
}
for (let i = 0; i < dataList.length; i++) {
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList.taskAffirmStatus == 'Rejected') &&
if ((dataList[i].taskAffirmStatus == 'Not started' || dataList[i].taskAffirmStatus == 'Rejected') &&
dataList[i].inventoryAffirmStatus == 'Accepted') {
if (dataList[i].engineeringInterfacePerson) {
if (dataList[i].verifyDeliverableType) {