Browse Source

修改成绩查询

tiaosheng
wang0018 5 years ago
parent
commit
a3d9538857
  1. 51
      mt/src/main/java/com/ccsens/mt/service/CompeteService.java

51
mt/src/main/java/com/ccsens/mt/service/CompeteService.java

@ -1038,26 +1038,31 @@ public class CompeteService implements ICompeteService {
if(competeJudgment.getChiefJudgment()!=(byte)0){ if(competeJudgment.getChiefJudgment()!=(byte)0){
//不是主裁判 //不是主裁判
//先判断主裁判提交了没 //先判断主裁判提交了没
Integer ti= new Integer(0);//0代表没提交 1代表提交了 // Integer ti= new Integer(0);//0代表没提交 1代表提交了
CompeteVarietyScoreExample competeVarietyScoreExample=new CompeteVarietyScoreExample(); // CompeteVarietyScoreExample competeVarietyScoreExample=new CompeteVarietyScoreExample();
competeVarietyScoreExample.createCriteria().andSiteOrderIdEqualTo(param.getSiteOrderId()).andRecStatusEqualTo((byte) 0); // competeVarietyScoreExample.createCriteria().andSiteOrderIdEqualTo(param.getSiteOrderId()).andRecStatusEqualTo((byte) 0);
List<CompeteVarietyScore> competeVarietyScoresList = competeVarietyScoreMapper.selectByExample(competeVarietyScoreExample); // List<CompeteVarietyScore> competeVarietyScoresList = competeVarietyScoreMapper.selectByExample(competeVarietyScoreExample);
//下面就是想看看主裁判提交了没 // //下面就是想看看主裁判提交了没
if(competeVarietyScoresList.size()>0){ // if(competeVarietyScoresList.size()>0){
for (CompeteVarietyScore competeVarietyScore:competeVarietyScoresList){ // for (CompeteVarietyScore competeVarietyScore:competeVarietyScoresList){
CompeteJudgment competeJudgment1 = competeJudgmentMapper.selectByPrimaryKey(competeVarietyScore.getJudgmentId()); // CompeteJudgment competeJudgment1 = competeJudgmentMapper.selectByPrimaryKey(competeVarietyScore.getJudgmentId());
if(competeJudgment1.getChiefJudgment()==(byte)0){ // if(competeJudgment1.getChiefJudgment()==(byte)0){
ti=1; // ti=1;
break; // break;
} // }
} // }
} // }
if(ti>0){ // if(ti>0){
//主裁判提交了, // //主裁判提交了,则看一下他里面是否选择了弃权
if(competeStartOrder1.getWaiver()!=(byte)0){ // if(competeStartOrder1.getWaiver()!=(byte)0){
for(int j=0;j<param.getFractionsList().size();j++){ // for(int j=0;j<param.getFractionsList().size();j++){
param.getFractionsList().get(j).setScore(new BigDecimal(0)); // param.getFractionsList().get(j).setScore(new BigDecimal(0));
} // }
// }
// }
if(competeStartOrder1.getWaiver()!=(byte)0){
for(int j=0;j<param.getFractionsList().size();j++){
param.getFractionsList().get(j).setScore(new BigDecimal(0));
} }
} }
}else { }else {
@ -1067,9 +1072,9 @@ public class CompeteService implements ICompeteService {
CompeteVarietyScoreExample competeVarietyScoreExample=new CompeteVarietyScoreExample(); CompeteVarietyScoreExample competeVarietyScoreExample=new CompeteVarietyScoreExample();
competeVarietyScoreExample.createCriteria().andRecStatusEqualTo((byte)0).andSiteOrderIdEqualTo(param.getSiteOrderId()); competeVarietyScoreExample.createCriteria().andRecStatusEqualTo((byte)0).andSiteOrderIdEqualTo(param.getSiteOrderId());
List<CompeteVarietyScore> competeVarietyScoresList = competeVarietyScoreMapper.selectByExample(competeVarietyScoreExample); List<CompeteVarietyScore> competeVarietyScoresList = competeVarietyScoreMapper.selectByExample(competeVarietyScoreExample);
for (CompeteVarietyScore competeVarietyScore : competeVarietyScoresList) { for (int i = 0; i < competeVarietyScoresList.size(); i++) {
competeVarietyScore.setScore(new BigDecimal(0)); competeVarietyScoresList.get(i).setScore(new BigDecimal(0));
competeVarietyScoreMapper.updateByPrimaryKeySelective(competeVarietyScore); competeVarietyScoreMapper.updateByPrimaryKeySelective(competeVarietyScoresList.get(i));
} }
} }
} }

Loading…
Cancel
Save