| | |
| | | |
| | | /** |
| | | * 获取时限 |
| | | * @param limitTable 表名 |
| | | * @param limitType 时限类型 |
| | | * @return List |
| | | */ |
| | | public Integer getTimeLimit(String limitTable, String limitType){ |
| | | public Integer getTimeLimitHour(String limitType){ |
| | | int timeTerm = 0; |
| | | try{ |
| | | ReturnBO returnBo = sysClient.getTimeLimit(limitTable, limitType); |
| | | ReturnBO returnBo = sysClient.getExpireTime(limitType); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | timeTerm = (int)returnBo.getData(); |
| | | SyTimeLimitDTO syTimeLimitDTO = objectMapper.convertValue(returnBo.getData(), SyTimeLimitDTO.class); |
| | | if (ObjectUtils.isNotEmpty(syTimeLimitDTO)){ |
| | | if (ObjectUtils.isNotEmpty(syTimeLimitDTO)){ |
| | | if (TimeUnitConsts.TIME_UNIT_1.equals(syTimeLimitDTO.getTermUnit())){ |
| | | timeTerm = syTimeLimitDTO.getTimeTerm()*24*365; |
| | | } |
| | | if (TimeUnitConsts.TIME_UNIT_2.equals(syTimeLimitDTO.getTermUnit())){ |
| | | timeTerm = syTimeLimitDTO.getTimeTerm()*24*30; |
| | | } |
| | | if (TimeUnitConsts.TIME_UNIT_3.equals(syTimeLimitDTO.getTermUnit())){ |
| | | timeTerm = syTimeLimitDTO.getTimeTerm()*24; |
| | | } |
| | | if (TimeUnitConsts.TIME_UNIT_4.equals(syTimeLimitDTO.getTermUnit())){ |
| | | timeTerm = syTimeLimitDTO.getTimeTerm(); |
| | | } |
| | | if (TimeUnitConsts.TIME_UNIT_5.equals(syTimeLimitDTO.getTermUnit())){ |
| | | timeTerm = syTimeLimitDTO.getTimeTerm()/60; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | public Date getExpireTime(Date computeTime, String limitType){ |
| | | Date expireTime = null; |
| | | try{ |
| | | ReturnBO returnBo = sysClient.getExpireTime(computeTime, limitType); |
| | | ReturnBO returnBo = sysClient.getExpireTime(limitType); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | SyTimeLimitDTO syTimeLimitDTO = objectMapper.convertValue(returnBo.getData(), SyTimeLimitDTO.class); |
| | |
| | | log.error("service方法[SysClientImpl.saveFileRelateList]请求异常:"+e, e); |
| | | } |
| | | } |
| | | |
| | | public List<QueAreaDTO> listByParentId(String parentId){ |
| | | List<QueAreaDTO> queAreaDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = sysClient.listByParentId(parentId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | | for (LinkedHashMap map : list) { |
| | | QueAreaDTO queAreaDTO = JSON.parseObject(JSON.toJSONString(map), QueAreaDTO.class); |
| | | queAreaDTOList.add(queAreaDTO); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[SysClientImpl.listFileRelateByOwnerId]调用异常:"+e, e); |
| | | } |
| | | return queAreaDTOList; |
| | | } |
| | | |
| | | } |