From e6f8f1e9029658920d41d249b7990bc0080bdbad Mon Sep 17 00:00:00 2001 From: Elvis Date: Tue, 17 Dec 2019 11:02:29 +0800 Subject: [PATCH] 修复不能更新的bug --- src/com/fh/controller/api/V1.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/fh/controller/api/V1.java b/src/com/fh/controller/api/V1.java index 54b28cb..1c92729 100644 --- a/src/com/fh/controller/api/V1.java +++ b/src/com/fh/controller/api/V1.java @@ -1764,7 +1764,7 @@ public class V1 extends BaseController { @RequestMapping(value = "/uploadstudenttest", produces = "application/json;charset=UTF-8") @ResponseBody public Object uploadstudenttest() { - event("uploadupdateTestpaper"); + event("uploadstudenttest"); long cur = System.currentTimeMillis(); PageData pd = this.getPageData(); ResponseGson res = new ResponseGson(); @@ -1789,7 +1789,7 @@ public class V1 extends BaseController { testPd.put("START_DATE", ""); testPd.put("END_DATE", studentPaper.getEndDate()); testPd.put("NAME", ""); - testPd.put("TESTPAPER_ID", get32UUID()); + testPd.put("TESTPAPER_ID", studentPaper.getPaperId()); testPd.put("OTHER_SCORE", ""); testPd.put("HIGHT_SCORE", ""); testPd.put("LOW_SCORE", ""); @@ -1835,14 +1835,14 @@ public class V1 extends BaseController { stestPd.put("PAPER_ID", studentPaper.getPaperId()); stestPd.put("TEST_ID", studentPaper.getPaperId()); stestPd.put("SCORE", studentAnswer.getScore()); - testPd.put("LOST_TEST", studentAnswer.getLosttest()); + stestPd.put("LOST_TEST", studentAnswer.getLosttest()); List liste = studenttestService.listAll(stestPd); if (liste == null || liste.size() == 0) { - testPd.put("STUDENTTEST_ID", get32UUID()); + stestPd.put("STUDENTTEST_ID", get32UUID()); studenttestService.save(stestPd); } else { PageData ptd = liste.get(0); - testPd.put("STUDENTTEST_ID", ptd.get("STUDENTTEST_ID")); + stestPd.put("STUDENTTEST_ID", ptd.get("STUDENTTEST_ID")); studenttestService.edit(stestPd); } @@ -1886,7 +1886,7 @@ public class V1 extends BaseController { } else { res.setDataError(); } - logger.info("uploadupdatetestpaper cost time:" + logger.info("uploadstudenttest cost time:" + (System.currentTimeMillis() - cur)); return res.toJson(); -- libgit2 0.21.4