大屏项目点位配置
This commit is contained in:
parent
0300705243
commit
443b6e6f3c
@ -0,0 +1,179 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.zhgd.annotation.OperLog;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.dto.BigscreenCustomPositionConfigDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.BigscreenCustomPositionConfigVo;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IBigscreenCustomPositionConfigService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
import com.zhgd.xmgl.modules.project.service.IProjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 大屏自定义项目点位配置
|
||||
* @author: pds
|
||||
* @date: 2025-10-15
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/bigscreenCustomPositionConfig")
|
||||
@Slf4j
|
||||
@Api(tags = "大屏自定义项目点位配置相关Api")
|
||||
public class BigscreenCustomPositionConfigController {
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IBigscreenCustomPositionConfigService bigscreenCustomPositionConfigService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IProjectService projectService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private ICompanyService companyService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
// @OperLog(operModul = "大屏自定义项目点位配置管理", operType = "分页查询", operDesc = "分页列表查询大屏自定义项目点位配置信息")
|
||||
// @ApiOperation(value = "分页列表查询大屏自定义项目点位配置信息", notes = "分页列表查询大屏自定义项目点位配置信息", httpMethod = "GET")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
// @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
// })
|
||||
// @GetMapping(value = "/page")
|
||||
// public Result<IPage<BigscreenCustomPositionConfigVo>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
// return Result.success(bigscreenCustomPositionConfigService.queryPageList(param));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
// @OperLog(operModul = "大屏自定义项目点位配置管理", operType = "列表查询", operDesc = "列表查询大屏自定义项目点位配置信息")
|
||||
// @ApiOperation(value = "列表查询大屏自定义项目点位配置信息", notes = "列表查询大屏自定义项目点位配置信息", httpMethod = "GET")
|
||||
// @GetMapping(value = "/list")
|
||||
// public Result<List<BigscreenCustomPositionConfigVo>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
// return Result.success(bigscreenCustomPositionConfigService.queryList(param));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bigscreenCustomPositionConfigDto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "大屏自定义项目点位配置管理", operType = "添加", operDesc = "添加大屏自定义项目点位配置信息")
|
||||
@ApiOperation(value = "添加大屏自定义项目点位配置信息", notes = "添加大屏自定义项目点位配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<BigscreenCustomPositionConfigVo> add(@RequestBody @Validate BigscreenCustomPositionConfigDto bigscreenCustomPositionConfigDto) {
|
||||
bigscreenCustomPositionConfigService.add(bigscreenCustomPositionConfigDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "大屏自定义项目点位配置管理", operType = "编辑", operDesc = "编辑大屏自定义项目点位配置信息")
|
||||
@ApiOperation(value = "编辑大屏自定义项目点位配置信息", notes = "编辑大屏自定义项目点位配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/editConfig")
|
||||
public Result<BigscreenCustomPositionConfig> editConfig(@RequestBody BigscreenCustomPositionConfigDto dto) {
|
||||
if (Objects.equals(dto.getType(), 1)) {
|
||||
projectService.update(null, new LambdaUpdateWrapper<Project>()
|
||||
.set(Project::getProjectIcon, dto.getProjectIcon())
|
||||
.set(Project::getPositionJson, dto.getPositionJson())
|
||||
.eq(Project::getProjectId, dto.getId())
|
||||
);
|
||||
} else {
|
||||
bigscreenCustomPositionConfigService.edit(dto);
|
||||
}
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "大屏自定义项目点位配置管理", operType = "删除", operDesc = "删除大屏自定义项目点位配置信息")
|
||||
@ApiOperation(value = "删除大屏自定义项目点位配置信息", notes = "删除大屏自定义项目点位配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "大屏自定义项目点位配置ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<BigscreenCustomPositionConfig> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
bigscreenCustomPositionConfigService.delete(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "大屏自定义项目点位配置管理", operType = "通过id查询", operDesc = "通过id查询大屏自定义项目点位配置信息")
|
||||
@ApiOperation(value = "通过id查询大屏自定义项目点位配置信息", notes = "通过id查询大屏自定义项目点位配置信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "大屏自定义项目点位配置ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<BigscreenCustomPositionConfigVo> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
return Result.success(bigscreenCustomPositionConfigService.queryById(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询大屏项目点位配置列表", notes = "查询大屏项目点位配置列表", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sn", value = "企业sn", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/getPositionList")
|
||||
public Result<List<BigscreenCustomPositionConfigVo>> getPositionList(@ApiIgnore @RequestBody HashMap<String, Object> param) {
|
||||
String sn = MapUtils.getString(param, "sn");
|
||||
Company company = companyService.getOne(new LambdaQueryWrapper<Company>()
|
||||
.eq(Company::getCompanySn, sn));
|
||||
List<Project> projectList = projectService.selectProjectListByCompanySn(param);
|
||||
List<BigscreenCustomPositionConfigVo> configVos = projectList.stream().map(p -> {
|
||||
BigscreenCustomPositionConfigVo vo = new BigscreenCustomPositionConfigVo();
|
||||
vo.setId(p.getProjectId());
|
||||
vo.setType(1);
|
||||
vo.setHeadquartersSn(company.getHeadquartersSn());
|
||||
vo.setProjectName(p.getProjectName());
|
||||
vo.setPositionJson(p.getPositionJson());
|
||||
vo.setProjectIcon(p.getProjectIcon());
|
||||
vo.setProjectSn(p.getProjectSn());
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
List<BigscreenCustomPositionConfigVo> positionConfigVos = bigscreenCustomPositionConfigService.list(new LambdaQueryWrapper<BigscreenCustomPositionConfig>()
|
||||
.eq(BigscreenCustomPositionConfig::getHeadquartersSn, company.getHeadquartersSn())).stream().map(config -> {
|
||||
BigscreenCustomPositionConfigVo vo = new BigscreenCustomPositionConfigVo();
|
||||
BeanUtil.copyProperties(config, vo);
|
||||
vo.setType(2);
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
configVos.addAll(positionConfigVos);
|
||||
return Result.success(configVos);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @Description: 大屏自定义项目点位配置
|
||||
* @author: pds
|
||||
* @date: 2025-10-15
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bigscreen_custom_position_config")
|
||||
@ApiModel(value="BigscreenCustomPositionConfig实体类",description="BigscreenCustomPositionConfig")
|
||||
public class BigscreenCustomPositionConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id ;
|
||||
/**总公司sn*/
|
||||
@ApiModelProperty(value="总公司sn")
|
||||
private java.lang.String headquartersSn ;
|
||||
/**自定义项目名称*/
|
||||
@ApiModelProperty(value="自定义项目名称")
|
||||
private java.lang.String projectName ;
|
||||
/**位置json*/
|
||||
@ApiModelProperty(value="位置json")
|
||||
private java.lang.String positionJson ;
|
||||
/**项目图标*/
|
||||
@ApiModelProperty(value="项目图标")
|
||||
private java.lang.String projectIcon ;
|
||||
/**创建时间*/
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private java.util.Date createDate ;
|
||||
/**更新时间*/
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private java.util.Date updateDate ;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.entity.dto;
|
||||
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="BigscreenCustomPositionConfigDto实体类",description="BigscreenCustomPositionConfigDto实体类")
|
||||
public class BigscreenCustomPositionConfigDto extends BigscreenCustomPositionConfig {
|
||||
/**
|
||||
*1项目2自定义
|
||||
*/
|
||||
@ApiModelProperty("1项目2自定义")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
@Data
|
||||
@ApiModel(value="BigscreenCustomPositionConfigVo实体类",description="BigscreenCustomPositionConfigVo实体类")
|
||||
public class BigscreenCustomPositionConfigVo extends BigscreenCustomPositionConfig {
|
||||
/**
|
||||
*1项目2自定义
|
||||
*/
|
||||
@ApiModelProperty("1项目2自定义")
|
||||
private Integer type;
|
||||
/**
|
||||
* 项目唯一标识
|
||||
*/
|
||||
@Excel(name = "项目唯一标识", width = 15)
|
||||
@ApiModelProperty(value = "项目唯一标识")
|
||||
private java.lang.String projectSn;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.BigscreenCustomPositionConfigVo;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.dto.BigscreenCustomPositionConfigDto;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 大屏自定义项目点位配置
|
||||
* @author: pds
|
||||
* @date: 2025-10-15
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BigscreenCustomPositionConfigMapper extends BaseMapper<BigscreenCustomPositionConfig> {
|
||||
|
||||
/**
|
||||
* 分页列表查询大屏自定义项目点位配置信息
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
IPage<BigscreenCustomPositionConfigVo> queryList(Page<BigscreenCustomPositionConfigVo> page, @Param(Constants.WRAPPER) QueryWrapper<BigscreenCustomPositionConfigVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
/**
|
||||
* 列表查询大屏自定义项目点位配置信息
|
||||
*
|
||||
* @param queryWrapper
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BigscreenCustomPositionConfigVo> queryList(@Param(Constants.WRAPPER) QueryWrapper<BigscreenCustomPositionConfigVo> queryWrapper, @Param("param") HashMap<String, Object> param);
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
<?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.zhgd.xmgl.modules.basicdata.mapper.BigscreenCustomPositionConfigMapper">
|
||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.basicdata.entity.vo.BigscreenCustomPositionConfigVo">
|
||||
select * from (
|
||||
select t.*
|
||||
from bigscreen_custom_position_config t
|
||||
)t
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,55 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.BigscreenCustomPositionConfigVo;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.dto.BigscreenCustomPositionConfigDto;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 大屏自定义项目点位配置
|
||||
* @author: pds
|
||||
* @date: 2025-10-15
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IBigscreenCustomPositionConfigService extends IService<BigscreenCustomPositionConfig> {
|
||||
/**
|
||||
* 分页列表查询大屏自定义项目点位配置信息
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
IPage<BigscreenCustomPositionConfigVo> queryPageList(HashMap<String, Object> param);
|
||||
/**
|
||||
* 列表查询大屏自定义项目点位配置信息
|
||||
* @param param 参数map
|
||||
* @return
|
||||
*/
|
||||
List<BigscreenCustomPositionConfigVo> queryList(HashMap<String, Object> param);
|
||||
/**
|
||||
* 添加大屏自定义项目点位配置信息
|
||||
* @param bigscreenCustomPositionConfigDto 大屏自定义项目点位配置
|
||||
* @return
|
||||
*/
|
||||
void add(BigscreenCustomPositionConfigDto bigscreenCustomPositionConfigDto);
|
||||
/**
|
||||
* 编辑大屏自定义项目点位配置信息
|
||||
* @param bigscreenCustomPositionConfigDto 大屏自定义项目点位配置
|
||||
* @return
|
||||
*/
|
||||
void edit(BigscreenCustomPositionConfigDto bigscreenCustomPositionConfigDto);
|
||||
/**
|
||||
* 根据id删除大屏自定义项目点位配置信息
|
||||
* @param id 大屏自定义项目点位配置的id
|
||||
* @return
|
||||
*/
|
||||
void delete(String id);
|
||||
/**
|
||||
* 根据id查询大屏自定义项目点位配置信息
|
||||
* @param id 大屏自定义项目点位配置的id
|
||||
* @return
|
||||
*/
|
||||
BigscreenCustomPositionConfigVo queryById(String id);
|
||||
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BigscreenCustomPositionConfig;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.BigscreenCustomPositionConfigVo;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.dto.BigscreenCustomPositionConfigDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.BigscreenCustomPositionConfigMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.IBigscreenCustomPositionConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.util.MapBuilder;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 大屏自定义项目点位配置
|
||||
* @author: pds
|
||||
* @date: 2025-10-15
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BigscreenCustomPositionConfigServiceImpl extends ServiceImpl<BigscreenCustomPositionConfigMapper, BigscreenCustomPositionConfig> implements IBigscreenCustomPositionConfigService {
|
||||
@Autowired
|
||||
private BigscreenCustomPositionConfigMapper bigscreenCustomPositionConfigMapper;
|
||||
@Override
|
||||
public IPage<BigscreenCustomPositionConfigVo> queryPageList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BigscreenCustomPositionConfigVo> queryWrapper = this.getQueryWrapper(param);
|
||||
Page<BigscreenCustomPositionConfigVo> page = PageUtil.getPage(param);
|
||||
IPage<BigscreenCustomPositionConfigVo> pageList = baseMapper.queryList(page, queryWrapper,param);
|
||||
pageList.setRecords(this.dealList(pageList.getRecords()));
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BigscreenCustomPositionConfigVo> queryList(HashMap<String, Object> param) {
|
||||
QueryWrapper<BigscreenCustomPositionConfigVo> queryWrapper = getQueryWrapper(param);
|
||||
return dealList(baseMapper.queryList(queryWrapper,param));
|
||||
}
|
||||
|
||||
private QueryWrapper<BigscreenCustomPositionConfigVo> getQueryWrapper(HashMap<String, Object> param) {
|
||||
QueryWrapper<BigscreenCustomPositionConfigVo> queryWrapper = QueryGenerator.initPageQueryWrapper(BigscreenCustomPositionConfigVo.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(BigscreenCustomPositionConfigVo::getId));
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
private List<BigscreenCustomPositionConfigVo> dealList(List<BigscreenCustomPositionConfigVo> list) {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(BigscreenCustomPositionConfigDto bigscreenCustomPositionConfigDto) {
|
||||
bigscreenCustomPositionConfigDto.setId(null);
|
||||
baseMapper.insert(bigscreenCustomPositionConfigDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(BigscreenCustomPositionConfigDto bigscreenCustomPositionConfigDto) {
|
||||
BigscreenCustomPositionConfig oldBigscreenCustomPositionConfig = baseMapper.selectById(bigscreenCustomPositionConfigDto.getId());
|
||||
if(oldBigscreenCustomPositionConfig==null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(bigscreenCustomPositionConfigDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
BigscreenCustomPositionConfig bigscreenCustomPositionConfig = baseMapper.selectById(id);
|
||||
if(bigscreenCustomPositionConfig==null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigscreenCustomPositionConfigVo queryById(String id) {
|
||||
List<BigscreenCustomPositionConfigVo> list = this.queryList(new MapBuilder<String, Object>()
|
||||
.put("id", id)
|
||||
.build());
|
||||
BigscreenCustomPositionConfigVo entity = CollUtil.getFirst(list);
|
||||
if (entity == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
}
|
||||
@ -348,6 +348,11 @@ public class Project implements Serializable {
|
||||
private String xiaosaAppSecret;
|
||||
@ApiModelProperty(value="icc同步id")
|
||||
private java.lang.Long iccId ;
|
||||
@ApiModelProperty(value = "项目图标")
|
||||
private String projectIcon;
|
||||
/**位置json*/
|
||||
@ApiModelProperty(value="位置json")
|
||||
private java.lang.String positionJson ;
|
||||
/**
|
||||
* runde平台token
|
||||
*/
|
||||
|
||||
@ -12,6 +12,7 @@ import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -263,4 +264,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
|
||||
boolean hasProjectSnAccess(@Param("userId") Long userId, @Param("sn") String sn);
|
||||
|
||||
boolean hasProjectSnAccessByNewUser(@Param("userId") Long userId, @Param("sn") String sn);
|
||||
|
||||
List<Project> selectProjectListByCompanySn(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -753,4 +753,26 @@
|
||||
from xz_system_user_to_company_project xsutcp
|
||||
where xsutcp.user_id = #{userId} and xsutcp.type=2 and xsutcp.sn=#{sn}
|
||||
</select>
|
||||
|
||||
<select id="selectProjectListByCompanySn" resultType="com.zhgd.xmgl.modules.project.entity.Project">
|
||||
SELECT a.*
|
||||
FROM project a
|
||||
INNER JOIN company cp ON a.company_sn = cp.company_sn
|
||||
INNER JOIN company b ON cp.parent_id = b.company_id
|
||||
Left JOIN company f ON b.parent_id = f.company_id
|
||||
<where>
|
||||
<if test="companyType == '1'.toString()">
|
||||
and f.headquarters_sn = #{sn}
|
||||
</if>
|
||||
<if test="companyType == '2'.toString()">
|
||||
and f.company_sn = #{sn}
|
||||
</if>
|
||||
<if test="companyType == '3'.toString()">
|
||||
and b.company_sn = #{sn}
|
||||
</if>
|
||||
<if test="companyType == '5'.toString()">
|
||||
and cp.company_sn = #{sn}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -234,4 +234,6 @@ public interface IProjectService extends IService<Project> {
|
||||
boolean hasProjectSnAccess(Long userId, String sn);
|
||||
|
||||
boolean hasProjectSnAccessByNewUser(Long userId, String sn);
|
||||
|
||||
List<Project> selectProjectListByCompanySn(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -450,6 +450,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
return baseMapper.hasProjectSnAccessByNewUser(userId, sn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Project> selectProjectListByCompanySn(HashMap<String, Object> map) {
|
||||
return baseMapper.selectProjectListByCompanySn(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveZwProject(ZwProjectDataVo zwProjectDataVo) {
|
||||
Project project = new Project();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user