From e5e8b23083cd7f09ebe3c110e84cfad7747eba49 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 25 四月 2022 13:32:29 +0800
Subject: [PATCH] nothing
---
PlanM/数据导入/Gy_StdWorkTimes_RoutingBill.cs | 25 +++++--
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.cs | 54 ++++++++++--------
DAL/公用/frmBillQueryCondition_New.cs | 2
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 7 +-
BaseSet/公用资料/其他基础资料/Gy_StdWorkTimes.cs | 50 +++++++---------
5 files changed, 75 insertions(+), 63 deletions(-)
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
index 2be03b4..58c8379 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimes.cs"
@@ -466,16 +466,6 @@
//鍗曟嵁瀹屾暣鎬у垽鏂� 鏈畬鎴�
private bool Sub_AllowSave()
{
- //蹇呰緭椤圭洰鏄惁涓虹┖
- //ClsK3_DepartmentHlp oDept = new ClsK3_DepartmentHlp();
- //if(!oDept.GetInfoByID(ClsPub.isLong(txtHDeptID.Tag)))
- //{
- // MessageBox.Show("閮ㄩ棬涓嶅瓨鍦紒");
- // return false;
- //}
-
- //鏄庣粏琛ㄦ槸鍚︿负闆惰
-
if (!IsNullRow(0))
{
MessageBox.Show("琛ㄤ綋鏄庣粏琛屼笉瀛樺湪锛佽褰曞叆锛�", "鎻愮ず");
@@ -483,8 +473,18 @@
}
else
{
+
return true;
}
+ }
+ //鏄惁鏄┖琛�
+ private bool IsNullRow(int Row)
+ {
+ if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0&& ClsPub.isInt(grdMain1.Rows[Row].Cells[HProcIDCol].Value) == 0&& ClsPub.isDoule( grdMain1.Rows[Row].Cells[HStdWorkTimes].Value )== 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HUpperlimit].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HLowerlimit].Value) == 0&& ClsPub.isStrNull(grdMain1.Rows[Row].Cells[HRemarkCol].Value) == ""&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0&& ClsPub.isDoule(grdMain1.Rows[Row].Cells[HStdPiece].Value) == 0)
+ {
+ return true;
+ }
+ return false;
}
//淇濆瓨鍗曟嵁
private bool Sub_SaveBill()
@@ -493,11 +493,7 @@
Int32 i;
bool bResult;
BillNew = new DAL.ClsGy_StdWorkTimes_Ctl();
- //缂栬緫鏉冮檺
- //if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
- //{
- // return false;
- //}
+
//澶卞幓鐒︾偣
lblCaption.Focus();
//
@@ -509,9 +505,13 @@
BillNew.DetailColl = new List<Model.ClsGy_StdWorkTimes_Model>();
for (i = 0; i <= grdMain1.RowCount - 1; i++)
{
- if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HProcIDCol].Value) != 0)
+ if (IsNullRow(i))
{
- if (DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdWorkTimes].Value)>0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0&& DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isLong(grdMain1.Rows[i].Cells[HStdPric].Value) > 0)
+ break;
+ }
+ if (DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HMaterIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HProcIDCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) != "")
+ {
+ if (DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdWorkTimes].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HUpperlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HLowerlimit].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPiece].Value) > 0 && DBUtility.ClsPub.isDoule(grdMain1.Rows[i].Cells[HStdPric].Value) > 0)
{
Model.ClsGy_StdWorkTimes_Model oSub = new Model.ClsGy_StdWorkTimes_Model();
oSub.HMaterID = ClsPub.isLong(grdMain1.Rows[i].Cells[HMaterIDCol].Value);
@@ -530,9 +530,14 @@
}
else
{
- MessageBox.Show("绗�" + (i+1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥,涓嬮檺姣斾緥锛屾爣鍑嗚浠跺拰鏍囧噯璁′环閮藉簲澶т簬0", "鎻愮ず");
+ MessageBox.Show("绗�" + (i + 1) + "琛�,鏍囧噯宸ユ椂,涓婇檺姣斾緥,涓嬮檺姣斾緥锛屾爣鍑嗚浠跺拰鏍囧噯璁′环閮藉簲澶т簬0", "鎻愮ず");
return false;
}
+ }
+ else
+ {
+ MessageBox.Show("绗�" + (i + 1) + "琛�,鐗╂枡銆佸伐搴忓拰鏍囧噯宸ユ椂涓嶈兘涓虹┖", "鎻愮ず");
+ return false;
}
}
//淇濆瓨瀹屾瘯鍚庡鐞�
@@ -684,15 +689,6 @@
//
oSumGrid.EditStatus = false;
return true;
- }
- //鏄惁鏄┖琛�
- private bool IsNullRow(int Row)
- {
- if (ClsPub.isInt(grdMain1.Rows[Row].Cells[HMaterIDCol].Value) == 0)
- {
- return true;
- }
- return false;
}
//'鍒ゆ柇缃戞牸琛岀殑褰曞叆鏄惁姝g‘
private bool CheckGridRow(int Row)
diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
index 2c0f4fd..248b672 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
@@ -263,23 +263,31 @@
sr = CurNode.Text.Split(c);
HParentID = sr[0].ToString();
}
- //杩囨护鏉′欢
- if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
+ if (frmCondition==null)
{
- sSql = "Select top 10000 * from " + ViewName + " order by HItemID Desc";
- }
- else
- {
- if (wl.Checked == false)
+ //杩囨护鏉′欢
+ if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
{
- sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc";
+ sSql = "Select top 10000 * from " + ViewName + " order by HItemID Desc";
}
else
{
- sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
- }
+ if (wl.Checked == false)
+ {
+ sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc";
+ }
+ else
+ {
+ sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
+ }
+ }
}
+ else
+ {
+ sSql = frmCondition.SqlStr + sWhere + " order by " + ModName;
+ }
+
//鎵цSQL
DSet = SubCn.RunProcReturn(sSql, ViewName);
@@ -395,18 +403,15 @@
else
{
//瀹℃牳
- if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
- {
- MessageBox.Show("瀹℃牳鎴愬姛!", "鎻愮ず");
- }
- else
+ if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
{
MessageBox.Show("瀹℃牳澶辫触!", "鎻愮ず");
return;
}
}
}
- MessageBox.Show("瀹℃牳鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+ MessageBox.Show("瀹℃牳鎴愬姛!", "鎻愮ず");
+ Display();
return;
}
//鍙嶅鏍�
@@ -435,18 +440,15 @@
else
{
//瀹℃牳
- if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
- {
- MessageBox.Show("鍙嶅鏍告垚鍔�!", "鎻愮ず");
- }
- else
+ if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
{
MessageBox.Show("鍙嶅鏍稿け璐�!", "鎻愮ず");
return;
}
}
}
- MessageBox.Show("瀹℃牳鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+ MessageBox.Show("鍙嶅鏍告垚鍔�!", "鎻愮ず");
+ Display();
return;
}
@@ -481,9 +483,11 @@
else
{
oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=1 Where HItemID=" + lngBillKey.ToString());
+
}
}
- MessageBox.Show("绂佺敤鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+ MessageBox.Show("绂佺敤鎴愬姛锛�", "鎻愮ず");
+ Display();
return;
}
@@ -512,9 +516,11 @@
else
{
oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=0 Where HItemID=" + lngBillKey.ToString());
+
}
}
- MessageBox.Show("鍙嶇鐢ㄦ垚鍔燂紝璇峰埛鏂帮紒", "鎻愮ず");
+ MessageBox.Show("鍙嶇鐢ㄦ垚鍔燂紒", "鎻愮ず");
+ Display();
return;
}
}
diff --git "a/DAL/\345\205\254\347\224\250/frmBillQueryCondition_New.cs" "b/DAL/\345\205\254\347\224\250/frmBillQueryCondition_New.cs"
index cbe9a1e..acc0c96 100644
--- "a/DAL/\345\205\254\347\224\250/frmBillQueryCondition_New.cs"
+++ "b/DAL/\345\205\254\347\224\250/frmBillQueryCondition_New.cs"
@@ -28,7 +28,7 @@
DAL.ClsIF_Group_View oGroup = new DAL.ClsIF_Group_View();
DAL.ClsIF_Process_View oProc = new DAL.ClsIF_Process_View();
DAL.ClsIF_Supplier_View oSup = new DAL.ClsIF_Supplier_View();
- DAL.ClsIF_Warehouse_View oWare = new DAL.ClsIF_Warehouse_View();
+ DAL.ClsIF_Warehouse_View oWare = new DAL.ClsIF_Warehouse_View();
int FieldNameCol = 2;
int ConditionCol = 4;
if (sCol != ConditionCol)
diff --git "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs" "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
index abc79fb..095e1cd 100644
--- "a/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
+++ "b/PlanM/\346\225\260\346\215\256\345\257\274\345\205\245/Gy_StdWorkTimes_RoutingBill.cs"
@@ -91,22 +91,30 @@
for (int i = 0; i <= grdMain.Rows.Count - 1; i++)
{
- if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != "")
+ if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHMaterNumCol].Value) != "" && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHProcNumCol].Value) != ""&& DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value) != "")
{
- //写入类
- if (WriteClass(i))
+ if (DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHStdWorkTimesCol].Value)>0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHUpperlimitCol].Value) > 0&& DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[sHLowerlimitCol].Value) > 0)
{
- //保存记录
- if (!BillNew.AddNew())
+ //写入类
+ if (WriteClass(i))
{
- MessageBox.Show("导入失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
- return;
+ //保存记录
+ if (!BillNew.AddNew())
+ {
+ MessageBox.Show("导入失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
+ return;
+ }
}
+ }
+ else
+ {
+ MessageBox.Show("第" + (i + 1) + "行,标准工时、上限比例和下限比例不能小于0", "提示");
+ return;
}
}
else
{
- MessageBox.Show("工序代码或物料代码为空!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
+ MessageBox.Show("第"+(i+1)+"行,工序代码、物料代码和标准工时不能为空!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
return;
}
}
@@ -158,6 +166,7 @@
//sHMaker = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[sHMakerCol].Value);
//判断是否允许 保存
+
//审核代码是否合理
if (!DBUtility.ClsPub.AllowNumber(sMaterNumber))
{
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 1f2dd60..570d439 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -662,6 +662,7 @@
int HYear = DBUtility.ClsPub.isInt(DateTime.Now.Year);
double HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
string HMouldNo = mainList[0].HMouldNo;
+ string HBarCode = mainList[0].HBarCode;
string HName = mainList[0].HName;
string HModel = mainList[0].HModel;
string HModel2 = mainList[0].HModel2;
@@ -714,7 +715,7 @@
",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
- ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
+ ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode" +
") " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -724,7 +725,7 @@
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+
"," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+
- ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
+ ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"','"+ HBarCode+"'"+
") ");
@@ -1255,7 +1256,7 @@
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
") " +
" values('3899','3899'," + HItemID + ",'" + Num1 + j + "',getdate()" +
- "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + dr["HBarCode"] +
+ "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + Num1 + j +
"','" + Num1 + j + "','" + dr["HName"] + "','" + dr["HModel"] + "','" + dr["HModel2"] + "','" + dr["HDiameter"] + "'" +
",'" + dr["HSubjoin"] + "','" + dr["HSubjoin2"] + "','" + dr["HPICNo"] + "','" + dr["HWorkMaterModel"] + "'" +
"," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',0," + dr["HUnitID"] +
--
Gitblit v1.9.1