jiangbiao 1 рік тому
батько
коміт
493204a319

+ 4 - 5
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFirstplanController.java

@@ -61,11 +61,11 @@ public class TTsFirstplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -79,11 +79,11 @@ public class TTsFirstplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -179,7 +179,6 @@ public class TTsFirstplanController extends BaseController {
         }
         if ("1".equals(tTsFirstplan.getStudentConfirm())) {
             tTsFirstplan.setStudentConfirm(getNickName());
-            tTsFirstplan.setTrainingPlanDate(new Date());
             tTsFirstplan.setCourseDate(new Date());
             tTsFirstplan.setAssess(StringUtils.isEmpty(firstplan.getScore2()) ? firstplan.getScore1() : firstplan.getScore2());
         }

+ 13 - 14
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFlplanController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.training.bccnew.controller;
 
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -91,17 +90,17 @@ public class TTsFlplanController extends BaseController {
                 list.add(entity);
             }
         }
-            for (int i = 0; i < list.size(); i++) {
-                if (i == 0) {
-                    list.get(i).setStudy(1);
-                }
-                if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
-                    list.get(i).setStudy(1);
-                    list.get(i + 1).setStudy(1);
-                }
-                if (list.get(i).getStudy()==null){
-                    list.get(i).setStudy(0);
-                }
+        for (int i = 0; i < list.size(); i++) {
+            if (i == 0) {
+                list.get(i).setStudy(1);
+            }
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
+                list.get(i).setStudy(1);
+                list.get(i + 1).setStudy(1);
+            }
+            if (list.get(i).getStudy() == null) {
+                list.get(i).setStudy(0);
+            }
         }
         startPage();
         return getDataTable(list);
@@ -118,11 +117,11 @@ public class TTsFlplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }

+ 24 - 23
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFtplanController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.training.bccnew.controller;
 
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -9,7 +8,9 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.framework.web.page.TableDataInfo;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysUserService;
-import com.ruoyi.project.training.bccnew.domain.*;
+import com.ruoyi.project.training.bccnew.domain.TTsFtplan;
+import com.ruoyi.project.training.bccnew.domain.TTsFtplanContent;
+import com.ruoyi.project.training.bccnew.domain.TTsNew;
 import com.ruoyi.project.training.bccnew.service.*;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -73,7 +74,7 @@ public class TTsFtplanController extends BaseController {
                     entity.setContent(content.toString());
                     entity.setPlanStartData(planDate.toString());
                     list.add(entity);
-                    entity=item;
+                    entity = item;
                     content = new StringBuilder();
                     planDate = new StringBuilder();
                     if (item.getPlanDate() != null)
@@ -93,11 +94,11 @@ public class TTsFtplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -116,11 +117,11 @@ public class TTsFtplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -153,7 +154,7 @@ public class TTsFtplanController extends BaseController {
     @PostMapping
     public AjaxResult add(@RequestBody TTsFtplan tTsFtplan) {
         int i = tTsFtplanService.insertTTsFtplan(tTsFtplan);
-        if (CollectionUtils.isNotEmpty(tTsFtplan.getContents())){
+        if (CollectionUtils.isNotEmpty(tTsFtplan.getContents())) {
             for (TTsFtplanContent content : tTsFtplan.getContents()) {
                 content.setPid(tTsFtplan.getId());
                 tTsFtplanContentService.insertTTsFtplanContent(content);
@@ -175,7 +176,7 @@ public class TTsFtplanController extends BaseController {
                 need.setTimer(timer + 1);
                 if (need.getTimerNeed() == null)
                     need.setTimerNeed(0.0);
-                if (need.getTimerNeed() != null && need.getTimerNeed() <= timer + 1&&need.getPlanStatus()==0) {
+                if (need.getTimerNeed() != null && need.getTimerNeed() <= timer + 1 && need.getPlanStatus() == 0) {
                     need.setPlanStatus(2L);
                 }
             }
@@ -191,12 +192,12 @@ public class TTsFtplanController extends BaseController {
     @Log(title = "芳烃培训", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TTsFtplan tTsFtplan) {
-        if (CollectionUtils.isNotEmpty(tTsFtplan.getContents())){
+        if (CollectionUtils.isNotEmpty(tTsFtplan.getContents())) {
             for (TTsFtplanContent content : tTsFtplan.getContents()) {
-                if (content.getId()==null) {
+                if (content.getId() == null) {
                     content.setPid(tTsFtplan.getId());
                     tTsFtplanContentService.insertTTsFtplanContent(content);
-                }else {
+                } else {
                     tTsFtplanContentService.updateTTsFtplanContent(content);
                 }
             }
@@ -210,38 +211,38 @@ public class TTsFtplanController extends BaseController {
             tTsFtplan.setScorePass("0");
             tTsApproveService.doApprove(ftplan.getId(), "4", getUserId(), getNickName(), "dsdtNoPass");
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && "好".equals(tTsFtplan.getScore2())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && "好".equals(tTsFtplan.getScore2())) {
             tTsFtplan.setPlanStatus(5L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2())||"满意".equals(ftplan.getScore2())) && "好".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2()) || "满意".equals(ftplan.getScore2())) && "好".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(5L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2())||"差".equals(ftplan.getScore2())) && "好".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2()) || "差".equals(ftplan.getScore2())) && "好".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(5L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2())||"满意".equals(ftplan.getScore2())) && "差".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2()) || "满意".equals(ftplan.getScore2())) && "差".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(4L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2())||"差".equals(ftplan.getScore2())) && "满意".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2()) || "差".equals(ftplan.getScore2())) && "满意".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(4L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2())||"满意".equals(ftplan.getScore2())) && "满意".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("满意".equals(tTsFtplan.getScore2()) || "满意".equals(ftplan.getScore2())) && "满意".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(4L);
         }
-        if (("满意".equals(tTsFtplan.getScore1())||"满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2())||"差".equals(ftplan.getScore2())) && "差".equals(tTsFtplan.getScore3())) {
+        if (("满意".equals(tTsFtplan.getScore1()) || "满意".equals(ftplan.getScore1())) && ("差".equals(tTsFtplan.getScore2()) || "差".equals(ftplan.getScore2())) && "差".equals(tTsFtplan.getScore3())) {
             tTsFtplan.setPlanStatus(4L);
         }
-        if (("差".equals(tTsFtplan.getScore1())||"差".equals(ftplan.getScore1())) && "好".equals(tTsFtplan.getScore2())) {
+        if (("差".equals(tTsFtplan.getScore1()) || "差".equals(ftplan.getScore1())) && "好".equals(tTsFtplan.getScore2())) {
             tTsFtplan.setPlanStatus(5L);
         }
-        if (("差".equals(tTsFtplan.getScore1())||"差".equals(ftplan.getScore1())) && "满意".equals(tTsFtplan.getScore2())) {
+        if (("差".equals(tTsFtplan.getScore1()) || "差".equals(ftplan.getScore1())) && "满意".equals(tTsFtplan.getScore2())) {
             tTsFtplan.setPlanStatus(4L);
         }
-        if (("差".equals(tTsFtplan.getScore1())||"差".equals(ftplan.getScore1())) && "差".equals(tTsFtplan.getScore2())) {
+        if (("差".equals(tTsFtplan.getScore1()) || "差".equals(ftplan.getScore1())) && "差".equals(tTsFtplan.getScore2())) {
             tTsFtplan.setPlanStatus(4L);
         }
         tTsFtplanService.updateTTsFtplan(tTsFtplan);
-        if (tTsFtplan.getPlanStatus() !=null) {
+        if (tTsFtplan.getPlanStatus() != null) {
             if (tTsFtplan.getPlanStatus() == 5) {
                 TTsNew tTsNew = new TTsNew();
                 tTsNew.setPlanStatus(5L);

+ 4 - 5
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsLjplanController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.training.bccnew.controller;
 
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -95,11 +94,11 @@ public class TTsLjplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -119,11 +118,11 @@ public class TTsLjplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }

+ 4 - 5
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsYsplanController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.training.bccnew.controller;
 
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -95,11 +94,11 @@ public class TTsYsplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }
@@ -119,11 +118,11 @@ public class TTsYsplanController extends BaseController {
             if (i == 0) {
                 list.get(i).setStudy(1);
             }
-            if (list.get(i).getPlanStatus() == 5 && i <= list.size() - 1) {
+            if ((list.get(i).getPlanStatus() == 5 || list.get(i).getPlanStatus() == 1) && i <= list.size() - 1) {
                 list.get(i).setStudy(1);
                 list.get(i + 1).setStudy(1);
             }
-            if (list.get(i).getStudy()==null){
+            if (list.get(i).getStudy() == null) {
                 list.get(i).setStudy(0);
             }
         }

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsFirstplanServiceImpl.java

@@ -87,15 +87,15 @@ public class TTsFirstplanServiceImpl implements ITTsFirstplanService {
         TTsFirstplan firstplan = tTsFirstplanMapper.selectTTsFirstplanById(tTsFirstplan.getId());
         if ("合格".equals(tTsFirstplan.getScore1())) {
             tTsFirstplan.setPlanStatus(5L);
-            tTsFirstplan.setTrainerConfirm(tTsFirstplan.getNickName());
+            tTsFirstplan.setTrainerConfirm(firstplan.getTrainer());
         }
         if (("不合格".equals(tTsFirstplan.getScore1())||"不合格".equals(firstplan.getScore1())) && "合格".equals(tTsFirstplan.getScore2())) {
             tTsFirstplan.setPlanStatus(5L);
-            tTsFirstplan.setTrainerConfirm(tTsFirstplan.getNickName());
+            tTsFirstplan.setTrainerConfirm(firstplan.getTrainer());
         }
         if (("不合格".equals(tTsFirstplan.getScore1())||"不合格".equals(firstplan.getScore1()))&& "不合格".equals(tTsFirstplan.getScore2())) {
             tTsFirstplan.setPlanStatus(4L);
-            tTsFirstplan.setTrainerConfirm(tTsFirstplan.getNickName());
+            tTsFirstplan.setTrainerConfirm(firstplan.getTrainer());
         }
         tTsFirstplanMapper.updateTTsFirstplan(tTsFirstplan);
         if (tTsFirstplan.getPlanStatus() != null) {

+ 1 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsNewServiceImpl.java

@@ -209,6 +209,7 @@ public class TTsNewServiceImpl implements ITTsNewService {
             tTsFirstplan.setFileName(tTsFirstplanTmpl.getFileName());
             tTsFirstplan.setFileUrl(tTsFirstplanTmpl.getFileUrl());
             tTsFirstplan.setTimer(0L);
+            tTsFirstplan.setTimerNeed(tTsFirstplanTmpl.getTimerNeed());
             tTsFirstplan.setSortTmpl(tTsFirstplanTmpl.getSortTmpl());
             tTsFirstplan.setMaterialVer(tTsFirstplanTmpl.getMaterialVer());
             tTsFirstplan.setExamType(tTsFirstplanTmpl.getExamType());