Commit 8ac3f21b authored by liaoanyuan's avatar liaoanyuan

新增服务器版本

parent 3d453e6a
...@@ -21,4 +21,6 @@ public interface VolunteerMapper extends BaseMapper<Volunteer> { ...@@ -21,4 +21,6 @@ public interface VolunteerMapper extends BaseMapper<Volunteer> {
int updateBySchemeId(@Param("schemeId") Integer schemeId); int updateBySchemeId(@Param("schemeId") Integer schemeId);
List<Volunteer> getVolunteerList(Map<String,Object> map); List<Volunteer> getVolunteerList(Map<String,Object> map);
List<Volunteer> getVolunteerByType(@Param("type") Integer type);
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wisenergy.mapper.VolunteerMapper"> <mapper namespace="cn.wisenergy.mapper.VolunteerMapper">
<resultMap id="userMap" type="cn.wisenergy.model.app.Volunteer"> <resultMap id="volunteerMap" type="cn.wisenergy.model.app.Volunteer">
<id column="id" property="id"/> <id column="id" property="id"/>
<result column="type" property="type"/> <result column="type" property="type"/>
<result column="scheme_id" property="schemeId"/> <result column="scheme_id" property="schemeId"/>
...@@ -172,4 +172,18 @@ ...@@ -172,4 +172,18 @@
</where> </where>
</select> </select>
<select id="getVolunteerByType" resultMap="volunteerMap">
select
<include refid="cols_all"/>
from
<include refid="table"/>
<where>
is_delete =0
<if test="type != null">
and type =#{type}
</if>
order by lowest_mark desc
</where>
</select>
</mapper> </mapper>
...@@ -445,13 +445,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp ...@@ -445,13 +445,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
double secondMajor = secondRule.getCurrentYearMajor() - secondRule.getProfessionMin() + double secondMajor = secondRule.getCurrentYearMajor() - secondRule.getProfessionMin() +
Double.parseDouble(queryVo.getMajorGrade()); Double.parseDouble(queryVo.getMajorGrade());
//计算综合成绩
double secondRuleTotal = secondMajor * 750 / 300 * 0.7 + secondCulture * 0.3;
//判断文化成绩大于本科文化成绩最低分但专业成绩小于本科文化成绩最低分时进行文化成绩降分处理查询 //判断文化成绩大于本科文化成绩最低分但专业成绩小于本科文化成绩最低分时进行文化成绩降分处理查询
if (secondCulture > firstRule.getCultureMin() && secondMajor < firstRule.getProfessionMin()) { if (secondCulture > firstRule.getCultureMin() && secondMajor < firstRule.getProfessionMin()) {
secondCulture=secondRule.getCultureMax(); List<Volunteer> volunteers = new ArrayList<>();
volunteers = volunteerMapper.getVolunteerByType(SchemeTypeEnums.JUNIOR_COLLEGE_LITERATURE.getCode());
secondRuleTotal=Double.valueOf(volunteers.get(0).getLowestMark());
} }
//计算综合成绩
double secondRuleTotal = secondMajor * 750 / 300 * 0.7 + secondCulture * 0.3;
//2、考生是否能报取美术专科 //2、考生是否能报取美术专科
if (secondCulture >= secondRule.getCultureMin() && secondMajor >= secondRule.getProfessionMin()) { if (secondCulture >= secondRule.getCultureMin() && secondMajor >= secondRule.getProfessionMin()) {
...@@ -521,14 +524,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp ...@@ -521,14 +524,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
double cultureSecond = firstRule.getCurrentYearCulture() - firstRule.getCultureMin() + Double.parseDouble(queryVo.getCultureGrade()); double cultureSecond = firstRule.getCurrentYearCulture() - firstRule.getCultureMin() + Double.parseDouble(queryVo.getCultureGrade());
double majorSecond = firstRule.getCurrentYearMajor() - firstRule.getProfessionMin() + Double.parseDouble(queryVo.getMajorGrade()); double majorSecond = firstRule.getCurrentYearMajor() - firstRule.getProfessionMin() + Double.parseDouble(queryVo.getMajorGrade());
//计算综合成绩
double totalSecond = majorSecond * 750 / 300 * 0.3 + cultureSecond * 0.7;
//判断文化成绩大于本科文化成绩最低分但专业成绩小于本科文化成绩最低分时进行文化成绩降分处理查询 //判断文化成绩大于本科文化成绩最低分但专业成绩小于本科文化成绩最低分时进行文化成绩降分处理查询
if (cultureSecond > firstRule.getCultureMin() && majorSecond < firstRule.getProfessionMin()) { if (cultureSecond > firstRule.getCultureMin() && majorSecond < firstRule.getProfessionMin()) {
cultureSecond=secondRule.getCultureMax(); List<Volunteer> volunteers = new ArrayList<>();
volunteers = volunteerMapper.getVolunteerByType(SchemeTypeEnums.JUNIOR_COLLEGE_LITERATURE.getCode());
totalSecond=Double.valueOf(volunteers.get(0).getLowestMark());
} }
//计算综合成绩
double totalSecond = majorSecond * 750 / 300 * 0.3 + cultureSecond * 0.7;
//2、考生是否能报取美术专科 //2、考生是否能报取美术专科
if (cultureSecond >= secondRule.getCultureMin() && majorSecond >= secondRule.getProfessionMin()) { if (cultureSecond >= secondRule.getCultureMin() && majorSecond >= secondRule.getProfessionMin()) {
//浮动分数 //浮动分数
......
...@@ -104,8 +104,8 @@ public class SendSmsSerViceImpl implements SendSmsSerVice { ...@@ -104,8 +104,8 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
//判断缓存是否过期 //判断缓存是否过期
long time = redisService.getExpire(key); long time = redisService.getExpire(key);
if (time < 0) { if (time < 0) {
//return R.error(1, "验证码已过期!", false); return R.error(1, "验证码已过期!", false);
return R.ok(0, true); //return R.ok(0, true);
} }
//redis中获取验证码 //redis中获取验证码
...@@ -117,11 +117,11 @@ public class SendSmsSerViceImpl implements SendSmsSerVice { ...@@ -117,11 +117,11 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
redisService.del(key); redisService.del(key);
return R.ok(0, true); return R.ok(0, true);
} else { } else {
//return R.error(1, "验证码错误!", false); return R.error(1, "验证码错误!", false);
return R.ok(0, true); //return R.ok(0, true);
} }
} }
//return R.ok(1, false); return R.ok(1, false);
return R.ok(0, true); //return R.ok(0, true);
} }
} }
...@@ -16,13 +16,13 @@ public class Common { ...@@ -16,13 +16,13 @@ public class Common {
/** /**
* 阿里云短信accessKeyId * 阿里云短信accessKeyId
*/ */
public static final String ACCESS_KEY_ID = "LTAIuFVMscvCNpMU"; public static final String ACCESS_KEY_ID = "LTAI4G3kqBrE1XSa6d7HesMR";
/** /**
* 阿里云短信secret * 阿里云短信secret
*/ */
public static final String SMS_SECRET = "AvotjHvvGzEm8sX9vZaUhVypnZfUk7"; public static final String SMS_SECRET = "YZrVNvGfNKOtxOyLXh465PrrSLT5g3";
/** /**
* 阿里云短信超时时间 * 阿里云短信超时时间
......
...@@ -3,7 +3,7 @@ spring: ...@@ -3,7 +3,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
druid: druid:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.110.165:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8 url: jdbc:mysql://8.140.102.52:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root username: root
password: adm4HYservice$ password: adm4HYservice$
initial-size: 10 initial-size: 10
...@@ -46,9 +46,9 @@ spring: ...@@ -46,9 +46,9 @@ spring:
redis: redis:
database: 0 database: 0
host: 192.168.110.165 host: r-2ze4mlmhxi1wog7ni1.redis.rds.aliyuncs.com
port: 6379 port: 6379
password: adm4HYservice$ # 密码(默认为空) password: THUmit1106 # 密码(默认为空)
timeout: 6000ms # 连接超时时长(毫秒) timeout: 6000ms # 连接超时时长(毫秒)
jedis: jedis:
pool: pool:
......
...@@ -3,7 +3,7 @@ server: ...@@ -3,7 +3,7 @@ server:
uri-encoding: UTF-8 uri-encoding: UTF-8
max-threads: 1000 max-threads: 1000
min-spare-threads: 30 min-spare-threads: 30
port: 8997 port: 8080
connection-timeout: 5000ms connection-timeout: 5000ms
spring: spring:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment