diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java index 62ec93c..65ad8c3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java @@ -24,8 +24,9 @@ import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; +import java.util.List; - /** +/** * 检修库明细 * * @author xiashandong @@ -100,4 +101,15 @@ public class OperAccessLibraryDetailController extends BladeController { return service.list(req, query); } + @GetMapping("/details") + @ApiOperationSupport(order = 60) + @ApiOperation(value = "查询参数:pid,name") + @OperationAnnotation(moduleName = "检修管理", + title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, + action = "查询检修库列表") + @Operate(label = "查询检修库列表",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) + public R> details(OperAccessLibraryDetailDTO param) { + return R.data(service.details(param)); + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessLibraryDetailService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessLibraryDetailService.java index a63d7d3..6e17809 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessLibraryDetailService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessLibraryDetailService.java @@ -9,7 +9,9 @@ import com.hnac.hzims.operational.access.vo.OperAccessLibraryDetailVO; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; - /** +import java.util.List; + +/** * 服务类 * * @author xiashandong @@ -23,4 +25,5 @@ public interface IOperAccessLibraryDetailService extends IService> list(OperAccessLibraryDetailDTO req, Query query); -} \ No newline at end of file + List details(OperAccessLibraryDetailDTO param); + } \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessLibraryDetailServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessLibraryDetailServiceImpl.java index 7ac1427..8ebc2d2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessLibraryDetailServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessLibraryDetailServiceImpl.java @@ -15,9 +15,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.CollectionUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** * @author xiashandong * @created 2021-04-28 13:14 @@ -54,4 +58,22 @@ public class OperAccessLibraryDetailServiceImpl extends ServiceImpl details(OperAccessLibraryDetailDTO param) { + Wrapper queryWrapper = new LambdaQueryWrapper() {{ + orderByDesc(OperAccessLibraryDetailEntity::getCreateTime); + if (param.getPid() != null) { + like(OperAccessLibraryDetailEntity::getPid, param.getPid()); + } + if (StringUtils.isNotBlank(param.getName())) { + like(OperAccessLibraryDetailEntity::getName, param.getName()); + } + }}; + List details = this.list(queryWrapper); + if(CollectionUtil.isEmpty(details)){ + return new ArrayList<>(); + } + return OperAccessLibraryDetailWrapper.build().listVO(details); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java index f356c33..e284697 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java @@ -68,6 +68,23 @@ public class ImsDutyClassTypeController extends BladeController { return R.data(pages); } + @GetMapping("/imsDutyClassTypes") + @ApiOperationSupport(order = 10) + @OperationAnnotation(moduleName = "值班管理", + title = "值班配置", + operatorType = OperatorType.MOBILE, + businessType = BusinessType.GENCODE, + action = "查询班次类型设置列表") + @ApiOperation(value = "查询列表", notes = "传入imsDutyClassType") + public R> imsDutyClassTypes(ImsDutyClassTypeEntity imsDutyClassType) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new ImsDutyClassTypeEntity(), imsDutyClassType); + if (null != imsDutyClassType.getCreateDept()) { + queryWrapper.eq(ImsDutyClassTypeEntity::getCreateDept, imsDutyClassType.getCreateDept()); + } + queryWrapper.orderByDesc(ImsDutyClassTypeEntity::getCreateTime); + return R.data(imsDutyClassTypeService.list(queryWrapper)); + } + /** * 获取所有班次类型 代码自定义代号 */ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java index d8d4f15..a398b32 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java @@ -66,6 +66,17 @@ public class ImsDutyGroupController extends BladeController { return imsDutyGroupService.list(imsDutyGroup, query); } + @OperationAnnotation(moduleName = "值班管理",title = "签到记录", + operatorType = OperatorType.MOBILE, + businessType = BusinessType.GENCODE, + action = "查询列表") + @GetMapping("/dutyGroups") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询列表", notes = "传入imsDutyGroup") + public R> dutyGroups(ImsDutyGroupEntity imsDutyGroup) { + return R.data(imsDutyGroupService.dutyGroups(imsDutyGroup)); + } + /** * 新增 代码自定义代号 */ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java index 5431968..cdf23f5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java @@ -64,4 +64,6 @@ public interface IImsDutyGroupService extends IService { List getDutyGroupJoinDutyMain(String startDate,String endDate); List groupMember(Long deptId); + + List dutyGroups(ImsDutyGroupEntity imsDutyGroup); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java index 2d6bd1b..c5cd17b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java @@ -415,6 +415,79 @@ public class ImsDutyGroupServiceImpl extends ServiceImpl CollectionUtil.isNotEmpty(o.getMember())).collect(Collectors.toList()); } + /** + * 查询列表 + * @param imsDutyGroup + * @return + */ + @Override + public List dutyGroups(ImsDutyGroupEntity imsDutyGroup) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new ImsDutyGroupEntity(), imsDutyGroup); + if (null != imsDutyGroup.getCreateDept()) { + queryWrapper.eq(ImsDutyGroupEntity::getCreateDept, imsDutyGroup.getCreateDept()); + } + queryWrapper.orderByDesc(ImsDutyGroupEntity::getCreateTime); + List dutyGrougs = this.list(queryWrapper); + if(CollectionUtil.isEmpty(dutyGrougs)){ + return new ArrayList<>(); + } + return dutyGrougs.stream().map(group->{ + ImsDutyGroupVO record = new ImsDutyGroupVO(); + record.setId(group.getId()); + record.setManagerId(group.getManagerId()); + record.setGroupName(group.getGroupName()); + record.setTenantId(group.getTenantId()); + record.setIsDeleted(group.getIsDeleted()); + record.setCreateTime(group.getCreateTime()); + record.setCreateUser(group.getCreateUser()); + record.setCreateDept(group.getCreateDept()); + User user = UserCache.getUser(group.getManagerId()); + if (ObjectUtil.isNotEmpty(user)&&StringUtils.isNotBlank(user.getRealName())){ + record.setManagerName(user.getRealName()); + } + List imsDutyGroupPVOS = imsDutyGroupPService.listByGroupId(group.getId()); + if (CollectionUtil.isNotEmpty(imsDutyGroupPVOS)){ + List userIds = imsDutyGroupPVOS.stream().map(ImsDutyGroupPVO::getPersonId).collect(Collectors.toList()); + String name = ""; + for (int i1 = 0; i1 < userIds.size(); i1++) { + if(ObjectUtil.isNotEmpty(group.getManagerId())&&!group.getManagerId().equals(userIds.get(i1))){ + User user1 = UserCache.getUser(userIds.get(i1)); + if (ObjectUtil.isNotEmpty(user1)&&StringUtils.isNotBlank(user1.getRealName())) { + name = name + user1.getRealName(); + if (i1 != userIds.size() - 1) { + name = name + ","; + } + } + } else if (ObjectUtil.isEmpty(group.getManagerId())) { + User user1 = UserCache.getUser(userIds.get(i1)); + if (ObjectUtil.isNotEmpty(user1)&&StringUtils.isNotBlank(user1.getRealName())) { + name = name + user1.getRealName(); + if (i1 != userIds.size() - 1) { + name = name + ","; + } + } + } + } + if (StringUtils.isNotBlank(name)) { + record.setPersonName(name); + } + } + List list = imsDutyGroupPService.selectByGroupId(group.getId()); + String personId = ""; + for (int j = 0, len = list.size(); j < len; j++) { + if (j != 0) { + personId += "^" + list.get(j).getPersonId(); + //personName += "^" + list.get(j).getUserName(); + } else { + personId = "" + list.get(j).getPersonId(); + //personName = list.get(j).getUserName(); + } + } + record.setPersonId(personId); + return record; + }).collect(Collectors.toList()); + } + /** * 获取某个月的天数 diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java index afea424..8a94948 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java @@ -1,5 +1,6 @@ package com.hnac.hzims.operational.station.controller; +import cn.hutool.core.collection.CollectionUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -43,6 +44,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; @@ -100,6 +102,17 @@ public class StationVideoTypeController extends BladeController { return R.data(vos); } + @RequestMapping(value = "/videoTypes", method = {RequestMethod.GET, RequestMethod.POST}) + @ApiOperationSupport(order = 10) + @ApiOperation(value = "查询列表", notes = "传入stationVideoType") + @OperationAnnotation( + moduleName = "站点管理", + title = "视频配置", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, + action = "查询视频配置列表") + public R> videoTypes(StationVideoTypeEntity param) { + return R.data(stationVideoTypeService.videoTypes(param)); + } + /** * 新增 */ @@ -187,6 +200,13 @@ public class StationVideoTypeController extends BladeController { return R.data(stationVideoTypeService.getStationVideoOrderBySort(stationVideoTypeDTO, query)); } + @GetMapping("/stationVideos") + @ApiOperationSupport(order = 190) + @ApiOperation(value = "根据站点、视频排序获取视频列表", notes = "根据站点、视频排序获取视频列表") + public R> stationVideos(StationVideoTypeDTO param) { + return R.data(stationVideoTypeService.stationVideos(param)); + } + @RequestMapping(value = "/getVideoByIdsAndType", method = {RequestMethod.GET, RequestMethod.POST}) @ApiOperationSupport(order = 90) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java index 44a4445..38672d7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java @@ -36,6 +36,8 @@ public interface StationVideoTypeMapper extends UserDataScopeBaseMapper getStationVideoOrderBySort(@Param(Constants.WRAPPER) QueryWrapper wrapper, IPage page); + List stationVideos(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); + /** * 获取待运维下存在视频的站点 * @return diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml index ba341c9..23ec9ce 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml @@ -46,6 +46,19 @@ order by hs.sort + +