From 105bb5f0f4edd01d8f915ffda28ccd37afbfddc8 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 24 四月 2023 08:29:41 +0800
Subject: [PATCH] 基础资料 添加校验控制 进站单出站单扫完流转卡默认带出最大工序汇报数量(获取 上一道的 合格数量(如果拆分后,上道合格数量大于流转卡数量时,仍取流转卡数量),如果是第一道则获取流转卡数量) 拆卡必须最大工序出站之后才允许拆卡,汇报过的工序拆卡出来不需要显示 增加生产订单 复制功能; 流转卡添加复制功能 工艺路线 增加 上一行 下一行 刷新流水号 按钮功能, 可以调整 工序上下次序; 以及重新刷新流水号
---
DBUtility/业务单据/ClsXt_BaseBill.cs | 67 ++++++++++++++++++++++++++-------
1 files changed, 53 insertions(+), 14 deletions(-)
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
index 53b2ee58..4b7bcc9 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBill.cs"
@@ -48,8 +48,20 @@
public bool AbandonCancelltion(Int64 lngBillKey, ref string sReturn)
{
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='',HDeleteDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
sReturn = "";
return true;
}
@@ -63,8 +75,21 @@
public bool CancelClose(Int64 lngBillKey, ref string sReturn)
{
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='',HCloseDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
+
sReturn = "";
return true;
}
@@ -83,8 +108,21 @@
return false;
}
try
- {
- oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null Where HInterID=" + lngBillKey.ToString());
+ {
+ DataSet ds = oCn.RunProcReturn("select * from " + MvarItemKey + " where HInterID=" + lngBillKey.ToString(), MvarItemKey);
+ if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
+ }
+ else if (ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
+ }
+ else
+ {
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=1 Where HInterID=" + lngBillKey.ToString());
+ }
+
sReturn = "";
return true;
}
@@ -102,7 +140,7 @@
{
string HChecker = ClsPub.CurUserName ;
string HCheckDate =ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -138,7 +176,7 @@
{
string HCloseMan = ClsPub.CurUserName;
string HCloseDate = ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HCloseMan='" + HCloseMan + "',HCloseDate='" + HCloseDate + "',HBillStatus=3 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -173,7 +211,7 @@
{
string HDeleteMan = ClsPub.CurUserName;
string HDeleteDate = ClsPub.GetServerDate(-1);
- oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='" + HDeleteMan + "',HDeleteDate='" + HDeleteDate + "' Where HInterID=" + lngBillKey.ToString());
+ oCn.RunProc(" Update " + MvarItemKey + " set HDeleteMan='" + HDeleteMan + "',HDeleteDate='" + HDeleteDate + "',HBillStatus=4 Where HInterID=" + lngBillKey.ToString());
sReturn = "";
return true;
}
@@ -201,12 +239,12 @@
throw (e);
}
}
- //鍒犻櫎瀛愯〃
+ //淇濆吇璁″垝鍒犻櫎瀛愯〃1
public void DeleteBillSub(Int64 lngBillKey)
{
oCn.RunProc("Delete From " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString());
}
- //鍒犻櫎瀛愯〃
+ //淇濆吇璁″垝鍒犻櫎瀛愯〃2
public void DeleteBillSub2(Int64 lngBillKey)
{
if (MvarItemKeySub2 != "")
@@ -463,9 +501,10 @@
//鍗曟嵁鍙锋槸鍚﹂噸澶�
public virtual bool IsExistBillNo(ref string sReturn, string sBillNo, ClsPub.Enum_BillStatus oBillStatus, Int64 lngBillKey)
{
+ string sSql = "";
try
{
- string sSql = "";
+
if (oBillStatus == ClsPub.Enum_BillStatus.BillStatus_AddNew)
{
sSql = "Select HInterID from " + MvarItemKey + " where hbilltype='" + BillType + "'and HBillNO ='" + sBillNo + "'";
@@ -486,8 +525,8 @@
}
catch (Exception e)
{
- sReturn = e.Message;
- throw (e);
+ sReturn = e.Message+"sql:"+ sSql;
+ return false;
}
}
#endregion
--
Gitblit v1.9.1