diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java index 4d282bbc..692a59cf 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/impl/ActivitiServiceImpl.java @@ -90,19 +90,19 @@ public class ActivitiServiceImpl extends BaseServiceImpl0){ - builder.append(duration.toDays()+"d "); - builder.append(duration.minus(Duration.ofDays(duration.toDays())).toHours()+"h"); - }else if(duration.toHours()>0){ - builder.append(duration.toHours()+"h "); - builder.append(duration.minus(Duration.ofHours(duration.toHours())).toMinutes()+"m"); - }else if(duration.toMinutes()>0){ - builder.append(duration.toMinutes()+"m "); - builder.append(duration.minus(Duration.ofMinutes(duration.toMinutes())).getSeconds()+"s"); - }else { - builder.append(second+"s"); + StringBuilder builder = new StringBuilder(); + Duration duration = Duration.ofSeconds(second); + if (duration.toDays() > 0) { + builder.append(duration.toDays() + "d "); + builder.append(duration.minus(Duration.ofDays(duration.toDays())).toHours() + "h"); + } else if (duration.toHours() > 0) { + builder.append(duration.toHours() + "h "); + builder.append(duration.minus(Duration.ofHours(duration.toHours())).toMinutes() + "m"); + } else if (duration.toMinutes() > 0) { + builder.append(duration.toMinutes() + "m "); + builder.append(duration.minus(Duration.ofMinutes(duration.toMinutes())).getSeconds() + "s"); + } else { + builder.append(second + "s"); } return builder.toString(); } diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java b/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java index 12664577..ed447a80 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java @@ -111,12 +111,12 @@ public class BookMeetingRoomController { sysNoticeDTO.setApplyState(0); // 根据roleId查询userId List useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId)); - if (useIds != null && useIds.size() > 0){ + if (useIds != null && useIds.size() > 0) { String userId = ""; - for (Long use : useIds){ - userId += use.toString()+","; + for (Long use : useIds) { + userId += use.toString() + ","; } - sysNoticeDTO.setReceiverTypeIds(userId.substring(0,userId.length() -1)); + sysNoticeDTO.setReceiverTypeIds(userId.substring(0, userId.length() - 1)); } sysNoticeDTO.setStatus(NoticeStatusEnum.SEND.value()); sysNoticeDTO.setSenderName("流程系统"); @@ -127,7 +127,7 @@ public class BookMeetingRoomController { sysNoticeService.save(sysNoticeDTO); // 还要发送自己能看到的的谁给我审核的消息 String ownedContent = "【通知】您发起的" + dto.getRoomName() + - "会议室申请,当前审核部门为:" + bigDateDeptName + ",审核负责人:会议室管理员" ; + "会议室申请,当前审核部门为:" + bigDateDeptName + ",审核负责人:会议室管理员"; SysNoticeDTO ownedSysNoticeDTO = new SysNoticeDTO(); ownedSysNoticeDTO.setType(10); ownedSysNoticeDTO.setApplyState(0); diff --git a/renren-admin/src/main/java/io/renren/modules/resourceCar/dao/ResourceCarDao.java b/renren-admin/src/main/java/io/renren/modules/resourceCar/dao/ResourceCarDao.java index 4bef40d1..342e789c 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceCar/dao/ResourceCarDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceCar/dao/ResourceCarDao.java @@ -45,8 +45,8 @@ public interface ResourceCarDao extends BaseDao { @Param("name") String name); List selectInfrastructureListByDeptName(@Param("name") String name, - @Param("userId") Long userId, - @Param("deptName") String deptName, - @Param("pageNum") Integer pageNum, - @Param("pageSize") Integer pageSize); + @Param("userId") Long userId, + @Param("deptName") String deptName, + @Param("pageNum") Integer pageNum, + @Param("pageSize") Integer pageSize); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resourceCar/service/impl/ResourceCarServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resourceCar/service/impl/ResourceCarServiceImpl.java index de72310c..07a29bf6 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceCar/service/impl/ResourceCarServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceCar/service/impl/ResourceCarServiceImpl.java @@ -119,7 +119,7 @@ public class ResourceCarServiceImpl extends CrudServiceImpl maps = resourceCarDao.selectInfrastructureCarGroupByDept(userId, (pageNum - 1) * pageSize, pageSize, name); resultMap.put("list", maps); - resultMap.put("deptCount", maps.stream().collect(Collectors.groupingBy(it->it.get("deptName"))).size()); + resultMap.put("deptCount", maps.stream().collect(Collectors.groupingBy(it -> it.get("deptName"))).size()); } break; } diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index 1c66bba8..32b2dde2 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -120,21 +120,21 @@ AND su.dept_id IS NOT NULL GROUP BY tda.attr_value UNION - SELECT - COUNT( taa.apply_flag ) AS 'count', - 'jcss' AS 'type' - FROM - t_ability_application taa, - sys_dept sd, - sys_user su - WHERE - 1 = 1 - AND taa.user_id = su.id - AND su.dept_id = sd.id - AND taa.camera_list != '' - AND taa.camera_list IS NOT NULL - GROUP BY - sd.id + SELECT + COUNT( taa.apply_flag ) AS 'count', + 'jcss' AS 'type' + FROM + t_ability_application taa, + sys_dept sd, + sys_user su + WHERE + 1 = 1 + AND taa.user_id = su.id + AND su.dept_id = sd.id + AND taa.camera_list != '' + AND taa.camera_list IS NOT NULL + GROUP BY + sd.id ) temp2 diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 84a17b25..6fc0a73c 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1016,22 +1016,22 @@ UNION SELECT - COUNT( taa.apply_flag ) AS 'count', + COUNT( taa.apply_flag ) AS 'count', - sd.NAME AS "deptName", - 'jcss' AS 'type' + sd.NAME AS "deptName", + 'jcss' AS 'type' FROM - t_ability_application taa, - sys_dept sd, - sys_user su + t_ability_application taa, + sys_dept sd, + sys_user su WHERE - 1 = 1 - AND taa.user_id = su.id - AND su.dept_id = sd.id - AND taa.camera_list != '' - AND taa.camera_list IS NOT NULL + 1 = 1 + AND taa.user_id = su.id + AND su.dept_id = sd.id + AND taa.camera_list != '' + AND taa.camera_list IS NOT NULL GROUP BY - sd.id + sd.id