Commit fc859bb5 authored by solho's avatar solho

UP

parent 543ec192
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
</site> </site>
<site name="WebAPI" id="2"> <site name="WebAPI" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\work\翼勝\WADE\WEB_CODE\CODE\WebAPI" /> <virtualDirectory path="/" physicalPath="D:\work\翼勝\WADE\WEB_CODE\WebAPI" />
</application> </application>
<bindings> <bindings>
<binding protocol="https" bindingInformation="*:44339:localhost" /> <binding protocol="https" bindingInformation="*:44339:localhost" />
......
...@@ -25,7 +25,7 @@ using System.Web; ...@@ -25,7 +25,7 @@ using System.Web;
if (context.Request.HttpMethod.ToUpper() == "OPTIONS") if (context.Request.HttpMethod.ToUpper() == "OPTIONS")
{ {
context.Response.StatusCode = 200; context.Response.StatusCode = 200;
context.Response.End(); //context.Response.End();
} }
} }
} }
...@@ -46,7 +46,7 @@ namespace WebAPI.Controllers ...@@ -46,7 +46,7 @@ namespace WebAPI.Controllers
public String finish_date { get; set; } public String finish_date { get; set; }
public String score { get; set; } public String score { get; set; }
public int Count { get; set; } public int Count { get; set; }
public int rejectCount { get; set; }
} }
public class MessageList public class MessageList
{ {
...@@ -76,6 +76,11 @@ namespace WebAPI.Controllers ...@@ -76,6 +76,11 @@ namespace WebAPI.Controllers
private String u_user_id; private String u_user_id;
#region 核稿歷史 #region 核稿歷史
/// <summary>
/// 取得歷史明細
/// </summary>
/// <param name="Get_cur_his_id"></param>
/// <returns></returns>
[Route("Get_cur_his")] [Route("Get_cur_his")]
[HttpPost] [HttpPost]
[HttpGet] [HttpGet]
...@@ -158,7 +163,11 @@ namespace WebAPI.Controllers ...@@ -158,7 +163,11 @@ namespace WebAPI.Controllers
return output.ToString(); return output.ToString();
} }
/// <summary>
/// 下載歷史明細EXCEL
/// </summary>
/// <param name="trids"></param>
/// <returns></returns>
[Route("Download_cur_hiss_Excel")] [Route("Download_cur_hiss_Excel")]
[HttpPost] [HttpPost]
[HttpGet] [HttpGet]
...@@ -238,6 +247,12 @@ namespace WebAPI.Controllers ...@@ -238,6 +247,12 @@ namespace WebAPI.Controllers
//result.Content.Headers.Add("CodePage", Encoding.ASCII.CodePage.ToString()); //result.Content.Headers.Add("CodePage", Encoding.ASCII.CodePage.ToString());
return response; return response;
} }
/// <summary>
/// 取得多個ID時歷史資料
/// </summary>
/// <param name="trids"></param>
/// <returns></returns>
[Route("Get_cur_hiss")] [Route("Get_cur_hiss")]
[HttpPost] [HttpPost]
[HttpGet] [HttpGet]
...@@ -252,7 +267,7 @@ namespace WebAPI.Controllers ...@@ -252,7 +267,7 @@ namespace WebAPI.Controllers
try try
{ {
isCount = (!String.IsNullOrEmpty(Req.Form["isCount"]))? Boolean.Parse(Req.Form["isCount"]) :false; isCount = (!String.IsNullOrEmpty(Req.Form["isCount"]))? Boolean.Parse(Req.Form["isCount"]) :false;
String[] strids = String.IsNullOrEmpty(Req.Form["trids"]) ? "".Split(','): Req.Form["trids"].Split(','); String[] strids = String.IsNullOrEmpty(Req.Form["trids"]) ? "".Split(','): Req.Form["trids"].Split(',');
using (SqlConnection Conn = new SqlConnection(connString)) using (SqlConnection Conn = new SqlConnection(connString))
{ {
...@@ -276,7 +291,7 @@ namespace WebAPI.Controllers ...@@ -276,7 +291,7 @@ namespace WebAPI.Controllers
if (isCount) if (isCount)
{ {
fields = @" eflow_id,count(1) as Count"; fields = @" eflow_id,count(1) as Count,count(case when audit_id='reject' then 1 end) as rejectCount";
Groups = @" group by a.eflow_id"; Groups = @" group by a.eflow_id";
} }
else else
...@@ -301,7 +316,8 @@ namespace WebAPI.Controllers ...@@ -301,7 +316,8 @@ namespace WebAPI.Controllers
hisT = new 核稿歷史() hisT = new 核稿歷史()
{ {
eflow_id = dr["eflow_id"].ToString(), eflow_id = dr["eflow_id"].ToString(),
Count = dr["count"].GetInt() Count = dr["count"].GetInt(),
rejectCount= dr["rejectCount"].GetInt()
}; };
} }
else else
...@@ -343,7 +359,7 @@ namespace WebAPI.Controllers ...@@ -343,7 +359,7 @@ namespace WebAPI.Controllers
[HttpOptions] [HttpOptions]
//[EnableCors(origins: "*", headers: "*", methods: "*")] //[EnableCors(origins: "*", headers: "*", methods: "*")]
//public MessageList Get_cur_hiss([FromBody] CurHisParam chp) //public MessageList Get_cur_hiss([FromBody] CurHisParam chp)
public MessageList Get_cur_hiss_test(String trids) public MessageList Get_cur_hiss_test([FromBody] List<CurHisParam> chp)
{ {
String connString = ConfigurationManager.ConnectionStrings["eflow_cur"].ConnectionString; String connString = ConfigurationManager.ConnectionStrings["eflow_cur"].ConnectionString;
HttpRequest Req = HttpContext.Current.Request; HttpRequest Req = HttpContext.Current.Request;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data> <ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>./publish</publishUrl> <publishUrl>.\publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles> <DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile /> <TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\work\翼勝\WADE\WEB_CODE\CODE\WebAPI\./publish</_PublishTargetUrl> <_PublishTargetUrl>D:\work\翼勝\WADE\WEB_CODE\WebAPI\.\publish</_PublishTargetUrl>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<File Include="App_Code/HelloWorldModule.cs"> <File Include="App_Code/HelloWorldModule.cs">
...@@ -382,10 +382,10 @@ ...@@ -382,10 +382,10 @@
<publishTime>10/19/2018 08:25:23</publishTime> <publishTime>10/19/2018 08:25:23</publishTime>
</File> </File>
<File Include="bin/WebAPI.dll"> <File Include="bin/WebAPI.dll">
<publishTime>10/05/2020 10:29:26</publishTime> <publishTime>10/05/2020 11:09:54</publishTime>
</File> </File>
<File Include="bin/WebAPI.pdb"> <File Include="bin/WebAPI.pdb">
<publishTime>10/05/2020 10:29:26</publishTime> <publishTime>10/05/2020 11:09:54</publishTime>
</File> </File>
<File Include="bin/WebGrease.dll"> <File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime> <publishTime>01/23/2014 13:57:34</publishTime>
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
<publishTime>06/30/2020 15:50:34</publishTime> <publishTime>06/30/2020 15:50:34</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>10/05/2020 10:28:08</publishTime> <publishTime>10/05/2020 11:03:27</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>
\ No newline at end of file
...@@ -30,9 +30,10 @@ ...@@ -30,9 +30,10 @@
</modules> </modules>
<!--<httpProtocol> <!--<httpProtocol>
<customHeaders> <customHeaders>
<add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Origin" value="http://120.78.73.107:8888" />
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type,Accept" /> <add name="Access-Control-Allow-Headers" value="Content-Type,Accept" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders> </customHeaders>
</httpProtocol>--> </httpProtocol>-->
<staticContent> <staticContent>
......
No preview for this file type
...@@ -30,9 +30,10 @@ ...@@ -30,9 +30,10 @@
</modules> </modules>
<!--<httpProtocol> <!--<httpProtocol>
<customHeaders> <customHeaders>
<add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Origin" value="http://120.78.73.107:8888" />
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type,Accept" /> <add name="Access-Control-Allow-Headers" value="Content-Type,Accept" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders> </customHeaders>
</httpProtocol>--> </httpProtocol>-->
<staticContent> <staticContent>
......
No preview for this file type
973886b614e42b721820abe0334c683c6cbbc70d 7e393cda9ad7d8f49fb6c77ff39640c75ea1c48a
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment