|
@@ -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("获取虚拟子账户失败");
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|