Merge branch 'wcd-2411-update' into wcd
| | |
| | | "<div class=\"highlight\">上月考勤异常,请登录PMS系统查看。</div>", |
| | | errorAttendanceList.stream().map(a -> a.getAttendanceDate().toLocalDateTime().toLocalDate().toString()).collect(Collectors.joining(","))), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | } |
| | | // 获取上个月内缺勤记录(20250718 TODO:因业务需求,打卡必须闭环,否则会导致工时计算错误) |
| | | List<Attendance> lackOfAttendanceList = attendanceList.stream().filter(a -> (a.getActualWorkStartTime() != null && a.getActualWorkEndTime() == null) || (a.getActualWorkStartTime() == null && a.getActualWorkEndTime() != null)).collect(Collectors.toList()); |
| | | if (lackOfAttendanceList.size() > 0) { |
| | | // 缺卡异常提醒 |
| | | sendNotice(Arrays.asList(user.getWeComId()), "上月考勤缺勤提醒", String.format("<div class=\"normal\">缺勤时间:%s</div>" + |
| | | "<div class=\"highlight\">上月存在缺勤,请登录PMS系统查看。</div>", |
| | | lackOfAttendanceList.stream().map(a -> a.getAttendanceDate().toLocalDateTime().toLocalDate().toString()).collect(Collectors.joining(","))), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | List<SysConfigHoliday> holidayConfigurationList = sysConfigHolidayRepository.findAll();
|
| | | for (SysConfigHoliday holidayConfiguration : holidayConfigurationList) {
|
| | | if (holidayConfiguration.getDateType().equals(Constant.DATE_TYPE_LEGAL_HOLIDAYS)
|
| | | || holidayConfiguration.getDateType().equals(Constant.DATE_TYPE_HOLIDAYS)) {
|
| | | || holidayConfiguration.getDateType().equals(Constant.DATE_TYPE_HOLIDAYS)
|
| | | || holidayConfiguration.getDateType().equals(Constant.DATE_TYPE_WEEKEND)) {
|
| | | holiday.add(sdf.format(holidayConfiguration.getHolidayDate()));
|
| | | }
|
| | | }
|
| | |
| | | } else {
|
| | | return PageUtil.toPage(Collections.emptyList(), 0);
|
| | | }
|
| | | if (StringUtils.isNotBlank(criteria.getName())) {
|
| | | criteriaMongo = criteriaMongo.and("name").regex(criteria.getName());
|
| | | }
|
| | | if (criteria.getUserId() != null) {
|
| | | criteriaMongo = criteriaMongo.and("userId").is(criteria.getUserId());
|
| | | }
|
| | |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.io.PrintWriter; |
| | | import java.sql.Timestamp; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class WechatRobotServiceImpl implements WechatRobotService { |
| | | |
| | | // private final String CORP_ID = "wwc0fd49735bfcf0ad"; |
| | | private final String CORP_ID = ""; |
| | | private final String TOKEN = "WTAgLRQif"; |
| | | private final String ENCODING_AES_KEY = "w2FEuoDg2D7DxnmJn4DL6YiD47OSHwB34WXVwa2eriY"; |
| | |
| | | throw new AesException(AesException.IllegalBuffer); |
| | | } |
| | | |
| | | System.out.println("企微解密获得receiveid:" + from_receiveid); |
| | | System.out.println("企微receiveid:" + receiveid); |
| | | |
| | | // receiveid不相同的情况 |
| | | if (!from_receiveid.equals(receiveid)) { |
| | | throw new AesException(AesException.ValidateCorpidError); |
| | |
| | | <!--外出表单--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="closeCard" :visible.sync="goOutVisible" :title="goOutTitle" width="500px"> |
| | | <el-form ref="goOutForm" :model="goOutForm" :rules="goOutRules" size="small" label-width="80px"> |
| | | <el-form-item label="审批者" prop="approvalUserId"> |
| | | <el-select |
| | | v-model="goOutForm.approvalUserId" |
| | | filterable |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | > |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | | :label="item.nickName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="开始时间" prop="outStartTime"> |
| | | <el-date-picker |
| | | v-model="goOutForm.outStartTime" |
| | |
| | | <!--出差表单--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="closeCard" :visible.sync="bussVisible" :title="bussTitle" width="500px"> |
| | | <el-form ref="bussForm" :model="bussForm" :rules="bussRules" size="small" label-width="80px"> |
| | | <el-form-item label="审批者" prop="approvalUserId"> |
| | | <el-select |
| | | v-model="bussForm.approvalUserId" |
| | | filterable |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | > |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | | :label="item.nickName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="开始日期" prop="travelStartTime"> |
| | | <el-date-picker |
| | | v-model="bussForm.travelStartTime" |
| | |
| | | if (data === 'goOut') { |
| | | this.goOutVisible = true |
| | | this.goOutForm.durationUnit = this.dictLeaveTimeTypeHour |
| | | // 判断企微审核 |
| | | if (this.wecomApprovalVisible) { |
| | | this.goOutForm.approvalUserId = 0 |
| | | } |
| | | } else { |
| | | this.bussVisible = true |
| | | this.bussForm.durationUnit = this.dictLeaveTimeTypeDay |
| | | // 判断企微审核 |
| | | if (this.wecomApprovalVisible) { |
| | | this.bussForm.approvalUserId = 0 |
| | | } |
| | | } |
| | | }, |
| | | // 计算时长 |
| | |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-input |
| | | v-model="query.name" |
| | | clearable |
| | | placeholder="请输入任务名称" |
| | | prefix-icon="el-icon-search" |
| | | style="width: 185px;" |
| | | class="filter-item" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <el-select |
| | | v-model="query.taskStatus" |
| | | filterable |
| | |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 340px;" |
| | | :disabled="form.start" |
| | | @change="withUser(form)" |
| | | > |
| | | <el-option |
| | |
| | | queryTypeOptions: [ |
| | | { key: 'userId', display_name: '所属员工' }, |
| | | { key: 'taskStatus', display_name: '任务状态' }, |
| | | { key: 'createTime', display_name: '创建时间' } |
| | | { key: 'createTime', display_name: '创建时间' }, |
| | | { key: 'name', display_name: '名称' } |
| | | ], |
| | | // 字典:任务状态 |
| | | taskStatus: constant.TASK_STATUS, |
| | |
| | | this.formTasks = [] |
| | | this.form.name = null |
| | | this.form.performanceHours = null |
| | | this.form.start = false |
| | | }, |
| | | // 新建之前 |
| | | [CRUD.HOOK.beforeToAdd]() { |
| | |
| | | this.formTasks = [] |
| | | this.form.name = null |
| | | this.form.performanceHours = null |
| | | this.form.start = false |
| | | }, |
| | | [CRUD.HOOK.afterEditCancel]() { |
| | | this.formTasks = [] |
| | | this.form.name = null |
| | | this.form.performanceHours = null |
| | | this.form.start = false |
| | | }, |
| | | // 取消新建之前 |
| | | [CRUD.HOOK.beforeAddCancel]() { |
| | |
| | | this.formTasks = [] |
| | | this.form.name = null |
| | | this.form.performanceHours = null |
| | | this.form.start = false |
| | | }, |
| | | // 提交之后 |
| | | [CRUD.HOOK.afterSubmit]() { |
| | |
| | | this.formTasks = [] |
| | | this.form.name = null |
| | | this.form.performanceHours = null |
| | | this.form.start = false |
| | | }, |
| | | [CRUD.HOOK.beforeToCU]() { |
| | | this.form.task.id = this.query.taskId |