...
|
...
|
@@ -13,6 +13,7 @@ import com.sunyo.energy.location.service.WaterMeterService; |
|
|
import com.sunyo.energy.location.utils.AllUtils;
|
|
|
import com.sunyo.energy.location.utils.HttpsUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -35,6 +36,21 @@ public class WaterMeterServiceImp implements WaterMeterService { |
|
|
|
|
|
@Autowired
|
|
|
private LocationMapper locationMapper;
|
|
|
|
|
|
@Value("${payInfo.merchantid}")
|
|
|
private String MERCHANTIDS;
|
|
|
|
|
|
@Value("${payInfo.posid}")
|
|
|
private String POSIDS;
|
|
|
|
|
|
@Value("${payInfo.branchid}")
|
|
|
private String BRANCHIDS;
|
|
|
|
|
|
@Value("${payInfo.txcode}")
|
|
|
private String TXCODES;
|
|
|
|
|
|
@Value("${payInfo.pub32tr2}")
|
|
|
private String PUB32TR2S;
|
|
|
/**
|
|
|
* 查询所有水表
|
|
|
*/
|
...
|
...
|
@@ -163,11 +179,12 @@ public class WaterMeterServiceImp implements WaterMeterService { |
|
|
@Override
|
|
|
public ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId) throws UnsupportedEncodingException {
|
|
|
ResultJson<Object> resultJson = new ResultJson<>();
|
|
|
QrDemo qrDemo = new QrDemo(MERCHANTIDS,POSIDS,BRANCHIDS,TXCODES,PUB32TR2S);
|
|
|
// 成功生成水费订单
|
|
|
if (!"".equals(wmId)) {
|
|
|
PayRecords payRecords = payRecords(payFees, wmId, userId, realName, "");
|
|
|
// 请求返回二维码lujing
|
|
|
String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees);
|
|
|
String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees);
|
|
|
|
|
|
if (!"".equals(url)) {
|
|
|
payRecords.setReamke2(url);
|
...
|
...
|
@@ -185,7 +202,7 @@ public class WaterMeterServiceImp implements WaterMeterService { |
|
|
|
|
|
PayRecords payRecords = payRecords(payFees, "", userId, realName, eeId);
|
|
|
// 请求返回二维码lujing
|
|
|
String url = QrDemo.orUrl(payRecords.getOrdernumber(), payFees);
|
|
|
String url = qrDemo.orUrl(payRecords.getOrdernumber(), payFees);
|
|
|
|
|
|
if (!"".equals(url)) {
|
|
|
payRecords.setReamke2(url);
|
...
|
...
|
@@ -217,9 +234,8 @@ public class WaterMeterServiceImp implements WaterMeterService { |
|
|
// 充值最后立方水数值
|
|
|
String s = AllUtils.nubmerDivision(payFees);
|
|
|
// 查询累计充值量
|
|
|
String oneWmSacc = waterMeterMapper.findOneWmSacc(wmId);
|
|
|
|
|
|
String allSacc = AllUtils.nubmerAdd(s, oneWmSacc);
|
|
|
WaterMeter realTime = findRealTime(wmId);
|
|
|
String allSacc = AllUtils.nubmerAdd(s, realTime.getWmSacc());
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
datas.put("MtId", wmId);
|
|
|
datas.put("Add_sacc", allSacc);
|
...
|
...
|
|