From 63b6be972c27f9000b97809b627369d8a17741a0 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 09 五月 2023 11:18:38 +0800
Subject: [PATCH] 生产订单编码规则(S+年(23)+五位流水号)实例:S2300001 生产订单按照日期最新的排在最前面
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 42 ++++++++++++++++++++++++++++--------------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 53f1366..ebac8df 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -79,11 +79,11 @@
string sql1 = string.Format(@"select * from h_v_Gy_MaterialList where 缁勭粐鍚嶇О='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn(sql1 + sWhere + " order by 鐗╂枡浠g爜 ", "h_v_Gy_MaterialList");
+ ds = oCN.RunProcReturn(sql1 + sWhere + " order by 鐗╂枡浠g爜 desc", "h_v_Gy_MaterialList");
}
else
{
- string sql = sql1 + sWhere + " order by 鐗╂枡浠g爜 ";
+ string sql = sql1 + sWhere + " order by 鐗╂枡浠g爜 desc";
ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterialList");
}
@@ -608,17 +608,7 @@
string HInterID = HInter.Replace("\"", "");
string user = sArray[1].ToString();
string HBarCode = sArray[2].ToString().Replace("\"","");
- string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
-
- //缂栬緫鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
try
{
@@ -626,6 +616,16 @@
string[] NewBarCode;
NewBarCode = HBarCode.Split(Convert.ToChar(","));
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Del", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//鍒犻櫎鏉$爜鍓嶈繘琛屽垽鏂�
Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -663,7 +663,21 @@
if (Ds.Tables[0].Rows.Count != 0)
{
oCN.BeginTran();
- oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
+
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ //鍒ゆ柇鏄惁鍙兘鍒犻櫎鑷繁鐢熸垚鐨勬潯鐮�
+ if (oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame == "Y") //绯荤粺鍙傛暟
+ {
+ oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")" + " and HMaker = '" + user + "'");
+ }
+ else
+ {
+ oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")");
+ }
+ }
//鍐欏叆绯荤粺鏃ュ織
for (int i = 0; i <= NewBarCode.Length - 1; i++)
--
Gitblit v1.9.1