线路工程管理
This commit is contained in:
parent
71ac98f1ef
commit
70b8075fc6
|
|
@ -0,0 +1,58 @@
|
|||
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.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;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tbProject")
|
||||
@Slf4j
|
||||
public class TbProjectController {
|
||||
|
||||
@Resource
|
||||
private TbProjectService tbProjectService;
|
||||
|
||||
/**
|
||||
* 线路工程管理-查询列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "getTbProjectList")
|
||||
@DecryptAndVerify(decryptedClass = TbProjectVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "基础管理-线路工程管理", operation = "查询列表", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse getTbProjectList(EncryptedReq<TbProjectVo> dto) {
|
||||
PageHelper.startPage(dto.getData().getPageNum(), dto.getData().getPageSize());
|
||||
return tbProjectService.getTbProjectList(dto.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路工程管理-查询详情
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "getTbProjectById")
|
||||
@DecryptAndVerify(decryptedClass = TbProjectVo.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "基础管理-线路工程管理", operation = "查询详情", operDesc = "系统级事件",operType="查询")
|
||||
public ServerResponse getTbProjectById(EncryptedReq<TbProjectVo> dto) {
|
||||
return tbProjectService.getTbProjectById(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.bonus.digitalSignage.basic.dao;
|
||||
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TbProjectMapper {
|
||||
List<TbProjectVo> getTbProjectList(TbProjectVo data);
|
||||
|
||||
TbProjectVo getTbProjectById(TbProjectVo data);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.bonus.digitalSignage.basic.service;
|
||||
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
|
||||
public interface TbProjectService {
|
||||
/**
|
||||
* 线路工程管理-查询列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getTbProjectList(TbProjectVo data);
|
||||
|
||||
/**
|
||||
* 线路工程管理-查询详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getTbProjectById(TbProjectVo data);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
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.TbProjectService;
|
||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/24
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class TbProjectServiceImpl implements TbProjectService {
|
||||
|
||||
@Resource
|
||||
private TbProjectMapper tbProjectMapper;
|
||||
|
||||
/**
|
||||
* 线路工程管理-查询列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getTbProjectList(TbProjectVo data) {
|
||||
List<TbProjectVo> tbProjectVoList = tbProjectMapper.getTbProjectList(data);
|
||||
PageInfo<TbProjectVo> pageInfo = new PageInfo<>(tbProjectVoList);
|
||||
return ServerResponse.createSuccessPage(pageInfo, data.getPageNum(), data.getPageSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getTbProjectById(TbProjectVo data) {
|
||||
TbProjectVo tbProject = tbProjectMapper.getTbProjectById(data);
|
||||
return ServerResponse.createSuccess(tbProject);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
package com.bonus.digitalSignage.basic.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/24
|
||||
*/
|
||||
@Data
|
||||
public class TbProjectVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目部id
|
||||
*/
|
||||
private Long departId;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 电压等级(电压等级)
|
||||
*/
|
||||
private String voltageLevel;
|
||||
|
||||
/**
|
||||
* 线路长度(单位km)
|
||||
*/
|
||||
private String lineLength;
|
||||
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
private String planStartTime;
|
||||
|
||||
/**
|
||||
* 计划完工时间
|
||||
*/
|
||||
private String planEndTime;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String lon;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 工程地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 工程状态(字典表配置)
|
||||
*/
|
||||
private String proStatus;
|
||||
|
||||
/**
|
||||
* 项目进度(实时更新)
|
||||
*/
|
||||
private String proProgress;
|
||||
|
||||
/**
|
||||
* 是否可用 1.可用 0.不可用
|
||||
*/
|
||||
private String isActive;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Date createUserId;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Date updateUserId;
|
||||
|
||||
private int pageNum = 1;
|
||||
private int pageSize = 10;
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?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.TbProjectMapper">
|
||||
|
||||
<select id="getTbProjectList" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
||||
select tp.pro_name as proName,A.dict_name as voltageLevel,tp.line_length as lineLength,
|
||||
tp.plan_start_time as planStartTime,tp.plan_end_time as planEndTime,tp.lon as lon,tp.lat as lat,
|
||||
tp.address as address,B.dict_name as pro_status
|
||||
from tb_project tp
|
||||
LEFT JOIN (
|
||||
SELECT sd.dict_value,sd.dict_name
|
||||
FROM sys_distinct sd
|
||||
LEFT JOIN sys_distinct sd2 ON sd.p_id = sd2.id
|
||||
WHERE sd2.dict_code = 'voltage_level' AND sd.del_flag = 0
|
||||
) A ON A.dict_value = tp.voltage_level
|
||||
LEFT JOIN (
|
||||
SELECT sd.dict_value,sd.dict_name
|
||||
FROM sys_distinct sd
|
||||
LEFT JOIN sys_distinct sd2 ON sd.p_id = sd2.id
|
||||
WHERE sd2.dict_code = 'pro_status' AND sd.del_flag = 0
|
||||
) B ON B.dict_value = tp.voltage_level
|
||||
where tp.is_active = '1'
|
||||
</select>
|
||||
<select id="getTbProjectById" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
||||
select tp.pro_name as proName,tp.voltage_level as voltageLevel,tp.line_length as lineLength,
|
||||
tp.plan_start_time as planStartTime,tp.plan_end_time as planEndTime,tp.lon as lon,tp.lat as lat,
|
||||
tp.address as address,B.pro_status as pro_status
|
||||
from tb_project tp where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue