Merge branch 'wcd-2411-update' into wcd
| | |
| | | .filter(attendanceLeave -> Constant.LEAVE_TYPE_ANNUAL_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_MARRIAGE_HOLIDAY.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_BEREAVEMENT_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | // || Constant.LEAVE_TYPE_REPLACE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_REPLACE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_LACTATION_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | ).map(attendanceLeave -> BigDecimal.valueOf(attendanceLeave.getLeaveDuration())).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
|
| | | // TODO: 此方法只用于计算指定日期工时,不可用于钱款统计的工时计算
|
| | | return result.add(annualLeaveHours).doubleValue();
|
| | |
| | | // 年假不扣工时
|
| | | BigDecimal annualLeaveHours = attendanceLeaveList.stream()
|
| | | .filter(attendanceLeave -> Constant.LEAVE_TYPE_ANNUAL_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_MARRIAGE_HOLIDAY.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_BEREAVEMENT_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_REPLACE.equals(attendanceLeave.getLeaveType()))
|
| | | .map(attendanceLeave -> {
|
| | | || Constant.LEAVE_TYPE_MARRIAGE_HOLIDAY.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_BEREAVEMENT_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_REPLACE.equals(attendanceLeave.getLeaveType())
|
| | | || Constant.LEAVE_TYPE_LACTATION_LEAVE.equals(attendanceLeave.getLeaveType())
|
| | | ).map(attendanceLeave -> {
|
| | | if (Constant.LEAVE_TIME_TYPE_HOUR.equals(attendanceLeave.getLeaveDurationUnit())) {
|
| | | return BigDecimal.valueOf(attendanceLeave.getLeaveDuration());
|
| | | } else {
|
| | |
| | | Gson gson = new Gson(); |
| | | // 特殊参数:开发-公共事务、公司-公共事务的项目名称细化到任务详情一级 |
| | | Set<Long> specialProjectType = new HashSet<>(Arrays.asList(46L, 47L)); |
| | | // 应用参数 |
| | | DateTimeFormatter ymdFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | Map<String, String> leaveTypeMap = dictDetailRepository.findByDictName(Constant.LEAVE_TYPE).stream().collect(Collectors.toMap(DictDetail::getValue, DictDetail::getLabel)); |
| | | |
| | | for (Long userId : userIds) { |
| | | // 查询用户信息 |
| | |
| | | return new BigDecimal(leave.getLeaveDuration()); |
| | | } |
| | | }).reduce(BigDecimal.ZERO, (res, cur) -> res.add(cur)); |
| | | String leaveHourDetail = leaveList.stream().map(leave -> { |
| | | BigDecimal leaveHour = leave.getLeaveDurationUnit().equals(Constant.LEAVE_TIME_TYPE_DAY) ? new BigDecimal(8).multiply(new BigDecimal(leave.getLeaveDuration())) : new BigDecimal(leave.getLeaveDuration()); |
| | | return String.format("%s %s %fH", leave.getLeaveStartTime().toLocalDateTime().format(ymdFormatter), leaveTypeMap.get(leave.getLeaveType()), leaveHour.doubleValue()); |
| | | }).collect(Collectors.joining(";")); |
| | | // 统计换休信息 |
| | | AttendanceOvertimeQueryCriteria overtimeQueryCriteria = new AttendanceOvertimeQueryCriteria(); |
| | | overtimeQueryCriteria.setUserId(userId); |
| | |
| | | String submitTimestamp = String.valueOf(endTime.getTime()); |
| | | values.put("提交日期", new Record.TypedValue(Record.DataType.FIELD_TYPE_DATE_TIME, submitTimestamp).getValue()); |
| | | record.setValues(values); |
| | | // 请假详细 |
| | | RecordCellTextValue leaveDetail = new RecordCellTextValue(); |
| | | leaveDetail.setType("text"); |
| | | leaveDetail.setText(leaveHourDetail); |
| | | values.put("请假详细", new Record.TypedValue(Record.DataType.FIELD_TYPE_TEXT, Arrays.asList(leaveDetail)).getValue()); |
| | | |
| | | if (StringUtils.isNotBlank(record.getRecordId())) { |
| | | // 编辑记录 |
| | |
| | | @ApiModelProperty(value = "登录控制") |
| | | private Boolean loginEnabled; |
| | | |
| | | @Column(name = "`job_second_id`") |
| | | @JoinColumn(name = "job_second_id") |
| | | @OneToOne(fetch = FetchType.EAGER) |
| | | @ApiModelProperty(value = "二级岗位ID") |
| | | private Long jobSecondId; |
| | | private JobSecond jobSecond; |
| | | |
| | | @Override |
| | | public boolean equals(Object o) { |
| | |
| | | private Boolean loginEnabled; |
| | | |
| | | private Long jobSecondId; |
| | | |
| | | private JobSecondDto jobSecond; |
| | | } |
| | |
| | | user.setRoles(resources.getRoles());
|
| | | user.setDept(resources.getDept());
|
| | | user.setJobs(resources.getJobs());
|
| | | user.setJobSecondId(resources.getJobSecondId());
|
| | | user.setJobSecond(resources.getJobSecond());
|
| | | user.setCompanys(resources.getCompanys());
|
| | | user.setPhone(resources.getPhone());
|
| | | user.setNickName(resources.getNickName());
|
| | |
| | | <li><div style="height: 100%"><svg-icon icon-class="login" /> 登录账号<div class="user-right">{{ user.username }}</div></div></li> |
| | | <li><svg-icon icon-class="user1" /> 用户昵称 <div class="user-right">{{ user.nickName }}</div></li> |
| | | <li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept.name }}</div></li> |
| | | <li><svg-icon icon-class="nested" /> 二级岗位 <div class="user-right"> {{ user.jobSecond ? user.jobSecond.name : '未设置' }}</div></li> |
| | | <li><svg-icon icon-class="phone" /> 手机号码 <div class="user-right">{{ user.phone }}</div></li> |
| | | <li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li> |
| | | <li> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="二级岗位" prop="jobSecondId"> |
| | | <el-select v-model="form.jobSecondId" clearable style="width: 184px" placeholder="请选择"> |
| | | <el-form-item label="二级岗位" prop="jobSecond.id"> |
| | | <el-select v-model="form.jobSecond.id" clearable style="width: 184px" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in jobSeconds" |
| | | :key="item.name" |
| | |
| | | let userRoles = [] |
| | | let userJobs = [] |
| | | let userCompanys = [] |
| | | const defaultForm = { id: null, username: null, company: { id: null }, internshipTime: null, nickName: null, gender: '男', email: null, enabled: 'false', loginEnabled: 'false', roles: [], jobs: [], dept: { id: null }, phone: null, birthday: null, address: null, dingding: null, weComId: null, sysRostering: { id: null }, levelId: null, companys: [], jobSecondId: null } |
| | | const defaultForm = { id: null, username: null, company: { id: null }, internshipTime: null, nickName: null, gender: '男', email: null, enabled: 'false', loginEnabled: 'false', roles: [], jobs: [], dept: { id: null }, phone: null, birthday: null, address: null, dingding: null, weComId: null, sysRostering: { id: null }, levelId: null, companys: [], jobSecond: { id: null }} |
| | | export default { |
| | | name: 'User', |
| | | components: { Treeselect, crudOperation, rrOperation, udOperation, pagination, DateRangePicker }, |