Commit ec06ad3a authored by yangshuxing's avatar yangshuxing

ui以及点成绩记录

parent 519c0994
...@@ -62,7 +62,16 @@ ...@@ -62,7 +62,16 @@
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
<version>2.0.6.RELEASE</version> <version>2.0.6.RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
<version>2.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
...@@ -266,11 +275,6 @@ ...@@ -266,11 +275,6 @@
<version>2.0.4.RELEASE</version> <version>2.0.4.RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
......
package com.dlbridge.feign;
import com.dlbridge.feign.bean.CmptScoreCheckpoint;
import com.dlbridge.jadp.config.web.FeignConfig;
import com.dlbridge.jadp.fallback.GeexekScoreFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 废弃单独处理成绩工程
*/
@FeignClient(name = "geexekscore", configuration = FeignConfig.class, fallbackFactory = GeexekScoreFallbackFactory.class)
@RequestMapping("geexekscore/api/v1/cmpt-score-rule-scoreinfo")
public interface ScoreInfoService {
@GetMapping(value = "/getCheckPointByRoadId")
List<CmptScoreCheckpoint> getCheckPointByRoadId(@RequestParam("roadId") int roadId);
@RequestMapping(value = "batchInsert",method = RequestMethod.POST)
List<CmptScoreCheckpoint> batchInsert(List<CmptScoreCheckpoint> cmptScoreCheckpoints);
@DeleteMapping(value = "deleteAllByRoadId/{roadId}")
List<CmptScoreCheckpoint> deleteAllByRoadId(@PathVariable("roadId") int roadId);
@PostMapping("saveCheckPoint")
void saveOrUpdateCheckPoint(@RequestBody List<CmptScoreCheckpoint> list);
@RequestMapping("hasCheckPoint/{cmptId}")
int hasCheckPoint(@PathVariable("cmptId") Integer cmptId);
}
package com.dlbridge.feign;
import com.dlbridge.feign.bean.CmptScoreCheckpoint;
import com.dlbridge.feign.bean.CmptScoreRule;
import com.dlbridge.jadp.config.web.FeignConfig;
import com.dlbridge.jadp.fallback.GeexekScoreFallbackFactory;
import com.dlbridge.jadp.fallback.ScoreRuleFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 废弃单独处理成绩工程
*/
@FeignClient(name = "geexekscore", configuration = FeignConfig.class, fallbackFactory = ScoreRuleFallbackFactory.class)
@RequestMapping("/geexekscore/api/v1/cmpt-score-rule")
public interface ScoreRuleService {
/**
* 批量添加规则
*/
@PostMapping(value = "batchInsertRules")
List<CmptScoreRule> batchInsertRules(@RequestBody List<CmptScoreRule> cmptScoreRules);
/**
* 按照赛事id删除规则
*/
@DeleteMapping(value = "deleteRuleByCmptId/{cmptId}")
int deleteRuleByCmptId(@PathVariable("cmptId") Integer cmptId);
@GetMapping(value = "getRules/{cmptId}")
List<CmptScoreRule> getRules(@PathVariable("cmptId") Integer cmptId);
@GetMapping(value = "getCurrentRuleType/{cmptId}")
int getCurrentRuleType(@PathVariable("cmptId") Integer cmptId);
}
package com.dlbridge.feign.bean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 成绩计算规则表
* </p>
*
* @author sunyuhua
* @since 2020-06-12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CmptScoreRule对象", description="成绩计算规则表")
public class CmptScoreRule{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "gk_cmpt_score_rule主键Id")
private Integer cmptScoreRuleId;
@ApiModelProperty(value = "赛事id")
private Integer cmptId;
@ApiModelProperty(value = "项目id")
private Integer roadId;
@ApiModelProperty(value = "个人成绩计算规则:1为所有成绩之和,2为所有成绩的最好成绩,3只上传一次成绩,作为最终成绩")
private Integer scoreRule;
@ApiModelProperty(value = "成绩上传的次数,允许1次,允许多次,可以固定上传次数")
private Integer scoreUploadTimes;
@ApiModelProperty(value = "成绩上传的开始时间(赛事的开始时间,过渡数据使用,后期优化掉)")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime;
@ApiModelProperty(value = "成绩上传的截止时间(赛事的结束时间,过渡数据使用,后期优化掉)")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime insertTime;
}
package com.dlbridge.feign.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author sunyuhua
* @since 2020-06-17
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CmptScoreRuleScoreinfo对象", description="")
public class CmptScoreRuleScoreinfo{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "成绩提交的Id")
private Integer cmptScoreRuleScoreinfoId;
@ApiModelProperty(value = "赛事Id")
private Integer cmptId;
@ApiModelProperty(value = "项目Id")
private Integer roadId;
@ApiModelProperty(value = "提交成绩赛事规则Id(此Id将被废弃)")
private Integer ruleId;
@ApiModelProperty(value = "提交成绩的号码牌")
private String markNo;
@ApiModelProperty(value = "分段成绩提交的上传的时间")
private LocalDateTime subsectionTime;
@ApiModelProperty(value = "每一次提交的成绩,以秒为单位")
private Integer subsectionscore;
@ApiModelProperty(value = "每一次提交的里程,以米为单位")
private Integer subsectionMileage;
@ApiModelProperty(value = "0为未审核 1为已审核 2为未通过")
private Integer checkStatus;
@ApiModelProperty(value = "每公里配速,耗时/里程")
private Float cmptPace;
private Integer origin;
@ApiModelProperty(value = "是否被删除(1为删除,0为未删除)")
private Boolean isDelete;
@ApiModelProperty(value = "插入时间")
private LocalDateTime insertTime;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
}
...@@ -29,11 +29,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; ...@@ -29,11 +29,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@EnableWebMvc @EnableWebMvc
@MapperScan(basePackages = "com.dlbridge.jadp.plugins.cmpt.dao.mapper") @MapperScan(basePackages = "com.dlbridge.jadp.plugins.cmpt.dao.mapper")
@EnableAspectJAutoProxy(proxyTargetClass = true) @EnableAspectJAutoProxy(proxyTargetClass = true)
@EnableScheduling
@EnableFeignClients(basePackages="com.dlbridge.feign") @EnableFeignClients(basePackages="com.dlbridge.feign")
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableCircuitBreaker
@EnableHystrix
public class Application extends SpringBootServletInitializer { public class Application extends SpringBootServletInitializer {
@Override @Override
......
package com.dlbridge.jadp.fallback; package com.dlbridge.jadp.fallback;
import com.dlbridge.feign.ScoreService; import com.dlbridge.feign.ScoreService;
import com.dlbridge.feign.bean.ScoreItem;
import com.neusoft.www.utils.web.Result;
import feign.hystrix.FallbackFactory; import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -11,6 +13,21 @@ public class GeexekScoreFallbackFactory implements FallbackFactory<ScoreService> ...@@ -11,6 +13,21 @@ public class GeexekScoreFallbackFactory implements FallbackFactory<ScoreService>
@Override @Override
public ScoreService create(Throwable throwable) { public ScoreService create(Throwable throwable) {
return null; return new ScoreService() {
@Override
public Result<ScoreItem> saveItem(ScoreItem item) {
return null;
}
@Override
public Result<ScoreItem> getScoreItem(int scoreItemId) {
return null;
}
@Override
public Result<Integer> deleteScoreItem(Integer scoreItemId) {
return null;
}
};
} }
} }
package com.dlbridge.jadp.fallback;
import com.dlbridge.feign.ScoreRuleService;
import com.dlbridge.feign.bean.CmptScoreRule;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Log4j2
public class ScoreRuleFallbackFactory implements FallbackFactory<ScoreRuleService> {
@Override
public ScoreRuleService create(Throwable throwable) {
log.error("fallback exception from spring cloud: " + throwable.getMessage(),throwable);
return new ScoreRuleService() {
@Override
public List<CmptScoreRule> batchInsertRules(List<CmptScoreRule> cmptScoreRules) {
return null;
}
@Override
public int deleteRuleByCmptId(Integer cmptId) {
return 0;
}
@Override
public List<CmptScoreRule> getRules(Integer cmptId) {
return null;
}
@Override
public int getCurrentRuleType(Integer cmptId) {
return 0;
}
};
}
}
...@@ -16,7 +16,15 @@ ...@@ -16,7 +16,15 @@
select count(1) from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0 select count(1) from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0
</select> </select>
<select id="getCmptScoreRuleScoreInfoList" resultType="com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRuleScoreInfo"> <select id="getCmptScoreRuleScoreInfoList" resultType="com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRuleScoreInfo">
select b.id as cmptScoreRuleScoreId,a.member_name as name,a.cmpt_id as cmptId,rule_id as ruleId,b.mark_no as markNo,subsectionscore as subsectionscore,subsectionTime,subsectionMileage as subsectionMileage,checkStatus,cmptPace,updateTime from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0 order by updateTime desc limit #{page.offset},#{page.size} select b.id as cmptScoreRuleScoreId,a.member_name
as name,a.cmpt_id as cmptId,rule_id as ruleId,b.mark_no
as markNo,subsectionscore as subsectionscore,subsectionTime,subsectionMileage a
s subsectionMileage,checkStatus,cmptPace,updateTime,insertTime
from geerunner.cmpt_enroll as a left join gk_cmpt_score_rule_scoreinfo
as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no
where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId}
and checkStatus=#{checkStatus} and a.del_flg=0 and b.isDelete=0
order by updateTime desc limit #{page.offset},#{page.size}
</select> </select>
<update id="uploadCmptScoreRuleScoreInfoByNoPassedIds"> <update id="uploadCmptScoreRuleScoreInfoByNoPassedIds">
...@@ -49,8 +57,10 @@ ...@@ -49,8 +57,10 @@
SELECT SELECT
count(case when checkStatus=0 then 1 end) as 'Unprocessed', count(case when checkStatus=0 then 1 end) as 'Unprocessed',
count(case when checkStatus=1 then 1 end) as 'pass', count(case when checkStatus=1 then 1 end) as 'pass',
count(case when checkStatus=2 then 1 end) as 'nopass' from geerunner.cmpt_enroll as a left join count(case when checkStatus=2 then 1 end) as 'nopass'
gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and a.del_flg=0 and b.isDelete=0 from geerunner.cmpt_enroll as a
left join gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId and a.nick_id=b.mark_no
where a.cmpt_id=#{cmptId} and a.cmpt_item=#{roadId} and rule_id=#{ruleId} and a.del_flg=0 and b.isDelete=0
</select> </select>
<select id="getCmptScoreRuleScoreInfoByruleIdAndMarkNo" resultType="com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRuleScoreInfo"> <select id="getCmptScoreRuleScoreInfoByruleIdAndMarkNo" resultType="com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRuleScoreInfo">
......
...@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.ControllerAdvice; ...@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
@ControllerAdvice //@ControllerAdvice
@Order(0) @Order(0)
@Log4j2 @Log4j2
public class ExceptionController { public class ExceptionController {
...@@ -15,7 +15,7 @@ public class ExceptionController { ...@@ -15,7 +15,7 @@ public class ExceptionController {
@ResponseBody @ResponseBody
@ExceptionHandler(value = Exception.class) @ExceptionHandler(value = Exception.class)
public Result errorHandler(Exception ex) { public Result errorHandler(Exception ex) {
log.info(ex.getMessage(),ex); log.info("exception from groble excetioncontroller : "+ ex.getMessage(),ex);
return Result.fail().setMsg(ex.getMessage()); return Result.fail().setMsg(ex.getMessage());
} }
} }
...@@ -251,6 +251,7 @@ public class MicroApiController { ...@@ -251,6 +251,7 @@ public class MicroApiController {
@ApiResponse(code = -1, message = "失败", response = ObjectUtils.Null.class), @ApiResponse(code = -1, message = "失败", response = ObjectUtils.Null.class),
@ApiResponse(code = 200, message = "成功", response = Result.class, responseContainer = "List")}) @ApiResponse(code = 200, message = "成功", response = Result.class, responseContainer = "List")})
public Result getCustomer(@PathVariable("cmptId") Integer cmptId) { public Result getCustomer(@PathVariable("cmptId") Integer cmptId) {
int a = 1/0;
Customer customer = customerService.getCusomerServiceInfo(cmptId); Customer customer = customerService.getCusomerServiceInfo(cmptId);
FuncSetting setting = funcSettingService.getSettingByCmptId(cmptId); FuncSetting setting = funcSettingService.getSettingByCmptId(cmptId);
Map<String,String> result = new HashMap<>(); Map<String,String> result = new HashMap<>();
......
package com.dlbridge.jadp.plugins.cmpt.web; package com.dlbridge.jadp.plugins.cmpt.web;
import com.dlbridge.feign.ScoreRuleService;
import com.dlbridge.feign.bean.CmptScoreRule;
import com.dlbridge.jadp.common.interceptor.PageView; import com.dlbridge.jadp.common.interceptor.PageView;
import com.dlbridge.jadp.job.CountJob; import com.dlbridge.jadp.job.CountJob;
import com.dlbridge.jadp.plugins.cmpt.bean.Album; import com.dlbridge.jadp.plugins.cmpt.bean.Album;
import com.dlbridge.jadp.plugins.cmpt.bean.Banner; import com.dlbridge.jadp.plugins.cmpt.bean.Banner;
import com.dlbridge.jadp.plugins.cmpt.bean.Road;
import com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt; import com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt;
import com.dlbridge.jadp.plugins.cmpt.service.AlbumService; import com.dlbridge.jadp.plugins.cmpt.service.AlbumService;
import com.dlbridge.jadp.plugins.cmpt.service.BannerService; import com.dlbridge.jadp.plugins.cmpt.service.BannerService;
import com.dlbridge.jadp.plugins.cmpt.service.CmptService; import com.dlbridge.jadp.plugins.cmpt.service.CmptService;
import com.dlbridge.jadp.plugins.cmpt.service.RemoteService;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.neusoft.www.utils.web.Result;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.data.redis.core.ValueOperations; import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
...@@ -21,6 +29,9 @@ import springfox.documentation.annotations.ApiIgnore; ...@@ -21,6 +29,9 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Controller @Controller
...@@ -28,23 +39,72 @@ import java.util.List; ...@@ -28,23 +39,72 @@ import java.util.List;
@RequestMapping("gk/rule/") @RequestMapping("gk/rule/")
@ApiIgnore @ApiIgnore
public class ScoreSettingController { public class ScoreSettingController {
@Resource @Resource
private CmptService cmptService; private CmptService cmptService;
@Resource @Resource
BannerService bannerService; private RemoteService remoteService;
@Resource @Resource
ValueOperations valueOperations; private ScoreRuleService scoreRuleService;
@RequestMapping("index/{cmptId}") @RequestMapping("index/{cmptId}")
@PageView @PageView
public ModelAndView getAlbumCounts(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) { public ModelAndView getAlbumCounts(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) {
Cmpt cmpt = cmptService.queryCmptBycmptId(cmptId); Cmpt cmpt = cmptService.queryCmptBycmptId(cmptId);
int currentRuleType = scoreRuleService.getCurrentRuleType(cmptId);
mv.addObject("cmpt", cmpt); mv.addObject("cmpt", cmpt);
mv.addObject("currentRuleType", currentRuleType);
mv.setViewName("cmpt/scoreSetting"); mv.setViewName("cmpt/scoreSetting");
return mv; return mv;
} }
@RequestMapping("test/{cmptId}")
@ResponseBody
@HystrixCommand(fallbackMethod = "testFallBack")
public Result test(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) {
int a = 1/0;
int currentRuleType = scoreRuleService.getCurrentRuleType(cmptId);
return Result.success().setContent(1);
}
public Result testFallBack( Integer cmptId, ModelAndView mv){
return Result.fail().setMsg("tesetttttttt");
}
@RequestMapping("saveRule/{cmptId}/{type}")
@ResponseBody
public Result saveRule(@PathVariable("cmptId") Integer cmptId,
@PathVariable("type") Integer type) {
Cmpt cmpt = cmptService.getCmptFromEnroll(cmptId);
List<CmptScoreRule> rules = scoreRuleService.getRules(cmptId);
if(rules != null || rules.size() > 0){
scoreRuleService.deleteRuleByCmptId(cmptId);
}
List<Road> roads = remoteService.getRoads(cmptId);
List<CmptScoreRule> lists = new ArrayList<>();
for(Road road : roads){
CmptScoreRule rule = new CmptScoreRule();
rule.setCmptId(cmptId);
rule.setRoadId(road.getRoadId());
rule.setStartTime(LocalDateTime.parse(cmpt.getStartTime(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
rule.setEndTime(LocalDateTime.parse(cmpt.getEndTime(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
rule.setInsertTime(LocalDateTime.now());
rule.setUpdateTime(LocalDateTime.now());
rule.setScoreRule(type);
rule.setScoreUploadTimes(999);
lists.add(rule);
}
scoreRuleService.batchInsertRules(lists);
return Result.success().setContent(lists);
}
} }
...@@ -76,16 +76,21 @@ feign.client.config.default.readTimeout=30000 ...@@ -76,16 +76,21 @@ feign.client.config.default.readTimeout=30000
#feign调用的log 等级 #feign调用的log 等级
feign.client.config.default.loggerLevel=full feign.client.config.default.loggerLevel=full
feign.okhttp.enabled=true feign.okhttp.enabled=true
feign.hystrix.enabled=true #feign.hystrix.enabled=true
#feign.compression.request.enabled=true feign.sentinel.enabled=true
#feign.compression.request.mime-types=text/xml,application/xml,application/json
#feign.compression.request.min-request-size=2048 #sentinel
spring.cloud.sentinel.transport.dashboard=http://localhost:9948
spring.cloud.sentinel.transport.port=8719
hystrix.metrics.enabled=true hystrix.metrics.enabled=true
hystrix.command.default.execution.timeout.enabled=false hystrix.command.default.execution.timeout.enabled=false
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000 hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=5000
hystrix.
logging.level.com.dlbridge.feign.NewsService=debug logging.level.com.dlbridge.feign.NewsService=debug
logging.level.org.springframework.cloud.openfeign=debug logging.level.org.springframework.cloud.openfeign=debug
spring.zipkin.base-url=http://zipkin.geexek.com.cn spring.zipkin.base-url=http://zipkin.geexek.com.cn
spring.zipkin.sender.type=web spring.zipkin.sender.type=web
spring.sleuth.sampler.probability=1 spring.sleuth.sampler.probability=1
swagger.enable=true swagger.enable=true
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</div> </div>
</div> </div>
<div class="section"> <%--<div class="section">
<h3 class="title">上传次数</h3> <h3 class="title">上传次数</h3>
<div> <div>
<label for="" class="tip">比赛期间上传成绩次数</label> <label for="" class="tip">比赛期间上传成绩次数</label>
...@@ -82,13 +82,9 @@ ...@@ -82,13 +82,9 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
</c:if> </c:if>
</div> </div>--%>
<div class="section">
<h3 class="title">已上传成绩统计</h3>
<span class="export">名单导出</span>
<div id="container"></div>
</div>
<div class="section"> <div class="section">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
......
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
border:1px solid rgba(229,229,229,1); border:1px solid rgba(229,229,229,1);
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0px;
} }
</style> </style>
</head> </head>
...@@ -94,22 +95,22 @@ ...@@ -94,22 +95,22 @@
<div class="section"> <div class="section">
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<h3 class="title">成绩规则</h3> <h3 class="title">成绩规则</h3>
<div> <%--<div>
<input type="checkbox" > <input type="checkbox" >
<span style="font-size:20px;color: #333;">是定向赛,没有固定打卡顺序。</span> <span style="font-size:20px;color: #333;">是定向赛,没有固定打卡顺序。</span>
</div> </div>--%>
</div> </div>
<div class="data"> <div class="data">
<div class="setting-item"> <div class="setting-item">
<input type="radio" name="rule"> <input type="radio" name="rule" value="3" ${currentRuleType == 3?'checked':''}>
<span style="font-size:20px;color: #333;margin-left: 75px;">仅记录一次成绩,此成绩为最终成绩。</span> <span style="font-size:20px;color: #333;margin-left: 75px;">仅记录一次成绩,此成绩为最终成绩。</span>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<input type="radio" name="rule"> <input type="radio" name="rule" value="2" ${currentRuleType == 2 ? 'checked':''}>
<span style="font-size:20px;color: #333;margin-left: 75px;">允许记录多次成绩,取所有成绩中的最佳成绩作为最终成绩。</span> <span style="font-size:20px;color: #333;margin-left: 75px;">允许记录多次成绩,取所有成绩中的最佳成绩作为最终成绩。</span>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<input type="radio" name="rule"> <input type="radio" name="rule" value="1" ${currentRuleType == 1 ? 'checked':''}>
<span style="font-size:20px;color: #333;margin-left: 75px;">允许记录多次成绩,取所有成绩之和,即总跑量,作为最终成绩。</span> <span style="font-size:20px;color: #333;margin-left: 75px;">允许记录多次成绩,取所有成绩之和,即总跑量,作为最终成绩。</span>
</div> </div>
...@@ -134,5 +135,29 @@ ...@@ -134,5 +135,29 @@
<script src="${ctxStatic}/js/qikoo.js"></script> <script src="${ctxStatic}/js/qikoo.js"></script>
</body> </body>
<script>
$(document).ready(function () {
// 修改成绩规则
$('input[type=radio]').click(function () {
var index = layer.load();
$.ajax({
url : '/gk/rule/saveRule/'+getCId()+"/"+$(this).val(),
success:function (data) {
layer.close(index);
if(data.code == 200){
layer.msg("切换成功!",{icon:1,duraion:1500});
}else{
layer.msg("切换失败!",{icon:5,duraion:1500});
}
},
complete:function () {
setTimeout(function () {
layer.close(index);
},3000)
}
})
});
//
});
</script>
</html> </html>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<title>扫码打卡</title> <title>成绩统计</title>
<!-- Bootstrap CSS--> <!-- Bootstrap CSS-->
<link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="${ctxStatic}/newdermon/vendor/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome CSS--> <!-- Font Awesome CSS-->
...@@ -30,84 +30,11 @@ ...@@ -30,84 +30,11 @@
<link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css"/> <link rel="stylesheet" href="${ctxStatic}/cmpt/road-new.css"/>
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script> <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script> <script src="${ctxStatic}/newdermon/vendor/jquery/jquery.min.js"></script>
<script src="http://cdn.highcharts.com.cn/highcharts/8.0.4/highcharts.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script> <script type="text/javascript" charset="utf-8" src="${ctxStatic}/layer/layer.js"></script>
<link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css"> <link rel="stylesheet" href="${ctxStatic}/layer/skin/layer.css">
<link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>"> <link rel="stylesheet" href="/static/cmpt/score.css?<%=System.currentTimeMillis()%>">
<style>
.title{
width: 192px;
height: 33px;
font-size: 24px;
font-family: PingFangSC-Medium,PingFang SC;
font-weight: 500;
color: rgba(51,51,51,1);
line-height: 33px;
}
.road-name{
width: 960px;
height: 70px;
background: rgba(250,250,250,1);
border-radius: 4px;
line-height: 70px;
padding: 0px 40px 0px 20px;
margin-bottom: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.road-text{
width:93px;
height:28px;
font-size:20px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(51,51,51,1);
line-height:28px;
}
.down{
width:105px;
height:21px;
font-size:15px;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
color:rgba(206,57,57,1);
cursor: pointer;
line-height:21px;
}
.data label{
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium,PingFang SC;
font-weight: 500;
color: rgba(153,153,153,1);
line-height: 22px;
margin: 10px 0px;
padding: 0px 20px;
}
.notice {
vertical-align: middle;
background: url(/static/images/notice.png);
width: 18px;
display: inline-block;
height: 18px;
background-repeat: no-repeat;
-webkit-background-size: contain;
background-size: contain;
margin-bottom: 5px;
}
.tip-section{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 50px;
}
.tip-section span{
font-size:20px;
text-align: center;
color:rgba(206,57,57,1);
}
</style>
</head> </head>
<body> <body>
<jsp:include page="../common/header.jsp"></jsp:include> <jsp:include page="../common/header.jsp"></jsp:include>
...@@ -115,35 +42,89 @@ ...@@ -115,35 +42,89 @@
<jsp:include page="../common/menu.jsp"></jsp:include> <jsp:include page="../common/menu.jsp"></jsp:include>
<div class="rght"> <div class="rght">
<div class="section"> <div class="section">
<h3 class="title">打卡点二维码下载</h3> <h3 class="title">已上传成绩统计</h3>
<div class="data"> <%-- <span class="export">名单导出</span>--%>
<label for="">项目</label> <div id="container"></div>
<c:forEach var="item" items="${roads}" varStatus="idx">
<div class="road-name ${idx.index==0?'active':''}" road-id="${item.roadId}">
<input type="hidden" id="roadId" name="roadId" value="${item.roadId}">
<span class="road-text">${item.name}</span>
<span class="down QRCodeDown">下载全部二维码</span>
</div>
</c:forEach>
</div>
</div>
<div class="tip-section">
<div>
<span class="notice"></span>
<span>当前功能无法启用</span>
</div>
<span>请先到‘路线导入’页面导入路线,并且路线除了起终点外至少要有1个标注,<br/> ‘路线导入’的入口位置如下图所示</span>
<img style="width: 400px" src="/static/images/manage/demo3.png" alt="">
</div> </div>
</div> </div>
<script src="${ctxStatic}/newdermon/vendor/popper.js/umd/popper.min.js"></script>
<script src="${ctxStatic}/js/qikoo.js"></script>
<script src="${ctxStatic}/js/scan.js"></script>
</body> </body>
<script>
getCharts();
function getCharts() {
$.ajax({
url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/scoreStatistic?cmptId='+getCId(),
success:function (data) {
var roads = data.data;
var roadNames = [];
var enrollCount = [];
var timerCount = [];
var statistic = new Array(roadNames.length);
$.each(roads,function (i,e) {
roadNames.push("<strong>"+e.name+"</strong><br>报名人数:"+Number(e.enrollCount));
timerCount.push(Number(e.timerCount));
enrollCount.push(Number(e.enrollCount));
})
var series = [];
var bgData = {
name: '',
color: 'rgba(234,234,234,1)',
data: enrollCount,
pointPadding: 0.3,
showInLegend: false
}
for (var i in roadNames) {
}
var timer = {
name: '',
color: 'rgba(206,57,57,1)',
data: timerCount,
pointPadding: 0.3,
showInLegend: false
}
series.push(bgData);
series.push(timer);
drawChart(roadNames, series)
}
})
}
function drawChart(roads,series) {
var chart = Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: ''
},
xAxis: {
categories: roads
},
yAxis: [{
title: {
text: ''
}
}],
credits: {
enabled: false
},
legend: {
shadow: false
},
tooltip: {
shared: true
},
plotOptions: {
column: {
grouping: false,
shadow: false,
borderWidth: 0
}
},
series: series
});
}
</script>
</html> </html>
\ No newline at end of file
.switch{
display: flex;
justify-content: space-between;
align-items: center;
}
.switch .radio{
width: 145px;
height: 38px;
border-radius: 30px;
}
.switch .txt{
display: inline-block;
height: 38px;
line-height: 38px;
font-size: 16px;
width: 60px;
text-align: center;
}
.switch .dot{
height: 28px;
width: 28px;
border-radius: 50%;
top: 5px;
}
.section{
padding : 22px 25px 30px;
}
.flex{
display: flex;
}
.flex-vt{
display: flex;
justify-content: space-between;
align-items: center;
}
.flex-vt label{
font-size: 16px;
color: rgba(153,153,153,1);
margin: 0px 5px;
}
.flex-vt select{
width: 175px;
height: 35px;
background: rgba(247,247,247,1);
padding-left: 15px;
height: 50px;
line-height: 50px;
}
.tab{
height:65px;
display: flex;
border-bottom: 1px solid rgba(229,229,229,1);
margin-top: 30px;
align-items: center;
justify-content: space-between;
}
input[type=checkbox]::before{
border-radius: 4px;
border: 1px solid rgba(151,151,151,1);
}
input[type=checkbox] {
position: relative;
top: -1px;
left: 10px;
}
.tab .review-status{
max-width: 195px;
height: 65px;
display: block;
line-height: 65px;
padding: 0px 18px;
font-size: 20px;
color: rgba(51,51,51,1);
background: rgba(255,255,255,1);
border-radius: 0px 4px 0px 0px;
border-left: 1px solid rgba(229,229,229,1);
border-top: 1px solid rgba(229,229,229,1);
cursor: pointer;
position: relative;
}
.review-status.active{
color: rgba(206,57,57,1);
}
.review-status.active:after{
color: rgba(206,57,57,1);
border-bottom: 1px solid white;
content: "";
width: 101%;
height: 6px;
background: white;
position: absolute;
left: 0px;
bottom: -3px;
color:rgba(206,57,57,1);
border-bottom: none;
}
.tab .review-status:last-child{
border-right: 1px solid rgba(229,229,229,1);
}
.data-cloumn{
padding: 0px 20px;
}
.data-cloumn span,.score-info span{
display: inline-block;
width: 105px;
height: 45px;
line-height: 45px;
font-size:16px;
color:rgba(153,153,153,1);
}
.data-cloumn span:last-child,.score-info span:last-child{
width: 50px;
text-align: center;
}
.score-item{
background:rgba(250,250,250,1);
border-radius:4px;
padding: 0px 20px;
margin-bottom: 20px;
}
.score-info{
border-bottom: 1px solid rgba(221,221,221,1);
}
.score-info span{
color:rgba(51,51,51,1);
}
.score-detail table{
width: 80%;
margin: auto;
}
.score-detail table thead tr{
border-bottom:1px solid rgba(221,221,221,1);
}
.score-detail table thead tr th,.score-detail table tbody tr td{
font-size:16px;
font-weight: normal;
width: 50%;
text-align: center;
color:rgba(153,153,153,1);
}
.score-detail table tbody tr{
height:40px;
line-height: 40px
}
.score-detail table tbody tr:nth-child(2n){;
background:rgba(255,255,255,1);
}
.img-item{
width:66px;
height:66px;
margin: 10px 10px 10px 0px;
position: relative;
}
.img{
width:66px;
height:66px;
}
.pager{
display: flex;
justify-content: space-between;
align-items: center;
height: 80px;
}
.pager .page-btn{
display: inline-block;
width:40px;
height:40px;
background-color:rgba(247,247,247,1);
border-radius:4px;
cursor: pointer;
border:1px solid rgba(229,229,229,1)
}
.pager input{
width:107px;
height:40px;
background:rgba(247,247,247,1);
border-radius:4px;
border:1px solid rgba(229,229,229,1);
}
.preview{
max-width: 80%;
height: 80%;
margin: auto;
position: relative;
padding: 20px;
background: white;
z-index: 9999;
}
#dialog{
display: none;
justify-content: center;
align-items: center;
display: flex;
position: fixed;
width: 100%;
height: 100%;
top: 0px;left: 0px;background: rgba(0,0,0,0.4);z-index: 99
}
.select{
text-transform: none;
width: 200px;
height: 40px;
padding: 0px 5px;
border: none;
outline: none;
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
cursor: pointer;
}
.pass{
cursor: pointer;
display: inline-block;
width: 146px;
height: 40px;
border-radius: 4px;
border: 1px solid rgba(206,57,57,1);
line-height: 40px;
text-align: center;
font-size: 18px;
color: rgba(206,57,57,1);
letter-spacing: 5px;
}
.no-pass{
cursor: pointer;
display: inline-block;
width: 146px;
height: 40px;
border-radius: 4px;
border: 1px solid rgba(51,51,51,1);
line-height: 40px;
text-align: center;
letter-spacing: 2px;
color: rgba(51,51,51,1);
}
.bigger{
display: inline-block;
position: absolute;
width: 12px;
height: 12px;
background-image: url(/static/images/bigger.png);
background-position: center;
background-repeat: no-repeat;
right: 0px;
z-index: 99;
top: 0px;
background-size: contain;
}
.iconClose{
position: absolute;
width: 30px;
height: 30px;
background-image: url(/static/images/close-red.png);
background-position: center;
background-repeat: no-repeat;
right: -10px;
z-index: 100;
top: -10px;
border-radius: 50%;
background-color: white;
cursor: pointer;
background-size: 80%;
}
.prev{
background-image: url(/static/images/prev.png);
background-position: center;
background-repeat: no-repeat;
background-size: 25%;
}
.next{
background-image: url('/static/images/next.png');
background-position: center;
background-repeat: no-repeat;
background-size: 25%;
}
.select-section{
width: 263px;
height: 50px;
line-height: 50px;
margin-right: 20px;
background: rgba(247,247,247,1);
border: 1px solid rgba(229,229,229,1);
border-radius:4px;
}
.down-arrow {
top: 22px!important;
right: 9px!important;
}
.search-btn-text{
display: inline-block;
width: 80px;
text-align: center;
color: #333;
cursor: pointer;
}
.icon-search{
display: inline-block;
margin: 0px 14px;
}
.search-ipt{
border: 0px;
width: 140px;
}
.export-btn{
width: 110px;
height: 50px;
background: rgba(206,57,57,1);
border-radius: 4px;
font-size: 16px;
color: white;
line-height: 50px;
text-align: center;
cursor: pointer;
}
\ No newline at end of file
...@@ -329,9 +329,7 @@ $(document).ready(function () { ...@@ -329,9 +329,7 @@ $(document).ready(function () {
getCharts(); getCharts();
$('.export').click(function () {
window.open(window.location.origin+"/gk/score/export/"+getCId())
})
}); });
function getCharts() { function getCharts() {
......
...@@ -2,9 +2,10 @@ var score = new Vue({ ...@@ -2,9 +2,10 @@ var score = new Vue({
el : '#score', el : '#score',
data : { data : {
selectedRoadId:-1, selectedRoadId:-1,
selectedRuleId:-1, selectedOrigin:1,
searchWord:"",
param:{ param:{
size:10, pageSize:10,
page:0, page:0,
cmptId:getCId(), cmptId:getCId(),
checkstatus:0 checkstatus:0
...@@ -32,6 +33,10 @@ var score = new Vue({ ...@@ -32,6 +33,10 @@ var score = new Vue({
if(!value || value.length < 18) return ""; if(!value || value.length < 18) return "";
return value.substr(5,5)+" "+value.substr(11,5); return value.substr(5,5)+" "+value.substr(11,5);
}, },
substrYear:function(value){
if(!value || value.length < 18) return "";
return value.substr(5);
},
substrDate:function(value,length){ substrDate:function(value,length){
if(!value || value.length < 18) return ""; if(!value || value.length < 18) return "";
return value.substr(0,10); return value.substr(0,10);
...@@ -74,8 +79,11 @@ var score = new Vue({ ...@@ -74,8 +79,11 @@ var score = new Vue({
console.log(score.$data.selectedRoadId) console.log(score.$data.selectedRoadId)
reviewPage.reloadPage(); reviewPage.reloadPage();
}, },
changeRule:function () { searchKd:function () {
console.log(score.$data.selectedRuleId); reviewPage.reloadPage();
},
changeOrigin:function () {
console.log(score.$data.selectedOrigin);
reviewPage.reloadPage(); reviewPage.reloadPage();
}, },
next:function () { next:function () {
...@@ -98,6 +106,34 @@ var score = new Vue({ ...@@ -98,6 +106,34 @@ var score = new Vue({
score.$data.jumpToPage = --score.$data.param.page+1; score.$data.jumpToPage = --score.$data.param.page+1;
reviewPage.reloadPage(); reviewPage.reloadPage();
}, },
getScoreById:function(id){
var obj = null;
$.each(this.scores, function (i, e) {
if (e.cmptScoreRuleScoreinfoId == id) {
obj = e;
return true;
}
});
return obj;
},
showDetail:function(id,event){
if($(event.currentTarget).find('.score-detail-item').length > 0){
score.getScoreById(id).scoreDetails = [];
return ;
}
$.ajax({
url:"http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreDetails?scoreId="+id,
success:function (data) {
if(data.code == 1){
if(data.data.length == 0){
layer.msg("无详细成绩信息!");
return ;
}
score.getScoreById(id).scoreDetails = data.data;
}
}
});
},
jumpTo:function () { jumpTo:function () {
if(score.$data.jumpToPage <= 0) score.$data.jumpToPage = 1; if(score.$data.jumpToPage <= 0) score.$data.jumpToPage = 1;
if(score.$data.jumpToPage-1 > Math.ceil((score.$data.totalPage/10))){ if(score.$data.jumpToPage-1 > Math.ceil((score.$data.totalPage/10))){
...@@ -123,47 +159,53 @@ var reviewPage = { ...@@ -123,47 +159,53 @@ var reviewPage = {
if(data.status == 1){ if(data.status == 1){
score.$data.roads = data.content; score.$data.roads = data.content;
score.$data.selectedRoadId = score.$data.roads[0].roadId; score.$data.selectedRoadId = score.$data.roads[0].roadId;
reviewPage.getRules(); reviewPage.reloadPage();
} }
} }
}); });
}, },
getRules : function () { getRules : function () {
$.ajax({ /*$.ajax({
url:"/gk/review/rules/"+getCId(), url:"/gk/review/rules/"+getCId(),
success:function (data) { success:function (data) {
if(data.status == 1){ if(data.status == 1){
score.$data.rules = data.content; score.$data.rules = data.content;
score.$data.selectedRuleId = score.$data.rules[0].id; score.$data.selectedOrigin = score.$data.rules[0].id;
reviewPage.reloadPage(); reviewPage.reloadPage();
} }
} }
}); });*/
}, },
reloadPage:function () { reloadPage:function () {
score.$data.param.roadId = score.$data.selectedRoadId; score.$data.param.roadId = score.$data.selectedRoadId;
score.$data.param.ruleId = score.$data.selectedRuleId; score.$data.param.origin = score.$data.selectedOrigin;
score.$data.param.keyword = score.$data.searchWord;
$.ajax({ $.ajax({
url : '/gk/scoreReview/getCmptScoreRuleScoreInfo', url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfo',
data:score.$data.param, data:score.$data.param,
type:'post',
beforeSend:function(){ beforeSend:function(){
layer.load(); layer.load();
}, },
success:function (data) { success:function (data) {
score.$data.scores = data.content; if(data.code == 1){
score.$data.totalPage = data.total; $.each( data.data.records,function (i,e) {
if(score.$data.param.checkstatus == 0){ e.scoreDetails = [];
score.$data.reviewCount.waiting = data.total; });
}else if(score.$data.param.checkstatus == 1){ score.$data.scores = data.data.records;
score.$data.reviewCount.pass = data.total; score.$data.totalPage = data.data.total;
} else if(score.$data.param.checkstatus == 2){ if(score.$data.param.checkstatus == 0){
score.$data.reviewCount.nopass = data.total; score.$data.reviewCount.waiting = data.data.total;
}else if(score.$data.param.checkstatus == 1){
score.$data.reviewCount.pass = data.data.total;
} else if(score.$data.param.checkstatus == 2){
score.$data.reviewCount.nopass = data.data.total;
}
reviewPage.getStatistic();
$.each($('input:checked'),function (i,e) {
e.checked=false
})
} }
reviewPage.getStatistic();
$.each($('input:checked'),function (i,e) {
e.checked=false
})
}, },
complete:function () { complete:function () {
layer.closeAll(); layer.closeAll();
...@@ -172,15 +214,16 @@ var reviewPage = { ...@@ -172,15 +214,16 @@ var reviewPage = {
}, },
getStatistic:function(){ getStatistic:function(){
$.ajax({ $.ajax({
url : '/gk/scoreReview/getCmptScoreRuleScoreInfoStatistics?cmptId='+getCId()+'&roadId='+ url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/getCmptScoreRuleScoreInfoStatistics?cmptId='+getCId()+'&roadId='+
score.$data.selectedRoadId score.$data.selectedRoadId
+'&ruleId='+ score.$data.selectedRuleId, +'&origin='+ score.$data.selectedOrigin+"&keyword="+score.$data.searchWord,
type:'post',
success:function (data) { success:function (data) {
var result = data.content; if(data.code == 1){
score.$data.reviewCount.waiting = result.Unprocessed; score.$data.reviewCount.waiting = data.data.unprocessed;
score.$data.reviewCount.pass = result.pass; score.$data.reviewCount.pass = data.data.pass;
score.$data.reviewCount.nopass = result.nopass; score.$data.reviewCount.nopass = data.data.nopass;
}
}, },
complete:function () { complete:function () {
layer.closeAll(); layer.closeAll();
...@@ -205,10 +248,9 @@ var reviewPage = { ...@@ -205,10 +248,9 @@ var reviewPage = {
passedIds = [0]; passedIds = [0];
} }
var param = {cmptId : getCId(),'checkstatus':score.$data.param.checkstatus, var param = {cmptId : getCId(),'checkstatus':score.$data.param.checkstatus,
roadId: score.$data.selectedRoadId, ruleId : score.$data.selectedRuleId, roadId: score.$data.selectedRoadId,passedIds:passedIds.join(','),noPassedIds:noPassedIds.join(',')};
passedIds:passedIds.join(','),noPassedIds:noPassedIds.join(',')};
$.ajax({ $.ajax({
url : '/gk/scoreReview/uploadCmptScoreRuleScoreInfo', url : 'http://localhost:8081/geexekscore/api/v1/cmpt-score-rule-scoreinfo/uploadCmptScoreRuleScoreInfo',
data: param, data: param,
beforeSend:function(){ beforeSend:function(){
layer.load(); layer.load();
...@@ -245,6 +287,8 @@ $(document).ready(function () { ...@@ -245,6 +287,8 @@ $(document).ready(function () {
} }
}); });
}) })
$('.export-btn').click(function () {
window.open(window.location.origin+"/gk/score/export/"+getCId())
})
reviewPage.getRoads(); reviewPage.getRoads();
}); });
\ No newline at end of file
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