From 4a31971e2b5cb281a83d37cbd673bfc8826f5b7c Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 06 九月 2022 17:46:35 +0800
Subject: [PATCH] 生产汇报入库 同步金蝶bug修复
---
WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 104 insertions(+), 15 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
index 4b71ae8..bd3e253 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
@@ -19,33 +19,24 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
-
/// <summary>
- /// 杩斿洖鍙戣揣閫氱煡鍗曞垪琛�
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
///鍙傛暟锛歴tring sql銆�
///杩斿洖鍊硷細object銆�
/// </summary>
- [Route("Xs_SeOutStockBill/list")]
+ [Route("Xs_SeOutStockBill/cx")]
[HttpGet]
- public object list(string sWhere)
+ public object cx(long HInterID)
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList " + sWhere, "h_v_IF_SeOutStockBillList");
- }
- else
- {
- string sql1 = "select * from h_v_IF_SeOutStockBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_SeOutStockBillList");
- }
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList where HitemID=" + HInterID, "h_v_IF_SeOutStockBillList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.Message = "false锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -68,6 +59,104 @@
}
}
+ /// <summary>
+ /// 杩斿洖鍙戣揣閫氱煡鍗曞垪琛�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Xs_SeOutStockBill/list")]
+ [HttpGet]
+ public object list(string sWhere,string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Xs_SeOutStockBillQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList order by hmainid desc", "h_v_IF_SeOutStockBillList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_IF_SeOutStockBillList where 1 = 1 ";
+ string sql = sql1 + sWhere+ " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_SeOutStockBillList");
+ }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ /// <summary>
+ ///鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Xs_SeOutStockBill/DeltetSeOutStockBill")]
+ [HttpGet]
+ public object DeltetSeOutStockBill(string HInterID,string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Xs_SeOutStockBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬垹闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Xs_SeOutStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Xs_SeOutStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
//
--
Gitblit v1.9.1