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