|
@@ -1000,7 +1000,7 @@ public class WxController {
|
|
|
|
|
|
|
|
|
// parkingRecord.setPayAmount(payAmount);
|
|
|
- parkingRecord.setPayAmount(new BigDecimal(0.01));
|
|
|
+ parkingRecord.setPayAmount(payAmount);
|
|
|
|
|
|
|
|
|
parkingRecord.setSerialNumber(serialNumber);
|
|
@@ -1092,36 +1092,38 @@ public class WxController {
|
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("deviceCode", deviceCode);
|
|
|
- // net.sf.json.JSONObject jsonObject = parkApiUtil.httpRequest("/ipms/payment/bydevice", accessToken, "POST", map);
|
|
|
+ net.sf.json.JSONObject jsonObject1 = parkApiUtil.httpRequest("/ipms/payment/bydevice", accessToken, "POST", map);
|
|
|
|
|
|
|
|
|
//测试死数据,部署是删除
|
|
|
- net.sf.json.JSONObject jsonObject1 = new net.sf.json.JSONObject();
|
|
|
- jsonObject1.put("errMsg","success");
|
|
|
- HashMap<String,Object> ceMap = new HashMap<>();
|
|
|
- ceMap.put("carNumImgUrl","http://172.7.2.185:8082/d/1000033$1$0$0/20170629/10/2859-427-1.jpg");
|
|
|
- ceMap.put("carImgUrl", "http://172.7.2.185:8082/d/1000033$1$0$0/20170629/10/2859-427-0.jpg");
|
|
|
- ceMap.put("carNum","鄂D1234");
|
|
|
- ceMap.put("carType",1);
|
|
|
- ceMap.put("chargeDetail","停车时长42秒,收费金额0.01元");
|
|
|
- ceMap.put("inParkTime",1586926518000L);
|
|
|
- ceMap.put("ownerType",0);
|
|
|
- ceMap.put("parkCode","null_yu");
|
|
|
- ceMap.put("parkName","yu");
|
|
|
- ceMap.put("parkTime",42);
|
|
|
- ceMap.put("state",1);
|
|
|
- ceMap.put("receivableMoney",0.01);
|
|
|
- jsonObject1.put("data",ceMap);
|
|
|
+// net.sf.json.JSONObject jsonObject1 = new net.sf.json.JSONObject();
|
|
|
+// jsonObject1.put("errMsg","success");
|
|
|
+// HashMap<String,Object> ceMap = new HashMap<>();
|
|
|
+// ceMap.put("carNumImgUrl","http://172.7.2.185:8082/d/1000033$1$0$0/20170629/10/2859-427-1.jpg");
|
|
|
+// ceMap.put("carImgUrl", "http://172.7.2.185:8082/d/1000033$1$0$0/20170629/10/2859-427-0.jpg");
|
|
|
+// ceMap.put("carNum","鄂D1234");
|
|
|
+// ceMap.put("carType",1);
|
|
|
+// ceMap.put("chargeDetail","停车时长42秒,收费金额0.01元");
|
|
|
+// ceMap.put("inParkTime",1586926518000L);
|
|
|
+// ceMap.put("ownerType",0);
|
|
|
+// ceMap.put("parkCode","null_yu");
|
|
|
+// ceMap.put("parkName","yu");
|
|
|
+// ceMap.put("parkTime",42);
|
|
|
+// ceMap.put("state",1);
|
|
|
+// ceMap.put("receivableMoney",0.01);
|
|
|
+// jsonObject1.put("data",ceMap);
|
|
|
|
|
|
if (jsonObject1.getString("errMsg").equals("success")) {
|
|
|
|
|
|
net.sf.json.JSONObject dataJson = (net.sf.json.JSONObject) jsonObject1.get("data");
|
|
|
Integer state = dataJson.getInt("state");
|
|
|
HashMap<String, Object> dataMap = new HashMap<>();
|
|
|
- if (dataJson.size()>0) {
|
|
|
+ if (dataJson.size()>0 && state ==1) {
|
|
|
+ System.out.println(dataJson.toString());
|
|
|
|
|
|
BigDecimal parkingTime = new BigDecimal(dataJson.getString("parkTime"));
|
|
|
- Date inParkingTime = DateUtil.date(dataJson.getLong("inParkTime"));
|
|
|
+ Date inParkingTime = DateUtil.parse(dataJson.getString("inParkTime"));
|
|
|
+ // Date inParkingTime = DateUtil.date(dataJson.getLong("inParkTime"));
|
|
|
BigDecimal payAmount = new BigDecimal(dataJson.getString("receivableMoney"));
|
|
|
String serialNumber = com.jpsoft.smart.modules.common.utils.StringUtils.getOutTradeNo();
|
|
|
ParkingRecord parkingRecord = new ParkingRecord();
|
|
@@ -1167,6 +1169,8 @@ public class WxController {
|
|
|
dataMap.put("receivableMoney", dataJson.getString("receivableMoney"));*/
|
|
|
|
|
|
data = dataMap;
|
|
|
+ }else {
|
|
|
+ return new MessageResult(false, "无收费数据", data, 400);
|
|
|
}
|
|
|
|
|
|
|