licailing il y a 4 ans
Parent
commit
f8945c44b3

+ 9 - 0
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -113,6 +113,15 @@ public class RateService {
         return rateRepo.save(record);
         return rateRepo.save(record);
     }
     }
 
 
+    /*
+    线下退回
+     */
+    public void offline(Long id) {
+        Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+        rate.setStatus(RateStatus.REVIEW_PENDING);
+        rateRepo.save(rate);
+    }
+
     public void audit(Long id, RateStatus status, String remark, Long userId) {
     public void audit(Long id, RateStatus status, String remark, Long userId) {
         Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         rate.setStatus(status);
         rate.setStatus(status);

+ 6 - 0
src/main/java/com/izouma/wenlvju/web/RateController.java

@@ -114,6 +114,12 @@ public class RateController extends BaseController {
         rateService.audit(id, status, remark, SecurityUtils.getAuthenticatedUser().getId());
         rateService.audit(id, status, remark, SecurityUtils.getAuthenticatedUser().getId());
     }
     }
 
 
+    @PostMapping("/offline")
+    public void offline(@RequestParam Long id) {
+        rateService.offline(id);
+    }
+
+
     @GetMapping(value = "/export/{id}", produces = "application/msword;charset=utf-8")
     @GetMapping(value = "/export/{id}", produces = "application/msword;charset=utf-8")
     public String export(@PathVariable Long id) {
     public String export(@PathVariable Long id) {
         Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));
         Rate rate = rateRepo.findById(id).orElseThrow(new BusinessException("无记录"));

+ 3 - 5
src/main/vue/src/views/rate/GradeList.vue

@@ -362,15 +362,13 @@ export default {
         saveDismiss() {
         saveDismiss() {
             this.loading = true;
             this.loading = true;
             this.$http
             this.$http
-                .post('/rate/audit', {
-                    id: this.$route.query.id,
-                    status: 'REVIEW_PENDING',
-                    remark: '评分被退回,待专家补全资料'
+                .post('/rate/offline', {
+                    id: this.$route.query.id
                 })
                 })
                 .then(res => {
                 .then(res => {
                     this.loading = false;
                     this.loading = false;
                     this.$message.success('退回成功');
                     this.$message.success('退回成功');
-                    this.getData();
+                    this.$router.go(-1);
                 })
                 })
                 .catch(e => {
                 .catch(e => {
                     this.loading = false;
                     this.loading = false;