提交 f0896a88 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 37d2a7e1
package com.zrqx.geography.bg.controller.geographysign;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.constant.BaseRequestPath;
import com.zrqx.core.constant.geography.GeographyRequestPath;
import com.zrqx.core.form.geography.GeographyForm;
import com.zrqx.core.util.CallBack;
import com.zrqx.core.vo.Geographysign.CaregoryVo;
import com.zrqx.core.vo.Geographysign.ProvinceQueryVo;
import com.zrqx.core.vo.Geographysign.ProvinceVo;
import com.zrqx.geography.bg.service.geographysign.GeographysignService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 资源Controller
*/
@RestController
@RequestMapping(BaseRequestPath.BG + BaseRequestPath.BIGRESOURCE)
@Api(description = "大屏展示接口")
public class BigScreenController {
@Autowired
GeographysignService geographysignService;
@ApiOperation(value = "地理标志接口", notes = "地理标志接口")
@GetMapping(value = GeographyRequestPath.GEOGRAPHYSIGN)
public CallBack<List<ProvinceVo>> provinceQuery(GeographyForm form) {
return CallBack.success(geographysignService.geographySign(form));
}
@ApiOperation(value = "注册年份曲线图", notes = "注册年份曲线图")
@GetMapping(value = GeographyRequestPath.DIAGRAM)
public CallBack<List<ProvinceVo>> diagram(GeographyForm form) {
return CallBack.success(geographysignService.diagram(form));
}
@ApiOperation(value = "地理标志申请机构", notes = "地理标志申请机构")
@GetMapping(value = GeographyRequestPath.APPLICANTAGENCY)
public CallBack<List<ProvinceVo>> applicantAgency(GeographyForm form) {
return CallBack.success(geographysignService.applicantAgency(form));
}
@ApiOperation(value = "省市数量接口", notes = "省市数量接口")
@GetMapping(value = GeographyRequestPath.PROVINCECOUNT)
public CallBack<List<ProvinceVo>> provincecount(GeographyForm form) {
return CallBack.success(geographysignService.provincecount(form));
}
}
......@@ -214,7 +214,7 @@ public class GeographysignController {
}
//还需要一个定时任务,两个小时更新一次map
@ApiOperation(value = "键值对省数据1", notes = "键值对省数据1")
@GetMapping(value = "/cache")
public CallBack<Map<String, ProvinceKeyVo>> orderRelationUpdateNotify(HttpServletRequest request) {
......@@ -225,6 +225,8 @@ public class GeographysignController {
return CallBack.success(provinceKeyVo);
}
@ApiOperation(value = "图片下载到本地", notes = "图片下载到本地")
@GetMapping(value = GeographyRequestPath.DOWNLOAD)
......
......@@ -62,6 +62,7 @@ public interface GeographysignMapper extends BaseMapper<Geographysign> {
+ "<if test='"+ NOTBLANK +"(form.signstate)'>"
+ "and signstate = #{form.signstate}"
+ "</if>"
+ " LIMIT 20"
+ "</script>")
List<Geographysign> provinceQueryto(@Param("form")GeographyForm form );
......@@ -172,5 +173,116 @@ public interface GeographysignMapper extends BaseMapper<Geographysign> {
+ "select reserve1 label,reserve1 value from dl_geographysign group by reserve1"
+ "</script>")
List<CaregoryVo> querycount();
/** 查询图片数据*/
@Select("<script>"
+ "select * from dl_geographysign where imgPath is not null and reserve3 is null "
+ "</script>")
List<Geographysign> imgsj();
/** 大屏图标总和数据查询*/
@Select("<script>"
+ "select count(*)value,signState name from dl_geographysign where 1=1"
+ "<if test='"+NOTBLANK+"(form.province) '>"
+ " and province = #{form.province} "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.city)'>"
+ "and city = #{form.city}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.county)'>"
+ "and county = #{form.county}"
+ "</if>"
+ "<if test='"+NOTBLANK+"(State) '>"
+ " and signState = #{State} "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.signstate)'>"
+ "and signstate = #{form.signstate}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.categoryOne)'>"
+ "and reserve1 = #{form.categoryOne}"
+ "</if>"
+ "</script>")
ProvinceVo querysign(@Param("form")GeographyForm form,@Param("State")String State);
/** 大屏曲注册线图*/
@Select("<script>"
+ "select count(*)value,reserve4 name,registerState from dl_geographysign where 1 = 1 and reserve4 is not null and registerState='已注册'"
+ "<if test='"+NOTBLANK+"(form.province) '>"
+ " and province = #{form.province} "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.city)'>"
+ "and city = #{form.city}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.county)'>"
+ "and county = #{form.county}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.signstate)'>"
+ "and signstate = #{form.signstate}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.categoryOne)'>"
+ "and reserve1 = #{form.categoryOne}"
+ "</if>"
+ " group by reserve4 ORDER BY reserve4"
+ "</script>")
List<ProvinceVo> diagram(@Param("form")GeographyForm form);
/** 地理标志申请机构*/
@Select("<script>"
+ "select count(*)value,applicant name from dl_geographysign where 1 = 1 and applicant !='' "
+ "<if test='"+NOTBLANK+"(form.province) '>"
+ " and province = #{form.province} "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.city)'>"
+ "and city = #{form.city}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.county)'>"
+ "and county = #{form.county}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.signstate)'>"
+ "and signstate = #{form.signstate}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.categoryOne)'>"
+ "and reserve1 = #{form.categoryOne}"
+ "</if>"
+ " group by applicant ORDER BY value desc LIMIT 50"
+ "</script>")
List<ProvinceVo> applicantAgency(@Param("form")GeographyForm form);
/** 大屏省市县数量*/
@Select("<script>"
+ "select count(*)value,province name from dl_geographysign where 1 = 1 "
+ "<if test='"+NOTBLANK+"(form.province) '>"
+ " and province = #{form.province} "
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.city)'>"
+ "and city = #{form.city}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.county)'>"
+ "and county = #{form.county}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.signstate)'>"
+ "and signstate = #{form.signstate}"
+ "</if>"
+ "<if test='"+ NOTBLANK +"(form.categoryOne)'>"
+ "and reserve1 = #{form.categoryOne}"
+ "</if>"
+ " group by province"
+ "</script>")
List<ProvinceVo> provincecount(@Param("form")GeographyForm form);
}
......@@ -83,5 +83,38 @@ public interface GeographysignService extends BaseService<Geographysign, String>
List<CaregoryVo> querycount();
/**
* 图片信息
* @return
*/
List<Geographysign> imgsj();
/**
* 查询地区地理标志数量
* @return
*/
List<ProvinceVo> geographySign(GeographyForm form);
/**
* 查询年份注册曲线图
* @return
*/
List<ProvinceVo> diagram(GeographyForm form);
/**
* 地理标志申请机构
* @return
*/
List<ProvinceVo> applicantAgency(GeographyForm form);
/**
* 查询省市县数量
* @return
*/
List<ProvinceVo> provincecount(GeographyForm form);
}
package com.zrqx.geography.bg.service.geographysign;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
......@@ -11,6 +12,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mysql.fabric.xmlrpc.base.Array;
import com.zrqx.core.form.geography.GeographyForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.geography.Geographysign;
......@@ -214,4 +216,38 @@ public class GeographysignServiceImpl extends BaseServiceImpl<Geographysign, Str
return null;
}
@Override
public List<Geographysign> imgsj() {
return mapper.imgsj();
}
@Override
public List<ProvinceVo> geographySign(GeographyForm form) {
// 图标总和数据
List<ProvinceVo> ProvinceVo = new ArrayList<>();
ProvinceVo.add(mapper.querysign(form, "农产品地理标志"));
ProvinceVo.add(mapper.querysign(form, "原产地地理标志"));
ProvinceVo.add(mapper.querysign(form, "地理标志商标"));
return ProvinceVo;
}
@Override
public List<ProvinceVo> diagram(GeographyForm form) {
return mapper.diagram(form);
}
@Override
public List<ProvinceVo> applicantAgency(GeographyForm form) {
return mapper.applicantAgency(form);
}
@Override
public List<ProvinceVo> provincecount(GeographyForm form) {
return mapper.provincecount(form);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论