Merge branch 'wcd-2411-update' of http://192.168.1.110:5678/r/pms-upgrade into wcd
| | |
| | | // 判断是否提交企微审批 |
| | | List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList()); |
| | | if (siteTypes.size() > 0) { |
| | | // 企微申请时审批人需要默认值 |
| | | attendanceBusinessTravel.setApprovalUserId(0L); |
| | | // 添加企微申请参数 |
| | | attendanceBusinessTravel.setWecomLocation(String.format("%s -至- %s", Optional.ofNullable(attendanceBusinessTravel.getDepartureCity()).orElse("出发城市"), Optional.ofNullable(attendanceBusinessTravel.getArrivalCity()).orElse("到达城市"))); |
| | | attendanceBusinessTravel.setWecomDateType(ElAdminConstant.Constant.TEMPLATE_DATE_TYPE_HALFDAY); |
| | |
| | | // 判断是否提交企微审批
|
| | | List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList());
|
| | | if (siteTypes.size() > 0) {
|
| | | // 企微申请时审批人需要默认值
|
| | | resources.setApprovalUserId(0L);
|
| | | // 添加企微申请参数
|
| | | resources.setWecomDateType(ElAdminConstant.Constant.TEMPLATE_DATE_TYPE_HOUR);
|
| | | Map<String, String> cardTypeMap = dictDetailRepository.findByDictName(Constant.CARD_REPLACEMENT_DIFFERENTIATION).stream().collect(Collectors.toMap(DictDetail::getValue, DictDetail::getLabel));
|
| | |
| | | // 判断是否提交企微审批
|
| | | List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList());
|
| | | if (siteTypes.size() > 0) {
|
| | | // 企微申请时审批人需要默认值
|
| | | resources.setApprovalUserId(0L);
|
| | | // 添加企微申请参数
|
| | | resources.setWecomType(dictDetailRepository.findByDictNameAndValue("go_out_type", resources.getOutOfOfficeType()).getLabel());
|
| | | resources.setWecomLocation("暂无");
|
| | |
| | | // 判断是否提交企微审批
|
| | | List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList());
|
| | | if (siteTypes.size() > 0) {
|
| | | // 企微申请时审批人需要默认值
|
| | | attendanceLeave.setApprovalUserId(0L);
|
| | | // 添加企微申请参数
|
| | | if (resources.getLeaveDurationUnit().equals(Constant.LEAVE_TIME_TYPE_HOUR)) {
|
| | | attendanceLeave.setWecomDateType(ElAdminConstant.Constant.TEMPLATE_DATE_TYPE_HOUR);
|
| | |
| | | // 判断是否提交企微审批
|
| | | List<DictDetail> siteTypes = dictDetailRepository.findByDictName(Constant.APPROVAL_SITE_TYPE).stream().filter(siteType -> siteType.getValue().toLowerCase().equals("wecom")).collect(Collectors.toList());
|
| | | if (siteTypes.size() > 0) {
|
| | | // 企微申请时审批人需要默认值
|
| | | resources.setApprovalUserId(0L);
|
| | | // 添加企微申请参数
|
| | | resources.setWecomDateType(ElAdminConstant.Constant.TEMPLATE_DATE_TYPE_HOUR);
|
| | | resources.setWecomDuration(String.valueOf(new BigDecimal(resources.getOvertimeDuration()).multiply(new BigDecimal(3600)).longValue()));
|
| | |
| | | */ |
| | | private static void fixJsonStructure(JSONObject jsonObject) { |
| | | // 定义需要确保为列表的字段名 |
| | | String[] listFields = {"ProcessList", "NodeList", "Details", "Notifyer", "SubNodeList"}; |
| | | String[] listFields = {"ProcessList", "NodeList", "Details", "Notifyer", "SubNodeList", "SpRecord" }; |
| | | |
| | | for (String fieldName : listFields) { |
| | | if (jsonObject.has(fieldName)) { |