Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java
This commit is contained in:
wangzhijiang
2022-06-06 15:07:28 +08:00
9 changed files with 199 additions and 111 deletions
@@ -836,8 +836,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(state)) { || CollectManifestStateEnum.DRE_BACK.getValue().equals(state)) {
updateEO.setState(String.valueOf(state - 1)); // 设置对应状态 updateEO.setState(String.valueOf(state - 1)); // 设置对应状态
} else if (CollectManifestStateEnum.WAIT_SDT.getValue().equals(state) } else if (CollectManifestStateEnum.WAIT_FILL.getValue().equals(state)
|| CollectManifestStateEnum.WAIT_SDT.getValue().equals(state)) { || CollectManifestStateEnum.SUBMIT.getValue().equals(state)) {
updateEO.setState(String.valueOf(state - 2)); // 设置对应状态 updateEO.setState(String.valueOf(state - 2)); // 设置对应状态
} }
@@ -13,6 +13,7 @@ import com.jero.common.exception.JeroBootException;
import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.query.QueryGenerator;
import com.jero.modules.enums.DictCodeEnum; import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.enums.FixedFieldEnum; import com.jero.modules.enums.FixedFieldEnum;
import com.jero.modules.enums.IsTagDict;
import com.jero.modules.system.entity.SysDict; import com.jero.modules.system.entity.SysDict;
import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.mapper.SysDictItemMapper; import com.jero.modules.system.mapper.SysDictItemMapper;
@@ -104,7 +105,9 @@ public class SysDictItemController {
sysDictItem.setItemText(sysDictItem.getItemText().replace(" ","")); sysDictItem.setItemText(sysDictItem.getItemText().replace(" ",""));
sysDictItem.setCreateTime(new Date()); sysDictItem.setCreateTime(new Date());
sysDictItem.setDelFlag(CommonConstant.DEL_FLAG_0); sysDictItem.setDelFlag(CommonConstant.DEL_FLAG_0);
sysDictItem.setItemValue(UUID.randomUUID().toString().replace("-", "")); if (sysDictItem.getIsTagDict() == IsTagDict.TAG_DICT.getValue()) {
sysDictItem.setItemValue(UUID.randomUUID().toString().replace("-", ""));
}
// sysDictItem.setItemValue(String.valueOf(RandomUtils.nextLong())); // sysDictItem.setItemValue(String.valueOf(RandomUtils.nextLong()));
sysDictItem.setStatus(1); sysDictItem.setStatus(1);
sysDictItemService.save(sysDictItem); sysDictItemService.save(sysDictItem);
@@ -1084,22 +1084,32 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
//拼接维护清单的消息 //拼接维护清单的消息
contentInfo = setContentInfo(contentInfo, baseDiff, infoDiffList, addSerialNumber, deleteSerialNumber,null); contentInfo = setContentInfo(contentInfo, baseDiff, infoDiffList, addSerialNumber, deleteSerialNumber,null);
contentInfoTemp = setContentInfo(contentInfoTemp, baseDiff, infoDiffList, addSerialNumber, deleteSerialNumber,null); contentInfoTemp = setContentInfo(contentInfoTemp, baseDiff, infoDiffList, addSerialNumber, deleteSerialNumber,null);
//封装消息的实体类
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo);
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
//飞书
try {
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href);
} catch (IOException e) {
log.error("飞书消息推送失败");
}
}else{//撤回的消息 }else{//撤回的消息
content = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note."; content = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note.";
contentInfo = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note."; contentInfo = "The " + baseName + " virtual list you subscribed to has been withdrawn,please note.";
contentInfoTemp = contentInfo;
} //封装消息的实体类
//封装消息的实体类 SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo);
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, content, contentInfo); sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sysAnnouncementService.saveAnnouncement(sysAnnouncement); bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo); //飞书
//飞书 try {
try { iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfo, MessageTypeEnum.PUSH.getName(), null);
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentInfoTemp, MessageTypeEnum.PUSH.getName(), href); } catch (IOException e) {
} catch (IOException e) { log.error("飞书消息推送失败");
log.error("飞书消息推送失败"); }
} }
} }
} }
} }
@@ -7,6 +7,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException; import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.LoginUser; import com.jero.common.system.vo.LoginUser;
import com.jero.modules.project.entity.ConditionAssessmentEO;
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
import com.jero.modules.project.entity.ProjectLibraryBase;
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
import com.jero.modules.project.entity.*; import com.jero.modules.project.entity.*;
import com.jero.modules.project.enums.*; import com.jero.modules.project.enums.*;
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper; import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
@@ -81,6 +85,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
@Autowired @Autowired
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService; private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
@Autowired
private ProjectLawsInventoryEOServiceImpl projectLawsInventoryEOService;
/** /**
* 保存 * 保存
* *
@@ -9,11 +9,9 @@
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template slot="title"> <template slot="title">
<span <span
v-html="titleHeader"></span> v-html="serial_number"></span>
</template> </template>
<span v-html="$route.query.serial_number"></span> <span v-html="serial_number"></span>
<span v-html="this.$route.query.title == undefined || this.$route.query.title == null
|| !this.$route.query.title ?'《'+ ''+'》':'《'+ this.$route.query.title+'》'"></span>
<span> {{$t('StandardDetails')}}</span> <span> {{$t('StandardDetails')}}</span>
</a-tooltip> </a-tooltip>
@@ -258,6 +256,7 @@
</span> </span>
</a-table> </a-table>
</a-modal> </a-modal>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
<uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile> <uploadFile ref="uploadFile" :isUploadFile="true" :disabled="true"></uploadFile>
</div> </div>
</template> </template>
@@ -275,10 +274,12 @@
return { return {
url: { url: {
getInfo: 'document/bussDocumentLibraryEO/getInfoById', getInfo: 'document/bussDocumentLibraryEO/getInfoById',
list: 'log/bussLogEO/page' list: 'log/bussLogEO/page',
getTitle: '/document/bussDocumentLibraryEO/getTitle'
}, },
titleHeader: '', titleHeader: '',
visibleFile: false, visibleFile: false,
loading: false,
columnsRelated: [ columnsRelated: [
{ {
title: this.$t('standardName'), title: this.$t('standardName'),
@@ -306,6 +307,7 @@
dataSourceRelated: [], dataSourceRelated: [],
detailList: [], detailList: [],
visible: false, visible: false,
serial_number: '',
confirmLoading: false, confirmLoading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
loading: false, loading: false,
@@ -341,24 +343,30 @@
} }
}, },
created() { created() {
this.getInfoById() let _this = this
if (this.$route.query.serial_number && this.$route.query.title) { this.loading = true
this.titleHeader = this.$route.query.serial_number + ' 《' + this.$route.query.title + ' 》' + this.$t('StandardDetails') this.getTitle(function() {
} else if (!this.$route.query.serial_number && this.$route.query.title) { _this.getInfoById()
this.titleHeader = '《' + this.$route.query.title + '》' + this.$t('StandardDetails') })
} else if (this.$route.query.serial_number && !this.$route.query.title) {
this.titleHeader = this.$route.query.serial_number + ' 《' + ' 》' + this.$t('StandardDetails')
} else {
this.titleHeader = ' 《' + ' 》' + this.$t('StandardDetails')
}
}, },
methods: { methods: {
getTitle(callback) {
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getTitle, { id: _id }).then((res) => {
if (res.success) {
this.serial_number = res.result
callback && callback()
} else {
this.serial_number = ''
}
})
},
getInfoById() { getInfoById() {
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
console.log(_id)
getAction(this.url.getInfo, { id: _id }).then((res) => { getAction(this.url.getInfo, { id: _id }).then((res) => {
if (res.success) { if (res.success) {
this.detailList = res.result this.detailList = res.result
this.loading = false
} else { } else {
this.detailList = [] this.detailList = []
} }
@@ -802,6 +802,9 @@ export default {
if(itemIn !== 'sdt') { if(itemIn !== 'sdt') {
if(item[itemIn] instanceof Object) { if(item[itemIn] instanceof Object) {
postDateobj[itemIn] = item[itemIn] postDateobj[itemIn] = item[itemIn]
if(item[itemIn].list[0].dataValue instanceof Array) {
item[itemIn].list[0].dataValue = item[itemIn].list[0].dataValue.join(',')
}
} }
} }
}) })
+9 -2
View File
@@ -53,7 +53,7 @@
ref="table" ref="table"
rowKey="id" rowKey="id"
size="middle" size="middle"
:scroll="{x: 900}" :scroll="{x: '100%'}"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
@@ -94,22 +94,29 @@
{ {
title: this.$t('name'), title: this.$t('name'),
align: "center", align: "center",
width:100,
ellipsis: true,
dataIndex: 'itemText', dataIndex: 'itemText',
}, },
{ {
title: this.$t('enName'), title: this.$t('enName'),
align: "center", align: "center",
width:100,
ellipsis: true,
dataIndex: 'enName', dataIndex: 'enName',
}, },
{ {
title: this.$t('DataValue'), title: this.$t('DataValue'),
align: "center", align: "center",
width:100,
ellipsis: true,
dataIndex: 'itemValue', dataIndex: 'itemValue',
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
dataIndex: 'action', dataIndex: 'action',
align: "center", align: "center",
width:80,
scopedSlots: {customRender: 'action'}, scopedSlots: {customRender: 'action'},
} }
], ],
@@ -122,7 +129,7 @@
}, },
title: this.$t('operation'), title: this.$t('operation'),
visible: false, visible: false,
screenWidth: 800, screenWidth: 900,
model: {}, model: {},
dictId: "", dictId: "",
status: 1, status: 1,
+10 -3
View File
@@ -129,10 +129,17 @@
align: 'center', align: 'center',
dataIndex: 'dictName', dataIndex: 'dictName',
width: '25%', width: '25%',
ellipsis: true, ellipsis: true
}, },
// { // {
// title: this.$t('DictionaryEnName'), // title: this.$t('DictionaryEnName'),
// align: 'center',
// dataIndex: 'dictEnName',
// width: '180',
// ellipsis: true
// },
// {
// title: this.$t('DictionaryEnName'),
// align: "left", // align: "left",
// width: 180, // width: 180,
// dataIndex: 'dictEnName', // dataIndex: 'dictEnName',
@@ -142,14 +149,14 @@
align: 'center', align: 'center',
dataIndex: 'dictCode', dataIndex: 'dictCode',
width: '25%', width: '25%',
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('describe'), title: this.$t('describe'),
align: 'center', align: 'center',
dataIndex: 'description', dataIndex: 'description',
width: '25%', width: '25%',
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -14,39 +14,44 @@
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="名称"> :label="$t('name')">
<a-input placeholder="请输入名称" v-decorator.trim="['itemText', validatorRules.itemText]"/> <a-input :placeholder="$t('PleaseEnter')+$t('name')" v-decorator.trim="['itemText', validatorRules.itemText]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('enName')">
<a-input :placeholder="$t('PleaseEnter')+$t('enName')" v-decorator.trim="['enName', validatorRules.enName]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('DataValue')">
<a-input :placeholder="$t('PleaseEnter')+$t('DataValue')" v-decorator.trim="['itemValue', validatorRules.itemValue]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="数据值"> :label="$t('describe')">
<a-input placeholder="请输入数据值" v-decorator.trim="['itemValue', validatorRules.itemValue]"/> <a-input :placeholder="$t('PleaseEnter')+$t('describe')" v-decorator.trim="['description', validatorRules.description]"/>
</a-form-item> </a-form-item>
<a-form-item <a-form-item
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="描述"> :label="$t('sort')">
<a-input v-decorator="['description']"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序值">
<a-input-number :min="1" v-decorator="['sortOrder',{'initialValue':1}]"/> <a-input-number :min="1" v-decorator="['sortOrder',{'initialValue':1}]"/>
值越小越靠前,支持小数 值越小越靠前,支持小数
</a-form-item> </a-form-item>
<a-form-item <!-- <a-form-item-->
:labelCol="labelCol" <!-- :labelCol="labelCol"-->
:wrapperCol="wrapperCol" <!-- :wrapperCol="wrapperCol"-->
label="是否启用" <!-- label="是否启用"-->
hasFeedback> <!-- hasFeedback>-->
<a-switch checkedChildren="启用" unCheckedChildren="禁用" @change="onChose" v-model="visibleCheck"/> <!-- <a-switch checkedChildren="启用" unCheckedChildren="禁用" @change="onChose" v-model="visibleCheck"/>-->
</a-form-item> <!-- </a-form-item>-->
</a-form> </a-form>
</a-spin> </a-spin>
@@ -55,130 +60,168 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {addDictItem, editDictItem} from '@/api/api' import { addDictItem, editDictItem } from '@/api/api'
import { getAction } from '@api/manage' import { getAction } from '@api/manage'
export default { export default {
name: "DictItemModal", name: 'DictItemModal',
data() { data() {
return { return {
title: "操作", title: '操作',
visible: false, visible: false,
visibleCheck: true, visibleCheck: true,
model: {}, model: {},
dictId: "", dictId: '',
status: 1, status: 1,
labelCol: { labelCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 5}, sm: { span: 5 }
}, },
wrapperCol: { wrapperCol: {
xs: {span: 24}, xs: { span: 24 },
sm: {span: 16}, sm: { span: 16 }
}, },
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
validatorRules: { validatorRules: {
itemText: {rules: [{required: true, message: '请输入名称!'}]}, itemText: {
itemValue: {rules: [{required: true, message: '请输入数据值!'},{validator: this.validateItemValue}]}, rules: [
}, { required: true, message: this.$t('name') + this.$t('cannotEmpty') },
{
max: 100,
message: this.$t('name') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
]
},
itemValue: {
rules: [
{ required: true, message: this.$t('DataValue') + this.$t('cannotEmpty') },
{
max: 100,
message: this.$t('DataValue') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
},
{ validator: this.validateItemValue }
]
},
enName: {
rules: [
{ required: true, message: this.$t('enName') + this.$t('cannotEmpty') },
{
max: 100,
message: this.$t('enName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
]
},
description: {
rules: [
{
max: 300,
message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
}
}
} }
}, },
created() { created() {
}, },
methods: { methods: {
add(dictId) { add(dictId) {
this.dictId = dictId; this.dictId = dictId
this.edit({}); this.edit({})
}, },
edit(record) { edit(record) {
if (record.id) { if (record.id) {
this.dictId = record.dictId; this.dictId = record.dictId
this.status = record.status; this.status = record.status
this.visibleCheck = (record.status == 1) ? true : false; this.visibleCheck = (record.status == 1) ? true : false
} }
this.form.resetFields(); this.form.resetFields()
this.model = Object.assign({}, record); this.model = Object.assign({}, record)
this.model.dictId = this.dictId; this.model.dictId = this.dictId
this.model.status = this.status; this.model.status = this.status
this.visible = true; this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'itemText', 'itemValue', 'description', 'sortOrder')) this.form.setFieldsValue(pick(this.model, 'itemText', 'itemValue', 'description', 'sortOrder'))
}); })
}, },
onChose(checked) { onChose(checked) {
if (checked) { if (checked) {
this.status = 1; this.status = 1
this.visibleCheck = true; this.visibleCheck = true
} else { } else {
this.status = 0; this.status = 0
this.visibleCheck = false; this.visibleCheck = false
} }
}, },
// 确定 // 确定
handleOk() { handleOk() {
const that = this; const that = this
// 触发表单验证 // 触发表单验证
this.form.validateFields((err, values) => { this.form.validateFields((err, values) => {
if (!err) { if (!err) {
that.confirmLoading = true; that.confirmLoading = true
values.itemText = (values.itemText || '').trim() values.itemText = (values.itemText || '').trim()
values.itemValue = (values.itemValue || '').trim() values.itemValue = (values.itemValue || '').trim()
values.description = (values.description || '').trim() values.description = (values.description || '').trim()
let formData = Object.assign(this.model, values); let formData = Object.assign(this.model, values)
formData.status = this.status; formData.status = this.status
let obj; let obj
if (!this.model.id) { if (!this.model.id) {
obj = addDictItem(formData); obj = addDictItem(formData)
} else { } else {
obj = editDictItem(formData); obj = editDictItem(formData)
} }
obj.then((res) => { obj.then((res) => {
if (res.success) { if (res.success) {
that.$message.success(res.message); that.$message.success(res.message)
that.$emit('ok'); that.$emit('ok')
} else { } else {
that.$message.warning(res.message); that.$message.warning(res.message)
} }
}).finally(() => { }).finally(() => {
that.confirmLoading = false; that.confirmLoading = false
that.close(); that.close()
}) })
} }
}) })
}, },
// 关闭 // 关闭
handleCancel() { handleCancel() {
this.close(); this.close()
}, },
close() { close() {
this.$emit('close'); this.$emit('close')
this.visible = false; this.visible = false
}, },
validateItemValue(rule, value, callback){ validateItemValue(rule, value, callback) {
let param = { let param = {
itemValue:value, itemValue: value,
dictId:this.dictId, dictId: this.dictId
} }
if(this.model.id){ if (this.model.id) {
param.id = this.model.id param.id = this.model.id
} }
if(value){ if (value) {
let reg=new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]") let reg = new RegExp('[`_~!@#$^&*()=|{}\'.<>《》/?!¥()—【】‘;:”“。,、?]')
if(reg.test(value)){ if (reg.test(value)) {
callback("数据值不能包含特殊字符!") callback('数据值不能包含特殊字符!')
}else{ } else {
//update--begin--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复 //update--begin--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
getAction("/sys/dictItem/dictItemCheck",param).then((res)=>{ getAction('/sys/dictItem/dictItemCheck', param).then((res) => {
if(res.success){ if (res.success) {
callback() callback()
}else{ } else {
callback(res.message); callback(res.message)
} }
}); })
//update--end--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复 //update--end--autor:lvdandan-----date:20201203------for:JT-27【数据字典】字典 - 数据值可重复
} }
}else{ } else {
callback() callback()
} }
} }