索道运输
This commit is contained in:
parent
220f00bb8a
commit
f7410e8b88
|
|
@ -0,0 +1,107 @@
|
|||
package com.bonus.digitalSignage.basic.controller;
|
||||
|
||||
import com.bonus.digitalSignage.annotation.DecryptAndVerify;
|
||||
import com.bonus.digitalSignage.annotation.LogAnnotation;
|
||||
import com.bonus.digitalSignage.basic.service.TbCablewaTransService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbCablewaTransVo;
|
||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||
import com.bonus.digitalSignage.utils.ExcelUtil;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 索道运输
|
||||
* @author 马三炮
|
||||
* @date 2025/4/27
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tbCablewaTrans")
|
||||
@Slf4j
|
||||
public class TbCablewaTransController {
|
||||
|
||||
@Resource
|
||||
private TbCablewaTransService tbCablewaTransService;
|
||||
|
||||
/**
|
||||
* 索道运输-查询列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/tbCablewaTransList")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "杆塔管理-查询列表", operation = "查询列表", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse getTbTowerList(EncryptedReq<TbCablewaTransVo> dto) {
|
||||
PageHelper.startPage(dto.getData().getPageNum(), dto.getData().getPageSize());
|
||||
return tbCablewaTransService.tbCablewaTransList(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-查询详情
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/getTbCablewaTransById")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "索道运输-查询详情", operation = "查询详情", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse getTbCablewaTransById(EncryptedReq<TbCablewaTransVo> dto) {
|
||||
return tbCablewaTransService.getTbCablewaTransById(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-新增
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addTbCablewaTrans")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "索道运输-新增", operation = "新增", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse addTbCablewaTrans(EncryptedReq<TbCablewaTransVo> dto) {
|
||||
return tbCablewaTransService.addTbCablewaTrans(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-修改
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateTbCablewaTrans")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "索道运输-修改", operation = "修改", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse updateTbCablewaTrans(EncryptedReq<TbCablewaTransVo> dto) {
|
||||
return tbCablewaTransService.updateTbCablewaTrans(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-删除
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/delTbCablewaTrans")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "索道运输-删除", operation = "删除", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse delTbCablewaTrans(EncryptedReq<TbCablewaTransVo> dto) {
|
||||
return tbCablewaTransService.delTbCablewaTrans(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-导出
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/delTbCablewaTrans")
|
||||
@DecryptAndVerify(decryptedClass = TbCablewaTransVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "索道运输-导出", operation = "导出", operDesc = "系统级事件",operType="查询")
|
||||
public void delTbCablewaTrans(HttpServletResponse response, EncryptedReq<TbCablewaTransVo> dto) {
|
||||
List<TbCablewaTransVo> tbCablewaTransVoList = tbCablewaTransService.tbCablewaTransAll(dto.getData());
|
||||
ExcelUtil<TbCablewaTransVo> util = new ExcelUtil<>(TbCablewaTransVo.class);
|
||||
util.exportExcel(response, tbCablewaTransVoList, "索道运输");
|
||||
}
|
||||
}
|
||||
|
|
@ -2,16 +2,13 @@ package com.bonus.digitalSignage.basic.controller;
|
|||
|
||||
import com.bonus.digitalSignage.annotation.DecryptAndVerify;
|
||||
import com.bonus.digitalSignage.annotation.LogAnnotation;
|
||||
import com.bonus.digitalSignage.backstage.entity.dto.QueryParamDto;
|
||||
import com.bonus.digitalSignage.basic.service.TbProjectService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||
import com.bonus.digitalSignage.utils.ExcelUtil;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
|
@ -21,6 +18,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 线路工程
|
||||
* @author 马三炮
|
||||
* @date 2025/4/24
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ package com.bonus.digitalSignage.basic.controller;
|
|||
import com.bonus.digitalSignage.annotation.DecryptAndVerify;
|
||||
import com.bonus.digitalSignage.annotation.LogAnnotation;
|
||||
import com.bonus.digitalSignage.basic.service.TbThreeSpanService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbThreeSpanVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||
import com.bonus.digitalSignage.utils.ExcelUtil;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
|
@ -20,6 +18,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 三跨
|
||||
* @author 马三炮
|
||||
* @date 2025/4/25
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.bonus.digitalSignage.basic.controller;
|
|||
import com.bonus.digitalSignage.annotation.DecryptAndVerify;
|
||||
import com.bonus.digitalSignage.annotation.LogAnnotation;
|
||||
import com.bonus.digitalSignage.basic.service.TbTowerService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||
import com.bonus.digitalSignage.utils.ExcelUtil;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.digitalSignage.basic.dao;
|
||||
|
||||
import com.bonus.digitalSignage.basic.vo.TbCablewaTransVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCablewaTransMapper {
|
||||
List<TbCablewaTransVo> tbCablewaTransList(TbCablewaTransVo data);
|
||||
|
||||
TbCablewaTransVo getTbCablewaTransById(TbCablewaTransVo data);
|
||||
|
||||
void addTbCablewaTrans(TbCablewaTransVo data);
|
||||
|
||||
void updateTbCablewaTrans(TbCablewaTransVo data);
|
||||
|
||||
void delTbCablewaTrans(TbCablewaTransVo data);
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.bonus.digitalSignage.basic.service;
|
||||
|
||||
import com.bonus.digitalSignage.basic.vo.TbCablewaTransVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbCablewaTransService {
|
||||
/**
|
||||
* 索道运输-查询列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse tbCablewaTransList(TbCablewaTransVo data);
|
||||
|
||||
/**
|
||||
* 索道运输-查询详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getTbCablewaTransById(TbCablewaTransVo data);
|
||||
|
||||
/**
|
||||
* 索道运输-新增
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse addTbCablewaTrans(TbCablewaTransVo data);
|
||||
|
||||
/**
|
||||
* 索道运输-新增
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse updateTbCablewaTrans(TbCablewaTransVo data);
|
||||
|
||||
|
||||
/**
|
||||
* 索道运输-删除
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse delTbCablewaTrans(TbCablewaTransVo data);
|
||||
|
||||
/**
|
||||
* 索道运输-查询所有
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<TbCablewaTransVo> tbCablewaTransAll(TbCablewaTransVo data);
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.digitalSignage.basic.service;
|
||||
|
||||
import com.bonus.digitalSignage.basic.vo.TbThreeSpanVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
package com.bonus.digitalSignage.basic.service.impl;
|
||||
|
||||
import com.bonus.digitalSignage.basic.dao.TbCablewaTransMapper;
|
||||
import com.bonus.digitalSignage.basic.service.TbCablewaTransService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbCablewaTransVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.bonus.digitalSignage.utils.UserUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/27
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbCablewaTransServiceImpl implements TbCablewaTransService {
|
||||
|
||||
@Resource
|
||||
private TbCablewaTransMapper tbCablewaTransMapper;
|
||||
|
||||
/**
|
||||
* 索道运输-查询列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse tbCablewaTransList(TbCablewaTransVo data) {
|
||||
try {
|
||||
List<TbCablewaTransVo> tbCablewaTransVoList = tbCablewaTransMapper.tbCablewaTransList(data);
|
||||
PageInfo<TbCablewaTransVo> pageInfo = new PageInfo<>(tbCablewaTransVoList);
|
||||
return ServerResponse.createSuccessPage(pageInfo, data.getPageNum(), data.getPageSize());
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return ServerResponse.createErroe("索道运输-查询列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 索道运输-查询详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getTbCablewaTransById(TbCablewaTransVo data) {
|
||||
try {
|
||||
TbCablewaTransVo tbCablewaTransVo = tbCablewaTransMapper.getTbCablewaTransById(data);
|
||||
return ServerResponse.createSuccess(tbCablewaTransVo);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return ServerResponse.createErroe("索道运输-查询详情失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-新增
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse addTbCablewaTrans(TbCablewaTransVo data) {
|
||||
try {
|
||||
Long userId = UserUtil.getLoginUser().getId();
|
||||
data.setCreateUserId(userId);
|
||||
data.setCreateTime(new Date());
|
||||
tbCablewaTransMapper.addTbCablewaTrans(data);
|
||||
return ServerResponse.createSuccess("索道运输-新增成功");
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return ServerResponse.createErroe("索道运输-新增失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-新增
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse updateTbCablewaTrans(TbCablewaTransVo data) {
|
||||
try {
|
||||
Long userId = UserUtil.getLoginUser().getId();
|
||||
data.setUpdateUserId(userId);
|
||||
tbCablewaTransMapper.updateTbCablewaTrans(data);
|
||||
return ServerResponse.createSuccess("索道运输-修改成功");
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return ServerResponse.createErroe("索道运输-修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 索道运输-删除
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse delTbCablewaTrans(TbCablewaTransVo data) {
|
||||
try {
|
||||
tbCablewaTransMapper.delTbCablewaTrans(data);
|
||||
return ServerResponse.createSuccess("索道运输-修改成功");
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return ServerResponse.createErroe("索道运输-修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbCablewaTransVo> tbCablewaTransAll(TbCablewaTransVo data) {
|
||||
List<TbCablewaTransVo> tbCablewaTransVoList = tbCablewaTransMapper.tbCablewaTransList(data);
|
||||
return tbCablewaTransVoList;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
package com.bonus.digitalSignage.basic.service.impl;
|
||||
|
||||
import com.bonus.digitalSignage.backstage.entity.vo.ProProgressVo;
|
||||
import com.bonus.digitalSignage.basic.dao.TbProjectMapper;
|
||||
import com.bonus.digitalSignage.basic.service.TbCablewaTransService;
|
||||
import com.bonus.digitalSignage.basic.service.TbProjectService;
|
||||
import com.bonus.digitalSignage.basic.service.TbThreeSpanService;
|
||||
import com.bonus.digitalSignage.basic.service.TbTowerService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbCablewaTransVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbThreeSpanVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
|
|
@ -16,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
|
@ -38,6 +38,9 @@ public class TbProjectServiceImpl implements TbProjectService {
|
|||
@Resource
|
||||
private TbThreeSpanService tbThreeSpanService;
|
||||
|
||||
@Resource
|
||||
private TbCablewaTransService tbCablewaTransService;
|
||||
|
||||
/**
|
||||
* 线路工程管理-查询列表
|
||||
* @param data
|
||||
|
|
@ -50,6 +53,7 @@ public class TbProjectServiceImpl implements TbProjectService {
|
|||
List<TbProjectVo> tbProjectVoList = tbProjectMapper.getTbProjectList(data);
|
||||
TbTowerVo tbTowerVo = new TbTowerVo();
|
||||
TbThreeSpanVo tbThreeSpanVo = new TbThreeSpanVo();
|
||||
TbCablewaTransVo tbCablewaTransVo = new TbCablewaTransVo();
|
||||
if (!tbProjectVoList.isEmpty()){
|
||||
for (TbProjectVo tbProjectVo:tbProjectVoList) {
|
||||
//获取工程下的杆塔列表
|
||||
|
|
@ -60,6 +64,10 @@ public class TbProjectServiceImpl implements TbProjectService {
|
|||
tbThreeSpanVo.setProId(tbProjectVo.getId());
|
||||
List<TbThreeSpanVo> tbThreeSpanVoList = tbThreeSpanService.tbProjectAll(tbThreeSpanVo);
|
||||
tbProjectVo.setTbThreeSpanVoList(tbThreeSpanVoList);
|
||||
//获取工程下的索道运输
|
||||
tbCablewaTransVo.setProId(tbProjectVo.getId());
|
||||
List<TbCablewaTransVo> tbCablewaTransVoList = tbCablewaTransService.tbCablewaTransAll(tbCablewaTransVo);
|
||||
tbProjectVo.setTbCablewaTransVoList(tbCablewaTransVoList);
|
||||
}
|
||||
}
|
||||
PageInfo<TbProjectVo> pageInfo = new PageInfo<>(tbProjectVoList);
|
||||
|
|
|
|||
|
|
@ -1,14 +1,10 @@
|
|||
package com.bonus.digitalSignage.basic.service.impl;
|
||||
|
||||
import com.bonus.digitalSignage.basic.dao.TbThreeSpanMapper;
|
||||
import com.bonus.digitalSignage.basic.dao.TbTowerMapper;
|
||||
import com.bonus.digitalSignage.basic.service.TbThreeSpanService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbThreeSpanVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.bonus.digitalSignage.utils.UserUtil;
|
||||
import com.bonus.digitalSignage.webResult.StringUtils;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.bonus.digitalSignage.basic.service.impl;
|
|||
|
||||
import com.bonus.digitalSignage.basic.dao.TbTowerMapper;
|
||||
import com.bonus.digitalSignage.basic.service.TbTowerService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.basic.vo.TbTowerVo;
|
||||
import com.bonus.digitalSignage.utils.CoordinateConverter;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.digitalSignage.basic.vo;
|
||||
|
||||
import com.bonus.digitalSignage.utils.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -26,16 +27,36 @@ public class TbCablewaTransVo {
|
|||
*/
|
||||
private Long towerId;
|
||||
|
||||
/**
|
||||
*杆塔名称
|
||||
*/
|
||||
@Excel(name = "索道所在塔杆", sort = 1)
|
||||
private String towerName;
|
||||
|
||||
/**
|
||||
* 索道长度(km)
|
||||
*/
|
||||
@Excel(name = "索道长度(km)", sort = 2)
|
||||
private String cablewayLength;
|
||||
|
||||
/**
|
||||
* 最大载重(kg)
|
||||
*/
|
||||
@Excel(name = "最大载重(kg)", sort = 3)
|
||||
private String maxHeight;
|
||||
|
||||
/**
|
||||
* 安全距离(m)
|
||||
*/
|
||||
@Excel(name = "安全距离(m)", sort = 4)
|
||||
private String safetyDistance;
|
||||
|
||||
/**
|
||||
* 最大坡度(°)
|
||||
*/
|
||||
@Excel(name = "最大坡度", sort = 5)
|
||||
private String maxSlope;
|
||||
|
||||
/**
|
||||
* 是否可用 1,可用 0.不可用
|
||||
*/
|
||||
|
|
@ -47,7 +68,20 @@ public class TbCablewaTransVo {
|
|||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private Long updateUserId;
|
||||
|
||||
private int pageNum = 1;
|
||||
private int pageSize = 10;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
<?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.bonus.digitalSignage.basic.dao.TbCablewaTransMapper">
|
||||
<insert id="addTbCablewaTrans">
|
||||
insert into tb_cablewa_trans
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="proId != null ">pro_id,</if>
|
||||
<if test="towerId != null ">tower_id,</if>
|
||||
<if test="cablewayLength != null ">cableway_length,</if>
|
||||
<if test="maxHeight != null">max_height,</if>
|
||||
<if test="safetyDistance != null ">safety_distance,</if>
|
||||
<if test="maxSlope != null ">max_slope,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createUserId != null ">create_user_id,</if>
|
||||
is_actvice
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="proId != null ">#{proId},</if>
|
||||
<if test="towerId != null ">#{towerId},</if>
|
||||
<if test="cablewayLength != null ">#{cablewayLength},</if>
|
||||
<if test="maxHeight != null ">#{maxHeight},</if>
|
||||
<if test="safetyDistance != null ">#{safetyDistance},</if>
|
||||
<if test="maxSlope != null ">#{maxSlope},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="createUserId != null ">#{createUserId},</if>
|
||||
1
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateTbCablewaTrans">
|
||||
update tb_cablewa_trans
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="towerId != null">tower_id = #{towerId},</if>
|
||||
<if test="cablewayLength != null">cableway_length = #{cablewayLength},</if>
|
||||
<if test="maxHeight != null">max_height = #{maxHeight},</if>
|
||||
<if test="safetyDistance != null">safety_distance = #{safetyDistance},</if>
|
||||
<if test="maxSlope != null">max_slope = #{maxSlope},</if>
|
||||
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
|
||||
update_time = now()
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="delTbCablewaTrans">
|
||||
update tb_cablewa_trans set is_active = '0' where id =#{id}
|
||||
</delete>
|
||||
|
||||
<select id="tbCablewaTransList" resultType="com.bonus.digitalSignage.basic.vo.TbCablewaTransVo">
|
||||
select tct.id as id,tct.pro_id as proId,tct.tower_id as towerId,tct.cableway_length as cablewayLength,
|
||||
tct.max_height as maxHeight,tct.safety_distance as safetyDistance,tct.max_slope as maxSlope,
|
||||
tct.create_user_id as createUserId,tt.tower_name as towerName
|
||||
from tb_cablewa_trans tct
|
||||
left join tb_tower tt on tct.tower_id = tt.id
|
||||
where tct.pro_id = #{proId} and tct.is_active = '1'
|
||||
</select>
|
||||
<select id="getTbCablewaTransById" resultType="com.bonus.digitalSignage.basic.vo.TbCablewaTransVo">
|
||||
select tct.id as id,tct.pro_id as proId,tct.tower_id as towerId,tct.cableway_length as cablewayLength,
|
||||
tct.max_height as maxHeight,tct.safety_distance as safetyDistance,tct.max_slope as maxSlope,
|
||||
tct.create_user_id as createUserId,tt.tower_name as towerName
|
||||
from tb_cablewa_trans tct
|
||||
left join tb_tower tt on tct.tower_id = tt.id
|
||||
where tct.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue