From 724c9249d399cd258003d1c035077eb56cb838e6 Mon Sep 17 00:00:00 2001 From: "@jyuhsin" <729757837@qq.com> Date: Tue, 22 Oct 2024 16:25:08 +0800 Subject: [PATCH] commit --- .../mobile/MMeetingMineController.java | 9 +- .../meeting/service/MeetingMineService.java | 2 +- .../impl/MeetingCommonServiceImpl.java | 2 +- .../service/impl/MeetingMineServiceImpl.java | 31 ++++--- .../static/components/hd/hdwmInfo.vue | 17 +++- .../views/mobile/meeting/myMeeting.html | 19 +++- .../hd/wmhd/mobile/staffActivities.html | 92 ++++++++++++++++++- .../views/platform/meeting/index.html | 4 +- .../views/platform/meeting/manage/add.html | 7 -- 9 files changed, 147 insertions(+), 36 deletions(-) diff --git a/src/main/java/io/v/nutz/meeting/controller/mobile/MMeetingMineController.java b/src/main/java/io/v/nutz/meeting/controller/mobile/MMeetingMineController.java index f5528ff..17b3d17 100644 --- a/src/main/java/io/v/nutz/meeting/controller/mobile/MMeetingMineController.java +++ b/src/main/java/io/v/nutz/meeting/controller/mobile/MMeetingMineController.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil; import cn.wizzer.framework.base.Result; import io.v.nutz.annontation.ViReturn; import io.v.nutz.base.utils.DateUtil; +import io.v.nutz.base.utils.Vi; import io.v.nutz.meeting.models.MeetingInfo; import io.v.nutz.meeting.models.MeetingTimePeriodUser; import io.v.nutz.meeting.service.MeetingMineService; @@ -138,7 +139,11 @@ public class MMeetingMineController { group.orLike("u.loginname", query); cnd.and(group); } + if (!io.v.nutz.util.ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06"})) { + cnd.and("u.unionid", "=", Vi.getUnionId()); + } cnd.and("meetingId", "=", meetId); + cnd.groupBy("pu.userId"); sql.setCondition(cnd); return meetingMineService.listMap(sql); } @@ -153,7 +158,7 @@ public class MMeetingMineController { @Ok("json:full") @ViReturn @RequiresAuthentication - public Object askForLeave(@Param("data") String meetingTimePeriodUsers) { + public Object askForLeave(@Param("data") String meetingTimePeriodUsers, @Param("helpLeave") Boolean helpLeave) { //先清空,因为可能会涉及到修改 /*org.nutz.dao.Chain clearChain = Chain.make("isJoin", null); clearChain.add("stateCode", null); @@ -167,7 +172,7 @@ public class MMeetingMineController { if (Lang.isEmpty(meetingTimePeriod)) { return null; } - meetingMineService.askForLeave(meetingTimePeriod); + meetingMineService.askForLeave(meetingTimePeriod, helpLeave); return null; } diff --git a/src/main/java/io/v/nutz/meeting/service/MeetingMineService.java b/src/main/java/io/v/nutz/meeting/service/MeetingMineService.java index 1bb8c5f..2c2b02e 100644 --- a/src/main/java/io/v/nutz/meeting/service/MeetingMineService.java +++ b/src/main/java/io/v/nutz/meeting/service/MeetingMineService.java @@ -36,7 +36,7 @@ public interface MeetingMineService extends ViService { * @param tpuIds tpuId 不解释 * @param leaveReason 请假理由 */ - void askForLeave(List meetingTimePeriodUsers); + void askForLeave(List meetingTimePeriodUsers, Boolean helpLeave); /** * 参加会议确认 diff --git a/src/main/java/io/v/nutz/meeting/service/impl/MeetingCommonServiceImpl.java b/src/main/java/io/v/nutz/meeting/service/impl/MeetingCommonServiceImpl.java index 47770d5..2818246 100644 --- a/src/main/java/io/v/nutz/meeting/service/impl/MeetingCommonServiceImpl.java +++ b/src/main/java/io/v/nutz/meeting/service/impl/MeetingCommonServiceImpl.java @@ -55,7 +55,7 @@ public class MeetingCommonServiceImpl extends ViServiceImpl implements MeetingCo @Override public Integer findStartStateCodeByModuleName(String moduleName) { List auditStateList = dao().query(AuditState.class, Cnd.where("module", "=", moduleName).asc("stateId")); - Optional minOptional = auditStateList.stream().map(v -> v.getStateId()).min(Comparator.comparingInt(a -> a)).stream().findFirst(); + Optional minOptional = auditStateList.stream().map(AuditState::getStateId).min(Comparator.comparingInt(a -> a)).stream().findFirst(); return minOptional.orElse(null); } diff --git a/src/main/java/io/v/nutz/meeting/service/impl/MeetingMineServiceImpl.java b/src/main/java/io/v/nutz/meeting/service/impl/MeetingMineServiceImpl.java index 839b41b..3ca4806 100644 --- a/src/main/java/io/v/nutz/meeting/service/impl/MeetingMineServiceImpl.java +++ b/src/main/java/io/v/nutz/meeting/service/impl/MeetingMineServiceImpl.java @@ -55,10 +55,11 @@ public class MeetingMineServiceImpl extends ViServiceImpl implements MeetingMine LEFT JOIN audit_state state on state.stateId = mu.stateCode $condition """); - Sql userSql = Sqls.create("select meetingId from meeting_time_period_user where userId = @userId").setParam("userId", userId); - cnd.and("info.id", "in", userSql); - - cnd.and("mu.userid", "=", userId); + if (!io.v.nutz.util.ShiroUtil.hasAnyRoles(new String[]{"sysadmin", "A06", "H04", "jdhdbt01"})) { + Sql userSql = Sqls.create("select meetingId from meeting_time_period_user where userId = @userId").setParam("userId", userId); + cnd.and("info.id", "in", userSql); + cnd.and("mu.userid", "=", userId); + } if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { SqlExpressionGroup seg = new SqlExpressionGroup(); @@ -100,9 +101,10 @@ public class MeetingMineServiceImpl extends ViServiceImpl implements MeetingMine } @Override - public void askForLeave(List meetingTimePeriodUsers) { - String moduleName = meetingCommonService.findModuleNameByMeetingId(meetingTimePeriodUsers.get(0).getMeetingId()); - Integer stateCode = meetingCommonService.findStartStateCodeByModuleName(moduleName); + public void askForLeave(List meetingTimePeriodUsers, Boolean helpLeave) { + String meetingId = meetingTimePeriodUsers.get(0).getMeetingId(); + String moduleName = meetingCommonService.findModuleNameByMeetingId(meetingId); + Integer stateCode = helpLeave ? meetingCommonService.findSuccessStateCode(meetingId) : meetingCommonService.findStartStateCodeByModuleName(moduleName); if (stateCode != null) { meetingTimePeriodUsers.forEach(item -> { @@ -111,15 +113,16 @@ public class MeetingMineServiceImpl extends ViServiceImpl implements MeetingMine }); dao().updateIgnoreNull(meetingTimePeriodUsers); - List userIdMap = meetingCommonService.getNextAuditUser(stateCode, moduleName); - List userInfoStr = msgNotifyService.userData(userIdMap); + if(!helpLeave) { + List userIdMap = meetingCommonService.getNextAuditUser(stateCode, moduleName); + List userInfoStr = msgNotifyService.userData(userIdMap); - String meetingId = meetingTimePeriodUsers.get(0).getMeetingId(); - MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, meetingId); + MeetingInfo meetingInfo = dao().fetch(MeetingInfo.class, meetingId); - String loginname = ShiroUtil.getPlatformUsername(); - String msgStr = String.format("%s针对%s提交了请假申请,请您审批!", loginname, meetingInfo.getMeetingName()); - //msgApi.sendSmsMsg(userInfoStr, msgStr); + String loginname = ShiroUtil.getPlatformUsername(); + String msgStr = String.format("%s针对%s提交了请假申请,请您审批!", loginname, meetingInfo.getMeetingName()); + //msgApi.sendSmsMsg(userInfoStr, msgStr); + } } } diff --git a/src/main/resources/static/components/hd/hdwmInfo.vue b/src/main/resources/static/components/hd/hdwmInfo.vue index a58d63e..3d9de1b 100644 --- a/src/main/resources/static/components/hd/hdwmInfo.vue +++ b/src/main/resources/static/components/hd/hdwmInfo.vue @@ -48,13 +48,23 @@ 创作说明 {{ viewData.hdsbzpms }} - + 作品信息 照片  + + 音/视频、文档  + + + + + + 压缩包  + + - + - - - + + + @@ -423,6 +423,59 @@ + + @@ -535,6 +588,7 @@ audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'], doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'], videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'], + ziptype: ['zip', 'rar'], chooseLb: {}, } }, @@ -560,6 +614,11 @@ this.readytodelfile.push(filepath); } , + zipDelete(idx, i, filepath) { + this.fd[i].zipList.splice(idx, 1) + this.readytodelfile.push(filepath); + } + , onConfirm(value) { this.formData.hdzplx2 = value.zname; this.showPicker = false; @@ -657,6 +716,9 @@ this.fd[i].videoList.forEach(val => { formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name)); }) + this.fd[i].zipList.forEach(val => { + formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name)); + }) formData2.append("hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss')); } if (!this.isNull(this.formData.id)) { @@ -669,6 +731,9 @@ this.fd[i].videoList.forEach(val => { formData2.append("file", val.file); }); + this.fd[i].zipList.forEach(val => { + formData2.append("file", val.file); + }); $.ajax({ url: "/platform/hd/jzghd/sczp/doEdit", type: "post", @@ -693,6 +758,7 @@ vue.fd[i].sbsj = '' vue.fd[i].imgList = [] vue.fd[i].videoList = [] + vue.fd[i].zipList = [] vue.fd[i].audioList = [] Cookies.remove('sa_formData'); @@ -742,6 +808,7 @@ vue.fd[i].sbsj = '' vue.fd[i].imgList = [] vue.fd[i].videoList = [] + vue.fd[i].zipList = [] vue.fd[i].audioList = [] Cookies.remove('sa_formData'); @@ -799,6 +866,19 @@ return false } return true + }, + beforeReadZip: function (file, detail) { + var suffix = getSuffix(file.name) + if (suffix == null) { + this.$toast('获取不到后缀名!') + return false + } + const suf = file.name.split('.').pop().toLowerCase() + if (this.chooseLb.zipType.indexOf(suf) === -1) { + this.$toast('支持的文件类型:' + this.chooseLb.zipType.toString()) + return false + } + return true } , }, @@ -822,6 +902,7 @@ zplb: '', imgList: [], videoList: [], + zipList: [], }) }) this.boxData = data.data @@ -866,12 +947,15 @@ const filetype = v.filename.substring(v.filename.lastIndexOf(".") + 1) const aa = this.audiotype.concat(this.videotype) const bb = this.doctype.concat(this.doctype) + const zip = this.ziptype.concat(this.ziptype) if (this.imgtype.indexOf(filetype) > -1) { this.fd[refs[0].llocation - 1].imgList.push(v) } else if (aa.indexOf(filetype) > -1) { this.fd[refs[0].llocation - 1].videoList.push(v); } else if (bb.indexOf(filetype) > -1) { this.fd[refs[0].llocation - 1].videoList.push(v); + } else if (zip.indexOf(filetype) > -1) { + this.fd[refs[0].llocation - 1].zipList.push(v); } }) diff --git a/src/main/resources/views/platform/meeting/index.html b/src/main/resources/views/platform/meeting/index.html index c2823e0..554c06a 100644 --- a/src/main/resources/views/platform/meeting/index.html +++ b/src/main/resources/views/platform/meeting/index.html @@ -86,8 +86,8 @@ layout("/layouts/platform.html"){ tableColumns: [ {prop: 'meetingName', label: '会议名称', sortable: true}, {prop: 'meetingTypeName', label: '会议类型', sortable: true}, - {prop: 'startTime', label: '会议时间', sortable: true}, - /*{prop: 'endTime', label: '结束时间', sortable: true},*/ + {prop: 'startTime', label: '开始时间', sortable: true}, + {prop: 'endTime', label: '结束时间', sortable: true}, {prop: 'location', label: '会议地点', sortable: true}, {prop: 'isCanLeave', label: '能否请假', sortable: true}, ], diff --git a/src/main/resources/views/platform/meeting/manage/add.html b/src/main/resources/views/platform/meeting/manage/add.html index 0a67030..30a53c2 100644 --- a/src/main/resources/views/platform/meeting/manage/add.html +++ b/src/main/resources/views/platform/meeting/manage/add.html @@ -246,13 +246,6 @@ layout("/layouts/platform.html"){ this.formData.meetingTimePeriods[0].endTime = val[1] } }, - 'formData.meetTime'(val) { - if (val) { - //结束时间往后加30分钟 - const endTime = moment(val).add(30, 'm').format('YYYY-MM-DD HH:mm:ss') - this.formData.meetingTime = [val, endTime] - } - } }, })