|
|
@@ -856,10 +856,31 @@ public class B2BInformation extends AbstractTask{
|
|
|
Object cq_recorderuu = map.get("CQ_RECORDERUU");
|
|
|
Integer cqRecorderuu =200040254;
|
|
|
//Integer cqRecorderuu =1000014617; // 线上
|
|
|
- if (cq_recorderuu!=null) {
|
|
|
- cqRecorderuu = Integer.valueOf(cq_recorderuu.toString());
|
|
|
- }
|
|
|
- SaveOfferQuotaInfoReq.Builder req = SaveOfferQuotaInfoReq.newBuilder();
|
|
|
+ if (cq_recorderuu!=null) {
|
|
|
+ cqRecorderuu = Integer.valueOf(cq_recorderuu.toString());
|
|
|
+ }
|
|
|
+ //审核结果
|
|
|
+ Object cq_approval = map.get("CQ_APPROVAL");
|
|
|
+ Integer cqApproval=1403;
|
|
|
+ if (Integer.valueOf(cq_approval.toString())==0){
|
|
|
+ cqApproval=1402;
|
|
|
+ }
|
|
|
+ //到期时间
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Object cq_enddate = map.get("CQ_ENDDATE");
|
|
|
+ String cqEnddate = format.format(new Date());
|
|
|
+ if (cq_enddate!=null){
|
|
|
+ cqEnddate = cq_enddate.toString().substring(0,19);
|
|
|
+ }
|
|
|
+ //基本面评价
|
|
|
+ Object cq_basicevaluation = map.get("CQ_BASICEVALUATION");
|
|
|
+ String cqBasicevaluation = "";
|
|
|
+ if (cq_basicevaluation!=null){
|
|
|
+ cqBasicevaluation = cq_basicevaluation.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ SaveOfferQuotaInfoReq.Builder req = SaveOfferQuotaInfoReq.newBuilder();
|
|
|
req.setCsEnuu(cqFactoruu).setCsEnName("深圳市英唐保理有限公司").setFsEnuu(cqCustuu).setFsEnName(cqCustname).setQuotaAmount(cqQuota)
|
|
|
.setCredDays(cqEffectdays).setFinanceRate(cqLendrate).setOfferRate(cqAnnualrate).setRepayment(
|
|
|
cqRepaymentmeans).setApplyUu(cqRecorderuu);
|
|
|
@@ -867,8 +888,18 @@ public class B2BInformation extends AbstractTask{
|
|
|
String s = ProtoBufUtil.toJSON(resp);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(s);
|
|
|
Object code = JSONObject.parseObject(jsonObject.get("respHeader").toString()).get("code");
|
|
|
- if ("0".equals(code.toString())){
|
|
|
- sqlList.add("update customerQuota set CQ_UPLOADSTATUS = '已上传' where cq_id = " + map.get("CQ_ID"));
|
|
|
+ Object msg = JSONObject.parseObject(jsonObject.get("respHeader").toString()).get("msg");
|
|
|
+ if ("0".equals(code.toString())||(msg!=null&&"您已经为该企业申请过报价额度,请不要重复申请".equals(msg.toString()))){
|
|
|
+ UpdateOfferQuotaInfoReq.Builder builder = UpdateOfferQuotaInfoReq.newBuilder();
|
|
|
+ builder.setCsEnuu(cqFactoruu).setFsEnuu(cqCustuu).setStatus(cqApproval).setEndTime(cqEnddate)
|
|
|
+ .setCheckerContent(cqBasicevaluation).setCheckUu(cqRecorderuu);
|
|
|
+ UpdateOfferQuotaInfoResp infoResp = capitalSideSdk.updateOfferQuotaInfo(builder);
|
|
|
+ String ss = ProtoBufUtil.toJSON(infoResp);
|
|
|
+ JSONObject json = JSONObject.parseObject(ss);
|
|
|
+ Object code1 = JSONObject.parseObject(json.get("respHeader").toString()).get("code");
|
|
|
+ if ("0".equals(code1.toString())) {
|
|
|
+ sqlList.add("update customerQuota set CQ_UPLOADSTATUS = '已上传' where cq_id = " + map.get("CQ_ID"));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(sqlList)) {
|
|
|
@@ -885,9 +916,10 @@ public class B2BInformation extends AbstractTask{
|
|
|
private List<Map<String, Object>> getCustomerQuotaUpload() {
|
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList("select * from (select cq_id,cq_factoruu," +
|
|
|
"cq_custuu,cq_custname,cq_effectdays,cq_quota,cq_lendrate,cq_annualrate," +
|
|
|
- "cq_repaymentmeans,cq_recorderuu from " +
|
|
|
+ "cq_repaymentmeans,cq_recorderuu,cq_approval,cq_enddate,cq_basicevaluation from " +
|
|
|
"customerQuota where " +
|
|
|
- "CQ_UPLOADSTATUS='待上传' and cq_quotatype='卖方客户' order by cq_code ) where rownum < 100");
|
|
|
+ "CQ_UPLOADSTATUS='待上传' and cq_status = '已审核' and cq_quotatype='卖方客户' order by cq_code ) where rownum " +
|
|
|
+ "< 100");
|
|
|
return maps;
|
|
|
}
|
|
|
|