|
|
|
|
@ -16,7 +16,6 @@ import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@Api(tags = "采购需求预测相关")
|
|
|
|
|
@ -74,13 +73,26 @@ public class CgxqycController {
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "提交失败");
|
|
|
|
|
}
|
|
|
|
|
//新建学生成绩
|
|
|
|
|
// stuGradeMapper.insert()
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "已提交过");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/restartTraining")
|
|
|
|
|
@ApiOperation("采购需求预测-重新实训")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public ResultEntity restartTraining(@RequestParam String userId) {
|
|
|
|
|
Boolean b=scoreService.deleteScore(userId,Constant.PRO_GYQDGL,Constant.MODULE_CGXQYC);
|
|
|
|
|
if(b){
|
|
|
|
|
CgxqycStuAnswerExample cgxqycStuAnswerExample = new CgxqycStuAnswerExample();
|
|
|
|
|
cgxqycStuAnswerExample.createCriteria().andUserIdEqualTo(userId);
|
|
|
|
|
cgxqycStuAnswerMapper.deleteByExample(cgxqycStuAnswerExample);
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "重新实训成功");
|
|
|
|
|
}else {
|
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "重新实训失败");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|