Browse Source

备注回显

licailing 4 years ago
parent
commit
b03edb4f34

+ 12 - 0
src/main/h5/src/views/expert/expertAdd.vue

@@ -182,6 +182,10 @@ export default {
       });
     });
 
+    this.$http.get("/rate/get/" + this.$route.query.rateId).then(res => {
+      this.form.remark = res.remark;
+    });
+
     this.$http
       .post(
         "/rateExpertAudit/all",
@@ -298,6 +302,14 @@ export default {
         })
         .then(() => {
           this.$toast.success("成功");
+          // return this.$http.post(
+          //   "/rate/save",
+          //   {
+          //     id: this.$route.query.rateId,
+          //     remark: form.remark
+          //   },
+          //   { body: "json" }
+          // );
         })
         .catch(e => {
           console.log(e);

+ 1 - 0
src/main/java/com/izouma/wenlvju/domain/Rate.java

@@ -146,6 +146,7 @@ public class Rate extends BaseEntity {
     @Convert(converter = ReviewTimeListConverter.class)
     private List<ReviewTime> reviewTimes = new ArrayList<>();
 
+    @Column(columnDefinition = "TEXT")
     private String remark;
 
     private boolean isRejected;

+ 4 - 2
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -66,7 +66,7 @@ public class RateService {
             Rate orig = rateRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
             boolean examination = orig.isUndertakeExamination();
             ObjUtils.merge(orig, record);
-
+//            if (ObjectUtil.isNotNull(record.getStatus())) {
             switch (record.getStatus()) {
                 case FIRST_REVIEW_PENDING: // 初审中 1
                     orig.setApplyTime(now);
@@ -100,6 +100,7 @@ public class RateService {
                     break;
             }
             orig.setSort(orig.getStatus().getSort());
+//            }
             return rateRepo.save(orig);
 
         }
@@ -472,7 +473,8 @@ public class RateService {
                 .stream()
                 .collect(Collectors.toMap(User::getId, user -> user));
         if (!rate.isChange()) {
-            Organization organization = organizationRepo.findById(rate.getId()).orElseThrow(new BusinessException("无记录"));
+            Organization organization = organizationRepo.findById(rate.getId())
+                    .orElseThrow(new BusinessException("无记录"));
             rate.setAddress(organization.getAddress());
         }