| @@ -85,26 +85,9 @@ public class BillNotificationSchedule { | |||||
| BigDecimal price = needPay.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); | BigDecimal price = needPay.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN); | ||||
| String phone = bill.get("linkPhone").toString(); | String phone = bill.get("linkPhone").toString(); | ||||
| String appname = bill.get("appname").toString(); | String appname = bill.get("appname").toString(); | ||||
| String merchantName = bill.get("merchantName").toString(); | |||||
| logger.info("待缴账单检验短信配置信息"); | logger.info("待缴账单检验短信配置信息"); | ||||
| // WxMsgConfig wxMsgConfig = checkMsgConfig(tenantId); | |||||
| // if (wxMsgConfig != null) { | |||||
| // logger.info("待缴账单获取模板内容"); | |||||
| // WxMsgValidationcodeModel wxMsgValidationcodeModel = getMsgModel(tenantId, EnumMsgModel.BILL_WAIT_PAY.getCode()); | |||||
| // if (wxMsgValidationcodeModel != null) { | |||||
| // String signature = wxMsgValidationcodeModel.getSignature(); | |||||
| // String msg = wxMsgValidationcodeModel.getContent(). | |||||
| // replace("{price}", price.toString()). | |||||
| // replace("{date}", receiveDate). | |||||
| // replace("{app}", appname); | |||||
| // String notifyUrl = wxMsgConfig.getNotifyurl(); | |||||
| // String secret = wxMsgConfig.getSecret(); | |||||
| // String bid = wxMsgConfig.getBid(); | |||||
| // String publickey = wxMsgConfig.getPublickey(); | |||||
| // sendWaitPayBillMsg(phone, signature, msg, notifyUrl, secret, bid, publickey); | |||||
| // } | |||||
| // } | |||||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | WxMsgRecord wxMsgRecord = new WxMsgRecord(); | ||||
| wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); | wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); | ||||
| wxMsgRecord.setModelType(EnumMsgModel.BILL_WAIT_PAY.getCode()); | wxMsgRecord.setModelType(EnumMsgModel.BILL_WAIT_PAY.getCode()); | ||||
| @@ -114,6 +97,7 @@ public class BillNotificationSchedule { | |||||
| map.put("price",price.toString()); | map.put("price",price.toString()); | ||||
| map.put("app",appname); | map.put("app",appname); | ||||
| map.put("date",receiveDate); | map.put("date",receiveDate); | ||||
| map.put("merName",merchantName); | |||||
| wxMsgRecord.setDynamicContentMap(map); | wxMsgRecord.setDynamicContentMap(map); | ||||
| mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); | mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); | ||||
| } | } | ||||
| @@ -2349,14 +2349,24 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| datamap.put("notRentTotalShop",notRentTotalShop); | datamap.put("notRentTotalShop",notRentTotalShop); | ||||
| datamap.put("notRentTotalPoint",notRentTotalPoint); | datamap.put("notRentTotalPoint",notRentTotalPoint); | ||||
| double totalRentRate = new Double(rentTotal)/new Double(total)*100; | |||||
| datamap.put("rentTotalRate",formatDouble(totalRentRate)); | |||||
| double rentTotalShopRate = new Double(rentTotalShop)/ new Double(totalShop)*100; | |||||
| datamap.put("rentTotalShopRate",formatDouble(rentTotalShopRate)); | |||||
| double rentTotalPointRate = new Double(rentTotalPoint)/ new Double(totalPoint)*100; | |||||
| logger.info("chartimpl rentTotalPoint:{},totalPoint:{}",rentTotalPoint,totalPoint); | |||||
| datamap.put("rentTotalPointRate",formatDouble(rentTotalPointRate)); | |||||
| if(total == 0){ | |||||
| datamap.put("rentTotalRate",0); | |||||
| }else{ | |||||
| double totalRentRate = new Double(rentTotal)/new Double(total)*100; | |||||
| datamap.put("rentTotalRate",formatDouble(totalRentRate)); | |||||
| } | |||||
| if(totalShop == 0){ | |||||
| datamap.put("rentTotalShopRate",0); | |||||
| }else{ | |||||
| double rentTotalShopRate = new Double(rentTotalShop)/ new Double(totalShop)*100; | |||||
| datamap.put("rentTotalShopRate",formatDouble(rentTotalShopRate)); | |||||
| } | |||||
| if(totalPoint == 0){ | |||||
| datamap.put("rentTotalPointRate",0); | |||||
| }else{ | |||||
| double rentTotalPointRate = new Double(rentTotalPoint)/ new Double(totalPoint)*100; | |||||
| datamap.put("rentTotalPointRate",formatDouble(rentTotalPointRate)); | |||||
| } | |||||
| return new ResultData(datamap); | return new ResultData(datamap); | ||||
| } | } | ||||
| @@ -613,9 +613,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| wxBillProperty.setExpiredDay(0L); | wxBillProperty.setExpiredDay(0L); | ||||
| } | } | ||||
| } | } | ||||
| wxBillProperty.setTenantId(wxMerchant.getTenantId()); | |||||
| wxBillProperty.setTenantId(wxPropertyContract.getTenantId()); | |||||
| wxBillProperty.setIsDel(0); | wxBillProperty.setIsDel(0); | ||||
| wxBillProperty.setMerchantId(wxMerchant.getId()); | |||||
| wxBillProperty.setMerchantId(wxPropertyContract.getMerchantId()); | |||||
| wxBillProperty.setUserId(userId); | wxBillProperty.setUserId(userId); | ||||
| wxBillProperty.setShopId(wxPropertyContract.getShopId()); | wxBillProperty.setShopId(wxPropertyContract.getShopId()); | ||||
| wxBillProperty.setCreatetime(date); | wxBillProperty.setCreatetime(date); | ||||
| @@ -962,7 +962,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| } | } | ||||
| wxBillRent.setRevenue(0L); | wxBillRent.setRevenue(0L); | ||||
| wxBillRent.setTenantId(wxMerchant.getTenantId()); | |||||
| wxBillRent.setTenantId(wxRentContract.getTenantId()); | |||||
| wxBillRent.setIsDel(0); | wxBillRent.setIsDel(0); | ||||
| wxBillRent.setMerchantId(wxMerchant.getId()); | wxBillRent.setMerchantId(wxMerchant.getId()); | ||||
| wxBillRent.setUserId(userId); | wxBillRent.setUserId(userId); | ||||
| @@ -410,7 +410,7 @@ | |||||
| </select> | </select> | ||||
| <select id="getWaitPayBillForEmail" resultType="hashmap"> | <select id="getWaitPayBillForEmail" resultType="hashmap"> | ||||
| select bill.tenant_id tenantId,bill.merchant_id merchantId,bill.receive_date receiveDate, | |||||
| select bill.tenant_id tenantId,bill.merchant_id merchantId,m.name merchantName,bill.receive_date receiveDate, | |||||
| bill.need_pay needPay,m.link_phone linkPhone,app.appname,m.email,bill.bill_type billType,ws.manager,ws.manager_phone managerPhone from ( | bill.need_pay needPay,m.link_phone linkPhone,app.appname,m.email,bill.bill_type billType,ws.manager,ws.manager_phone managerPhone from ( | ||||
| select bill.bill_type,bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) need_pay from ( | select bill.bill_type,bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) need_pay from ( | ||||
| select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' | select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' | ||||