Merge remote-tracking branch 'origin/master'
New file |
| | |
| | | package com.ycl.platform.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import com.ycl.platform.base.AbsEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 动态列 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Data |
| | | @TableName("t_dynamic_column") |
| | | public class DynamicColumn extends AbsEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("ref_id") |
| | | /** 关联一机一档id */ |
| | | private Integer refId; |
| | | |
| | | @TableField("prop_name") |
| | | /** elementui table prop */ |
| | | private String propName; |
| | | |
| | | @TableField("label_value") |
| | | /** elementui table label */ |
| | | private String labelValue; |
| | | |
| | | @TableField("field_value") |
| | | /** 值 */ |
| | | private String fieldValue; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.platform.domain.form; |
| | | |
| | | import com.ycl.platform.base.AbsForm; |
| | | import com.ycl.platform.domain.entity.DynamicColumn; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.system.domain.group.Update; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 动态列表单 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "DynamicColumn表单", description = "动态列表单") |
| | | public class DynamicColumnForm extends AbsForm { |
| | | |
| | | @NotNull(message = "关联一机一档id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("关联一机一档id") |
| | | private Integer refId; |
| | | |
| | | @NotBlank(message = "elementui table prop不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("elementui table prop") |
| | | private String propName; |
| | | |
| | | @NotBlank(message = "elementui table label不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("elementui table label") |
| | | private String labelValue; |
| | | |
| | | @NotBlank(message = "值不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("值") |
| | | private String fieldValue; |
| | | |
| | | public static DynamicColumn getEntityByForm(@NonNull DynamicColumnForm form, DynamicColumn entity) { |
| | | if(entity == null) { |
| | | entity = new DynamicColumn(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
| | |
| | | /** 关键词 */ |
| | | private String keyword; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 动态列查询 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "DynamicColumn查询", description = "动态列查询") |
| | | public class DynamicColumnQuery extends AbsQuery { |
| | | } |
| | | |
New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.DynamicColumn; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 动态列展示 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Data |
| | | public class DynamicColumnVO extends AbsVo { |
| | | |
| | | /** 关联一机一档id */ |
| | | private Integer refId; |
| | | |
| | | /** elementui table prop */ |
| | | private String propName; |
| | | |
| | | /** elementui table label */ |
| | | private String labelValue; |
| | | |
| | | /** 值 */ |
| | | private String fieldValue; |
| | | |
| | | public static DynamicColumnVO getVoByEntity(@NonNull DynamicColumn entity, DynamicColumnVO vo) { |
| | | if(vo == null) { |
| | | vo = new DynamicColumnVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | private Long deptId; |
| | | private String deptName; |
| | | |
| | | /** |
| | | * 动态列 |
| | | */ |
| | | private List<DynamicColumnVO> dynamicColumnList; |
| | | } |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.query.PlatformOnlineQuery; |
| | | import com.ycl.platform.service.DataCenterService; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.platform.service.PlatformOnlineService; |
| | | import com.ycl.system.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | private final DataCenterService dataCenterService; |
| | | private final PlatformOnlineService platformOnlineService; |
| | | private final ITMonitorService monitorService; |
| | | |
| | | /** |
| | | * 资产管理 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/assetManagement") |
| | | @ApiOperation(value = "资产管理", notes = "资产管理") |
| | | @PreAuthorize("hasAuthority('assetManagement:page')") |
| | | public Result assetManagement(DataCenterQuery query) { |
| | | return monitorService.assetManagement(query); |
| | | } |
| | | |
| | | /** |
| | | * 平台在线率 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 车辆:视图库对接稳定性 |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 人脸:视图库对接稳定性 |
| | | * |
| | |
| | | */ |
| | | @GetMapping("/faceViewDockStable") |
| | | public Result faceViewDockStable(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceViewDockStable(query)); |
| | | return (dataCenterService.faceViewDockStable(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/facePointOnlineRate") |
| | | public Result facePointOnlineRate(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.facePointOnlineRate(query)); |
| | | return (dataCenterService.facePointOnlineRate(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceDirectoryConsistency") |
| | | public Result faceDirectoryConsistency(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceDirectoryConsistency(query)); |
| | | return (dataCenterService.faceDirectoryConsistency(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceCollectionConsistency") |
| | | public Result faceCollectionConsistency(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceCollectionConsistency(query)); |
| | | return (dataCenterService.faceCollectionConsistency(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceImgQualification") |
| | | public Result faceImgQualification(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceImgQualification(query)); |
| | | return (dataCenterService.faceImgQualification(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceCapturesImagesAccuracy") |
| | | public Result faceCapturesImagesAccuracy(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceCapturesImagesAccuracy(query)); |
| | | return (dataCenterService.faceCapturesImagesAccuracy(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceTimelyUpload") |
| | | public Result faceTimelyUpload(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceTimelyUpload(query)); |
| | | return (dataCenterService.faceTimelyUpload(query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/faceAvailabilityOfLargeImg") |
| | | public Result faceAvailabilityOfLargeImg(DataCenterQuery query) { |
| | | return Result.ok().data(dataCenterService.faceAvailabilityOfLargeImg(query)); |
| | | return (dataCenterService.faceAvailabilityOfLargeImg(query)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.domain.group.Add; |
| | | import com.ycl.system.domain.group.Update; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.service.DynamicColumnService; |
| | | import com.ycl.platform.domain.form.DynamicColumnForm; |
| | | import com.ycl.platform.domain.query.DynamicColumnQuery; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 动态列 前端控制器 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "动态列", tags = "动态列管理") |
| | | @RestController |
| | | @RequestMapping("/api/dynamic-column") |
| | | public class DynamicColumnController { |
| | | |
| | | private final DynamicColumnService dynamicColumnService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) DynamicColumnForm form) { |
| | | return dynamicColumnService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) DynamicColumnForm form) { |
| | | return dynamicColumnService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:del')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return dynamicColumnService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:del:batch')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return dynamicColumnService.remove(ids); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:page')") |
| | | public Result page(DynamicColumnQuery query) { |
| | | return dynamicColumnService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:detail')") |
| | | public Result detail(@PathVariable("id") Integer id) { |
| | | return dynamicColumnService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @PreAuthorize("hasAuthority('dynamicColumn:list')") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return dynamicColumnService.all(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.DynamicColumn; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.platform.domain.query.DynamicColumnQuery; |
| | | import com.ycl.platform.domain.vo.DynamicColumnVO; |
| | | import com.ycl.platform.domain.form.DynamicColumnForm; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 动态列 Mapper 接口 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Mapper |
| | | public interface DynamicColumnMapper extends BaseMapper<DynamicColumn> { |
| | | |
| | | /** |
| | | * id查找动态列 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | DynamicColumnVO getById(Integer id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") DynamicColumnQuery query); |
| | | |
| | | } |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.query.DashboardQuery; |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.query.HomeQuery; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorRateVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorTotalVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | List<MonitorRateVO> monitorRate(DashboardQuery dashboardQuery); |
| | | |
| | | /** |
| | | * 数据中心-资产管理 |
| | | * |
| | | * @param page |
| | | * @param query |
| | | */ |
| | | void assetManagement(IPage<TMonitorVO> page, @Param("query") DataCenterQuery query); |
| | | } |
New file |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.DynamicColumn; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.platform.domain.form.DynamicColumnForm; |
| | | import com.ycl.platform.domain.query.DynamicColumnQuery; |
| | | import com.ycl.system.Result; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 动态列 服务类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | public interface DynamicColumnService extends IService<DynamicColumn> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(DynamicColumnForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(DynamicColumnForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(DynamicColumnQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(Integer id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.query.DashboardQuery; |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.query.HomeQuery; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorRateVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorTotalVO; |
| | | import com.ycl.system.Result; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | List<MonitorRateVO> monitorRate(DashboardQuery dashboardQuery); |
| | | |
| | | /** |
| | | * 资产管理 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result assetManagement(DataCenterQuery query); |
| | | } |
New file |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.platform.domain.entity.DynamicColumn; |
| | | import com.ycl.platform.mapper.DynamicColumnMapper; |
| | | import com.ycl.platform.service.DynamicColumnService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.DynamicColumnForm; |
| | | import com.ycl.platform.domain.vo.DynamicColumnVO; |
| | | import com.ycl.platform.domain.query.DynamicColumnQuery; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 动态列 服务实现类 |
| | | * |
| | | * @author xp |
| | | * @since 2024-08-16 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DynamicColumnServiceImpl extends ServiceImpl<DynamicColumnMapper, DynamicColumn> implements DynamicColumnService { |
| | | |
| | | private final DynamicColumnMapper dynamicColumnMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(DynamicColumnForm form) { |
| | | DynamicColumn entity = DynamicColumnForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(DynamicColumnForm form) { |
| | | DynamicColumn entity = baseMapper.selectById(form.getId()); |
| | | |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(DynamicColumnQuery query) { |
| | | IPage<DynamicColumnVO> page = PageUtil.getPage(query, DynamicColumnVO.class); |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(Integer id) { |
| | | DynamicColumnVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<DynamicColumn> entities = baseMapper.selectList(null); |
| | | List<DynamicColumnVO> vos = entities.stream() |
| | | .map(entity -> DynamicColumnVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import annotation.DataScope; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.query.DashboardQuery; |
| | | import com.ycl.platform.domain.query.DataCenterQuery; |
| | | import com.ycl.platform.domain.query.HomeQuery; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorRateVO; |
| | | import com.ycl.platform.domain.vo.screen.MonitorTotalVO; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.service.ISysConfigService; |
| | | import com.ycl.utils.StringUtils; |
| | | import com.ycl.utils.redis.RedisCache; |
| | |
| | | public List<MonitorRateVO> monitorRate(DashboardQuery dashboardQuery) { |
| | | return baseMapper.monitorRate(dashboardQuery); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Result assetManagement(DataCenterQuery query) { |
| | | IPage<TMonitorVO> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | baseMapper.assetManagement(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.DynamicColumnMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.DynamicColumnVO"> |
| | | <result column="ref_id" property="refId" /> |
| | | <result column="prop_name" property="propName" /> |
| | | <result column="label_value" property="labelValue" /> |
| | | <result column="field_value" property="fieldValue" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM |
| | | t_dynamic_column TDC |
| | | WHERE |
| | | TDC.id = #{id} AND TDC.deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM |
| | | t_dynamic_column TDC |
| | | WHERE |
| | | TDC.deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | ) c ON a.area = c.area |
| | | </select> |
| | | |
| | | |
| | | <select id="assetManagement" resultMap="dyMap"> |
| | | SELECT |
| | | tm.id, |
| | | tm.serial_number, |
| | | tm.name, |
| | | tm.site_type, |
| | | tm.mac_addr, |
| | | tm.ip, |
| | | tm.camera_fun_type, |
| | | tm.longitude, |
| | | tm.latitude, |
| | | tm.camera_capture_area, |
| | | tm.on_state, |
| | | tm.civil_code, |
| | | tm.integrated_device, |
| | | tm.camera_brand, |
| | | tm.address, |
| | | tm.net_working, |
| | | tm.public_security, |
| | | tm.installed_time, |
| | | tm.management_unit, |
| | | tm.mu_contact_info, |
| | | tm.storage_days, |
| | | tm.monitor_azimuth, |
| | | tm.scene_photo_addr, |
| | | tm.model, |
| | | tm.site_vulgo, |
| | | tm.camera_type, |
| | | tm.camera_light_type, |
| | | tm.encoded_format, |
| | | tm.camera_dept, |
| | | tm.hybm, |
| | | tm.lxbm, |
| | | dc.prop_name, |
| | | dc.label_value, |
| | | dc.field_value |
| | | FROM |
| | | t_monitor tm |
| | | LEFT JOIN t_dynamic_column dc ON tm.id = dc.ref_id |
| | | <where> |
| | | <if test="query.keyword != null and query.keyword != ''"> |
| | | AND (tm.name like concat('%', #{query.keyword}, '%') OR dc.field_value like concat('%', #{query.keyword}, '%')) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <resultMap id="dyMap" type="com.ycl.platform.domain.vo.TMonitorVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="serial_number" property="serialNumber"/> |
| | | <result column="name" property="name"/> |
| | | <result column="site_type" property="siteType"/> |
| | | <result column="mac_addr" property="macAddr"/> |
| | | <result column="ip" property="ip"/> |
| | | <result column="longitude" property="longitude"/> |
| | | <result column="latitude" property="latitude"/> |
| | | <result column="camera_capture_area" property="cameraCaptureArea"/> |
| | | <result column="camera_fun_type" property="cameraFunType"/> |
| | | <result column="on_state" property="onState"/> |
| | | <result column="civil_code" property="civilCode"/> |
| | | <result column="integrated_device" property="integratedDevice"/> |
| | | <result column="camera_brand" property="cameraBrand"/> |
| | | <result column="address" property="address"/> |
| | | <result column="public_security" property="publicSecurity"/> |
| | | <result column="installed_time" property="installedTime"/> |
| | | <result column="management_unit" property="managementUnit"/> |
| | | <result column="mu_contact_info" property="muContactInfo"/> |
| | | <result column="storage_days" property="storageDays"/> |
| | | <result column="monitor_azimuth" property="monitorAzimuth"/> |
| | | <result column="scene_photo_addr" property="scenePhotoAddr"/> |
| | | <result column="model" property="model"/> |
| | | <result column="site_vulgo" property="siteVulgo"/> |
| | | <result column="camera_type" property="cameraType"/> |
| | | <result column="camera_light_type" property="cameraLightType"/> |
| | | <result column="encoded_format" property="encodedFormat"/> |
| | | <result column="camera_dept" property="cameraDept"/> |
| | | <result column="hybm" property="hybm"/> |
| | | <result column="lxbm" property="lxbm"/> |
| | | <collection property="dynamicColumnList" ofType="com.ycl.platform.domain.vo.DynamicColumnVO" resultMap="dynamicColumnMap"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="dynamicColumnMap" type="com.ycl.platform.domain.vo.DynamicColumnVO"> |
| | | <result column="prop_name" property="propName"/> |
| | | <result column="label_value" property="labelValue"/> |
| | | <result column="field_value" property="fieldValue"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |