src/main/java/com/lf/server/controller/data/DataCountController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/controller/sys/ReportController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/mapper/sys/ReportMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/service/sys/ReportService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/sys/ReportMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/lf/server/controller/data/DataCountController.java
@@ -2,7 +2,6 @@ import com.lf.server.annotation.SysLog; import com.lf.server.controller.all.BaseController; import com.lf.server.controller.all.BaseQueryController; import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.ctrl.CountEntity; import com.lf.server.entity.sys.ReportEntity; @@ -15,9 +14,9 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; @@ -30,13 +29,13 @@ @RestController @RequestMapping("/dataCount") public class DataCountController extends BaseController { @Autowired @Resource ReportService reportService; @Autowired @Resource TokenService tokenService; @Autowired @Resource UploadAttachService uploadAttachService; @SysLog() @@ -338,4 +337,82 @@ return fail(ex, null); } } @SysLog() @ApiOperation(value = "统计数字线划图面积") @GetMapping(value = "/countDlgAreaByPrj") public ResponseMsg<Object> countDlgAreaByPrj() { try { List<CountEntity> list = reportService.countDlgAreaByPrj(); return success(list); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "按项目统计数字正射影像图面积") @GetMapping(value = "/countDomAreaByPrj") public ResponseMsg<Object> countDomAreaByPrj() { try { List<CountEntity> list = reportService.countDomAreaByPrj(); return success(list); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "统计管线长度") @GetMapping(value = "/countLineLength") public ResponseMsg<Object> countLineLength() { try { List<CountEntity> list = reportService.countLineLength(); return success(list); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "按项目统计勘探点个数") @GetMapping(value = "/countExplorationPointByPrj") public ResponseMsg<Object> countExplorationPointByPrj() { try { List<CountEntity> list = reportService.countExplorationPointByPrj(); return success(list); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "按项目统计地质模型面积") @GetMapping(value = "/countGeoModelAreaByPrj") public ResponseMsg<Object> countGeoModelAreaByPrj() { try { List<CountEntity> list = reportService.countGeoModelAreaByPrj(); return success(list); } catch (Exception ex) { return fail(ex, null); } } @SysLog() @ApiOperation(value = "按项目统计地灾点个数") @GetMapping(value = "/countGeologicHazardByPrj") public ResponseMsg<Object> countGeologicHazardByPrj() { try { List<CountEntity> list = reportService.countGeologicHazardByPrj(); return success(list); } catch (Exception ex) { return fail(ex, null); } } } src/main/java/com/lf/server/controller/sys/ReportController.java
@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; src/main/java/com/lf/server/mapper/sys/ReportMapper.java
@@ -238,4 +238,49 @@ * @return */ public List<CountEntity> countWaterDamageByPrj(); /** * 统计数字线划图面积 * * @return */ public List<CountEntity> countDlgAreaByPrj(); /** * 按项目统计数字正射影像图面积 * * @return */ public List<CountEntity> countDomAreaByPrj(); /** * 统计管线长度 * * @return */ public List<CountEntity> countLineLength(); /** * 按项目统计勘探点个数 * * @return */ public List<CountEntity> countExplorationPointByPrj(); /** * 按项目统计地质模型面积 * * @return */ public List<CountEntity> countGeoModelAreaByPrj(); /** * 按项目统计地灾点个数 * * @return */ public List<CountEntity> countGeologicHazardByPrj(); } src/main/java/com/lf/server/service/sys/ReportService.java
@@ -215,6 +215,36 @@ return reportMapper.countWaterDamageByPrj(); } @Override public List<CountEntity> countDlgAreaByPrj() { return reportMapper.countDlgAreaByPrj(); } @Override public List<CountEntity> countDomAreaByPrj() { return reportMapper.countDomAreaByPrj(); } @Override public List<CountEntity> countLineLength() { return reportMapper.countLineLength(); } @Override public List<CountEntity> countExplorationPointByPrj() { return reportMapper.countExplorationPointByPrj(); } @Override public List<CountEntity> countGeoModelAreaByPrj() { return reportMapper.countGeoModelAreaByPrj(); } @Override public List<CountEntity> countGeologicHazardByPrj() { return reportMapper.countGeologicHazardByPrj(); } /** * 统计钻孔点面积 */ src/main/resources/mapper/sys/ReportMapper.xml
@@ -112,7 +112,8 @@ <!-- 按项目统计数据 --> <select id="countSizesByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", coalesce((select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%'), 0) "sizes", select name "m1", (select cast( coalesce(sum(sizes), 0) as decimal(18, 3) ) from lf.sys_meta b where b.dircode like a.code || '%') as "sizes", (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count" from lf.sys_dir a where pid = 0 @@ -146,7 +147,7 @@ <!-- 按项目统计数字高程模型面积 --> <select id="countDemAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", (select coalesce(sum(b.area), 0) from lf.sys_meta b (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b inner join lf.sys_dir c on b.dircode = c.code where c.name = '数字高程模型' and b.type in ('dem', 'tif', 'tiff') and b.depcode like a.code || '%') "area" from lf.sys_dir a @@ -175,7 +176,7 @@ <!-- 按项目统计激光点云模型面积:las,laz --> <select id="countLasAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", (select coalesce(sum(area), 0), count(*) from lf.sys_meta b (select cast( coalesce(sum(area), 0) as decimal(20, 2) ) from lf.sys_meta b where b.type in ('las', 'laz') and b.depcode like a.code || '%') "area" from lf.sys_dir a where pid = 0 @@ -267,13 +268,13 @@ <!-- 统计数字线划图面积 --> <select id="countDlgAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", area "area" from lf.sys_line_buffer; select name "m1", area * 1000000 "area" from lf.sys_line_buffer; </select> <!-- 按项目统计数字正射影像图面积 --> <select id="countDomAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", (select cast( coalesce(sum(b.area), 0) / 1000000 as decimal(20, 2)) from lf.sys_meta b (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b inner join lf.sys_dir c on b.dircode = c.code where c.name = '数字正射影像图' and b.type in ('img', 'tif', 'tiff') and b.depcode like a.code || '%') "area" from lf.sys_dir a @@ -283,7 +284,7 @@ <!-- 统计管线长度 --> <select id="countLineLength" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", area "area" from lf.sys_line_buffer; select name "m1", area * 1000000 "area" from lf.sys_line_buffer; </select> <!-- 按项目统计勘探点个数 --> @@ -298,7 +299,7 @@ <!-- 按项目统计地质模型面积 --> <select id="countGeoModelAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> select name "m1", (select cast( coalesce(sum(b.area), 0) / 1000000 as decimal(20, 2)) (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b where b.dircode like a.code || '%') "area" from lf.sys_dir a where pid = 0