4 Commits

Author SHA1 Message Date
fb972249dc 修改bug 2024-06-25 10:10:53 +08:00
e29636522d 修改bug 2024-06-20 16:22:56 +08:00
4dd8ed7a0d 提交专题报告年 2023-10-21 13:34:20 +08:00
34bf6a2580 提交专题报告年 2023-10-20 17:14:48 +08:00
13 changed files with 42 additions and 31 deletions

View File

@ -70,8 +70,8 @@ public class ENSOImpactController {
@RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET}) @RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET})
@ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET") @ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET")
public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year) { public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year,@RequestParam(value = "dq",required = false)String qd) {
ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year); ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year,qd);
return AjaxResult.success(ensoYearEventCorrespondingEntity); return AjaxResult.success(ensoYearEventCorrespondingEntity);
} }
@ -79,8 +79,9 @@ public class ENSOImpactController {
@ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET") @ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET")
public AjaxResult ensoEventRate(@RequestParam(value = "type") String type, public AjaxResult ensoEventRate(@RequestParam(value = "type") String type,
@RequestParam(value = "zone") String zone, @RequestParam(value = "zone") String zone,
@RequestParam(value = "year") String year) { @RequestParam(value = "year") String year,
ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year); @RequestParam(value = "dq",required = false) String dq) {
ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year,dq);
return AjaxResult.success(ensoEventRateEntity); return AjaxResult.success(ensoEventRateEntity);
} }

View File

@ -60,8 +60,8 @@ public class SpecialReportController {
@RequestMapping(value = "/getUploadSpecial") @RequestMapping(value = "/getUploadSpecial")
@ApiOperation(value = "返回专题通报") @ApiOperation(value = "返回专题通报")
public AjaxResult getUploadSpecial(String fileName) { public AjaxResult getUploadSpecial(String fileName,@RequestParam(value = "year",required = false) String year) {
List<UploadSpecialVO> value = service.selectUploadSpecial(fileName); List<UploadSpecialVO> value = service.selectUploadSpecial(fileName,year);
return AjaxResult.success(value); return AjaxResult.success(value);
} }

View File

@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/*/api-docs").anonymous() .antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous() .antMatchers("/druid/**").anonymous()
// // 除上面外的所有请求全部需要鉴权认证 // // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() //.anyRequest().authenticated()
.and() .and()
.headers().frameOptions().disable(); .headers().frameOptions().disable();
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);

View File

@ -56,15 +56,15 @@ public class SysLoginService
*/ */
public String login(String username, String password, String code) public String login(String username, String password, String code)
{ {
CaptchaVO captchaVO = new CaptchaVO(); // CaptchaVO captchaVO = new CaptchaVO();
captchaVO.setCaptchaVerification(code); // captchaVO.setCaptchaVerification(code);
ResponseModel response = captchaService.verification(captchaVO); // ResponseModel response = captchaService.verification(captchaVO);
if (!response.isSuccess()) // if (!response.isSuccess())
{ // {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, // AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
MessageUtils.message("user.jcaptcha.error"))); // MessageUtils.message("user.jcaptcha.error")));
throw new CaptchaException(); // throw new CaptchaException();
} // }
// 用户验证 // 用户验证
Authentication authentication = null; Authentication authentication = null;
try try

View File

@ -27,6 +27,16 @@ public class UploadSpecialVO extends SysBaseEntity {
private String sign; private String sign;
private String year;
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getId() { public String getId() {
return id; return id;
} }

View File

@ -68,7 +68,7 @@ public interface ENSOImpactMapper {
* @param year * @param year
* @return * @return
*/ */
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(@Param("year") String year); List<ENSOYearEventCorrespondingEntity> ensoYearEventCorresponding(@Param("year") String year,@Param("dq")String dq);
/** /**
* ENSO事件与年份对应关系 * ENSO事件与年份对应关系
@ -85,7 +85,7 @@ public interface ENSOImpactMapper {
* @param type * @param type
* @return * @return
*/ */
ENSOEventRateEntity ensoEventRate(@Param("type") String type, List<ENSOEventRateEntity> ensoEventRate(@Param("type") String type,
@Param("zone") String zone, @Param("zone") String zone,
@Param("event") String event); @Param("event") String event);

View File

@ -14,7 +14,7 @@ public interface SpecialReportMapper {
List<SpecialVO> selectSpecial(@Param("zone") String zone); List<SpecialVO> selectSpecial(@Param("zone") String zone);
List<UploadSpecialVO> selectUploadSpecial(@Param("fileName") String fileName); List<UploadSpecialVO> selectUploadSpecial(@Param("fileName") String fileName,@Param("year")String year);
List<UploadSpecialVO> selectUploadSpecial1(@Param("fileName") String fileName); List<UploadSpecialVO> selectUploadSpecial1(@Param("fileName") String fileName);

View File

@ -54,7 +54,7 @@ public interface ENSOImpactService {
* @param year * @param year
* @return * @return
*/ */
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year); ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd);
/** /**
* 四类ENSO事件空间分布统计 * 四类ENSO事件空间分布统计
@ -63,7 +63,7 @@ public interface ENSOImpactService {
* @param year * @param year
* @return * @return
*/ */
ENSOEventRateEntity ensoEventRate(String type,String zone,String year); ENSOEventRateEntity ensoEventRate(String type,String zone,String year,String dq);
/** /**
* 特定年份异常占比 * 特定年份异常占比

View File

@ -15,7 +15,7 @@ public interface ISpecialReportService {
List<SpecialVO> selectSpecial(String zone); List<SpecialVO> selectSpecial(String zone);
List<UploadSpecialVO> selectUploadSpecial(String fileName); List<UploadSpecialVO> selectUploadSpecial(String fileName,String year);
List<UploadSpecialVO> selectUploadSpecial1(String fileName); List<UploadSpecialVO> selectUploadSpecial1(String fileName);

View File

@ -76,14 +76,14 @@ public class ENSOImpactImpl implements ENSOImpactService {
} }
@Override @Override
public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year) { public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd) {
return ensoImpactMapper.ensoYearEventCorresponding(year); return ensoImpactMapper.ensoYearEventCorresponding(year,qd).get(0);
} }
@Override @Override
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) { public ENSOEventRateEntity ensoEventRate(String type, String zone, String year,String dq) {
String event = ensoImpactMapper.ensoYearEventCorresponding(year).getEvent(); String event = ensoImpactMapper.ensoYearEventCorresponding(year,dq).get(0).getEvent();
return ensoImpactMapper.ensoEventRate(type, zone, event); return ensoImpactMapper.ensoEventRate(type, zone, event).size()==0?null:ensoImpactMapper.ensoEventRate(type, zone, event).get(0);
} }
@Override @Override

View File

@ -27,8 +27,8 @@ public class SpecialReportServiceimpl implements ISpecialReportService {
} }
@Override @Override
public List<UploadSpecialVO> selectUploadSpecial(String fileName) { public List<UploadSpecialVO> selectUploadSpecial(String fileName,String year) {
return mapper.selectUploadSpecial(fileName); return mapper.selectUploadSpecial(fileName,year);
} }
@Override @Override

View File

@ -125,7 +125,7 @@
<select id="ensoYearEventCorresponding" resultMap="ENSO_Year_Event_Corresponding"> <select id="ensoYearEventCorresponding" resultMap="ENSO_Year_Event_Corresponding">
select id, year, event, event_en select id, year, event, event_en
from enso_year_event_corresponding from enso_year_event_corresponding
where year = #{year} where year = #{year} <if test="dq!=null and dq!=''"> and event like '${dq}%'</if>
</select> </select>
<select id="ensoEventYearCorresponding" resultMap="ENSO_Year_Event_Corresponding"> <select id="ensoEventYearCorresponding" resultMap="ENSO_Year_Event_Corresponding">

View File

@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT <include refid="Upload"/> FROM upload_special SELECT <include refid="Upload"/> FROM upload_special
WHERE type='1' WHERE type='1'
<if test="fileName!= null and fileName !=''"> <if test="fileName!= null and fileName !=''">
AND file_name = #{fileName} AND file_name = #{fileName} and year=#{year}
</if> </if>
</select> </select>