From 0f255e474665042c151e0fdfb308ae09a11a15f0 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期六, 07 八月 2021 13:44:38 +0800
Subject: [PATCH] delete bin dir
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 38726d4..727a50f 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -22,13 +22,13 @@
DataSet ds;
DataSet ds1;
string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
-
- /// <summary>
- /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
- [Route("Cj_StationOutBill/AddBill")]
+
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Cj_StationOutBill/AddBill")]
[HttpPost]
public object AddBill([FromBody] JObject oMain)
{
@@ -390,9 +390,9 @@
///鍙傛暟锛歴tring sql銆�
///杩斿洖鍊硷細object銆�
/// </summary>
- [Route("Cj_StationOutBill/list")]
+ [Route("Cj_StationOutBill/get_Display")]
[HttpGet]
- public object list(string sWhere)
+ public object get_Display(string sWhere)
{
try
{
@@ -484,7 +484,8 @@
string HRemark = HttpContext.Current.Request.Params["HRemark"]; //澶囨敞
string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜�
HttpPostedFile files = HttpContext.Current.Request.Files["file"];
- string path = HttpContext.Current.Server.MapPath("~/Files/" + HBillNo);
+ string path = HttpContext.Current.Server.MapPath("~/../Files/" + HBillNo);
+ //string path = @"D:\\Files\\"+ HBillNo;
dynamic dyResult = UpLoadFile(files, path, HBillNo, HRemark, HUserName);
if (dyResult != null && dyResult.result == 1)
{
@@ -498,7 +499,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "涓婁紶澶辫触锛�";
+ objJsonResult.Message = dyResult.returnval;
objJsonResult.data = null;
return objJsonResult;
}
@@ -539,7 +540,7 @@
{
File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
files.SaveAs(fileurl);
- string StrPath = "/Files/"+ HBillNo+"/"+ filename;
+ string StrPath = "/files/"+ HBillNo+"/"+ filename;
if (File.Exists(fileurl))
{
//杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -562,7 +563,7 @@
{
Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶�
files.SaveAs(fileurl);
- string StrPath = "/Files/" + HBillNo + "/" + filename;
+ string StrPath = "/files/" + HBillNo + "/" + filename;
if (File.Exists(fileurl))
{
//杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
@@ -612,10 +613,11 @@
[HttpGet]
public object Filelist(string HBillNo)
{
- var url = fileip + "/Files/" + HBillNo+"/";
+ var url = fileip + "/files/" + HBillNo+"/";
+ //@"C:\\files\\"
try
{
- ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo=" + HBillNo, "MES_AccessoriesList");
+ ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HBillNo+"'", "MES_AccessoriesList");
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
@@ -644,16 +646,15 @@
{
try
{
-
- ds = oCN.RunProcReturn("delete from MES_AccessoriesList where HItemID ='" + HItemID + "'", "MES_AccessoriesList");
- string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/Files/" + HSourceBillNo), HFileName);
+
+ oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
+ string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/" + HSourceBillNo), HFileName);
File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
objJsonResult.data = null;
return objJsonResult;
-
}
catch (Exception e)
{
--
Gitblit v1.9.1