Forráskód Böngészése

Merge branch 'master' of http://gogs.hajianshe.cn/gmcs/HongHu-PSM

dzxiii 3 hónapja
szülő
commit
ace73805ef
56 módosított fájl, 2117 hozzáadás és 312 törlés
  1. 11 6
      bidding-ui/src/views/mine/tenderOffer.vue
  2. 8 3
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteExpertService.java
  3. 3 0
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java
  4. 34 21
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java
  5. 11 0
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteExpertFallbackFactory.java
  6. 5 0
      ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java
  7. 29 29
      ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/PriceConstants.java
  8. 17 8
      ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/controller/BsExpertController.java
  9. 3 0
      ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/mapper/BsExpertMapper.java
  10. 2 0
      ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/service/IBsExpertService.java
  11. 5 0
      ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/service/impl/BsExpertServiceImpl.java
  12. 7 0
      ruoyi-modules/hh-basic/src/main/resources/mapper/BsExpertMapper.xml
  13. 32 1
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidCommitteeController.java
  14. 105 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidIdeaController.java
  15. 1 1
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidIvrController.java
  16. 32 30
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidNoticeController.java
  17. 59 5
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidTenderController.java
  18. 255 11
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/ExpertMarkController.java
  19. 103 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/ScoreSummaryController.java
  20. 67 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidIdea.java
  21. 55 31
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidTender.java
  22. 20 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidWinningResults.java
  23. 3 3
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/QuoteScore.java
  24. 169 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/ScoreSummary.java
  25. 61 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/TechScore.java
  26. 112 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/TotalScore.java
  27. 61 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidIdeaMapper.java
  28. 17 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidInfoMapper.java
  29. 4 4
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidTenderMapper.java
  30. 64 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/ScoreSummaryMapper.java
  31. 61 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidIdeaService.java
  32. 17 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidInfoService.java
  33. 3 4
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidTenderService.java
  34. 63 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IScoreSummaryService.java
  35. 96 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidIdeaServiceImpl.java
  36. 12 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidInfoServiceImpl.java
  37. 6 4
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidTenderServiceImpl.java
  38. 98 0
      ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/ScoreSummaryServiceImpl.java
  39. 1 1
      ruoyi-modules/hh-bidding/src/main/resources/mapper/BidCommitteeMapper.xml
  40. 69 0
      ruoyi-modules/hh-bidding/src/main/resources/mapper/BidIdeaMapper.xml
  41. 8 0
      ruoyi-modules/hh-bidding/src/main/resources/mapper/BidInfoMapper.xml
  42. 5 1
      ruoyi-modules/hh-bidding/src/main/resources/mapper/BidTenderMapper.xml
  43. 8 2
      ruoyi-modules/hh-bidding/src/main/resources/mapper/BidWinningResultsMapper.xml
  44. 99 0
      ruoyi-modules/hh-bidding/src/main/resources/mapper/ScoreSummaryMapper.xml
  45. 25 1
      ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
  46. 8 1
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  47. 55 45
      ruoyi-ui/src/views/expert/tender/components/excelContent.vue
  48. 2 3
      ruoyi-ui/src/views/expert/tender/detail.vue
  49. 6 7
      ruoyi-ui/src/views/expert/tender/list.vue
  50. 1 3
      ruoyi-ui/src/views/purchase/otb/detail.vue
  51. 15 9
      ruoyi-ui/src/views/system/user/index.vue
  52. 24 15
      ruoyi-ui/src/views/tender/tender1/bidding.vue
  53. 11 13
      ruoyi-ui/src/views/tender/tender1/components/CompDetermineWin.vue
  54. 13 11
      ruoyi-ui/src/views/tender/tender1/components/CompDetermineWinXunbi.vue
  55. 4 9
      ruoyi-ui/src/views/tender/tender1/components/CompEval.vue
  56. 52 30
      ruoyi-ui/src/views/tender/tender1/components/CompExpert.vue

+ 11 - 6
bidding-ui/src/views/mine/tenderOffer.vue

@@ -37,12 +37,16 @@
       </el-table-column>
       <el-table-column label="报价金额" align="center">
         <template slot-scope="scope">
-          <span>{{scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first)}}</span>
+          <span v-if="detail.sProjectState != 8">
+            {{scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first)}}
+          </span>
+          <span v-else>*</span>
         </template>
       </el-table-column>
       <el-table-column align="center" label="报价详情">
         <template slot-scope="scope">
-          <el-button type="text" @click="toShowOfferResult(scope.row)">查看报价详情</el-button>
+          <el-button type="text" @click="toShowOfferResult(scope.row)"
+            :disabled="detail.sProjectState == 8 && scope.row.hid != hid">查看报价详情</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -111,10 +115,11 @@ export default {
     async getMyOffer () {
       this.loading = true
       try {
-        const query = { sid: this.sid }
-        // if (this.detail.sProjectState != 7) {
-          query.hid = this.hid
-        // }
+        const query = { 
+          sid: this.sid,
+          hid: this.hid
+        }
+        
         const res = await listQuote(query)
 
         this.data = res.data

+ 8 - 3
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteExpertService.java

@@ -2,13 +2,12 @@ package com.ruoyi.system.api;
 
 import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.constant.ServiceNameConstants;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.system.api.domain.BsExpert;
 import com.ruoyi.system.api.factory.RemoteExpertFallbackFactory;
 import com.ruoyi.system.api.factory.RemotePlanFallbackFactory;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -29,4 +28,10 @@ public interface RemoteExpertService {
      */
     @GetMapping("/expert/getExpertList")
     public List<BsExpert> getExpertList(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    @PostMapping("/expert/insertExpert")
+    public AjaxResult insertExpert(@RequestBody BsExpert bsExpert,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    @GetMapping("/expert/getExpertByUserId")
+    public BsExpert getExpertByUserId(@RequestParam("userId") Long userId,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 }

+ 3 - 0
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteUserService.java

@@ -90,4 +90,7 @@ public interface RemoteUserService {
 
     @GetMapping(value = "/dept/getInfo/{deptId}")
     public SysDept getInfoById(@PathVariable("deptId") Long deptId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    @GetMapping("/user/getLeader")
+    public SysUser getLeader(@RequestParam("ownerDept") Long ownerDept,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 }

+ 34 - 21
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java

@@ -1,5 +1,6 @@
 package com.ruoyi.system.api.domain;
 
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import javax.validation.constraints.*;
@@ -92,6 +93,9 @@ public class SysUser extends BaseEntity
     /** 权属单位编码 */
     private String company;
 
+    /** 是否为专家代表 */
+    private Integer isOwner;
+
     public SysUser()
     {
 
@@ -308,28 +312,37 @@ public class SysUser extends BaseEntity
         this.company = company;
     }
 
+    public Integer getIsOwner() {
+        return isOwner;
+    }
+
+    public void setIsOwner(Integer isOwner) {
+        this.isOwner = isOwner;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("userId", getUserId())
-            .append("deptId", getDeptId())
-            .append("userName", getUserName())
-            .append("nickName", getNickName())
-            .append("email", getEmail())
-            .append("phonenumber", getPhonenumber())
-            .append("sex", getSex())
-            .append("avatar", getAvatar())
-            .append("password", getPassword())
-            .append("status", getStatus())
-            .append("delFlag", getDelFlag())
-            .append("loginIp", getLoginIp())
-            .append("loginDate", getLoginDate())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .append("dept", getDept())
-            .toString();
+        return "SysUser{" +
+                "userId=" + userId +
+                ", deptId=" + deptId +
+                ", userName='" + userName + '\'' +
+                ", nickName='" + nickName + '\'' +
+                ", email='" + email + '\'' +
+                ", phonenumber='" + phonenumber + '\'' +
+                ", sex='" + sex + '\'' +
+                ", avatar='" + avatar + '\'' +
+                ", password='" + password + '\'' +
+                ", status='" + status + '\'' +
+                ", delFlag='" + delFlag + '\'' +
+                ", loginIp='" + loginIp + '\'' +
+                ", loginDate=" + loginDate +
+                ", dept=" + dept +
+                ", roles=" + roles +
+                ", roleIds=" + Arrays.toString(roleIds) +
+                ", postIds=" + Arrays.toString(postIds) +
+                ", roleId=" + roleId +
+                ", company='" + company + '\'' +
+                ", isOwner=" + isOwner +
+                '}';
     }
 }

+ 11 - 0
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteExpertFallbackFactory.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.api.factory;
 
 import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.system.api.RemoteExpertService;
 import com.ruoyi.system.api.RemotePlanService;
 import com.ruoyi.system.api.domain.BsExpert;
@@ -31,6 +32,16 @@ public class RemoteExpertFallbackFactory implements FallbackFactory<RemoteExpert
             public List<BsExpert> getExpertList(String source) {
                 return null;
             }
+
+            @Override
+            public AjaxResult insertExpert(BsExpert bsExpert, String source) {
+                return null;
+            }
+
+            @Override
+            public BsExpert getExpertByUserId(Long userId, String source) {
+                return null;
+            }
         };
     }
 }

+ 5 - 0
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java

@@ -78,6 +78,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
                 return null;
             }
 
+            @Override
+            public SysUser getLeader(Long ownerDept, String source) {
+                return null;
+            }
+
         };
     }
 }

+ 29 - 29
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/PriceConstants.java

@@ -22,21 +22,21 @@ public class PriceConstants {
 
     public static final BigDecimal SERVICE_PRICE_FIVE = new BigDecimal(50000);
 
-    public static final BigDecimal SERVICE_PERCENT_ONE = new BigDecimal(0.015);
+    public static final BigDecimal SERVICE_PERCENT_ONE = new BigDecimal("0.015");
 
-    public static final BigDecimal SERVICE_PERCENT_TWO = new BigDecimal(0.008);
+    public static final BigDecimal SERVICE_PERCENT_TWO = new BigDecimal("0.008");
 
-    public static final BigDecimal SERVICE_PERCENT_THREE = new BigDecimal(0.0045);
+    public static final BigDecimal SERVICE_PERCENT_THREE = new BigDecimal("0.0045");
 
-    public static final BigDecimal SERVICE_PERCENT_FOUR = new BigDecimal(0.0025);
+    public static final BigDecimal SERVICE_PERCENT_FOUR = new BigDecimal("0.0025");
 
-    public static final BigDecimal SERVICE_PERCENT_FIVE = new BigDecimal(0.001);
+    public static final BigDecimal SERVICE_PERCENT_FIVE = new BigDecimal("0.001");
 
-    public static final BigDecimal SERVICE_PERCENT_SIX = new BigDecimal(0.0005);
+    public static final BigDecimal SERVICE_PERCENT_SIX = new BigDecimal("0.0005");
 
-    public static final BigDecimal SERVICE_SAVE_ONE = new BigDecimal(0.65);
+    public static final BigDecimal SERVICE_SAVE_ONE = new BigDecimal("0.65");
 
-    public static final BigDecimal SERVICE_SAVE_TWO = new BigDecimal(0.6);
+    public static final BigDecimal SERVICE_SAVE_TWO = new BigDecimal("0.6");
 
 
     // 货物取费
@@ -50,25 +50,25 @@ public class PriceConstants {
 
     public static final BigDecimal GOOD_PRICE_FIVE = new BigDecimal(125000);
 
-    public static final BigDecimal GOOD_PERCENT_ONE = new BigDecimal(0.015);
+    public static final BigDecimal GOOD_PERCENT_ONE = new BigDecimal("0.015");
 
-    public static final BigDecimal GOOD_PERCENT_TWO = new BigDecimal(0.011);
+    public static final BigDecimal GOOD_PERCENT_TWO = new BigDecimal("0.011");
 
-    public static final BigDecimal GOOD_PERCENT_THREE = new BigDecimal(0.008);
+    public static final BigDecimal GOOD_PERCENT_THREE = new BigDecimal("0.008");
 
-    public static final BigDecimal GOOD_PERCENT_FOUR = new BigDecimal(0.005);
+    public static final BigDecimal GOOD_PERCENT_FOUR = new BigDecimal("0.005");
 
-    public static final BigDecimal GOOD_PERCENT_FIVE = new BigDecimal(0.0025);
+    public static final BigDecimal GOOD_PERCENT_FIVE = new BigDecimal("0.0025");
 
-    public static final BigDecimal GOOD_PERCENT_SIX = new BigDecimal(0.0005);
+    public static final BigDecimal GOOD_PERCENT_SIX = new BigDecimal("0.0005");
 
-    public static final BigDecimal GOOD_SAVE_ONE = new BigDecimal(0.65);
+    public static final BigDecimal GOOD_SAVE_ONE = new BigDecimal("0.65");
 
-    public static final BigDecimal GOOD_SAVE_TWO = new BigDecimal(0.6);
+    public static final BigDecimal GOOD_SAVE_TWO = new BigDecimal("0.6");
 
-    public static final BigDecimal GOOD_SAVE_THREE = new BigDecimal(0.5);
+    public static final BigDecimal GOOD_SAVE_THREE = new BigDecimal("0.5");
 
-    public static final BigDecimal GOOD_SAVE_FOUR = new BigDecimal(0.4);
+    public static final BigDecimal GOOD_SAVE_FOUR = new BigDecimal("0.4");
 
 
     // 工程取费
@@ -82,26 +82,26 @@ public class PriceConstants {
 
     public static final BigDecimal PROJECT_PRICE_FIVE = new BigDecimal(100000);
 
-    public static final BigDecimal PROJECT_PERCENT_ONE = new BigDecimal(0.01);
+    public static final BigDecimal PROJECT_PERCENT_ONE = new BigDecimal("0.01");
 
-    public static final BigDecimal PROJECT_PERCENT_TWO = new BigDecimal(0.007);
+    public static final BigDecimal PROJECT_PERCENT_TWO = new BigDecimal("0.007");
 
-    public static final BigDecimal PROJECT_PERCENT_THREE = new BigDecimal(0.0055);
+    public static final BigDecimal PROJECT_PERCENT_THREE = new BigDecimal("0.0055");
 
-    public static final BigDecimal PROJECT_PERCENT_FOUR = new BigDecimal(0.0035);
+    public static final BigDecimal PROJECT_PERCENT_FOUR = new BigDecimal("0.0035");
 
-    public static final BigDecimal PROJECT_PERCENT_FIVE = new BigDecimal(0.002);
+    public static final BigDecimal PROJECT_PERCENT_FIVE = new BigDecimal("0.002");
 
-    public static final BigDecimal PROJECT_PERCENT_SIX = new BigDecimal(0.0005);
+    public static final BigDecimal PROJECT_PERCENT_SIX = new BigDecimal("0.0005");
 
-    public static final BigDecimal PROJECT_SAVE_ONE = new BigDecimal(0.65);
+    public static final BigDecimal PROJECT_SAVE_ONE = new BigDecimal("0.65");
 
-    public static final BigDecimal PROJECT_SAVE_TWO = new BigDecimal(0.6);
+    public static final BigDecimal PROJECT_SAVE_TWO = new BigDecimal("0.6");
 
-    public static final BigDecimal PROJECT_SAVE_THREE = new BigDecimal(0.5);
+    public static final BigDecimal PROJECT_SAVE_THREE = new BigDecimal("0.5");
 
-    public static final BigDecimal PROJECT_SAVE_FOUR = new BigDecimal(0.4);
+    public static final BigDecimal PROJECT_SAVE_FOUR = new BigDecimal("0.4");
 
     // 竞价收费
-    public static final BigDecimal SAVE = new BigDecimal(0.5);
+    public static final BigDecimal SAVE = new BigDecimal("0.5");
 }

+ 17 - 8
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/controller/BsExpertController.java

@@ -13,14 +13,7 @@ import com.ruoyi.system.api.RemoteUserService;
 import com.ruoyi.system.api.domain.SysUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
@@ -192,4 +185,20 @@ public class BsExpertController extends BaseController {
         System.out.println(insert.toString());
         return success("0");
     }
+
+    @InnerAuth
+    @Log(title = "专家", businessType = BusinessType.INSERT)
+    @PostMapping("/insertExpert")
+    public AjaxResult insertExpert(@RequestBody BsExpert bsExpert) {
+        Integer res = bsExpertService.insertBsExpert(bsExpert);
+        return toAjax(res);
+    }
+
+    @InnerAuth
+    @GetMapping("/getExpertByUserId")
+    public BsExpert getExpertByUserId(@RequestParam("userId") Long userId){
+        BsExpert bsExpert = new BsExpert();
+        bsExpert.setUserId(userId);
+        return bsExpertService.selectExpertByUserId(userId);
+    }
 }

+ 3 - 0
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/mapper/BsExpertMapper.java

@@ -60,4 +60,7 @@ public interface BsExpertMapper {
     public int deleteBsExpertByJids(Long[] jids);
 
     public Long[] selectUserByJids(Long[] jids);
+
+    public BsExpert selectExpertByUserId(Long userId);
+
 }

+ 2 - 0
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/service/IBsExpertService.java

@@ -60,4 +60,6 @@ public interface IBsExpertService {
     public int deleteBsExpertByJid(Long jid);
 
     public Long[] selectUserByJids(Long[] jids);
+
+    public BsExpert selectExpertByUserId(Long userId);
 }

+ 5 - 0
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/service/impl/BsExpertServiceImpl.java

@@ -90,4 +90,9 @@ public class BsExpertServiceImpl implements IBsExpertService {
     public Long[] selectUserByJids(Long[] jids) {
         return bsExpertMapper.selectUserByJids(jids);
     }
+
+    @Override
+    public BsExpert selectExpertByUserId(Long userId) {
+        return bsExpertMapper.selectExpertByUserId(userId);
+    }
 }

+ 7 - 0
ruoyi-modules/hh-basic/src/main/resources/mapper/BsExpertMapper.xml

@@ -61,6 +61,8 @@
         <where>
             <if test="jName != null  and jName != ''">and a.j_name like concat('%', #{jName}, '%')</if>
             <if test="jShState != null ">and a.j_sh_state = #{jShState}</if>
+            <if test = "userId != null">and a.user_id = #{userId}</if>
+            and j_sex is not null
         </where>
     </select>
 
@@ -153,4 +155,9 @@
             #{jid}
         </foreach>
     </select>
+
+    <select id="selectExpertByUserId" parameterType="Long" resultType="com.hh.pms.sae.domain.BsExpert">
+        select * from bs_expert where user_id = #{userId}
+    </select>
+
 </mapper>

+ 32 - 1
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidCommitteeController.java

@@ -10,10 +10,15 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.hh.bidding.domain.BidTender;
 import com.hh.bidding.domain.Committee;
+import com.hh.bidding.service.IBidTenderService;
 import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.RemoteExpertService;
+import com.ruoyi.system.api.RemoteMaterialService;
+import com.ruoyi.system.api.RemoteUserService;
 import com.ruoyi.system.api.domain.BsExpert;
+import com.ruoyi.system.api.domain.MastProject;
+import com.ruoyi.system.api.domain.SysDept;
 import com.ruoyi.system.api.domain.SysUser;
 import com.ruoyi.system.api.model.LoginUser;
 import org.aspectj.weaver.loadtime.Aj;
@@ -42,9 +47,18 @@ public class BidCommitteeController extends BaseController
     @Autowired
     private IBidCommitteeService bidCommitteeService;
 
+    @Autowired
+    private IBidTenderService bidTenderService;
+
     @Autowired
     private RemoteExpertService remoteExpertService;
 
+    @Autowired
+    private RemoteUserService remoteUserService;
+
+    @Autowired
+    private RemoteMaterialService remoteMaterialService;
+
     /**
      * 查询评标委员会列表
      */
@@ -83,7 +97,6 @@ public class BidCommitteeController extends BaseController
     /**
      * 删除评标委员会
      */
-    @RequiresPermissions("system:committee:remove")
     @Log(title = "评标委员会", businessType = BusinessType.DELETE)
     @DeleteMapping("/{pbIds}")
     public AjaxResult remove(@PathVariable Long[] pbIds)
@@ -123,6 +136,18 @@ public class BidCommitteeController extends BaseController
         bidCommittee.setSid(committee.getSid());
         bidCommittee.setXid(committee.getXid());
         bidCommittee.setStatus(0L);
+        BidTender bidTender = bidTenderService.selectBidTenderBySid(committee.getSid());
+        Long ownerDept = bidTender.getOwnerDept();
+        SysUser leader = remoteUserService.getLeader(ownerDept, SecurityConstants.INNER);
+        Long userId = leader.getUserId();
+        BsExpert expertByUserId = remoteExpertService.getExpertByUserId(userId, SecurityConstants.INNER);
+        bidCommittee.setBsExpert(expertByUserId);
+        bidCommittee.setJid(expertByUserId.getJid());
+        bidCommittee.setUserId(userId);
+
+        if(bidCommitteeService.selectBidCommitteeList(bidCommittee).size() == 0){
+            bidCommitteeService.insertBidCommittee(bidCommittee);
+        }
         for (BsExpert bsExpert : committee.getExpertList()){
             bidCommittee.setBsExpert(bsExpert);
             bidCommittee.setJid(bsExpert.getJid());
@@ -168,6 +193,12 @@ public class BidCommitteeController extends BaseController
         LoginUser loginUser = SecurityUtils.getLoginUser();
         System.out.println(loginUser.getSysUser().toString());
         List<BidTender> list = bidCommitteeService.getProjectByUserId(loginUser.getSysUser().getUserId());
+
+        for(BidTender bidTender : list){
+            Long ownerDept = bidTender.getOwnerDept();
+            SysDept info = remoteUserService.getInfoById(ownerDept,SecurityConstants.INNER);
+            bidTender.setsUnit(info.getDeptName());
+        }
         return getDataTable(list);
     }
 

+ 105 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidIdeaController.java

@@ -0,0 +1,105 @@
+package com.hh.bidding.controller;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.hh.bidding.domain.BidIdea;
+import com.hh.bidding.service.IBidIdeaService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 专家意见Controller
+ *
+ * @author ruoyi
+ * @date 2024-09-12
+ */
+@RestController
+@RequestMapping("/idea")
+public class BidIdeaController extends BaseController
+{
+    @Autowired
+    private IBidIdeaService bidIdeaService;
+
+    /**
+     * 查询专家意见列表
+     */
+    @RequiresPermissions("bidding:idea:list")
+    @GetMapping("/list")
+    public TableDataInfo list(BidIdea bidIdea)
+    {
+        startPage();
+        List<BidIdea> list = bidIdeaService.selectBidIdeaList(bidIdea);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出专家意见列表
+     */
+    @RequiresPermissions("bidding:idea:export")
+    @Log(title = "专家意见", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BidIdea bidIdea)
+    {
+        List<BidIdea> list = bidIdeaService.selectBidIdeaList(bidIdea);
+        ExcelUtil<BidIdea> util = new ExcelUtil<BidIdea>(BidIdea.class);
+        util.exportExcel(response, list, "专家意见数据");
+    }
+
+    /**
+     * 获取专家意见详细信息
+     */
+    @RequiresPermissions("bidding:idea:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bidIdeaService.selectBidIdeaById(id));
+    }
+
+    /**
+     * 新增专家意见
+     */
+    @RequiresPermissions("bidding:idea:add")
+    @Log(title = "专家意见", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BidIdea bidIdea)
+    {
+        return toAjax(bidIdeaService.insertBidIdea(bidIdea));
+    }
+
+    /**
+     * 修改专家意见
+     */
+    @RequiresPermissions("bidding:idea:edit")
+    @Log(title = "专家意见", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BidIdea bidIdea)
+    {
+        return toAjax(bidIdeaService.updateBidIdea(bidIdea));
+    }
+
+    /**
+     * 删除专家意见
+     */
+    @RequiresPermissions("bidding:idea:remove")
+    @Log(title = "专家意见", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(bidIdeaService.deleteBidIdeaByIds(ids));
+    }
+}

+ 1 - 1
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidIvrController.java

@@ -189,7 +189,7 @@ public class BidIvrController extends BaseController
             } else if ("2".equals(voiceReport.getDtmf())) {
                 bidCommittee.setStatus(2L);
             } else {
-                bidCommittee.setStatus(0L);
+                bidCommittee.setStatus(2L);
             }
             bidCommitteeService.updateBidCommittee(bidCommittee);
         }

+ 32 - 30
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidNoticeController.java

@@ -198,36 +198,38 @@ public class BidNoticeController extends BaseController {
         }
 
         /**添加标段银行接口*/
-        BidTender bt = bidTenderService.selectBidTenderBySid(bidNotice.getSid());
-        if (bt == null) return error("招标项目不可用!");
-        PpmProcurementPlan ppp = remotePlanService.getPlan(bt.getXyId(), SecurityConstants.INNER);
-
-        BankTenderpub btp = new BankTenderpub();
-
-        btp.setPpid(bt.getSid());
-        btp.setPrjno(bt.getsCode());
-        btp.setSgtno("BD" + DateUtils.dateTimeNow());
-        btp.setSgtnm(bt.getsName());
-
-        btp.setMrgnamt(BigDecimal.valueOf(ppp.getEarnestMoney()));
-
-        btp.setStrtsgtdt(DateUtils.parseDateToStr("yyyyMMdd", bidNotice.getuGetTime()));    //发标日期
-
-        /** 保证金截至时间为开标时间前一小时 **/
-        Calendar c = Calendar.getInstance();
-        c.setTime(bidNotice.getuKaiTime());
-        c.add(Calendar.HOUR_OF_DAY, -1);
-        btp.setMrgnduestopdt(DateUtils.parseDateToStr("yyyyMMdd", c.getTime()));   //保证金缴纳截至日期
-        btp.setMrgnduestoptm(DateUtils.parseDateToStr("HHmmss", c.getTime()));     //保证金缴纳截至时间
-        btp.setOpntdrdt(DateUtils.parseDateToStr("yyyyMMdd", bidNotice.getuKaiTime()));        //开标日期
-        btp.setOpntdrtm(DateUtils.parseDateToStr("HHmmss", bidNotice.getuKaiTime()));          //开标时间
-
-        R<String> s = remoteTenderpubService.addInnerAuth(btp, SecurityConstants.INNER);
-
-        if (s.getMsg().contains("成功"))
-            return toAjax(bidNoticeService.insertBidNotice(bidNotice));
-        else
-            return error(s.getMsg());
+//        BidTender bt = bidTenderService.selectBidTenderBySid(bidNotice.getSid());
+//        if (bt == null) return error("招标项目不可用!");
+//        PpmProcurementPlan ppp = remotePlanService.getPlan(bt.getXyId(), SecurityConstants.INNER);
+//
+//        BankTenderpub btp = new BankTenderpub();
+//
+//        btp.setPpid(bt.getSid());
+//        btp.setPrjno(bt.getsCode());
+//        btp.setSgtno("BD" + DateUtils.dateTimeNow());
+//        btp.setSgtnm(bt.getsName());
+//
+//        btp.setMrgnamt(BigDecimal.valueOf(ppp.getEarnestMoney()));
+//
+//        btp.setStrtsgtdt(DateUtils.parseDateToStr("yyyyMMdd", bidNotice.getuGetTime()));    //发标日期
+//
+//        /** 保证金截至时间为开标时间前一小时 **/
+//        Calendar c = Calendar.getInstance();
+//        c.setTime(bidNotice.getuKaiTime());
+//        c.add(Calendar.HOUR_OF_DAY, -1);
+//        btp.setMrgnduestopdt(DateUtils.parseDateToStr("yyyyMMdd", c.getTime()));   //保证金缴纳截至日期
+//        btp.setMrgnduestoptm(DateUtils.parseDateToStr("HHmmss", c.getTime()));     //保证金缴纳截至时间
+//        btp.setOpntdrdt(DateUtils.parseDateToStr("yyyyMMdd", bidNotice.getuKaiTime()));        //开标日期
+//        btp.setOpntdrtm(DateUtils.parseDateToStr("HHmmss", bidNotice.getuKaiTime()));          //开标时间
+//
+//        R<String> s = remoteTenderpubService.addInnerAuth(btp, SecurityConstants.INNER);
+//
+//        if (s.getMsg().contains("成功"))
+//            return toAjax(bidNoticeService.insertBidNotice(bidNotice));
+//        else
+//            return error(s.getMsg());
+
+        return toAjax(bidNoticeService.insertBidNotice(bidNotice));
 
     }
 

+ 59 - 5
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidTenderController.java

@@ -87,6 +87,12 @@ public class BidTenderController extends BaseController {
     @Autowired
     private TokenService tokenService;
 
+    @Autowired
+    private IScoreSummaryService scoreSummaryService;
+
+    @Autowired
+    private IBidInfoService bidInfoService;
+
 
     public String getOwnerdepts() {
         List<Long> ids = remoteUserService.getDeptIds(SecurityUtils.getLoginUser().getUserid(), 1, "CHILDREN_COMPANY", SecurityConstants.INNER);
@@ -366,6 +372,30 @@ public class BidTenderController extends BaseController {
         return toAjax(bidTenderService.updateTenderStatus(7L,sid));
     }
 
+    // 询比的手动开标
+    @PutMapping("/openTenderTwo")
+    public AjaxResult openTenderTwo(@RequestBody ScoreSummary scoreSummary){
+        List<ScoreSummary> scoreSummaries = scoreSummaryService.selectScoreSummaryList(scoreSummary);
+        Long hid = scoreSummaries.get(0).getHid();
+        BidTender bidTender = bidTenderService.selectBidTenderBySid(scoreSummary.getSid());
+        BidQuote bidQuote = new BidQuote();
+        bidQuote.setSid(scoreSummary.getSid());
+        bidQuote.setHid(hid);
+        bidQuote.setAudit(1L);
+        List<BidQuote> bidQuotes = bidQuoteService.selectQuoteInfo(bidQuote);
+        BidQuote bidQuote1 = bidQuotes.get(0);
+        BidWinner bidWinner = new BidWinner();
+        bidWinner.setHid(hid);
+        bidWinner.setSid(scoreSummary.getSid());
+        bidWinner.setsName(bidTender.getsName());
+        bidWinner.setStatus(0L);
+        bidWinner.setFinalPrice(bidQuote1.getQuotePrice());
+        bidWinner.sethName(bidQuote1.gethName());
+        bidWinner.setsCode(bidTender.getsCode());
+        bidWinnerService.insertBidWinner(bidWinner);
+        return toAjax(bidTenderService.updateTenderStatus(7L, scoreSummary.getSid()));
+    }
+
     /**
      *  查询已发布的招标项目和招标公告
      *
@@ -733,8 +763,11 @@ public class BidTenderController extends BaseController {
     @Transactional(rollbackFor = Exception.class)
     @PutMapping("/updateTenderByCState")
     public AjaxResult updateTenderByCState(@RequestBody BidTender bidTender){
+        System.out.println("DDDDDDDDDDDDDD");
+        System.out.println(bidTender.getcState());
         BidTender res = bidTenderService.selectBidTenderBySid(bidTender.getSid());
-        if(res.getsState().equals(bidTender.getsState())){
+        if(res.getcState().equals(bidTender.getcState())){
+            System.out.println("AAAAAAAAAAAAAAAA");
             return toAjax(bidTenderService.updateBidTender(bidTender));
         }
 
@@ -746,11 +779,13 @@ public class BidTenderController extends BaseController {
         bidApprovalRecord.setNode("采购人申请");
         bidApprovalRecord.setOpinion("中标变更");
         bidApprovalRecordService.insertBidApprovalRecord(bidApprovalRecord);
-        return toAjax(bidTenderService.updateBidTender(bidTender));
+        System.out.println(bidTender);
+        System.out.println(bidTender.getcState());
+        return toAjax(bidTenderService.updateTenderByCState(bidTender));
     }
 
     // 中标变更服务费计算
-    @GetMapping("getServicePrice")
+    @GetMapping("/getServicePrice")
     public AjaxResult getServicePrice(@RequestParam("sid") Long sid,@RequestParam("hid") Long hid){
         BidTender bidTender = bidTenderService.selectBidTenderBySid(sid);
         PpmProcurementPlan plan = remotePlanService.getPlan(bidTender.getXyId(), SecurityConstants.INNER);
@@ -997,10 +1032,30 @@ public class BidTenderController extends BaseController {
                 }
             }
         }
-        return success(servicePrice);
+        Map<String,BigDecimal> resMap = new HashMap<>();
+        //TODO
+        resMap.put("servicePrice",servicePrice);
+        resMap.put("finalPrice",finalPrice);
+        return success(resMap);
 
     }
 
+    // 查询项目可变更供应商
+    @GetMapping("/getChangeSupplier")
+    public AjaxResult getChangeSupplier(@RequestParam("sid") Long sid){
+        BidQuote bidQuote = new BidQuote();
+        bidQuote.setSid(sid);
+        List<BidQuote> bidQuotes = bidQuoteService.selectBidQuoteList(bidQuote);
+        List<BsSupplier> list = new ArrayList<>();
+        for(BidQuote item : bidQuotes){
+            Long hid = item.getHid();
+            BsSupplier bsSupplier = bidTenderService.selectSupplierByHid(hid);
+            list.add(bsSupplier);
+        }
+        return success(list);
+    }
+
+
     /**
      * 获取招标项目详细信息
      */
@@ -1035,5 +1090,4 @@ public class BidTenderController extends BaseController {
         return toAjax(bidTenderService.deleteBidTenderBySids(sids));
     }
 
-
 }

+ 255 - 11
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/ExpertMarkController.java

@@ -11,10 +11,13 @@ import com.ruoyi.system.api.domain.BsExpert;
 import com.ruoyi.system.api.domain.SysUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.swing.event.AncestorEvent;
-import java.util.List;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
 
 /**
  * @author GMCS
@@ -51,6 +54,12 @@ public class ExpertMarkController extends BaseController{
     @Autowired
     private IBidCommitteeService bidCommitteeService;
 
+    @Autowired
+    private IBidQuoteService bidQuoteService;
+
+    @Autowired
+    private IScoreSummaryService scoreSummaryService;
+
     // 查询全部评分细则
     @GetMapping("/getMarkDetail")
     public AjaxResult getMarkDetail(@RequestParam("sid") Long sid){
@@ -183,9 +192,19 @@ public class ExpertMarkController extends BaseController{
 
     // 获取打分情况
     @GetMapping("/getMark")
-    public AjaxResult getMark(Long sid){
+    public AjaxResult getMark(@RequestParam("sid") Long sid,@RequestParam("hid") Long hid){
         Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
 
+        Integer isLeader = 0;
+
+        BidCommittee bidCommittee = new BidCommittee();
+        bidCommittee.setSid(sid);
+        bidCommittee.setUserId(userId);
+        List<BidCommittee> bidCommittees = bidCommitteeService.selectBidCommitteeList(bidCommittee);
+        if(!CollectionUtils.isEmpty(bidCommittees)){
+            isLeader = bidCommittees.get(0).getIsLeader();
+        }
+
         BsExpert bsExpert = bidInfoService.getExpertByUserId(userId);
         Long jid = bsExpert.getJid();
         String jName = bsExpert.getjName();
@@ -202,14 +221,17 @@ public class ExpertMarkController extends BaseController{
         bidExamine.setSid(sid);
         bidExpertExamine.setJid(jid);
         bidExpertExamine.setSid(sid);
+        bidExpertExamine.setHid(hid);
 
         bidTech.setSid(sid);
         bidExpertTech.setJid(jid);
         bidExpertTech.setSid(sid);
+        bidExpertTech.setHid(hid);
 
         bidRespond.setSid(sid);
         bidExpertRespond.setJid(jid);
-        bidExpertTech.setSid(sid);
+        bidExpertRespond.setSid(sid);
+        bidExpertRespond.setHid(hid);
         
         BidInfo info = bidInfoService.getInfoBySid(sid);
         List<BidExamine> bidExamines = bidExamineService.selectBidExamineList(bidExamine);
@@ -221,25 +243,67 @@ public class ExpertMarkController extends BaseController{
 
         Mark mark = new Mark();
         mark.setSid(sid);
-        mark.setsName(info.getsName());
+        mark.setsName(info==null?"":info.getsName());
         mark.setJid(jid);
-        mark.setuKaiTime(info.getuKaiTime());
-        mark.setuKaiPosition(info.getuKaiPosition());
+        mark.setuKaiTime(info==null?"":info.getuKaiTime());
+        mark.setuKaiPosition(info==null?"":info.getuKaiPosition());
         mark.setjName(jName);
-        mark.setBidExpertExamines(examineDetails);
+        if(isLeader == 1){
+            mark.setBidExpertExamines(examineDetails);
+            mark.setBidExpertResponds(respondDetails);
+        }
+
         mark.setBidExpertTeches(techDetails);
-        mark.setBidExpertResponds(respondDetails);
         mark.setExamineList(bidExamines);
         mark.setBidRespondList(bidResponds);
         mark.setBidTechList(bidTeches);
-
-        return success( );
+        mark.setIsLeader(Long.valueOf(isLeader));
+        return success(mark);
     }
 
     // 获取整体打分情况
     @GetMapping("/getMarkAll")
     public AjaxResult getMarkAll(Long sid){
-        return success();
+
+        BidInfo bidInfo = new BidInfo();
+        bidInfo.setSid(sid);
+        BidInfo info = bidInfoService.getInfoBySid(sid);
+
+        BidCommittee bidCommittee = new BidCommittee();
+        bidCommittee.setSid(sid);
+
+        BidExamine bidExamine = new BidExamine();
+        BidRespond bidRespond = new BidRespond();
+        BidTech bidTech = new BidTech();
+        BidExpertExamine bidExpertExamine = new BidExpertExamine();
+        BidExpertRespond bidExpertRespond = new BidExpertRespond();
+        BidExpertTech bidExpertTech = new BidExpertTech();
+
+        Mark mark = new Mark();
+        bidExamine.setSid(sid);
+        bidTech.setSid(sid);
+        bidRespond.setSid(sid);
+        bidExpertExamine.setSid(sid);
+        bidExpertRespond.setSid(sid);
+        bidExpertTech.setSid(sid);
+
+        List<BidExamine> bidExamines = bidExamineService.selectBidExamineList(bidExamine);
+        List<BidRespond> bidResponds = bidRespondService.selectBidRespondList(bidRespond);
+        List<BidTech> bidTeches = bidTechService.selectBidTechList(bidTech);
+        List<BidExpertExamine> examineDetails = bidExpertExamineService.selectBidExpertExamineList(bidExpertExamine);
+        List<BidExpertRespond> respondDetails = bidExpertRespondService.selectBidExpertRespondList(bidExpertRespond);
+        List<BidExpertTech> techDetails = bidExpertTechService.selectBidExpertTechList(bidExpertTech);
+        mark.setSid(sid);
+        mark.setsName(info.getsName());
+        mark.setuKaiTime(info.getuKaiTime());
+        mark.setuKaiPosition(info.getuKaiPosition());
+        mark.setBidExpertExamines(examineDetails);
+        mark.setBidExpertResponds(respondDetails);
+        mark.setBidExpertTeches(techDetails);
+        mark.setExamineList(bidExamines);
+        mark.setBidRespondList(bidResponds);
+        mark.setBidTechList(bidTeches);
+        return success(mark);
     }
 
     // 专家打分
@@ -289,4 +353,184 @@ public class ExpertMarkController extends BaseController{
         }
         return success("打分完成");
     }
+
+    // 投标报价得分计算
+    @GetMapping("/getQuoteScore")
+    public AjaxResult getQuoteScore(@RequestParam("sid") Long sid){
+        BidQuote bidQuote = new BidQuote();
+        bidQuote.setSid(sid);
+        bidQuote.setAudit(1L);
+        List<BidQuote> bidQuotes = bidQuoteService.selectBidQuoteList(bidQuote);
+        List<QuoteScore> scores = new ArrayList<>();
+
+        if(bidQuotes.size() == 0){
+            return success("没有报价信息");
+        }
+
+        BigDecimal fullScore = new BigDecimal("7.00");
+
+        BigDecimal middle = new BigDecimal(0);
+        if(bidQuotes.size() >= 5){
+            for (int i = 0; i < bidQuotes.size() ; i++) {
+                if(i != 0 && i != bidQuotes.size() - 1){
+                    middle = middle.add(bidQuotes.get(i).getQuotePrice());
+                }
+            }
+            middle = middle.divide(new BigDecimal(bidQuotes.size() - 2),2, RoundingMode.HALF_UP);
+        } else {
+            for (int i = 0; i < bidQuotes.size(); i++) {
+                middle = middle.add(bidQuotes.get(i).getQuotePrice());
+            }
+            middle = middle.divide(new BigDecimal(bidQuotes.size()),2, RoundingMode.HALF_UP);
+        }
+        BigDecimal standard = middle.multiply(new BigDecimal("0.01"));
+        for(BidQuote item :bidQuotes){
+            String hName = bidInfoService.getSupplierByhid(item.getHid());
+            QuoteScore score = new QuoteScore();
+            score.setSid(sid);
+            score.setHid(item.getHid());
+            score.sethName(hName);
+            score.setLevel(middle);
+            score.setQuotePrice(item.getQuotePrice());
+            BigDecimal percent = item.getQuotePrice().subtract(middle).divide(middle,4,RoundingMode.HALF_UP).multiply(new BigDecimal("100"));
+            score.setPercent(percent);
+            BigDecimal relScore = new BigDecimal(0);
+
+            if(item.getQuotePrice().compareTo(middle) > 0){
+                BigDecimal divide = item.getQuotePrice().subtract(middle).divide(standard,2,RoundingMode.HALF_UP);
+                divide = divide.setScale(0,RoundingMode.DOWN);
+                if(divide.compareTo(new BigDecimal(0)) == 0){
+                    relScore = fullScore.subtract(item.getQuotePrice().subtract(middle).divide(standard,2,RoundingMode.HALF_UP).multiply(new BigDecimal("0.6")));
+                } else {
+                    relScore = fullScore.subtract(divide.multiply(new BigDecimal("0.6")));
+                }
+
+            } else if(item.getQuotePrice().compareTo(middle) < 0){
+                BigDecimal divide = middle.subtract(item.getQuotePrice()).divide(standard,2,RoundingMode.HALF_UP);
+                divide = divide.setScale(0,RoundingMode.DOWN);
+                if(divide.compareTo(new BigDecimal(0)) == 0){
+                    relScore = fullScore.subtract(middle.subtract(item.getQuotePrice()).divide(standard,2,RoundingMode.HALF_UP).multiply(new BigDecimal("0.6")));
+                } else{
+                    relScore = fullScore.subtract(divide.multiply(new BigDecimal("0.5")));
+                }
+            } else{
+                relScore = fullScore;
+            }
+            score.setScore(relScore);
+            scores.add(score);
+        }
+        return success(scores);
+    }
+
+    // 评委评分汇总
+    @GetMapping("/getTotal")
+    public AjaxResult getTotal(@RequestParam("sid") Long sid){
+        List<TotalScore> list = new ArrayList<>();
+
+        BidQuote bidQuote = new BidQuote();
+        bidQuote.setSid(sid);
+        bidQuote.setAudit(1L);
+        List<BidQuote> bidQuotes = bidQuoteService.selectBidQuoteList(bidQuote);
+
+        if(bidQuotes.size() == 0){
+            return success("没有报价信息");
+        }
+
+        BigDecimal fullScore = new BigDecimal("7.00");
+
+        BigDecimal middle = new BigDecimal(0);
+        if(bidQuotes.size() >= 5){
+            for (int i = 0; i < bidQuotes.size() ; i++) {
+                if(i != 0 && i != bidQuotes.size() - 1){
+                    middle = middle.add(bidQuotes.get(i).getQuotePrice());
+                }
+            }
+            middle = middle.divide(new BigDecimal(bidQuotes.size() - 2),2, RoundingMode.HALF_UP);
+        } else {
+            for (int i = 0; i < bidQuotes.size(); i++) {
+                middle = middle.add(bidQuotes.get(i).getQuotePrice());
+            }
+            middle = middle.divide(new BigDecimal(bidQuotes.size()),2, RoundingMode.HALF_UP);
+        }
+        BigDecimal standard = middle.multiply(new BigDecimal("0.01"));
+
+        for(BidQuote item : bidQuotes){
+            TotalScore totalScore = new TotalScore();
+            totalScore.setSid(sid);
+            String hName = bidInfoService.getSupplierByhid(item.getHid());
+            totalScore.setHid(item.getHid());
+            totalScore.sethName(hName);
+
+            BigDecimal priceScore = new BigDecimal(0);
+
+            if(item.getQuotePrice().compareTo(middle) > 0){
+                BigDecimal divide = item.getQuotePrice().subtract(middle).divide(standard,2,RoundingMode.HALF_UP);
+                divide = divide.setScale(0,RoundingMode.DOWN);
+                if(divide.compareTo(new BigDecimal(0)) == 0){
+                    priceScore = fullScore.subtract(item.getQuotePrice().subtract(middle).divide(standard,2,RoundingMode.HALF_UP).multiply(new BigDecimal("0.6")));
+                } else {
+                    priceScore = fullScore.subtract(divide.multiply(new BigDecimal("0.6")));
+                }
+
+            } else if(item.getQuotePrice().compareTo(middle) < 0){
+                BigDecimal divide = middle.subtract(item.getQuotePrice()).divide(standard,2,RoundingMode.HALF_UP);
+                divide = divide.setScale(0,RoundingMode.DOWN);
+                if(divide.compareTo(new BigDecimal(0)) == 0){
+                    priceScore = fullScore.subtract(middle.subtract(item.getQuotePrice()).divide(standard,2,RoundingMode.HALF_UP).multiply(new BigDecimal("0.6")));
+                } else{
+                    priceScore = fullScore.subtract(divide.multiply(new BigDecimal("0.5")));
+                }
+            } else{
+                priceScore = fullScore;
+            }
+
+            totalScore.setPriceScore(priceScore);
+            List<TechScore> techScores = bidInfoService.getTechScore(sid);
+            List<TechScore> techScores1 = new ArrayList<>();
+
+            int size = 0;
+            Double total = 0.0;
+            for (TechScore techScore : techScores){
+                if(techScore.getHid().equals(item.getHid())){
+                    size++;
+                    total += techScore.getScore();
+                    techScores1.add(techScore);
+                }
+            }
+            totalScore.setTechList(techScores1);
+            BigDecimal averageScore = new BigDecimal(total.toString()).divide(new BigDecimal(String.valueOf(size)),2,RoundingMode.HALF_UP);
+            totalScore.setAverScore(averageScore);
+            totalScore.setTotalScore(averageScore.add(priceScore));
+            totalScore.setSize(size);
+            list.add(totalScore);
+        }
+
+        Collections.sort(list);
+//
+//        scoreSummaryService.deleteScoreSummaryBySid(sid);
+//        for (int i = 0; i < list.size(); i++){
+//            list.get(i).setSize(i+1);
+//
+//            ScoreSummary scoreSummary = new ScoreSummary();
+//            scoreSummary.setSid(sid);
+//            scoreSummary.setHid(list.get(i).getHid());
+//            scoreSummary.sethName(list.get(i).gethName());
+//            List<TechScore> techList = list.get(i).getTechList();
+//            String scoreInfo = "";
+//            for(TechScore item : techList){
+//                scoreInfo+=item.getjName()+","+item.getScore().toString()+";";
+//            }
+//            scoreSummary.setScoreInfo(scoreInfo);
+//            scoreSummary.setPriceScore(list.get(i).getPriceScore());
+//            scoreSummary.setAverScore(list.get(i).getAverScore());
+//            scoreSummary.setTotalScore(list.get(i).getTotalScore());
+//            scoreSummary.setSort(Long.valueOf(i+1));
+//            scoreSummaryService.insertScoreSummary(scoreSummary);
+//        }
+
+        return success(list);
+
+    }
+
+
 }

+ 103 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/ScoreSummaryController.java

@@ -0,0 +1,103 @@
+package com.hh.bidding.controller;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.hh.bidding.domain.ScoreSummary;
+import com.hh.bidding.service.IScoreSummaryService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * 评分汇总记录Controller
+ *
+ * @author ruoyi
+ * @date 2024-09-09
+ */
+@RestController
+@RequestMapping("/summary")
+public class ScoreSummaryController extends BaseController
+{
+    @Autowired
+    private IScoreSummaryService scoreSummaryService;
+
+    /**
+     * 查询评分汇总记录列表
+     */
+    @GetMapping("/list")
+    public AjaxResult list(ScoreSummary scoreSummary)
+    {
+        List<ScoreSummary> list = scoreSummaryService.selectScoreSummaryList(scoreSummary);
+        return success(list);
+    }
+
+    /**
+     * 导出评分汇总记录列表
+     */
+    @RequiresPermissions("bidding:summary:export")
+    @Log(title = "评分汇总记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ScoreSummary scoreSummary)
+    {
+        List<ScoreSummary> list = scoreSummaryService.selectScoreSummaryList(scoreSummary);
+        ExcelUtil<ScoreSummary> util = new ExcelUtil<ScoreSummary>(ScoreSummary.class);
+        util.exportExcel(response, list, "评分汇总记录数据");
+    }
+
+    /**
+     * 获取评分汇总记录详细信息
+     */
+    @RequiresPermissions("bidding:summary:query")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(scoreSummaryService.selectScoreSummaryById(id));
+    }
+
+    /**
+     * 新增评分汇总记录
+     */
+    @RequiresPermissions("bidding:summary:add")
+    @Log(title = "评分汇总记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ScoreSummary scoreSummary)
+    {
+        return toAjax(scoreSummaryService.insertScoreSummary(scoreSummary));
+    }
+
+    /**
+     * 修改评分汇总记录
+     */
+    @RequiresPermissions("bidding:summary:edit")
+    @Log(title = "评分汇总记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ScoreSummary scoreSummary)
+    {
+        return toAjax(scoreSummaryService.updateScoreSummary(scoreSummary));
+    }
+
+    /**
+     * 删除评分汇总记录
+     */
+    @RequiresPermissions("bidding:summary:remove")
+    @Log(title = "评分汇总记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(scoreSummaryService.deleteScoreSummaryByIds(ids));
+    }
+}

+ 67 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidIdea.java

@@ -0,0 +1,67 @@
+package com.hh.bidding.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 专家意见对象 bid_idea
+ *
+ * @author ruoyi
+ * @date 2024-09-12
+ */
+public class BidIdea extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sid;
+
+    /** 专家意见 */
+    @Excel(name = "专家意见")
+    private String idea;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setSid(Long sid)
+    {
+        this.sid = sid;
+    }
+
+    public Long getSid()
+    {
+        return sid;
+    }
+    public void setIdea(String idea)
+    {
+        this.idea = idea;
+    }
+
+    public String getIdea()
+    {
+        return idea;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("sid", getSid())
+                .append("idea", getIdea())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 55 - 31
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidTender.java

@@ -552,37 +552,6 @@ public class BidTender extends BaseEntity {
         this.stopFile = stopFile;
     }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("sid", getSid())
-                .append("xyId", getXyId())
-                .append("sCode", getsCode())
-                .append("sName", getsName())
-                .append("sLeader", getsLeader())
-                .append("sWay", getsWay())
-                .append("sMust", getsMust())
-                .append("sSway", getsSway())
-                .append("sType", getsType())
-                .append("sBudget", getsBudget())
-                .append("sUnit", getsUnit())
-                .append("sPerson", getsPerson())
-                .append("sPhone", getsPhone())
-                .append("email", getEmail())
-                .append("sAddress", getsAddress())
-                .append("createBy", getCreateBy())
-                .append("createTime", getCreateTime())
-                .append("updateBy", getUpdateBy())
-                .append("updateTime", getUpdateTime())
-                .append("sStartTime", getsStartTime())
-                .append("sEndTime", getsEndTime())
-                .append("sProjectState", getsProjectState())
-                .append("sDeadline", getsDeadline())
-                .append("eid", getEid())
-                .append("fjFiles", getFjFiles())
-                .toString();
-    }
-
     public String getFjFiles() {
         return fjFiles;
     }
@@ -659,4 +628,59 @@ public class BidTender extends BaseEntity {
     public void setChangeFile(String changeFile) {
         this.changeFile = changeFile;
     }
+
+    @Override
+    public String toString() {
+        return "BidTender{" +
+                "sid=" + sid +
+                ", xyId=" + xyId +
+                ", sCode='" + sCode + '\'' +
+                ", sName='" + sName + '\'' +
+                ", sWay=" + sWay +
+                ", sLeader='" + sLeader + '\'' +
+                ", sMust=" + sMust +
+                ", sSway=" + sSway +
+                ", sType=" + sType +
+                ", sBudget=" + sBudget +
+                ", sUnit='" + sUnit + '\'' +
+                ", sPerson='" + sPerson + '\'' +
+                ", sPhone='" + sPhone + '\'' +
+                ", email='" + email + '\'' +
+                ", sAddress='" + sAddress + '\'' +
+                ", sStartTime=" + sStartTime +
+                ", sEndTime=" + sEndTime +
+                ", sProjectState=" + sProjectState +
+                ", sDeadline=" + sDeadline +
+                ", createTime=" + createTime +
+                ", rangeStartTime=" + rangeStartTime +
+                ", rangeEndTime=" + rangeEndTime +
+                ", eid=" + eid +
+                ", fjFiles='" + fjFiles + '\'' +
+                ", step='" + step + '\'' +
+                ", bidNotices=" + bidNotices +
+                ", uGetTime=" + uGetTime +
+                ", ownerDept=" + ownerDept +
+                ", ownerDepts='" + ownerDepts + '\'' +
+                ", allowTenderAmount=" + allowTenderAmount +
+                ", uKaiTime=" + uKaiTime +
+                ", sSign='" + sSign + '\'' +
+                ", sCensor='" + sCensor + '\'' +
+                ", sReview='" + sReview + '\'' +
+                ", sSummary='" + sSummary + '\'' +
+                ", isApply=" + isApply +
+                ", quoteMode='" + quoteMode + '\'' +
+                ", intervalTime=" + intervalTime +
+                ", buyingMode='" + buyingMode + '\'' +
+                ", signNumber=" + signNumber +
+                ", enrollNumber=" + enrollNumber +
+                ", sState=" + sState +
+                ", stopFile='" + stopFile + '\'' +
+                ", editor=" + editor +
+                ", bidEditor=" + bidEditor +
+                ", projectName='" + projectName + '\'' +
+                ", projectId=" + projectId +
+                ", cState=" + cState +
+                ", changeFile='" + changeFile + '\'' +
+                '}';
+    }
 }

+ 20 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/BidWinningResults.java

@@ -94,6 +94,10 @@ public class BidWinningResults extends BaseEntity
      */
     private String supplierNameChange;
 
+    private BigDecimal supplierChangeService;
+
+    private BigDecimal supplierChangePrice;
+
     /**
      * 审批意见详情,存入审批记录
      */
@@ -338,4 +342,20 @@ public class BidWinningResults extends BaseEntity
     public void setEditor(PpmApprovalRecord editor) {
         this.editor = editor;
     }
+
+    public BigDecimal getSupplierChangeService() {
+        return supplierChangeService;
+    }
+
+    public void setSupplierChangeService(BigDecimal supplierChangeService) {
+        this.supplierChangeService = supplierChangeService;
+    }
+
+    public BigDecimal getSupplierChangePrice() {
+        return supplierChangePrice;
+    }
+
+    public void setSupplierChangePrice(BigDecimal supplierChangePrice) {
+        this.supplierChangePrice = supplierChangePrice;
+    }
 }

+ 3 - 3
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/QuoteScore.java

@@ -23,7 +23,7 @@ public class QuoteScore {
 
     private BigDecimal percent;
 
-    private Double score;
+    private BigDecimal score;
 
     public Long getHid() {
         return hid;
@@ -73,11 +73,11 @@ public class QuoteScore {
         this.percent = percent;
     }
 
-    public Double getScore() {
+    public BigDecimal getScore() {
         return score;
     }
 
-    public void setScore(Double score) {
+    public void setScore(BigDecimal score) {
         this.score = score;
     }
 }

+ 169 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/ScoreSummary.java

@@ -0,0 +1,169 @@
+package com.hh.bidding.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+import java.math.BigDecimal;
+
+/**
+ * 评分汇总记录对象 score_summary
+ *
+ * @author ruoyi
+ * @date 2024-09-09
+ */
+public class ScoreSummary extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sid;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long hid;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String hName;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String scoreInfo;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private BigDecimal priceScore;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private BigDecimal averScore;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private BigDecimal totalScore;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sort;
+
+    private String ywName;
+
+    private String ywPhone;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setSid(Long sid)
+    {
+        this.sid = sid;
+    }
+
+    public Long getSid()
+    {
+        return sid;
+    }
+    public void setHid(Long hid)
+    {
+        this.hid = hid;
+    }
+
+    public Long getHid()
+    {
+        return hid;
+    }
+    public void sethName(String hName)
+    {
+        this.hName = hName;
+    }
+
+    public String gethName()
+    {
+        return hName;
+    }
+    public void setScoreInfo(String scoreInfo)
+    {
+        this.scoreInfo = scoreInfo;
+    }
+
+    public String getScoreInfo()
+    {
+        return scoreInfo;
+    }
+
+    public BigDecimal getPriceScore() {
+        return priceScore;
+    }
+
+    public void setPriceScore(BigDecimal priceScore) {
+        this.priceScore = priceScore;
+    }
+
+    public BigDecimal getAverScore() {
+        return averScore;
+    }
+
+    public void setAverScore(BigDecimal averScore) {
+        this.averScore = averScore;
+    }
+
+    public BigDecimal getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(BigDecimal totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    public void setSort(Long sort)
+    {
+        this.sort = sort;
+    }
+
+    public Long getSort()
+    {
+        return sort;
+    }
+
+    public String getYwName() {
+        return ywName;
+    }
+
+    public void setYwName(String ywName) {
+        this.ywName = ywName;
+    }
+
+    public String getYwPhone() {
+        return ywPhone;
+    }
+
+    public void setYwPhone(String ywPhone) {
+        this.ywPhone = ywPhone;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("sid", getSid())
+                .append("hid", getHid())
+                .append("hName", gethName())
+                .append("scoreInfo", getScoreInfo())
+                .append("priceScore", getPriceScore())
+                .append("averScore", getAverScore())
+                .append("totalScore", getTotalScore())
+                .append("sort", getSort())
+                .toString();
+    }
+}

+ 61 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/TechScore.java

@@ -0,0 +1,61 @@
+package com.hh.bidding.domain;
+
+/**
+ * @author GMCS
+ * @version 1.0
+ * @title TechScore
+ * @description 针对项目的专家评分总和
+ * @create 2024/9/9 12:35
+ */
+public class TechScore {
+
+    private Long sid;
+
+    private Long hid;
+
+    private Long jid;
+
+    private String jName;
+
+    private Double score;
+
+    public Long getSid() {
+        return sid;
+    }
+
+    public void setSid(Long sid) {
+        this.sid = sid;
+    }
+
+    public Long getHid() {
+        return hid;
+    }
+
+    public void setHid(Long hid) {
+        this.hid = hid;
+    }
+
+    public Long getJid() {
+        return jid;
+    }
+
+    public void setJid(Long jid) {
+        this.jid = jid;
+    }
+
+    public String getjName() {
+        return jName;
+    }
+
+    public void setjName(String jName) {
+        this.jName = jName;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+}

+ 112 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/TotalScore.java

@@ -0,0 +1,112 @@
+package com.hh.bidding.domain;
+
+import org.jetbrains.annotations.NotNull;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @author GMCS
+ * @version 1.0
+ * @title TotalScore
+ * @description
+ * @create 2024/9/9 10:36
+ */
+public class TotalScore implements Comparable<TotalScore> {
+
+    private Long sid;
+
+    private Long hid;
+
+    private String hName;
+
+    private List<TechScore> techList;
+
+    private BigDecimal priceScore;
+
+    private BigDecimal averScore;
+
+    private BigDecimal totalScore;
+
+    private Integer sort;
+
+    private Integer size;
+
+
+    public Long getSid() {
+        return sid;
+    }
+
+    public void setSid(Long sid) {
+        this.sid = sid;
+    }
+
+    public Long getHid() {
+        return hid;
+    }
+
+    public void setHid(Long hid) {
+        this.hid = hid;
+    }
+
+    public String gethName() {
+        return hName;
+    }
+
+    public void sethName(String hName) {
+        this.hName = hName;
+    }
+
+    public List<TechScore> getTechList() {
+        return techList;
+    }
+
+    public void setTechList(List<TechScore> techList) {
+        this.techList = techList;
+    }
+
+    public BigDecimal getPriceScore() {
+        return priceScore;
+    }
+
+    public void setPriceScore(BigDecimal priceScore) {
+        this.priceScore = priceScore;
+    }
+
+    public BigDecimal getAverScore() {
+        return averScore;
+    }
+
+    public void setAverScore(BigDecimal averScore) {
+        this.averScore = averScore;
+    }
+
+    public BigDecimal getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(BigDecimal totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getSize() {
+        return size;
+    }
+
+    public void setSize(Integer size) {
+        this.size = size;
+    }
+
+    @Override
+    public int compareTo(@NotNull TotalScore o) {
+        return o.totalScore.compareTo(this.totalScore);
+    }
+}

+ 61 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidIdeaMapper.java

@@ -0,0 +1,61 @@
+package com.hh.bidding.mapper;
+
+import java.util.List;
+import com.hh.bidding.domain.BidIdea;
+
+/**
+ * 专家意见Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-12
+ */
+public interface BidIdeaMapper
+{
+    /**
+     * 查询专家意见
+     *
+     * @param id 专家意见主键
+     * @return 专家意见
+     */
+    public BidIdea selectBidIdeaById(Long id);
+
+    /**
+     * 查询专家意见列表
+     *
+     * @param bidIdea 专家意见
+     * @return 专家意见集合
+     */
+    public List<BidIdea> selectBidIdeaList(BidIdea bidIdea);
+
+    /**
+     * 新增专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    public int insertBidIdea(BidIdea bidIdea);
+
+    /**
+     * 修改专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    public int updateBidIdea(BidIdea bidIdea);
+
+    /**
+     * 删除专家意见
+     *
+     * @param id 专家意见主键
+     * @return 结果
+     */
+    public int deleteBidIdeaById(Long id);
+
+    /**
+     * 批量删除专家意见
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBidIdeaByIds(Long[] ids);
+}

+ 17 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidInfoMapper.java

@@ -2,6 +2,7 @@ package com.hh.bidding.mapper;
 
 import java.util.List;
 import com.hh.bidding.domain.BidInfo;
+import com.hh.bidding.domain.TechScore;
 import com.ruoyi.system.api.domain.BsExpert;
 
 /**
@@ -83,4 +84,20 @@ public interface BidInfoMapper
      */
     public BsExpert getExpertByUserId(Long userId);
 
+    /**
+     *  通过hid获取供应商信息
+     *
+     * @param hid
+     * @return
+     */
+    public String getSupplierByhid(Long hid);
+
+    /**
+     *  获取专家评分总和
+     *
+     * @param sid
+     * @return
+     */
+    public List<TechScore> getTechScore(Long sid);
+
 }

+ 4 - 4
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/BidTenderMapper.java

@@ -3,10 +3,7 @@ package com.hh.bidding.mapper;
 import java.util.List;
 import java.util.Map;
 
-import com.hh.bidding.domain.BidNoticeAndSms;
-import com.hh.bidding.domain.BidTender;
-import com.hh.bidding.domain.BidTenderAndNotoce;
-import com.hh.bidding.domain.BsExpertAndSms;
+import com.hh.bidding.domain.*;
 import com.ruoyi.system.api.domain.BsExpert;
 import com.ruoyi.system.api.domain.PpmApprovalRecord;
 import org.apache.ibatis.annotations.Param;
@@ -212,4 +209,7 @@ public interface BidTenderMapper
 
     // 更新中标变更审核状态
     public int updateTenderByCState(BidTender bidTender);
+
+    public BsSupplier selectSupplierByHid(Long sid);
+
 }

+ 64 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/ScoreSummaryMapper.java

@@ -0,0 +1,64 @@
+package com.hh.bidding.mapper;
+
+import java.util.List;
+import com.hh.bidding.domain.ScoreSummary;
+
+/**
+ * 评分汇总记录Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-09
+ */
+public interface ScoreSummaryMapper
+{
+    /**
+     * 查询评分汇总记录
+     *
+     * @param id 评分汇总记录主键
+     * @return 评分汇总记录
+     */
+    public ScoreSummary selectScoreSummaryById(Long id);
+
+    /**
+     * 查询评分汇总记录列表
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 评分汇总记录集合
+     */
+    public List<ScoreSummary> selectScoreSummaryList(ScoreSummary scoreSummary);
+
+    /**
+     * 新增评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    public int insertScoreSummary(ScoreSummary scoreSummary);
+
+    /**
+     * 修改评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    public int updateScoreSummary(ScoreSummary scoreSummary);
+
+    /**
+     * 删除评分汇总记录
+     *
+     * @param id 评分汇总记录主键
+     * @return 结果
+     */
+    public int deleteScoreSummaryById(Long id);
+
+    /**
+     * 批量删除评分汇总记录
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteScoreSummaryByIds(Long[] ids);
+
+    public int deleteScoreSummaryBySid(Long sid);
+
+}

+ 61 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidIdeaService.java

@@ -0,0 +1,61 @@
+package com.hh.bidding.service;
+
+import java.util.List;
+import com.hh.bidding.domain.BidIdea;
+
+/**
+ * 专家意见Service接口
+ *
+ * @author ruoyi
+ * @date 2024-09-12
+ */
+public interface IBidIdeaService
+{
+    /**
+     * 查询专家意见
+     *
+     * @param id 专家意见主键
+     * @return 专家意见
+     */
+    public BidIdea selectBidIdeaById(Long id);
+
+    /**
+     * 查询专家意见列表
+     *
+     * @param bidIdea 专家意见
+     * @return 专家意见集合
+     */
+    public List<BidIdea> selectBidIdeaList(BidIdea bidIdea);
+
+    /**
+     * 新增专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    public int insertBidIdea(BidIdea bidIdea);
+
+    /**
+     * 修改专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    public int updateBidIdea(BidIdea bidIdea);
+
+    /**
+     * 批量删除专家意见
+     *
+     * @param ids 需要删除的专家意见主键集合
+     * @return 结果
+     */
+    public int deleteBidIdeaByIds(Long[] ids);
+
+    /**
+     * 删除专家意见信息
+     *
+     * @param id 专家意见主键
+     * @return 结果
+     */
+    public int deleteBidIdeaById(Long id);
+}

+ 17 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidInfoService.java

@@ -2,6 +2,7 @@ package com.hh.bidding.service;
 
 import java.util.List;
 import com.hh.bidding.domain.BidInfo;
+import com.hh.bidding.domain.TechScore;
 import com.ruoyi.system.api.domain.BsExpert;
 
 /**
@@ -82,4 +83,20 @@ public interface IBidInfoService
      * @return
      */
     public BsExpert getExpertByUserId(Long userId);
+
+    /**
+     *  通过hid获取供应商信息
+     *
+     * @param hid
+     * @return
+     */
+    public String getSupplierByhid(Long hid);
+
+    /**
+     *  获取专家评分总和
+     *
+     * @param sid
+     * @return
+     */
+    public List<TechScore> getTechScore(Long sid);
 }

+ 3 - 4
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IBidTenderService.java

@@ -3,10 +3,7 @@ package com.hh.bidding.service;
 import java.util.List;
 import java.util.Map;
 
-import com.hh.bidding.domain.BidNoticeAndSms;
-import com.hh.bidding.domain.BidTender;
-import com.hh.bidding.domain.BidTenderAndNotoce;
-import com.hh.bidding.domain.BsExpertAndSms;
+import com.hh.bidding.domain.*;
 import com.ruoyi.system.api.domain.BsExpert;
 import com.ruoyi.system.api.domain.PpmApprovalRecord;
 
@@ -210,4 +207,6 @@ public interface IBidTenderService
 
     // 更新中标变更审核状态
     public int updateTenderByCState(BidTender bidTender);
+
+    public BsSupplier selectSupplierByHid(Long sid);
 }

+ 63 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IScoreSummaryService.java

@@ -0,0 +1,63 @@
+package com.hh.bidding.service;
+
+import java.util.List;
+import com.hh.bidding.domain.ScoreSummary;
+
+/**
+ * 评分汇总记录Service接口
+ *
+ * @author ruoyi
+ * @date 2024-09-09
+ */
+public interface IScoreSummaryService
+{
+    /**
+     * 查询评分汇总记录
+     *
+     * @param id 评分汇总记录主键
+     * @return 评分汇总记录
+     */
+    public ScoreSummary selectScoreSummaryById(Long id);
+
+    /**
+     * 查询评分汇总记录列表
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 评分汇总记录集合
+     */
+    public List<ScoreSummary> selectScoreSummaryList(ScoreSummary scoreSummary);
+
+    /**
+     * 新增评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    public int insertScoreSummary(ScoreSummary scoreSummary);
+
+    /**
+     * 修改评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    public int updateScoreSummary(ScoreSummary scoreSummary);
+
+    /**
+     * 批量删除评分汇总记录
+     *
+     * @param ids 需要删除的评分汇总记录主键集合
+     * @return 结果
+     */
+    public int deleteScoreSummaryByIds(Long[] ids);
+
+    /**
+     * 删除评分汇总记录信息
+     *
+     * @param id 评分汇总记录主键
+     * @return 结果
+     */
+    public int deleteScoreSummaryById(Long id);
+
+    public int deleteScoreSummaryBySid(Long sid);
+}

+ 96 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidIdeaServiceImpl.java

@@ -0,0 +1,96 @@
+package com.hh.bidding.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.core.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hh.bidding.mapper.BidIdeaMapper;
+import com.hh.bidding.domain.BidIdea;
+import com.hh.bidding.service.IBidIdeaService;
+
+/**
+ * 专家意见Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-09-12
+ */
+@Service
+public class BidIdeaServiceImpl implements IBidIdeaService
+{
+    @Autowired
+    private BidIdeaMapper bidIdeaMapper;
+
+    /**
+     * 查询专家意见
+     *
+     * @param id 专家意见主键
+     * @return 专家意见
+     */
+    @Override
+    public BidIdea selectBidIdeaById(Long id)
+    {
+        return bidIdeaMapper.selectBidIdeaById(id);
+    }
+
+    /**
+     * 查询专家意见列表
+     *
+     * @param bidIdea 专家意见
+     * @return 专家意见
+     */
+    @Override
+    public List<BidIdea> selectBidIdeaList(BidIdea bidIdea)
+    {
+        return bidIdeaMapper.selectBidIdeaList(bidIdea);
+    }
+
+    /**
+     * 新增专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    @Override
+    public int insertBidIdea(BidIdea bidIdea)
+    {
+        bidIdea.setCreateTime(DateUtils.getNowDate());
+        return bidIdeaMapper.insertBidIdea(bidIdea);
+    }
+
+    /**
+     * 修改专家意见
+     *
+     * @param bidIdea 专家意见
+     * @return 结果
+     */
+    @Override
+    public int updateBidIdea(BidIdea bidIdea)
+    {
+        bidIdea.setUpdateTime(DateUtils.getNowDate());
+        return bidIdeaMapper.updateBidIdea(bidIdea);
+    }
+
+    /**
+     * 批量删除专家意见
+     *
+     * @param ids 需要删除的专家意见主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBidIdeaByIds(Long[] ids)
+    {
+        return bidIdeaMapper.deleteBidIdeaByIds(ids);
+    }
+
+    /**
+     * 删除专家意见信息
+     *
+     * @param id 专家意见主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBidIdeaById(Long id)
+    {
+        return bidIdeaMapper.deleteBidIdeaById(id);
+    }
+}

+ 12 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidInfoServiceImpl.java

@@ -1,6 +1,8 @@
 package com.hh.bidding.service.impl;
 
 import java.util.List;
+
+import com.hh.bidding.domain.TechScore;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.system.api.domain.BsExpert;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -109,4 +111,14 @@ public class BidInfoServiceImpl implements IBidInfoService
     public BsExpert getExpertByUserId(Long userId) {
         return bidInfoMapper.getExpertByUserId(userId);
     }
+
+    @Override
+    public String getSupplierByhid(Long hid) {
+        return bidInfoMapper.getSupplierByhid(hid);
+    }
+
+    @Override
+    public List<TechScore> getTechScore(Long sid) {
+        return bidInfoMapper.getTechScore(sid);
+    }
 }

+ 6 - 4
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/BidTenderServiceImpl.java

@@ -3,15 +3,12 @@ package com.hh.bidding.service.impl;
 import java.util.List;
 import java.util.Map;
 
-import com.hh.bidding.domain.BidNoticeAndSms;
-import com.hh.bidding.domain.BidTenderAndNotoce;
-import com.hh.bidding.domain.BsExpertAndSms;
+import com.hh.bidding.domain.*;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.system.api.domain.BsExpert;
 import com.ruoyi.system.api.domain.PpmApprovalRecord;
 import org.springframework.stereotype.Service;
 import com.hh.bidding.mapper.BidTenderMapper;
-import com.hh.bidding.domain.BidTender;
 import com.hh.bidding.service.IBidTenderService;
 
 import javax.annotation.Resource;
@@ -231,4 +228,9 @@ public class BidTenderServiceImpl implements IBidTenderService {
     public int updateTenderByCState(BidTender bidTender) {
         return bidTenderMapper.updateTenderByCState(bidTender);
     }
+
+    @Override
+    public BsSupplier selectSupplierByHid(Long sid) {
+        return bidTenderMapper.selectSupplierByHid(sid);
+    }
 }

+ 98 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/ScoreSummaryServiceImpl.java

@@ -0,0 +1,98 @@
+package com.hh.bidding.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hh.bidding.mapper.ScoreSummaryMapper;
+import com.hh.bidding.domain.ScoreSummary;
+import com.hh.bidding.service.IScoreSummaryService;
+
+/**
+ * 评分汇总记录Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-09-09
+ */
+@Service
+public class ScoreSummaryServiceImpl implements IScoreSummaryService
+{
+    @Autowired
+    private ScoreSummaryMapper scoreSummaryMapper;
+
+    /**
+     * 查询评分汇总记录
+     *
+     * @param id 评分汇总记录主键
+     * @return 评分汇总记录
+     */
+    @Override
+    public ScoreSummary selectScoreSummaryById(Long id)
+    {
+        return scoreSummaryMapper.selectScoreSummaryById(id);
+    }
+
+    /**
+     * 查询评分汇总记录列表
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 评分汇总记录
+     */
+    @Override
+    public List<ScoreSummary> selectScoreSummaryList(ScoreSummary scoreSummary)
+    {
+        return scoreSummaryMapper.selectScoreSummaryList(scoreSummary);
+    }
+
+    /**
+     * 新增评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    @Override
+    public int insertScoreSummary(ScoreSummary scoreSummary)
+    {
+        return scoreSummaryMapper.insertScoreSummary(scoreSummary);
+    }
+
+    /**
+     * 修改评分汇总记录
+     *
+     * @param scoreSummary 评分汇总记录
+     * @return 结果
+     */
+    @Override
+    public int updateScoreSummary(ScoreSummary scoreSummary)
+    {
+        return scoreSummaryMapper.updateScoreSummary(scoreSummary);
+    }
+
+    /**
+     * 批量删除评分汇总记录
+     *
+     * @param ids 需要删除的评分汇总记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteScoreSummaryByIds(Long[] ids)
+    {
+        return scoreSummaryMapper.deleteScoreSummaryByIds(ids);
+    }
+
+    /**
+     * 删除评分汇总记录信息
+     *
+     * @param id 评分汇总记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteScoreSummaryById(Long id)
+    {
+        return scoreSummaryMapper.deleteScoreSummaryById(id);
+    }
+
+    @Override
+    public int deleteScoreSummaryBySid(Long sid) {
+        return scoreSummaryMapper.deleteScoreSummaryBySid(sid);
+    }
+}

+ 1 - 1
ruoyi-modules/hh-bidding/src/main/resources/mapper/BidCommitteeMapper.xml

@@ -39,7 +39,7 @@
     </select>
 
     <select id="getProjectByUserId" parameterType="Long" resultType="com.hh.bidding.domain.BidTender">
-        select t.* from bid_tender t inner join bid_committee c on t.sid = c.sid where c.user_id = #{userId}
+        select t.* from bid_tender t inner join bid_committee c on t.sid = c.sid where c.user_id = #{userId} and (c.status = 1 or c.status = 3)
     </select>
 
     <select id="selectBidCommitteeByPbId" parameterType="Long" resultMap="BidCommitteeResult">

+ 69 - 0
ruoyi-modules/hh-bidding/src/main/resources/mapper/BidIdeaMapper.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hh.bidding.mapper.BidIdeaMapper">
+
+    <resultMap type="BidIdea" id="BidIdeaResult">
+        <result property="id"    column="id"    />
+        <result property="sid"    column="sid"    />
+        <result property="idea"    column="idea"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectBidIdeaVo">
+        select id, sid, idea, create_time, update_time from bid_idea
+    </sql>
+
+    <select id="selectBidIdeaList" parameterType="BidIdea" resultMap="BidIdeaResult">
+        <include refid="selectBidIdeaVo"/>
+        <where>
+            <if test="sid != null "> and sid = #{sid}</if>
+            <if test="idea != null  and idea != ''"> and idea = #{idea}</if>
+        </where>
+    </select>
+
+    <select id="selectBidIdeaById" parameterType="Long" resultMap="BidIdeaResult">
+        <include refid="selectBidIdeaVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertBidIdea" parameterType="BidIdea" useGeneratedKeys="true" keyProperty="id">
+        insert into bid_idea
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sid != null">sid,</if>
+            <if test="idea != null">idea,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sid != null">#{sid},</if>
+            <if test="idea != null">#{idea},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateBidIdea" parameterType="BidIdea">
+        update bid_idea
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sid != null">sid = #{sid},</if>
+            <if test="idea != null">idea = #{idea},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBidIdeaById" parameterType="Long">
+        delete from bid_idea where id = #{id}
+    </delete>
+
+    <delete id="deleteBidIdeaByIds" parameterType="String">
+        delete from bid_idea where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 8 - 0
ruoyi-modules/hh-bidding/src/main/resources/mapper/BidInfoMapper.xml

@@ -89,4 +89,12 @@
         select * from bs_expert where user_id = #{userId}
     </select>
 
+    <select id="getSupplierByhid" parameterType="Long">
+        select h_name from bs_supplier where hid = #{hid}
+    </select>
+
+    <select id = "getTechScore" parameterType="Long">
+        SELECT sid,jid,j_name,hid,sum(score) as score FROM bid_expert_tech where sid = #{sid} group by hid,jid,j_name order by j_name
+    </select>
+
 </mapper>

+ 5 - 1
ruoyi-modules/hh-bidding/src/main/resources/mapper/BidTenderMapper.xml

@@ -542,7 +542,7 @@
         <where>
             <if test="sName != null  and sName != ''">and t.s_name like concat('%', #{sName}, '%')</if>
             <if test="sCode != null  and sCode != ''">and t.s_code like concat('%', #{sCode}, '%')</if>
-            <if test="cState != null">c_state = #{cState},</if>
+            <if test="cState != null">and c_state = #{cState}</if>
             and t.s_project_state = 7 and t.owner_dept in ${join} and (n.examine = 1 or n.examine is null)
             and t.s_state != 1 and t.s_state != 2
         </where>
@@ -561,4 +561,8 @@
         update ppm_procurement_plan set a_astate = 0 where aid = #{aid}
     </update>
 
+    <select id="selectSupplierByHid" parameterType="Long">
+        select * from bs_supplier where hid = #{hid}
+    </select>
+
 </mapper>

+ 8 - 2
ruoyi-modules/hh-bidding/src/main/resources/mapper/BidWinningResultsMapper.xml

@@ -33,7 +33,7 @@
                w.result_desc,
                w.gs_pubman,
                w.gs_approve_state,
-               w.proj_money, w.service_fee, w.suppliers_change,w.supplier_name_change,w.tender_name,w.account,w.gs_annex
+               w.proj_money, w.service_fee, w.suppliers_change,w.supplier_name_change,w.tender_name,w.account,w.gs_annex,w.supplier_change_service,w.supplier_change_price
         from bid_winning_results w inner join bid_tender t on w.sid = t.sid
     </sql>
 
@@ -87,7 +87,7 @@
                w.result_desc,
                w.gs_pubman,
                w.gs_approve_state,
-               w.proj_money, w.service_fee, w.suppliers_change,w.supplier_name_change,w.tender_name,w.account,w.gs_annex,
+               w.proj_money, w.service_fee, w.suppliers_change,w.supplier_name_change,w.tender_name,w.account,w.gs_annex,w.supplier_change_service,w.supplier_change_price,
                t.s_name,t.s_unit,
                r.win_file,
                n.u_kai_time
@@ -122,6 +122,8 @@
             <if test="supplierNameChange != null and supplierNameChange != '' ">supplier_name_change,</if>
             <if test="tenderName != null ">tender_name,</if>
             <if test="gsAnnex != null">gs_annex,</if>
+            <if test="supplierChangeService != null ">supplier_change_service,</if>
+            <if test="supplierChangePrice != null ">supplier_change_price,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="gsId != null">#{gsId},</if>
@@ -140,6 +142,8 @@
             <if test="supplierNameChange != null and supplierNameChange != '' ">#{supplierNameChange},</if>
             <if test="tenderName != null ">#{tenderName},</if>
             <if test="gsAnnex != null">#{gsAnnex},</if>
+            <if test="supplierChangeService != null ">#{supplierChangeService},</if>
+            <if test="supplierChangePrice != null ">#{supplierChangePrice},</if>
         </trim>
     </insert>
 
@@ -160,6 +164,8 @@
             <if test="suppliersChange != null ">suppliers_change = #{suppliersChange},</if>
             <if test="supplierNameChange != null ">supplier_name_change = #{supplierNameChange},</if>
             <if test="tenderName != null ">tender_name = #{tenderName},</if>
+            <if test="supplierChangeService != null ">supplier_change_service = #{supplierChangeService},</if>
+            <if test="supplierChangePrice != null ">supplier_change_price = #{supplierChangePrice},</if>
         </trim>
         where gs_id = #{gsId}
     </update>

+ 99 - 0
ruoyi-modules/hh-bidding/src/main/resources/mapper/ScoreSummaryMapper.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hh.bidding.mapper.ScoreSummaryMapper">
+
+    <resultMap type="com.hh.bidding.domain.ScoreSummary" id="ScoreSummaryResult">
+        <result property="id"    column="id"    />
+        <result property="sid"    column="sid"    />
+        <result property="hid"    column="hid"    />
+        <result property="hName"    column="h_name"    />
+        <result property="scoreInfo"    column="score_info"    />
+        <result property="priceScore"    column="price_score"    />
+        <result property="averScore"    column="aver_score"    />
+        <result property="totalScore"    column="total_score"    />
+        <result property="sort"    column="sort"    />
+    </resultMap>
+
+    <sql id="selectScoreSummaryVo">
+        select id, sid, hid, h_name, score_info, price_score, aver_score, total_score, sort from score_summary
+    </sql>
+
+    <select id="selectScoreSummaryList" parameterType="ScoreSummary" resultMap="ScoreSummaryResult">
+        select s.id, s.sid, s.hid, s.h_name, s.score_info, s.price_score, s.aver_score, s.total_score, s.sort,o.yw_name,o.yw_phone
+        from score_summary s inner join bs_operator o on s.hid = o.hid
+        <where>
+            <if test="sid != null "> and sid = #{sid}</if>
+            <if test="hid != null "> and hid = #{hid}</if>
+            <if test="hName != null  and hName != ''"> and h_name like concat('%', #{hName}, '%')</if>
+            <if test="scoreInfo != null  and scoreInfo != ''"> and score_info = #{scoreInfo}</if>
+            <if test="priceScore != null "> and price_score = #{priceScore}</if>
+            <if test="averScore != null "> and aver_score = #{averScore}</if>
+            <if test="totalScore != null "> and total_score = #{totalScore}</if>
+            <if test="sort != null "> and sort = #{sort}</if>
+        </where>
+        order by sort asc
+    </select>
+
+    <select id="selectScoreSummaryById" parameterType="Long" resultMap="ScoreSummaryResult">
+        <include refid="selectScoreSummaryVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertScoreSummary" parameterType="ScoreSummary">
+        insert into score_summary
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="sid != null">sid,</if>
+            <if test="hid != null">hid,</if>
+            <if test="hName != null">h_name,</if>
+            <if test="scoreInfo != null">score_info,</if>
+            <if test="priceScore != null">price_score,</if>
+            <if test="averScore != null">aver_score,</if>
+            <if test="totalScore != null">total_score,</if>
+            <if test="sort != null">sort,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="sid != null">#{sid},</if>
+            <if test="hid != null">#{hid},</if>
+            <if test="hName != null">#{hName},</if>
+            <if test="scoreInfo != null">#{scoreInfo},</if>
+            <if test="priceScore != null">#{priceScore},</if>
+            <if test="averScore != null">#{averScore},</if>
+            <if test="totalScore != null">#{totalScore},</if>
+            <if test="sort != null">#{sort},</if>
+        </trim>
+    </insert>
+
+    <update id="updateScoreSummary" parameterType="ScoreSummary">
+        update score_summary
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sid != null">sid = #{sid},</if>
+            <if test="hid != null">hid = #{hid},</if>
+            <if test="hName != null">h_name = #{hName},</if>
+            <if test="scoreInfo != null">score_info = #{scoreInfo},</if>
+            <if test="priceScore != null">price_score = #{priceScore},</if>
+            <if test="averScore != null">aver_score = #{averScore},</if>
+            <if test="totalScore != null">total_score = #{totalScore},</if>
+            <if test="sort != null">sort = #{sort},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteScoreSummaryById" parameterType="Long">
+        delete from score_summary where id = #{id}
+    </delete>
+
+    <delete id="deleteScoreSummaryByIds" parameterType="String">
+        delete from score_summary where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteScoreSummaryBySid" parameterType="Long">
+        delete from score_summary where sid = #{sid}
+    </delete>
+</mapper>

+ 25 - 1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java

@@ -6,6 +6,8 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.common.core.constant.SecurityConstants;
+import com.ruoyi.system.api.RemoteExpertService;
 import com.ruoyi.system.api.domain.BsExpert;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +63,9 @@ public class SysUserController extends BaseController
     @Autowired
     private ISysConfigService configService;
 
+    @Autowired
+    private RemoteExpertService remoteExpertService;
+
 
     /**
      * 获取用户列表
@@ -209,7 +214,16 @@ public class SysUserController extends BaseController
         }
         user.setCreateBy(SecurityUtils.getUsername());
         user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
-        return toAjax(userService.insertUser(user));
+        int i = userService.insertUser(user);
+        if(user.getIsOwner() == 1){
+            BsExpert bsExpert = new BsExpert();
+            bsExpert.setUserId(user.getUserId());
+            bsExpert.setjName(user.getUserName());
+            bsExpert.setjShState(1L);
+            remoteExpertService.insertExpert(bsExpert, SecurityConstants.INNER);
+        }
+
+        return toAjax(i);
     }
 
 
@@ -341,4 +355,14 @@ public class SysUserController extends BaseController
         System.out.println("AAAAAAAAAAAAAAAAAAAAAAAAAAA");
         userService.deleteExpertUserByIds(userIds);
     }
+
+    @InnerAuth
+    @GetMapping("/getLeader")
+    public SysUser getLeader(@RequestParam("ownerDept") Long ownerDept){
+        SysUser user = new SysUser();
+        user.setDeptId(ownerDept);
+        user.setIsOwner(1);
+        List<SysUser> sysUsers = userService.selectUserList(user);
+        return sysUsers.get(0);
+    }
 }

+ 8 - 1
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"   column="update_time"  />
         <result property="remark"       column="remark"       />
 		<result property="company" 		column="company" />
+		<result property="isOwner" 		column="is_owner" />
         <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
         <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
     </resultMap>
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
     
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.company, d.dept_name, d.leader from sys_user u
+		select u.is_owner,u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.company, d.dept_name, d.leader from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		where u.del_flag = '0'
 		<if test="userId != null and userId != 0">
@@ -82,6 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="deptId != null and deptId != 0">
 			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
 		</if>
+		<if test = "isOwner != null">
+			AND u.is_owner  = #{isOwner}
+		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
 	</select>
@@ -158,6 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="createBy != null and createBy != ''">create_by,</if>
  			<if test="remark != null and remark != ''">remark,</if>
 			<if test="company != null and company != ''">company,</if>
+			<if test="isOwner != null and isOwner != ''">is_owner,</if>
  			create_time
  		)values(
  			<if test="userId != null and userId != ''">#{userId},</if>
@@ -173,6 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
 			<if test="company != null and company != ''">#{company},</if>
+			<if test="isOwner != null and isOwner != ''">#{isOwner},</if>
  			sysdate()
  		)
 	</insert>
@@ -194,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
 			<if test="company != null">company = #{company},</if>
+			<if test="isOwner != null">is_owner = #{isOwner},</if>
  			update_time = sysdate()
  		</set>
  		where user_id = #{userId}

+ 55 - 45
ruoyi-ui/src/views/expert/tender/components/excelContent.vue

@@ -35,10 +35,10 @@
       </el-descriptions-item>
     </el-descriptions>
 
-    <div v-if="isLeader" class="margin-top">
+    <div class="margin-top">
       <span class="describe">资格审查表</span>
 
-      <el-table ref="elTable" max-height="400" :data="zigeList" border style="margin-top: 20px">
+      <el-table ref="elTable" :data="zigeList" border style="margin-top: 20px">
         <el-table-column label="序号" align="center" width="60">
           <template slot-scope="scope">
             <span>{{ scope.$index + 1 }}</span>
@@ -55,7 +55,7 @@
             <div class="pre-text">{{ scope.row.standard }}</div>
           </template>
         </el-table-column>
-        <el-table-column label="" align="center" :width="240">
+        <el-table-column v-if="isLeader" label="" align="center" :width="240">
           <template slot-scope="scope">
             <span v-if="!isEdit">{{ scope.row.isOk }}</span>
             <div v-else>
@@ -67,11 +67,11 @@
       </el-table>
     </div>
 
-    <div v-if="isLeader" class="margin-top">
+    <div class="margin-top">
       <span class="describe">响应性审查表</span>
 
 
-      <el-table ref="elTable" max-height="400" :data="xiangyingList" border style="margin-top: 20px">
+      <el-table ref="elTable" :data="xiangyingList" border style="margin-top: 20px">
 
         <el-table-column label="序号" align="center" width="60">
           <template slot-scope="scope">
@@ -89,7 +89,7 @@
             <div class="pre-text">{{ scope.row.standard }}</div>
           </template>
         </el-table-column>
-        <el-table-column label="得分" align="center" :width="240">
+        <el-table-column v-if="isLeader" label="得分" align="center" :width="240">
           <template slot-scope="scope">
             <span v-if="!isEdit">{{ scope.row.score }}</span>
             <div v-else>
@@ -103,7 +103,7 @@
 
     <div class="margin-top">
       <span class="describe">技术审查表</span>
-      <el-table ref="elTable" max-height="400" :data="jishuList" border style="margin-top: 20px">
+      <el-table ref="elTable" :data="jishuList" border style="margin-top: 20px">
 
         <el-table-column label="序号" align="center" width="60">
           <template slot-scope="scope">
@@ -115,7 +115,7 @@
             <div class="pre-text">{{ scope.row.content }}</div>
           </template>
         </el-table-column>
-        <el-table-column label="分值" align="center" prop="value">
+        <el-table-column label="分值" align="center" prop="value" :width="120">
         </el-table-column>
         <el-table-column label="得分标准" prop="standard">
           <template slot-scope="scope">
@@ -211,39 +211,38 @@ export default {
 
         this.isLeader = response.data.isLeader === 1;
 
-        if (response.data.isLeader == 1) {
-          const examineList = response.data.examineList || [];
-          const bidExpertExamines = response.data.bidExpertExamines || [];
-          if (bidExpertExamines.length > 0) {
-            for (let examine of examineList) {
-              examine.oid = '';
-              examine.isOk = ''
-              const expertExamine = bidExpertExamines.find(item => item.eid == examine.id)
-              if (expertExamine) {
-                examine.isOk = expertExamine.isOk;
-                examine.oid = expertExamine.id;
-              }
+
+        const examineList = response.data.examineList || [];
+        const bidExpertExamines = response.data.bidExpertExamines || [];
+        if (bidExpertExamines.length > 0) {
+          for (let examine of examineList) {
+            examine.oid = '';
+            examine.isOk = ''
+            const expertExamine = bidExpertExamines.find(item => item.eid == examine.id)
+            if (expertExamine) {
+              examine.isOk = expertExamine.isOk;
+              examine.oid = expertExamine.id;
             }
           }
-          this.zigeList = examineList;
         }
-
-        if (response.data.isLeader == 1) {
-          const xiangyingList = response.data.bidRespondList || [];
-          const bidExpertResponds = response.data.bidExpertResponds || [];
-          if (bidExpertResponds.length > 0) {
-            for (let xiangying of xiangyingList) {
-              xiangying.isOk = '';
-              xiangying.oid = '';
-              const expertRespond = bidExpertResponds.find(item => item.rid == xiangying.id)
-              if (expertRespond) {
-                xiangying.isOk = expertRespond.isOk;
-                xiangying.oid = expertRespond.id;
-              }
+        this.zigeList = examineList;
+
+
+        const xiangyingList = response.data.bidRespondList || [];
+        const bidExpertResponds = response.data.bidExpertResponds || [];
+        if (bidExpertResponds.length > 0) {
+          for (let xiangying of xiangyingList) {
+            xiangying.isOk = '';
+            xiangying.oid = '';
+            const expertRespond = bidExpertResponds.find(item => item.rid == xiangying.id)
+            if (expertRespond) {
+              xiangying.isOk = expertRespond.isOk;
+              xiangying.oid = expertRespond.id;
             }
           }
-          this.xiangyingList = xiangyingList;
         }
+        this.xiangyingList = xiangyingList;
+
 
         const jishuList = response.data.bidTechList || [];
         const bidExpertTeches = response.data.bidExpertTeches || [];
@@ -273,27 +272,38 @@ export default {
     },
 
     handleSave () {
-      const bidExpertExamines = this.zigeList.map(item => {
+
+      for (let item of this.jishuList) {
+        if (item.value != item.score) {
+          if (!item.reason) {
+            this.$message.error(`【${item.content}】请填写扣分原因`)
+            return
+          }
+        }
+      }
+      const bidExpertTeches = this.jishuList.map(item => {
         return {
           id: item.oid,
           sid: this.tender.sid,
-          eid: item.id,
+          tid: item.id,
           hid: this.hid,
           hName: this.hName,
-          isOk: item.isOk,
+          score: item.score,
+          reason: item.reason,
         }
       })
-      const bidExpertTeches = this.jishuList.map(item => {
+
+      const bidExpertExamines = this.zigeList.map(item => {
         return {
           id: item.oid,
           sid: this.tender.sid,
-          tid: item.id,
+          eid: item.id,
           hid: this.hid,
           hName: this.hName,
-          score: item.score,
-          reason: item.reason,
+          isOk: item.isOk,
         }
       })
+
       const bidExpertResponds = this.xiangyingList.map(item => {
         return {
           id: item.oid,
@@ -323,21 +333,21 @@ export default {
     },
     handleDownloadExamine () {
       const workbook = new ExcelJS.Workbook()
-      genExamineExcel(workbook,this.tender.sName,this.excelForm.kaibiaoTime,this.excelForm.kaibiaoAddress,this.hName,this.zigeList)
+      genExamineExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.zigeList)
       workbook.xlsx.writeBuffer().then(buffer => {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `资格审查表-${this.hName}.xlsx`)
       })
     },
     handleDownloadRespond () {
       const workbook = new ExcelJS.Workbook()
-      genRespondExcel(workbook,this.tender.sName,this.excelForm.kaibiaoTime,this.excelForm.kaibiaoAddress,this.hName,this.xiangyingList)
+      genRespondExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.xiangyingList)
       workbook.xlsx.writeBuffer().then(buffer => {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `响应性审查表-${this.hName}.xlsx`)
       })
     },
     handleDownloadTech () {
       const workbook = new ExcelJS.Workbook()
-      genTechExcel(workbook,this.tender.sName,this.excelForm.kaibiaoTime,this.excelForm.kaibiaoAddress,this.hName,this.jishuList,'技术标')
+      genTechExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.jishuList, '技术标')
 
       workbook.xlsx.writeBuffer().then(buffer => {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `技术审查表-${this.hName}.xlsx`)

+ 2 - 3
ruoyi-ui/src/views/expert/tender/detail.vue

@@ -39,12 +39,11 @@
           {{ tender.enrollNumber }}
         </el-descriptions-item>
       </el-descriptions>
-      <el-table v-if="tender.sProjectState > 6 || toubiaoDetail == 'yu' || toubiaoDetail == 'ke'" :data="quoteTableData"
-        border style="width: 100%;margin-top: 20px;">
+      <el-table v-if="tender.sProjectState > 6" :data="quoteTableData" border style="width: 100%;margin-top: 20px;">
         <el-table-column label="供应商名称" prop="hName" align="center" />
         <el-table-column v-if="detail.isEnd" label="报价" prop="quotePrice" align="center" />
         <el-table-column label="报价时间" prop="quoteTime" align="center" />
-        <el-table-column v-if="plan.buyingMode == 2 && toubiaoDetail == 'ke'" label="标书" align="center">
+        <el-table-column label="标书" align="center">
           <template slot-scope="scope">
             <div v-for="(item, index) in scope.row.fjAnnex" :key="index">
               <a :href="item.url" target="_blank" style="color: blue;">{{ item.name }}</a>

+ 6 - 7
ruoyi-ui/src/views/expert/tender/list.vue

@@ -1,22 +1,21 @@
 <template>
   <div class="app-container">
     <el-table v-loading="loading" :data="list">
-      <el-table-column label="序号" align="center" prop="orderNum" width="80">
+      <el-table-column label="序号" align="center" prop="orderNum" width="60">
         <template slot-scope="scope">
           {{ scope.$index + 1 + (query.pageNum - 1) * query.pageSize }}
         </template>
       </el-table-column>
-      <el-table-column label="项目编号" align="center" prop="sCode" width="250" />
-      <el-table-column label="项目名称" align="center" prop="sName" width="400" />
-      <el-table-column label="采购单位" align="center" prop="sUnit" width="400" />
-      <el-table-column label="项目状态" align="center" prop="sProjectState" width="250">
+      <el-table-column label="项目编号" align="center" prop="sCode" width="170" />
+      <el-table-column label="项目名称" align="center" prop="sName" min-width="150" />
+      <el-table-column label="采购单位" align="center" prop="sUnit" min-width="150" />
+      <el-table-column label="项目状态" align="center" prop="sProjectState">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.bid_tender_state" :value="scope.row.sProjectState" />
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="scope">
-
           <router-link :to="'/expert/expertTenderDetail?type=details&sid=' + scope.row.sid">
             <el-button size="mini" type="text" icon="el-icon-view">查看</el-button>
           </router-link>

+ 1 - 3
ruoyi-ui/src/views/purchase/otb/detail.vue

@@ -2,8 +2,6 @@
   <div class="app-container">
     <el-tabs v-model="paneName">
       <el-tab-pane label="基础资料" name="basic">
-
-
         <el-descriptions title="项目概况" :column="3" border>
           <el-descriptions-item label="采购事项" :span="3">
             {{ detail.aName }}
@@ -35,7 +33,7 @@
           <el-descriptions-item label="投标保证金">
             {{ detail.earnestMoney }}
           </el-descriptions-item>
-          <el-descriptions-item label="报价间隔">
+          <el-descriptions-item v-if="detail.quoteMode != '1'" label="报价间隔">
             {{ detail.intervalTime }}
           </el-descriptions-item>
         </el-descriptions>

+ 15 - 9
ruoyi-ui/src/views/system/user/index.vue

@@ -107,8 +107,8 @@
           </el-table-column>
         </el-table>
 
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
-          @pagination="getList" />
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize" @pagination="getList" />
       </el-col>
     </el-row>
 
@@ -163,19 +163,21 @@
           <el-col :span="12">
             <el-form-item label="状态">
               <el-radio-group v-model="form.status">
-                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value"
-                  :label="dict.value">{{ dict.label }}</el-radio>
+                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{
+      dict.label }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="岗位">
-              <el-select v-model="form.postIds" multiple placeholder="请选择岗位">
+            <el-form-item label="甲方代表">
+              <!-- <el-select v-model="form.postIds" multiple placeholder="请选择岗位">
                 <el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId"
                   :disabled="item.status == 1"></el-option>
-              </el-select>
+              </el-select> -->
+              <el-radio v-model="form.isOwner" :label="0">否</el-radio>
+              <el-radio v-model="form.isOwner" :label="1">是</el-radio>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -268,7 +270,9 @@ export default {
       // 角色选项
       roleOptions: [],
       // 表单参数
-      form: {},
+      form: {
+        isOwner: 0
+      },
       defaultProps: {
         children: "children",
         label: "label"
@@ -406,6 +410,7 @@ export default {
         sex: undefined,
         status: "0",
         remark: undefined,
+        isOwner: 0,
         postIds: [],
         roleIds: []
       };
@@ -466,7 +471,8 @@ export default {
         this.$set(this.form, "roleIds", response.roleIds);
         this.open = true;
         this.title = "修改用户";
-        this.form.password = "";
+        this.form.password = ""
+        this.form.isOwner = row.isOwner;
       });
     },
     /** 重置密码按钮操作 */

+ 24 - 15
ruoyi-ui/src/views/tender/tender1/bidding.vue

@@ -59,7 +59,10 @@
         <el-table-column label="供应商联系方式" prop="contactPhone" align="center" />
         <el-table-column v-if="isOverFirstTime" label="报价" prop="quotePrice" align="center">
           <template slot-scope="scope">
-            <span>{{ scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first) }}</span>
+            <span v-if="tender.sProjectState != 8">
+              {{ scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first) }}
+            </span>
+            <span v-else>*</span>
           </template>
         </el-table-column>
         <el-table-column v-if="isOverFirstTime" label="报价时间" prop="quoteTime" align="center">
@@ -67,14 +70,14 @@
             <span>{{ scope.row.quoteTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column v-if="plan.buyingMode == 2 && checkRole(['operator', 'commander'])" label="标书" align="center">
+        <el-table-column v-if="plan.buyingMode != 1 && checkRole(['operator', 'commander'])" label="标书" align="center">
           <template slot-scope="scope">
             <div v-for="(item, index) in scope.row.fjAnnex" :key="index">
               <a :href="item.url" target="_blank" style="color: blue;">{{ item.name }}</a>
             </div>
           </template>
         </el-table-column>
-        <el-table-column v-if="plan.buyingMode == 2 && checkRole(['operator', 'commander'])" align="center" label="操作">
+        <el-table-column v-if="plan.buyingMode != 1 && checkRole(['operator', 'commander'])" align="center" label="操作">
           <template slot-scope="scope">
             <el-button v-if="scope.row.audit != 1" type="text" @click="handlePassAudit(scope.row)">审核通过</el-button>
             <span v-else>已审核通过</span>
@@ -82,17 +85,14 @@
         </el-table-column>
         <el-table-column v-if="isOverFirstTime" align="center" label="报价详情">
           <template slot-scope="scope">
-            <el-button type="text" @click="handleShowOfferDetail(scope.row)">查看报价详情</el-button>
+            <el-button type="text" @click="handleShowOfferDetail(scope.row)" 
+              :disabled="tender.sProjectState == 8">查看报价详情</el-button>
           </template>
         </el-table-column>
       </el-table>
     </div>
     <div v-if="currentName === '专家'" class="div2">
-      <!-- <el-tabs v-model="activeName2">
-        <el-tab-pane label="组建评标委员会" name="expert" style="font-size: 16px"> -->
       <CompExpert v-if="tender && tender.sid" :tender="tender"></CompExpert>
-      <!-- </el-tab-pane>
-      </el-tabs> -->
     </div>
     <div v-if="currentName === '评标'" class="div2">
       <el-tabs v-model="activeName3">
@@ -103,15 +103,15 @@
     </div>
     <div v-if="currentName === '定标'" class="div2">
       <el-tabs v-model="activeName4">
-        <el-tab-pane v-if="plan.buyingMode == 2 && checkRole(['operator', 'commander'])" label="确定中标人"
+        <el-tab-pane v-if="plan.buyingMode != 1 && checkRole(['operator', 'commander'])" label="确定中标人"
           name="determineWin" style="font-size: 16px">
-          <el-button
-            v-if="checkRole(['operator', 'commander']) && tender && tender.sProjectState >= 3 && tender.sProjectState <= 6"
+          <el-button v-if="checkRole(['operator', 'commander']) && tender && tender.sProjectState >= 3 && tender.sProjectState <= 6"
             type="primary" @click="handleAbortiveTender" v-loading.fullscreen.lock="fullscreenLoading">流标</el-button>
           <el-button v-if="checkRole(['operator', 'commander']) && tender && tender.sProjectState == 6" type="primary"
             @click="handleReOpenBid" v-loading.fullscreen.lock="fullscreenLoading">重新开标</el-button>
 
-          <CompDetermineWin v-if="tender && tender.sid" :tender="tender" />
+          <CompDetermineWin v-if="tender && tender.sid && plan.buyingMode != 3" :tender="tender" />
+          <CompDetermineWinXunbi v-if="tender && tender.sid && plan.buyingMode == 3" :tender="tender" />
         </el-tab-pane>
         <el-tab-pane label="中标结果公示" name="annWin" style="font-size: 16px">
           <CompWinningBid ref="refCompWinningBid"></CompWinningBid>
@@ -146,7 +146,10 @@ import ExcelContent from './components/excelContent.vue'
 import CompExpert from './components/CompExpert.vue'
 import CompEval from './components/CompEval.vue'
 import CompDetermineWin from './components/CompDetermineWin.vue'
+import CompDetermineWinXunbi from './components/CompDetermineWinXunbi.vue'
 import CompWinningBid from './components/CompWinningBid.vue'
+
+
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 
 export default {
@@ -157,8 +160,9 @@ export default {
     ExcelContent,
     CompExpert,
     CompEval,
-    CompDetermineWin,
     CompWinningBid,
+    CompDetermineWin,
+    CompDetermineWinXunbi,
     'device-details': DeviceDetails,
     'tender-notice': TenderNotice,
     'tender-document': TenderDocument,
@@ -418,8 +422,13 @@ export default {
           const formData = {
             sid: Number(this.sid)
           }
-
-          openTenderTwo(formData)
+          let request = null
+          if (this.plan.buyingMode == 2) {
+            request = openTender
+          } else if (this.plan.buyingMode == 3) {
+            request = openTenderTwo
+          }
+          request(formData)
             .then(res => {
               this.$message.success('操作成功')
               this.getData()

+ 11 - 13
ruoyi-ui/src/views/tender/tender1/components/CompDetermineWin.vue

@@ -2,27 +2,25 @@
   <div class="app-container">
     <el-table :data="data" border style="width: 100%">
       <el-table-column prop="hName" align="center" label="供应商名称" />
-      <el-table-column prop="ywName" align="center" label="供应商联系人" />
-      <el-table-column prop="ywPhone" align="center" label="供应商联系方式" />
-      <el-table-column prop="scoreInfo" align="center" label="专家评分">
+      <el-table-column prop="contact" align="center" label="供应商联系人" />
+      <el-table-column prop="contactPhone" align="center" label="供应商联系方式" />
+      <el-table-column prop="quotePrice" align="center" label="报价">
         <template slot-scope="scope">
-          <div v-for="(item, index) in scope.row.scoreInfo.split(';')" :key="index">
-            {{ item.replace(',', ':') }}
-          </div>
+          <span>{{scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first)}}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="averScore" align="center" label="综合得分" />
-      <el-table-column prop="priceScore" align="center" label="报价得分" />
-      <el-table-column prop="totalScore" align="center" label="总得分" />
-      <el-table-column type="index" label="排序" align="center">
-        <template slot-scope="scope">{{ scope.$index + 1 }}</template>
+      <el-table-column prop="quoteTime" align="center" label="报价时间">
+        <template slot-scope="scope">
+          <span>{{scope.row.quoteTime}}</span>
+        </template>
       </el-table-column>
     </el-table>
   </div>
 </template>
 <script>
 
-import { getSummary } from '@/api/summary/summary'
+import { listQuote } from '@/api/system/quote'
+import { listWinner } from "@/api/system/winner";
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 
 export default {
@@ -50,7 +48,7 @@ export default {
 
     /** 查询列表 */
     async getList () {
-      const res = await getSummary({ sid: this.sid })
+      const res = await listQuote({ sid: this.sid, audit: 1 })
       this.data = res.data
     }
   }

+ 13 - 11
ruoyi-ui/src/views/tender/tender1/components/CompDetermineWin_old.vue → ruoyi-ui/src/views/tender/tender1/components/CompDetermineWinXunbi.vue

@@ -2,25 +2,27 @@
   <div class="app-container">
     <el-table :data="data" border style="width: 100%">
       <el-table-column prop="hName" align="center" label="供应商名称" />
-      <el-table-column prop="contact" align="center" label="供应商联系人" />
-      <el-table-column prop="contactPhone" align="center" label="供应商联系方式" />
-      <el-table-column prop="quotePrice" align="center" label="报价">
+      <el-table-column prop="ywName" align="center" label="供应商联系人" />
+      <el-table-column prop="ywPhone" align="center" label="供应商联系方式" />
+      <el-table-column prop="scoreInfo" align="center" label="专家评分">
         <template slot-scope="scope">
-          <span>{{scope.row.third ? scope.row.third : (scope.row.second ? scope.row.second : scope.row.first)}}</span>
+          <div v-for="(item, index) in scope.row.scoreInfo.split(';')" :key="index">
+            {{ item.replace(',', ':') }}
+          </div>
         </template>
       </el-table-column>
-      <el-table-column prop="quoteTime" align="center" label="报价时间">
-        <template slot-scope="scope">
-          <span>{{scope.row.quoteTime}}</span>
-        </template>
+      <el-table-column prop="averScore" align="center" label="综合得分" />
+      <el-table-column prop="priceScore" align="center" label="报价得分" />
+      <el-table-column prop="totalScore" align="center" label="总得分" />
+      <el-table-column type="index" label="排序" align="center">
+        <template slot-scope="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
     </el-table>
   </div>
 </template>
 <script>
 
-import { listQuote } from '@/api/system/quote'
-import { listWinner } from "@/api/system/winner";
+import { getSummary } from '@/api/summary/summary'
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 
 export default {
@@ -48,7 +50,7 @@ export default {
 
     /** 查询列表 */
     async getList () {
-      const res = await listQuote({ sid: this.sid, audit: 1 })
+      const res = await getSummary({ sid: this.sid })
       this.data = res.data
     }
   }

+ 4 - 9
ruoyi-ui/src/views/tender/tender1/components/CompEval.vue

@@ -133,7 +133,7 @@ export default {
     async getMarks () {
       const res = await getMarkAll({ sid: this.$route.query.sid })
 
-      const data = res.data
+      const data = res.data || []
       this.sName = data.sName
       this.uKaiPosition = data.uKaiPosition
       this.uKaiTime = data.uKaiTime
@@ -228,18 +228,13 @@ export default {
     },
     async getQuoteScore () {
       const res = await getQuoteScore({ sid: this.$route.query.sid })
-      if (!res.data) {
-        return
-      }
-      this.quoteScore = res.data
+      this.quoteScore = res.data || []
 
     },
     async getTotal () {
       const res = await getTotal({ sid: this.$route.query.sid })
-      if (!res.data) {
-        return
-      }
-      const data = res.data
+
+      const data = res.data || []
       let ZjNames = []
       for (let i = 0; i < data.length; i++) {
         const item = data[i]

+ 52 - 30
ruoyi-ui/src/views/tender/tender1/components/CompExpert.vue

@@ -14,6 +14,9 @@
       <el-button v-if="queryParams.status == 1 && checkRole(['operator', 'commander'])" type="primary" plain
         icon="el-icon-bell" @click="batchNotification"
         :disabled="multipleSelection && multipleSelection.length == 0">批量通知专家</el-button>
+      <el-button v-if="queryParams.status == 1 && checkRole(['operator', 'commander'])" type="danger" plain
+        icon="el-icon-delete" @click="handleDelete()"
+        :disabled="multipleSelection && multipleSelection.length == 0">批量删除</el-button>
 
       <el-table v-if="checkRole(['operator', 'commander'])" v-loading="loading" :data="committeeList"
         @selection-change="handleSelectionChange" style="margin-top: 12px">
@@ -57,7 +60,6 @@
         <el-table-column label="确认到场" align="center" prop="pbTypes">
           <template slot-scope="scope">
             <dict-tag :options="dict.type.expert_confirm_status" :value="scope.row.status" />
-            <!-- <span>{{ scope.row.status == '1' ? '确认到场' : (scope.row.status == '3' ? '确认到场并发送短信' : (scope.row.status == '2' ? '已拒绝' : '待确认')) }}</span> -->
           </template>
         </el-table-column>
         <el-table-column label="组长" align="center" prop="isLeader">
@@ -68,7 +70,7 @@
         <el-table-column v-if="checkRole(['operator', 'commander'])" label="操作" align="center"
           class-name="small-padding fixed-width">
           <template slot-scope="scope">
-            <el-button v-if="scope.row.status == '1' && scope.row.isLeader != 1" size="mini" type="text"
+            <el-button v-if="scope.row.status == '3' && scope.row.isLeader != 1" size="mini" type="text"
               icon="el-icon-delete" @click="handleSetLeader(scope.row)">选为组长</el-button>
             <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
           </template>
@@ -205,33 +207,38 @@ export default {
     },
     handleSelectionChange (val) {
       this.multipleSelection = val
+    },
+
+    batchNotification () {
       this.expertPhoneList = []
 
       this.multipleSelection.forEach(item => {
         this.expertPhoneList.push(item.bsExpert.jPhone)
       })
-    },
 
-    batchNotification () {
-      sendCall({
-        "sid": this.queryParams.sid,
-        "startTime": this.queryParams.startTime,
-        "position": this.queryParams.xArea,
-        "phoneList": this.expertPhoneList
-      })
-        .then(res => {
-          if (res.code == 200) {
-            this.$message({
-              type: 'success',
-              message: '通知成功!'
-            });
-          } else {
-            this.$modal.msgError("通知失败,请联系管理员!!!");
-          }
-        })
-        .catch(err => {
-          this.$modal.msgError("通知失败,请联系管理员!!!");
+      if (this.expertPhoneList && this.expertPhoneList.length > 0) {
+        sendCall({
+          "sid": this.queryParams.sid,
+          "startTime": this.queryParams.startTime,
+          "position": this.queryParams.xArea,
+          "phoneList": this.expertPhoneList
         })
+          .then(res => {
+            if (res.code == 200) {
+              this.$message({
+                type: 'success',
+                message: '通知成功!'
+              });
+            } else {
+              this.$modal.msgError("通知失败,请联系管理员!!!");
+            }
+          })
+          .catch(err => {
+            this.$modal.msgError("通知失败,请联系管理员!!!");
+          })
+      } else {
+        this.$modal.msgError("请选择专家后通知");
+      }
     },
 
     /** 查询评标委员会列表 */
@@ -247,14 +254,29 @@ export default {
     },
 
     /** 删除按钮操作 */
-    handleDelete (row) {
-      const pbIds = row.pbId || this.ids;
-      this.$modal.confirm('是否确认删除评标委员会中姓名为"' + row.bsExpert.jName + '"的专家?').then(function () {
-        return delCommittee(pbIds);
-      }).then(() => {
-        this.getExerptList(this.queryParams.sid);
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => { });
+    handleDelete(row) {
+      if (row) {
+        this.$modal.confirm('是否确认删除评标委员会中姓名为"' + row.bsExpert.jName + '"的专家?').then(function () {
+          return delCommittee(row.pbId);
+        }).then(() => {
+          this.getExerptList(this.queryParams.sid);
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => { });
+      } else {
+        const pbIds = []
+
+        this.multipleSelection.forEach(item => {
+          console.log(item);
+          pbIds.push(item.pbId)
+        })
+
+        this.$modal.confirm('是否确认批量删除?').then(function () {
+          return delCommittee(pbIds);
+        }).then(() => {
+          this.getExerptList(this.queryParams.sid);
+          this.$modal.msgSuccess("删除成功");
+        }).catch(() => { });
+      }
     },
 
     // 查询抽取申请列表