gmcs 3 months ago
parent
commit
7c7f141fc6

+ 1 - 1
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteTenderpubService.java

@@ -21,7 +21,7 @@ public interface RemoteTenderpubService {
     public R<BankTenderpub> getInfo(@RequestParam("tenderpubid") String tenderpubid, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
     public R<BankTenderpub> getInfo(@RequestParam("tenderpubid") String tenderpubid, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
 
     @PostMapping(value="/tenderpub/addInnerAuth")
     @PostMapping(value="/tenderpub/addInnerAuth")
-    public R<String> addInnerAuth(@RequestBody BankTenderpub bankTenderpub, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    public String addInnerAuth(@RequestBody BankTenderpub bankTenderpub, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
 
     @PutMapping(value="/tenderpub")
     @PutMapping(value="/tenderpub")
     public int editInnerAuth(@RequestBody BankTenderpub bankTenderpub, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
     public int editInnerAuth(@RequestBody BankTenderpub bankTenderpub, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

+ 2 - 2
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteTenderpubFallbackFactory.java

@@ -27,8 +27,8 @@ public class RemoteTenderpubFallbackFactory implements FallbackFactory<RemoteTen
             }
             }
 
 
             @Override
             @Override
-            public R<String> addInnerAuth(BankTenderpub bankTenderpub, String source) {
-                return R.fail("添加标段发布失败:" + throwable.getMessage());
+            public String addInnerAuth(BankTenderpub bankTenderpub, String source) {
+                return "添加标段发布失败:" + throwable.getMessage();
             }
             }
 
 
             @Override
             @Override

+ 42 - 2
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/BidNoticeController.java

@@ -12,6 +12,7 @@ import com.ruoyi.common.core.constant.SecurityConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.annotation.InnerAuth;
 import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.system.api.*;
 import com.ruoyi.system.api.*;
@@ -197,7 +198,7 @@ public class BidNoticeController extends BaseController {
             }
             }
         }
         }
 
 
-        /**添加标段银行接口*/
+//        /**添加标段银行接口*/
 //        BidTender bt = bidTenderService.selectBidTenderBySid(bidNotice.getSid());
 //        BidTender bt = bidTenderService.selectBidTenderBySid(bidNotice.getSid());
 //        if (bt == null) return error("招标项目不可用!");
 //        if (bt == null) return error("招标项目不可用!");
 //        PpmProcurementPlan ppp = remotePlanService.getPlan(bt.getXyId(), SecurityConstants.INNER);
 //        PpmProcurementPlan ppp = remotePlanService.getPlan(bt.getXyId(), SecurityConstants.INNER);
@@ -230,7 +231,6 @@ public class BidNoticeController extends BaseController {
 //            return error(s.getMsg());
 //            return error(s.getMsg());
 
 
         return toAjax(bidNoticeService.insertBidNotice(bidNotice));
         return toAjax(bidNoticeService.insertBidNotice(bidNotice));
-
     }
     }
 
 
     /**
     /**
@@ -487,4 +487,44 @@ public class BidNoticeController extends BaseController {
         return getDataTable(list);
         return getDataTable(list);
     }
     }
 
 
+    // 获取虚拟子账户
+    @GetMapping("/getBankAccount")
+    public AjaxResult getBankAccount(@RequestParam("uid") Long uid){
+        BidNotice bidNotice = bidNoticeService.selectBidNoticeByUid(uid);
+
+        /**添加标段银行接口*/
+        BidTender bt = bidTenderService.selectBidTenderBySid(bidNotice.getSid());
+        if (bt == null) return error("招标项目不可用!");
+        PpmProcurementPlan ppp = remotePlanService.getPlan(bt.getXyId(), SecurityConstants.INNER);
+
+        BankTenderpub btp = new BankTenderpub();
+        // 公告Id
+        btp.setPpid(bidNotice.getUid());
+        btp.setPrjno(bt.getsCode());
+        btp.setSgtno("BD" + DateUtils.dateTimeNow());
+        btp.setSgtnm(bidNotice.getuTitle());
+
+        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()));          //开标时间
+
+        String code = remoteTenderpubService.addInnerAuth(btp, SecurityConstants.INNER);
+
+        if(code != null){
+            System.out.println("AAAAAAAAAAAA");
+            System.out.println(code);
+            int i = bidNoticeService.updateBidNotice(bidNotice);
+            return toAjax(i);
+        }
+        return error("获取虚拟子账户失败");
+    }
+
 }
 }

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

@@ -150,6 +150,8 @@ public class BidNotice extends BaseEntity
 
 
     private String ownerDepts;
     private String ownerDepts;
 
 
+    private String bankAccount;
+
     private Integer isSms;
     private Integer isSms;
 
 
     public String getOpinionDetails() {
     public String getOpinionDetails() {
@@ -468,6 +470,14 @@ public class BidNotice extends BaseEntity
         this.isSms = isSms;
         this.isSms = isSms;
     }
     }
 
 
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         return "BidNotice{" +
         return "BidNotice{" +

+ 41 - 4
ruoyi-modules/hh-mast/src/main/java/com/ruoyi/mast/bank/controller/BankTenderpubController.java

@@ -175,15 +175,52 @@ public class BankTenderpubController extends BaseController {
     @Transactional
     @Transactional
     @Log(title = "标段发布InnerAuth", businessType = BusinessType.INSERT)
     @Log(title = "标段发布InnerAuth", businessType = BusinessType.INSERT)
     @PostMapping("/addInnerAuth")
     @PostMapping("/addInnerAuth")
-    public AjaxResult addInnerAuth(@RequestBody BankTenderpub bankTenderpub) {
-        return add(bankTenderpub);
+    public String addInnerAuth(@RequestBody BankTenderpub bankTenderpub) {
+        // 流水号
+        String TRNUID = "BDP" + System.currentTimeMillis() + (new Random().nextInt(1000) + 1);
+        bankTenderpub.setTenderpubid(UUID.randomUUID().toString(true));
+        bankTenderpub.setTrnuid(TRNUID);
+        bankTenderpub.setAcctno(env.getProperty("BANK.ACCTNO"));
+        bankTenderpub.setSgtacctgentp("0");
+        bankTenderpub.setSgttp("0");
+        bankTenderpub.setIntacrlflg("0");          //计息标志0-不计息 1-计息(默认计息 1)
+        bankTenderpub.setSecrettp("0");
+        bankTenderpub.setTdracctnovrfyflg("0");
+        bankTenderpub.setAlwafddlntdrflg("0");
+        bankTenderpub.setBnkrfndcfrmflg("0");
+
+        String rtnxml = postBank(bankTenderpub);
+
+        String rtn = JsonUtils.getStatus(rtnxml);
+
+        if (rtn.contains("成功")) {
+            bankTenderpubService.insertBankTenderpub(bankTenderpub);
+            if (update(bankTenderpub, rtnxml) > 0) {
+                /** 同时查询保存标段查询信息 **/
+                BankTenderpub b = bankTenderpubService.selectBankTenderpubByTenderpubid(bankTenderpub.getTenderpubid());
+                BankTenderquery bt = new BankTenderquery();
+                bt.setPpid(Long.valueOf(bankTenderpub.getPpid()));
+                bt.setSgtid(b.getRtnSgtid());
+                AjaxResult msg = bankTenderqueryController.addBankTenderquery(bt);
+                if (msg.isSuccess()) {
+                    return bankTenderpub.getRtnAcctno() + bankTenderpub.getRtnSgtvrtlno();
+                } else {
+                    return null;
+                }
+            } else{
+                return null;
+            }
+        } else {
+            return null;
+        }
+
     }
     }
 
 
     /**
     /**
      * 新增标段发布
      * 新增标段发布
      * web 接口
      * web 接口
      */
      */
-    @Transactional
+//    @Transactional
     // @RequiresPermissions("bank:tenderpub:add")
     // @RequiresPermissions("bank:tenderpub:add")
     @Log(title = "标段发布", businessType = BusinessType.INSERT)
     @Log(title = "标段发布", businessType = BusinessType.INSERT)
     @PostMapping
     @PostMapping
@@ -215,7 +252,7 @@ public class BankTenderpubController extends BaseController {
                 bt.setSgtid(b.getRtnSgtid());
                 bt.setSgtid(b.getRtnSgtid());
                 AjaxResult msg = bankTenderqueryController.addBankTenderquery(bt);
                 AjaxResult msg = bankTenderqueryController.addBankTenderquery(bt);
                 if (msg.isSuccess()) {
                 if (msg.isSuccess()) {
-                    return success("调取银行接口成功");
+                    return success(bankTenderpub);
                 } else {
                 } else {
                     return error("调取银行接口失败");
                     return error("调取银行接口失败");
                 }
                 }

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

@@ -6,7 +6,7 @@
       <el-descriptions class="margin-top" title="" :column="2" border>
       <el-descriptions class="margin-top" title="" :column="2" border>
         <el-descriptions-item label="专家签到表">
         <el-descriptions-item label="专家签到表">
           <div v-show="!isEdit">
           <div v-show="!isEdit">
-            <template v-if="!(sSignSrc?.tolowerCase().includes('.pdf'))">
+            <template v-if="!sSignSrc.includes('.pdf')">
               <el-image v-show="sSignSrc" style="width: 100px; height: 100px" :src="sSignSrc"
               <el-image v-show="sSignSrc" style="width: 100px; height: 100px" :src="sSignSrc"
                 :preview-src-list="[sSignSrc]"></el-image>
                 :preview-src-list="[sSignSrc]"></el-image>
             </template>
             </template>
@@ -20,7 +20,7 @@
         <el-descriptions-item label="审查表">
         <el-descriptions-item label="审查表">
 
 
           <div v-show="!isEdit">
           <div v-show="!isEdit">
-            <template v-if="!(sCensorSrc?.tolowerCase().includes('.pdf'))">
+            <template v-if="!sCensorSrc.includes('.pdf')">
               <el-image v-show="sCensorSrc" style="width: 100px; height: 100px" :src="sCensorSrc"
               <el-image v-show="sCensorSrc" style="width: 100px; height: 100px" :src="sCensorSrc"
                 :preview-src-list="[sCensorSrc]"></el-image>
                 :preview-src-list="[sCensorSrc]"></el-image>
             </template>
             </template>
@@ -33,7 +33,7 @@
         </el-descriptions-item>
         </el-descriptions-item>
         <el-descriptions-item label="评审表">
         <el-descriptions-item label="评审表">
           <div v-show="!isEdit">
           <div v-show="!isEdit">
-            <template v-if="!(sReviewSrc?.tolowerCase().includes('.pdf'))">
+            <template v-if="!sReviewSrc.includes('.pdf')">
               <el-image v-show="sReviewSrc" style="width: 100px; height: 100px" :src="sReviewSrc"
               <el-image v-show="sReviewSrc" style="width: 100px; height: 100px" :src="sReviewSrc"
                 :preview-src-list="[sReviewSrc]"></el-image>
                 :preview-src-list="[sReviewSrc]"></el-image>
             </template>
             </template>
@@ -46,7 +46,7 @@
         </el-descriptions-item>
         </el-descriptions-item>
         <el-descriptions-item label="最终汇总表">
         <el-descriptions-item label="最终汇总表">
           <div v-show="!isEdit">
           <div v-show="!isEdit">
-            <template v-if="!(sSummarySrc?.tolowerCase().includes('.pdf'))">
+            <template v-if="!sSummarySrc.includes('.pdf')">
               <el-image v-show="sSummarySrc" style="width: 100px; height: 100px" :src="sSummarySrc"
               <el-image v-show="sSummarySrc" style="width: 100px; height: 100px" :src="sSummarySrc"
                 :preview-src-list="[sSummarySrc]"></el-image>
                 :preview-src-list="[sSummarySrc]"></el-image>
             </template>
             </template>