Browse Source

调整计费日志-历史提交内容

xsl 2 months ago
parent
commit
5cb7f977b2

+ 12 - 0
src/main/java/com/jkcredit/location/service/impl/LocationServiceImpl.java

@@ -110,6 +110,16 @@ public class LocationServiceImpl implements LocationService {
                 setCarHistoricalTrajectoryResponse(responseObject, historyLocationResponseObject);
                 setCarHistoricalTrajectoryResponse(responseObject, historyLocationResponseObject);
                 if (responseObject.getResultCode() == CommonConstant.JK_RETURN_CODE_MATCH) {
                 if (responseObject.getResultCode() == CommonConstant.JK_RETURN_CODE_MATCH) {
                     chargeHandle(requestObject, username, transationId);
                     chargeHandle(requestObject, username, transationId);
+                } else {
+                    JSONObject chargeObject = new JSONObject();
+                    chargeObject.put("transationId", transationId);
+                    chargeObject.put("isCharge", false);
+                    chargeObject.put("plateNumber", requestObject.getCustomBody().getPlateNum());
+                    chargeObject.put("time", requestObject.getCustomBody().getTime());
+                    ORIGINAL_CHARGE_LOGGER.info(chargeObject.toJSONString());
+
+                    chargeObject.put("user", username);
+                    CLIENT_CHARGE_LOGGER.info(chargeObject.toJSONString());
                 }
                 }
             } else {
             } else {
                 responseObject.setResultCode(CommonConstant.JK_RETURN_CODE_OTHER_ERROR);
                 responseObject.setResultCode(CommonConstant.JK_RETURN_CODE_OTHER_ERROR);
@@ -191,6 +201,8 @@ public class LocationServiceImpl implements LocationService {
         JSONObject chargeObject = new JSONObject();
         JSONObject chargeObject = new JSONObject();
         chargeObject.put("transationId", transactionId);
         chargeObject.put("transationId", transactionId);
         chargeObject.put("isCharge", isDataOriginCharge);
         chargeObject.put("isCharge", isDataOriginCharge);
+        chargeObject.put("plateNumber", requestObject.getCustomBody().getPlateNum());
+        chargeObject.put("time", requestObject.getCustomBody().getTime());
         ORIGINAL_CHARGE_LOGGER.info(chargeObject.toJSONString());
         ORIGINAL_CHARGE_LOGGER.info(chargeObject.toJSONString());
 
 
         chargeObject.put("isCharge", isCharge);
         chargeObject.put("isCharge", isCharge);