线路工程管理
This commit is contained in:
parent
562c422a18
commit
b53444e71e
|
|
@ -6,6 +6,7 @@ import com.bonus.digitalSignage.backstage.entity.dto.QueryParamDto;
|
||||||
import com.bonus.digitalSignage.basic.service.TbProjectService;
|
import com.bonus.digitalSignage.basic.service.TbProjectService;
|
||||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||||
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
import com.bonus.digitalSignage.system.vo.EncryptedReq;
|
||||||
|
import com.bonus.digitalSignage.utils.ExcelUtil;
|
||||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -16,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 马三炮
|
* @author 马三炮
|
||||||
|
|
@ -89,4 +92,19 @@ public class TbProjectController {
|
||||||
public ServerResponse delTbProject(EncryptedReq<TbProjectVo> dto) {
|
public ServerResponse delTbProject(EncryptedReq<TbProjectVo> dto) {
|
||||||
return tbProjectService.delTbProject(dto.getData());
|
return tbProjectService.delTbProject(dto.getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*线路工程管理导出
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/tbProjectExport")
|
||||||
|
@DecryptAndVerify(decryptedClass = TbProjectVo.class)
|
||||||
|
@LogAnnotation(operModul = "线路工程管理-导出", operation = "导出", operDesc = "系统级事件",operType="导出")
|
||||||
|
public void tbProjectExport(HttpServletResponse response, EncryptedReq<TbProjectVo> data) {
|
||||||
|
|
||||||
|
List<TbProjectVo> safetyMeasuresList = tbProjectService.tbProjectExport(data.getData());
|
||||||
|
ExcelUtil<TbProjectVo> util = new ExcelUtil<TbProjectVo>(TbProjectVo.class);
|
||||||
|
util.exportExcel(response, safetyMeasuresList, "线路工程管理");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.bonus.digitalSignage.basic.service;
|
||||||
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
import com.bonus.digitalSignage.basic.vo.TbProjectVo;
|
||||||
import com.bonus.digitalSignage.utils.ServerResponse;
|
import com.bonus.digitalSignage.utils.ServerResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface TbProjectService {
|
public interface TbProjectService {
|
||||||
/**
|
/**
|
||||||
* 线路工程管理-查询列表
|
* 线路工程管理-查询列表
|
||||||
|
|
@ -38,4 +40,12 @@ public interface TbProjectService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ServerResponse delTbProject(TbProjectVo data);
|
ServerResponse delTbProject(TbProjectVo data);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*线路工程管理导出
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<TbProjectVo> tbProjectExport(TbProjectVo data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,4 +123,15 @@ public class TbProjectServiceImpl implements TbProjectService {
|
||||||
return ServerResponse.createErroe("线路工程管理-删除失败");
|
return ServerResponse.createErroe("线路工程管理-删除失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*线路工程管理导出
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TbProjectVo> tbProjectExport(TbProjectVo data) {
|
||||||
|
List<TbProjectVo> tbProjectVoList = tbProjectMapper.getTbProjectList(data);
|
||||||
|
return tbProjectVoList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ public class TbProjectVo {
|
||||||
*/
|
*/
|
||||||
private Long departId;
|
private Long departId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目部名称
|
||||||
|
*/
|
||||||
|
private Long departName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程名称
|
* 工程名称
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,12 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getTbProjectList" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
<select id="getTbProjectList" resultType="com.bonus.digitalSignage.basic.vo.TbProjectVo">
|
||||||
select tp.id as id,tp.pro_name as proName,A.dict_name as voltageLevel,tp.line_length as lineLength,
|
select tp.id as id,tp.depart_id as departId,td.depart_name as departName,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.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
|
tp.address as address,B.dict_name as pro_status
|
||||||
from tb_project tp
|
from tb_project tp
|
||||||
|
left join tb_depart td on tp.depart_id = td.id
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT sd.dict_value,sd.dict_name
|
SELECT sd.dict_value,sd.dict_name
|
||||||
FROM sys_distinct sd
|
FROM sys_distinct sd
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue