From 1a30ef6ca5f22563a29a44a992c40e9e286eca3c Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 23 Aug 2022 11:36:10 +0800 Subject: [PATCH 01/49] =?UTF-8?q?=E4=B8=80=E5=8D=A1=E9=80=9A=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=20=E6=8E=92=E5=BA=8F;=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E6=9F=A5=E7=9C=8B=E4=B8=80=E5=8D=A1=E9=80=9A?= =?UTF-8?q?=E6=B5=81=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/MealCardRunTabApi.cs | 1 + .../MealCardRunTab/MealCardRunTabService.cs | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs index cfb5eaa8a..cf057c78d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/MealCardRunTabApi.cs @@ -48,6 +48,7 @@ namespace Learun.Application.WebApi { ReqPageParam parameter = this.GetReqData(); var data = mealCardRunTabIBLL.GetPageList(parameter.pagination, parameter.queryJson); + data = data.OrderByDescending(x => x.centralTm); var jsonData = new { rows = data, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs index e9c8d7aa8..f4447cc5e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs @@ -164,11 +164,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["accountName"].IsEmpty()) { - var IsPhone = queryParam["IsPhone"].ToString(); - if (IsPhone == "0") + var IsPhone = ""; + if (!queryParam["IsPhone"].IsEmpty()) { - dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String); - strSql.Append(" AND t.accountName = @accountName "); + IsPhone = queryParam["IsPhone"].ToString(); + if (IsPhone == "0") + { + var accountName = queryParam["accountName"].ToString(); + if (accountName != "超级管理员") + { + dp.Add("accountName", queryParam["accountName"].ToString(), DbType.String); + strSql.Append(" AND t.accountName = @accountName "); + } + } } else { From 2ee349df232b958e6a070e0ec9a739bb2a6e96f0 Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 23 Aug 2022 15:19:13 +0800 Subject: [PATCH 02/49] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/AnnexesApiWx.cs | 3 +- .../LearunApp-2.2.0/common/customform.js | 576 ++++++++-------- .../LearunApp-2.2.0/common/custompage.js | 1 - .../LearunApp-2.2.0/common/mixins.js | 17 +- .../LearunApp-2.2.0/config.js | 4 +- .../LearunApp-2.2.0/pages/msg.vue | 2 +- .../LearunApp-2.2.0/pages/msg/chat.vue | 2 +- .../LearunApp-2.2.0/pages/my.vue | 2 +- .../LearunApp-2.2.0/pages/my/info.vue | 2 +- .../LearunApp-2.2.0/pages/my/qrcode.vue | 2 +- .../pages/nworkflow/myflow/single.vue | 5 - .../pages/nworkflow/releasetask/single.vue | 7 +- .../pages/nworkflow/workflow.js | 648 ++++++++++-------- 13 files changed, 683 insertions(+), 588 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs index 4054c0a35..8d754269b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs @@ -40,8 +40,7 @@ namespace Learun.Application.WebApi.Modules public Response WxUpload(dynamic _) { var files = (List)this.Context.Request.Files; - //var folderId = this.GetReqData(); - string folderId = Guid.NewGuid().ToString(); + string folderId = Request.Form["folderId"]; string filePath = Config.GetValue("AnnexesFile"); string uploadDate = DateTime.Now.ToString("yyyyMMdd"); string fileEextension = Path.GetExtension(files[0].Name); diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 791f44fb2..55fe2542c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -24,274 +24,310 @@ import moment from 'moment' */ export default { - methods: { - /** - * 获取一个 scheme 表单项的源数据 (加载表单时使用) - * 参数: 单个 schemeItem - * - * radio、select、checkbox、layer 这四种表单项,需要加载额外的选单数据 - * 选单数据有两种获取方式: - * 1、来自数据字典: - * 数据字典在 this.GET_GLOBAL('dataDictionary') - * 表单使用的字段在 schemeItem.itemCode - * 选单数据中的 text 字段作为显示, value 字段作为值 - * - * 2、来自数据源: - * 将 schemeItem.dataSourceId 按符号「,」逗号分割为数组,分割为: [code, displayField, valueField] - * 数据源需要请求 API 来获取,请求需要带上数据源的编号 code - * displayField、valueField 分别为展示字段和值绑定字段 - * - * 选单数据有两种格式: - * 1、对于 radio、select、checkbox 来说: - * 只需要一个数组,数组形如: [{ text: '选项文字', value: '选项值' }, ...] - * 将获取的数据绑定到组件的 range 属性上即可 - * 全局数据中默认是对象形式,使用 Object.values() 转化即可 - * - * 2、对于 layer 来说: - * 返回一个对象,形如 { source, layerData, selfField } - * source: 为弹层中列出的数据,是一个数组 - * layerData: 需要在弹层窗口中展示的字段及标题文字,形如: [{ name:'要展示的字段名', label:'标题文字' }] - * selfField: 该表单值绑定哪个字段,默认为绑定到自身的字段 - */ - async getSourceData(schemeItem) { - if (['radio', 'select', 'checkbox'].includes(schemeItem.type)) { - // radio select checkbox 三种情况 - if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { - // dataSource 为 0,使用 clientData - return Object - .values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) - .map(t => ({ value: t.value, text: t.text })) - - } else { - // dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 - const [code, displayField = schemeItem.showField, valueField = schemeItem.saveField] = schemeItem.dataSourceId - .split(',') - const sourceData = await this.FETCH_DATASOURCE(code) - if (!sourceData) { return [] } - - return sourceData.data.map(t => ({ text: t[displayField], value: t[valueField] })) - } - - } else if (['layer'].includes(schemeItem.type)) { - // layer 需要更多属性 - if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { - // dataSource 为 0,使用 clientData - // clientData 对象转数组后,隐含 key:item.text 和 value:item.value 的关系 - const [keyItem, valueItem] = schemeItem.layerData - const source = Object - .values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) - .map(t => ({ value: t.value, text: t.text })) - - return { - source, - layerData: [ - { name: 'text', label: keyItem.label || '', value: keyItem.value || '' }, - { name: 'value', label: valueItem.label || '', value: valueItem.value || '' } - ] - } - } else { - // dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 - const [code] = schemeItem.dataSourceId.split(',') - const sourceData = await this.FETCH_DATASOURCE(code) - if (!sourceData) { return [] } - - const source = sourceData.data - - return { source, layerData: schemeItem.layerData.filter(t => (!t.hide) && (t.value || t.label)) } - } - } - - return [] - }, - - /** - * 获取一个 scheme 表单项的默认值 (用户新建表单时使用,或是编辑草稿) - * 参数: 单个 schemeItem , { processId } - * - * 每种类别的表单项分别获取的默认值: - * - * currentInfo: 根据类别取当前用户/部门/公司/时间日期 - * datetime: 根据 dfValue 字段表示昨天/今天/明天,格式化为字符串 - * radio、select: 有 dfValue 则使用,否则取第一条 - * checkbox: 有 dfValue 则使用,否则为空数组 - * encode: 根据 rulecode 请求表单编码 - * upload: 空数组 - * guid: 赋值第二个参数中的 processId,但是如果在子表格中,赋空字符串 - * girdtable: 递归所有表格项 scheme 依次为它们生成默认值 - * datetimerange: 字符串 0 - */ - async getDefaultData(item, prop) { - const { processId } = prop - switch (item.type) { - case 'currentInfo': - switch (item.dataType) { - case 'user': - return this.GET_GLOBAL('loginUser').userId - case 'department': - return this.GET_GLOBAL('loginUser').departmentId - case 'company': - return this.GET_GLOBAL('loginUser').companyId - case 'time': - return moment().format('YYYY-MM-DD HH:mm:ss') - default: - return '' - } - - case 'datetime': - const datetimeFormat = item.table ? - (Number(item.dateformat) === 0 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss') : - (item.datetime === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD') - const today = moment() - const dfDatetime = [ - today.subtract(1, 'day'), - today, - today.add(1, 'day') - ][Number(item.dfvalue)] || today - - return dfDatetime.format(datetimeFormat) || '' - - case 'radio': - case 'select': - const radioItem = item.__sourceData__.find(t => t.value === item.dfvalue) || item.__sourceData__[0] - return item.type === 'radio' ? radioItem.value : '' - - case 'checkbox': - if (!item.dfvalue) { - return [] - } - return item.dfvalue.split(',').filter(t => item.__sourceData__.find(s => s.value === t)) - - case 'encode': - const result = await this.FETCH_ENCODE(item.rulecode) - return result - - case 'upload': - return [] - - case 'guid': - return item.table ? processId : '' - - case 'girdtable': - const tableItemObj = {} - for (const fieldItem of item.fieldsData) { - tableItemObj[fieldItem.field] = await this.getDefaultData(fieldItem, prop) - } - return this.COPY(tableItemObj) - - case 'datetimerange': - return '0' - - default: - return item.dfvalue || '' - } - }, - - /** - * 将单条 formData 值转化为 formValue 值 (拉取表单数据时使用) - * 参数: 单个 schemeItem , 数据值 - * - * 具体执行逻辑: - * radio、select: 剔除无效值 - * checkbox: 分割成数组并剔除无效值 - * upload: 分割成数组,拉取其中所有文件的信息 - * datetime: 按照时间日期格式进行格式化字符串 - * 其他类型: 保留原值 - */ - async convertToFormValue(item, val) { - switch (item.type) { - case 'upload': - if (!val) { return [] } - const uidList = val.split(',') - const fileList = [] - - for (const uid of uidList || []) { - const fileInfo = await this.FETCH_FILEINFO(uid) - if (!fileInfo) { continue } - - const fileType = fileInfo.F_FileType - const fileSize = fileInfo.F_FileSize - - const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) - - fileList.push({ path, type: fileType, uid, size: fileSize }) - } - return fileList - - case 'select': - case 'radio': - if (!val || !item.__sourceData__.map(t => t.value).includes(val)) { - return '' - } - return val - - case 'checkbox': - const validValue = item.__sourceData__.map(t => t.value) - const checkboxVal = val.split(',') || [] - return checkboxVal.filter(t => validValue.includes(t)) - - case 'datetime': - if (!val) { - return '' - } - return moment(val).format( - Number(item.dateformat) === 0 || item.datetime === 'date' ? - 'YYYY-MM-DD' : - 'YYYY-MM-DD HH:mm:ss' - ) - - default: - return val || '' - } - }, - - /** - * 将一个 formValue 值转化为 post 提交值(提交表单数据时使用) - * 参数: 单个 schemeItem , 表单项值 , 所有 formValue , scheme - * - * 具体执行逻辑: - * checkbox: 将数组使用符号「,」逗号拼接成字符串 - * datetimerange: 获取开始日期、结束日期,计算差值天数并保留整数 - * datetime: 格式化为完整时间日期字符串 - * upload: 依次上传文件,将返回的文件 ID 使用符号「,」逗号拼接成字符串 - * 其他类型: 保留原值 - */ - async convertToPostData(item, val, formValue, scheme) { - switch (item.type) { - case 'checkbox': - return val ? val.join(',') : '' - - case 'datetimerange': - const startTime = get(formValue, scheme.find(t => t.id === item.startTime).__valuePath__, null) - const endTime = get(formValue, scheme.find(t => t.id === item.endTime).__valuePath__, null) - if (!startTime || !endTime || moment(endTime).isBefore(startTime)) { - return '' - } else { - return moment.duration(moment(endTime).diff(moment(startTime))).asDays().toFixed(0) - } - - case 'datetime': - return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' - - case 'upload': - const uploadUid = [] - - for (const item of val) { - if (item.uid) { - uploadUid.push(item.uid) - continue - } - - const fileId = await this.HTTP_UPLOAD(item.path||item) - if (fileId) { - uploadUid.push(fileId) - } - } - - return uploadUid.join(',') - - default: - return val || '' - } - } - } + methods: { + /** + * 获取一个 scheme 表单项的源数据 (加载表单时使用) + * 参数: 单个 schemeItem + * + * radio、select、checkbox、layer 这四种表单项,需要加载额外的选单数据 + * 选单数据有两种获取方式: + * 1、来自数据字典: + * 数据字典在 this.GET_GLOBAL('dataDictionary') + * 表单使用的字段在 schemeItem.itemCode + * 选单数据中的 text 字段作为显示, value 字段作为值 + * + * 2、来自数据源: + * 将 schemeItem.dataSourceId 按符号「,」逗号分割为数组,分割为: [code, displayField, valueField] + * 数据源需要请求 API 来获取,请求需要带上数据源的编号 code + * displayField、valueField 分别为展示字段和值绑定字段 + * + * 选单数据有两种格式: + * 1、对于 radio、select、checkbox 来说: + * 只需要一个数组,数组形如: [{ text: '选项文字', value: '选项值' }, ...] + * 将获取的数据绑定到组件的 range 属性上即可 + * 全局数据中默认是对象形式,使用 Object.values() 转化即可 + * + * 2、对于 layer 来说: + * 返回一个对象,形如 { source, layerData, selfField } + * source: 为弹层中列出的数据,是一个数组 + * layerData: 需要在弹层窗口中展示的字段及标题文字,形如: [{ name:'要展示的字段名', label:'标题文字' }] + * selfField: 该表单值绑定哪个字段,默认为绑定到自身的字段 + */ + async getSourceData(schemeItem) { + if (['radio', 'select', 'checkbox'].includes(schemeItem.type)) { + // radio select checkbox 三种情况 + if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { + // dataSource 为 0,使用 clientData + return Object + .values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) + .map(t => ({ + value: t.value, + text: t.text + })) + + } else { + // dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 + const [code, displayField = schemeItem.showField, valueField = schemeItem.saveField] = + schemeItem.dataSourceId + .split(',') + const sourceData = await this.FETCH_DATASOURCE(code) + if (!sourceData) { + return [] + } + + return sourceData.data.map(t => ({ + text: t[displayField], + value: t[valueField] + })) + } + + } else if (['layer'].includes(schemeItem.type)) { + // layer 需要更多属性 + if (!schemeItem.dataSource || Number(schemeItem.dataSource) === 0) { + // dataSource 为 0,使用 clientData + // clientData 对象转数组后,隐含 key:item.text 和 value:item.value 的关系 + const [keyItem, valueItem] = schemeItem.layerData + const source = Object + .values(this.GET_GLOBAL('dataDictionary')[schemeItem.itemCode]) + .map(t => ({ + value: t.value, + text: t.text + })) + + return { + source, + layerData: [{ + name: 'text', + label: keyItem.label || '', + value: keyItem.value || '' + }, + { + name: 'value', + label: valueItem.label || '', + value: valueItem.value || '' + } + ] + } + } else { + // dataSource 不为 0,使用数据源,需要请求接口,并且提取出显示字段和实际字段 + const [code] = schemeItem.dataSourceId.split(',') + const sourceData = await this.FETCH_DATASOURCE(code) + if (!sourceData) { + return [] + } + + const source = sourceData.data + + return { + source, + layerData: schemeItem.layerData.filter(t => (!t.hide) && (t.value || t.label)) + } + } + } + + return [] + }, + + /** + * 获取一个 scheme 表单项的默认值 (用户新建表单时使用,或是编辑草稿) + * 参数: 单个 schemeItem , { processId } + * + * 每种类别的表单项分别获取的默认值: + * + * currentInfo: 根据类别取当前用户/部门/公司/时间日期 + * datetime: 根据 dfValue 字段表示昨天/今天/明天,格式化为字符串 + * radio、select: 有 dfValue 则使用,否则取第一条 + * checkbox: 有 dfValue 则使用,否则为空数组 + * encode: 根据 rulecode 请求表单编码 + * upload: 空数组 + * guid: 赋值第二个参数中的 processId,但是如果在子表格中,赋空字符串 + * girdtable: 递归所有表格项 scheme 依次为它们生成默认值 + * datetimerange: 字符串 0 + */ + async getDefaultData(item, prop) { + const { + processId + } = prop + switch (item.type) { + case 'currentInfo': + switch (item.dataType) { + case 'user': + return this.GET_GLOBAL('loginUser').userId + case 'department': + return this.GET_GLOBAL('loginUser').departmentId + case 'company': + return this.GET_GLOBAL('loginUser').companyId + case 'time': + return moment().format('YYYY-MM-DD HH:mm:ss') + default: + return '' + } + + case 'datetime': + const datetimeFormat = item.table ? + (Number(item.dateformat) === 0 ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss') : + (item.datetime === 'datetime' ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD') + const today = moment() + const dfDatetime = [ + today.subtract(1, 'day'), + today, + today.add(1, 'day') + ][Number(item.dfvalue)] || today + + return dfDatetime.format(datetimeFormat) || '' + + case 'radio': + case 'select': + const radioItem = item.__sourceData__.find(t => t.value === item.dfvalue) || item + .__sourceData__[0] + return item.type === 'radio' ? radioItem.value : '' + + case 'checkbox': + if (!item.dfvalue) { + return [] + } + return item.dfvalue.split(',').filter(t => item.__sourceData__.find(s => s.value === t)) + + case 'encode': + const result = await this.FETCH_ENCODE(item.rulecode) + return result + + case 'upload': + return [] + + case 'guid': + return item.table ? processId : '' + + case 'girdtable': + const tableItemObj = {} + for (const fieldItem of item.fieldsData) { + tableItemObj[fieldItem.field] = await this.getDefaultData(fieldItem, prop) + } + return this.COPY(tableItemObj) + + case 'datetimerange': + return '0' + + default: + return item.dfvalue || '' + } + }, + + /** + * 将单条 formData 值转化为 formValue 值 (拉取表单数据时使用) + * 参数: 单个 schemeItem , 数据值 + * + * 具体执行逻辑: + * radio、select: 剔除无效值 + * checkbox: 分割成数组并剔除无效值 + * upload: 分割成数组,拉取其中所有文件的信息 + * datetime: 按照时间日期格式进行格式化字符串 + * 其他类型: 保留原值 + */ + async convertToFormValue(item, val) { + switch (item.type) { + case 'upload': + if (!val) { + return [] + } + const uidList = val; + const fileList = [] + const wxlist = await this.FETCH_FILEList(uidList); + for (const wxfile of wxlist) { + const fileInfo = await this.FETCH_FILEINFO(wxfile.F_Id) + if (!fileInfo) { + continue + } + + const fileType = fileInfo.F_FileType + const fileSize = fileInfo.F_FileSize + + const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(wxfile.F_Id, true) + fileList.push({ + path, + type: fileType, + uid:wxfile.F_Id, + folderId:wxfile.F_FolderId, + size: fileSize + }) + } + return fileList + + case 'select': + case 'radio': + if (!val || !item.__sourceData__.map(t => t.value).includes(val)) { + return '' + } + return val + + case 'checkbox': + const validValue = item.__sourceData__.map(t => t.value) + const checkboxVal = val.split(',') || [] + return checkboxVal.filter(t => validValue.includes(t)) + + case 'datetime': + if (!val) { + return '' + } + return moment(val).format( + Number(item.dateformat) === 0 || item.datetime === 'date' ? + 'YYYY-MM-DD' : + 'YYYY-MM-DD HH:mm:ss' + ) + + default: + return val || '' + } + }, + + /** + * 将一个 formValue 值转化为 post 提交值(提交表单数据时使用) + * 参数: 单个 schemeItem , 表单项值 , 所有 formValue , scheme + * + * 具体执行逻辑: + * checkbox: 将数组使用符号「,」逗号拼接成字符串 + * datetimerange: 获取开始日期、结束日期,计算差值天数并保留整数 + * datetime: 格式化为完整时间日期字符串 + * upload: 依次上传文件,将返回的文件 ID 使用符号「,」逗号拼接成字符串 + * 其他类型: 保留原值 + */ + async convertToPostData(item, val, formValue, scheme, guid) { + switch (item.type) { + case 'checkbox': + return val ? val.join(',') : '' + + case 'datetimerange': + const startTime = get(formValue, scheme.find(t => t.id === item.startTime).__valuePath__, null) + const endTime = get(formValue, scheme.find(t => t.id === item.endTime).__valuePath__, null) + if (!startTime || !endTime || moment(endTime).isBefore(startTime)) { + return '' + } else { + return moment.duration(moment(endTime).diff(moment(startTime))).asDays().toFixed(0) + } + + case 'datetime': + return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' + + case 'upload': + var uploadUid = ''; + + for (const item of val) { + if (item.uid) { + uploadUid = item.uid + continue + } + + const fileId = await this.HTTP_UPLOAD(item.path || item, undefined, guid || '') + if (fileId) { + uploadUid = fileId; + } + } + + return uploadUid; + + default: + return val || '' + } + } + } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js index b48efc4f9..a1fca19e7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js @@ -257,7 +257,6 @@ export default { const fileSize = fileInfo.F_FileSize const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) - fileList.push({ path, type: fileType, uid, size: fileSize }) } return fileList diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index 4bbefbeea..c33aa8c52 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -229,6 +229,14 @@ export default { return await this.HTTP_GET('learun/adms/annexes/wxfileinfo', fileId) }, + //获取文件夹下文件列表 + async FETCH_FILEList(folderId) { + if (!folderId) { + return null + } + + return await this.HTTP_GET('learun/adms/annexes/wxlist', folderId) + }, // 封装的 GET 请求,集成了验证信息 // 返回请求结果或 null @@ -258,8 +266,8 @@ export default { // url 为请求地址 // filePath 为临时文件的路径 // formData 为请求附带的提交数据 - async HTTP_UPLOAD(filePath, formData) { - const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData) + async HTTP_UPLOAD(filePath, formData,guid) { + const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData,guid) return this.handleResult(err, res) }, @@ -308,11 +316,12 @@ export default { // 返回结果是一个数组: [error, result] // error 表示错误,一般是网络错误,请求很可能根本没有发出 // result 包含 { statusCode, data } 分别表示状态码、接口返回的数据 - async UPLOAD(url, filePath, formData) { + async UPLOAD(url, filePath, formData,guid) { const uploadUrl = this.handleUrl(url) const query = { loginMark: this.getLoginMark(), - token: this.GET_GLOBAL('token') + token: this.GET_GLOBAL('token'), + folderId:guid } if (formData && typeof formData === 'object') { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 7670bf973..6cf431e21 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -21,8 +21,8 @@ export default { // "http://192.168.2.98:8088/" // ], "apiHost": [ - // "http://localhost:31173/" - "http://192.168.10.68:8002/" + "http://localhost:31173/" + //"http://192.168.10.68:8002/" ], "webHost":"http://localhost:20472/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg.vue index bd59cb137..58981285d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg.vue @@ -132,7 +132,7 @@ export default { return null } - return this.API + `/user/img?data=${item.F_OtherUserId}` + return this.API + `/learun/adms/user/img?data=${item.F_OtherUserId}` } }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg/chat.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg/chat.vue index 1b8e6bd8a..0cebe305f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg/chat.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/msg/chat.vue @@ -186,7 +186,7 @@ export default { // 获取用户头像图片 url avatar(id) { - return id === this.chatUserId && this.isSystem ? null : this.API + `/user/img?data=${id}` + return id === this.chatUserId && this.isSystem ? null : this.API + `/learun/adms/user/img?data=${id}` } }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue index 0ae3c6381..7774d7de3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue @@ -156,7 +156,7 @@ export default { return '' } - return this.API + `/user/img?data=${this.currentUser.userId}` + return this.API + `/learun/adms/user/img?data=${this.currentUser.userId}` } }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue index 1b87fb850..93b978381 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/info.vue @@ -34,7 +34,7 @@ export default { // 头像图片 url avatarSrc() { - return this.API + `/user/img?data=${this.currentUser.userId}` + return this.API + `/learun/adms/user/img?data=${this.currentUser.userId}` } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/qrcode.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/qrcode.vue index 272bde806..3297a7881 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/qrcode.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/qrcode.vue @@ -30,7 +30,7 @@ export default { // 头像图片 url avatar() { - return this.API + `/user/img?data=${this.currentUser.userId}` + return this.API + `/learun/adms/user/img?data=${this.currentUser.userId}` }, // 用户公司部门 tag diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 565660754..3a505760c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -95,7 +95,6 @@ export default { // t.formId 使用表单,根据这个 formId 来获取 scheme 等信息 // t.appurl 使用移动页面,直接跳转到本地的页面;表单结构等均写死在页面里 const { wfForms } = this.currentNode - console.log(wfForms); // 处理没有有效表单的情况,停止加载 if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { @@ -144,7 +143,6 @@ export default { code: this.code, useDefault: true }) - console.log("formValue",formValue,"scheme",scheme) this.scheme = scheme this.formValue = formValue this.rel = rel @@ -152,8 +150,6 @@ export default { // 不是子流程,可以直接渲染 const schemeData = await this.fetchSchemeData(this.currentNode) const formData = await this.fetchFormData(this.currentNode, this.processId) - console.log(schemeData) - console.log(formData) const { formValue, scheme, rel } = await this.getCustomForm({ formData, schemeData, @@ -161,7 +157,6 @@ export default { processId: this.processId, code: null }) - console.log("formValue",formValue,"scheme",scheme) this.scheme = scheme this.formValue = formValue this.rel = rel diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue index 40d538e79..cbe42cb02 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue @@ -110,7 +110,9 @@ export default { this.needTitle = this.type !== 'again' && Number(currentNode.isTitle) === 1 const formData = await this.fetchFormData(currentNode, processId) + const schemeData = await this.fetchSchemeData(currentNode) + const { formValue, scheme, rel } = await this.getCustomForm({ schemeData, processId, @@ -119,14 +121,16 @@ export default { code: this.type === 'again' ? null : code, useDefault: true }) + this.rel = rel this.scheme = scheme this.formValue = formValue this.code = code this.processId = processId - +console.log(this.formValue,'=====',this.scheme ,) this.ready = true this.HIDE_LOADING() + }, // 提交草稿按钮 @@ -194,7 +198,6 @@ export default { verifyValue() { const errList = this.$refs.form.verifyValue() - console.log(errList,'errList') if (this.needTitle && !this.title) { errList.push(`流程的标题不能为空`) } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js index 89f253e06..54918f6f3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js @@ -32,301 +32,355 @@ import customForm from '@/common/customform.js' * (以上只是简单介绍;实际使用中,如果打开子流程,需要拉取父/子两个流程信息) */ export default { - mixins: [customForm], - - methods: { - /** - * 从流程信息中生成 scheme、formValue - * 参数: { schemeData (必填), processId, currentNode, formData (新建时为 null), code, useDefault } - * 返回: { scheme, formValue, rel } - * - * 参数: - * schemeData: 使用 fetchSchemeData 方法拉取到的原始 scheme 数据,未经过格式化处理 - * processId: 表单 GUID;如果是新建表单,可以用 this.GUID('-') 生成一个 - * currentNode: 使用 getCurrentNode 方法拉取到的当前节点信息,用于权限控制 - * formData: 填入表单的表单值,新建表单时此项为 null 即可 - * code: 表单编号 code,会被赋值到返回的 formValue.code;重新发起流程的场合赋 null - * useDefault: 如果 formData 中某一项为空,是否对这一项填入默认值;通常在编辑草稿时启用 - * - * 该方法返回的 scheme 项可能带有以下属性: - * __valuePath__: 表单值在 formValue 中的路径,使用 lodash 的 get、set 方法即可读写 - * __sourceData__: 表单值的选单数据 - * __defaultItem__: 类型为 girdtable 的表单项带有此属性,表示添加一行表格时候表格项的默认值 - * __schemeIndex__: (暂时用不到)表单项位于 schemeData 根级内的第几个子项中 - * __dataIndex__: (暂时用不到)表单项位于 F_Scheme.data 中的第几个子项中 - */ - async getCustomForm(prop) { - const { schemeData, formData, currentNode, code, processId, useDefault } = prop - console.log(prop,'prop') - // 处理字段之间的级联、绑定关系 - // 需要绑定 change 事件的: - // datetime: 修改后重新计算 datetimerange - // organize: 修改后重设级联到该组件的其他组件的值,user 一级无需处理 - // 需要绑定某值的: - // organize: 级联到某个组件,company 一级无需处理 - const schemeRef = {} - const refList = [] - - // 最终返回值:scheme、rel、formValue - const scheme = [] - const rel = {} - const formValue = { processId, formreq: [] } - if (code) { - formValue.code = code - } - - // 遍历 schemeData 中所有的 scheme - const schemeList = Array.isArray(schemeData) ? schemeData : Object.values(schemeData) - for (let schemeIndex = 0; schemeIndex < schemeList.length; ++schemeIndex) { - - const schemeItem = schemeList[schemeIndex] - schemeItem.F_Scheme = JSON.parse(schemeItem.F_Scheme) - // 已有表单值的时候,舍弃掉不存在表单值中的 scheme - if (formData && !formData[schemeItem.F_SchemeInfoId]) { - continue - } - - // 设置 formreq 的内容,非新建模式下需要设置 keyValue - const { formId, field } = get(currentNode, `wfForms.${schemeIndex}`, {}) - const formreqObj = { schemeInfoId: formId, processIdName: field, formData: {} } - if (formData) { - if (Object.values(get(formData, `${schemeItem.F_SchemeInfoId}`, {})).some(t => t && t.length > 0)) { - formreqObj.keyValue = processId - } - } - formValue.formreq[schemeIndex] = formreqObj - - for (let dataIndex = 0; dataIndex < schemeItem.F_Scheme.data.length; ++dataIndex) { - const { componts } = schemeItem.F_Scheme.data[dataIndex] - for (const t of componts) { - // 之后的 t 即表示每个 scheme 项 - t.__valuePath__ = `formreq.${schemeIndex}.formData.${t.id}` - // 以下两个属性暂时用不到 - t.__schemeIndex__ = schemeIndex - t.__dataIndex__ = dataIndex - - if (t.type === 'girdtable' && t.table) { - // 数据项是表格的情况 - // 先设置源数据,不然无法获取默认值 - for (const fieldItem of t.fieldsData) { - fieldItem.__sourceData__ = await this.getSourceData(fieldItem) - } - t.__defaultItem__ = await this.getDefaultData(t, prop) - if (formData) { - // 有表单值的情况,从表单值中获取数据 - const val = [] - for (const valueItem of get(formData, `${schemeItem.F_SchemeInfoId}.${t.table}`, [])) { - const tableItemValue = {} - for (const fieldItem of t.fieldsData.filter(t => t.field)) { - const formDataValue = get(valueItem, fieldItem.field.toLowerCase()) - tableItemValue[fieldItem.field] = await this.convertToFormValue(fieldItem, formDataValue) - } - - val.push(tableItemValue) - } - - // useDefault 表示在从 formData 取不到值的时候使用默认值 - if ((!val || val.length <= 0) && useDefault) { - set(formValue, t.__valuePath__, [this.COPY(t.__defaultItem__)]) - } else { - set(formValue, t.__valuePath__, val) - } - - } else { - // 无表单值的情况,默认值 - set(formValue, t.__valuePath__, [this.COPY(t.__defaultItem__)]) - } - - } else if (t.field) { - // 数据项不是表格的情况 - // 先设置源数据,不然无法获取默认值 - t.__sourceData__ = await this.getSourceData(t) - if (formData) { - // 有表单值的情况,从表单值中获取数据 - const path = `${schemeItem.F_SchemeInfoId}.${t.table}.${dataIndex}.${t.field.toLowerCase()}` - const formDataValue = get(formData, path) - - // useDefault 表示在从 formData 取不到值的时候使用默认值 - if (!formDataValue && useDefault) { - set(formValue, t.__valuePath__, await this.getDefaultData(t, prop)) - } else { - set(formValue, t.__valuePath__, await this.convertToFormValue(t, formDataValue)) - } - - } else { - // 无表单值的情况,默认值 - set(formValue, t.__valuePath__, await this.getDefaultData(t, prop)) - } - } - - // 权限控制 - const authObj = get(currentNode, `wfForms.${schemeIndex}.authorize.${t.id}`, {}) - t.edit = authObj.isEdit - if (Number(t.isHide) !== 1 && authObj.isLook !== 0) { - // 加入 scheme - scheme.push(t) - - // organize、datetime 可能作为其他 organize 或 datetimerange 的依赖项,引用它们 - if (['organize', 'datetime'].includes(t.type)) { - schemeRef[t.id] = t - } - - // datetimerange、带有 relation 级联字段的 organize,依赖其他项 - if ((t.type === 'datetimerange' && t.startTime && t.endTime) || (t.type === 'organize' && t.relation)) { - refList.push(t) - } - } - } - } - } - - // 依次处理表单关联 - refList.forEach(t => { - if (t.type === 'organize') { - // 处理组件结构级联 - // 给当前组件赋上级级联的值路径 __relationPath__ - const parent = schemeRef[t.relation] - t.__relationPath__ = parent.__valuePath__ - // 给上级级联的组件注册自动重置当前组件的 change 事件 - const relItem = { type: 'organize', id: t.id, path: t.__valuePath__ } - rel[parent.id] = rel[parent.id] ? rel[parent.id].concat(relItem) : [relItem] - - } else if (t.type === 'datetimerange') { - // 处理日期区间 - const start = schemeRef[t.startTime] - const end = schemeRef[t.endTime] - - const relItem = { - type: 'datetimerange', - path: t.__valuePath__, - id: t.id, - startPath: start.__valuePath__, - endPath: end.__valuePath__, - } - - rel[start.id] = rel[start.id] ? rel[start.id].concat(relItem) : [relItem] - rel[end.id] = rel[end.id] ? rel[end.id].concat(relItem) : [relItem] - - } - }) - - return { scheme, formValue, rel } - }, - - /** - * 获取最终需要 POST 的数据 - * 参数:formValue, scheme - * 返回:用于提交的数据 - * - * 遍历 formValue,将其中的表单值依次使用 convertToPostData 这个方法转化为提交值 - */ - async getPostData(originFormValue, scheme) { - const formValue = this.COPY(originFormValue) - - // 依次按照 scheme 项目遍历 - for (const item of scheme) { - if (item.field) { - // 不是表格的情况 - const path = item.__valuePath__ - const val = get(formValue, path) - console.log(val,'val=======') - const result = await this.convertToPostData(item, val, originFormValue, scheme) - set(formValue, path, result) - - } else if (item.table && item.fieldsData) { - // 是表格的情况 - const tableValue = get(formValue, item.__valuePath__, []) - for (let valueIndex = 0; valueIndex < tableValue.length; ++valueIndex) { - for (const schemeItem of item.fieldsData) { - const path = `${item.__valuePath__}.${valueIndex}.${schemeItem.field}` - const val = get(formValue, path) - - const result = await this.convertToPostData(schemeItem, val, originFormValue, scheme) - set(formValue, path, result) - } - } - } - } - - formValue.formreq.forEach(t => { t.formData = JSON.stringify(t.formData) }) - formValue.formreq = JSON.stringify(formValue.formreq) - - return formValue - }, - - /** - * 获取流程信息 - * 参数: { code, processId, taskId } - * - */ - async fetchProcessInfo({ code, processId, taskId }) { - const url = processId ? 'learun/adms/newwf/processinfo' : 'learun/adms/newwf/scheme' - const reqObj = { processId } - if (taskId) { - reqObj.taskId = taskId - } - const data = processId ? reqObj : code - const result = await this.HTTP_GET(url, data) - - if (!result) { return {} } - - if (result.info) { - result.info.Scheme = JSON.parse(result.info.Scheme) - } else if (result.F_Content) { - result.F_Content = JSON.parse(result.F_Content) - } - - return result - }, - - /** - * 从 processInfo 流程信息中,提取出 currentNode - * 参数: processInfo - * - */ - getCurrentNode(processInfo) { - if (processInfo.info) { - return processInfo.info.Scheme.nodes.find(t => t.id === processInfo.info.CurrentNodeId) - } else if (processInfo.F_Content) { - return processInfo.F_Content.nodes.find(t => t.type === 'startround') - } - - return {} - }, - - /** - * 拉取表单的 schemeData - * 参数: currentNode - * - * 从当前节点 currentNode 中提取出表单 id,然后自 API 地址 /form/scheme 中拉取表单数据并返回 - */ - async fetchSchemeData(currentNode, currentTask, type) { - const { wfForms } = currentNode - - const data = wfForms.filter(t => t.formId).map(t => ({ id: t.formId, ver: '' })) - const schemeData = await this.HTTP_GET('learun/adms/form/scheme', data) - - return schemeData || {} - }, - - /** - * 拉取表单的 formData - * 参数: currentNode, keyValue - * - * 提取当前节点信息、表单主键信息,从 API 地址 /form/data 中拉取表单数据 - */ - async fetchFormData({ wfForms }, keyValue) { - const reqData = wfForms - .filter(t => t.formId) - .map(t => ({ - schemeInfoId: t.formId, - processIdName: t.field, - keyValue - })) - - const formData = await this.HTTP_GET('learun/adms/form/data', reqData) - - return formData || {} - } - } + mixins: [customForm], + + methods: { + /** + * 从流程信息中生成 scheme、formValue + * 参数: { schemeData (必填), processId, currentNode, formData (新建时为 null), code, useDefault } + * 返回: { scheme, formValue, rel } + * + * 参数: + * schemeData: 使用 fetchSchemeData 方法拉取到的原始 scheme 数据,未经过格式化处理 + * processId: 表单 GUID;如果是新建表单,可以用 this.GUID('-') 生成一个 + * currentNode: 使用 getCurrentNode 方法拉取到的当前节点信息,用于权限控制 + * formData: 填入表单的表单值,新建表单时此项为 null 即可 + * code: 表单编号 code,会被赋值到返回的 formValue.code;重新发起流程的场合赋 null + * useDefault: 如果 formData 中某一项为空,是否对这一项填入默认值;通常在编辑草稿时启用 + * + * 该方法返回的 scheme 项可能带有以下属性: + * __valuePath__: 表单值在 formValue 中的路径,使用 lodash 的 get、set 方法即可读写 + * __sourceData__: 表单值的选单数据 + * __defaultItem__: 类型为 girdtable 的表单项带有此属性,表示添加一行表格时候表格项的默认值 + * __schemeIndex__: (暂时用不到)表单项位于 schemeData 根级内的第几个子项中 + * __dataIndex__: (暂时用不到)表单项位于 F_Scheme.data 中的第几个子项中 + */ + async getCustomForm(prop) { + const { + schemeData, + formData, + currentNode, + code, + processId, + useDefault + } = prop + // 处理字段之间的级联、绑定关系 + // 需要绑定 change 事件的: + // datetime: 修改后重新计算 datetimerange + // organize: 修改后重设级联到该组件的其他组件的值,user 一级无需处理 + // 需要绑定某值的: + // organize: 级联到某个组件,company 一级无需处理 + const schemeRef = {} + const refList = [] + + // 最终返回值:scheme、rel、formValue + const scheme = [] + const rel = {} + const formValue = { + processId, + formreq: [] + } + if (code) { + formValue.code = code + } + + // 遍历 schemeData 中所有的 scheme + const schemeList = Array.isArray(schemeData) ? schemeData : Object.values(schemeData) + for (let schemeIndex = 0; schemeIndex < schemeList.length; ++schemeIndex) { + + const schemeItem = schemeList[schemeIndex] + schemeItem.F_Scheme = JSON.parse(schemeItem.F_Scheme) + // 已有表单值的时候,舍弃掉不存在表单值中的 scheme + if (formData && !formData[schemeItem.F_SchemeInfoId]) { + continue + } + + // 设置 formreq 的内容,非新建模式下需要设置 keyValue + const { + formId, + field + } = get(currentNode, `wfForms.${schemeIndex}`, {}) + const formreqObj = { + schemeInfoId: formId, + processIdName: field, + formData: {} + } + if (formData) { + if (Object.values(get(formData, `${schemeItem.F_SchemeInfoId}`, {})).some(t => t && t.length > + 0)) { + formreqObj.keyValue = processId + } + } + formValue.formreq[schemeIndex] = formreqObj + + for (let dataIndex = 0; dataIndex < schemeItem.F_Scheme.data.length; ++dataIndex) { + const { + componts + } = schemeItem.F_Scheme.data[dataIndex] + for (const t of componts) { + // 之后的 t 即表示每个 scheme 项 + t.__valuePath__ = `formreq.${schemeIndex}.formData.${t.id}` + // 以下两个属性暂时用不到 + t.__schemeIndex__ = schemeIndex + t.__dataIndex__ = dataIndex + + if (t.type === 'girdtable' && t.table) { + // 数据项是表格的情况 + // 先设置源数据,不然无法获取默认值 + for (const fieldItem of t.fieldsData) { + fieldItem.__sourceData__ = await this.getSourceData(fieldItem) + } + t.__defaultItem__ = await this.getDefaultData(t, prop) + if (formData) { + // 有表单值的情况,从表单值中获取数据 + const val = [] + for (const valueItem of get(formData, `${schemeItem.F_SchemeInfoId}.${t.table}`, + [])) { + const tableItemValue = {} + for (const fieldItem of t.fieldsData.filter(t => t.field)) { + const formDataValue = get(valueItem, fieldItem.field.toLowerCase()) + tableItemValue[fieldItem.field] = await this.convertToFormValue(fieldItem, + formDataValue) + } + + val.push(tableItemValue) + } + + // useDefault 表示在从 formData 取不到值的时候使用默认值 + if ((!val || val.length <= 0) && useDefault) { + set(formValue, t.__valuePath__, [this.COPY(t.__defaultItem__)]) + } else { + set(formValue, t.__valuePath__, val) + } + + } else { + // 无表单值的情况,默认值 + set(formValue, t.__valuePath__, [this.COPY(t.__defaultItem__)]) + } + + } else if (t.field) { + // 数据项不是表格的情况 + // 先设置源数据,不然无法获取默认值 + t.__sourceData__ = await this.getSourceData(t) + if (formData) { + // 有表单值的情况,从表单值中获取数据 + const path = + `${schemeItem.F_SchemeInfoId}.${t.table}.${dataIndex}.${t.field.toLowerCase()}` + const formDataValue = get(formData, path) + + // useDefault 表示在从 formData 取不到值的时候使用默认值 + if (!formDataValue && useDefault) { + set(formValue, t.__valuePath__, await this.getDefaultData(t, prop)) + } else { + set(formValue, t.__valuePath__, await this.convertToFormValue(t, formDataValue)) + } + + } else { + // 无表单值的情况,默认值 + set(formValue, t.__valuePath__, await this.getDefaultData(t, prop)) + } + } + + // 权限控制 + const authObj = get(currentNode, `wfForms.${schemeIndex}.authorize.${t.id}`, {}) + t.edit = authObj.isEdit + if (Number(t.isHide) !== 1 && authObj.isLook !== 0) { + // 加入 scheme + scheme.push(t) + + // organize、datetime 可能作为其他 organize 或 datetimerange 的依赖项,引用它们 + if (['organize', 'datetime'].includes(t.type)) { + schemeRef[t.id] = t + } + + // datetimerange、带有 relation 级联字段的 organize,依赖其他项 + if ((t.type === 'datetimerange' && t.startTime && t.endTime) || (t.type === + 'organize' && t.relation)) { + refList.push(t) + } + } + } + } + } + + // 依次处理表单关联 + refList.forEach(t => { + if (t.type === 'organize') { + // 处理组件结构级联 + // 给当前组件赋上级级联的值路径 __relationPath__ + const parent = schemeRef[t.relation] + t.__relationPath__ = parent.__valuePath__ + // 给上级级联的组件注册自动重置当前组件的 change 事件 + const relItem = { + type: 'organize', + id: t.id, + path: t.__valuePath__ + } + rel[parent.id] = rel[parent.id] ? rel[parent.id].concat(relItem) : [relItem] + + } else if (t.type === 'datetimerange') { + // 处理日期区间 + const start = schemeRef[t.startTime] + const end = schemeRef[t.endTime] + + const relItem = { + type: 'datetimerange', + path: t.__valuePath__, + id: t.id, + startPath: start.__valuePath__, + endPath: end.__valuePath__, + } + + rel[start.id] = rel[start.id] ? rel[start.id].concat(relItem) : [relItem] + rel[end.id] = rel[end.id] ? rel[end.id].concat(relItem) : [relItem] + + } + }) + + return { + scheme, + formValue, + rel + } + }, + newguid(){ + return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + }, + /** + * 获取最终需要 POST 的数据 + * 参数:formValue, scheme + * 返回:用于提交的数据 + * + * 遍历 formValue,将其中的表单值依次使用 convertToPostData 这个方法转化为提交值 + */ + async getPostData(originFormValue, scheme) { + const formValue = this.COPY(originFormValue) + var guid =this.newguid(); + // 依次按照 scheme 项目遍历 + for (const item of scheme) { + if (item.field) { + // 不是表格的情况 + const path = item.__valuePath__ + const val = get(formValue, path) + const result = await this.convertToPostData(item, val, originFormValue, scheme, guid) + set(formValue, path, result) + + } else if (item.table && item.fieldsData) { + // 是表格的情况 + const tableValue = get(formValue, item.__valuePath__, []) + for (let valueIndex = 0; valueIndex < tableValue.length; ++valueIndex) { + for (const schemeItem of item.fieldsData) { + const path = `${item.__valuePath__}.${valueIndex}.${schemeItem.field}` + const val = get(formValue, path) + + const result = await this.convertToPostData(schemeItem, val, originFormValue, scheme, + guid) + set(formValue, path, result) + } + } + } + } + + formValue.formreq.forEach(t => { + t.formData = JSON.stringify(t.formData) + }) + formValue.formreq = JSON.stringify(formValue.formreq) + + return formValue + }, + + /** + * 获取流程信息 + * 参数: { code, processId, taskId } + * + */ + async fetchProcessInfo({ + code, + processId, + taskId + }) { + const url = processId ? 'learun/adms/newwf/processinfo' : 'learun/adms/newwf/scheme' + const reqObj = { + processId + } + if (taskId) { + reqObj.taskId = taskId + } + const data = processId ? reqObj : code + const result = await this.HTTP_GET(url, data) + + if (!result) { + return {} + } + + if (result.info) { + result.info.Scheme = JSON.parse(result.info.Scheme) + } else if (result.F_Content) { + result.F_Content = JSON.parse(result.F_Content) + } + + return result + }, + + /** + * 从 processInfo 流程信息中,提取出 currentNode + * 参数: processInfo + * + */ + getCurrentNode(processInfo) { + if (processInfo.info) { + return processInfo.info.Scheme.nodes.find(t => t.id === processInfo.info.CurrentNodeId) + } else if (processInfo.F_Content) { + return processInfo.F_Content.nodes.find(t => t.type === 'startround') + } + + return {} + }, + + /** + * 拉取表单的 schemeData + * 参数: currentNode + * + * 从当前节点 currentNode 中提取出表单 id,然后自 API 地址 /form/scheme 中拉取表单数据并返回 + */ + async fetchSchemeData(currentNode, currentTask, type) { + const { + wfForms + } = currentNode + + const data = wfForms.filter(t => t.formId).map(t => ({ + id: t.formId, + ver: '' + })) + const schemeData = await this.HTTP_GET('learun/adms/form/scheme', data) + + return schemeData || {} + }, + + /** + * 拉取表单的 formData + * 参数: currentNode, keyValue + * + * 提取当前节点信息、表单主键信息,从 API 地址 /form/data 中拉取表单数据 + */ + async fetchFormData({ + wfForms + }, keyValue) { + const reqData = wfForms + .filter(t => t.formId) + .map(t => ({ + schemeInfoId: t.formId, + processIdName: t.field, + keyValue + })) + + const formData = await this.HTTP_GET('learun/adms/form/data', reqData) + + return formData || {} + } + } } From cb8fbcad9aa9906e4f7c1d4c58d5ffab304924b8 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 23 Aug 2022 15:36:41 +0800 Subject: [PATCH 03/49] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=A4=84=E5=88=86/?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=20=E4=BC=98=E5=8C=96=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuEncourgement/Index.cshtml | 13 +++--- .../Views/StuEncourgement/Index.js | 45 ++++++++++++++++--- .../Views/StuPunishment/Index.cshtml | 7 ++- .../Views/StuPunishment/Index.js | 33 +++++++++++++- .../MealCardRunTab/MealCardRunTabService.cs | 4 +- .../StuEncourgement/StuEncourgementService.cs | 8 ++-- .../StuPunishment/StuPunishmentService.cs | 7 +-- 7 files changed, 90 insertions(+), 27 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.cshtml index 48982f154..44eaca017 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.cshtml @@ -7,24 +7,23 @@
+
+
+
学号
- +
姓名
- +
奖励名称
- -
-
-
奖励日期
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js index 8b5acb4bb..d34ee22bd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js @@ -7,15 +7,44 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 300, 400); + }, 200, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -68,12 +97,12 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageList', headData: [ - { label: "学号", name: "StuNo", width: 100, align: "left"}, - { label: "姓名", name: "StuName", width: 100, align: "left"}, - { label: "奖励名称", name: "EncourgeName", width: 100, align: "left"}, - { label: "奖励原因", name: "Reason", width: 100, align: "left"}, - { label: "奖励金额", name: "Fee", width: 100, align: "left"}, - { label: "奖励日期", name: "EncourgeDate", width: 100, align: "left"}, + { label: "学号", name: "StuNo", width: 200, align: "left"}, + { label: "姓名", name: "StuName", width: 200, align: "left"}, + { label: "奖励名称", name: "EncourgeName", width: 200, align: "left"}, + { label: "奖励原因", name: "Reason", width: 200, align: "left"}, + { label: "奖励金额", name: "Fee", width: 200, align: "left"}, + { label: "奖励日期", name: "EncourgeDate", width: 200, align: "left"}, ], mainId:'ID', isPage: true @@ -82,6 +111,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml index 67c53874f..bc90ff2f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.cshtml @@ -7,6 +7,9 @@
+
+
+
@@ -22,10 +25,6 @@
处分名称
-
-
处分日期
- -
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js index 9562bac1f..bfd3fa9f5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js @@ -7,15 +7,44 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 300, 400); + }, 200, 400); $('#PunishNo').lrDataItemSelect({ code: 'Punishment' }); // 刷新 @@ -137,6 +166,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs index f4447cc5e..c274f584c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs @@ -220,7 +220,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); strSql.Append(" AND ( t.occurTime >= @startTime AND t.occurTime <= @endTime ) "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + data = data.OrderByDescending(x => x.centralTm); + return data; } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs index 3f3de8b01..b45777feb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgement/StuEncourgementService.cs @@ -82,12 +82,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String); strSql.Append(" AND t.EncourgeName Like @EncourgeName "); } - if (!queryParam["EncourgeDate"].IsEmpty()) + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) { - dp.Add("EncourgeDate", queryParam["EncourgeDate"].ToString(), DbType.String); - strSql.Append(" AND t.EncourgeDate = @EncourgeDate "); + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.EncourgeDate >= @startTime AND t.EncourgeDate <= @endTime ) "); } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs index 2ec5e0fa2..65e555839 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishment/StuPunishmentService.cs @@ -77,10 +77,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String); strSql.Append(" AND t.PunishNo = @PunishNo "); } - if (!queryParam["PunishDate"].IsEmpty()) + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) { - dp.Add("PunishDate", queryParam["PunishDate"].ToString(), DbType.String); - strSql.Append(" AND t.PunishDate = @PunishDate "); + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.PunishDate >= @startTime AND t.PunishDate <= @endTime ) "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } From f4d561ef525587263d477de3445182da2f0e0c4e Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 23 Aug 2022 15:54:51 +0800 Subject: [PATCH 04/49] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9=E4=B8=89=E4=B8=AA=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/StuEncourgement/Index.js | 2 +- .../EducationalAdministration/Views/StuPunishment/Index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js index d34ee22bd..895fc8c16 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEncourgement/Index.js @@ -35,7 +35,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '3', selectfn: function (begin, end) { startTime = begin; endTime = end; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js index bfd3fa9f5..7b6fd23d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuPunishment/Index.js @@ -35,7 +35,7 @@ var bootstrap = function ($, learun) { preyShow: false, yShow: false, // 默认 - dfvalue: '1', + dfvalue: '3', selectfn: function (begin, end) { startTime = begin; endTime = end; From 02b1f2162acbb7d13d58b87f07d18f2f15aa2775 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 23 Aug 2022 17:31:29 +0800 Subject: [PATCH 05/49] =?UTF-8?q?app2.0=20=E4=B8=80=E5=8D=A1=E9=80=9A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MealCardRunTab/MealCardRunTabService.cs | 4 +--- .../LearunApp-2.2.0/pages/MealCardRunTab/list.vue | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs index c274f584c..f4447cc5e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/MealCardRunTab/MealCardRunTabService.cs @@ -220,9 +220,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); strSql.Append(" AND ( t.occurTime >= @startTime AND t.occurTime <= @endTime ) "); } - var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); - data = data.OrderByDescending(x => x.centralTm); - return data; + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/MealCardRunTab/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/MealCardRunTab/list.vue index bafee7915..7bafb76c1 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/MealCardRunTab/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/MealCardRunTab/list.vue @@ -188,7 +188,9 @@ let _postParam = { pagination: { rows: _this.rows, - page: _this.page + page: _this.page, + sidx: 'centralTm', + sord: 'desc', }, queryJson: JSON.stringify(_this.multipleData) }; From e284768377b20fbb7fdcf3b68079dffefb47d55d Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 23 Aug 2022 18:03:45 +0800 Subject: [PATCH 06/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=BF=83=E7=90=86=E5=81=A5=E5=BA=B7=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=EF=BC=9A=E8=A1=A8=E5=8D=95=E5=A2=9E=E5=8A=A0=E5=BF=85?= =?UTF-8?q?=E5=A1=AB=E9=AA=8C=E8=AF=81=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/APStuHealthRecords/Form.cshtml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.cshtml index 6a9bc7f27..e4844f218 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.cshtml @@ -3,25 +3,25 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
-
+
+
*
+
-
-
专业
-
+
+
专业*
+
-
-
班级
-
+
+
班级*
+
-
-
学生
-
+
+
学生*
+
-
+
描述
- +
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/APStuHealthRecords/Form.js") From 2b954f83770045c8be2619962f9018dbafda1a20 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 23 Aug 2022 18:06:11 +0800 Subject: [PATCH 07/49] =?UTF-8?q?app2.0=20=E6=95=99=E5=B8=88=E8=AF=BE?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/TimeTable.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index fe3934459..8157c1b0d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -89,7 +89,7 @@ namespace Learun.Application.WebApi.Modules public Response GetStuLessonInfo(dynamic _) { var param = this.GetReqData(); - var lessonInfos = stuAttendanceIBLL.GetStuLessonInfo(userInfo.account,param.StartDate,param.EndDate); + var lessonInfos = stuAttendanceIBLL.GetStuLessonInfo(userInfo.account, param.StartDate, param.EndDate); var empNos = lessonInfos.Select(a => a.EmpNo).ToList(); var lessonTerms = arrangeLessonTermIBLL.GetListByEmpNo(empNos); @@ -223,10 +223,10 @@ namespace Learun.Application.WebApi.Modules else if (param.Description == "教师") { //教师 - var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == userInfo.account).FirstOrDefault().EmpNo; + var empInfo = empInfoIbll.GetAllList().Where(x => x.EmpNo == param.Account).FirstOrDefault().EmpNo; if (empInfo != null) { - Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.EmpNo, ""); + Data = arrangeLessonTermIBLL.GetTimeTableInEducation(param.StartDate, param.EndDate, "", param.Account, ""); } } From 4ec6b21af7c64827dd9524bb61d46db2d7953de7 Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 23 Aug 2022 18:26:16 +0800 Subject: [PATCH 08/49] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/FormApi.cs | 64 +++++++++++++++++++ .../Scheme/FormSchemeBLL.cs | 63 +++++++++++++++++- .../pages/nworkflow/releasetask/single.vue | 5 +- .../pages/nworkflow/workflow.js | 33 +++++++++- 4 files changed, 160 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs index a574ac806..4b5b15393 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs @@ -21,12 +21,47 @@ namespace Learun.Application.WebApi.Modules { Get["/scheme"] = GetScheme; Get["/data"] = GetData; + Get["/folderkey"] = GetFolderkey; Post["/save"] = Save; Post["/delete"] = DeleteForm; } private FormSchemeIBLL formSchemeIBLL = new FormSchemeBLL(); + + private Response GetFolderkey(dynamic _) + { + List req = this.GetReqData>();// 获取模板请求数据 + Dictionary schemeList = new Dictionary(); + Dictionary dic = new Dictionary(); + foreach (var item in req) + { + //FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id); + //if (schemeInfoEntity != null) + //{ + // FormSchemeEntity schemeEntity = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId); + // if (schemeEntity != null) + // { + // if (schemeInfoEntity.F_SchemeId != item.ver) + // { + // schemeList.Add(item.id, schemeEntity); + // } + // } + //} + if (string.IsNullOrEmpty(item.processIdName)) + { + var data = formSchemeIBLL.GetInstanceForm(item.schemeInfoId, item.keyValue); + dic.Add(item.schemeInfoId, data); + } + else + { + var data = formSchemeIBLL.GetInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue);// + dic.Add(item.schemeInfoId, data); + } + } + + return Success(schemeList); + } /// /// 获取表单模板数据 /// @@ -104,6 +139,35 @@ namespace Learun.Application.WebApi.Modules } #region 请求参数 + + private class FolderKeyReq + { + /// + /// 表单请求Id + /// + public string id { get; set; } + /// + /// 当前自定义表单版本号 + /// + public string ver { get; set; } + /// + /// 流程模板id + /// + public string schemeInfoId { get; set; } + /// + /// 关联字段名称 + /// + public string processIdName { get; set; } + /// + /// 数据主键值 + /// + public string keyValue { get; set; } + /// + /// 表单数据 + /// + public string formData { get; set; } + } + private class SchemeReq { /// /// 表单请求Id diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs index 1e3296b7e..cd910368d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs @@ -551,7 +551,68 @@ namespace Learun.Application.Form } } } - + + public Dictionary GetFolderKey(string schemeInfoId, string processIdName, string keyValue) + { + Dictionary res = new Dictionary(); + + try + { + FormSchemeInfoEntity formSchemeInfoEntity = GetSchemeInfoEntity(schemeInfoId); + FormSchemeEntity formSchemeEntity = GetSchemeEntity(formSchemeInfoEntity.F_SchemeId); + FormSchemeModel formSchemeModel = formSchemeEntity.F_Scheme.ToObject(); + + // 确定主从表之间的关系 + List> TableTree = new List>();// 从表 + foreach (var table in formSchemeModel.dbTable) + { + TreeModelEx treeone = new TreeModelEx(); + treeone.data = table; + treeone.id = table.name; + treeone.parentId = table.relationName; + if (string.IsNullOrEmpty(table.relationName)) + { + treeone.parentId = "0"; + } + TableTree.Add(treeone); + } + TableTree = TableTree.ToTree(); + + // 确定表与组件之间的关系 + Dictionary> tableComponts = new Dictionary>(); + foreach (var tab in formSchemeModel.data) + { + foreach (var compont in tab.componts) + { + if (!string.IsNullOrEmpty(compont.table)) + { + if (!tableComponts.ContainsKey(compont.table)) + { + tableComponts[compont.table] = new List(); + } + if (compont.type == "upload") + { + tableComponts[compont.table].Add(compont); + } + } + } + } + GetInstanceTableData(TableTree, tableComponts, formSchemeModel.dbId, keyValue, processIdName, null, res); + return res; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 保存自定义表单数据 /// diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue index cbe42cb02..59bd5647e 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue @@ -111,7 +111,8 @@ export default { this.needTitle = this.type !== 'again' && Number(currentNode.isTitle) === 1 const formData = await this.fetchFormData(currentNode, processId) - const schemeData = await this.fetchSchemeData(currentNode) + const schemeData = await this.fetchSchemeData(currentNode); + await this.fetchFolderkeyData(currentNode, processId); const { formValue, scheme, rel } = await this.getCustomForm({ schemeData, @@ -127,7 +128,7 @@ export default { this.formValue = formValue this.code = code this.processId = processId -console.log(this.formValue,'=====',this.scheme ,) + console.log(formData,'==',schemeData) this.ready = true this.HIDE_LOADING() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js index 54918f6f3..3d560ba81 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js @@ -259,13 +259,26 @@ export default { */ async getPostData(originFormValue, scheme) { const formValue = this.COPY(originFormValue) - var guid =this.newguid(); // 依次按照 scheme 项目遍历 for (const item of scheme) { if (item.field) { // 不是表格的情况 const path = item.__valuePath__ const val = get(formValue, path) + + if(item.type=='upload'){ + // 先生成一个guid + var guid =this.newguid(); + // 取出当前列对应的labelId + var labeId = item.id + // 从缓存取出当前审批流程所有的guid + var guids = JSON.parse(uni.getStorageSync('guids')) + if(guids){ + guid = guids[labeId] + } + } + // debugger + const result = await this.convertToPostData(item, val, originFormValue, scheme, guid) set(formValue, path, result) @@ -381,6 +394,22 @@ export default { const formData = await this.HTTP_GET('learun/adms/form/data', reqData) return formData || {} - } + }, + async fetchFolderkeyData(currentNode, keyValue) { + const { + wfForms + } = currentNode + + const reqData = wfForms + .filter(t => t.formId) + .map(t => ({ + id: t.formId, + ver: '', + schemeInfoId: t.formId, + processIdName: t.field, + keyValue + })) + const schemeData = await this.HTTP_GET('learun/adms/form/folderkey', reqData) + }, } } From 3fb0463555438f55e0288aa027206e6397a1c34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 24 Aug 2022 11:28:38 +0800 Subject: [PATCH 09/49] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/config.js | 6 +-- .../LearunApp-2.2.0/pages.json | 11 ++++- .../pages/LR_OAModule/noticeExamine.vue | 46 +++++++++++++++++++ 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index c0c228cb7..b0a6167c7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -21,10 +21,10 @@ export default { // "http://192.168.2.98:8088/" // ], "apiHost": [ - "http://localhost:31173/" - // "http://192.168.10.85:8088/" + // "http://localhost:31173/" + "http://192.168.10.58:8012/" ], - "webHost":"http://localhost:20472/", + "webHost":"http://192.168.10.58:20472/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index edc93d780..e3c1ac370 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -1008,7 +1008,16 @@ - ], + ,{ + "path" : "pages/LR_OAModule/noticeExamine", + "style" : + { + "navigationBarTitleText": "通知公告", + "enablePullDownRefresh": false + } + + } + ], // 全局样式 "globalStyle": { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue new file mode 100644 index 000000000..00d89e6e7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue @@ -0,0 +1,46 @@ + + + From 584b17e0035bab9bc886de78816e7c663022f879 Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 24 Aug 2022 11:43:06 +0800 Subject: [PATCH 10/49] =?UTF-8?q?app2.0=E9=99=84=E4=BB=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=94=AF=E6=8C=81=E8=8D=89=E7=A8=BF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/FormApi.cs | 29 +++-------------- .../Scheme/FormSchemeBLL.cs | 27 ++++++++++++++-- .../Scheme/FormSchemeIBLL.cs | 2 ++ .../pages/nworkflow/myflow/single.vue | 7 ++--- .../pages/nworkflow/releasetask/single.vue | 5 ++- .../pages/nworkflow/workflow.js | 31 +++++++++---------- 6 files changed, 52 insertions(+), 49 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs index 4b5b15393..0a2ac508e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FormApi.cs @@ -32,35 +32,16 @@ namespace Learun.Application.WebApi.Modules private Response GetFolderkey(dynamic _) { List req = this.GetReqData>();// 获取模板请求数据 - Dictionary schemeList = new Dictionary(); - Dictionary dic = new Dictionary(); + Dictionary dic = new Dictionary(); foreach (var item in req) { - //FormSchemeInfoEntity schemeInfoEntity = formSchemeIBLL.GetSchemeInfoEntity(item.id); - //if (schemeInfoEntity != null) - //{ - // FormSchemeEntity schemeEntity = formSchemeIBLL.GetSchemeEntity(schemeInfoEntity.F_SchemeId); - // if (schemeEntity != null) - // { - // if (schemeInfoEntity.F_SchemeId != item.ver) - // { - // schemeList.Add(item.id, schemeEntity); - // } - // } - //} - if (string.IsNullOrEmpty(item.processIdName)) - { - var data = formSchemeIBLL.GetInstanceForm(item.schemeInfoId, item.keyValue); - dic.Add(item.schemeInfoId, data); - } - else + if (!string.IsNullOrEmpty(item.processIdName)) { - var data = formSchemeIBLL.GetInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue);// - dic.Add(item.schemeInfoId, data); + var data = formSchemeIBLL.GetFolderKey(item.schemeInfoId, item.processIdName, item.keyValue);// + dic = data; } } - - return Success(schemeList); + return Success(dic); } /// /// 获取表单模板数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs index cd910368d..778209e76 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeBLL.cs @@ -552,7 +552,7 @@ namespace Learun.Application.Form } } - public Dictionary GetFolderKey(string schemeInfoId, string processIdName, string keyValue) + public Dictionary GetFolderKey(string schemeInfoId, string processIdName, string keyValue) { Dictionary res = new Dictionary(); @@ -594,11 +594,34 @@ namespace Learun.Application.Form { tableComponts[compont.table].Add(compont); } + if (compont.type == "guid") + { + tableComponts[compont.table].Add(compont); + } + } } } GetInstanceTableData(TableTree, tableComponts, formSchemeModel.dbId, keyValue, processIdName, null, res); - return res; + Dictionary < string,string> uploadfieldkeyvalue=new Dictionary(); + foreach (var itemCompont in tableComponts) + { + foreach (FormCompontModel formitem in itemCompont.Value) + { + if (formitem.type=="upload") + { + foreach (var resitem in res) + { + if (resitem.Value.Rows.Count>0) + { + if (resitem.Value.Rows[0][formitem.field] != null) + uploadfieldkeyvalue.Add(formitem.id, resitem.Value.Rows[0][formitem.field].ToString()); + } + } + } + } + } + return uploadfieldkeyvalue; } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs index 571d48c9d..72444597a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Scheme/FormSchemeIBLL.cs @@ -137,5 +137,7 @@ namespace Learun.Application.Form /// 数据主键值 void DeleteInstanceForm(string schemeInfoId, string keyValue); #endregion + + Dictionary GetFolderKey(string itemSchemeInfoId, string itemProcessIdName, string itemKeyValue); } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 3a505760c..4ac28bcab 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -95,7 +95,6 @@ export default { // t.formId 使用表单,根据这个 formId 来获取 scheme 等信息 // t.appurl 使用移动页面,直接跳转到本地的页面;表单结构等均写死在页面里 const { wfForms } = this.currentNode - // 处理没有有效表单的情况,停止加载 if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { this.HIDE_LOADING() @@ -197,7 +196,7 @@ export default { return } this.LOADING(`提交${actionText}中…`) - this.HTTP_POST(`/newwf${actionUrl}`, actionData, `提交${actionText}失败`).then(success => { + this.HTTP_POST(`/learun/adms/newwf${actionUrl}`, actionData, `提交${actionText}失败`).then(success => { this.HIDE_LOADING() if (success) { this.EMIT('task-list-change') @@ -216,7 +215,7 @@ export default { this.LOADING('正在提交…') const draftFormValue = this.$refs.form.getFormValue() const draftPostData = await this.getPostData(draftFormValue, this.scheme) - this.HTTP_POST('/newwf​/draft', draftPostData, '提交草稿失败').then(success => { + this.HTTP_POST('/learun/adms/newwf/draft', draftPostData, '提交草稿失败').then(success => { this.HIDE_LOADING() if (success) { this.EMIT('task-list-change') @@ -245,7 +244,7 @@ export default { postData.parentTaskId = this.taskId } const errorTips = '流程发起失败' - this.HTTP_POST('/newwf/createchildflow', postData, errorTips).then(success => { + this.HTTP_POST('/learun/adms/newwf/createchildflow', postData, errorTips).then(success => { this.HIDE_LOADING() if (success) { this.EMIT('task-list-change') diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue index 59bd5647e..f8269c91d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/releasetask/single.vue @@ -112,8 +112,8 @@ export default { const formData = await this.fetchFormData(currentNode, processId) const schemeData = await this.fetchSchemeData(currentNode); - await this.fetchFolderkeyData(currentNode, processId); - + const fetchFolderkeyData=await this.fetchFolderkeyData(currentNode, processId); + uni.setStorageSync('guids',JSON.stringify(fetchFolderkeyData)); const { formValue, scheme, rel } = await this.getCustomForm({ schemeData, processId, @@ -128,7 +128,6 @@ export default { this.formValue = formValue this.code = code this.processId = processId - console.log(formData,'==',schemeData) this.ready = true this.HIDE_LOADING() diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js index 3d560ba81..c9d2969d3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js @@ -135,7 +135,7 @@ export default { // 有表单值的情况,从表单值中获取数据 const val = [] for (const valueItem of get(formData, `${schemeItem.F_SchemeInfoId}.${t.table}`, - [])) { + [])) { const tableItemValue = {} for (const fieldItem of t.fieldsData.filter(t => t.field)) { const formDataValue = get(valueItem, fieldItem.field.toLowerCase()) @@ -243,13 +243,13 @@ export default { rel } }, - newguid(){ - return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16 | 0, - v = c == 'x' ? r : (r & 0x3 | 0x8); - return v.toString(16); - }); - }, + newguid() { + return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + }, /** * 获取最终需要 POST 的数据 * 参数:formValue, scheme @@ -265,20 +265,18 @@ export default { // 不是表格的情况 const path = item.__valuePath__ const val = get(formValue, path) - - if(item.type=='upload'){ + + if (item.type == 'upload') { // 先生成一个guid - var guid =this.newguid(); + var guid = this.newguid(); // 取出当前列对应的labelId var labeId = item.id // 从缓存取出当前审批流程所有的guid var guids = JSON.parse(uni.getStorageSync('guids')) - if(guids){ + if (guids) { guid = guids[labeId] } } - // debugger - const result = await this.convertToPostData(item, val, originFormValue, scheme, guid) set(formValue, path, result) @@ -399,7 +397,7 @@ export default { const { wfForms } = currentNode - + const reqData = wfForms .filter(t => t.formId) .map(t => ({ @@ -409,7 +407,8 @@ export default { processIdName: t.field, keyValue })) - const schemeData = await this.HTTP_GET('learun/adms/form/folderkey', reqData) + const folderkeyData = await this.HTTP_GET('learun/adms/form/folderkey', reqData) + return folderkeyData || {} }, } } From cd7c48d0186d806f3898e9d773fd7b5732636b7a Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 24 Aug 2022 14:05:26 +0800 Subject: [PATCH 11/49] =?UTF-8?q?app2.0=E6=A0=A1=E5=86=85=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/NewsApi.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index 9fa30d0a7..41a74b72c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -20,6 +20,7 @@ namespace Learun.Application.WebApi.Modules : base("/learun/news") { Get["/list"] = GetList; + Get["/shList"] = GetshList; } @@ -85,6 +86,24 @@ namespace Learun.Application.WebApi.Modules }; return Success(jsonData); } + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetshList(dynamic _) + { + NoticeEntity parameter = this.GetReqData(); + var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); + return Success(shlist); + } + #region 私有类 + + private class NoticeEntity + { + public string ProgressId { get; set; } + } + #endregion } From 9599aa3fe5d43d1938bbe4e06f63a1d892a4b061 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 24 Aug 2022 16:06:54 +0800 Subject: [PATCH 12/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=B8=88=E5=B7=A5=E4=BD=9C=E9=87=8F=EF=BC=9A=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Statistics/TeacherWorkload.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Statistics/TeacherWorkload.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Statistics/TeacherWorkload.js index 2f3b32d10..e7f78bba3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Statistics/TeacherWorkload.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Statistics/TeacherWorkload.js @@ -48,7 +48,11 @@ var bootstrap = function ($, learun) { { label: '教师编号', name: 'EmpNo', width: 100, align: "left" }, { label: '总课时', name: 'lessoncount', width: 90, align: "left" }, { label: '系数', name: 'coefficient', width: 100, align: "left" }, - { label: "工作量", name: "lessoncount", width: 100, align: "left" }, + { + label: "工作量", name: "lessoncount2", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + return callback(row.lessoncount); + } + }, ], mainId: 'EmpNo', }); From 3ac79611015da35416a6695a72c406f46c96751b Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 24 Aug 2022 16:21:33 +0800 Subject: [PATCH 13/49] =?UTF-8?q?=E5=85=B5=E5=BD=B9=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/MSRIntentionManagement/Form.cshtml | 8 ++++---- .../Views/MSRMilitaryRecord/Form.cshtml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRIntentionManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRIntentionManagement/Form.cshtml index 529532099..3affe03d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRIntentionManagement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRIntentionManagement/Form.cshtml @@ -4,12 +4,12 @@ }
-
联系方式
- +
联系方式*
+
-
年龄
- +
年龄*
+
身高
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRMilitaryRecord/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRMilitaryRecord/Form.cshtml index ab4f3d723..4b454669e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRMilitaryRecord/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/MSRMilitaryRecord/Form.cshtml @@ -4,8 +4,8 @@ }
-
参军记录
- +
参军记录*
+
备注
From 64f9cbcc1b47ec511841f1af29e4dc638ef822ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 24 Aug 2022 16:55:42 +0800 Subject: [PATCH 14/49] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/learun-app/upload-file.vue | 4 + .../pages/LR_OAModule/noticeExamine.vue | 198 ++++++++++++++++-- .../pages/nworkflow/myflow/single.vue | 3 +- 3 files changed, 187 insertions(+), 18 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue index 969f835be..158427de7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue @@ -106,6 +106,10 @@ export default { }, async fileClick(index) { + if(typeof this.value[index] == "string"){ + uni.previewImage({ urls: this.value.filter(item=>typeof this.value[index] == "string"), current: this.value[index] }) + return + } const { path, type, uid, size = 0 } = this.value[index] if (this.isImgFile(type)) { uni.previewImage({ urls: [path], current: path }) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue index 00d89e6e7..397fcc0df 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue @@ -1,12 +1,41 @@ @@ -16,31 +45,166 @@ import moment from 'moment' export default { data() { return { + tab:0, + type:'view', + currentNode:null, + currentTask:null, + taskId:'', + processId:'', + processInfo:null, + processList:[], + formData:{}, ready: false, content: '', + time: '', date: '' } }, - async onLoad() { - await this.init() + async onLoad({type}) { + await this.init(type) }, methods: { - async init() { + async init(type) { + if(type){this.type = type} this.LOADING('加载中…') const noticeItem = this.GET_PARAM() + this.processList = noticeItem.logList + this.currentNode = noticeItem.currentNode + this.currentTask = noticeItem.currentTask + this.processInfo = noticeItem.processInfo + this.taskId = this.currentTask.F_TaskId + this.processId = this.currentTask.F_Id + this.LOADING('加载数据中…') + await this.getFormData(this.processList[0].F_ProcessId) + this.HIDE_LOADING(); + + // this.content = this.CONVERT_HTML(noticeItem.f_content) - this.content = this.CONVERT_HTML(noticeItem.f_content) - - this.time = moment(noticeItem.f_time).format('HH : mm') - this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日') - this.SET_TITLE(noticeItem.f_title) - - this.ready = true - this.HIDE_LOADING() - } + // this.time = moment(noticeItem.f_time).format('HH : mm') + // this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日') + // this.SET_TITLE(noticeItem.f_title) + // this.HIDE_LOADING() + }, + // 获取表单数据 + getFormData(ProgressId){ + return this.HTTP_GET("learun/news/shList",{ProgressId},"加载数据时出错").then(res=>{ + if(res){ + this.formData = res + this.content = res.F_NewsContent + this.ready = true + } + }) + }, + + // 点击审批相关按钮 + async audit(action) { + this.LOADING('加载中…') + const currentTask = this.processInfo.task.find(t => t.F_NodeId === this.currentNode.id) + const postData = await this.getPostData(this.formValue, this.scheme) + const pageParam = { + type: 'sign', + processId: currentTask.F_ProcessId, + taskId: currentTask.F_Id, + formreq: postData.formreq, + taskName: this.currentTask.F_Title + } + // 不是加签 + if (action.code !== '__sign__') { + Object.assign(pageParam, action) + pageParam.type = 'verify' + pageParam.auditors = JSON.stringify({}) + pageParam.isFromSignAudit = Number(this.currentTask.F_TaskType) === 3 + } + this.HIDE_LOADING() + this.NAV_TO('/pages/nworkflow/myflow/sign', pageParam, true) + }, + // 点击操作按钮(非审批类按钮) + async action(taskType) { + switch (taskType) { + // 点击「催办」/「撤销流程」/「标记已阅」按钮 + case 'urge': + case 'revoke': + case 'refer': + const actionText = { urge: '催办', revoke: '撤销', refer: '已阅' }[taskType] + const actionUrl = { urge: '/urge', revoke: '/revoke', refer: '/refer' }[taskType] + + let actionData = this.processId + if (taskType === 'refer') { + actionData = { processId: this.processId, taskId: this.taskId } + } + + if (!(await this.CONFIRM(`${actionText}确认`, `确定要提交${actionText}吗?`, true))) { + return + } + this.LOADING(`提交${actionText}中…`) + this.HTTP_POST(`/newwf${actionUrl}`, actionData, `提交${actionText}失败`).then(success => { + this.HIDE_LOADING() + if (success) { + this.EMIT('task-list-change') + this.TOAST(`成功提交${actionText}`, 'success') + if (taskType === 'revoke') { + this.NAV_BACK() + } + } + }) + break + // 点击「提交草稿」按钮 + case 'draft': + this.CONFIRM('不支持此操作') + return + if (!(await this.CONFIRM('提交确认', '确定要提交草稿吗?', true))) { + return + } + this.LOADING('正在提交…') + const draftFormValue = this.$refs.form.getFormValue() + const draftPostData = await this.getPostData(draftFormValue, this.scheme) + this.HTTP_POST('/newwf​/draft', draftPostData, '提交草稿失败').then(success => { + this.HIDE_LOADING() + if (success) { + this.EMIT('task-list-change') + this.NAV_BACK() + this.TOAST('草稿已保存', 'success') + } + }) + break + // 点击「发起流程」按钮 + case 'submit': + this.CONFIRM('不支持此操作') + return + const verifyResult = this.$refs.form.verifyValue() + if (verifyResult.length > 0) { + this.CONFIRM('表单验证失败', verifyResult.join('\n')) + return + } + if (!(await this.CONFIRM('提交确认', '确定要发起流程吗?', true))) { + return + } + this.LOADING('正在提交…') + const formValue = this.$refs.form.getFormValue() + const postData = await this.getPostData(formValue, this.scheme) + postData.auditors = JSON.stringify({}) + + if (this.type === 'child') { + postData.parentProcessId = this.processId + postData.parentTaskId = this.taskId + } + const errorTips = '流程发起失败' + this.HTTP_POST('/newwf/createchildflow', postData, errorTips).then(success => { + this.HIDE_LOADING() + if (success) { + this.EMIT('task-list-change') + this.NAV_BACK() + this.TOAST('流程发起成功', 'success') + } + }) + break + default: + break + } + }, } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 565660754..46313e97d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -110,7 +110,8 @@ export default { this.sysFormJump(appSysPage.appurl, { currentNode: this.currentNode, currentTask: this.currentTask, - logList: this.processList + logList: this.processList, + processInfo:this.processInfo }) return } From f61ad81a76c4f68e1ba2c625b0b78c273d4a0546 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 24 Aug 2022 17:16:12 +0800 Subject: [PATCH 15/49] =?UTF-8?q?app2.0=E8=8E=B7=E5=8F=96=E6=A0=A1?= =?UTF-8?q?=E5=86=85=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Post/PostBLL.cs | 20 ++++++++++ .../Post/PostIBLL.cs | 3 ++ .../Post/PostService.cs | 28 +++++++++++++ .../Modules/NewsApi.cs | 39 ++++++++++++++++++- 4 files changed, 88 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostBLL.cs index aaa9ee915..a7150a410 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostBLL.cs @@ -3,6 +3,8 @@ using Learun.Cache.Factory; using Learun.Util; using System; using System.Collections.Generic; +using System.Linq; + namespace Learun.Application.Organization { /// @@ -515,6 +517,24 @@ namespace Learun.Application.Organization return res; } + public List GetAllList() + { + try + { + return postService.GetAllList().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostIBLL.cs index 84f4ffa02..306e04593 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostIBLL.cs @@ -94,5 +94,8 @@ namespace Learun.Application.Organization /// 级数 /// List GetDownIdList(string strPostIds, int level); + + List GetAllList(); + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostService.cs index 2b35797b9..4ae6a033d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Post/PostService.cs @@ -235,5 +235,33 @@ namespace Learun.Application.Organization } } } + + + /// + /// 获取部门列表信息(根据公司Id) + /// + /// + public IEnumerable GetAllList() + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM LR_BASE_POST t WHERE t.F_DeleteMark = 0 "); + return this.BaseRepository().FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index 41a74b72c..ccf065c4c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -8,6 +8,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop; using System.Text; using System.Data; using Learun.Application.OA; +using Learun.Application.Organization; namespace Learun.Application.WebApi.Modules { @@ -15,6 +16,8 @@ namespace Learun.Application.WebApi.Modules public class NewsApi : BaseApi { private NoticeIBLL noticeIBLL = new NoticeBLL(); + private DepartmentIBLL departmentIBLL = new DepartmentBLL(); + private PostIBLL postIBLL = new PostBLL(); public NewsApi() : base("/learun/news") @@ -33,7 +36,7 @@ namespace Learun.Application.WebApi.Modules { var userinfo = LoginUserInfo.Get(); Pagination paginationobj = new Pagination(); - var newsList = noticeIBLL.GetList("", userinfo.userId,(Request.Query["F_CategoryId"]!=null?Request.Query["F_CategoryId"].ToString():"")); + var newsList = noticeIBLL.GetList("", userinfo.userId, (Request.Query["F_CategoryId"] != null ? Request.Query["F_CategoryId"].ToString() : "")); var newsListOfSelf = new List(); foreach (var newsitemEntity in newsList) @@ -95,6 +98,38 @@ namespace Learun.Application.WebApi.Modules { NoticeEntity parameter = this.GetReqData(); var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); + //if (!shlist.F_SendDeptId.IsEmpty()) + //{ + var Array = shlist.F_SendPostId.Split(','); + var deept = departmentIBLL.GetAllList(); + foreach (var item in Array) + { + for (int i = 0; i < deept.Count; i++) + { + if (item == deept[i].F_CompanyId) + { + shlist.F_SendDeptId += deept[i].F_FullName + ","; + } + } + } + shlist.F_SendDeptId.Trim(','); + //} + //if (!shlist.F_SendDeptId.IsEmpty()) + //{ + var Array1 = shlist.F_SendPostId.Split(','); + var post = postIBLL.GetAllList(); + foreach (var item in Array1) + { + for (int i = 0; i < post.Count; i++) + { + if (item == post[i].F_CompanyId) + { + shlist.F_SendDeptId += post[i].F_Name + ","; + } + } + } + shlist.F_SendDeptId.Trim(','); + //} return Success(shlist); } #region 私有类 @@ -102,7 +137,7 @@ namespace Learun.Application.WebApi.Modules private class NoticeEntity { public string ProgressId { get; set; } - } + } #endregion } From aa4768e4dba3b71f214b6375ce65d200b1bad510 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 24 Aug 2022 17:42:13 +0800 Subject: [PATCH 16/49] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=8A=A1=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AF=84=E6=95=99?= =?UTF-8?q?=E8=AF=84=E5=AD=A6=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluateTeachLearnController.cs | 129 ++++++++++++++ .../Views/EvaluateTeachLearn/Form.cshtml | 27 +++ .../Views/EvaluateTeachLearn/Form.js | 67 ++++++++ .../Views/EvaluateTeachLearn/Index.cshtml | 48 ++++++ .../Views/EvaluateTeachLearn/Index.js | 118 +++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Learun.Application.Mapping.csproj | 1 + .../EvaluateTeachLearnMap.cs | 29 ++++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../EvaluateTeachLearnBLL.cs | 125 ++++++++++++++ .../EvaluateTeachLearnEntity.cs | 90 ++++++++++ .../EvaluateTeachLearnIBLL.cs | 48 ++++++ .../EvaluateTeachLearnService.cs | 161 ++++++++++++++++++ 13 files changed, 852 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EvaluateTeachLearnController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/EvaluateTeachLearnMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EvaluateTeachLearnController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EvaluateTeachLearnController.cs new file mode 100644 index 000000000..b5e05a0a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EvaluateTeachLearnController.cs @@ -0,0 +1,129 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public class EvaluateTeachLearnController : MvcControllerBase + { + private EvaluateTeachLearnIBLL evaluateTeachLearnIBLL = new EvaluateTeachLearnBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = evaluateTeachLearnIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var EvaluateTeachLearnData = evaluateTeachLearnIBLL.GetEvaluateTeachLearnEntity( keyValue ); + var jsonData = new { + EvaluateTeachLearn = EvaluateTeachLearnData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + evaluateTeachLearnIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + EvaluateTeachLearnEntity entity = strEntity.ToObject(); + + var loginUserInfo = LoginUserInfo.Get(); + if (string.IsNullOrEmpty(keyValue)) + { + entity.CreateUserId = loginUserInfo.userId; + entity.CreateTime = DateTime.Now; + } + else + { + entity.ModifyUserId = loginUserInfo.userId; + entity.ModifyTime = DateTime.Now; + } + + evaluateTeachLearnIBLL.SaveEntity(keyValue,entity); + + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.cshtml new file mode 100644 index 000000000..1acd9e81a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "评教评学"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
教师*
+
+
+
+
学年*
+
+
+
+
学期*
+
+
+
+
满意率*
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js new file mode 100644 index 000000000..c4f192e60 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Form.js @@ -0,0 +1,67 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-24 14:38 + * 描 述:评教评学 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.cshtml new file mode 100644 index 000000000..0dc25ea5b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "评教评学"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
教师
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
满意率
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.js new file mode 100644 index 000000000..c68191380 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EvaluateTeachLearn/Index.js @@ -0,0 +1,118 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-24 14:38 + * 描 述:评教评学 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/GetPageList', + headData: [ + { label: "教师", name: "EmpNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + }}, + { label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, + { label: "学期", name: "Semester", width: 100, align: "left"}, + { label: "满意率", name: "SatisfacteRate", width: 100, align: "left"}, + { label: "备注", name: "Remark", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 3326e43ef..98b6ca768 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -861,6 +861,7 @@ + @@ -6845,6 +6846,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 879d37b91..d7a867732 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -618,6 +618,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/EvaluateTeachLearnMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/EvaluateTeachLearnMap.cs new file mode 100644 index 000000000..9f09b53da --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/EvaluateTeachLearnMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public class EvaluateTeachLearnMap : EntityTypeConfiguration + { + public EvaluateTeachLearnMap() + { + #region 表、主键 + //表 + this.ToTable("EVALUATETEACHLEARN"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index e917e5a8f..c05639fbf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1898,6 +1898,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnBLL.cs new file mode 100644 index 000000000..26860100c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public class EvaluateTeachLearnBLL : EvaluateTeachLearnIBLL + { + private EvaluateTeachLearnService evaluateTeachLearnService = new EvaluateTeachLearnService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return evaluateTeachLearnService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取EvaluateTeachLearn表实体数据 + /// + /// 主键 + /// + public EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(string keyValue) + { + try + { + return evaluateTeachLearnService.GetEvaluateTeachLearnEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + evaluateTeachLearnService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, EvaluateTeachLearnEntity entity) + { + try + { + evaluateTeachLearnService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnEntity.cs new file mode 100644 index 000000000..2f31c025f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnEntity.cs @@ -0,0 +1,90 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public class EvaluateTeachLearnEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// EmpNo + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// AcademicYearNo + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// SatisfacteRate + /// + [Column("SATISFACTERATE")] + public string SatisfacteRate { get; set; } + /// + /// Remark + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// ModifyUserId + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnIBLL.cs new file mode 100644 index 000000000..51bb08de6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public interface EvaluateTeachLearnIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取EvaluateTeachLearn表实体数据 + /// + /// 主键 + /// + EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, EvaluateTeachLearnEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnService.cs new file mode 100644 index 000000000..16372de3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EvaluateTeachLearn/EvaluateTeachLearnService.cs @@ -0,0 +1,161 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-24 14:38 + /// 描 述:评教评学 + /// + public class EvaluateTeachLearnService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM EvaluateTeachLearn t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["SatisfacteRate"].IsEmpty()) + { + dp.Add("SatisfacteRate", "%" + queryParam["SatisfacteRate"].ToString() + "%", DbType.String); + strSql.Append(" AND t.SatisfacteRate Like @SatisfacteRate "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取EvaluateTeachLearn表实体数据 + /// + /// 主键 + /// + public EvaluateTeachLearnEntity GetEvaluateTeachLearnEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, EvaluateTeachLearnEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} From 47527aa1d31a2aabb8034acc5fee8857abec202b Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 24 Aug 2022 18:15:03 +0800 Subject: [PATCH 17/49] =?UTF-8?q?app2.0=20=E6=A0=A1=E5=86=85=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/NewsApi.cs | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index ccf065c4c..d932ff6aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -98,38 +98,43 @@ namespace Learun.Application.WebApi.Modules { NoticeEntity parameter = this.GetReqData(); var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); - //if (!shlist.F_SendDeptId.IsEmpty()) - //{ - var Array = shlist.F_SendPostId.Split(','); - var deept = departmentIBLL.GetAllList(); - foreach (var item in Array) + if (!shlist.F_SendDeptId.IsEmpty()) { - for (int i = 0; i < deept.Count; i++) + var Array = shlist.F_SendDeptId.Split(','); + var deept = departmentIBLL.GetAllList(); + var SendDeptId = ""; + foreach (var item in Array) { - if (item == deept[i].F_CompanyId) + + for (int i = 0; i < deept.Count; i++) { - shlist.F_SendDeptId += deept[i].F_FullName + ","; + if (item == deept[i].F_DepartmentId) + { + SendDeptId += deept[i].F_FullName + ","; + } } } + SendDeptId.Trim(','); + shlist.F_SendDeptId = SendDeptId; } - shlist.F_SendDeptId.Trim(','); - //} - //if (!shlist.F_SendDeptId.IsEmpty()) - //{ - var Array1 = shlist.F_SendPostId.Split(','); - var post = postIBLL.GetAllList(); - foreach (var item in Array1) + if (!shlist.F_SendPostId.IsEmpty()) { - for (int i = 0; i < post.Count; i++) + var Array1 = shlist.F_SendPostId.Split(','); + var post = postIBLL.GetAllList(); + var F_SendPostId = ""; + foreach (var item in Array1) { - if (item == post[i].F_CompanyId) + for (int i = 0; i < post.Count; i++) { - shlist.F_SendDeptId += post[i].F_Name + ","; + if (item == post[i].F_PostId) + { + F_SendPostId += post[i].F_Name + ","; + } } } + F_SendPostId.Trim(','); + shlist.F_SendPostId = F_SendPostId; } - shlist.F_SendDeptId.Trim(','); - //} return Success(shlist); } #region 私有类 From cf83f0f2f80f1716b6ce4f138671ffb1907fc3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 24 Aug 2022 18:28:03 +0800 Subject: [PATCH 18/49] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/nworkflow/myflow/single.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 9af5f9fd6..01ebc7b77 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -101,6 +101,9 @@ export default { this.TOAST('移动表单数据(wfForms)中无有效表单') return } + + const fetchFolderkeyData=await this.fetchFolderkeyData(this.currentNode , this.processId); + uni.setStorageSync('guids',JSON.stringify(fetchFolderkeyData)); // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 const appSysPage = wfForms.find(t => t.appurl) From 786a91988f6f24f3582d4f57eb03fd2ca4d8de99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=A4=20=E6=A2=81?= Date: Wed, 24 Aug 2022 21:22:43 +0800 Subject: [PATCH 19/49] =?UTF-8?q?=E9=99=84=E4=BB=B6=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js | 4 ++-- .../LearunApp-2.2.0/pages/nworkflow/workflow.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index b0a6167c7..01eebb620 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -22,9 +22,9 @@ export default { // ], "apiHost": [ // "http://localhost:31173/" - "http://192.168.10.58:8012/" + "http://cyzjzx.gnway.cc:30626/" ], - "webHost":"http://192.168.10.58:20472/", + "webHost":"http://cyzjzx.gnway.cc:29618/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js index c9d2969d3..d53429cf3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/workflow.js @@ -273,7 +273,7 @@ export default { var labeId = item.id // 从缓存取出当前审批流程所有的guid var guids = JSON.parse(uni.getStorageSync('guids')) - if (guids) { + if (guids&&JSON.stringify(guids)!=='{}') { guid = guids[labeId] } } From 17907e5d9d55000a96f9ef18b858a34a7db3feeb Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 25 Aug 2022 11:59:31 +0800 Subject: [PATCH 20/49] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=8A=A1=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E5=B7=A1=E6=9F=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ClassPatrolController.cs | 127 ++++++++++++++ .../Views/ClassPatrol/Form.cshtml | 31 ++++ .../Views/ClassPatrol/Form.js | 52 ++++++ .../Views/ClassPatrol/Index.cshtml | 44 +++++ .../Views/ClassPatrol/Index.js | 114 +++++++++++++ .../Learun.Application.Web.csproj | 5 + .../Learun.Application.Mapping.csproj | 1 + .../PersonnelManagement/ClassPatrolMap.cs | 29 ++++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../ClassPatrol/ClassPatrolBLL.cs | 125 ++++++++++++++ .../ClassPatrol/ClassPatrolEntity.cs | 95 +++++++++++ .../ClassPatrol/ClassPatrolIBLL.cs | 48 ++++++ .../ClassPatrol/ClassPatrolService.cs | 156 ++++++++++++++++++ 13 files changed, 831 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ClassPatrolController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ClassPatrolMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ClassPatrolController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ClassPatrolController.cs new file mode 100644 index 000000000..c36aa4d20 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ClassPatrolController.cs @@ -0,0 +1,127 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public class ClassPatrolController : MvcControllerBase + { + private ClassPatrolIBLL classPatrolIBLL = new ClassPatrolBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = classPatrolIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var ClassPatrolData = classPatrolIBLL.GetClassPatrolEntity( keyValue ); + var jsonData = new { + ClassPatrol = ClassPatrolData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + classPatrolIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + ClassPatrolEntity entity = strEntity.ToObject(); + var loginUserInfo = LoginUserInfo.Get(); + if (string.IsNullOrEmpty(keyValue)) + { + entity.CreateUserId = loginUserInfo.userId; + entity.CreateTime = DateTime.Now; + } + else + { + entity.ModifyUserId = loginUserInfo.userId; + entity.ModifyTime = DateTime.Now; + } + classPatrolIBLL.SaveEntity(keyValue,entity); + + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.cshtml new file mode 100644 index 000000000..7f9494209 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.cshtml @@ -0,0 +1,31 @@ +@{ + ViewBag.Title = "课堂巡查"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
时间*
+ +
+
+
课节*
+ +
+
+
教师*
+
+
+
+
科目*
+
+
+
+
情况记载
+ +
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ClassPatrol/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.js new file mode 100644 index 000000000..cb3587702 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Form.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-25 11:16 + * 描 述:课堂巡查 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo',value: 'lessonno',text: 'lessonname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ClassPatrol/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ClassPatrol/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.cshtml new file mode 100644 index 000000000..cdcbc5736 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "课堂巡查"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
课节
+ +
+
+
教师
+
+
+
+
科目
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ClassPatrol/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.js new file mode 100644 index 000000000..c14bfe9c6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ClassPatrol/Index.js @@ -0,0 +1,114 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-25 11:16 + * 描 述:课堂巡查 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo',value: 'lessonno',text: 'lessonname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/ClassPatrol/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/ClassPatrol/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ClassPatrol/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/ClassPatrol/GetPageList', + headData: [ + { label: "时间", name: "Time", width: 100, align: "left"}, + { label: "课节", name: "Section", width: 100, align: "left"}, + { label: "教师", name: "EmpNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + }}, + { label: "科目", name: "LessonNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: value, + keyId: 'lessonno', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + }}, + { label: "情况记载", name: "Records", width: 100, align: "left"}, + { label: "备注", name: "Remark", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 98b6ca768..1983cf9b0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -862,6 +862,7 @@ + @@ -6850,6 +6851,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index d7a867732..df0c8d071 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -619,6 +619,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ClassPatrolMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ClassPatrolMap.cs new file mode 100644 index 000000000..619a5860d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ClassPatrolMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public class ClassPatrolMap : EntityTypeConfiguration + { + public ClassPatrolMap() + { + #region 表、主键 + //表 + this.ToTable("CLASSPATROL"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index c05639fbf..71832bee7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1902,6 +1902,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolBLL.cs new file mode 100644 index 000000000..4e7670a51 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public class ClassPatrolBLL : ClassPatrolIBLL + { + private ClassPatrolService classPatrolService = new ClassPatrolService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return classPatrolService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取ClassPatrol表实体数据 + /// + /// 主键 + /// + public ClassPatrolEntity GetClassPatrolEntity(string keyValue) + { + try + { + return classPatrolService.GetClassPatrolEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + classPatrolService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, ClassPatrolEntity entity) + { + try + { + classPatrolService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolEntity.cs new file mode 100644 index 000000000..db57cf084 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolEntity.cs @@ -0,0 +1,95 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public class ClassPatrolEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 时间 + /// + [Column("TIME")] + public DateTime? Time { get; set; } + /// + /// 课节 + /// + [Column("SECTION")] + public string Section { get; set; } + /// + /// 教师 + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 科目 + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// 情况记载 + /// + [Column("RECORDS")] + public string Records { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// ModifyUserId + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolIBLL.cs new file mode 100644 index 000000000..71b222941 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public interface ClassPatrolIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取ClassPatrol表实体数据 + /// + /// 主键 + /// + ClassPatrolEntity GetClassPatrolEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, ClassPatrolEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolService.cs new file mode 100644 index 000000000..e68f45e00 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ClassPatrol/ClassPatrolService.cs @@ -0,0 +1,156 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-25 11:16 + /// 描 述:课堂巡查 + /// + public class ClassPatrolService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM ClassPatrol t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Section"].IsEmpty()) + { + dp.Add("Section", "%" + queryParam["Section"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Section Like @Section "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo",queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取ClassPatrol表实体数据 + /// + /// 主键 + /// + public ClassPatrolEntity GetClassPatrolEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, ClassPatrolEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} From a470995efec9de268c88cc0178ee65852a807249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 25 Aug 2022 12:01:35 +0800 Subject: [PATCH 21/49] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=20?= =?UTF-8?q?=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/config.js | 4 +- .../pages/LR_OAModule/noticeExamine.vue | 8 ++- .../pages/nworkflow/myflow/single.vue | 53 +++++++++++++++---- 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index b0a6167c7..62011147b 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -24,11 +24,11 @@ export default { // "http://localhost:31173/" "http://192.168.10.58:8012/" ], - "webHost":"http://192.168.10.58:20472/", + "webHost":"http://192.168.10.58:8009/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 - { username: "system", password: "www.qj.com" } + { username: "42052819780120143x", password: "www.qj.com" } ], //是否分布式部署 指WebApi与Web不在一台服务器 "isDistributed":true, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue index 397fcc0df..cdfc9ef60 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LR_OAModule/noticeExamine.vue @@ -22,6 +22,9 @@ + + + import moment from 'moment' +import workflowFormMixins from '@/pages/nworkflow/workflow.js' export default { + mixins: [workflowFormMixins], data() { return { tab:0, @@ -77,7 +82,8 @@ export default { this.processInfo = noticeItem.processInfo this.taskId = this.currentTask.F_TaskId this.processId = this.currentTask.F_Id - this.LOADING('加载数据中…') + this.formValue = noticeItem.formValue + this.scheme = noticeItem.scheme await this.getFormData(this.processList[0].F_ProcessId) this.HIDE_LOADING(); diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue index 01ebc7b77..0a42f97a7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/nworkflow/myflow/single.vue @@ -105,17 +105,18 @@ export default { const fetchFolderkeyData=await this.fetchFolderkeyData(this.currentNode , this.processId); uni.setStorageSync('guids',JSON.stringify(fetchFolderkeyData)); - // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 - const appSysPage = wfForms.find(t => t.appurl) - if (this.type !== 'child' && appSysPage) { - this.sysFormJump(appSysPage.appurl, { - currentNode: this.currentNode, - currentTask: this.currentTask, - logList: this.processList, - processInfo:this.processInfo - }) - return - } + // // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 + // const appSysPage = wfForms.find(t => t.appurl) + // if (this.type !== 'child' && appSysPage) { + // this.sysFormJump(appSysPage.appurl, { + // currentNode: this.currentNode, + // currentTask: this.currentTask, + // logList: this.processList, + // processInfo:this.processInfo + // }) + // return + // } + if (this.type === 'child') { // 发起子流程的场合 // 获取子流程的流程信息,提取出时间线和表单模板 code @@ -146,6 +147,21 @@ export default { code: this.code, useDefault: true }) + + // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 + const appSysPage = wfForms.find(t => t.appurl) + if (this.type !== 'child' && appSysPage) { + this.sysFormJump(appSysPage.appurl, { + currentNode: this.currentNode, + currentTask: this.currentTask, + logList: this.processList, + processInfo:this.processInfo, + formValue, + scheme, + }) + return + } + this.scheme = scheme this.formValue = formValue this.rel = rel @@ -160,6 +176,21 @@ export default { processId: this.processId, code: null }) + + // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 + const appSysPage = wfForms.find(t => t.appurl) + if (this.type !== 'child' && appSysPage) { + this.sysFormJump(appSysPage.appurl, { + currentNode: this.currentNode, + currentTask: this.currentTask, + logList: this.processList, + processInfo:this.processInfo, + formValue, + scheme, + }) + return + } + this.scheme = scheme this.formValue = formValue this.rel = rel From 7bd4bb1e53c538ff9978fde2f785b4210f519d9c Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 25 Aug 2022 17:32:18 +0800 Subject: [PATCH 22/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.cshtml | 35 ++++++++++++- .../Views/StuInfoBasic/Index.js | 9 +++- .../StuInfoBasic/StuInfoBasicService.cs | 51 +++++++++++++++++++ 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index a0018022b..a9455599d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -38,10 +38,43 @@
民族
-
+
身份证号
+
+
审核状态
+
+
+
+
学生编号
+ +
+
+
学籍号
+ +
+
+
政治面貌
+
+
+
+
学制
+
+
+
+
身体状态
+
+
+
+
学习形式
+
+
+
+
上传照片
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index 2575064cb..957ab2b27 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -10,7 +10,7 @@ var bootstrap = function ($, learun) { bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); - }, 300, 400); + }, 450, 400); $('#DeptNo').lrselect({ allowSearch: true, value: "deptno", @@ -70,6 +70,13 @@ var bootstrap = function ($, learun) { $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); $('#FiveYear').lrDataItemSelect({ code: 'PieceCultivateWay' }); + $('#CheckMark').lrselect({ data: [{ id: '1', text: '已审核' }, { id: '0', text: '未审核' }] }); + $('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus' }); + $('#EduSystem').lrDataItemSelect({ code: 'EduSystem' }); + $('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' }); + $('#StudyModality').lrDataItemSelect({ code: 'StudyModality' }); + $('#Photo').lrselect({ data: [{ id: '1', text: '是' }, { id: '0', text: '否' }] }); + // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index d71341038..e2b8631b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -103,6 +103,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Remark", "%" + queryParam["Remark"].ToString() + "%", DbType.String); strSql.Append(" AND t.Remark Like @Remark "); } + + if (!queryParam["CheckMark"].IsEmpty()) + { + dp.Add("CheckMark", "" + queryParam["CheckMark"].ToString() + "", DbType.String); + if (queryParam["CheckMark"].ToString() == "1") + { + strSql.Append(" AND t.CheckMark=@CheckMark "); + } + else + { + strSql.Append(" AND (t.CheckMark is null or t.CheckMark='0') "); + } + } + if (!queryParam["StuCode"].IsEmpty()) + { + dp.Add("StuCode", "%" + queryParam["StuCode"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuCode Like @StuCode "); + } + if (!queryParam["PartyFaceNo"].IsEmpty()) + { + dp.Add("PartyFaceNo", "" + queryParam["PartyFaceNo"].ToString() + "", DbType.String); + strSql.Append(" AND t.PartyFaceNo = @PartyFaceNo "); + } + if (!queryParam["EduSystem"].IsEmpty()) + { + dp.Add("EduSystem", "" + queryParam["EduSystem"].ToString() + "", DbType.String); + strSql.Append(" AND t.EduSystem = @EduSystem "); + } + if (!queryParam["HealthStatus"].IsEmpty()) + { + dp.Add("HealthStatus", "" + queryParam["HealthStatus"].ToString() + "", DbType.String); + strSql.Append(" AND t.HealthStatus = @HealthStatus "); + } + if (!queryParam["StudyModality"].IsEmpty()) + { + dp.Add("StudyModality", "" + queryParam["StudyModality"].ToString() + "", DbType.String); + strSql.Append(" AND t.StudyModality = @StudyModality "); + } + + if (!queryParam["Photo"].IsEmpty()) + { + dp.Add("Photo", "" + queryParam["Photo"].ToString() + "", DbType.String); + if (queryParam["Photo"].ToString() == "1") + { + strSql.Append(" AND t.Photo is not null "); + } + else + { + strSql.Append(" AND t.Photo is null "); + } + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) From e4c6bc529a8d8b8ff535f762b47f2f01ec345ddb Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 25 Aug 2022 18:02:44 +0800 Subject: [PATCH 23/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=EF=BC=9A=E5=90=8C=E6=AD=A5=E7=85=A7=E7=89=87?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.cshtml | 4 +- .../StuInfoBasic/StuInfoBasicService.cs | 61 ++++++++++--------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index a9455599d..ee33a818c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -71,7 +71,7 @@
-
上传照片
+
是否有照片
@@ -95,7 +95,7 @@  审核全部  生成帐号  更新帐号 - @* 同步照片*@ +  同步照片  查看异动  拍照  学生简历表 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index e2b8631b6..8eb9af102 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -498,13 +498,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var url = AppDomain.CurrentDomain.BaseDirectory; foreach (var stuInfo in stuList) { - //照片不为空 - if (!string.IsNullOrEmpty(stuInfo.Photo)) + //判断要上传的照片在本地服务器中是否存在 + var photoPath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; + if (System.IO.File.Exists(photoPath)) { - var annex = this.BaseRepository() - .FindEntity(a => a.F_FolderId == stuInfo.Photo); - if (annex == null) + //学籍表中照片字段不为空 + if (!string.IsNullOrEmpty(stuInfo.Photo)) { + var annex = this.BaseRepository() + .FindEntity(a => a.F_FolderId == stuInfo.Photo); + if (annex == null) + { + var annexEntity = new AnnexesFileEntity() + { + F_Id = Guid.NewGuid().ToString(), + F_FileName = stuInfo.IdentityCardNo + ".jpg", + F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", + F_FolderId = stuInfo.Photo + }; + this.BaseRepository().Insert(annexEntity); + + } + else + { + annex.F_FileName = stuInfo.IdentityCardNo + ".jpg"; + annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; + this.BaseRepository().Update(annex); + } + } + else + { + stuInfo.Photo = Guid.NewGuid().ToString(); + var annexEntity = new AnnexesFileEntity() { F_Id = Guid.NewGuid().ToString(), @@ -512,32 +537,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", F_FolderId = stuInfo.Photo }; + annexEntity.Create(); + this.BaseRepository("CollegeMIS").Update(stuInfo); this.BaseRepository().Insert(annexEntity); - - } - else - { - annex.F_FileName = stuInfo.IdentityCardNo + ".jpg"; - annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg"; - this.BaseRepository().Update(annex); } } - else - { - stuInfo.Photo = Guid.NewGuid().ToString(); - - var annexEntity = new AnnexesFileEntity() - { - F_Id = Guid.NewGuid().ToString(), - F_FileName = stuInfo.IdentityCardNo + ".jpg", - F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg", - F_FolderId = stuInfo.Photo - }; - annexEntity.Create(); - this.BaseRepository("CollegeMIS").Update(stuInfo); - this.BaseRepository().Insert(annexEntity); - } - + } } catch (Exception ex) From 75f645785c732e10bb0610304065d67c4e6a54bb Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 26 Aug 2022 10:33:02 +0800 Subject: [PATCH 24/49] =?UTF-8?q?app2.0=20=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E9=98=85?= =?UTF-8?q?=E8=AF=BB=E8=AE=B0=E5=BD=95=E4=B8=8D=E7=B4=AF=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/NewsApi.cs | 36 ++++++++++++++++++- .../LearunApp-2.2.0/pages/home/notice.vue | 6 ++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index d932ff6aa..5027aaa9e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -9,6 +9,7 @@ using System.Text; using System.Data; using Learun.Application.OA; using Learun.Application.Organization; +using System; namespace Learun.Application.WebApi.Modules { @@ -18,12 +19,15 @@ namespace Learun.Application.WebApi.Modules private NoticeIBLL noticeIBLL = new NoticeBLL(); private DepartmentIBLL departmentIBLL = new DepartmentBLL(); private PostIBLL postIBLL = new PostBLL(); + private LR_OA_NewsReadIBLL lR_OA_NewsReadIBLL = new LR_OA_NewsReadBLL(); public NewsApi() : base("/learun/news") { Get["/list"] = GetList; Get["/shList"] = GetshList; + + Post["/newsRead"] = NewsRead; } @@ -137,11 +141,41 @@ namespace Learun.Application.WebApi.Modules } return Success(shlist); } - #region 私有类 + /// + /// 阅读通知公告 + /// 主键 + /// + /// + public Response NewsRead(dynamic _) + { + var loginUserInfo = LoginUserInfo.Get(); + NoticeEntity parameter = this.GetReqData(); + + //判断当前用户是否阅读当前通知公告 + var entity = lR_OA_NewsReadIBLL.GetLR_OA_NewsReadEntityByNewsIdAndUserId(parameter.newsId, loginUserInfo.userId); + if (entity == null) + { + var lR_OA_NewsRead = new LR_OA_NewsReadEntity() + { + NewsId = parameter.newsId, + RUserId = loginUserInfo.userId, + RUserName = loginUserInfo.realName, + RTime = DateTime.Now + }; + lR_OA_NewsReadIBLL.SaveEntity("", lR_OA_NewsRead); + + //修改当前通知公告的浏览量 + lR_OA_NewsReadIBLL.UpdateNewsPV(parameter.newsId); + } + + return Success("阅读成功!"); + } + #region 私有类 private class NoticeEntity { public string ProgressId { get; set; } + public string newsId { get; set; } } #endregion diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue index 00d89e6e7..7bd17e8f3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/home/notice.vue @@ -31,15 +31,17 @@ export default { async init() { this.LOADING('加载中…') const noticeItem = this.GET_PARAM() - this.content = this.CONVERT_HTML(noticeItem.f_content) - this.time = moment(noticeItem.f_time).format('HH : mm') this.date = moment(noticeItem.f_time).format('YYYY年 M月 D日') this.SET_TITLE(noticeItem.f_title) this.ready = true this.HIDE_LOADING() + let _postData = { + newsId: noticeItem.f_id, + } + this.HTTP_POST('learun/news/newsRead',_postData, '加载数据时出错'); } } } From 55731502ac262fd2c54fd3b244c788dd0437a63c Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 26 Aug 2022 10:34:41 +0800 Subject: [PATCH 25/49] --- .../Learun.Application.WebApi/Modules/NewsApi.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index 5027aaa9e..30966dbde 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -144,7 +144,6 @@ namespace Learun.Application.WebApi.Modules /// /// 阅读通知公告 - /// 主键 /// /// public Response NewsRead(dynamic _) From 6d87a72c41082fb323ab9b8b2d5f4fab3d638951 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 26 Aug 2022 14:46:58 +0800 Subject: [PATCH 26/49] =?UTF-8?q?app2.0=20=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=80=BC=E7=8F=AD=E5=AE=89=E6=8E=92=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonnelManagement/DutyScheduleApi.cs | 77 ++++++++++++++++++- .../DutySchedule/DutyScheduleBLL.cs | 22 ++++++ .../DutySchedule/DutyScheduleIBLL.cs | 6 ++ .../DutySchedule/DutyScheduleService.cs | 39 +++++++--- 4 files changed, 132 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/DutyScheduleApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/DutyScheduleApi.cs index 54b0d5975..a18aaaf04 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/DutyScheduleApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/DutyScheduleApi.cs @@ -1,4 +1,5 @@ -using Nancy; +using System; +using Nancy; using Learun.Util; using System.Collections.Generic; using Learun.Application.TwoDevelopment.EducationalAdministration; @@ -21,9 +22,13 @@ namespace Learun.Application.WebApi.Modules /// 注册接口 /// public DutyScheduleApi() - : base("/Learun/adms/PersonnelManagement/DutySchedule") + : base("/learun/adms/PersonnelManagement/DutySchedule") { Get["/pagelist"] = GetPageList; + Get["/list"] = GetList; + Get["/form"] = GetForm; + Post["/save"] = SaveForm; + Post["/delete"] = DeleteForm; } #region 获取数据 @@ -45,6 +50,74 @@ namespace Learun.Application.WebApi.Modules }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// + /// + public Response GetList(dynamic _) + { + string queryJson = this.GetReqData(); + var data = dutyScheduleIBLL.GetList(); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + /// + public Response GetForm(dynamic _) + { + string keyValue = this.GetReqData(); + var ScheduleData = dutyScheduleIBLL.GetDutyScheduleEntity(keyValue); + //ScheduleData.StartTime = Convert.ToDateTime((ScheduleData.StartTime.ToDate().ToString("yyyy-MM-dd") + " " + ScheduleData.StartTime.Substring(0, 2) + ":" + ScheduleData.StartTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm")); + //ScheduleData.EndTime = Convert.ToDateTime((ScheduleData.EndTime.ToDate().ToString("yyyy-MM-dd") + " " + ScheduleData.EndTime.Substring(0, 2) + ":" + ScheduleData.F_EndTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm")); + var jsonData = new + { + Schedule = ScheduleData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + /// + /// 保存实体数据(新增、修改) + /// + /// + /// + public Response SaveForm(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + DutyScheduleEntity entity = parameter.strEntity.ToObject(); + dutyScheduleIBLL.SaveEntity(parameter.keyValue, entity); + return Success("保存成功!"); + } + + + /// + /// 删除实体数据 + /// + /// + /// + public Response DeleteForm(dynamic _) + { + string keyValue = this.GetReqData(); + dutyScheduleIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + #endregion + + #region 私有类 + /// + /// 表单实体类 + /// + private class ReqFormEntity + { + public string keyValue { get; set; } + public string strEntity { get; set; } + } #endregion } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs index 45ae9380c..736a0b307 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs @@ -66,6 +66,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取列表 + /// + /// 返回列表 + public IEnumerable GetList() + { + try + { + return dutyScheduleService.GetList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs index a3120c615..4b456ae07 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs @@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// DutyScheduleEntity GetDutyScheduleEntity(string keyValue); + /// + /// 获取所有数据 + /// + /// + IEnumerable GetList(); + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs index c660b036e..a295a2b01 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs @@ -28,21 +28,16 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { + var adms = this.BaseRepository().getDbConnection().Database; var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.StartTime, - t.EndTime, - t.Person, - t.Remark,u.F_Account,F_RealName - "); - strSql.Append(" FROM DutySchedule t left join adms7ultimate2.dbo.LR_Base_User u on t.Person=u.F_UserId "); + strSql.Append(@" t.* ,u.F_Account,F_RealName "); + strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -81,6 +76,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取列表 + /// + /// 返回列表 + public IEnumerable GetList() + { + try + { + var adms = this.BaseRepository().getDbConnection().Database; + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.*, u.F_Account,F_RealName "); + strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + throw; + else + throw ExceptionEx.ThrowServiceException(ex); + } + } #endregion #region 提交数据 @@ -94,7 +112,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement { try { - this.BaseRepository("CollegeMIS").Delete(t=>t.ID == keyValue); + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); } catch (Exception ex) { @@ -126,6 +144,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement else { entity.Create(); + entity.CreateTime = DateTime.Now; this.BaseRepository("CollegeMIS").Insert(entity); } } From ec20028f92d68fadfe95ca18f7d49e39adffc9be Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 26 Aug 2022 15:15:20 +0800 Subject: [PATCH 27/49] =?UTF-8?q?pc=20=E5=80=BC=E7=8F=AD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/DutySchedule/Index.cshtml | 9 +++++ .../Views/DutySchedule/Index.js | 38 +++++++++++++++++++ .../DutySchedule/DutyScheduleService.cs | 13 ++++++- 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.cshtml index 23b616085..9409e00a9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.cshtml @@ -7,6 +7,15 @@
+
+
+
+
+ +
+
+  查询 +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js index 39b3f0932..876fd47e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/DutySchedule/Index.js @@ -7,12 +7,46 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -82,11 +116,15 @@ var bootstrap = function ($, learun) { ], mainId: 'ID', isPage: true, + sidx: 'createtime', + sord: 'desc' }); page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs index a295a2b01..e9db34110 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs @@ -31,12 +31,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var adms = this.BaseRepository().getDbConnection().Database; var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" t.* ,u.F_Account,F_RealName "); + strSql.Append(@" t.* ,u.F_Account,u.F_RealName "); strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["keyword"].IsEmpty()) + { + dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); + strSql.Append(" AND u.F_RealName Like @keyword "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.StartTime >= @startTime AND t.EndTime <= @endTime ) "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) From eb2e8db462a74f895284b6416943c97225564ba9 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Fri, 26 Aug 2022 16:39:27 +0800 Subject: [PATCH 28/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=A0=E7=A7=8D=E5=BC=82=E5=8A=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=9B=E5=BC=82=E5=8A=A8=E6=93=8D=E4=BD=9C=E5=90=8E?= =?UTF-8?q?=E8=AE=A1=E5=85=A5=E5=BC=82=E5=8A=A8=E6=97=A5=E5=BF=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasicChangeController.cs | 2 +- .../Views/StuInfoBasicChange/Form.cshtml | 8 +- .../Views/StuInfoBasicChange/Form.js | 75 +++--- .../Views/StuInfoBasic_ChangeLog/Index.cshtml | 15 +- .../Views/StuInfoBasic_ChangeLog/Index.js | 48 +++- .../StuInfoBasic/StuInfoBasicEntity.cs | 2 +- .../StuInfoBasic/StuInfoBasicService.cs | 67 +++-- .../StuInfoBasicChangeEntity.cs | 6 +- .../StuInfoBasicChangeService.cs | 237 ++++++++++++++++-- .../StuInfoBasic_ChangeLogEntity.cs | 15 ++ .../StuInfoBasic_ChangeLogService.cs | 17 +- 11 files changed, 383 insertions(+), 109 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index 952067fec..70567beae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -116,7 +116,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var loginUserInfo = LoginUserInfo.Get(); entity.CreateTime = DateTime.Now; - entity.CreateUserId = loginUserInfo.account; + entity.CreateUserId = loginUserInfo.userId; entity.CheckStatus = 0; stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml index d0b4c7d6e..79f5acba6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml @@ -29,11 +29,11 @@
学籍异动前信息
系部*
-
+
专业*
-
+
班级*
@@ -47,20 +47,20 @@
新专业
-
+
新班级
-
异动说明
+
异动说明
备注
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js index ac6ce31c1..114114e35 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js @@ -32,37 +32,37 @@ var bootstrap = function ($, learun) { $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '*'); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '*'); $(".NewContainer").show(); + $('#OutSchool').removeAttr("isvalid"); + $('#OutSchool').removeAttr("checkexpession"); + $("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title')); + $('#OutSchool').val(''); $(".NewSchool").hide(); - if (item.id === "01" ) { //留级 - $(".NewSchool").hide(); + if (item.id === "01" || item.id === "07") { //留级、转班 $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); - $('#OutSchool').val(''); } else if (item.id === "02") {//转校 - $(".NewSchool").show(); $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); $(".NewContainer").find('.contentDiv').removeAttr('readonly'); - $(".NewSchool").find('.OutSchool').attr("isvalid", 'yes'); - $(".NewSchool").find('.OutSchool').attr("checkexpession"); - $(".NewSchool").find('.OutSchool').attr('readonly'); $("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); $(".NewContainer").hide(); + $('#OutSchool').attr("isvalid", 'yes'); + $('#OutSchool').attr("checkexpession", "NotNull"); + $("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '*'); + $(".NewSchool").show(); } else if (item.id === "03") { //复学 - $(".NewSchool").hide(); - $(".NewContainer").find('.contentDiv').removeAttr('readonly'); - $(".NewSchool").find('.OutSchool').attr("isvalid", "Null"); - $('#OutSchool').val(''); - } else if (item.id === "04") { //转入 - $(".NewSchool").hide(); - $(".NewContainer").find('.contentDiv').removeAttr('readonly'); - $(".NewSchool").find('.OutSchool').attr("isvalid", "Null"); - $('#OutSchool').val(''); + $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); + $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); + $("#NewClassNo").lrselectSet($("#ClassNo").lrselectGet()); + } else if (item.id === "04") { //转入/进 + learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!"); + $("#StuNo").val(""); + $("#StuName").val(""); } - else { //退学、休学、 + else if (item.id === "05" || item.id === "06") { //退学、休学、 $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); $(".NewContainer").find('.contentDiv').removeAttr('readonly'); @@ -70,8 +70,11 @@ var bootstrap = function ($, learun) { $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); $(".NewContainer").hide(); - $(".NewSchool").hide(); - $('#OutSchool').val(''); + } + else if (item.id === "08") { //转专业、 + $(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly'); + $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); + $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); } } @@ -171,29 +174,33 @@ var bootstrap = function ($, learun) { $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '*'); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '*'); $(".NewContainer").show(); - if (data[id].StuChangeType == "01") { //降级、转班 + $('#OutSchool').removeAttr("isvalid"); + $('#OutSchool').removeAttr("checkexpession"); + $("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title')); + $('#OutSchool').val(''); + $(".NewSchool").hide(); + if (data[id].StuChangeType == "01" || data[id].StuChangeType == "07") { //留级、转班 $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); - $(".NewSchool").hide(); - $('#OutSchool').val(''); } else if (data[id].StuChangeType == "02") {//转校 - $(".NewSchool").show(); $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); $(".NewContainer").find('.contentDiv').removeAttr('readonly'); - $(".NewSchool").find('.OutSchool').attr("isvalid"); - $(".NewSchool").find('.OutSchool').attr("checkexpession"); - $(".NewSchool").find('.OutSchool').attr('readonly'); $("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title')); $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); $(".NewContainer").hide(); - } else if (data[id].StuChangeType == "03") { //转专业 + $('#OutSchool').attr("isvalid", 'yes'); + $('#OutSchool').attr("checkexpession", "NotNull"); + $("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '*'); + $(".NewSchool").show(); + } else if (data[id].StuChangeType == "03") { //复学 $(".NewContainer").find('.contentDiv').removeAttr('readonly'); - $(".NewSchool").hide(); - $('#OutSchool').val(''); - } - else { //退学、休学、转校 + } else if (data[id].StuChangeType == "04") { //转入/进 + learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!"); + $("#StuNo").val(""); + $("#StuName").val(""); + } else if (data[id].StuChangeType == "05" || data[id].StuChangeType == "06") { //退学、休学、 $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); $(".NewContainer").find('.contentDiv').removeAttr('readonly'); @@ -201,8 +208,10 @@ var bootstrap = function ($, learun) { $("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title')); $("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title')); $(".NewContainer").hide(); - $(".NewSchool").hide(); - $('#OutSchool').val(''); + } + else if (data[id].StuChangeType == "08") { //转专业、 + $(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly'); + $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml index 53741d3a1..84f632f14 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml @@ -2,6 +2,9 @@ ViewBag.Title = "学籍信息异动"; Layout = "~/Views/Shared/_Index.cshtml"; } +
@@ -14,16 +17,20 @@
-
字段
+
异动类型
+
+
+
+
修改属性
-
学生主键
- +
学生姓名
+
修改人
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js index 7ff4fcd7a..a3cffab8a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js @@ -45,6 +45,10 @@ var bootstrap = function ($, learun) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); + $('#StuChangeType').lrDataItemSelect({ code: 'StuChangeType' }); + $('#StuID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); + $('#UpdateBy').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' }); + // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -98,9 +102,35 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', headData: [ + { + label: "异动类型", name: "StuChangeType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'StuChangeType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "异动备注", name: "StuChangeRemark", width: 250, align: "left" }, + { + label: "学生姓名", name: "StuID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuid', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + }, { label: "修改属性", name: "FieldName", width: 200, align: "left" }, { label: "修改前", name: "BeforeChange", width: 200, align: "left" }, { label: "修改后", name: "AfterChange", width: 200, align: "left" }, @@ -110,7 +140,7 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', key: value, - keyId: 'f_account', + keyId: 'f_userid', callback: function (_data) { callback(_data['f_realname']); } @@ -119,7 +149,6 @@ var bootstrap = function ($, learun) { }, { label: "修改时间", name: "UpdateTime", width: 200, align: "left" }, - { label: "数据主键", name: "StuID", width: 250, align: "left" }, ], mainId: 'ID', isPage: true, @@ -130,9 +159,18 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; - if ($("#StuID").val() != "" && $("#StuID").length > 0) { - param.StuID = $("#StuID").val(); + + //赋值 + if (stuId != "" && stuId != undefined && stuId != null) { + $('#StuID').lrselectSet(stuId); + $('#StuID').attr('readonly', 'readonly'); + $('#StuID').parent().attr('display','none'); + param.StuID = stuId; + } else { + $('#StuID').removeAttr('readonly'); + $('#StuID').parent().attr('display', 'block'); } + param.StartTime = startTime; param.EndTime = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs index fa19beea7..a91cc5a86 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs @@ -464,7 +464,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("STUDYMODALITY")] public string StudyModality { get; set; } /// - /// 学籍异动状态 + /// 学籍异动状态(1表示不显示成绩) /// /// [Column("CHANGESTATUS")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 8eb9af102..63c57af88 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -1064,17 +1064,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void SaveEntity(string keyValue, StuInfoBasicEntity entity) { + var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { UserIBLL userIBLL = new UserBLL(); + var loginUser = LoginUserInfo.Get(); if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); - var oldEntity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + var oldEntity = db.FindEntity(keyValue); List list = new List(); - var loginUser = LoginUserInfo.Get(); - var tableInfos = this.BaseRepository("CollegeMIS").FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] + var tableInfos = db.FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] as varchar(100)) AS [字段说明] FROM sys.tables AS t INNER JOIN sys.columns @@ -1111,7 +1112,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration AfterChange = newValue.ToString(), FieldName = columnName, UpdateBy = loginUser.userId, - UpdateTime = DateTime.Now + UpdateTime = DateTime.Now, + StuChangeType="09", + StuChangeRemark="点击学籍信息管理-修改按钮进行操作" }; changeEntity.Create(); list.Add(changeEntity); @@ -1121,7 +1124,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (list.Count > 0) { - this.BaseRepository("CollegeMIS").Insert(list); + db.Insert(list); } @@ -1142,37 +1145,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration userIBLL.SaveEntity(baseUser.F_UserId, baseUser); } - this.BaseRepository("CollegeMIS").Update(entity); + db.Update(entity); } else { entity.Create(); - if (entity.IsTran == "0") + if (entity.IsTran == "0")//转入/进 { - StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity + //学籍异动表 + //StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity + //{ + // Id = Guid.NewGuid().ToString(), + // StuNo = entity.StuNo, + // StuName = entity.StuName, + // DeptNo = entity.DeptNo, + // MajorNo = entity.MajorNo, + // ClassNo = entity.ClassNo, + // StuChangeRemark = entity.Remark, + // NewDeptNo = entity.DeptNo, + // NewMajorNo = entity.MajorNo, + // NewClassNo = entity.ClassNo, + // CreateUserId = entity.StuNo, + // StuChangeType = "04", + // StuChangeReason = "10", + // CreateTime = DateTime.Now, + //}; + //db.Insert(stuinfoChange); + //学籍异动日志表 + var changeEntity = new StuInfoBasic_ChangeLogEntity { - Id = Guid.NewGuid().ToString(), - StuNo = entity.StuNo, - StuName = entity.StuName, - DeptNo = entity.DeptNo, - MajorNo = entity.MajorNo, - ClassNo = entity.ClassNo, - StuChangeRemark = entity.Remark, - NewDeptNo = entity.DeptNo, - NewMajorNo = entity.MajorNo, - NewClassNo = entity.ClassNo, - CreateUserId = entity.StuNo, + StuID = entity.StuId, + BeforeChange = "", + AfterChange = "", + FieldName = "", + UpdateBy = loginUser.userId, + UpdateTime = DateTime.Now, StuChangeType = "04", - StuChangeReason = "10", - CreateTime = DateTime.Now, + StuChangeRemark = "点击学籍信息管理-异动转入按钮进行操作" }; - this.BaseRepository("CollegeMIS").Insert(stuinfoChange); + changeEntity.Create(); + db.Insert(changeEntity); } - this.BaseRepository("CollegeMIS").Insert(entity); + db.Insert(entity); } + + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs index b58c8c2b2..298b37876 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs @@ -45,17 +45,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("CLASSNO")] public string ClassNo { get; set; } /// - /// StuChangeType + /// 异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09) /// [Column("STUCHANGETYPE")] public string StuChangeType { get; set; } /// - /// StuChangeReason + /// 异动原因 /// [Column("STUCHANGEREASON")] public string StuChangeReason { get; set; } /// - /// StuChangeRemark + /// 异动备注 /// [Column("STUCHANGEREMARK")] public string StuChangeRemark { get; set; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs index 17f8e9173..b0b62d8ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs @@ -149,30 +149,215 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { + var loginUserInfo = LoginUserInfo.Get(); + var now = DateTime.Now; + var logList = new List(); var entity = db.FindEntity(x => x.Id == keyValue); if (entity != null) { - //处理数据 - if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 + var stuInfoBasicEntity = db.FindEntity(x => x.StuNo == entity.StuNo); + if (stuInfoBasicEntity != null) { - //改信息; - var classInfoEntity = db.FindEntity(x => x.ClassNo == entity.NewClassNo); - if (classInfoEntity != null) + //处理数据 + if (entity.StuChangeType == "01" || entity.StuChangeType == "07") //降级、转班、 { - db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); + if (stuInfoBasicEntity.ClassNo != entity.NewClassNo) + { + var classInfoEntity = db.FindEntity(x => x.ClassNo == entity.NewClassNo); + if (classInfoEntity != null) + { + if (stuInfoBasicEntity.Grade != classInfoEntity.Grade) + { + //增加异动日志表:年级 + var logentity2 = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "年级", + BeforeChange = stuInfoBasicEntity.Grade, + AfterChange = classInfoEntity.Grade, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity2.Create(); + logList.Add(logentity2); + } + //改学籍信息表; + db.ExecuteBySql($"update StuInfoBasic set ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); + //增加异动日志表:班级 + var logentity = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "班级", + BeforeChange = entity.ClassNo, + AfterChange = entity.NewClassNo, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity.Create(); + logList.Add(logentity); + } + } + } - } - else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学 - { - //改信息;不显示成绩; - db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); - } + else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学、 + { + //增加异动日志表:学籍异动状态 + var logentity = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "学籍异动状态", + BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(), + AfterChange = "1", + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity.Create(); + logList.Add(logentity); + //改学籍信息(异动状态为1表示不显示成绩); + db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); + } + else if (entity.StuChangeType == "03") //复学 + { + //增加异动日志表:学籍异动状态 + var logentity = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "学籍异动状态", + BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(), + AfterChange = "0", + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity.Create(); + logList.Add(logentity); + //改学籍信息(异动状态为0表示显示成绩); + db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' "); + } + else if (entity.StuChangeType == "08") //转专业、 + { + if (stuInfoBasicEntity.MajorNo != entity.NewMajorNo) + { + var classInfoEntity2 = db.FindEntity(x => x.ClassNo == entity.NewClassNo); + if (classInfoEntity2 != null) + { + if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade) + { + //增加异动日志表:年级 + var logentity3 = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "年级", + BeforeChange = stuInfoBasicEntity.Grade, + AfterChange = classInfoEntity2.Grade, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity3.Create(); + logList.Add(logentity3); + } + //改学籍信息; + db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' "); + //增加异动日志表:专业 + var logentity = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "专业", + BeforeChange = entity.MajorNo, + AfterChange = entity.NewMajorNo, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity.Create(); + logList.Add(logentity); + //增加异动日志表:班级 + var logentity2 = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "班级", + BeforeChange = entity.ClassNo, + AfterChange = entity.NewClassNo, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity2.Create(); + logList.Add(logentity2); + } + } + else + { + if (stuInfoBasicEntity.ClassNo != entity.NewClassNo) + { + var classInfoEntity2 = db.FindEntity(x => x.ClassNo == entity.NewClassNo); + if (classInfoEntity2 != null) + { + if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade) + { + //增加异动日志表:年级 + var logentity2 = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "年级", + BeforeChange = stuInfoBasicEntity.Grade, + AfterChange = classInfoEntity2.Grade, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity2.Create(); + logList.Add(logentity2); + } + //改学籍信息表; + db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' "); + //增加异动日志表:班级 + var logentity = new StuInfoBasic_ChangeLogEntity() + { + FieldName = "班级", + BeforeChange = entity.ClassNo, + AfterChange = entity.NewClassNo, + UpdateBy = loginUserInfo.userId, + UpdateTime = now, + StuID = stuInfoBasicEntity.StuId, + StuChangeType = entity.StuChangeType, + StuChangeRemark = entity.StuChangeRemark, + StuChangeId = entity.Id + }; + logentity.Create(); + logList.Add(logentity); + } + } + } + } + db.Insert(logList); - //修改状态 - entity.CheckTime = DateTime.Now; - entity.CheckUserId = LoginUserInfo.Get().account; - entity.CheckStatus = 1; - db.Update(entity); + //修改异动表:审批状态、审批人、 + entity.CheckTime = now; + entity.CheckUserId = loginUserInfo.userId; + entity.CheckStatus = 1; + db.Update(entity); + } } db.Commit(); } @@ -204,23 +389,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (entity != null) { //处理数据 - if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 + if (entity.StuChangeType == "01" || entity.StuChangeType == "07" || entity.StuChangeType == "08") //降级、转班、转专业、 { - //改信息; + //改学籍信息; var classInfoEntity = db.FindEntity(x => x.ClassNo == entity.ClassNo); if (classInfoEntity != null) { db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.DeptNo}',MajorNo='{entity.MajorNo}',ClassNo='{entity.ClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); } } - else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学 + else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学 { - //改信息;显示成绩; + //改学籍信息(异动状态为null表示显示成绩); db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' "); } + else if (entity.StuChangeType == "03") //复学 + { + //改学籍信息(异动状态为1表示不显示成绩); + db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); + } - //修改状态 + //修改异动表:审批状态、审批人、 db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' "); + //删除异动日志表:学籍异动主键id + db.ExecuteBySql("delete from StuInfoBasic_ChangeLog where StuChangeId='" + keyValue + "' "); + } db.Commit(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs index 38d1e0a44..474ad6ed7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs @@ -51,6 +51,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("STUID")] public string StuID { get; set; } + /// + /// 学籍异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09) + /// + [Column("STUCHANGETYPE")] + public string StuChangeType { get; set; } + /// + /// 学籍异动备注 + /// + [Column("STUCHANGEREMARK")] + public string StuChangeRemark { get; set; } + /// + /// StuInfoBasicChange主键 + /// + [Column("STUCHANGEID")] + public string StuChangeId { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs index 335ab28f7..e5bfd65be 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs @@ -29,16 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.FieldName, - t.BeforeChange, - t.AfterChange, - t.UpdateBy, - t.UpdateTime, - t.StuID - "); + strSql.Append("SELECT t.*"); strSql.Append(" FROM StuInfoBasic_ChangeLog t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -57,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["StuID"].IsEmpty()) { - dp.Add("StuID", "" + queryParam["StuID"].ToString() + "", DbType.String); + dp.Add("StuID", queryParam["StuID"].ToString(), DbType.String); strSql.Append(" AND t.StuID = @StuID "); } if (!queryParam["UpdateTime"].IsEmpty()) @@ -67,8 +58,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["UpdateBy"].IsEmpty()) { - dp.Add("UpdateBy", "%" + queryParam["UpdateBy"].ToString() + "%", DbType.String); - strSql.Append(" AND t.UpdateBy Like @UpdateBy "); + dp.Add("UpdateBy", queryParam["UpdateBy"].ToString(), DbType.String); + strSql.Append(" AND t.UpdateBy = @UpdateBy "); } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); } From 2bf275965cd6559607723eaa444e9e061c03892a Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 29 Aug 2022 11:30:20 +0800 Subject: [PATCH 29/49] =?UTF-8?q?app2.0=20=E5=85=AC=E6=96=87=E6=9F=A5?= =?UTF-8?q?=E9=98=85=E6=89=8B=E6=9C=BA=E7=AB=AF=E8=A7=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs index 81017ca77..ecafe4c35 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Sys_ReceiveFileApi.cs @@ -77,7 +77,7 @@ namespace Learun.Application.WebApi result = "/" + result.Substring(result.IndexOf("Resource")); } Sys_ReceiveFileData.Url = result; - + Sys_ReceiveFileData.Contents = WebHelper.HtmlDecode(Sys_ReceiveFileData.Contents); } var jsonData = new { From 9c903c97685cbad103e69af70814d822457f371b Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 29 Aug 2022 11:34:56 +0800 Subject: [PATCH 30/49] =?UTF-8?q?app2.0=20=E6=94=B6=E4=BB=B6=E7=AE=B1?= =?UTF-8?q?=E6=AD=A3=E6=96=87=E8=A7=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/SYS_ReceiveMessageApi.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs index 56f712ebb..53ac50bb5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/SYS_ReceiveMessageApi.cs @@ -70,6 +70,10 @@ namespace Learun.Application.WebApi { string keyValue = this.GetReqData(); var SYS_ReceiveMessageData = sYS_ReceiveMessageIBLL.GetUrlSYS_ReceiveMessageEntity(keyValue); + if (SYS_ReceiveMessageData != null) + { + SYS_ReceiveMessageData.CONTENTS = WebHelper.HtmlDecode(SYS_ReceiveMessageData.CONTENTS); + } var jsonData = new { SYS_ReceiveMessage = SYS_ReceiveMessageData, From 3279a225bed6d355e64afb4faab9e936ff31ec21 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 29 Aug 2022 11:55:58 +0800 Subject: [PATCH 31/49] =?UTF-8?q?app2.0=20=E6=A0=A1=E5=86=85=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=85=AC=E5=91=8A=E5=AE=A1=E6=A0=B8=E6=AD=A3=E6=96=87?= =?UTF-8?q?=E8=A7=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/NewsApi.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index 30966dbde..d06470df0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -139,6 +139,10 @@ namespace Learun.Application.WebApi.Modules F_SendPostId.Trim(','); shlist.F_SendPostId = F_SendPostId; } + if (!shlist.F_NewsContent.IsEmpty()) + { + shlist.F_NewsContent = WebHelper.HtmlDecode(shlist.F_NewsContent); + } return Success(shlist); } From 8c87926ccf9e19970db8903e92b3b02ab768fbaf Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 29 Aug 2022 14:08:13 +0800 Subject: [PATCH 32/49] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasicChange/Form.js | 26 ++++++++++++++++--- .../Views/StuInfoBasicChange/Index.js | 2 +- .../Views/StuInfoBasic_ChangeLog/Index.js | 2 +- .../StuInfoBasic/StuInfoBasicService.cs | 4 +-- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js index 114114e35..6dfe0411e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js @@ -40,7 +40,13 @@ var bootstrap = function ($, learun) { if (item.id === "01" || item.id === "07") { //留级、转班 $(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly'); $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); - $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); + var timer1 = setInterval(function () { + if ($("#NewDeptNo").lrselectGet()) { + $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); + console.log("系部赋值后,在赋值专业:" + $("#NewMajorNo").lrselectGet()); + clearInterval(timer1); + } + }, 1000); } else if (item.id === "02") {//转校 $(".NewContainer").find('.contentDiv').removeAttr("isvalid"); $(".NewContainer").find('.contentDiv').removeAttr("checkexpession"); @@ -55,8 +61,19 @@ var bootstrap = function ($, learun) { $(".NewSchool").show(); } else if (item.id === "03") { //复学 $("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet()); - $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); - $("#NewClassNo").lrselectSet($("#ClassNo").lrselectGet()); + var timer2 = setInterval(function () { + if ($("#NewDeptNo").lrselectGet()) { + $("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet()); + console.log("系部赋值后,在赋值专业:" + $("#NewMajorNo").lrselectGet()); + clearInterval(timer2); + } + }, 1000); + var timer3 = setInterval(function () { + if ($("#NewMajorNo").lrselectGet()) { + $("#NewClassNo").lrselectSet($("#ClassNo").lrselectGet()); + clearInterval(timer3); + } + }, 1000); } else if (item.id === "04") { //转入/进 learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!"); $("#StuNo").val(""); @@ -86,6 +103,7 @@ var bootstrap = function ($, learun) { $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#NewDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { + //console.log("选择的系部为:" + JSON.stringify(item)); if (item != null && item != undefined) { $('#NewMajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', @@ -101,6 +119,7 @@ var bootstrap = function ($, learun) { }); $('#NewMajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: function (item) { + //console.log("选择的专业为:" + JSON.stringify(item)); if (item != null && item != undefined) { $('#NewClassNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', @@ -221,6 +240,7 @@ var bootstrap = function ($, learun) { }; // 保存数据 acceptClick = function (callBack) { + //console.log($('body').lrGetFormData()); if (!$('body').lrValidform()) { return false; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js index bca4b9019..76ceab8f3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js @@ -218,11 +218,11 @@ var bootstrap = function ($, learun) { }); } }, + { label: "转出学校", name: "OutSchool", width: 200, align: "left" }, { label: "创建时间", name: "CreateTime", width: 130, align: "left" }, { label: "创建用户", name: "CreateUserId", width: 100, align: "left" }, { label: "审核时间", name: "CheckTime", width: 130, align: "left" }, { label: "审核用户", name: "CheckUserId", width: 100, align: "left" }, - { label: "转出学校", name: "OutSchool", width: 200, align: "left" }, { label: "备注", name: "StuChangeRemark", width: 200, align: "left" }, { label: "审核状态", name: "CheckStatus", width: 100, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js index a3cffab8a..68171d647 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js @@ -106,7 +106,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList', headData: [ { - label: "异动类型", name: "StuChangeType", width: 100, align: "left", + label: "异动类型", name: "StuChangeType", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 63c57af88..be484e3aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -1073,9 +1073,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { entity.Modify(keyValue); - var oldEntity = db.FindEntity(keyValue); + var oldEntity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); List list = new List(); - var tableInfos = db.FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] + var tableInfos = this.BaseRepository("CollegeMIS").FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] as varchar(100)) AS [字段说明] FROM sys.tables AS t INNER JOIN sys.columns From c4aa7eff3d6e2c1df94f6e9b845e45b39ea20412 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 29 Aug 2022 14:41:03 +0800 Subject: [PATCH 33/49] =?UTF-8?q?=E5=8F=96=E6=B6=88=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E9=AA=8C=E8=AF=81=E4=B8=BA=E5=AF=86?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Organization/User/UserBLL.cs | 10 +++++----- .../Learun.Application.Web/Views/Login/Default.cshtml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs index e2293df0e..69cc88833 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs @@ -1111,15 +1111,15 @@ namespace Learun.Application.Organization else { string dbPassword = Md5Helper.Encrypt(DESEncrypt.Encrypt(password.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower(); - string phone = Md5Helper.Encrypt(userEntity.F_Mobile, 32).ToLower(); + //string phone = Md5Helper.Encrypt(userEntity.F_Mobile, 32).ToLower(); if (dbPassword == userEntity.F_Password) { userEntity.LoginOk = true; } - else if (phone == password) - { - userEntity.LoginOk = true; - } + //else if (phone == password) + //{ + // userEntity.LoginOk = true; + //} else { userEntity.LoginMsg = "密码和账户名不匹配!"; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml index 6afa2d93b..754ba1912 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml @@ -89,7 +89,7 @@
- @*
+
扫码签到
-
*@ +
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js index aed129eb2..e4cbd9c77 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js @@ -63,7 +63,7 @@ var bootstrap = function ($, learun) { $('[data-table="' + id + '"]').lrSetFormData(data[id]); } //扫码签到 - //makeCode(data[id].Id); + makeCode(data[id].Id); } }); } From b2a5d423069fc015ddb4d4ad80eadde0000753c9 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Tue, 30 Aug 2022 11:18:19 +0800 Subject: [PATCH 44/49] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=8A=A1-=E5=AE=9E=E8=AE=AD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=AE=9E=E8=AE=AD=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrainEquipmentManageController.cs | 117 +++++++++++++ .../Views/TrainEquipmentManage/Form.cshtml | 39 +++++ .../Views/TrainEquipmentManage/Form.js | 51 ++++++ .../Views/TrainEquipmentManage/Index.cshtml | 44 +++++ .../Views/TrainEquipmentManage/Index.js | 105 ++++++++++++ .../Learun.Application.Web.csproj | 5 + .../TrainEquipmentManageMap.cs | 29 ++++ .../Learun.Application.Mapping.csproj | 1 + .../TrainEquipmentManageBLL.cs | 125 ++++++++++++++ .../TrainEquipmentManageEntity.cs | 85 ++++++++++ .../TrainEquipmentManageIBLL.cs | 48 ++++++ .../TrainEquipmentManageService.cs | 156 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 809 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TrainEquipmentManageController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TrainEquipmentManageMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TrainEquipmentManageController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TrainEquipmentManageController.cs new file mode 100644 index 000000000..abf406b47 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TrainEquipmentManageController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public class TrainEquipmentManageController : MvcControllerBase + { + private TrainEquipmentManageIBLL trainEquipmentManageIBLL = new TrainEquipmentManageBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = trainEquipmentManageIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var TrainEquipmentManageData = trainEquipmentManageIBLL.GetTrainEquipmentManageEntity( keyValue ); + var jsonData = new { + TrainEquipmentManage = TrainEquipmentManageData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + trainEquipmentManageIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + TrainEquipmentManageEntity entity = strEntity.ToObject(); + trainEquipmentManageIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.cshtml new file mode 100644 index 000000000..7e8bdcf76 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "实训设备管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
专业部*
+
+
+
+
实训室名称*
+ +
+
+
设备名称*
+ +
+
+
设备型号
+ +
+
+
新增
+ +
+
+
损耗
+ +
+
+
现存
+ +
+
+
设备金额
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js new file mode 100644 index 000000000..a856da8c8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Form.js @@ -0,0 +1,51 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-30 10:49 + * 描 述:实训设备管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.cshtml new file mode 100644 index 000000000..6381a04bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "实训设备管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
专业部
+
+
+
+
实训室名称
+ +
+
+
设备名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.js new file mode 100644 index 000000000..c79edca40 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TrainEquipmentManage/Index.js @@ -0,0 +1,105 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-08-30 10:49 + * 描 述:实训设备管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DeptNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/TrainEquipmentManage/GetPageList', + headData: [ + { label: "专业部", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + }}, + { label: "实训室名称", name: "TrainName", width: 100, align: "left"}, + { label: "设备名称", name: "EquipmentName", width: 100, align: "left"}, + { label: "设备型号", name: "EquipmentModel", width: 100, align: "left"}, + { label: "新增", name: "AddNum", width: 100, align: "left"}, + { label: "损耗", name: "LossNum", width: 100, align: "left"}, + { label: "现存", name: "ExistNum", width: 100, align: "left"}, + { label: "设备金额", name: "EquipmentMoney", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 54b84dc98..49a2c8fe9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -864,6 +864,7 @@ + @@ -6860,6 +6861,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TrainEquipmentManageMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TrainEquipmentManageMap.cs new file mode 100644 index 000000000..ece0b800f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TrainEquipmentManageMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public class TrainEquipmentManageMap : EntityTypeConfiguration + { + public TrainEquipmentManageMap() + { + #region 表、主键 + //表 + this.ToTable("TRAINEQUIPMENTMANAGE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 6b8ca2d2c..cb41c1cdb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -621,6 +621,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageBLL.cs new file mode 100644 index 000000000..6f344af86 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageBLL.cs @@ -0,0 +1,125 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public class TrainEquipmentManageBLL : TrainEquipmentManageIBLL + { + private TrainEquipmentManageService trainEquipmentManageService = new TrainEquipmentManageService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return trainEquipmentManageService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取TrainEquipmentManage表实体数据 + /// + /// 主键 + /// + public TrainEquipmentManageEntity GetTrainEquipmentManageEntity(string keyValue) + { + try + { + return trainEquipmentManageService.GetTrainEquipmentManageEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + trainEquipmentManageService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, TrainEquipmentManageEntity entity) + { + try + { + trainEquipmentManageService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageEntity.cs new file mode 100644 index 000000000..1cf68cff1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageEntity.cs @@ -0,0 +1,85 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public class TrainEquipmentManageEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 专业部 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 实训室名称 + /// + [Column("TRAINNAME")] + public string TrainName { get; set; } + /// + /// 设备名称 + /// + [Column("EQUIPMENTNAME")] + public string EquipmentName { get; set; } + /// + /// 设备型号 + /// + [Column("EQUIPMENTMODEL")] + public string EquipmentModel { get; set; } + /// + /// 新增 + /// + [Column("ADDNUM")] + public string AddNum { get; set; } + /// + /// 损耗 + /// + [Column("LOSSNUM")] + public string LossNum { get; set; } + /// + /// 现存 + /// + [Column("EXISTNUM")] + public string ExistNum { get; set; } + /// + /// 设备金额 + /// + [Column("EQUIPMENTMONEY")] + public decimal? EquipmentMoney { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageIBLL.cs new file mode 100644 index 000000000..0a94566f1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageIBLL.cs @@ -0,0 +1,48 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public interface TrainEquipmentManageIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取TrainEquipmentManage表实体数据 + /// + /// 主键 + /// + TrainEquipmentManageEntity GetTrainEquipmentManageEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, TrainEquipmentManageEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageService.cs new file mode 100644 index 000000000..4453a07cd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TrainEquipmentManage/TrainEquipmentManageService.cs @@ -0,0 +1,156 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-08-30 10:49 + /// 描 述:实训设备管理 + /// + public class TrainEquipmentManageService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM TrainEquipmentManage t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["TrainName"].IsEmpty()) + { + dp.Add("TrainName", "%" + queryParam["TrainName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.TrainName Like @TrainName "); + } + if (!queryParam["EquipmentName"].IsEmpty()) + { + dp.Add("EquipmentName", "%" + queryParam["EquipmentName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EquipmentName Like @EquipmentName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取TrainEquipmentManage表实体数据 + /// + /// 主键 + /// + public TrainEquipmentManageEntity GetTrainEquipmentManageEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, TrainEquipmentManageEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 8a4fbe1a3..ebad8b13f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1910,6 +1910,10 @@ + + + + From 8f2df560766641de4ac1ee060369bd6903185b24 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 30 Aug 2022 14:29:58 +0800 Subject: [PATCH 45/49] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E7=AD=BE=E5=88=B0=20?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MeetingManagementIBLL.cs | 3 + .../MeetingManagementService.cs | 102 ++++++++++++++++++ .../MeetingManagementApplyMethod.cs | 6 +- .../LearunApp-2.2.0/manifest.json | 2 +- 4 files changed, 107 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs index afd1b1318..ef3282473 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs @@ -76,6 +76,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void ChangeStatusByProcessId(string processId, string status, string userId); + + void ReceivedList(string processId); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs index c064e357c..430b23a3a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs @@ -1,11 +1,19 @@ using Dapper; using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.DataBase.Repository; using Learun.Util; +using Microsoft.AspNet.SignalR.Client; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; +using System.Linq; using System.Text; +using System.Threading.Tasks; +using System.Web; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -467,7 +475,101 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + public void ReceivedList(string processId) + { + var Received = GetMeetingManagementEntityByProcessId(processId); + List userInfos = new List(); + foreach (var rid in Received.InternalParticipants.Split(',')) + { + var user = this.BaseRepository().FindEntity(m => m.F_UserId == rid); + if (!userInfos.Contains(user)) + { + userInfos.Add(user); + } + } + //foreach (var uitem in userInfos) + //{ + // SYS_ReceiveMessageEntity receiveMessageEntity = new SYS_ReceiveMessageEntity(); + // receiveMessageEntity.Create(); + // receiveMessageEntity.SENDERID = Received.SENDERID; + // receiveMessageEntity.SENDER = messageentity.SENDER; + // receiveMessageEntity.RECEIVERID = uitem.F_UserId; + // receiveMessageEntity.RECEIVER = uitem.F_RealName; + // receiveMessageEntity.TITLE = messageentity.TITLE; + // receiveMessageEntity.CONTENTS = messageentity.CONTENTS; + // receiveMessageEntity.URL = messageentity.URL; + // receiveMessageEntity.READFLAG = 0; + // receiveMessageEntity.SENDTIME = DateTime.Now; + // receiveMessageEntity.DelFlag = false; + // this.BaseRepository().Insert(receiveMessageEntity); + //} + + //读取信息推送管理-会议申请推送(03)的配置 + var informationPushEntity = this.BaseRepository().FindEntity(x => x.PushItem == "03"); + if (informationPushEntity != null && informationPushEntity.Status == true) + { + //微信推送 + try + { + PushWeixin(userInfos, Received.MeetingTitle); + } + catch (Exception e) + { + } + //飞星推送 + Task.Run(async () => + { + using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) + { + var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); + await hubConnection.Start(); + await hubProxy.Invoke("PushAnnouncement", Received.InternalParticipants, Received.MeetingTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), ""); + } + }); + } + } + public void PushWeixin(List needpostuserlist, string title) + { + var WeChatConfigentity = BaseRepository().FindEntity(m => m.IsEnable == true); + string appid = WeChatConfigentity.APPId; + string secret = WeChatConfigentity.secret; + var wechatemplete = BaseRepository() + .FindEntity(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task"); + string weixintaskurl = wechatemplete.TUrl; + string weixintasktempid = wechatemplete.TempId; + var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); + foreach (UserEntity userinfo in needpostuserlist) + { + if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) + { + //执行推送任务 + if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) + { + if (!string.IsNullOrEmpty(responsejson)) + { + var weixintokenobj = JsonConvert.DeserializeObject(responsejson); + if (string.IsNullOrEmpty(weixintokenobj.errcode)) + { + string access_token = weixintokenobj.access_token; + string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + + "\"template_id\":\"" + weixintasktempid + "\"," + + "\"url\":\"" + weixintaskurl + "/#/?page=mail\"," + + "\"data\":{" + + "\"first\": {\"value\":\"您有新的会议消息\",\"color\":\"#173177\"}," + + "\"keyword1\":{\"value\":\"未读邮件\",\"color\":\"#173177\"}," + + "\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + + "\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," + + "\"keyword4\": {\"value\":\"您有新的未读会议【" + title + "】\",\"color\":\"#173177\"}" + + "}" + + "}"; + string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); + } + } + } + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs index 55ee0ae70..9885a02bd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs @@ -1,9 +1,4 @@ using Learun.Application.TwoDevelopment.PersonnelManagement; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Learun.Application.WorkFlow { @@ -17,6 +12,7 @@ namespace Learun.Application.WorkFlow if (parameter.code == "agree") { meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); + meetingManagementIBLL.ReceivedList(parameter.processId); } else { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json index bff0c2bc1..2a1860b43 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json @@ -1,6 +1,6 @@ { "name" : "智慧校园", - "appid" : "__UNI__0CE0195", + "appid" : "__UNI__3039520", "description" : "智慧校园移动端", "versionName" : "2.1.0", "versionCode" : 20100, From 8fecbcd2b24b72a4ecf2da0d799c9f2f4dfcbb11 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 30 Aug 2022 14:44:54 +0800 Subject: [PATCH 46/49] =?UTF-8?q?app2.0=20=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MeetingManagement/MeetingManagementBLL.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs index a1efe6134..125bcef3d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs @@ -237,6 +237,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + public void ReceivedList(string processId) + { + try + { + meetingManagementService.ReceivedList(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } From 3fdcbf3f3bb675db8f3dc2c56a4a401c701bff33 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 30 Aug 2022 15:06:11 +0800 Subject: [PATCH 47/49] =?UTF-8?q?app2.0=E4=BC=9A=E8=AE=AE=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=20=E7=AD=BE=E5=88=B0=E6=97=B6=E9=97=B4=E6=9C=AA?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MeetingSignInRecord/MeetingSignInRecordService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs index f74004cf0..5a7f35d06 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs @@ -222,6 +222,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement if (meetEntity != null) { meetEntity.IsSignIn = true; + meetEntity.SignInTime = DateTime.Now; this.BaseRepository("CollegeMIS").Update(meetEntity); result = true; From 7dbe13c2f734f9d19200be3b8beaadda794edeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Tue, 30 Aug 2022 15:08:01 +0800 Subject: [PATCH 48/49] =?UTF-8?q?app2.0=20=E4=BC=9A=E8=AE=AE=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/js/scanCodeFun.js | 48 ++++++---- .../common/js/weixin-js-sdk.js | 1 + .../components/upload-file.vue | 95 ------------------- .../SYS_ReceiveMessage/list.vue | 2 +- .../SYS_ReceiveMessage/single.vue | 8 +- .../Sys_ReceiveFile/single.vue | 8 +- .../PersonnelManagement/MeetingMy/list.vue | 2 +- .../MeetingSignInScan/list.vue | 11 ++- 8 files changed, 48 insertions(+), 127 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/scanCodeFun.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/scanCodeFun.js index 509568d1b..e2a9127f1 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/scanCodeFun.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/scanCodeFun.js @@ -1,28 +1,38 @@ +import { conforms } from 'lodash'; +import wx from './weixin-js-sdk.js'; export default { scanCodeFun() { const promise = new Promise((resolve, reject) => { - // #ifdef APP-PLUS || MP-WEIXIN - uni.scanCode({ - success: function(res) { - // console.log(res) - // console.log('条码类型:' + res.scanType); - // console.log('条码内容:' + res.result); - resolve(res) - }, - fail: function(res) { + this.HTTP_GET("weixinapi/getweixinwebaccess_token?url=" + encodeURIComponent(window.location.href)).then((success)=>{ + if(!success){ resolve(false) + return } - }); - // #endif - - // #ifndef APP-PLUS || MP-WEIXIN - resolve(false) - uni.showToast({ - title: '请下载app或者到微信浏览器打开网页', - icon: 'none', - mask: false + wx.config({ + debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 + appId: success.appid, // 必填,公众号的唯一标识 + timestamp: success.timestamp, // 必填,生成签名的时间戳 + nonceStr: success.noncestr, // 必填,生成签名的随机串 + signature: success.certificate, // 必填,签名 + jsApiList: ["scanQRCode"] // 必填,需要使用的JS接口列表 + }); + wx.ready(() => { + wx.scanQRCode({ + needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, + scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 + success: function (res) { + var result = res.resultStr; // 当 needResult 为 1 时,扫码返回的结果 + var resultArr = result.split(','); // 扫描结果以逗号分割数组 + var codeContent = resultArr[resultArr.length - 1]; // 获取数组最后一个元素,也就是最终的内容 + resolve(result) + }, + fail: error => { + this.TOAST("调用扫码失败") + resolve(false) + } + }); + }) }) - // #endif }) return promise } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js new file mode 100644 index 000000000..1b5014bfc --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/js/weixin-js-sdk.js @@ -0,0 +1 @@ +!function(e,n){"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(window,function(o,e){if(!o.jWeixin){var n,c={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},a=function(){var e={};for(var n in c)e[c[n]]=n;return e}(),i=o.document,t=i.title,r=navigator.userAgent.toLowerCase(),s=navigator.platform.toLowerCase(),d=!(!s.match("mac")&&!s.match("win")),u=-1!=r.indexOf("wxdebugger"),l=-1!=r.indexOf("micromessenger"),p=-1!=r.indexOf("android"),f=-1!=r.indexOf("iphone")||-1!=r.indexOf("ipad"),m=(n=r.match(/micromessenger\/(\d+\.\d+\.\d+)/)||r.match(/micromessenger\/(\d+\.\d+)/))?n[1]:"",g={initStartTime:L(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},h={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:f?1:p?2:-1,clientVersion:m,url:encodeURIComponent(location.href)},v={},S={_completes:[]},y={state:0,data:{}};O(function(){g.initEndTime=L()});var I=!1,_=[],w={config:function(e){B("config",v=e);var t=!1!==v.check;O(function(){if(t)M(c.config,{verifyJsApiList:C(v.jsApiList),verifyOpenTagList:C(v.openTagList)},function(){S._complete=function(e){g.preVerifyEndTime=L(),y.state=1,y.data=e},S.success=function(e){h.isPreVerifyOk=0},S.fail=function(e){S._fail?S._fail(e):y.state=-1};var t=S._completes;return t.push(function(){!function(){if(!(d||u||v.debug||m<"6.0.2"||h.systemType<0)){var i=new Image;h.appId=v.appId,h.initTime=g.initEndTime-g.initStartTime,h.preVerifyTime=g.preVerifyEndTime-g.preVerifyStartTime,w.getNetworkType({isInnerInvoke:!0,success:function(e){h.networkType=e.networkType;var n="https://open.weixin.qq.com/sdk/report?v="+h.version+"&o="+h.isPreVerifyOk+"&s="+h.systemType+"&c="+h.clientVersion+"&a="+h.appId+"&n="+h.networkType+"&i="+h.initTime+"&p="+h.preVerifyTime+"&u="+h.url;i.src=n}})}}()}),S.complete=function(e){for(var n=0,i=t.length;n { - this.LOADING('正在上传…'); - this.HTTP_UPLOAD2('StuInfoFresh/upload', params.url, { - folderId: this.folderId - }).then((data) => { - this.HIDE_LOADING(); - if (data) { - // this.HTTP_GET('StuInfoFresh/upload', {fileId:data}) - this.imgList[params.index] = [{ - id: data.F_Id, - name: data.F_FileName, - url: data.F_FilePath, - type: data.F_FileType - }] - reslove(this.imgList[params.index]) - } else { - reject('上传失败!') - } - }) - }) - } - let array = this.imgList.map(item => { - if (item.id) { - return "" - } else { - return { - url: "learun/adms/annexes/upload" - } - } - }) - this.promiseAllLimit(2, [1, 2, 3, 4, 5, 6, 7, 8, 9], a).then(res => { - console.log(res) - }) - }, - - /** - * @description 控制promise.all并发数量 - * @param limit 并发数 - * @param array 参数列表 - * @param apiFn 执行函数 - * @returns {Promise[]>} - */ - async promiseAllLimit(limit, array, apiFn) { - const ret = [] // 用于存放所有的promise实例 - const executing = [] // 用于存放目前正在执行的promise - for (const item of array) { - const p = apiFn(item) - ret.push(p) - if (limit <= array.length) { - // then回调中,当这个promise状态变为fulfilled后,将其从正在执行的promise列表executing中删除 - const e = p.then(() => executing.splice(executing.indexOf(e), 1)) - executing.push(e) - if (executing.length >= limit) { - // 一旦正在执行的promise列表数量等于限制数,就使用Promise.race等待某一个promise状态发生变更, - // 状态变更后,就会执行上面then的回调,将该promise从executing中删除, - // 然后再进入到下一次for循环,生成新的promise进行补充 - await Promise.race(executing) - } - } - } - return Promise.all(ret) - }, - validate(array) { // let type = array.every(item=>{ // return item.type && item.type.substring(0,6) == "image/" @@ -233,33 +165,6 @@ }); } }, - - // previewFile() { - // var file = document.querySelector('input[type=file]').files[0]; - // var reader = new FileReader(); - // // fileReader.readAsDataURL(blob); - // // fileReader.onerror = () => { - // // reject(new Error('blobToBase64 error')); - // // }; - // // var encodedData = window.btoa("Hello, world"); - // reader.onloadend = function () { - // //$('#PhotoImg').attr('src', reader.result); - // var postData = { - // Base64Url: reader.result - // } - // this.HTTP_POST(config.webapi + "StuInfoFresh/savePhoto", postData, (data) => { - // if (data) { - // $('#Photo').val(data.AnnexesFileId); - // $('#PhotoImg').attr('src', config.web + data.Url); - // } else { - // learun.layer.toast('采集照片信息失败!'); - // } - // }); - // } - // if (file) { - // reader.readAsDataURL(file); - // } - // }, }, created() { console.log(this.value) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue index 5a6592cd6..9149ade63 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/list.vue @@ -70,7 +70,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue index bcfd2aa52..a24dcdbe9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/SYS_ReceiveMessage/single.vue @@ -45,8 +45,8 @@ - - - + + --> diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue index d1642f563..adb8edb70 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Sys_ReceiveFile/single.vue @@ -60,8 +60,8 @@ - - - + + --> diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue index 1a2b42a8f..1f5209251 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue @@ -1,4 +1,4 @@ -