devin.zhu@doverfs.com 7 months ago
parent
commit
46df986110

+ 28 - 0
Ai.AgentServer/Config/NLog.config

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+	<targets>
+		<!--此部分中的所有目标将自动异步-->
+		<target name="asyncFile" xsi:type="AsyncWrapper">
+			<!--项目日志保存文件路径说明fileName="${basedir}/保存目录,以年月日的格式创建/${shortdate}/${记录器名称}-${单级记录}-${shortdate}.txt"-->
+			<target name="log_file" xsi:type="File"
+					fileName="${basedir}/ProjectLogs/${shortdate}/${logger}-${level}-${shortdate}.txt"
+					layout="${longdate} | ${message} ${onexception:${exception:format=message} ${newline} ${stacktrace} ${newline}"
+					archiveFileName="${basedir}/archives/${logger}-${level}-${shortdate}-{#####}.txt"
+					archiveAboveSize="102400"
+					archiveNumbering="Sequence"
+					concurrentWrites="true"
+					keepFileOpen="false" />
+		</target>
+		<!--使用可自定义的着色将日志消息写入控制台-->
+		<target name="colorConsole" xsi:type="ColoredConsole" layout="[${date:format=HH\:mm\:ss}]:${message} ${exception:format=message}" />
+	</targets>
+
+	<!--规则配置,final - 最终规则匹配后不处理任何规则-->
+	<rules>
+		<logger name="Microsoft.*" minlevel="Info" writeTo="" final="true" />
+		<logger name="*" minlevel="Info" writeTo="asyncFile" />
+		<logger name="*" minlevel="Warn" writeTo="colorConsole" />
+	</rules>
+</nlog>

+ 9 - 10
Ai.AgentServer/Server/FuelDto/FuelSendRequest.cs

@@ -86,20 +86,19 @@ namespace Ai.AgentServer.Server.Fuel
                     dto.textInput.payload = new Refuel_card_refund() { 
                         CardType = CardType,
                         OilCode = OilCode,
-                        Balance=Balance,
-                        MaxRefuelingAmount=MaxRefuelingAmount,
-                        NozzleNo= NozzleNo
+                        balance=Balance,
+                        maxRefuelingAmount=MaxRefuelingAmount,
+                        nozzleNo= NozzleNo
                     };
                     break;
                     //车队车牌限制的结果
                 case "refuel_card_send_license_plate_match":
-                   
                         dto.textInput.payload = new Refuel_card_send_license_plate_match()
                         {
                             CardType = CardType,
                             OilCode = OilCode,
                             LicensePlateMatching = LicensePlateMatching,
-                            NozzleNo = NozzleNo
+                            nozzleNo = NozzleNo
                         };
                     break;
                 case "fuelSend":
@@ -109,11 +108,11 @@ namespace Ai.AgentServer.Server.Fuel
                     dto.textInput.payload = new Refuel_out_process() { 
                         CardType = CardType,
                         OilCode = OilCode,
-                        Amount = Amount,
-                        Balance= Balance,
-                        NozzleNo= NozzleNo,
-                        Vol= Vol,
-                        MaxRefuelingAmount = MaxRefuelingAmount 
+                        amount = Amount,
+                        balance= Balance,
+                        nozzleNo= NozzleNo,
+                        vol= Vol,
+                        maxRefuelingAmount = MaxRefuelingAmount 
                     };
                     break;
                 default:

+ 8 - 8
Ai.AgentServer/Server/FuelDto/HttpThirdRequest.cs

@@ -44,13 +44,13 @@
         /// <summary>
         ///   //卡余额
         /// </summary>
-        public int NozzleNo { get; set; }
+        public int nozzleNo { get; set; }
 
         public CardPayload(int cardType, string oilCode, int nozzleNo)
         {
             CardType = cardType;
             OilCode = oilCode;
-            NozzleNo = nozzleNo;
+            nozzleNo = nozzleNo;
         }
         public CardPayload()
         {
@@ -67,21 +67,21 @@
         /// <summary>
         /// 金额
         /// </summary>
-        public decimal Amount { get; set; }
+        public decimal amount { get; set; }
 
         /// <summary>
         /// 升数
         /// </summary>
-        public decimal Vol { get; set; }
+        public decimal vol { get; set; }
         /// <summary>
         ///   卡余额
         /// </summary>
-        public decimal Balance { get; set; }
+        public decimal balance { get; set; }
 
         /// <summary>
         /// 最大可加金额
         /// </summary>
-        public decimal MaxRefuelingAmount { get; set; }
+        public decimal maxRefuelingAmount { get; set; }
     }
 
     /// <summary>
@@ -93,12 +93,12 @@
         /// <summary>
         ///   卡余额
         /// </summary>
-        public decimal Balance { get; set; }
+        public decimal balance { get; set; }
 
         /// <summary>
         ///   最大的可加金额
         /// </summary>
-        public decimal MaxRefuelingAmount { get; set; }
+        public decimal maxRefuelingAmount { get; set; }
     }
 
     /// <summary>