Commit fc859bb5 authored by solho's avatar solho

UP

parent 543ec192
......@@ -163,7 +163,7 @@
</site>
<site name="WebAPI" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\work\翼勝\WADE\WEB_CODE\CODE\WebAPI" />
<virtualDirectory path="/" physicalPath="D:\work\翼勝\WADE\WEB_CODE\WebAPI" />
</application>
<bindings>
<binding protocol="https" bindingInformation="*:44339:localhost" />
......
......@@ -25,7 +25,7 @@ using System.Web;
if (context.Request.HttpMethod.ToUpper() == "OPTIONS")
{
context.Response.StatusCode = 200;
context.Response.End();
//context.Response.End();
}
}
}
......@@ -46,7 +46,7 @@ namespace WebAPI.Controllers
public String finish_date { get; set; }
public String score { get; set; }
public int Count { get; set; }
public int rejectCount { get; set; }
}
public class MessageList
{
......@@ -76,6 +76,11 @@ namespace WebAPI.Controllers
private String u_user_id;
#region 核稿歷史
/// <summary>
/// 取得歷史明細
/// </summary>
/// <param name="Get_cur_his_id"></param>
/// <returns></returns>
[Route("Get_cur_his")]
[HttpPost]
[HttpGet]
......@@ -158,7 +163,11 @@ namespace WebAPI.Controllers
return output.ToString();
}
/// <summary>
/// 下載歷史明細EXCEL
/// </summary>
/// <param name="trids"></param>
/// <returns></returns>
[Route("Download_cur_hiss_Excel")]
[HttpPost]
[HttpGet]
......@@ -238,6 +247,12 @@ namespace WebAPI.Controllers
//result.Content.Headers.Add("CodePage", Encoding.ASCII.CodePage.ToString());
return response;
}
/// <summary>
/// 取得多個ID時歷史資料
/// </summary>
/// <param name="trids"></param>
/// <returns></returns>
[Route("Get_cur_hiss")]
[HttpPost]
[HttpGet]
......@@ -252,7 +267,7 @@ namespace WebAPI.Controllers
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(',');
using (SqlConnection Conn = new SqlConnection(connString))
{
......@@ -276,7 +291,7 @@ namespace WebAPI.Controllers
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";
}
else
......@@ -301,7 +316,8 @@ namespace WebAPI.Controllers
hisT = new 核稿歷史()
{
eflow_id = dr["eflow_id"].ToString(),
Count = dr["count"].GetInt()
Count = dr["count"].GetInt(),
rejectCount= dr["rejectCount"].GetInt()
};
}
else
......@@ -343,7 +359,7 @@ namespace WebAPI.Controllers
[HttpOptions]
//[EnableCors(origins: "*", headers: "*", methods: "*")]
//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;
HttpRequest Req = HttpContext.Current.Request;
......
......@@ -12,7 +12,7 @@
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>./publish</publishUrl>
<publishUrl>.\publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\work\翼勝\WADE\WEB_CODE\CODE\WebAPI\./publish</_PublishTargetUrl>
<_PublishTargetUrl>D:\work\翼勝\WADE\WEB_CODE\WebAPI\.\publish</_PublishTargetUrl>
</PropertyGroup>
<ItemGroup>
<File Include="App_Code/HelloWorldModule.cs">
......@@ -382,10 +382,10 @@
<publishTime>10/19/2018 08:25:23</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>10/05/2020 10:29:26</publishTime>
<publishTime>10/05/2020 11:09:54</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>10/05/2020 10:29:26</publishTime>
<publishTime>10/05/2020 11:09:54</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime>
......@@ -517,7 +517,7 @@
<publishTime>06/30/2020 15:50:34</publishTime>
</File>
<File Include="Web.config">
<publishTime>10/05/2020 10:28:08</publishTime>
<publishTime>10/05/2020 11:03:27</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -30,9 +30,10 @@
</modules>
<!--<httpProtocol>
<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-Headers" value="Content-Type,Accept" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>-->
<staticContent>
......
No preview for this file type
......@@ -30,9 +30,10 @@
</modules>
<!--<httpProtocol>
<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-Headers" value="Content-Type,Accept" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>-->
<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