Explorar el Código

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

xsl hace 4 meses
padre
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);
                 if (responseObject.getResultCode() == CommonConstant.JK_RETURN_CODE_MATCH) {
                     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 {
                 responseObject.setResultCode(CommonConstant.JK_RETURN_CODE_OTHER_ERROR);
@@ -191,6 +201,8 @@ public class LocationServiceImpl implements LocationService {
         JSONObject chargeObject = new JSONObject();
         chargeObject.put("transationId", transactionId);
         chargeObject.put("isCharge", isDataOriginCharge);
+        chargeObject.put("plateNumber", requestObject.getCustomBody().getPlateNum());
+        chargeObject.put("time", requestObject.getCustomBody().getTime());
         ORIGINAL_CHARGE_LOGGER.info(chargeObject.toJSONString());
 
         chargeObject.put("isCharge", isCharge);