Sfoglia il codice sorgente

修改县级监管平台接口的参数错误bug

zhoufan 8 anni fa
parent
commit
11bd963538

+ 8 - 20
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/County/CountyBusinessController.cs

@@ -57,20 +57,14 @@ namespace CallCenterApi.Interface.Controllers.County
57 57
         /// <param name="start"></param>
58 58
         /// <param name="end"></param>
59 59
         /// <returns></returns>
60
-        public ActionResult GetAreaAccept(string branchcode,DateTime? start, DateTime? end, int isdc = 0)
60
+        public ActionResult GetAreaAccept(string branchcode,DateTime? date, int isdc = 0)
61 61
         {
62
-            if (start == null)
62
+            if (date == null)
63 63
             {
64
-                start = DateTime.Now;
65
-                start = new DateTime(start.Value.Year, start.Value.Month, 1);
66
-            }
67
-            if (end == null)
68
-            {
69
-                end = DateTime.Now;
64
+                date = DateTime.Now;
70 65
             }
71 66
             Dictionary<string, string> paras = new Dictionary<string, string>();
72
-            paras.Add("@sdate", start.Value.ToString("yyyy-MM-dd"));
73
-            paras.Add("@edate", end.Value.ToString("yyyy-MM-dd"));
67
+            paras.Add("@date", date.Value.ToString("yyyy-MM"));
74 68
             var obj = DbHelperSQL.RunProcedure("P_AreaAcceptReport", paras, "AreaAcceptReport");
75 69
             if (isdc > 0)
76 70
             {
@@ -94,20 +88,14 @@ namespace CallCenterApi.Interface.Controllers.County
94 88
         /// <param name="start"></param>
95 89
         /// <param name="end"></param>
96 90
         /// <returns></returns>
97
-        public ActionResult GetAreaDeal(string branchcode,DateTime? start, DateTime? end, int isdc = 0)
91
+        public ActionResult GetAreaDeal(string branchcode, DateTime? date, int isdc = 0)
98 92
         {
99
-            if (start == null)
93
+            if (date == null)
100 94
             {
101
-                start = DateTime.Now;
102
-                start = new DateTime(start.Value.Year, start.Value.Month, 1);
103
-            }
104
-            if (end == null)
105
-            {
106
-                end = DateTime.Now;
95
+                date = DateTime.Now;
107 96
             }
108 97
             Dictionary<string, string> paras = new Dictionary<string, string>();
109
-            paras.Add("@sdate", start.Value.ToString("yyyy-MM-dd"));
110
-            paras.Add("@edate", end.Value.ToString("yyyy-MM-dd"));
98
+            paras.Add("@date", date.Value.ToString("yyyy-MM"));
111 99
             var obj = DbHelperSQL.RunProcedure("P_AreaDealReport", paras, "AreaDealReport");
112 100
             if (isdc > 0)
113 101
             {