Bladeren bron

评审完毕检验

ZC 3 weken geleden
bovenliggende
commit
8db78eaa93

+ 28 - 2
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/ExpertMarkController.java

@@ -335,6 +335,34 @@ public class ExpertMarkController extends BaseController{
         mark.setBidQuotes(bidQuotes);
         mark.setBidIdeas(bidIdeas);
         mark.setExpertTeches(expertBySid);
+
+        if(examineDetails.size() / bidExamines.size() != bidQuotes.size()){
+            mark.setState(false);
+        }
+
+        if(respondDetails.size() / bidResponds.size() != bidQuotes.size()){
+            mark.setState(false);
+        }
+
+        // 存储不合格供应商ID
+//        Set<Long> ids = new HashSet<>();
+//        for(BidExpertExamine item : examineDetails){
+//            if("不合格".equals(item.getIsOk())){
+//                ids.add(item.getHid());
+//            }
+//        }
+//
+//        for(BidExpertRespond item : respondDetails){
+//            if("不合格".equals(item.getIsOk())){
+//                ids.add(item.getHid());
+//            }
+//        }
+
+        if(expertBySid.size() / bidTeches.size() >= bidQuotes.size()){
+            mark.setState(true);
+        }else {
+            mark.setState(false);
+        }
         return success(mark);
     }
 
@@ -702,13 +730,11 @@ public class ExpertMarkController extends BaseController{
         BidExpertRespond bidExpertRespond = new BidExpertRespond();
 
         bidExpertExamine.setSid(sid);
-        bidExpertExamine.setUserId(userId);
 
         bidExpertTech.setSid(sid);
         bidExpertTech.setUserId(userId);
 
         bidExpertRespond.setSid(sid);
-        bidExpertRespond.setUserId(userId);
 
         // 增加状态
         for(BidQuote item : bidQuoteList){

+ 10 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/Mark.java

@@ -50,6 +50,8 @@ public class Mark {
 
     private List<BidExpertTech> expertTeches;
 
+    private Boolean state;
+
     public Long getSid() {
         return sid;
     }
@@ -201,4 +203,12 @@ public class Mark {
     public void setExpertTeches(List<BidExpertTech> expertTeches) {
         this.expertTeches = expertTeches;
     }
+
+    public Boolean getState() {
+        return state;
+    }
+
+    public void setState(Boolean state) {
+        this.state = state;
+    }
 }