Commit bef2bc66 authored by sunyuhua's avatar sunyuhua

成绩审核的后台代码,更新字段

parent 48010f19
......@@ -19,11 +19,23 @@
select a.cmpt_id as cmptId,rule_id as ruleId,b.mark_no as markNo,subsectionscore as subsectionscore,subsectionMileage as subsectionMileage,checkStatus,cmptPace from geerunner.cmpt_enroll as a left join
gk_cmpt_score_rule_scoreinfo as b on a.cmpt_id=b.cmptId 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 subsectionTime desc limit #{page.offset},#{page.size}
</select>
<update id="uploadCmptScoreRuleScoreInfoByNoPassedIds">
<update id="uploadCmptScoreRuleScoreInfoByNoPassedIds">
UPDATE gk_cmpt_score_rule_scoreinfo as b set b.checkStatus=1
where b.cmptId=#{cmptId} and b.rule_id=#{ruleId} and b.id in
<foreach item="noPassedId" index="index" collection="noPassedIds"
open="(" separator="," close=")">
#{noPassedId}
</foreach>
</update>
<update id="uploadCmptScoreRuleScoreInfoByPassedIds">
<update id="uploadCmptScoreRuleScoreInfoByPassedIds">
UPDATE gk_cmpt_score_rule_scoreinfo as b set b.checkStatus=1
where b.cmptId=#{cmptId} and b.rule_id=#{ruleId} and b.id in
<foreach item="passedId" index="index" collection="passedIds"
open="(" separator="," close=")">
#{passedId}
</foreach>
</update>
......
......@@ -5,10 +5,8 @@ import com.dlbridge.jadp.plugins.cmpt.bean.CmptScoreRuleScoreInfo;
import com.dlbridge.jadp.plugins.cmpt.service.CmptScoreRuleScoreInfoService;
import com.dlbridge.jadp.plugins.cmpt.utils.Page;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;
......@@ -53,7 +51,7 @@ public class CmptScoreRuleScoreInfoController {
* @param checkstatus 1为已通过 ,2为未通过
* @return
*/
@RequestMapping("uploadCmptScoreRuleScoreInfo/{cmptId}/{roadId}/{ruleId}/{checkstatus}/{noPassedIds}/{passedIds}")
@RequestMapping("uploadCmptScoreRuleScoreInfo")
@ResponseBody
public Page<List<CmptScoreRuleScoreInfo>> uploadCmptScoreRuleScoreInfo(Pageable page, int cmptId, int roadId, int ruleId,int checkstatus,int[] noPassedIds,int[] passedIds){
boolean isOk= cmptScoreRuleScoreInfoService.uploadCmptScoreRuleScoreInfo(cmptId,roadId,ruleId,noPassedIds,passedIds);
......@@ -63,4 +61,6 @@ public class CmptScoreRuleScoreInfoController {
return result;
}
}
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