提交 edc9d2b4 authored 作者: 张龙发's avatar 张龙发

Merge remote-tracking branch 'origin/dev' into dev

package com.elephant.framework.galaxy.aroad.module.szgl.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.elephant.framework.galaxy.aroad.response.R;
import com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SpdwVideo;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SpdwVideoService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import com.elephant.framework.galaxy.aroad.module.common.controller.BaseController;
import java.net.URLDecoder;
import java.net.URLEncoder;
/**
* 实时监控_日照
*
* @author Xingyuyang
* @date 2019-06-03 18:15:02
*/
@RestController
@AllArgsConstructor
@RequestMapping("/szgl/spdwvideo")
public class SpdwVideoController extends BaseController {
private final SpdwVideoService spdwVideoService;
/**
* 分页查询
* @param page 分页对象
* @param spdwVideo 实时监控_日照
* @return
*/
@GetMapping("/page")
public R getSpdwVideoPage(Page page, SpdwVideo spdwVideo) {
return new R<>(spdwVideoService.page(page,Wrappers.query(spdwVideo)));
}
/**
* 通过监控名称查询实时监控_日照
* @param spname string
* @return R
*/
@GetMapping("/rzbyname")
public R RZByName(@RequestParam("spname") String spname){
return new R<> (spdwVideoService.RZByName(spname));
}
}
package com.elephant.framework.galaxy.aroad.module.szgl.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 实时监控_日照
*
* @author Xingyuyang
* @date 2019-06-03 18:15:02
*/
@Data
@TableName("spdw_video")
@EqualsAndHashCode(callSuper = true)
public class SpdwVideo extends Model<SpdwVideo> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId
private String city;
/**
*
*/
private String area;
/**
*
*/
private String spName;
/**
*
*/
private String spAddress;
}
package com.elephant.framework.galaxy.aroad.module.szgl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SpdwVideo;
import org.apache.ibatis.annotations.Param;
/**
* 实时监控_日照
*
* @author Xingyuyang
* @date 2019-06-03 18:15:02
*/
public interface SpdwVideoMapper extends BaseMapper<SpdwVideo> {
String RZByName(@Param("spname") String spname);
}
package com.elephant.framework.galaxy.aroad.module.szgl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SpdwVideo;
/**
* 实时监控_日照
*
* @author Xingyuyang
* @date 2019-06-03 18:15:02
*/
public interface SpdwVideoService extends IService<SpdwVideo> {
String RZByName(String spname);
}
package com.elephant.framework.galaxy.aroad.module.szgl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.szgl.entity.SpdwVideo;
import com.elephant.framework.galaxy.aroad.module.szgl.mapper.SpdwVideoMapper;
import com.elephant.framework.galaxy.aroad.module.szgl.service.SpdwVideoService;
import org.springframework.stereotype.Service;
/**
* 实时监控_日照
*
* @author Xingyuyang
* @date 2019-06-03 18:15:02
*/
@Service
public class SpdwVideoServiceImpl extends ServiceImpl<SpdwVideoMapper, SpdwVideo> implements SpdwVideoService {
public String RZByName(String spname) {
return baseMapper.RZByName(spname);
}
}
...@@ -74,5 +74,11 @@ public interface ZhjcGhjhMapper extends BaseMapper<ZhjcGhjh> { ...@@ -74,5 +74,11 @@ public interface ZhjcGhjhMapper extends BaseMapper<ZhjcGhjh> {
* @return * @return
*/ */
List<ZhjcGhjhTjfxDzxAndXgj> getGhjhFourData(@Param("code") int code, @Param("xmlxdm") String xmlxdm, @Param("year") String year); List<ZhjcGhjhTjfxDzxAndXgj> getGhjhFourData(@Param("code") int code, @Param("xmlxdm") String xmlxdm, @Param("year") String year);
List<Map<String,Object>> queryLxGhjh(@Param("gcxmId") String gcxmId);
/**
* 根据工程ID查询项目编号
* @param: gcxmId
* @return
*/
Map<String,Object> queryLxGhjh(@Param("gcxmId") String gcxmId);
} }
...@@ -56,5 +56,10 @@ public interface ZhjcGhjhService extends IService<ZhjcGhjh> { ...@@ -56,5 +56,10 @@ public interface ZhjcGhjhService extends IService<ZhjcGhjh> {
* 删除规划计划 * 删除规划计划
*/ */
Boolean deleteZhjcGhjh(ZhjcGhjh zhjcGhjh); Boolean deleteZhjcGhjh(ZhjcGhjh zhjcGhjh);
List<Map<String,Object>> queryLxGhjh(String gcxmId); /**
* 根据工程ID查询项目编码并获取项目信息
* @param: gcxmId
* @return
*/
ZhjcGhjhTimeline queryLxGhjh(String gcxmId);
} }
\ No newline at end of file
...@@ -326,7 +326,11 @@ public class ZhjcGhjhServiceImpl extends ServiceImpl<ZhjcGhjhMapper, ZhjcGhjh> i ...@@ -326,7 +326,11 @@ public class ZhjcGhjhServiceImpl extends ServiceImpl<ZhjcGhjhMapper, ZhjcGhjh> i
} }
@Override @Override
public List<Map<String, Object>> queryLxGhjh(String gcxmId) { public ZhjcGhjhTimeline queryLxGhjh(String gcxmId) {
return zhjcGhjhMapper.queryLxGhjh(gcxmId); Map<String,Object> xmbm = zhjcGhjhMapper.queryLxGhjh(gcxmId);
if(!xmbm.isEmpty()){
return this.getZhjcGhjhByXmbm(xmbm.get("xmbm").toString());
}
return null;
} }
} }
<?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.elephant.framework.galaxy.aroad.module.szgl.mapper.SpdwVideoMapper">
<resultMap id="spdwVideoMap" type="com.elephant.framework.galaxy.aroad.module.szgl.entity.SpdwVideo">
<id property="city" column="city"/>
<result property="area" column="area"/>
<result property="spName" column="sp_name"/>
<result property="spAddress" column="sp_address"/>
</resultMap>
<select id="RZByName" resultType="String">
select sp_address from spdw_video where sp_name=#{spname}
</select>
</mapper>
...@@ -26,17 +26,9 @@ ...@@ -26,17 +26,9 @@
<result property="sfzxzt" column="sfzxzt"/> <result property="sfzxzt" column="sfzxzt"/>
<result property="createtime" column="createtime"/> <result property="createtime" column="createtime"/>
</resultMap> </resultMap>
<!-- <resultMap id="lxghjhMap" type="HashMap">--> <select id="queryLxGhjh" resultType="HashMap">
<!-- <result property="xmmc" column="xmmc"/>--> SELECT xmbm FROM `t_szgl_ghjh_gcxm` where gcxm_id = #{gcxmId} limit 0,1
<!-- <collection property="jieduan" column="xmid" javaType="ArrayList" ofType="HashMap">--> </select>
<!-- <result property="xmlx" column="xmlx"/>-->
<!-- <result property="xmjdhy" column="xmjdhy"/>-->
<!-- <result property="jsxz" column="jsxz"/>-->
<!-- <result property="createtime" column="createtime"/>-->
<!-- <result property="jhnf" column="jhnf"/>-->
<!-- </collection>-->
<!-- </resultMap>-->
<select id="getFourDataWctzMonth" resultType="java.lang.Double"> <select id="getFourDataWctzMonth" resultType="java.lang.Double">
select sum(WCTZMonth) from t_zhjc_ghjh_tzzh where xmid=#{xmid} select sum(WCTZMonth) from t_zhjc_ghjh_tzzh where xmid=#{xmid}
</select> </select>
...@@ -45,10 +37,6 @@ ...@@ -45,10 +37,6 @@
select * from t_zhjc_ghjh_tzzh where xmid=#{xmid} ORDER BY tbsj desc select * from t_zhjc_ghjh_tzzh where xmid=#{xmid} ORDER BY tbsj desc
</select> </select>
<select id="queryLxGhjh" resultType="HashMap">
select * from t_zhjc_ghjh where xmbm in (SELECT xmbm FROM `t_szgl_ghjh_gcxm` where gcxm_id = #{gcxmId})
</select>
<select id="getTableBnZJData" resultType="java.lang.Double"> <select id="getTableBnZJData" resultType="java.lang.Double">
select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh select sum(YXDTZ) from t_zhjc_ghjh_tzzh where xmid in (select xmid from t_zhjc_ghjh where xmbm in (select xmbm from t_zhjc_ghjh
where xmid=#{xmid})) where xmid=#{xmid}))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论