Browse Source

#mybatis-plus分页不支持-1修改

zhongwei
yang_shj 5 months ago
parent
commit
ef0cfd6749
  1. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java
  2. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/IOperAccessLibraryDetailService.java
  3. 22
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/OperAccessLibraryDetailServiceImpl.java
  4. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassTypeController.java
  5. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyGroupController.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java
  7. 73
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java
  8. 20
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java
  9. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java
  10. 13
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml
  11. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java
  12. 41
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java
  13. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolTypeController.java
  14. 11
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/DangerSourceController.java
  15. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/IDangerSourceService.java
  16. 15
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java
  17. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolTypeService.java
  18. 33
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolTypeServiceImpl.java
  19. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/controller/TicketMatterGroupController.java
  20. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/ITicketMatterGroupService.java
  21. 15
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/impl/TicketMatterGroupServiceImpl.java
  22. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketMeasureController.java
  23. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketMeasureService.java
  24. 17
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketMeasureServiceImpl.java
  25. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketSafetyMeasureController.java
  26. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketSafetyMeasureService.java
  27. 19
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketSafetyMeasureServiceImpl.java

14
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<List<OperAccessLibraryDetailVO>> details(OperAccessLibraryDetailDTO param) {
return R.data(service.details(param));
}
}

7
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<OperAccessLibr
R<IPage<OperAccessLibraryDetailVO>> list(OperAccessLibraryDetailDTO req, Query query);
}
List<OperAccessLibraryDetailVO> details(OperAccessLibraryDetailDTO param);
}

22
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<OperAccessLi
pages.setRecords(OperAccessLibraryDetailWrapper.build().listVO(pages.getRecords()));
return R.data(pages);
}
@Override
public List<OperAccessLibraryDetailVO> details(OperAccessLibraryDetailDTO param) {
Wrapper<OperAccessLibraryDetailEntity> queryWrapper = new LambdaQueryWrapper<OperAccessLibraryDetailEntity>() {{
orderByDesc(OperAccessLibraryDetailEntity::getCreateTime);
if (param.getPid() != null) {
like(OperAccessLibraryDetailEntity::getPid, param.getPid());
}
if (StringUtils.isNotBlank(param.getName())) {
like(OperAccessLibraryDetailEntity::getName, param.getName());
}
}};
List<OperAccessLibraryDetailEntity> details = this.list(queryWrapper);
if(CollectionUtil.isEmpty(details)){
return new ArrayList<>();
}
return OperAccessLibraryDetailWrapper.build().listVO(details);
}
}

17
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<List<ImsDutyClassTypeEntity>> imsDutyClassTypes(ImsDutyClassTypeEntity imsDutyClassType) {
LambdaQueryWrapper<ImsDutyClassTypeEntity> 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));
}
/**
* 获取所有班次类型 代码自定义代号
*/

11
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<List<ImsDutyGroupVO>> dutyGroups(ImsDutyGroupEntity imsDutyGroup) {
return R.data(imsDutyGroupService.dutyGroups(imsDutyGroup));
}
/**
* 新增 代码自定义代号
*/

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/IImsDutyGroupService.java

@ -64,4 +64,6 @@ public interface IImsDutyGroupService extends IService<ImsDutyGroupEntity> {
List<ImsDutyGroupEntity> getDutyGroupJoinDutyMain(String startDate,String endDate);
List<DutyGroupMemberVo> groupMember(Long deptId);
List<ImsDutyGroupVO> dutyGroups(ImsDutyGroupEntity imsDutyGroup);
}

73
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java

@ -415,6 +415,79 @@ public class ImsDutyGroupServiceImpl extends ServiceImpl<ImsDutyGroupMapper, Ims
}).filter(o-> CollectionUtil.isNotEmpty(o.getMember())).collect(Collectors.toList());
}
/**
* 查询列表
* @param imsDutyGroup
* @return
*/
@Override
public List<ImsDutyGroupVO> dutyGroups(ImsDutyGroupEntity imsDutyGroup) {
LambdaQueryWrapper<ImsDutyGroupEntity> queryWrapper = Condition.getQueryWrapper(new ImsDutyGroupEntity(), imsDutyGroup);
if (null != imsDutyGroup.getCreateDept()) {
queryWrapper.eq(ImsDutyGroupEntity::getCreateDept, imsDutyGroup.getCreateDept());
}
queryWrapper.orderByDesc(ImsDutyGroupEntity::getCreateTime);
List<ImsDutyGroupEntity> 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<ImsDutyGroupPVO> imsDutyGroupPVOS = imsDutyGroupPService.listByGroupId(group.getId());
if (CollectionUtil.isNotEmpty(imsDutyGroupPVOS)){
List<Long> 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<ImsDutyGroupPEntity> 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());
}
/**
* 获取某个月的天数

20
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<List<StationVideoTypeVO>> 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<List<StationVideoTypeVO>> stationVideos(StationVideoTypeDTO param) {
return R.data(stationVideoTypeService.stationVideos(param));
}
@RequestMapping(value = "/getVideoByIdsAndType", method = {RequestMethod.GET, RequestMethod.POST})
@ApiOperationSupport(order = 90)

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.java

@ -36,6 +36,8 @@ public interface StationVideoTypeMapper extends UserDataScopeBaseMapper<StationV
IPage<StationVideoTypeVO> getStationVideoOrderBySort(@Param(Constants.WRAPPER) QueryWrapper<StationVideoTypeEntity> wrapper, IPage page);
List<StationVideoTypeVO> stationVideos(@Param(Constants.WRAPPER) QueryWrapper<StationVideoTypeEntity> queryWrapper);
/**
* 获取待运维下存在视频的站点
* @return

13
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationVideoTypeMapper.xml

@ -46,6 +46,19 @@
order by hs.sort
</select>
<select id="stationVideos" resultMap="videoMonitorCleanTree">
select distinct hs.id,hs.`code`,hs.name,hs.ref_dept,hs.sort,hs.create_user,hs.create_dept
from hzims_station_video_type vt,hzims_station hs
<where>
vt.station_id = hs.code and hs.type is not null
and hs.is_deleted = 0 and vt.is_deleted = 0
<if test="ew!=null and ew.sqlSegment!=null and ew.sqlSegment != ''">
and ${ew.sqlSegment}
</if>
</where>
order by hs.sort
</select>
<select id="getAgencyStationsByVideo" resultType="com.hnac.hzims.operational.station.entity.StationEntity">
select distinct hs.id,hs.`code`,hs.name,hs.ref_dept,hs.sort,hs.create_user,hs.create_dept
from hzims_station_video_type vt,hzims_station hs

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java

@ -82,4 +82,7 @@ public interface IStationVideoTypeService extends IService<StationVideoTypeEntit
Map getVideoPointByRegion(Long refDept,String regionCode);
List<StationVideoTypeVO> stationVideos(StationVideoTypeDTO param);
List<StationVideoTypeVO> videoTypes(StationVideoTypeEntity param);
}

41
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java

@ -25,6 +25,7 @@ import com.hnac.hzims.operational.station.vo.HikVideoAreaTreeVO;
import com.hnac.hzims.operational.station.vo.HikVideoAreaVO;
import com.hnac.hzims.operational.station.vo.StationVideoTypeVO;
import com.hnac.hzims.operational.station.vo.VideoMonitorVO;
import com.hnac.hzims.operational.station.wrapper.StationVideoTypeWrapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
@ -32,8 +33,11 @@ import org.springblade.core.log.exception.ServiceException;
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.*;
import org.springblade.system.cache.DictCache;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
@ -51,7 +55,10 @@ import java.util.stream.Collectors;
@Slf4j
public class StationVideoTypeServiceImpl extends ServiceImpl<StationVideoTypeMapper, StationVideoTypeEntity> implements IStationVideoTypeService {
private final ISysClient sysClient;
private final HikPathConfiguration pathConfiguration;
private final IHikVideoService hikVideoService;
@Value("${url.video.login}")
@ -273,6 +280,40 @@ public class StationVideoTypeServiceImpl extends ServiceImpl<StationVideoTypeMap
return cameras.stream().collect(Collectors.groupingBy(c -> deviceMap.get(c.getString("encodeDevIndexCode"))));
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<StationVideoTypeVO> stationVideos(StationVideoTypeDTO param) {
StationVideoTypeEntity stationVideoTypeEntity = BeanUtil.copy(param,StationVideoTypeEntity.class);
QueryWrapper<StationVideoTypeEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(new StationVideoTypeEntity(),stationVideoTypeEntity,false, "vt");
return this.baseMapper.stationVideos(queryWrapper);
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<StationVideoTypeVO> videoTypes(StationVideoTypeEntity param) {
LambdaQueryWrapper<StationVideoTypeEntity> queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(new StationVideoTypeEntity(), param);
queryWrapper.orderByAsc(StationVideoTypeEntity::getStationId).orderByAsc(StationVideoTypeEntity::getSort);
List<StationVideoTypeEntity> records = this.list(queryWrapper);
if(CollectionUtil.isEmpty(records)){
return new ArrayList<>();
}
List<StationVideoTypeVO> videoTypes = StationVideoTypeWrapper.builder().listVO(records);
return videoTypes.stream().peek(videoType->{
R<Dept> dept = sysClient.getDept(videoType.getDeptId());
if (dept.isSuccess() && ObjectUtil.isEmpty(dept.getData())) {
videoType.setDeptName(Optional.ofNullable(dept.getData()).map(Dept::getDeptName).orElse(null));
}
}).collect(Collectors.toList());
}
private HikVideoAreaTreeVO generateAreaTree(Map<String, List<HikVideoAreaVO>> videoAreaMapByParent,HikVideoAreaVO area) {
HikVideoAreaTreeVO parentTree = BeanUtil.copy(area,HikVideoAreaTreeVO.class);
if(CollectionUtil.isNotEmpty(videoAreaMapByParent.get(area.getIndexCode()))) {

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolTypeController.java

@ -24,6 +24,7 @@ import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
@ -33,7 +34,7 @@ import java.util.Map;
*/
@RestController
@AllArgsConstructor
@RequestMapping("/safetyToolType")
@RequestMapping(" /safetyToolType")
@Business(module = Constants.APP_NAME, value = "安全工器具类型", ignore = false)
@Api(tags = "安全工器具类型")
public class SafetyToolTypeController extends BladeController {
@ -111,6 +112,17 @@ public class SafetyToolTypeController extends BladeController {
return R.data(safetyToolTypeService.pageCondition(req, query));
}
@GetMapping("/safetyToolTypes")
@ApiOperationSupport(order = 60)
@OperationAnnotation(moduleName = "安全管理",title = "安全工器具类型",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "查询安全工器具类型列表")
@ApiOperation(value = "查询列表", notes = "查询条件:sendType,name,startSendTime,endSendTime")
@Operate(label = "查询列表", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<List<SafetyToolTypeVO>> safetyToolTypes(SafetyToolTypeListDTO req) {
return R.data(safetyToolTypeService.safetyToolTypes(req));
}
/**
* 查询所有类型并以id-name作为key-value返回
*/

11
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/DangerSourceController.java

@ -92,6 +92,17 @@ public class DangerSourceController extends BladeController {
return dangerSourceService.pageCondition(req, query);
}
@GetMapping("/sources")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "查询列表", notes = "查询条件:eqId,level,`dangerEle,applyType,type")
@OperationAnnotation(moduleName = "安全管理",title = "危险点列表",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "查询危险点列表")
public R<List<DangerSourceVO>> sources(DangerSourceEntity param) {
return R.data(dangerSourceService.sources(param));
}
/**
* 根据ID查询危险源
*/

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/IDangerSourceService.java

@ -64,4 +64,6 @@ public interface IDangerSourceService extends IService<DangerSourceEntity> {
param.put("create_time,update_time",Order.DESC);
return Condition.getQueryWrapper(req,DangerSourceEntity.class,param);
}
List<DangerSourceVO> sources(DangerSourceEntity param);
}

15
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/service/impl/DangerSourceServiceImpl.java

@ -364,6 +364,21 @@ public class DangerSourceServiceImpl extends ServiceImpl<DangerSourceMapper, Dan
}
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<DangerSourceVO> sources(DangerSourceEntity param) {
LambdaQueryWrapper wrapper = getQueryWrapper(param);
List<DangerSourceEntity> sources = this.list(wrapper);
if(CollectionUtil.isEmpty(sources)){
return new ArrayList<>();
}
return DangerSourceWrapper.build().listVO(sources);
}
@Override
public List<SourceVO> listByTenantId(String tenantId) {
return this.baseMapper.listByTenantId(tenantId);

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/ISafetyToolTypeService.java

@ -9,6 +9,7 @@ import com.hnac.hzims.safeproduct.entity.SafetyToolTypeEntity;
import com.hnac.hzims.safeproduct.vo.SafetyToolTypeVO;
import org.springblade.core.mp.support.Query;
import java.util.List;
import java.util.Map;
/**
@ -29,4 +30,6 @@ public interface ISafetyToolTypeService extends IService<SafetyToolTypeEntity> {
IPage pageCondition(SafetyToolTypeListDTO req, Query query);
Map<String, String> getSelOption();
List<SafetyToolTypeVO> safetyToolTypes(SafetyToolTypeListDTO req);
}

33
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/SafetyToolTypeServiceImpl.java

@ -23,7 +23,10 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
@ -134,6 +137,34 @@ public class SafetyToolTypeServiceImpl extends ServiceImpl<SafetyToolTypeMapper,
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<SafetyToolTypeVO> safetyToolTypes(SafetyToolTypeListDTO param) {
QueryWrapper<SafetyToolTypeEntity> queryWrapper = new QueryWrapper<SafetyToolTypeEntity>() {{
if (null != param.getSendType()) {
eq("send_type", param.getSendType());
}
if (StringUtil.isNotBlank(param.getTypeName())) {
like("type_name", StringUtil.trimWhitespace(param.getTypeName()));
}
if (StringUtil.isNotBlank(param.getStartSendTime())) {
ge("send_time", param.getStartSendTime());
}
if (StringUtil.isNotBlank(param.getEndSendTime())) {
le("send_time", param.getEndSendTime());
}
}};
List<SafetyToolTypeEntity> types = this.list(queryWrapper);
if(CollectionUtil.isEmpty(types)){
return new ArrayList<>();
}
return SafetyToolTypeWrapper.build().listVO(types);
}
/**
* 根据ID查询记录并判断记录是否存在
*/
private SafetyToolTypeEntity queryAndCheckExists(Long id) {

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/controller/TicketMatterGroupController.java

@ -95,6 +95,14 @@ public class TicketMatterGroupController extends BladeController {
}
@GetMapping("/matterGroups")
@ApiOperationSupport(order = 80)
@ApiOperation(value = "查询列表")
@Operate(label = "查询票据模板列表",type = BusinessType.QUERY,ignore = false)
public R<List<TicketMatterGroupVO>> matterGroups(TicketMatterGroupDTO param) {
return R.data(service.matterGroups(param));
}
@GetMapping("/list")
@ApiOperationSupport(order = 60)

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/ITicketMatterGroupService.java

@ -14,6 +14,7 @@ import org.springblade.core.tool.api.R;
import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
/**
* @author hx
@ -67,4 +68,6 @@ public interface ITicketMatterGroupService extends IService<TicketMatterGroupEnt
void newPreview(Long id, Integer type, Integer status, HttpServletResponse response);
void preview(Long id,HttpServletResponse response);
List<TicketMatterGroupVO> matterGroups(TicketMatterGroupDTO param);
}

15
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/impl/TicketMatterGroupServiceImpl.java

@ -770,6 +770,21 @@ public class TicketMatterGroupServiceImpl extends ServiceImpl<TicketMatterGroupM
PdfUtils.readPdf(response,pdfPath);
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<TicketMatterGroupVO> matterGroups(TicketMatterGroupDTO param) {
LambdaQueryWrapper<TicketMatterGroupEntity> queryWrapper = this.getQueryWrapper(param);
List<TicketMatterGroupEntity> records = this.list( queryWrapper);
if(CollectionUtil.isEmpty(records)){
return new ArrayList<>();
}
return TicketMatterGroupWrapper.build().listVO(records);
}
private List<Map> convert(List<? extends Object> param) {
if(CollectionUtil.isNotEmpty(param)) {
return IntStream.iterate(0,index -> index + 1).limit(param.size() > 4 ? param.size() : 4).mapToObj(index -> {

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketMeasureController.java

@ -74,6 +74,13 @@ public class StandardTicketMeasureController extends BladeController {
return standardTicketMeasureService.queryList(req, query);
}
@GetMapping("/measures")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页")
public R<List<StandardTicketMeasureVO>> measures(StandardTicketMeasureDto param) {
return R.data(standardTicketMeasureService.measures(param));
}
@GetMapping("/list")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "查询列表")

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketMeasureService.java

@ -69,4 +69,6 @@ public interface IStandardTicketMeasureService extends IService<StandardTicketMe
* @return
*/
List<StandardTicketMeasureEntity> listStandardByTicketId(Long ticketId);
List<StandardTicketMeasureVO> measures(StandardTicketMeasureDto param);
}

17
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketMeasureServiceImpl.java

@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
@ -138,6 +139,22 @@ public class StandardTicketMeasureServiceImpl extends ServiceImpl<StandardTicket
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<StandardTicketMeasureVO> measures(StandardTicketMeasureDto param) {
LambdaQueryWrapper<StandardTicketMeasureEntity> queryWrapper = this.getQueryWrapper(param);
queryWrapper.orderByAsc(StandardTicketMeasureEntity::getSort);
List<StandardTicketMeasureEntity> record = this.list(queryWrapper);
if(CollectionUtil.isEmpty(record)){
return new ArrayList<>();
}
return StandardTicketMeasureWrapper.build().listVO(record);
}
/**
* 获取StandardTicketMeasureEntity - LambdaQueryWrapper
* @param req
* @return

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketSafetyMeasureController.java

@ -82,6 +82,13 @@ public class WorkTicketSafetyMeasureController {
return workTicketSafetyMeasureService.queryList(req, query);
}
@GetMapping("/safetyMeasures")
@ApiOperationSupport(order = 90)
@ApiOperation(value = "查询列表")
public R<List<WorkTicketSafetyMeasureVO>> safetyMeasures(WorkTicketSafetyMeasureDto param) {
return R.data(workTicketSafetyMeasureService.safetyMeasures(param));
}
/**
* 批量新增
* @param measureList

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketSafetyMeasureService.java

@ -63,4 +63,6 @@ public interface IWorkTicketSafetyMeasureService extends IService<WorkTicketSafe
* @return
*/
List<WorkTicketSafetyMeasureEntity> selectByTicketId(Long ticketId);
List<WorkTicketSafetyMeasureVO> safetyMeasures(WorkTicketSafetyMeasureDto param);
}

19
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketSafetyMeasureServiceImpl.java

@ -22,6 +22,7 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
@ -29,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -223,4 +225,21 @@ public class WorkTicketSafetyMeasureServiceImpl extends ServiceImpl<WorkTicketSa
List<WorkTicketSafetyMeasureEntity> entities = this.list(queryWrapper);
return entities;
}
/**
* 查询列表
* @param param
* @return
*/
@Override
public List<WorkTicketSafetyMeasureVO> safetyMeasures(WorkTicketSafetyMeasureDto param) {
LambdaQueryWrapper<WorkTicketSafetyMeasureEntity> queryWrapper = this.getQueryWrapper(param);
queryWrapper.orderByAsc(WorkTicketSafetyMeasureEntity::getType);
queryWrapper.orderByAsc(WorkTicketSafetyMeasureEntity::getSort);
List<WorkTicketSafetyMeasureEntity> record = this.list(queryWrapper);
if(CollectionUtil.isEmpty(record)){
return new ArrayList<>();
}
return WorkTicketSafetyMeasureWrapper.build().listVO(record);
}
}

Loading…
Cancel
Save