├── .gitignore ├── README.md ├── art ├── emos_check1.jpeg ├── emos_check2.jpeg ├── emos_check3.jpeg ├── emos_meet1.jpeg ├── emos_meet2.jpeg ├── emos_meet3.jpeg ├── emos_meet4.jpeg ├── emos_tab1.jpeg ├── emos_tab2.jpeg ├── emos_tab3.jpeg ├── emos_tab4.jpeg ├── emos_tab5.jpeg ├── wecatapp_qr_2.jpg └── wechat.png └── source ├── client └── emos-wx │ ├── .hbuilderx │ └── launch.json │ ├── App.vue │ ├── components │ ├── uni-badge │ │ └── uni-badge.vue │ ├── uni-calendar │ │ ├── calendar.js │ │ ├── uni-calendar-item.vue │ │ ├── uni-calendar.vue │ │ └── util.js │ ├── uni-icons │ │ ├── icons.js │ │ ├── uni-icons.vue │ │ └── uni.ttf │ ├── uni-list-ad │ │ └── uni-list-ad.vue │ ├── uni-list-chat │ │ ├── uni-list-chat.scss │ │ └── uni-list-chat.vue │ ├── uni-list-item │ │ └── uni-list-item.vue │ ├── uni-list │ │ ├── uni-list.vue │ │ ├── uni-refresh.vue │ │ └── uni-refresh.wxs │ ├── uni-popup │ │ ├── message.js │ │ ├── popup.js │ │ ├── uni-popup-dialog.vue │ │ ├── uni-popup-message.vue │ │ ├── uni-popup-share.vue │ │ └── uni-popup.vue │ ├── uni-segmented-control │ │ └── uni-segmented-control.vue │ └── uni-transition │ │ └── uni-transition.vue │ ├── lib │ └── qqmap-wx-jssdk.min.js │ ├── main.js │ ├── manifest.json │ ├── pages.json │ ├── pages │ ├── approval │ │ ├── approval.less │ │ └── approval.vue │ ├── approval_list │ │ ├── approval_list.less │ │ └── approval_list.vue │ ├── checkin │ │ ├── checkin.less │ │ └── checkin.vue │ ├── checkin_result │ │ ├── checkin_result.less │ │ └── checkin_result.vue │ ├── contacts │ │ ├── contacts.less │ │ └── contacts.vue │ ├── dept_list │ │ ├── dept_list.less │ │ └── dept_list.vue │ ├── document-detail │ │ └── document-detail.vue │ ├── document │ │ ├── document.less │ │ └── document.vue │ ├── employee-detail │ │ ├── employee-detail.less │ │ └── employee-detail.vue │ ├── employeelist │ │ ├── employeelist.less │ │ └── employeelist.vue │ ├── healthy │ │ ├── healthy.less │ │ └── healthy.vue │ ├── index │ │ ├── index.less │ │ └── index.vue │ ├── login │ │ ├── login.less │ │ └── login.vue │ ├── manage_employee │ │ ├── manage_employee.less │ │ └── manage_employee.vue │ ├── meeting │ │ ├── meeting.less │ │ └── meeting.vue │ ├── meeting_list │ │ ├── meeting_list.vue │ │ └── metting_list.less │ ├── member │ │ ├── member.less │ │ └── member.vue │ ├── message_detail │ │ ├── message_detail.less │ │ └── message_detail.vue │ ├── message_list │ │ ├── message_list.less │ │ └── message_list.vue │ ├── mgr_employee_detail │ │ ├── mgr_employee_detail.less │ │ └── mgr_employee_detail.vue │ ├── mgr_unactive_employee │ │ ├── mgr_unactive_employee.less │ │ └── mgr_unactive_employee.vue │ ├── mgr_unactive_employee_detail │ │ ├── mgr_unactive_employee_detail.less │ │ └── mgr_unactive_employee_detail.vue │ ├── mine-info │ │ ├── mine-info.less │ │ └── mine-info.vue │ ├── mine │ │ ├── mine.less │ │ └── mine.vue │ ├── my_checkin │ │ ├── my_checkin.less │ │ └── my_checkin.vue │ ├── register │ │ ├── register.less │ │ └── register.vue │ ├── role │ │ ├── role.less │ │ └── role.vue │ ├── role_list │ │ ├── role_list.less │ │ └── role_list.vue │ └── search-contact │ │ └── search-contact.vue │ ├── static │ ├── bar-1-active.png │ ├── bar-1.png │ ├── bar-2-active.png │ ├── bar-2.png │ ├── bar-3-active.png │ ├── bar-3.png │ ├── bar-4-active.png │ ├── bar-4.png │ ├── bar-5-active.png │ ├── bar-5.png │ ├── big-icon-1.png │ ├── call.png │ ├── document.png │ ├── high-risk.png │ ├── icon-1.png │ ├── icon-10.png │ ├── icon-11.png │ ├── icon-12.png │ ├── icon-13.png │ ├── icon-14.png │ ├── icon-15.png │ ├── icon-16.png │ ├── icon-17.png │ ├── icon-18.png │ ├── icon-19.png │ ├── icon-2.png │ ├── icon-20.png │ ├── icon-3.png │ ├── icon-4.png │ ├── icon-5.png │ ├── icon-6.png │ ├── icon-7.png │ ├── icon-8.png │ ├── icon-9.png │ ├── logo-1.png │ ├── logo-2.png │ ├── logo-3.jpg │ ├── logo.png │ ├── low-risk.png │ ├── middle-risk.png │ ├── nav-1.png │ ├── nav-10.png │ ├── nav-11.png │ ├── nav-12.png │ ├── nav-2.png │ ├── nav-3.png │ ├── nav-4.png │ ├── nav-5.png │ ├── nav-6.png │ ├── nav-7.png │ ├── nav-8.png │ ├── nav-9.png │ ├── search.png │ ├── system.jpg │ └── user.png │ ├── style.less │ └── uni.scss ├── server ├── .gitignore ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── vincent │ │ │ └── emos │ │ │ └── wx │ │ │ ├── EmosServerApplication.java │ │ │ ├── SystemConstants.java │ │ │ ├── aop │ │ │ └── TokenAspect.java │ │ │ ├── common │ │ │ └── util │ │ │ │ ├── Imagebase64.java │ │ │ │ └── R.java │ │ │ ├── config │ │ │ ├── ExceptionAdvice.java │ │ │ ├── RabbitMQConfig.java │ │ │ ├── SwaggerConfig.java │ │ │ ├── ThreadPoolConfig.java │ │ │ ├── shiro │ │ │ │ ├── JwtUtil.java │ │ │ │ ├── OAuth2Filter.java │ │ │ │ ├── OAuth2Realm.java │ │ │ │ ├── OAuth2Token.java │ │ │ │ ├── ShiroConfig.java │ │ │ │ └── ThreadLocalToken.java │ │ │ └── xss │ │ │ │ ├── XssFilter.java │ │ │ │ └── XssHttpServletRequestWrapper.java │ │ │ ├── controller │ │ │ ├── CheckinController.java │ │ │ ├── DeptController.java │ │ │ ├── DocumentController.java │ │ │ ├── EmployeeController.java │ │ │ ├── HealthyController.java │ │ │ ├── MeetingApprovalController.java │ │ │ ├── MeetingController.java │ │ │ ├── MessageController.java │ │ │ ├── RoleController.java │ │ │ ├── TestController.java │ │ │ ├── UserController.java │ │ │ └── form │ │ │ │ ├── ApprovalMeetingForm.java │ │ │ │ ├── CheckinForm.java │ │ │ │ ├── DeleteDeptForm.java │ │ │ │ ├── DeleteEmployeeForm.java │ │ │ │ ├── DeleteMeetingByIdForm.java │ │ │ │ ├── DeleteMessageRefByIdForm.java │ │ │ │ ├── DeleteRoleForm.java │ │ │ │ ├── DismissionEmployeeForm.java │ │ │ │ ├── GetRiskCheckCountForm.java │ │ │ │ ├── InsertDeptForm.java │ │ │ │ ├── InsertEmployeeForm.java │ │ │ │ ├── InsertMeetingForm.java │ │ │ │ ├── InsertRoleForm.java │ │ │ │ ├── LoginForm.java │ │ │ │ ├── RegisterCodeForm.java │ │ │ │ ├── RegisterForm.java │ │ │ │ ├── SearchContactForm.java │ │ │ │ ├── SearchEmployeeForm.java │ │ │ │ ├── SearchMeetingByIdForm.java │ │ │ │ ├── SearchMembersForm.java │ │ │ │ ├── SearchMessageByIdForm.java │ │ │ │ ├── SearchMessageByPageForm.java │ │ │ │ ├── SearchMonthCheckinForm.java │ │ │ │ ├── SearchMyMeetingListByPageForm.java │ │ │ │ ├── SearchRoleOwnPermissionForm.java │ │ │ │ ├── SearchUserByIdForm.java │ │ │ │ ├── SearchUserGroupByDeptForm.java │ │ │ │ ├── SearchUserMeetingInMonthForm.java │ │ │ │ ├── SelectUserPhotoAndNameForm.java │ │ │ │ ├── TestSayHelloForm.java │ │ │ │ ├── UpdateDeptForm.java │ │ │ │ ├── UpdateEmployeeForm.java │ │ │ │ ├── UpdateEmployeeStateForm.java │ │ │ │ ├── UpdateMeetingInfoForm.java │ │ │ │ ├── UpdateRolePermissionsForm.java │ │ │ │ └── UpdateUnreadMessageForm.java │ │ │ ├── db │ │ │ ├── dao │ │ │ │ ├── MessageDao.java │ │ │ │ ├── MessageRefDao.java │ │ │ │ ├── SysConfigDao.java │ │ │ │ ├── TbActionDao.java │ │ │ │ ├── TbCheckinDao.java │ │ │ │ ├── TbCityDao.java │ │ │ │ ├── TbDeptDao.java │ │ │ │ ├── TbEmployeeDao.java │ │ │ │ ├── TbFaceModelDao.java │ │ │ │ ├── TbHolidaysDao.java │ │ │ │ ├── TbMeetingApprovalDao.java │ │ │ │ ├── TbMeetingDao.java │ │ │ │ ├── TbModuleDao.java │ │ │ │ ├── TbPermissionDao.java │ │ │ │ ├── TbRoleDao.java │ │ │ │ ├── TbUserDao.java │ │ │ │ └── TbWorkdayDao.java │ │ │ └── pojo │ │ │ │ ├── ContactList.java │ │ │ │ ├── DocumentFile.java │ │ │ │ ├── EmployeeList.java │ │ │ │ ├── MessageEntity.java │ │ │ │ ├── MessageRefEntity.java │ │ │ │ ├── SysConfig.java │ │ │ │ ├── TbAction.java │ │ │ │ ├── TbCheckin.java │ │ │ │ ├── TbCity.java │ │ │ │ ├── TbDept.java │ │ │ │ ├── TbEmployee.java │ │ │ │ ├── TbFaceModel.java │ │ │ │ ├── TbHolidays.java │ │ │ │ ├── TbMeeting.java │ │ │ │ ├── TbMeetingApproval.java │ │ │ │ ├── TbModule.java │ │ │ │ ├── TbPermission.java │ │ │ │ ├── TbRole.java │ │ │ │ ├── TbUser.java │ │ │ │ └── TbWorkday.java │ │ │ ├── exception │ │ │ └── EmosException.java │ │ │ ├── service │ │ │ ├── CheckinService.java │ │ │ ├── DeptService.java │ │ │ ├── EmployeeService.java │ │ │ ├── HealthyService.java │ │ │ ├── MeetingService.java │ │ │ ├── MessageService.java │ │ │ ├── RoleService.java │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ ├── CheckinServiceImpl.java │ │ │ │ ├── DeptServiceImpl.java │ │ │ │ ├── EmployeeServiceImpl.java │ │ │ │ ├── HealthyServiceImpl.java │ │ │ │ ├── MeetingServiceImpl.java │ │ │ │ ├── MessageServiceImpl.java │ │ │ │ ├── RoleServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ ├── task │ │ │ ├── EmailTask.java │ │ │ └── MessageTask.java │ │ │ └── tencentcloud │ │ │ ├── TencentService.java │ │ │ ├── face │ │ │ ├── FaceLibraryService.java │ │ │ └── FaceVerifyService.java │ │ │ ├── storage │ │ │ └── StorageService.java │ │ │ └── util │ │ │ └── RiskUtil.java │ └── resources │ │ ├── application.yml │ │ └── mapper │ │ ├── SysConfigDao.xml │ │ ├── TbActionDao.xml │ │ ├── TbCheckinDao.xml │ │ ├── TbCityDao.xml │ │ ├── TbDeptDao.xml │ │ ├── TbEmployeeDao.xml │ │ ├── TbFaceModelDao.xml │ │ ├── TbHolidaysDao.xml │ │ ├── TbMeetingApprovalDao.xml │ │ ├── TbMeetingDao.xml │ │ ├── TbModuleDao.xml │ │ ├── TbPermissionDao.xml │ │ ├── TbRoleDao.xml │ │ ├── TbUserDao.xml │ │ └── TbWorkdayDao.xml │ └── test │ └── java │ └── com │ └── vincent │ └── emos │ └── wx │ └── EmosServerApplicationTests.java └── tool └── emos.sql /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | source/server/dump.rdb 3 | *.png 4 | Source/client/emos-wx/unpackage -------------------------------------------------------------------------------- /art/emos_check1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_check1.jpeg -------------------------------------------------------------------------------- /art/emos_check2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_check2.jpeg -------------------------------------------------------------------------------- /art/emos_check3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_check3.jpeg -------------------------------------------------------------------------------- /art/emos_meet1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_meet1.jpeg -------------------------------------------------------------------------------- /art/emos_meet2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_meet2.jpeg -------------------------------------------------------------------------------- /art/emos_meet3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_meet3.jpeg -------------------------------------------------------------------------------- /art/emos_meet4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_meet4.jpeg -------------------------------------------------------------------------------- /art/emos_tab1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_tab1.jpeg -------------------------------------------------------------------------------- /art/emos_tab2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_tab2.jpeg -------------------------------------------------------------------------------- /art/emos_tab3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_tab3.jpeg -------------------------------------------------------------------------------- /art/emos_tab4.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_tab4.jpeg -------------------------------------------------------------------------------- /art/emos_tab5.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/emos_tab5.jpeg -------------------------------------------------------------------------------- /art/wecatapp_qr_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/wecatapp_qr_2.jpg -------------------------------------------------------------------------------- /art/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/art/wechat.png -------------------------------------------------------------------------------- /source/client/emos-wx/.hbuilderx/launch.json: -------------------------------------------------------------------------------- 1 | { // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ 2 | // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 3 | "version": "0.0", 4 | "configurations": [{ 5 | "type": "uniCloud", 6 | "default": { 7 | "launchtype": "remote" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /source/client/emos-wx/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-icons/uni.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/components/uni-icons/uni.ttf -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-list-ad/uni-list-ad.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 71 | 72 | 108 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-list-chat/uni-list-chat.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是 uni-list 组件内置的常用样式变量 3 | * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码 4 | * 5 | */ 6 | 7 | // 背景色 8 | $background-color : #fff; 9 | // 分割线颜色 10 | $divide-line-color : #e5e5e5; 11 | 12 | // 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像 13 | // nvue 页面不支持修改头像大小 14 | $avatar-width : 45px ; 15 | 16 | // 头像边框 17 | $avatar-border-radius: 5px; 18 | $avatar-border-color: #eee; 19 | $avatar-border-width: 1px; 20 | 21 | // 标题文字样式 22 | $title-size : 16px; 23 | $title-color : #3b4144; 24 | $title-weight : normal; 25 | 26 | // 描述文字样式 27 | $note-size : 12px; 28 | $note-color : #999; 29 | $note-weight : normal; 30 | 31 | // 右侧额外内容默认样式 32 | $right-text-size : 12px; 33 | $right-text-color : #999; 34 | $right-text-weight : normal; 35 | 36 | // 角标样式 37 | // nvue 页面不支持修改圆点位置以及大小 38 | // 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动 39 | $badge-left: 0px; 40 | $badge-top: 0px; 41 | 42 | // 显示圆点时,圆点大小 43 | $dot-width: 10px; 44 | $dot-height: 10px; 45 | 46 | // 显示角标时,角标大小和字体大小 47 | $badge-size : 18px; 48 | $badge-font : 12px; 49 | // 显示角标时,角标前景色 50 | $badge-color : #fff; 51 | // 显示角标时,角标背景色 52 | $badge-background-color : #ff5a5f; 53 | // 显示角标时,角标左右间距 54 | $badge-space : 6px; 55 | 56 | // 状态样式 57 | // 选中颜色 58 | $hover : #f5f5f5; 59 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-list/uni-list.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 57 | 107 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-list/uni-refresh.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 59 | 60 | 66 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-list/uni-refresh.wxs: -------------------------------------------------------------------------------- 1 | var pullDown = { 2 | threshold: 95, 3 | maxHeight: 200, 4 | callRefresh: 'onrefresh', 5 | callPullingDown: 'onpullingdown', 6 | refreshSelector: '.uni-refresh' 7 | }; 8 | 9 | function ready(newValue, oldValue, ownerInstance, instance) { 10 | var state = instance.getState() 11 | state.canPullDown = newValue; 12 | // console.log(newValue); 13 | } 14 | 15 | function touchStart(e, instance) { 16 | var state = instance.getState(); 17 | state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); 18 | state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); 19 | if (!state.canPullDown) { 20 | return 21 | } 22 | 23 | // console.log("touchStart"); 24 | 25 | state.height = 0; 26 | state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; 27 | state.refreshInstance.setStyle({ 28 | 'height': 0 29 | }); 30 | state.refreshInstance.callMethod("onchange", true); 31 | } 32 | 33 | function touchMove(e, ownerInstance) { 34 | var instance = e.instance; 35 | var state = instance.getState(); 36 | if (!state.canPullDown) { 37 | return 38 | } 39 | 40 | var oldHeight = state.height; 41 | var endY = e.touches[0].pageY || e.changedTouches[0].pageY; 42 | var height = endY - state.touchStartY; 43 | if (height > pullDown.maxHeight) { 44 | return; 45 | } 46 | 47 | var refreshInstance = state.refreshInstance; 48 | refreshInstance.setStyle({ 49 | 'height': height + 'px' 50 | }); 51 | 52 | height = height < pullDown.maxHeight ? height : pullDown.maxHeight; 53 | state.height = height; 54 | refreshInstance.callMethod(pullDown.callPullingDown, { 55 | height: height 56 | }); 57 | } 58 | 59 | function touchEnd(e, ownerInstance) { 60 | var state = e.instance.getState(); 61 | if (!state.canPullDown) { 62 | return 63 | } 64 | 65 | state.refreshInstance.callMethod("onchange", false); 66 | 67 | var refreshInstance = state.refreshInstance; 68 | if (state.height > pullDown.threshold) { 69 | refreshInstance.callMethod(pullDown.callRefresh); 70 | return; 71 | } 72 | 73 | refreshInstance.setStyle({ 74 | 'height': 0 75 | }); 76 | } 77 | 78 | function propObserver(newValue, oldValue, instance) { 79 | pullDown = newValue; 80 | } 81 | 82 | module.exports = { 83 | touchmove: touchMove, 84 | touchstart: touchStart, 85 | touchend: touchEnd, 86 | propObserver: propObserver 87 | } 88 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-popup/message.js: -------------------------------------------------------------------------------- 1 | export default { 2 | created() { 3 | if (this.type === 'message') { 4 | // 不显示遮罩 5 | this.maskShow = false 6 | // 获取子组件对象 7 | this.childrenMsg = null 8 | } 9 | }, 10 | methods: { 11 | customOpen() { 12 | if (this.childrenMsg) { 13 | this.childrenMsg.open() 14 | } 15 | }, 16 | customClose() { 17 | if (this.childrenMsg) { 18 | this.childrenMsg.close() 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-popup/popup.js: -------------------------------------------------------------------------------- 1 | import message from './message.js'; 2 | // 定义 type 类型:弹出类型:top/bottom/center 3 | const config = { 4 | // 顶部弹出 5 | top:'top', 6 | // 底部弹出 7 | bottom:'bottom', 8 | // 居中弹出 9 | center:'center', 10 | // 消息提示 11 | message:'top', 12 | // 对话框 13 | dialog:'center', 14 | // 分享 15 | share:'bottom', 16 | } 17 | 18 | export default { 19 | data(){ 20 | return { 21 | config:config 22 | } 23 | }, 24 | mixins: [message], 25 | } 26 | -------------------------------------------------------------------------------- /source/client/emos-wx/components/uni-popup/uni-popup-message.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 68 | 117 | -------------------------------------------------------------------------------- /source/client/emos-wx/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "emos-wx", 3 | "appid" : "__UNI__C840C05", 4 | "description" : "", 5 | "versionName" : "1.0.0", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | /* 5+App特有相关 */ 9 | "app-plus" : { 10 | "usingComponents" : true, 11 | "nvueCompiler" : "uni-app", 12 | "compilerVersion" : 3, 13 | "splashscreen" : { 14 | "alwaysShowBeforeRender" : true, 15 | "waiting" : true, 16 | "autoclose" : true, 17 | "delay" : 0 18 | }, 19 | /* 模块配置 */ 20 | "modules" : {}, 21 | /* 应用发布信息 */ 22 | "distribute" : { 23 | /* android打包配置 */ 24 | "android" : { 25 | "permissions" : [ 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "", 37 | "", 38 | "", 39 | "", 40 | "" 41 | ] 42 | }, 43 | /* ios打包配置 */ 44 | "ios" : {}, 45 | /* SDK配置 */ 46 | "sdkConfigs" : {} 47 | } 48 | }, 49 | /* 快应用特有相关 */ 50 | "quickapp" : {}, 51 | /* 小程序特有相关 */ 52 | "mp-weixin" : { 53 | "appid" : "", 54 | "setting" : { 55 | "urlCheck" : false 56 | }, 57 | "usingComponents" : true, 58 | "permission" : { 59 | "scope.userLocation" : { 60 | "desc" : "签到需要位置权限" 61 | } 62 | } 63 | }, 64 | "mp-alipay" : { 65 | "usingComponents" : true 66 | }, 67 | "mp-baidu" : { 68 | "usingComponents" : true 69 | }, 70 | "mp-toutiao" : { 71 | "usingComponents" : true 72 | }, 73 | "uniStatistics" : { 74 | "enable" : false 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/approval/approval.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | padding: 35rpx 0; 4 | } 5 | .header{ 6 | margin-bottom: 15rpx; 7 | font-size: 34rpx; 8 | color: @background-color; 9 | font-weight: bold; 10 | padding: 0 50rpx; 11 | } 12 | .attr{ 13 | padding: 0 35rpx; 14 | border-bottom: solid 20rpx #EEEEF4; 15 | .list{ 16 | .item{ 17 | padding: 30rpx 10rpx 30rpx 15rpx; 18 | border-bottom: solid 1rpx #f0f0f0; 19 | font-size: 30rpx; 20 | color: @font-color; 21 | display: flex; 22 | justify-content: space-between; 23 | .key{ 24 | } 25 | .value{ 26 | display: block; 27 | color: @font-color; 28 | } 29 | } 30 | } 31 | .desc{ 32 | display: block; 33 | font-size: 30rpx; 34 | padding: 30rpx 10rpx 30rpx 15rpx; 35 | color: @font-color; 36 | line-height: 1.6; 37 | } 38 | } 39 | .members{ 40 | padding: 45rpx 25rpx; 41 | .number{ 42 | margin-bottom: 35rpx; 43 | color: @background-color; 44 | font-size: 34rpx; 45 | font-weight: bold; 46 | padding-left: 20rpx; 47 | } 48 | .member{ 49 | display: flex; 50 | flex-wrap: wrap; 51 | justify-content: flex-start; 52 | .user{ 53 | width: 100rpx; 54 | text-align: center; 55 | max-width: 20%; 56 | min-width: 20%; 57 | margin-bottom: 40rpx; 58 | .photo{ 59 | width: 100rpx; 60 | height: 100rpx; 61 | border-radius: 50rpx; 62 | margin-bottom: 5rpx; 63 | } 64 | .name{ 65 | font-size: 30rpx; 66 | color: @font-color; 67 | display: block; 68 | text-align: center; 69 | } 70 | } 71 | } 72 | } 73 | .btn{ 74 | margin: 0 35rpx 35rpx 55rpx; 75 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/checkin/checkin.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .camera,.image{ 4 | width: 100%; 5 | height: 400px; 6 | } 7 | 8 | .operate-cotainer{ 9 | margin-top: 50rpx; 10 | display: flex; 11 | justify-content: center; 12 | } 13 | .btn{ 14 | width: 40%; 15 | &:first-child{ 16 | margin-right: 30rpx; 17 | } 18 | } 19 | 20 | .notice-container{ 21 | padding: 40rpx 60rpx; 22 | 23 | } 24 | .notice{ 25 | font-size: 40rpx; 26 | color: @font-color; 27 | font-weight: bold; 28 | display: block; 29 | margin-bottom: 15rpx; 30 | } 31 | .des{ 32 | display: block; 33 | font-size: 32rpx; 34 | color: @desc-color; 35 | line-height: 1.6; 36 | 37 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/contacts/contacts.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | 4 | .title{ 5 | display: block; 6 | padding: 30rpx; 7 | color: #848484; 8 | background-color: #F6F6F6; 9 | } 10 | 11 | .head{ 12 | padding: 30rpx 30rpx; 13 | background-color: #F6F6F6; 14 | } 15 | .search{ 16 | 17 | border: 1px solid #EEEEEE ; 18 | color: #BDBDBD; 19 | background-color: #FFFFFF; 20 | border-radius: 8px; 21 | } 22 | .search-word{ 23 | display: inline; 24 | } 25 | .icon{ 26 | margin-left: 10rpx; 27 | margin-right: 20rpx; 28 | width: 40rpx; 29 | display: inline-block; 30 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/contacts/contacts.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 68 | 69 | 73 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/dept_list/dept_list.less: -------------------------------------------------------------------------------- 1 | @import url("../../style.less"); 2 | .page{ 3 | padding: 35rpx; 4 | } 5 | .list{ 6 | .item{ 7 | padding: 30rpx 15rpx; 8 | border-bottom: solid 1rpx #E5E5E5; 9 | font-size: 30rpx; 10 | color: #333; 11 | display: flex; 12 | justify-content: space-between; 13 | .key{ 14 | } 15 | .value{ 16 | color: @background-color; 17 | } 18 | .icon{ 19 | width: 40rpx; 20 | } 21 | } 22 | } 23 | .btn{ 24 | margin-top: 100rpx; 25 | background-color: @background-color; 26 | color: #fff; 27 | &:active{ 28 | background-color: @background-color-active; 29 | } 30 | } 31 | .icon{ 32 | 33 | height: 20rpx; 34 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/document-detail/document-detail.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | 24 | 27 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/document/document.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/document/document.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 76 | 77 | 80 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/employee-detail/employee-detail.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .icon { 4 | width: 50rpx; 5 | position: absolute; 6 | right: 30rpx; 7 | vertical-align: middle; 8 | } 9 | 10 | .title { 11 | color: @font-color; 12 | font-size: 36rpx; 13 | } 14 | 15 | .name { 16 | padding: 30rpx; 17 | font-size: 40rpx; 18 | } 19 | 20 | .des { 21 | margin-top: 10rpx; 22 | color: @desc-color; 23 | margin-bottom: 20rpx; 24 | } 25 | 26 | .left { 27 | display: inline-block; 28 | 29 | } 30 | 31 | .item { 32 | background-color: #FFFFFF; 33 | margin: 30rpx; 34 | border-bottom: 1rpx solid #F2F2F2; 35 | } 36 | 37 | .head { 38 | display: block; 39 | padding: 30rpx; 40 | color: #848484; 41 | background-color: #F6F6F6; 42 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/employee-detail/employee-detail.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 72 | 73 | 78 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/employeelist/employeelist.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/employeelist/employeelist.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 47 | 71 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/healthy/healthy.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | page { 3 | height: 100%; 4 | } 5 | .contianer{ 6 | 7 | width: 100%; 8 | height:100%; 9 | 10 | display: flex; 11 | flex-direction: column; 12 | 13 | flex-wrap: nowrap ; 14 | justify-content: center; 15 | align-items: center; 16 | } 17 | .page { 18 | margin: 0; 19 | 20 | display: flex; 21 | flex-direction: column; 22 | 23 | flex-wrap: nowrap ; 24 | justify-content: center; 25 | align-items: center; 26 | 27 | } 28 | .icon{ 29 | 30 | width: 350rpx; 31 | 32 | } 33 | .risk{ 34 | 35 | font-size:40rpx ; 36 | } 37 | 38 | .tip{ 39 | 40 | font-size:40rpx ; 41 | } 42 | .green{ 43 | color: #26983D; 44 | } 45 | .yellow{ 46 | color: #F3E956; 47 | } 48 | .red{ 49 | color: #DD1817; 50 | } 51 | .count{ 52 | display: flex; 53 | flex-direction: column; 54 | width: 100%; 55 | flex-wrap: nowrap ; 56 | justify-content: center; 57 | align-items: center; 58 | 59 | font-size: 40rpx; 60 | margin-top: 20rpx; 61 | } 62 | .count-text{ 63 | margin-top: 30rpx; 64 | 65 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/index/index.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | background-color: #EEEEF4; 4 | } 5 | .swiper{ 6 | 7 | height: 236px; 8 | image{ 9 | width: 100% !important; 10 | } 11 | } 12 | .notify-container{ 13 | background-color: #fff; 14 | padding: 25rpx; 15 | position: relative; 16 | margin-bottom: 20rpx; 17 | 18 | } 19 | .notify-title{ 20 | font-size: 32rpx; 21 | color: @background-color; 22 | margin-bottom: 10rpx; 23 | } 24 | 25 | .notify-icon{ 26 | width: 38rpx; 27 | margin-right: 5rpx; 28 | vertical-align: -8rpx; 29 | } 30 | .notify-content{ 31 | font-size: 30rpx; 32 | color: @font-color; 33 | &:before{ 34 | display: inline-block; 35 | content: ""; 36 | width: 12rpx; 37 | height: 12rpx; 38 | border-radius: 6rpx; 39 | background-color: red; 40 | margin-left: 18rpx; 41 | margin-right: 15rpx; 42 | vertical-align: 3rpx; 43 | } 44 | } 45 | .more-icon{ 46 | position: absolute; 47 | right: 5rpx; 48 | top: 50rpx; 49 | width: 60rpx; 50 | } 51 | 52 | .nav-container{ 53 | 54 | background-color: #fff; 55 | margin-bottom: 20rpx; 56 | padding: 50rpx 40rpx; 57 | 58 | 59 | } 60 | .nav-row{ 61 | display: flex; 62 | justify-content: space-between; 63 | margin-bottom: 50rpx; 64 | } 65 | .nav{ 66 | text-align: center; 67 | } 68 | .icon{ 69 | width: 80rpx; 70 | } 71 | .name{ 72 | display: block; 73 | font-size: 30rpx; 74 | color: @font-color; 75 | } 76 | .calendar-container{ 77 | margin-bottom: 20rpx; 78 | } 79 | .meeting-container{ 80 | background-color: #fff; 81 | .meeting{ 82 | padding: 30rpx; 83 | position: relative; 84 | border-bottom: solid 20rpx #EEEEF4; 85 | .row{ 86 | display: flex; 87 | margin-bottom: 15rpx; 88 | &:first-child{ 89 | justify-content: space-between; 90 | } 91 | .title{ 92 | color: @font-color; 93 | font-size: 34rpx; 94 | } 95 | .hours{ 96 | color: #DD524D; 97 | font-size: 34rpx; 98 | } 99 | .desc{ 100 | font-size: 30rpx; 101 | color: #999; 102 | } 103 | .icon{ 104 | width: 40rpx; 105 | margin-right: 10rpx; 106 | margin-top: 2rpx; 107 | } 108 | } 109 | .photo{ 110 | width: 90rpx; 111 | height: 90rpx; 112 | border-radius: 45rpx; 113 | position: absolute; 114 | right: 30rpx; 115 | top: 95rpx; 116 | border: solid 6rpx #4CAF50; 117 | box-sizing: border-box; 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/login/login.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .logo{ 4 | width: 70%; 5 | margin-left: auto; 6 | margin-right: auto; 7 | display: block; 8 | margin-top: 30%; 9 | } 10 | 11 | .logo-title{ 12 | font-size: 48rpx; 13 | font-weight: bold; 14 | text-align: center; 15 | margin-top: 8%; 16 | color: @font-color; 17 | } 18 | 19 | .logo-subtitle{ 20 | font-size: 34rpx; 21 | text-align: center; 22 | color: @font-color; 23 | margin-top: 20rpx; 24 | } 25 | 26 | .login-btn{ 27 | width: 60%; 28 | position: absolute; 29 | bottom: 20%; 30 | left: 20%; 31 | background-color: @background-color; 32 | color: #FFFFFF; 33 | box-sizing: border-box; 34 | 35 | //伪类简写 36 | &:active{ 37 | background-color: @background-color-active; 38 | } 39 | } 40 | .register-container{ 41 | 42 | position: absolute; 43 | bottom: 50rpx; 44 | width: 100%; 45 | text-align: center; 46 | font-size: 30rpx; 47 | color: @font-color; 48 | .register{ 49 | color: @background-color; 50 | } 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/login/login.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 77 | 78 | 81 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/manage_employee/manage_employee.less: -------------------------------------------------------------------------------- 1 | @import url("../../style.less"); 2 | .page{ 3 | padding: 35rpx; 4 | } 5 | .list{ 6 | .item{ 7 | padding: 30rpx 15rpx; 8 | border-bottom: solid 1rpx #E5E5E5; 9 | font-size: 30rpx; 10 | color: #333; 11 | display: flex; 12 | justify-content: space-between; 13 | .key{ 14 | } 15 | .value{ 16 | color: @background-color; 17 | } 18 | .icon{ 19 | width: 40rpx; 20 | } 21 | } 22 | } 23 | .list-title{ 24 | color: @background-color; 25 | padding-top: 10rpx; 26 | padding-bottom: 10rpx; 27 | } 28 | 29 | 30 | 31 | button{ 32 | margin-top: 10rpx; 33 | font-size: 35rpx ; 34 | margin: 0 35rpx 35rpx 55rpx; 35 | background-color: @background-color; 36 | color: #fff; 37 | &:active{ 38 | background-color: @background-color-active; 39 | } 40 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/manage_employee/manage_employee.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 93 | 94 | 97 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/meeting/meeting.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | padding: 35rpx 0; 4 | } 5 | .header{ 6 | position: relative; 7 | padding: 0 35rpx; 8 | .title{ 9 | border-bottom: solid 1rpx #f0f0f0; 10 | padding: 30rpx 15rpx; 11 | font-size: 34rpx; 12 | color: @background-color; 13 | font-weight: bold; 14 | } 15 | .title-placeholder{ 16 | font-size: 34rpx; 17 | } 18 | .edit-icon{ 19 | width: 40rpx; 20 | position: absolute; 21 | right: 45rpx; 22 | top: 35rpx; 23 | } 24 | } 25 | .attr{ 26 | padding: 0 35rpx; 27 | border-bottom:solid 20rpx #EEEEF4; 28 | .list{ 29 | .item{ 30 | padding: 30rpx 10rpx 30rpx 15rpx; 31 | border-bottom: solid 1rpx #f0f0f0; 32 | font-size: 30rpx; 33 | color: #333; 34 | display: flex; 35 | justify-content: space-between; 36 | .key{ 37 | } 38 | .value{ 39 | display: flex; 40 | color: #333; 41 | } 42 | } 43 | } 44 | .desc{ 45 | padding: 30rpx 15rpx 50rpx 15rpx; 46 | font-size: 30rpx; 47 | color: #333; 48 | display: block; 49 | line-height: 1.6; 50 | } 51 | } 52 | .members{ 53 | padding: 45rpx 25rpx; 54 | .number{ 55 | margin-bottom: 35rpx; 56 | color: @background-color; 57 | font-size: 34rpx; 58 | padding-left: 20rpx; 59 | font-weight: bold; 60 | } 61 | .member{ 62 | display: flex; 63 | justify-content: flex-start; 64 | flex-wrap: wrap; 65 | .user{ 66 | width: 100rpx; 67 | text-align: center; 68 | max-width: 20%; 69 | min-width: 20%; 70 | margin-bottom: 40rpx; 71 | .photo{ 72 | width: 100rpx; 73 | height:100rpx; 74 | border-radius: 50rpx; 75 | margin-bottom: 5rpx; 76 | } 77 | .name{ 78 | font-size: 30rpx; 79 | color: #333; 80 | display: block; 81 | text-align: center; 82 | } 83 | } 84 | .add{ 85 | width: 100rpx; 86 | max-width: 20%; 87 | min-width: 20%; 88 | margin-bottom: 40rpx; 89 | .add-btn{ 90 | width: 100rpx; 91 | display: block; 92 | margin-left: auto; 93 | margin-right: auto; 94 | } 95 | } 96 | } 97 | } 98 | .btn{ 99 | margin: 0 35rpx 35rpx 55rpx; 100 | background-color: @background-color; 101 | color: #fff; 102 | &:active{ 103 | background-color: @background-color-active; 104 | } 105 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/member/member.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page { 3 | padding: 0rpx 35rpx 65rpx 35rpx; 4 | } 5 | .list-title { 6 | margin-top: 55rpx; 7 | margin-bottom: 25rpx; 8 | font-size: 32rpx; 9 | font-weight: bold; 10 | color: @background-color; 11 | border-left: solid 15rpx @background-color; 12 | padding-left: 20rpx; 13 | } 14 | .item { 15 | padding: 30rpx 10rpx 30rpx 15rpx; 16 | border-bottom: solid 1rpx #f0f0f0; 17 | font-size: 30rpx; 18 | color: @font-color; 19 | display: flex; 20 | justify-content: space-between; 21 | .key { 22 | } 23 | .value { 24 | display: block; 25 | } 26 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/member/member.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 69 | 70 | 73 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/message_detail/message_detail.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .page{ 4 | 5 | margin: 55rpx; 6 | .header { 7 | display: flex; 8 | justify-content: space-between; 9 | margin-bottom: 15rpx; 10 | .desc{ 11 | font-size: 28rpx; 12 | color: #999; 13 | } 14 | .opt{ 15 | font-size: 28rpx; 16 | color: red; 17 | padding-right: 10rpx; 18 | } 19 | } 20 | .content{ 21 | background-color: #f5f5f5; 22 | font-size: 32rpx; 23 | padding: 20rpx 45rpx; 24 | line-height: 1.8; 25 | color: @font-color; 26 | border-radius: 15rpx; 27 | } 28 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/message_detail/message_detail.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 79 | 80 | 83 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/message_list/message_list.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .page{ 4 | padding: 0rpx; 5 | } 6 | 7 | .chat-custom-text{ 8 | color: #999; 9 | position: absolute; 10 | right: 20rpx; 11 | font-size: 24rpx; 12 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/message_list/message_list.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 83 | 84 | 85 | 88 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mgr_employee_detail/mgr_employee_detail.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | padding: 35rpx 0; 4 | } 5 | .title{ 6 | padding-left: 30rpx; 7 | width: 100%; 8 | background-color: #E5E5E5; 9 | display: block; 10 | padding-top: 10rpx; 11 | padding-bottom: 10rpx; 12 | 13 | color: #808080; 14 | 15 | } 16 | .save{ 17 | background-color: @background-color; 18 | color: #FFFFFFFF; 19 | margin-top: 30rpx; 20 | } 21 | input{ 22 | 23 | padding-left: 30rpx; 24 | padding-right: 30rpx; 25 | border-bottom: 1px solid #0052FF; 26 | padding-top: 10rpx; 27 | padding-bottom: 10rpx; 28 | } 29 | 30 | picker{ 31 | margin-left: 30rpx; 32 | margin-right:30rpx ; 33 | padding-top: 10rpx; 34 | padding-bottom: 10rpx; 35 | } 36 | .btn{ 37 | margin: 0 35rpx 35rpx 55rpx; 38 | background-color: @background-color; 39 | color: #fff; 40 | &:active{ 41 | background-color: @background-color-active; 42 | } 43 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mgr_unactive_employee/mgr_unactive_employee.less: -------------------------------------------------------------------------------- 1 | @import url("../../style.less"); 2 | .page{ 3 | padding: 35rpx; 4 | } 5 | .list{ 6 | .item{ 7 | padding: 30rpx 15rpx; 8 | border-bottom: solid 1rpx #E5E5E5; 9 | font-size: 30rpx; 10 | color: #333; 11 | display: flex; 12 | justify-content: space-between; 13 | .key{ 14 | } 15 | .value{ 16 | color: @background-color; 17 | } 18 | .icon{ 19 | width: 40rpx; 20 | } 21 | } 22 | } 23 | .btn{ 24 | margin-top: 100rpx; 25 | background-color: @background-color; 26 | color: #fff; 27 | &:active{ 28 | background-color: @background-color-active; 29 | } 30 | } 31 | .icon{ 32 | 33 | height: 20rpx; 34 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mgr_unactive_employee/mgr_unactive_employee.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 79 | 80 | 83 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mgr_unactive_employee_detail/mgr_unactive_employee_detail.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | padding: 35rpx 0; 4 | } 5 | .title{ 6 | padding-left: 30rpx; 7 | width: 100%; 8 | background-color: #E5E5E5; 9 | display: block; 10 | padding-top: 10rpx; 11 | padding-bottom: 10rpx; 12 | 13 | color: #808080; 14 | 15 | } 16 | .save{ 17 | background-color: @background-color; 18 | color: #FFFFFFFF; 19 | margin-top: 30rpx; 20 | } 21 | input{ 22 | 23 | padding-left: 30rpx; 24 | padding-right: 30rpx; 25 | border-bottom: 1px solid #0052FF; 26 | padding-top: 10rpx; 27 | padding-bottom: 10rpx; 28 | } 29 | 30 | picker{ 31 | margin-left: 30rpx; 32 | margin-right:30rpx ; 33 | padding-top: 10rpx; 34 | padding-bottom: 10rpx; 35 | } 36 | button{ 37 | margin-top: 10rpx; 38 | font-size: 35rpx ; 39 | margin: 0 35rpx 35rpx 55rpx; 40 | background-color: @background-color; 41 | color: #fff; 42 | &:active{ 43 | background-color: @background-color-active; 44 | } 45 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mine-info/mine-info.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page { 3 | padding: 35rpx; 4 | } 5 | .icon { 6 | width: 40rpx; 7 | } 8 | .list-title { 9 | margin-top: 35rpx; 10 | margin-bottom: 35rpx; 11 | font-size: 32rpx; 12 | font-weight: bold; 13 | color: @background-color; 14 | border-left: solid 15rpx @background-color; 15 | padding-left: 20rpx; 16 | } 17 | .list { 18 | .item { 19 | padding: 30rpx 15rpx; 20 | border-bottom: solid 1rpx #e5e5e5; 21 | font-size: 30rpx; 22 | color: #333; 23 | display: flex; 24 | justify-content: space-between; 25 | .key { 26 | } 27 | .value { 28 | color: @background-color; 29 | } 30 | .icon { 31 | width: 40rpx; 32 | } 33 | } 34 | } 35 | .btn { 36 | margin-top: 100rpx; 37 | background-color: @background-color; 38 | color: #fff; 39 | &:active { 40 | background-color: @background-color-active; 41 | } 42 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mine/mine.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page{ 3 | padding: 35rpx; 4 | } 5 | 6 | .user-info{ 7 | margin-top: 50rpx; 8 | padding-bottom: 20rpx; 9 | } 10 | .border-outer{ 11 | height: 320rpx; 12 | width: 320rpx; 13 | background-color: #be3e1; 14 | display: flex; 15 | justify-content: center; 16 | align-items: center; 17 | border-radius: 160rpx; 18 | margin-left: auto; 19 | margin-right: auto; 20 | } 21 | 22 | .border-inner{ 23 | width: 280rpx; 24 | height: 280rpx; 25 | background-color: #5b8b4; 26 | display: flex; 27 | justify-content: center; 28 | align-items: center; 29 | border-radius: 140rpx; 30 | } 31 | .photo{ 32 | width: 200rpx; 33 | height: 200rpx; 34 | border-radius: 120rpx; 35 | display: block; 36 | border: 1px solid #ec7872; 37 | } 38 | 39 | .summary{ 40 | display: flex; 41 | justify-content: space-between; 42 | background-color: #f5f5f5; 43 | color: #333; 44 | padding: 15rpx 0; 45 | view{ 46 | 47 | text-align: center; 48 | flex-grow: 1; 49 | flex-shrink: 1; 50 | &:nth-child(2){ 51 | border-left: 1rpx solid #e0e0e0; 52 | border-right: 1rpx solid #e0e0e0; 53 | } 54 | .title{ 55 | display: block; 56 | color: #999; 57 | font-size: 28rpx; 58 | margin-bottom: 10rpx; 59 | } 60 | .value{ 61 | display: block; 62 | color: #333; 63 | font-size: 32rpx; 64 | } 65 | } 66 | } 67 | 68 | .list-title { 69 | margin-top: 35rpx; 70 | margin-bottom: 35rpx; 71 | font-size: 32rpx; 72 | font-weight: bold; 73 | color: @background-color; 74 | border-left: solid 15rpx @background-color; 75 | padding-left: 20rpx; 76 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/mine/mine.vue: -------------------------------------------------------------------------------- 1 | 48 | 89 | 90 | 93 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/my_checkin/my_checkin.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .green { 3 | background-color: #35C895 !important; 4 | } 5 | .orange { 6 | background-color: #EAB83E !important; 7 | } 8 | .red { 9 | background-color: #EA643E !important; 10 | } 11 | .statistics { 12 | margin-bottom: 50rpx; 13 | .big-icon { 14 | width: 250rpx; 15 | display: block; 16 | margin-left: auto; 17 | margin-right: auto; 18 | margin-top: 40rpx; 19 | } 20 | .report-title { 21 | display: flex; 22 | justify-content: center; 23 | margin-top: 20rpx; 24 | .days { 25 | font-size: 60rpx; 26 | color: @font-color; 27 | } 28 | .unit { 29 | margin-top: 33rpx; 30 | margin-left: 10rpx; 31 | } 32 | } 33 | .sub-title { 34 | font-size: 34rpx; 35 | color: @font-color; 36 | text-align: center; 37 | margin-top: 10rpx; 38 | position: relative; 39 | text { 40 | background-color: #fff; 41 | position: relative; 42 | z-index: 999; 43 | padding: 0 30rpx; 44 | } 45 | .line { 46 | width: 100%; 47 | border-bottom: solid 2rpx #e5e5e5; 48 | position: absolute; 49 | top: 25rpx; 50 | } 51 | } 52 | .report { 53 | display: flex; 54 | justify-content: space-between; 55 | margin-top: 30rpx; 56 | .column { 57 | flex-grow: 1; 58 | flex-shrink: 1; 59 | color: #fff; 60 | padding-top: 20rpx; 61 | padding-bottom: 15rpx; 62 | .column-title { 63 | display: block; 64 | text-align: center; 65 | font-size: 30rpx; 66 | margin-bottom: 5rpx; 67 | } 68 | .number { 69 | display: block; 70 | text-align: center; 71 | font-size: 30rpx; 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/my_checkin/my_checkin.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 99 | 100 | 103 | -------------------------------------------------------------------------------- /source/client/emos-wx/pages/register/register.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | 3 | .logo{ 4 | 5 | display: block; 6 | width: 70%; 7 | margin-left: auto; 8 | margin-right: auto; 9 | margin-top: 80rpx; 10 | } 11 | .register-container{ 12 | 13 | width: 70%; 14 | margin-top: 150rpx; 15 | margin-left: auto; 16 | margin-right: auto; 17 | 18 | } 19 | .register-code{ 20 | border: 1rpx solid #e0e0e0; 21 | font-size: 34rpx; 22 | color: @font-color; 23 | text-align: center; 24 | background-color: #f5f5f5; 25 | border-radius: 10rpx; 26 | margin-bottom: 20rpx; 27 | height: 80rpx; 28 | padding: 0 20rpx; 29 | } 30 | 31 | .register-desc{ 32 | color: @font-color; 33 | font-size: 28rpx; 34 | line-height: 1.5; 35 | margin-bottom: 80rpx; 36 | 37 | } 38 | 39 | .register-btn{ 40 | background-color: @background-color; 41 | color: #FFFFFF; 42 | font-size: ; 43 | &:active{ 44 | background-color: @background-color-active; 45 | } 46 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/role/role.less: -------------------------------------------------------------------------------- 1 | @import url('../../style.less'); 2 | .page { 3 | padding: 35rpx; 4 | } 5 | .list-title { 6 | margin-top: 35rpx; 7 | margin-bottom: 35rpx; 8 | font-size: 32rpx; 9 | font-weight: bold; 10 | color: @background-color; 11 | border-left: solid 15rpx @background-color; 12 | padding-left: 20rpx; 13 | } 14 | .list { 15 | .item { 16 | padding: 30rpx 15rpx; 17 | border-bottom: solid 1rpx #e5e5e5; 18 | font-size: 30rpx; 19 | color: #333; 20 | display: flex; 21 | justify-content: space-between; 22 | .key { 23 | } 24 | .value { 25 | color: @background-color; 26 | } 27 | .icon { 28 | width: 40rpx; 29 | } 30 | } 31 | } 32 | .btn { 33 | margin-top: 100rpx; 34 | background-color: @background-color; 35 | color: #fff; 36 | &:active { 37 | background-color: @background-color-active; 38 | } 39 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/role_list/role_list.less: -------------------------------------------------------------------------------- 1 | @import url("../../style.less"); 2 | .page{ 3 | padding: 35rpx; 4 | } 5 | .list{ 6 | .item{ 7 | padding: 30rpx 15rpx; 8 | border-bottom: solid 1rpx #E5E5E5; 9 | font-size: 30rpx; 10 | color: #333; 11 | display: flex; 12 | justify-content: space-between; 13 | .key{ 14 | } 15 | .value{ 16 | color: @background-color; 17 | } 18 | .icon{ 19 | width: 40rpx; 20 | } 21 | } 22 | } 23 | .btn{ 24 | margin-top: 100rpx; 25 | background-color: @background-color; 26 | color: #fff; 27 | &:active{ 28 | background-color: @background-color-active; 29 | } 30 | } 31 | .icon{ 32 | 33 | height: 20rpx; 34 | } -------------------------------------------------------------------------------- /source/client/emos-wx/pages/search-contact/search-contact.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 72 | 73 | 116 | -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-1-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-1-active.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-1.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-2-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-2-active.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-2.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-3-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-3-active.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-3.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-4-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-4-active.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-4.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-5-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-5-active.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/bar-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/bar-5.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/big-icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/big-icon-1.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/call.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/document.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/high-risk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/high-risk.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-1.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-10.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-11.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-12.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-13.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-14.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-15.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-16.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-17.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-18.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-19.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-2.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-20.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-3.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-4.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-5.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-6.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-7.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-8.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/icon-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/icon-9.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/logo-1.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/logo-2.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/logo-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/logo-3.jpg -------------------------------------------------------------------------------- /source/client/emos-wx/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/logo.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/low-risk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/low-risk.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/middle-risk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/middle-risk.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-1.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-10.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-11.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-12.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-2.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-3.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-4.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-5.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-6.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-7.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-8.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/nav-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/nav-9.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/search.png -------------------------------------------------------------------------------- /source/client/emos-wx/static/system.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/system.jpg -------------------------------------------------------------------------------- /source/client/emos-wx/static/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VincentTung/emos_online/30cfd89f94b64d1c26024e3c5f5593a7d8a57111/source/client/emos-wx/static/user.png -------------------------------------------------------------------------------- /source/client/emos-wx/style.less: -------------------------------------------------------------------------------- 1 | @font-color: #333; 2 | @desc-color: #999; 3 | @background-color: #3474FF; 4 | @background-color-active: #0052FF; -------------------------------------------------------------------------------- /source/client/emos-wx/uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#c8c7cc; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:24rpx; 43 | $uni-font-size-base:28rpx; 44 | $uni-font-size-lg:32rpx; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:40rpx; 48 | $uni-img-size-base:52rpx; 49 | $uni-img-size-lg:80rpx; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 4rpx; 53 | $uni-border-radius-base: 6rpx; 54 | $uni-border-radius-lg: 12rpx; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 10px; 59 | $uni-spacing-row-base: 20rpx; 60 | $uni-spacing-row-lg: 30rpx; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 8rpx; 64 | $uni-spacing-col-base: 16rpx; 65 | $uni-spacing-col-lg: 24rpx; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:40rpx; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:36rpx; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:30rpx; -------------------------------------------------------------------------------- /source/server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | .mvn -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/EmosServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import com.vincent.emos.wx.db.dao.SysConfigDao; 5 | import com.vincent.emos.wx.db.pojo.SysConfig; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.beans.factory.annotation.Value; 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.boot.web.servlet.ServletComponentScan; 12 | import org.springframework.scheduling.annotation.EnableAsync; 13 | 14 | import javax.annotation.PostConstruct; 15 | import java.io.File; 16 | import java.lang.reflect.Field; 17 | import java.util.List; 18 | 19 | 20 | @SpringBootApplication 21 | @ServletComponentScan 22 | @Slf4j 23 | @EnableAsync 24 | public class EmosServerApplication { 25 | 26 | @Autowired 27 | private SysConfigDao sysConfigDao; 28 | @Autowired 29 | private SystemConstants sysConstants; 30 | 31 | @Value("${emos.image-folder}") 32 | private String imageFolder; 33 | 34 | public static void main(String[] args) { 35 | SpringApplication.run(EmosServerApplication.class, args); 36 | } 37 | 38 | 39 | @PostConstruct 40 | public void init(){ 41 | 42 | // 1.读取数据库中的配置到变量中 43 | List list = sysConfigDao.selectAllParams(); 44 | list.forEach(sysConfig -> { 45 | 46 | String key = sysConfig.getParamKey(); 47 | key = StrUtil.toCamelCase(key); 48 | String value = sysConfig.getParamValue(); 49 | Field field = null; 50 | try { 51 | field = sysConstants.getClass().getDeclaredField(key); 52 | field.set(sysConstants,value); 53 | } catch (NoSuchFieldException | IllegalAccessException e) { 54 | e.printStackTrace(); 55 | log.error("执行出错",e); 56 | } 57 | 58 | }); 59 | log.info(sysConstants.attendanceEndTime); 60 | // 2. 创建缓存图片用的文件夹 61 | new File(imageFolder).mkdirs(); 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/SystemConstants.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx; 2 | 3 | import lombok.Data; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * 系统配置类 8 | * 9 | * 数据来db 10 | */ 11 | @Data 12 | @Component 13 | public class SystemConstants { 14 | // 上班考勤开始时间 15 | public String attendanceStartTime; 16 | // 上班时间 17 | public String attendanceTime; 18 | // 上班考勤结束时间 19 | public String attendanceEndTime; 20 | // 下班考勤开始时间 21 | public String closingStartTime; 22 | // 下班时间 23 | public String closingTime; 24 | // 下班考勤结束时间 25 | public String closingEndTime; 26 | } 27 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/aop/TokenAspect.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.aop; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import com.vincent.emos.wx.common.util.R; 5 | import com.vincent.emos.wx.config.shiro.ThreadLocalToken; 6 | import org.aspectj.lang.ProceedingJoinPoint; 7 | import org.aspectj.lang.annotation.Around; 8 | import org.aspectj.lang.annotation.Aspect; 9 | import org.aspectj.lang.annotation.Pointcut; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | 14 | @Aspect 15 | @Component 16 | public class TokenAspect { 17 | @Autowired 18 | private ThreadLocalToken threadLocalToken; 19 | 20 | 21 | @Pointcut("execution(public * com.vincent.emos.wx.controller.*.*(..) ))") 22 | public void aspect(){ 23 | 24 | } 25 | 26 | @Around("aspect()") 27 | public Object around(ProceedingJoinPoint point) throws Throwable { 28 | 29 | R r = (R)point.proceed(); 30 | String token = threadLocalToken.getToken(); 31 | if(!StrUtil.isBlank(token)){ 32 | r.put("token",token); 33 | } 34 | return r; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/common/util/Imagebase64.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.common.util; 2 | 3 | import cn.hutool.core.codec.Base64Encoder; 4 | import lombok.extern.slf4j.Slf4j; 5 | 6 | import java.io.*; 7 | 8 | @Slf4j 9 | public class Imagebase64 { 10 | public static String byteConverterBASE64(File file){ 11 | long size = file.length(); 12 | byte[] imageByte = new byte[(int)size]; 13 | FileInputStream fs = null; 14 | BufferedInputStream bis = null; 15 | try { 16 | fs = new FileInputStream(file); 17 | bis = new BufferedInputStream(fs); 18 | bis.read(imageByte); 19 | } catch (FileNotFoundException e) { 20 | log.error("文件"+file.getName()+"不能被找到:"+e.getMessage()); 21 | } catch (IOException e) { 22 | log.error("byte转换BASE64出错:"+e.getMessage()); 23 | } finally{ 24 | if(bis != null){ 25 | try { 26 | bis.close(); 27 | } catch (IOException e) { 28 | log.error("关闭输入流出错:"+e.getMessage()); 29 | } 30 | } 31 | if(fs != null){ 32 | try { 33 | fs.close(); 34 | } catch (IOException e) { 35 | log.error("关闭输入流出错:"+e.getMessage()); 36 | } 37 | } 38 | } 39 | return Base64Encoder.encode(imageByte); 40 | } 41 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/common/util/R.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.common.util; 2 | 3 | import org.apache.http.HttpStatus; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | public class R extends HashMap { 9 | private final static String MSG = "msg"; 10 | private final static String CODE = "code"; 11 | private final static String SUCCESS = "success"; 12 | private final static String ERROR = "error"; 13 | 14 | public R() { 15 | put(CODE, HttpStatus.SC_OK); 16 | put(MSG, SUCCESS); 17 | } 18 | 19 | 20 | public static R error() { 21 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员"); 22 | } 23 | 24 | public static R error(String msg) { 25 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg); 26 | } 27 | 28 | public static R error(int code, String msg) { 29 | R r = new R(); 30 | r.put(CODE, code); 31 | r.put(MSG, msg); 32 | return r; 33 | } 34 | 35 | public static R ok(String msg) { 36 | R r = new R(); 37 | r.put(MSG, msg); 38 | return r; 39 | } 40 | 41 | public static R ok(Map map) { 42 | R r = new R(); 43 | r.putAll(map); 44 | return r; 45 | } 46 | 47 | public static R ok() { 48 | return new R(); 49 | } 50 | 51 | public R put(String key, Object value) { 52 | super.put(key, value); 53 | return this; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/ExceptionAdvice.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config; 2 | 3 | import com.vincent.emos.wx.exception.EmosException; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.apache.shiro.authz.UnauthenticatedException; 6 | import org.springframework.http.HttpStatus; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.bind.MethodArgumentNotValidException; 9 | import org.springframework.web.bind.annotation.ExceptionHandler; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | import org.springframework.web.bind.annotation.ResponseStatus; 12 | import org.springframework.web.bind.annotation.RestControllerAdvice; 13 | 14 | @Slf4j 15 | @RestControllerAdvice 16 | @Component 17 | public class ExceptionAdvice { 18 | 19 | @ResponseBody 20 | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) 21 | @ExceptionHandler(Exception.class) 22 | public String validExceptionHandler(Exception e) { 23 | log.error("执行异常了", e); 24 | if (e instanceof MethodArgumentNotValidException) { 25 | 26 | MethodArgumentNotValidException exception = (MethodArgumentNotValidException) e; 27 | return exception.getBindingResult().getFieldError().getDefaultMessage(); 28 | 29 | } else if (e instanceof EmosException) { 30 | 31 | return ((EmosException) e).getMsg(); 32 | 33 | } else if (e instanceof UnauthenticatedException) { 34 | 35 | return "你不具备相关权限"; 36 | 37 | } else { 38 | 39 | return "后端执行异常"; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/RabbitMQConfig.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config; 2 | 3 | import com.rabbitmq.client.ConnectionFactory; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | @Configuration 8 | public class RabbitMQConfig { 9 | 10 | @Bean 11 | public ConnectionFactory getFactory() { 12 | 13 | ConnectionFactory factory = new ConnectionFactory(); 14 | factory.setHost("127.0.0.1"); 15 | factory.setPort(5672); 16 | factory.setUsername("guest"); 17 | factory.setPassword("guest"); 18 | return factory; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config; 2 | 3 | import io.swagger.annotations.ApiOperation; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.RequestHandler; 7 | import springfox.documentation.builders.ApiInfoBuilder; 8 | import springfox.documentation.builders.PathSelectors; 9 | import springfox.documentation.builders.RequestHandlerSelectors; 10 | import springfox.documentation.service.ApiKey; 11 | import springfox.documentation.service.AuthorizationScope; 12 | import springfox.documentation.service.SecurityReference; 13 | import springfox.documentation.spi.DocumentationType; 14 | import springfox.documentation.spi.service.contexts.SecurityContext; 15 | import springfox.documentation.spring.web.plugins.ApiSelectorBuilder; 16 | import springfox.documentation.spring.web.plugins.Docket; 17 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 18 | 19 | import java.util.ArrayList; 20 | import java.util.List; 21 | 22 | @Configuration 23 | @EnableSwagger2 24 | public class SwaggerConfig { 25 | @Bean 26 | public Docket createRestApi(){ 27 | 28 | Docket docket = new Docket(DocumentationType.SWAGGER_2); 29 | 30 | ApiInfoBuilder builder = new ApiInfoBuilder(); 31 | builder.title("EMOS在线办公"); 32 | builder.description("Vincent制作"); 33 | docket.apiInfo(builder.build()); 34 | 35 | ApiSelectorBuilder apiSelectorBuilder = docket.select(); 36 | apiSelectorBuilder.paths(PathSelectors.any()); 37 | //注意是methodannotation not class 38 | apiSelectorBuilder.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)); 39 | docket = apiSelectorBuilder.build(); 40 | 41 | // 界面显示的名字 key名字 往哪里放 42 | ApiKey apiKey = new ApiKey("token","token","header"); 43 | List apiKeyList = new ArrayList<>(); 44 | apiKeyList.add(apiKey); 45 | docket.securitySchemes(apiKeyList); 46 | 47 | AuthorizationScope scope = new AuthorizationScope("global","accessEverything"); 48 | AuthorizationScope[] scopes = {scope}; 49 | //todo JWT ?? 50 | SecurityReference securityReference = new SecurityReference("token",scopes); 51 | List referenceList = new ArrayList(); 52 | referenceList.add(securityReference); 53 | SecurityContext context = SecurityContext.builder().securityReferences(referenceList).build(); 54 | List contextList = new ArrayList<>(); 55 | contextList.add(context); 56 | docket.securityContexts(contextList); 57 | 58 | return docket; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/ThreadPoolConfig.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.core.task.AsyncTaskExecutor; 6 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 7 | 8 | import java.util.concurrent.ThreadPoolExecutor; 9 | 10 | @Configuration 11 | public class ThreadPoolConfig { 12 | @Bean("AsyncTaskExecutor") 13 | public AsyncTaskExecutor taskExecutor(){ 14 | 15 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 16 | executor.setCorePoolSize(8); 17 | executor.setMaxPoolSize(16); 18 | executor.setQueueCapacity(32); 19 | //线程活跃时间 20 | executor.setKeepAliveSeconds(60); 21 | executor.setThreadNamePrefix("task-"); 22 | //拒绝策略 23 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); 24 | executor.initialize(); 25 | return executor; 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/shiro/JwtUtil.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config.shiro; 2 | 3 | import cn.hutool.core.date.DateField; 4 | import cn.hutool.core.date.DateUtil; 5 | import com.auth0.jwt.JWT; 6 | import com.auth0.jwt.JWTCreator; 7 | import com.auth0.jwt.JWTVerifier; 8 | import com.auth0.jwt.algorithms.Algorithm; 9 | import com.auth0.jwt.interfaces.DecodedJWT; 10 | import com.vincent.emos.wx.exception.EmosException; 11 | import lombok.extern.slf4j.Slf4j; 12 | import org.springframework.beans.factory.annotation.Value; 13 | import org.springframework.stereotype.Component; 14 | 15 | import java.util.Date; 16 | 17 | /** 18 | * 根据userId 生成token 19 | */ 20 | @Component 21 | @Slf4j 22 | public class JwtUtil { 23 | private static final String USER_ID = "userId"; 24 | //密钥 25 | @Value("${emos.jwt.secret}") //引入yml中配置的值 26 | private String secret; 27 | //过期时间(天) 28 | @Value("${emos.jwt.expire}") 29 | private int expire; 30 | 31 | public String createToken(int userId) { 32 | Date date = DateUtil.offset(new Date(), DateField.DAY_OF_YEAR, expire).toJdkDate(); 33 | Algorithm algorithm = Algorithm.HMAC256(secret); //创建加密算法对象 34 | JWTCreator.Builder builder = JWT.create(); 35 | String token = builder.withClaim(USER_ID, userId).withExpiresAt(date).sign(algorithm); 36 | return token; 37 | } 38 | 39 | 40 | public int getUserId(String token) { 41 | try { 42 | DecodedJWT jwt = JWT.decode(token); 43 | return jwt.getClaim(USER_ID).asInt(); 44 | } catch (Exception e) { 45 | throw new EmosException("令牌无效"); 46 | } 47 | } 48 | 49 | public void verifierToken(String token) { 50 | Algorithm algorithm = Algorithm.HMAC256(secret); //创建加密算法对象 51 | JWTVerifier verifier = JWT.require(algorithm).build(); 52 | verifier.verify(token); 53 | } 54 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/shiro/OAuth2Realm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config.shiro; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbUser; 4 | import com.vincent.emos.wx.service.UserService; 5 | import org.apache.shiro.authc.*; 6 | import org.apache.shiro.authz.AuthorizationInfo; 7 | import org.apache.shiro.authz.SimpleAuthorizationInfo; 8 | import org.apache.shiro.realm.AuthorizingRealm; 9 | import org.apache.shiro.subject.PrincipalCollection; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.util.Set; 14 | 15 | @Component 16 | public class OAuth2Realm extends AuthorizingRealm { 17 | 18 | @Autowired 19 | private JwtUtil jwtUtil; 20 | 21 | @Autowired 22 | private UserService userService; 23 | 24 | @Override 25 | public boolean supports(AuthenticationToken token) { 26 | return token instanceof OAuth2Token; 27 | } 28 | 29 | 30 | /** 31 | * 授权(验证权限时候调用) 32 | * @param principalCollection 33 | * @return 34 | */ 35 | @Override 36 | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { 37 | TbUser user = (TbUser) principalCollection.getPrimaryPrincipal(); 38 | int userId = user.getId(); 39 | // 查询用户权限列表 40 | Set permissions = userService.searchUserPermissions(userId); 41 | //TODO 把权限列表添加到info对象中 42 | SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); 43 | info.setStringPermissions(permissions); 44 | return info; 45 | } 46 | 47 | 48 | /** 49 | * 认证(登录时候调用) 50 | * @param authenticationToken 51 | * @return 52 | * @throws AuthenticationException 53 | */ 54 | @Override 55 | protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { 56 | 57 | String accessToken = (String) authenticationToken.getPrincipal(); 58 | //TODO 从令牌中获取userId,然后检测该账户是否被冻结。 59 | int userId = jwtUtil.getUserId(accessToken); 60 | TbUser user = userService.searchById(userId); 61 | 62 | if(user == null){//用户离职状态 63 | throw new LockedAccountException("账号已被锁定,请联系管理员"); 64 | } 65 | //TODO 往info对象中添加用户信息、Token字符串 66 | SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(user,accessToken,getName()); 67 | return info; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/shiro/OAuth2Token.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config.shiro; 2 | 3 | import org.apache.shiro.authc.AuthenticationToken; 4 | 5 | /** 6 | * 实现shiro的token 7 | */ 8 | public class OAuth2Token implements AuthenticationToken { 9 | private String token; 10 | 11 | public OAuth2Token(String token) { 12 | this.token = token; 13 | } 14 | 15 | @Override 16 | public Object getPrincipal() { 17 | return token; 18 | } 19 | 20 | @Override 21 | public Object getCredentials() { 22 | return token; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/shiro/ThreadLocalToken.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config.shiro; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | @Component 6 | public class ThreadLocalToken { 7 | 8 | private ThreadLocal local = new ThreadLocal(); 9 | 10 | public void setToken(String token){ 11 | local.set(token); 12 | } 13 | public String getToken(){ 14 | return (String)local.get(); 15 | } 16 | public void clear(){ 17 | local.remove(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/config/xss/XssFilter.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.config.xss; 2 | 3 | import javax.servlet.*; 4 | import javax.servlet.annotation.WebFilter; 5 | import javax.servlet.http.HttpServletRequest; 6 | import java.io.IOException; 7 | @WebFilter(urlPatterns = "/*") 8 | public class XssFilter implements Filter { 9 | public void init(FilterConfig config) throws ServletException { 10 | } 11 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 12 | throws IOException, ServletException { 13 | XssHttpServletRequestWrapper wrapper = new XssHttpServletRequestWrapper( 14 | (HttpServletRequest) request); 15 | chain.doFilter(wrapper, response); 16 | } 17 | @Override 18 | public void destroy() { 19 | } 20 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/DeptController.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller; 2 | 3 | import com.vincent.emos.wx.common.util.R; 4 | import com.vincent.emos.wx.controller.form.DeleteDeptForm; 5 | import com.vincent.emos.wx.controller.form.InsertDeptForm; 6 | import com.vincent.emos.wx.controller.form.UpdateDeptForm; 7 | import com.vincent.emos.wx.db.pojo.TbDept; 8 | import com.vincent.emos.wx.service.DeptService; 9 | import io.swagger.annotations.Api; 10 | import io.swagger.annotations.ApiOperation; 11 | import org.apache.shiro.authz.annotation.Logical; 12 | import org.apache.shiro.authz.annotation.RequiresPermissions; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import javax.validation.Valid; 17 | import java.util.ArrayList; 18 | 19 | @RestController 20 | @RequestMapping("/dept") 21 | @Api("部门网络接口") 22 | public class DeptController { 23 | @Autowired 24 | private DeptService deptService; 25 | 26 | @GetMapping("/searchAllDepts") 27 | @ApiOperation("查询所有部门") 28 | @RequiresPermissions(value = {"ROOT", "DEPT:SELECT"}, logical = Logical.OR) 29 | public R searchAllDepts() { 30 | ArrayList list = deptService.searchAllDepts(); 31 | return R.ok().put("result", list); 32 | } 33 | 34 | @PostMapping("/deleteDept") 35 | @ApiOperation("删除部门") 36 | @RequiresPermissions(value = {"ROOT", "DEPT:DELETE"}, logical = Logical.OR) 37 | public R deleteDept(@Valid @RequestBody DeleteDeptForm form) { 38 | deptService.deleteDept(form.getId()); 39 | return R.ok().put("result", "success"); 40 | } 41 | 42 | @PostMapping("/updateDept") 43 | @ApiOperation("更新部门") 44 | @RequiresPermissions(value = {"ROOT", "DEPT:DELETE"}, logical = Logical.OR) 45 | public R updateDept(@Valid @RequestBody UpdateDeptForm form) { 46 | TbDept dept = new TbDept(); 47 | dept.setId(form.getId()); 48 | dept.setDeptName(form.getDeptName()); 49 | deptService.updateDept(dept); 50 | return R.ok().put("result", "success"); 51 | } 52 | 53 | 54 | @PostMapping("/insertDept") 55 | @ApiOperation("新建部门") 56 | @RequiresPermissions(value = {"ROOT", "DEPT:INSERT"}, logical = Logical.OR) 57 | public R insertDept(@Valid @RequestBody InsertDeptForm form) { 58 | deptService.insertDept(form.getDeptName()); 59 | return R.ok().put("result", "success"); 60 | } 61 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/DocumentController.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller; 2 | 3 | import com.vincent.emos.wx.common.util.R; 4 | import com.vincent.emos.wx.db.pojo.DocumentFile; 5 | import com.vincent.emos.wx.tencentcloud.storage.StorageService; 6 | import io.swagger.annotations.Api; 7 | import io.swagger.annotations.ApiOperation; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.RequestHeader; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/document") 18 | @Api("文档管理") 19 | public class DocumentController { 20 | 21 | 22 | @Autowired 23 | private StorageService storageService; 24 | 25 | @GetMapping("/filelist") 26 | @ApiOperation("查询用户摘要信息") 27 | public R fileList(@RequestHeader("token") String token){ 28 | 29 | List list = storageService.listFiles(); 30 | return R.ok().put("list",list); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/HealthyController.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller; 2 | 3 | 4 | import com.vincent.emos.wx.common.util.R; 5 | import com.vincent.emos.wx.config.shiro.JwtUtil; 6 | import com.vincent.emos.wx.controller.form.*; 7 | import com.vincent.emos.wx.service.HealthyService; 8 | import io.swagger.annotations.Api; 9 | import io.swagger.annotations.ApiOperation; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.validation.Valid; 14 | 15 | 16 | @RestController 17 | @RequestMapping("/healthy") 18 | @Api("健康接口") 19 | public class HealthyController { 20 | 21 | @Autowired 22 | private HealthyService healthyService; 23 | @Autowired 24 | private JwtUtil jwtUtil; 25 | 26 | @PostMapping("/riskAtLocation") 27 | @ApiOperation("获取当前位置风险等级") 28 | public R getRiskAtLocation(@Valid @RequestBody CheckinForm form) { 29 | return R.ok().put("result", healthyService.getRiskAtLocation(form)); 30 | 31 | } 32 | 33 | @PostMapping("/getRiskCheckCount") 34 | @ApiOperation("获取当前位置风险等级") 35 | public R getRiskCheckCount(@RequestHeader("token") String token,@Valid @RequestBody GetRiskCheckCountForm form) { 36 | 37 | int risk = form.getRisk(); 38 | int userId = jwtUtil.getUserId(token); 39 | return R.ok().put("result", healthyService.searchRiskCheckinCount(userId,form.getRisk())); 40 | 41 | } 42 | 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/MeetingApprovalController.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller; 2 | 3 | import com.vincent.emos.wx.common.util.R; 4 | import com.vincent.emos.wx.config.shiro.JwtUtil; 5 | import com.vincent.emos.wx.controller.form.ApprovalMeetingForm; 6 | import com.vincent.emos.wx.controller.form.SearchMyMeetingListByPageForm; 7 | import com.vincent.emos.wx.exception.EmosException; 8 | import com.vincent.emos.wx.service.MeetingService; 9 | import io.swagger.annotations.Api; 10 | import io.swagger.annotations.ApiOperation; 11 | import lombok.extern.slf4j.Slf4j; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.ui.ExtendedModelMap; 14 | import org.springframework.web.bind.annotation.*; 15 | 16 | import javax.validation.Valid; 17 | import java.util.ArrayList; 18 | import java.util.HashMap; 19 | 20 | @RestController 21 | @RequestMapping("/meetingApproval") 22 | @Api("会议审批") 23 | @Slf4j 24 | public class MeetingApprovalController { 25 | @Autowired 26 | private JwtUtil jwtUtil; 27 | 28 | @Autowired 29 | private MeetingService meetingService; 30 | 31 | 32 | @PostMapping("/searchNeedApproval") 33 | @ApiOperation("查询需要审批的会议") 34 | public R searchNeedApproval( @RequestHeader("token")String token){ 35 | int userId = jwtUtil.getUserId(token); 36 | 37 | 38 | ArrayList list = meetingService.searchNeedApprovalMeeting(userId); 39 | return R.ok().put("result",list); 40 | } 41 | 42 | 43 | @PostMapping("/searchAlreadyApproval") 44 | @ApiOperation("查询需要审批的会议") 45 | public R searchAlreadyApproval( @RequestHeader("token")String token){ 46 | int userId = jwtUtil.getUserId(token); 47 | ArrayList list = meetingService.searchAlreadyApprovalMeeting(userId); 48 | return R.ok().put("result",list); 49 | } 50 | 51 | @PostMapping("/approvalMeeting") 52 | @ApiOperation("审批会议") 53 | public R approvalMeeting(@RequestHeader("token")String token ,@Valid @RequestBody ApprovalMeetingForm form){ 54 | 55 | Integer meetingStatus = meetingService.searchMeetingStatus(form.getUuid()); 56 | if(meetingStatus == null){ 57 | throw new EmosException("操作的会议不存在了"); 58 | } 59 | //不是待审批状态 60 | if(meetingStatus != 1){ 61 | throw new EmosException("该会议已经被别人审批了"); 62 | } 63 | 64 | // TODO: 2021/2/25 写入members 65 | HashMap hashMap = new HashMap(); 66 | hashMap.put("userId",jwtUtil.getUserId(token)); 67 | hashMap.put("uuid",form.getUuid()); 68 | hashMap.put("option",form.getState()); 69 | int result = meetingService.approvalMeeting(hashMap); 70 | 71 | if(result >0){ 72 | return R.ok().put("result","success"); 73 | }else{ 74 | throw new EmosException("会议审批操作异常:code"+result); 75 | } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller; 2 | 3 | import com.vincent.emos.wx.common.util.R; 4 | import com.vincent.emos.wx.controller.form.TestSayHelloForm; 5 | import io.swagger.annotations.Api; 6 | import io.swagger.annotations .ApiOperation; 7 | import org.apache.shiro.authz.annotation.Logical; 8 | import org.apache.shiro.authz.annotation.RequiresPermissions; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import javax.validation.Valid; 12 | 13 | @RestController 14 | @RequestMapping("/test") 15 | @Api("测试Web接口") 16 | public class TestController { 17 | 18 | @PostMapping("/sayHello") 19 | @ApiOperation("一个测试的接口") 20 | public R sayHello(@Valid @RequestBody TestSayHelloForm form){ 21 | return R.ok().put("message","HelloWorld-"+form.getName()); 22 | } 23 | 24 | 25 | /** 26 | * 权限测试 27 | * @return 28 | */ 29 | @PostMapping("/addUser") 30 | @ApiOperation("添加用户") 31 | @RequiresPermissions(value = {"A","B"},logical = Logical.OR) 32 | public R addUser(){ 33 | return R.ok("用户添加成功"); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/ApprovalMeetingForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.Min; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.Pattern; 10 | 11 | @Data 12 | @ApiModel 13 | public class ApprovalMeetingForm { 14 | 15 | @NotBlank 16 | private String uuid; 17 | 18 | /** 19 | * 0 不同意 20 | * 1 同意 21 | */ 22 | @Range(min = 0, max = 1) 23 | private int state; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/CheckinForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | @Data 7 | @ApiModel 8 | public class CheckinForm { 9 | private String address; 10 | private String country; 11 | private String province; 12 | private String city; 13 | private String district; 14 | } 15 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DeleteDeptForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotNull; 8 | 9 | @Data 10 | @ApiModel 11 | public class DeleteDeptForm { 12 | @NotNull 13 | @Min(1) 14 | private Integer id; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DeleteEmployeeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | @Data 7 | @ApiModel 8 | public class DeleteEmployeeForm { 9 | private int code; 10 | } 11 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DeleteMeetingByIdForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotNull; 8 | 9 | @ApiModel 10 | @Data 11 | public class DeleteMeetingByIdForm { 12 | @NotNull 13 | @Min(1) 14 | private Integer id; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DeleteMessageRefByIdForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @Data 9 | @ApiModel 10 | public class DeleteMessageRefByIdForm { 11 | 12 | @NotBlank 13 | private String id; 14 | } 15 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DeleteRoleForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @Data 11 | @ApiModel 12 | public class DeleteRoleForm { 13 | @NotNull 14 | @Min(1) 15 | private Integer id; 16 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/DismissionEmployeeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | 8 | @Data 9 | @ApiModel 10 | public class DismissionEmployeeForm { 11 | 12 | @Min(1) 13 | private int id; 14 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/GetRiskCheckCountForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Max; 7 | import javax.validation.constraints.Min; 8 | import javax.validation.constraints.NotBlank; 9 | 10 | @Data 11 | @ApiModel 12 | public class GetRiskCheckCountForm { 13 | @Min(1) @Max(3) 14 | private int risk; 15 | 16 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/InsertDeptForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @Data 11 | @ApiModel 12 | public class InsertDeptForm { 13 | @NotBlank 14 | private String deptName; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/InsertEmployeeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | import javax.validation.constraints.Pattern; 10 | 11 | @Data 12 | @ApiModel 13 | public class InsertEmployeeForm { 14 | 15 | @NotBlank 16 | private String email; 17 | 18 | @NotBlank 19 | private String tel; 20 | 21 | @NotNull 22 | private String name; 23 | 24 | @NotNull 25 | private String role; 26 | 27 | @Min(1) 28 | private int dept_id; 29 | 30 | 31 | private Object sex; 32 | @NotNull 33 | @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$") 34 | private String hiredate; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/InsertMeetingForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | import javax.validation.constraints.Pattern; 10 | 11 | @ApiModel 12 | @Data 13 | public class InsertMeetingForm { 14 | @NotBlank 15 | private String title; 16 | @NotNull 17 | @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$") 18 | private String date; 19 | private String place; 20 | @NotNull 21 | @Pattern(regexp = "^([01]?[0-9]|2[0-3]):[0-5][0-9]$") 22 | private String start; 23 | @NotNull 24 | @Pattern(regexp = "^([01]?[0-9]|2[0-3]):[0-5][0-9]$") 25 | private String end; 26 | @Range(min = 1, max = 2) 27 | private Byte type; 28 | @NotBlank 29 | private String members; 30 | @NotBlank 31 | private String desc; 32 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/InsertRoleForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @Data 9 | @ApiModel 10 | public class InsertRoleForm { 11 | @NotBlank 12 | private String roleName; 13 | @NotBlank 14 | private String permissions; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/LoginForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @ApiModel 9 | @Data 10 | public class LoginForm { 11 | 12 | @NotBlank(message = "微信临时授权码不能为空") 13 | private String code; 14 | } 15 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/RegisterCodeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | 9 | @Data 10 | @ApiModel 11 | public class RegisterCodeForm { 12 | 13 | @NotBlank 14 | @Pattern(regexp = "^[0-9]{4}$",message = "注册码必须是4位数字") 15 | private String registerCode; 16 | } 17 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/RegisterForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | 9 | @Data 10 | @ApiModel 11 | public class RegisterForm { 12 | 13 | @NotBlank 14 | @Pattern(regexp = "^[0-9]{4}$",message = "注册码必须是4位数字") 15 | private String registerCode; 16 | 17 | // 微信临时授权码 18 | @NotBlank(message = "授权码不能为空") 19 | private String code; 20 | 21 | @NotBlank(message = "昵称不能为空") 22 | private String nickName; 23 | 24 | @NotBlank(message = "头像不能为空") 25 | private String photo; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchContactForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | @Data 6 | @ApiModel 7 | public class SearchContactForm { 8 | private String name; 9 | } 10 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchEmployeeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | @Data 7 | @ApiModel 8 | public class SearchEmployeeForm { 9 | private int code; 10 | } 11 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMeetingByIdForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotNull; 8 | 9 | @ApiModel 10 | @Data 11 | public class SearchMeetingByIdForm { 12 | @NotNull 13 | @Min(1) 14 | private Integer id; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMembersForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @Data 9 | @ApiModel 10 | public class SearchMembersForm { 11 | @NotBlank 12 | private String members; 13 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMessageByIdForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @ApiModel 9 | @Data 10 | public class SearchMessageByIdForm { 11 | @NotBlank 12 | private String id; 13 | } 14 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMessageByPageForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.Min; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @Data 11 | @ApiModel 12 | public class SearchMessageByPageForm { 13 | @NotNull 14 | @Min(1) 15 | private Integer page; 16 | 17 | @NotNull 18 | @Range(min = 1 ,max = 40) 19 | private Integer length; 20 | } 21 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMonthCheckinForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.NotNull; 8 | 9 | @Data 10 | @ApiModel 11 | public class SearchMonthCheckinForm { 12 | 13 | @NotNull 14 | @Range(min= 2000, max = 3000) 15 | private Integer year; 16 | @NotNull 17 | @Range(min=1 ,max = 12) 18 | private Integer month; 19 | } 20 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchMyMeetingListByPageForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.Min; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @ApiModel 11 | @Data 12 | public class SearchMyMeetingListByPageForm { 13 | 14 | @NotNull 15 | @Min(1) 16 | private Integer page; 17 | 18 | @NotNull 19 | @Range(min = 1 ,max = 40) 20 | private Integer length; 21 | } 22 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchRoleOwnPermissionForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotNull; 8 | 9 | @Data 10 | @ApiModel 11 | public class SearchRoleOwnPermissionForm { 12 | @NotNull 13 | @Min(0) 14 | private Integer id; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchUserByIdForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | 8 | @Data 9 | @ApiModel 10 | public class SearchUserByIdForm { 11 | 12 | @Min(1) 13 | private int id; 14 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchUserGroupByDeptForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Pattern; 7 | 8 | @Data 9 | @ApiModel 10 | public class SearchUserGroupByDeptForm { 11 | // @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,15}$") 12 | private String keyword; 13 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SearchUserMeetingInMonthForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | @Data 8 | @ApiModel 9 | public class SearchUserMeetingInMonthForm { 10 | @Range(min = 2000, max = 9999) 11 | private Integer year; 12 | @Range(min = 1, max = 12) 13 | private Integer month; 14 | } 15 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/SelectUserPhotoAndNameForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | 8 | @Data 9 | @ApiModel 10 | public class SelectUserPhotoAndNameForm { 11 | @NotBlank 12 | private String ids; 13 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/TestSayHelloForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.Pattern; 8 | @ApiModel 9 | @Data 10 | public class TestSayHelloForm { 11 | // @NotBlank 12 | // @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,15}$") 13 | @ApiModelProperty("姓名") 14 | private String name; 15 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateDeptForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @Data 11 | @ApiModel 12 | public class UpdateDeptForm { 13 | @NotNull 14 | @Min(1) 15 | private Integer id; 16 | @NotBlank 17 | private String deptName; 18 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateEmployeeForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | import javax.validation.constraints.Pattern; 10 | 11 | @Data 12 | @ApiModel 13 | public class UpdateEmployeeForm { 14 | 15 | private int code; 16 | @NotBlank 17 | private String email; 18 | 19 | @NotBlank 20 | private String tel; 21 | 22 | @NotNull 23 | private String name; 24 | 25 | @NotNull 26 | private String role; 27 | 28 | @Min(1) 29 | private int dept_id; 30 | 31 | 32 | @NotNull 33 | @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$") 34 | private String hiredate; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateEmployeeStateForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Max; 7 | import javax.validation.constraints.Min; 8 | 9 | @Data 10 | @ApiModel 11 | public class UpdateEmployeeStateForm { 12 | 13 | private int code; 14 | @Min(0) @Max(1) 15 | private int state; 16 | } 17 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateMeetingInfoForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.hibernate.validator.constraints.Range; 6 | 7 | import javax.validation.constraints.Min; 8 | import javax.validation.constraints.NotBlank; 9 | import javax.validation.constraints.NotNull; 10 | import javax.validation.constraints.Pattern; 11 | 12 | @Data 13 | @ApiModel 14 | public class UpdateMeetingInfoForm { 15 | @NotBlank 16 | private String title; 17 | @NotNull 18 | @Pattern(regexp = "^((((1[6-9]|[2-9]\\d)\\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\\d|3[01]))|(((1[6-9]|[2-9]\\d)\\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\\d|30))|(((1[6-9]|[2-9]\\d)\\d{2})-0?2-(0?[1-9]|1\\d|2[0-8]))|(((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$") 19 | private String date; 20 | private String place; 21 | @NotNull 22 | @Pattern(regexp = "^([01]?[0-9]|2[0-3]):[0-5][0-9]$") 23 | private String start; 24 | @NotNull 25 | @Pattern(regexp = "^([01]?[0-9]|2[0-3]):[0-5][0-9]$") 26 | private String end; 27 | @Range(min = 1,max = 2) 28 | private Byte type; 29 | @NotBlank 30 | private String members; 31 | @NotBlank 32 | private String desc; 33 | @Min(1) 34 | private Integer id; 35 | // @NotBlank 36 | private String instanceId; 37 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateRolePermissionsForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | 6 | import javax.validation.constraints.Min; 7 | import javax.validation.constraints.NotBlank; 8 | import javax.validation.constraints.NotNull; 9 | 10 | @Data 11 | @ApiModel 12 | public class UpdateRolePermissionsForm { 13 | @NotNull 14 | @Min(1) 15 | private Integer id; 16 | @NotBlank 17 | private String permissions; 18 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/controller/form/UpdateUnreadMessageForm.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.controller.form; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import lombok.Data; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | @ApiModel 8 | @Data 9 | public class UpdateUnreadMessageForm { 10 | 11 | @Autowired 12 | private String id; 13 | } 14 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/MessageRefDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.mongodb.client.result.DeleteResult; 4 | import com.mongodb.client.result.UpdateResult; 5 | import com.vincent.emos.wx.db.pojo.MessageRefEntity; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.mongodb.core.MongoTemplate; 8 | import org.springframework.data.mongodb.core.query.Criteria; 9 | import org.springframework.data.mongodb.core.query.Query; 10 | import org.springframework.data.mongodb.core.query.Update; 11 | import org.springframework.stereotype.Repository; 12 | 13 | @Repository 14 | public class MessageRefDao { 15 | 16 | @Autowired 17 | private MongoTemplate mongoTemplate; 18 | 19 | public String insert(MessageRefEntity entity) { 20 | entity = mongoTemplate.save(entity); 21 | return entity.get_id(); 22 | } 23 | 24 | public long searchUnreadCount(int userId){ 25 | 26 | Query query = new Query(); 27 | query.addCriteria(Criteria.where("readFlag").is(false).and("receiverId").is(userId)); 28 | long count = mongoTemplate.count(query,MessageRefEntity.class); 29 | return count; 30 | } 31 | 32 | public long updateUnreadMessage(String id){ 33 | Query query = new Query(); 34 | query.addCriteria(Criteria.where("_id").is(id)); 35 | Update update = new Update(); 36 | update.set("readFlag",true); 37 | UpdateResult result = mongoTemplate.updateFirst(query, update, "message_ref"); 38 | long rows = result.getModifiedCount(); 39 | return rows; 40 | 41 | } 42 | public long deleteMessageRefById(String id){ 43 | Query query = new Query(); 44 | query.addCriteria(Criteria.where("_id").is(id)); 45 | DeleteResult result = mongoTemplate.remove(query,"message_ref"); 46 | long rows = result.getDeletedCount(); 47 | return rows; 48 | 49 | } 50 | 51 | public long deleteUserMessageRef(int receiverId){ 52 | Query query = new Query(); 53 | query.addCriteria(Criteria.where("receiverId").is(receiverId)); 54 | DeleteResult result = mongoTemplate.remove(query,"message_ref"); 55 | long rows = result.getDeletedCount(); 56 | return rows; 57 | 58 | } 59 | 60 | /** 61 | * 查询新接收消息数量 62 | * @param userId 63 | * @return 64 | */ 65 | public long searchLastCount(int userId) { 66 | Query query = new Query(); 67 | query.addCriteria(Criteria.where("lastFlag").is(true).and("receiverId").is(userId)); 68 | 69 | Update update = new Update(); 70 | update.set("lastFlag",false); 71 | UpdateResult result = mongoTemplate.updateMulti(query,update,"message_ref"); 72 | long rows = result.getModifiedCount(); 73 | return rows; 74 | } 75 | 76 | public void testMongoMethod(){ 77 | 78 | // mongoTemplate. 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/SysConfigDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.SysConfig; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface SysConfigDao { 11 | List selectAllParams(); 12 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbActionDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbAction; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface TbActionDao { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(TbAction record); 11 | 12 | int insertSelective(TbAction record); 13 | 14 | TbAction selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(TbAction record); 17 | 18 | int updateByPrimaryKey(TbAction record); 19 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbCheckinDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | import com.vincent.emos.wx.db.pojo.TbCheckin; 3 | import org.apache.ibatis.annotations.Mapper; 4 | import org.apache.shiro.crypto.hash.Hash; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | @Mapper 9 | public interface TbCheckinDao { 10 | Integer haveCheckin(HashMap params); 11 | void insert(TbCheckin tbCheckin); 12 | //今天签到状态 13 | HashMap searchTodayCheckin(int userId); 14 | //总签到天数 15 | long searchCheckinDays(int userId); 16 | //时间段内的签到数据 17 | ArrayList searchWeekCheckin(HashMap param); 18 | 19 | int searchHighRiskCheckin(int userId); 20 | int searchMiddleRiskCheckin(int userId); 21 | 22 | int searchRiskCount(HashMap param); 23 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbCityDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbCity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface TbCityDao { 8 | String searchCode(String city); 9 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbDeptDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbDept; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | 9 | @Mapper 10 | public interface TbDeptDao { 11 | 12 | /** 13 | * @param keyword 14 | * @return 15 | */ 16 | ArrayList searchDeptMembers(String keyword); 17 | 18 | /** 19 | * @param keyword 20 | * @return 21 | */ 22 | ArrayList searchUserGroupByDept(String keyword); 23 | 24 | 25 | ArrayList searchAllDepts(); 26 | 27 | int insertDept(String deptName); 28 | 29 | 30 | int deleteDept(int id); 31 | 32 | int updateDept(TbDept tbDept); 33 | 34 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbEmployeeDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.EmployeeList; 4 | import com.vincent.emos.wx.db.pojo.TbEmployee; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.HashMap; 8 | import java.util.List; 9 | 10 | @Mapper 11 | public interface TbEmployeeDao { 12 | 13 | TbEmployee searchByCode(int code); 14 | List searchEmployeeList(); 15 | List searchByDepartId(int dept_id); 16 | List searchByName(String name); 17 | 18 | int insertEmployee(TbEmployee employee); 19 | 20 | List searchUnActiveEmployees(); 21 | int updateState(HashMap params); 22 | 23 | int updateEmployee(TbEmployee employee); 24 | 25 | int deleteEmployee(int code); 26 | 27 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbFaceModelDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbFaceModel; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface TbFaceModelDao { 8 | String searchFaceModel(int userId); 9 | void insert(TbFaceModel faceModel); 10 | void deleteFaceModel(int userId); 11 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbHolidaysDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | 8 | @Mapper 9 | public interface TbHolidaysDao { 10 | Integer searchTodayIsHolidays(); 11 | ArrayList searchHolidaysInRange(HashMap params); 12 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbMeetingApprovalDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbMeetingApproval; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | @Mapper 9 | public interface TbMeetingApprovalDao { 10 | 11 | int insertApproval(TbMeetingApproval record); 12 | int updateApprovals(HashMap map); 13 | int deleteApprovalByUUID(String uuid); 14 | 15 | 16 | ArrayList searchNeedGMApprovalMeeting(); 17 | ArrayList searchGMAlreadyApprovalMeeting(); 18 | 19 | ArrayList searchMgrAlreadyApprovalMeeting(int userId); 20 | ArrayList searchNeedMgrApprovalMeeting(int userId); 21 | 22 | TbMeetingApproval searchApprovalByUUID(String uuid); 23 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbMeetingDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbMeeting; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.shiro.crypto.hash.Hash; 6 | 7 | import java.util.ArrayList; 8 | import java.util.HashMap; 9 | import java.util.List; 10 | 11 | @Mapper 12 | public interface TbMeetingDao { 13 | int insertMeeting(TbMeeting meeting); 14 | 15 | ArrayList searchMeetingListByPage(HashMap map); 16 | 17 | boolean searchMeetingMembersInSameDept(String uuid); 18 | 19 | HashMap searchMeetingByUUID(String uuid); 20 | 21 | /** 22 | * 会议涉及的部门 23 | * @param uuid 24 | * @return 25 | */ 26 | ArrayList searchMeetingDepts(String uuid); 27 | 28 | int updateMeetingInstanceId(HashMap map); 29 | 30 | 31 | HashMap searchMeetingById(int id); 32 | 33 | ArrayList searchMeetingMembers(int id); 34 | 35 | int updateMeetingInfo(HashMap param); 36 | int updateMeetingStatus(HashMap param); 37 | 38 | int deleteMeetingById(int id); 39 | 40 | List searchUserMeetingInMonth(HashMap param); 41 | 42 | HashMap searchMeetingStatus(String uuid); 43 | 44 | int updateMeetingStatusByUUID(HashMap hashMap); 45 | 46 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbModuleDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbModule; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface TbModuleDao { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(TbModule record); 11 | 12 | int insertSelective(TbModule record); 13 | 14 | TbModule selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(TbModule record); 17 | 18 | int updateByPrimaryKey(TbModule record); 19 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbPermissionDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbPermission; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | @Mapper 7 | public interface TbPermissionDao { 8 | int deleteByPrimaryKey(Integer id); 9 | 10 | int insert(TbPermission record); 11 | 12 | int insertSelective(TbPermission record); 13 | 14 | TbPermission selectByPrimaryKey(Integer id); 15 | 16 | int updateByPrimaryKeySelective(TbPermission record); 17 | 18 | int updateByPrimaryKey(TbPermission record); 19 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbRoleDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbRole; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | 9 | @Mapper 10 | public interface TbRoleDao { 11 | /** 12 | * 查询用户的角色权限 13 | * 14 | * @param id 15 | * @return 16 | */ 17 | ArrayList searchRoleOwnPermission(int id); 18 | 19 | ArrayList searchAllPermission(); 20 | 21 | int insertRole(TbRole role); 22 | 23 | int updateRolePermissions(TbRole role); 24 | 25 | ArrayList searchAllRoles(); 26 | 27 | int deleteRole(int id); 28 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbUserDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | 4 | import com.fasterxml.jackson.databind.ser.std.TokenBufferSerializer; 5 | import com.vincent.emos.wx.db.pojo.ContactList; 6 | import com.vincent.emos.wx.db.pojo.TbUser; 7 | import org.apache.ibatis.annotations.Mapper; 8 | import org.apache.shiro.crypto.hash.Hash; 9 | 10 | 11 | import java.util.ArrayList; 12 | import java.util.HashMap; 13 | import java.util.List; 14 | import java.util.Set; 15 | 16 | @Mapper 17 | public interface TbUserDao { 18 | boolean haveRootUser(); 19 | 20 | int insert(HashMap params); 21 | 22 | int insertUser(TbUser user); 23 | 24 | Integer searchIdByOpenId(String openId); 25 | 26 | Set searchUserPermissions(int userId); 27 | 28 | List searchUserListGroupByDept(); 29 | TbUser searchById(int userId); 30 | 31 | HashMap searchNameAndDept(int userId); 32 | 33 | String searchUserHireDate(int userId); 34 | 35 | HashMap searchUserSummary(int userId); 36 | 37 | int updateUserInfo(TbUser user); 38 | 39 | int updateUserInfoBySys(TbUser user); 40 | 41 | ArrayList searchMembers(List params); 42 | 43 | /** 44 | * 查询用户信息 45 | * 46 | * @param userId 47 | * @return 48 | */ 49 | HashMap searchUserInfo(int userId); 50 | 51 | /** 52 | * 查询部门经理id 53 | * 54 | * @param id 55 | * @return 56 | */ 57 | Integer searchDeptManagerId(int id); 58 | 59 | /** 60 | * 查询总经理id 61 | * 62 | * @return 63 | */ 64 | int searchGmId(); 65 | 66 | List selectUserPhotoAndName(List param); 67 | 68 | int searchDeptManagerIdByDeptId(int dept_id); 69 | 70 | int dimissionEmployee(int id); 71 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/dao/TbWorkdayDao.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.dao; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | 8 | @Mapper 9 | public interface TbWorkdayDao { 10 | Integer searchTodayIsWorkday(); 11 | ArrayList searchWorkDayInRange(HashMap param); 12 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/ContactList.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class ContactList { 9 | 10 | private int dept_id; 11 | private String dept_name; 12 | private List users; 13 | 14 | public int getDept_id() { 15 | return dept_id; 16 | } 17 | 18 | public void setDept_id(int dept_id) { 19 | this.dept_id = dept_id; 20 | } 21 | 22 | public String getDept_name() { 23 | return dept_name; 24 | } 25 | 26 | public void setDept_name(String dept_name) { 27 | this.dept_name = dept_name; 28 | } 29 | 30 | public List getUsers() { 31 | return users; 32 | } 33 | 34 | public void setUsers(List users) { 35 | this.users = users; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/DocumentFile.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DocumentFile { 7 | 8 | String key; 9 | // 文件的etag 10 | String etag; 11 | // 文件的长度 12 | long fileSize; 13 | // 文件的存储类型 14 | String storageClasses ; 15 | } 16 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/EmployeeList.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class EmployeeList { 9 | 10 | private int dept_id; 11 | private String dept_name; 12 | private List employees; 13 | 14 | public int getDept_id() { 15 | return dept_id; 16 | } 17 | 18 | public void setDept_id(int dept_id) { 19 | this.dept_id = dept_id; 20 | } 21 | 22 | public String getDept_name() { 23 | return dept_name; 24 | } 25 | 26 | public void setDept_name(String dept_name) { 27 | this.dept_name = dept_name; 28 | } 29 | 30 | public List getEmployees() { 31 | return employees; 32 | } 33 | 34 | public void setEmployees(List employees) { 35 | this.employees = employees; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/MessageEntity.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.annotation.Id; 5 | import org.springframework.data.mongodb.core.index.Indexed; 6 | import org.springframework.data.mongodb.core.mapping.Document; 7 | 8 | import java.io.Serializable; 9 | import java.util.Date; 10 | 11 | @Data 12 | @Document(collection = "message") 13 | public class MessageEntity implements Serializable { 14 | @Id 15 | private String _id; 16 | @Indexed(unique = true) 17 | private String uuid; 18 | @Indexed 19 | private Integer senderId; 20 | private String senderPhoto="https://static-1258386385.cos.ap-beijing.myqcloud.com/img/System.jpg"; 21 | private String senderName; 22 | @Indexed 23 | private Date sendTime; 24 | private String msg; 25 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/MessageRefEntity.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.annotation.Id; 5 | import org.springframework.data.mongodb.core.index.Indexed; 6 | import org.springframework.data.mongodb.core.mapping.Document; 7 | 8 | 9 | /** 10 | * 消息状态类 11 | */ 12 | @Document(collection = "message_ref") 13 | @Data 14 | public class MessageRefEntity { 15 | @Id 16 | private String _id; 17 | @Indexed 18 | private String messageId; 19 | @Indexed 20 | private Integer receiverId; 21 | @Indexed 22 | private Boolean readFlag; 23 | @Indexed 24 | private Boolean lastFlag; 25 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/SysConfig.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * sys_config 8 | * @author 9 | */ 10 | @Data 11 | public class SysConfig implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 参数名 19 | */ 20 | private String paramKey; 21 | 22 | /** 23 | * 参数值 24 | */ 25 | private String paramValue; 26 | 27 | /** 28 | * 状态 29 | */ 30 | private Byte status; 31 | 32 | /** 33 | * 备注 34 | */ 35 | private String remark; 36 | 37 | private static final long serialVersionUID = 1L; 38 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbAction.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * sys_config 8 | * @author 9 | */ 10 | @Data 11 | public class TbAction implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 参数名 19 | */ 20 | private String paramKey; 21 | 22 | /** 23 | * 参数值 24 | */ 25 | private String paramValue; 26 | 27 | /** 28 | * 状态 29 | */ 30 | private Byte status; 31 | 32 | /** 33 | * 备注 34 | */ 35 | private String remark; 36 | 37 | private static final long serialVersionUID = 1L; 38 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbCheckin.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_checkin 9 | * @author 10 | */ 11 | @Data 12 | public class TbCheckin implements Serializable { 13 | /** 14 | * 主键 15 | */ 16 | private Integer id; 17 | 18 | /** 19 | * 用户ID 20 | */ 21 | private Integer userId; 22 | 23 | /** 24 | * 签到地址 25 | */ 26 | private String address; 27 | 28 | /** 29 | * 国家 30 | */ 31 | private String country; 32 | 33 | /** 34 | * 省份 35 | */ 36 | private String province; 37 | 38 | /** 39 | * 城市 40 | */ 41 | private String city; 42 | 43 | /** 44 | * 区划 45 | */ 46 | private String district; 47 | 48 | /** 49 | * 考勤结果 50 | */ 51 | private Byte status; 52 | 53 | /** 54 | * 风险等级 55 | */ 56 | private Integer risk; 57 | 58 | /** 59 | * 签到日期 60 | */ 61 | private Date date; 62 | 63 | /** 64 | * 签到时间 65 | */ 66 | private Date createTime; 67 | 68 | private static final long serialVersionUID = 1L; 69 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbCity.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * tb_city 8 | * @author 9 | */ 10 | @Data 11 | public class TbCity implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 城市名称 19 | */ 20 | private String city; 21 | 22 | /** 23 | * 拼音简称 24 | */ 25 | private String code; 26 | 27 | private static final long serialVersionUID = 1L; 28 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbDept.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * tb_dept 8 | * @author 9 | */ 10 | @Data 11 | public class TbDept implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 部门名称 19 | */ 20 | private String deptName; 21 | 22 | private static final long serialVersionUID = 1L; 23 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbEmployee.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_employee 9 | * @author 10 | */ 11 | @Data 12 | public class TbEmployee implements Serializable { 13 | /** 14 | * 注册码 15 | */ 16 | private Integer code; 17 | 18 | /** 19 | * 姓名 20 | */ 21 | private String name; 22 | 23 | /** 24 | * 电话 25 | */ 26 | private String tel; 27 | 28 | /** 29 | * 邮箱 30 | */ 31 | private String email; 32 | 33 | /** 34 | * 入职日期 35 | */ 36 | private Date hiredate; 37 | 38 | /** 39 | * 角色 40 | */ 41 | private Object role; 42 | 43 | /** 44 | * 部门id 45 | */ 46 | private Integer deptId; 47 | 48 | private String deptName; 49 | 50 | /** 51 | * 激活 状态 52 | */ 53 | private int state; 54 | /** 55 | * 性别 56 | */ 57 | private Object sex; 58 | private static final long serialVersionUID = 1L; 59 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbFaceModel.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * tb_face_model 8 | * @author 9 | */ 10 | @Data 11 | public class TbFaceModel implements Serializable { 12 | /** 13 | * 主键值 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 用户ID 19 | */ 20 | private Integer userId; 21 | 22 | /** 23 | * 用户人脸模型 24 | */ 25 | private String faceModel; 26 | 27 | private static final long serialVersionUID = 1L; 28 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbHolidays.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_holidays 9 | * @author 10 | */ 11 | @Data 12 | public class TbHolidays implements Serializable { 13 | /** 14 | * 主键 15 | */ 16 | private Integer id; 17 | 18 | /** 19 | * 日期 20 | */ 21 | private Date date; 22 | 23 | private static final long serialVersionUID = 1L; 24 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbMeeting.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_meeting 9 | * @author 10 | */ 11 | @Data 12 | public class TbMeeting implements Serializable { 13 | /** 14 | * 主键 15 | */ 16 | private Long id; 17 | 18 | /** 19 | * UUID 20 | */ 21 | private String uuid; 22 | 23 | /** 24 | * 会议题目 25 | */ 26 | private String title; 27 | 28 | /** 29 | * 创建人ID 30 | */ 31 | private Long creatorId; 32 | 33 | /** 34 | * 日期 35 | */ 36 | private String date; 37 | 38 | /** 39 | * 开会地点 40 | */ 41 | private String place; 42 | 43 | /** 44 | * 开始时间 45 | */ 46 | private String start; 47 | 48 | /** 49 | * 结束时间 50 | */ 51 | private String end; 52 | 53 | /** 54 | * 会议类型(1在线会议,2线下会议) 55 | */ 56 | private Short type; 57 | 58 | /** 59 | * 参与者 60 | */ 61 | private Object members; 62 | 63 | /** 64 | * 会议内容 65 | */ 66 | private String desc; 67 | 68 | /** 69 | * 工作流实例ID 70 | */ 71 | private String instanceId; 72 | 73 | /** 74 | * 状态(1未开始,2进行中,3已结束) 75 | * 态。1待审批,2审批不通过,3未开始,4进行中,5已结束 76 | */ 77 | private Short status; 78 | 79 | /** 80 | * 创建时间 81 | */ 82 | private Date createTime; 83 | 84 | private static final long serialVersionUID = 1L; 85 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbMeetingApproval.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * tb_meeting_approval 8 | * @author 9 | */ 10 | @Data 11 | public class TbMeetingApproval implements Serializable { 12 | private Long id; 13 | 14 | /** 15 | * uuid 16 | */ 17 | private String uuid; 18 | 19 | /** 20 | * 最后审批人 21 | */ 22 | private Long last_user; 23 | 24 | /** 25 | * 需要审批的人元列表 26 | */ 27 | private Object members; 28 | 29 | /** 30 | * 已经审批的人员列表 31 | */ 32 | private Object approvals; 33 | 34 | private static final long serialVersionUID = 1L; 35 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbModule.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * sys_config 8 | * @author 9 | */ 10 | @Data 11 | public class TbModule implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 参数名 19 | */ 20 | private String paramKey; 21 | 22 | /** 23 | * 参数值 24 | */ 25 | private String paramValue; 26 | 27 | /** 28 | * 状态 29 | */ 30 | private Byte status; 31 | 32 | /** 33 | * 备注 34 | */ 35 | private String remark; 36 | 37 | private static final long serialVersionUID = 1L; 38 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbPermission.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * sys_config 8 | * @author 9 | */ 10 | @Data 11 | public class TbPermission implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 参数名 19 | */ 20 | private String paramKey; 21 | 22 | /** 23 | * 参数值 24 | */ 25 | private String paramValue; 26 | 27 | /** 28 | * 状态 29 | */ 30 | private Byte status; 31 | 32 | /** 33 | * 备注 34 | */ 35 | private String remark; 36 | 37 | private static final long serialVersionUID = 1L; 38 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbRole.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import lombok.Data; 5 | 6 | /** 7 | * tb_role 8 | * @author 9 | */ 10 | @Data 11 | public class TbRole implements Serializable { 12 | /** 13 | * 主键 14 | */ 15 | private Integer id; 16 | 17 | /** 18 | * 角色名称 19 | */ 20 | private String roleName; 21 | 22 | /** 23 | * 权限集合 24 | */ 25 | private Object permissions; 26 | 27 | private static final long serialVersionUID = 1L; 28 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbUser.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_user 9 | * @author 10 | */ 11 | @Data 12 | public class TbUser implements Serializable { 13 | /** 14 | * 主键 15 | */ 16 | private Integer id; 17 | 18 | /** 19 | * 长期授权字符串 20 | */ 21 | private String openId; 22 | 23 | /** 24 | * 昵称 25 | */ 26 | private String nickname; 27 | 28 | /** 29 | * 头像网址 30 | */ 31 | private String photo; 32 | 33 | /** 34 | * 姓名 35 | */ 36 | private String name; 37 | 38 | /** 39 | * 性别 40 | */ 41 | private Object sex; 42 | 43 | /** 44 | * 手机号码 45 | */ 46 | private String tel; 47 | 48 | /** 49 | * 邮箱 50 | */ 51 | private String email; 52 | 53 | /** 54 | * 入职日期 55 | */ 56 | private Date hiredate; 57 | 58 | /** 59 | * 角色 60 | */ 61 | private Object role; 62 | 63 | /** 64 | * 是否是超级管理员 65 | */ 66 | private Boolean root; 67 | 68 | /** 69 | * 部门编号 70 | */ 71 | private Integer deptId; 72 | 73 | /** 74 | * 状态 75 | */ 76 | private Byte status; 77 | 78 | /** 79 | * 创建时间 80 | */ 81 | private Date createTime; 82 | 83 | 84 | private String deptName; 85 | private static final long serialVersionUID = 1L; 86 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/db/pojo/TbWorkday.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.db.pojo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | import lombok.Data; 6 | 7 | /** 8 | * tb_holidays 9 | * @author 10 | */ 11 | @Data 12 | public class TbWorkday implements Serializable { 13 | /** 14 | * 主键 15 | */ 16 | private Integer id; 17 | 18 | /** 19 | * 日期 20 | */ 21 | private Date date; 22 | 23 | private static final long serialVersionUID = 1L; 24 | } -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/exception/EmosException.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.exception; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class EmosException extends RuntimeException{ 7 | private String msg; 8 | private int code = 500; 9 | 10 | public EmosException(String msg) { 11 | super(msg); 12 | this.msg = msg; 13 | } 14 | 15 | public EmosException(String msg,Throwable e){ 16 | super(msg,e); 17 | this.msg = msg; 18 | } 19 | 20 | public EmosException(String msg,int code){ 21 | super(msg); 22 | this.msg = msg; 23 | this.code = code; 24 | } 25 | public EmosException(String msg,int code,Throwable e){ 26 | super(msg,e); 27 | this.msg = msg; 28 | this.code = code; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/CheckinService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.controller.form.CheckinForm; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | 8 | /** 9 | * 签到业务类 10 | */ 11 | public interface CheckinService { 12 | /** 13 | * 验证是否可以签到 14 | * 15 | * @param userId 16 | * @param date 17 | * @return 18 | */ 19 | String validCanCheckin(int userId, String date); 20 | 21 | /** 22 | * 进行签到 23 | * 24 | * @param form 25 | * @param userId 26 | * @param path 27 | */ 28 | void checkin(CheckinForm form, int userId, String path); 29 | 30 | /** 31 | * 创建脸部模型 32 | * 33 | * @param userId 34 | * @param path 35 | */ 36 | void createFaceModel(int userId, String path); 37 | 38 | /** 39 | * 查询今天的签到状态 40 | * 41 | * @param userId 42 | * @return 43 | */ 44 | HashMap searchTodayCheckin(int userId); 45 | 46 | /** 47 | * 查询总的签到天数 48 | * 49 | * @param userId 50 | * @return 51 | */ 52 | long searchCheckingDays(int userId); 53 | 54 | // TODO: 2021/2/1 ?? 55 | ArrayList searchWeekCheckin(HashMap param); 56 | 57 | // TODO: 2021/2/1 ?? 58 | ArrayList searchMonthChecking(HashMap param); 59 | 60 | } 61 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/DeptService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbDept; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | 8 | public interface DeptService { 9 | 10 | ArrayList searchAllDepts(); 11 | void insertDept(String deptName); 12 | 13 | void deleteDept(int id); 14 | 15 | void updateDept(TbDept dept); 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/EmployeeService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.EmployeeList; 4 | import com.vincent.emos.wx.db.pojo.TbEmployee; 5 | 6 | import java.util.HashMap; 7 | import java.util.List; 8 | 9 | public interface EmployeeService { 10 | 11 | TbEmployee searchByCode(int code); 12 | 13 | List searchEmployList(); 14 | 15 | List searchContact(String name); 16 | 17 | 18 | TbEmployee insertEmployee(TbEmployee employee); 19 | 20 | List searchUnActiveEmployees(); 21 | void updateState(HashMap params); 22 | 23 | void updateEmployee(TbEmployee employee); 24 | 25 | void deleteEmployee(int code); 26 | 27 | TbEmployee searchEmployee(int code); 28 | } 29 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/HealthyService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.controller.form.CheckinForm; 4 | 5 | 6 | public interface HealthyService { 7 | int getRiskAtLocation( CheckinForm form); 8 | 9 | int searchHighRiskCheckin(int userId); 10 | int searchMiddleRiskCheckin(int userId); 11 | 12 | int searchRiskCheckinCount(int userId,int risk); 13 | } 14 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/MeetingService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbMeeting; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | import java.util.List; 8 | 9 | public interface MeetingService { 10 | void insertMeeting(TbMeeting meeting); 11 | 12 | 13 | ArrayList searchMeetingListByPage(HashMap map); 14 | 15 | HashMap searchMeetingById(int id); 16 | 17 | void updateMeetingInfo(HashMap param); 18 | 19 | void deleteMeetingById(int id); 20 | List searchUserMeetingInMonth(HashMap param); 21 | 22 | 23 | ArrayList searchAlreadyApprovalMeeting(int userId); 24 | ArrayList searchNeedApprovalMeeting(int userId); 25 | 26 | 27 | int approvalMeeting(HashMap hashMap); 28 | 29 | Integer searchMeetingStatus(String uuid); 30 | } 31 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.MessageEntity; 4 | import com.vincent.emos.wx.db.pojo.MessageRefEntity; 5 | 6 | import java.util.HashMap; 7 | import java.util.List; 8 | 9 | /** 10 | * 11 | * 消息业务类 12 | * 13 | */ 14 | public interface MessageService { 15 | /** 16 | * 插入消息实体 17 | * @param entity 18 | * @return 19 | */ 20 | String insertMessage(MessageEntity entity); 21 | 22 | /** 23 | * 插入消息状态 24 | * @param entity 25 | * @return 26 | */ 27 | String insertRef(MessageRefEntity entity); 28 | 29 | /** 30 | * 查询未读消息个数 31 | * @param userId 32 | * @return 33 | */ 34 | long searchUnreadCount(int userId); 35 | 36 | // TODO: 2021/2/1 ??? 37 | long searchLastCount(int userId); 38 | 39 | /** 40 | * 分页查询消息 41 | * @param userId 42 | * @param start 43 | * @param length 44 | * @return 45 | */ 46 | List searchMessageByPage(int userId,long start,int length); 47 | 48 | /** 49 | * 查询消息内容 50 | * @param id 51 | * @return 52 | */ 53 | HashMap searchMessageById(String id); 54 | 55 | /** 56 | * 更新未读的消息 57 | * @param id 58 | * @return 59 | */ 60 | long updateUnreadMessage(String id); 61 | 62 | /** 63 | * 删除消息状态 64 | * @param id 65 | * @return 66 | */ 67 | long deleteMessageRefById(String id); 68 | 69 | } 70 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.TbRole; 4 | 5 | import java.util.ArrayList; 6 | import java.util.HashMap; 7 | 8 | public interface RoleService { 9 | ArrayList searchRoleOwnPermission(int id); 10 | 11 | ArrayList searchAllPermission(); 12 | 13 | void insertRole(TbRole role); 14 | 15 | void updateRolePermissions(TbRole role); 16 | 17 | 18 | ArrayList searchAllRoles(); 19 | 20 | void deleteRole(int id); 21 | } 22 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service; 2 | 3 | import com.vincent.emos.wx.db.pojo.ContactList; 4 | import com.vincent.emos.wx.db.pojo.TbEmployee; 5 | import com.vincent.emos.wx.db.pojo.TbUser; 6 | import org.apache.shiro.crypto.hash.Hash; 7 | 8 | import java.util.ArrayList; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.Set; 12 | 13 | 14 | /** 15 | * 16 | * 用户业务类 17 | * 18 | */ 19 | public interface UserService { 20 | 21 | /** 22 | * 注册用户 23 | * @param registerCode 激活码 24 | * @param code 微信临时授权码 25 | * @param nickName 微信昵称 26 | * @param photo 微信头像 27 | */ 28 | int registerUser(String registerCode, String code, String nickName, String photo, TbEmployee employee); 29 | 30 | 31 | /** 32 | * 查询用户权限 33 | * @param userId 34 | * @return 35 | */ 36 | Set searchUserPermissions(int userId); 37 | 38 | 39 | /** 40 | * 41 | * @param code 微信临时授权码 42 | * @return 43 | */ 44 | Integer login(String code); 45 | 46 | 47 | TbUser searchById(int userId); 48 | 49 | /** 50 | * 查询入职日期 51 | * @param userId 52 | * @return 53 | */ 54 | String searchUserHireDate(int userId); 55 | 56 | 57 | /** 58 | * 查询用户的信息 59 | * @param userId 60 | * @return 61 | */ 62 | HashMap searchUserSummary(int userId); 63 | 64 | /** 65 | * 更新个人信息 66 | * @param user 67 | * @return 68 | */ 69 | int updateUserInfo(TbUser user); 70 | 71 | 72 | ArrayList searchUserGroupByDept(String keyword); 73 | 74 | ArrayList searchMembers(List param); 75 | List selectUserPhotoAndName(List param); 76 | 77 | TbUser searchUserById(int id); 78 | 79 | int dimissionEmployee(int id); 80 | 81 | List searchUserListGroupByDept(); 82 | } 83 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/impl/DeptServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service.impl; 2 | 3 | import com.vincent.emos.wx.db.dao.TbDeptDao; 4 | import com.vincent.emos.wx.db.pojo.TbDept; 5 | import com.vincent.emos.wx.db.pojo.TbRole; 6 | import com.vincent.emos.wx.exception.EmosException; 7 | import com.vincent.emos.wx.service.DeptService; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.context.annotation.Scope; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.ArrayList; 14 | import java.util.HashMap; 15 | 16 | @Service 17 | @Slf4j 18 | @Scope("prototype") 19 | public class DeptServiceImpl implements DeptService { 20 | @Autowired 21 | private TbDeptDao deptDao; 22 | @Override 23 | public ArrayList searchAllDepts() { 24 | return deptDao.searchAllDepts(); 25 | } 26 | 27 | @Override 28 | public void insertDept(String deptName) { 29 | int row = deptDao.insertDept(deptName); 30 | if (row != 1) { 31 | throw new EmosException("添加部门失败"); 32 | } 33 | } 34 | 35 | @Override 36 | public void deleteDept(int id) { 37 | int row = deptDao.deleteDept(id); 38 | if (row != 1) { 39 | throw new EmosException("删除部门失败"); 40 | } 41 | } 42 | 43 | @Override 44 | public void updateDept(TbDept dept) { 45 | int row = deptDao.updateDept(dept); 46 | if (row != 1) { 47 | throw new EmosException("更新部门失败"); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/impl/EmployeeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service.impl; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.vincent.emos.wx.db.dao.TbEmployeeDao; 5 | import com.vincent.emos.wx.db.pojo.EmployeeList; 6 | import com.vincent.emos.wx.db.pojo.TbEmployee; 7 | import com.vincent.emos.wx.exception.EmosException; 8 | import com.vincent.emos.wx.service.EmployeeService; 9 | import lombok.extern.slf4j.Slf4j; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.context.annotation.Scope; 12 | import org.springframework.stereotype.Service; 13 | 14 | import java.text.SimpleDateFormat; 15 | import java.util.Date; 16 | import java.util.HashMap; 17 | import java.util.List; 18 | 19 | 20 | @Service 21 | @Slf4j 22 | @Scope("prototype") 23 | public class EmployeeServiceImpl implements EmployeeService { 24 | 25 | 26 | @Autowired 27 | private TbEmployeeDao employeeDao; 28 | 29 | @Override 30 | public TbEmployee searchByCode(int code) { 31 | return employeeDao.searchByCode(code); 32 | } 33 | 34 | @Override 35 | public List searchEmployList() { 36 | return employeeDao.searchEmployeeList(); 37 | } 38 | 39 | @Override 40 | public List searchContact(String name) { 41 | return employeeDao.searchByName(name); 42 | } 43 | 44 | @Override 45 | public TbEmployee insertEmployee(TbEmployee employee) { 46 | employeeDao.insertEmployee(employee); 47 | return employee; 48 | } 49 | 50 | @Override 51 | public List searchUnActiveEmployees() { 52 | return employeeDao.searchUnActiveEmployees(); 53 | } 54 | 55 | @Override 56 | public void updateState(HashMap params) { 57 | int row = employeeDao.updateState(params); 58 | if (row != 1) { 59 | 60 | throw new EmosException("更新临时员工状态出错"); 61 | } 62 | } 63 | 64 | @Override 65 | public void updateEmployee(TbEmployee employee) { 66 | int row = employeeDao.updateEmployee(employee); 67 | if (row != 1) { 68 | throw new EmosException("更新临时员工信息出错"); 69 | } 70 | 71 | } 72 | 73 | @Override 74 | public void deleteEmployee(int code) { 75 | int row = employeeDao.deleteEmployee(code); 76 | 77 | if (row != 1) { 78 | throw new EmosException("更新临时员工信息出错"); 79 | } 80 | 81 | } 82 | 83 | @Override 84 | public TbEmployee searchEmployee(int code) { 85 | TbEmployee tbEmployee = employeeDao.searchByCode(code); 86 | return tbEmployee; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/impl/HealthyServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service.impl; 2 | 3 | import com.vincent.emos.wx.controller.form.CheckinForm; 4 | import com.vincent.emos.wx.db.dao.TbCheckinDao; 5 | import com.vincent.emos.wx.db.dao.TbCityDao; 6 | import com.vincent.emos.wx.service.HealthyService; 7 | import com.vincent.emos.wx.tencentcloud.util.RiskUtil; 8 | import lombok.extern.slf4j.Slf4j; 9 | import org.apache.shiro.crypto.hash.Hash; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.context.annotation.Scope; 12 | import org.springframework.stereotype.Service; 13 | 14 | import java.util.HashMap; 15 | 16 | @Service 17 | @Slf4j 18 | @Scope("prototype") 19 | public class HealthyServiceImpl implements HealthyService { 20 | 21 | @Autowired 22 | private TbCityDao cityDao; 23 | 24 | @Autowired 25 | private TbCheckinDao checkinDao; 26 | @Override 27 | public int getRiskAtLocation( CheckinForm form) { 28 | return RiskUtil.getRisk(cityDao.searchCode(form.getCity()),form); 29 | } 30 | 31 | @Override 32 | public int searchHighRiskCheckin(int userId) { 33 | return checkinDao.searchHighRiskCheckin(userId); 34 | } 35 | 36 | @Override 37 | public int searchMiddleRiskCheckin(int userId) { 38 | return checkinDao.searchMiddleRiskCheckin(userId); 39 | } 40 | 41 | @Override 42 | public int searchRiskCheckinCount(int userId, int risk) { 43 | HashMap map = new HashMap(); 44 | map.put("userId",userId); 45 | map.put("risk",risk); 46 | return checkinDao.searchRiskCount(map); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/service/impl/MessageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.service.impl; 2 | 3 | import com.vincent.emos.wx.db.dao.MessageDao; 4 | import com.vincent.emos.wx.db.dao.MessageRefDao; 5 | import com.vincent.emos.wx.db.pojo.MessageEntity; 6 | import com.vincent.emos.wx.db.pojo.MessageRefEntity; 7 | import com.vincent.emos.wx.service.MessageService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.HashMap; 12 | import java.util.List; 13 | 14 | @Service 15 | public class MessageServiceImpl implements MessageService { 16 | 17 | @Autowired 18 | private MessageDao messageDao; 19 | 20 | @Autowired 21 | private MessageRefDao messageRefDao; 22 | @Override 23 | public String insertMessage(MessageEntity entity) { 24 | return messageDao.insert(entity); 25 | } 26 | 27 | @Override 28 | public String insertRef(MessageRefEntity entity) { 29 | return messageRefDao.insert(entity); 30 | } 31 | 32 | @Override 33 | public long searchUnreadCount(int userId) { 34 | return messageRefDao.searchUnreadCount(userId); 35 | } 36 | 37 | @Override 38 | public long searchLastCount(int userId) { 39 | return messageRefDao.searchLastCount(userId); 40 | } 41 | 42 | @Override 43 | public List searchMessageByPage(int userId, long start, int length) { 44 | return messageDao.searchMessageByPage(userId,start,length); 45 | } 46 | 47 | @Override 48 | public HashMap searchMessageById(String id) { 49 | return messageDao.searchMessageById(id); 50 | } 51 | 52 | @Override 53 | public long updateUnreadMessage(String id) { 54 | return messageRefDao.updateUnreadMessage(id); 55 | } 56 | 57 | @Override 58 | public long deleteMessageRefById(String id) { 59 | return messageRefDao.deleteMessageRefById(id); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/task/EmailTask.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.task; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.Scope; 6 | import org.springframework.mail.SimpleMailMessage; 7 | import org.springframework.mail.javamail.JavaMailSender; 8 | import org.springframework.scheduling.annotation.Async; 9 | import org.springframework.stereotype.Component; 10 | 11 | import java.io.Serializable; 12 | 13 | 14 | /** 15 | * 16 | * 邮件实体类 17 | * 18 | */ 19 | @Component 20 | @Scope("prototype") 21 | public class EmailTask implements Serializable { 22 | @Autowired 23 | private JavaMailSender javaMailSender; 24 | 25 | // 系统管理员邮箱 26 | @Value("${emos.mail.system}") 27 | private String mailbox; 28 | 29 | @Async 30 | public void sendAsync(SimpleMailMessage mailMessage){ 31 | mailMessage.setFrom(mailbox); 32 | javaMailSender.send(mailMessage); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/tencentcloud/TencentService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.tencentcloud; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | 5 | /** 6 | * 7 | * 腾讯云服务配置 8 | * 9 | */ 10 | public class TencentService { 11 | 12 | @Value("${tencentcloud.secrect-id}") 13 | public String SECRET_ID = ""; 14 | 15 | @Value("${tencentcloud.secrect-key}") 16 | public String SECRET_KEY = ""; 17 | 18 | @Value("${tencentcloud.facelib-id}") 19 | public String FACE_LIBRARY_ID = ""; 20 | 21 | public String DEFAULT_REGION = "ap-beijing"; 22 | 23 | @Value("${tencentcloud.facelib-name}") 24 | public String FACE_LIBRARY_NAME = ""; 25 | 26 | public String END_POINT = "iai.tencentcloudapi.com"; 27 | } 28 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/tencentcloud/face/FaceVerifyService.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.tencentcloud.face; 2 | 3 | import com.tencentcloudapi.common.Credential; 4 | import com.tencentcloudapi.common.profile.ClientProfile; 5 | import com.tencentcloudapi.common.profile.HttpProfile; 6 | import com.tencentcloudapi.common.exception.TencentCloudSDKException; 7 | 8 | import com.tencentcloudapi.iai.v20200303.IaiClient; 9 | import com.tencentcloudapi.iai.v20200303.models.*; 10 | import com.vincent.emos.wx.exception.EmosException; 11 | import com.vincent.emos.wx.tencentcloud.TencentService; 12 | import lombok.extern.slf4j.Slf4j; 13 | import org.springframework.context.annotation.Scope; 14 | import org.springframework.stereotype.Service; 15 | 16 | 17 | /** 18 | * 19 | * 腾讯云 人脸验证类 20 | * 21 | */ 22 | 23 | @Service 24 | @Slf4j 25 | @Scope("prototype") 26 | public class FaceVerifyService extends TencentService { 27 | 28 | public boolean verify(int userId, String image) { 29 | try { 30 | Credential cred = new Credential(SECRET_ID,SECRET_KEY); 31 | HttpProfile httpProfile = new HttpProfile(); 32 | httpProfile.setEndpoint(END_POINT); 33 | ClientProfile clientProfile = new ClientProfile(); 34 | clientProfile.setHttpProfile(httpProfile); 35 | IaiClient client = new IaiClient(cred, DEFAULT_REGION, clientProfile); 36 | VerifyPersonRequest req = new VerifyPersonRequest(); 37 | req.setPersonId(String.valueOf(userId)); 38 | req.setImage(image); 39 | 40 | VerifyPersonResponse resp = client.VerifyPerson(req); 41 | System.out.println(VerifyPersonResponse.toJsonString(resp)); 42 | return resp.getIsMatch(); 43 | } catch (TencentCloudSDKException e) { 44 | System.out.println(e.toString()); 45 | throw new EmosException(e.getMessage()); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/server/src/main/java/com/vincent/emos/wx/tencentcloud/util/RiskUtil.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx.tencentcloud.util; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.vincent.emos.wx.controller.form.CheckinForm; 5 | import com.vincent.emos.wx.exception.EmosException; 6 | import org.jsoup.Jsoup; 7 | import org.jsoup.nodes.Document; 8 | import org.jsoup.nodes.Element; 9 | import org.jsoup.select.Elements; 10 | 11 | 12 | public class RiskUtil { 13 | public static final String STRING_HIGH_RISK = "高风险"; 14 | public static final String STRING_MIDDLE_RISK = "中风险"; 15 | public static final String STRING_LOW_RISK = "低风险"; 16 | 17 | // 风险等级 18 | public static final int RISK_LEVEL_HIGH = 3; 19 | public static final int RISK_LEVEL_MIDDLE = 2; 20 | public static final int RISK_LEVEL_LOW = 1; 21 | public static int getRisk(String cityCode,CheckinForm form){ 22 | int risk = RISK_LEVEL_LOW; 23 | try { 24 | String url = "http://m." + cityCode + ".bendibao.com/news/yqdengji/?qu=" + form.getDistrict(); 25 | Document document = Jsoup.connect(url).get(); 26 | Elements elements = document.getElementsByClass("list-detail"); 27 | for (Element element : elements) { 28 | String result = element.text().split(" ")[1]; 29 | if (STRING_HIGH_RISK.equals(result)) { 30 | risk = RISK_LEVEL_HIGH; 31 | break; 32 | } else if (STRING_MIDDLE_RISK.equals(result)) { 33 | risk = risk < RISK_LEVEL_MIDDLE ? RISK_LEVEL_MIDDLE : risk; 34 | break; 35 | } 36 | } 37 | } catch (Exception e) { 38 | throw new EmosException("获取风险等级失败"); 39 | } 40 | 41 | return risk; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /source/server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | tomcat: 3 | uri-encoding: UTF-8 4 | threads: 5 | max: 200 6 | min-spare: 30 7 | connection-timeout: 5000ms 8 | port: 996 9 | servlet: 10 | context-path: /emos-wx-api 11 | spring: 12 | datasource: 13 | type: com.alibaba.druid.pool.DruidDataSource 14 | druid: 15 | driver-class-name: com.mysql.cj.jdbc.Driver 16 | url: 17 | username: 18 | password: 19 | initial-size: 8 20 | max-active: 16 21 | min-idle: 8 22 | max-wait: 60000 23 | test-while-idle: true 24 | test-on-borrow: false 25 | test-on-return: false 26 | mail: 27 | default-encoding: UTF-8 28 | host: 29 | username: 30 | password: 31 | 32 | 33 | redis: 34 | database: 0 35 | host: localhost 36 | port: 6379 37 | password: 38 | jedis: 39 | pool: 40 | max-active: 1000 41 | max-wait: -1ms 42 | max-idle: 16 43 | min-idle: 8 44 | 45 | data: 46 | mongodb: 47 | host: localhost 48 | port: 49 | database: emos 50 | authentication-database: 51 | username: 52 | password: 53 | 54 | # rabbitmq: 55 | # host: localhost 56 | # port: 5672 57 | # username: guest 58 | # password: guest 59 | # virtual-host: / 60 | # listener: 61 | # simple: 62 | # #acknowledge-mode: manual #设置确认模式手工确认 63 | # concurrency: 3 #消费者最小数量 64 | # max-concurrency: 10 # 消费者最大数量 65 | 66 | mybatis: 67 | mapper-locations: classpath*:mapper/*.xml 68 | type-aliases-package: com.vincent.emos.wx.db.pojo 69 | configuration: 70 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 71 | map-underscore-to-camel-case: true 72 | logging: 73 | level: 74 | root: info 75 | com.vincent.emos.wx.db.dao: warn 76 | pattern: 77 | console: "%d{HH:mm:ss} %-5level %msg%n" 78 | 79 | emos: 80 | jwt: 81 | #密钥 82 | secret: abc123456 83 | #令牌过期时间(天) 84 | expire: 5 85 | #令牌缓存时间(天数) 86 | cache-expire: 10 87 | 88 | 89 | mail: 90 | system: 系统管理员邮箱 91 | hr: hr邮箱 92 | 93 | image-folder: /root/image 94 | 95 | #微信参数配置 96 | wx: 97 | app-id: 98 | app-secret: 99 | 100 | 101 | tencentcloud: 102 | secrect-id: 103 | secrect-key: 104 | facelib-id: 105 | facelib-name: 106 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/SysConfigDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbCityDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbDeptDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 22 | 23 | 36 | 37 | INSERT INTO tb_dept 38 | SET dept_name =#{deptName} 39 | 40 | 41 | 42 | 43 | UPDATE tb_dept 44 | SET dept_name=#{deptName} 45 | WHERE id=#{id} 46 | 47 | 48 | DELETE FROM tb_dept 49 | WHERE id = #{id} 50 | 51 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbFaceModelDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | INSERT INTO tb_face_model 12 | SET user_id = #{userId}, 13 | face_model = #{faceModel} 14 | 15 | 16 | 17 | DELETE from tb_face_model 18 | WHERE user_id = #{userId} 19 | 20 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbHolidaysDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 12 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbRoleDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 22 | 23 | 24 | 35 | 36 | INSERT INTO tb_role 37 | SET role_name=#{roleName}, permissions=#{permissions} 38 | 39 | 40 | UPDATE tb_role 41 | SET permissions=#{permissions} 42 | WHERE id=#{id} 43 | 44 | 45 | 46 | DELETE FROM tb_role 47 | WHERE id = #{id} 48 | 49 | -------------------------------------------------------------------------------- /source/server/src/main/resources/mapper/TbWorkdayDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 12 | -------------------------------------------------------------------------------- /source/server/src/test/java/com/vincent/emos/wx/EmosServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.vincent.emos.wx; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import cn.hutool.core.util.IdUtil; 5 | import com.vincent.emos.wx.db.pojo.TbMeeting; 6 | import com.vincent.emos.wx.service.MeetingService; 7 | import org.junit.jupiter.api.Test; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.boot.test.context.SpringBootTest; 10 | 11 | import java.util.Date; 12 | 13 | @SpringBootTest 14 | class EmosServerApplicationTests { 15 | 16 | @Test 17 | void contextLoads() { 18 | } 19 | 20 | 21 | } 22 | --------------------------------------------------------------------------------