From 1f49f98a07ae1c31a1967c5c36b382d6c855becd Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期二, 26 七月 2022 09:59:37 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 1f2dd60..126b7e9 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -383,12 +383,12 @@
}
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by hmainid desc", "h_v_Gy_MouldFileList");
+ ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 鏃ユ湡 desc", "h_v_Gy_MouldFileList");
}
else
{
string sql1 = "select * from h_v_Gy_MouldFileList where 1 = 1 ";
- string sql = sql1 + sWhere + "order by hmainid desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList");
}
@@ -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+"'"+
") ");
@@ -802,6 +803,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;
@@ -882,16 +884,17 @@
",HSPGroupID=" + HSPGroupID.ToString() +
",HSPID=" + HSPID.ToString() +
",HDesignLife=" + HDesignLife.ToString() +
- ",HCaveQty="+ HCaveQty.ToString()+
+ ",HCaveQty=" + HCaveQty.ToString() +
",HUseLife=" + HUseLife.ToString() +
",HLeaveLife=" + HLeaveLife.ToString() +
",HProdQty=" + HProdQty.ToString() +
- ",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+
+ ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() +
",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
",HMouldOWNER='" + HMouldOWNER + "'" +
- ",HNowSupID="+HNowSupID.ToString()+
- ",HNowSupTypeID="+HNowSupTypeID.ToString()+
+ ",HNowSupID=" + HNowSupID.ToString() +
+ ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
",HProdWeight=" + HProdWeight.ToString() +
+ ",HBarCode="+ HBarCode.ToString()+
" where HInterID=" + HInterID.ToString());
//淇敼瀛愰」鐩唬鐮�
@@ -1214,7 +1217,7 @@
DataSet ds = new DataSet();
ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID=" + HInterID, "Gy_MouldFileMain");
DataRow dr = ds.Tables[0].Rows[0];
- string Num = dr["HBillNo"].ToString();
+ string Num = dr["HBarCode"].ToString();
string Num1 = Num.Substring(0,(Num.Length)-5);
oCN.BeginTran();
for (int i = StarNum1; i <= EndNum1; i++)
@@ -1243,6 +1246,7 @@
if (ds1.Tables[0].Rows.Count == 0 || ds1 == null)
{
long HItemID = DBUtility.ClsPub.CreateBillID("3899", ref DBUtility.ClsPub.sExeReturnInfo);
+ //string HBillNo = DBUtility.ClsPub.CreateBillCode("3899", ref DBUtility.ClsPub.sExeReturnInfo, true);
string sql = string.Format(@"Insert Into Gy_MouldFileMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,HMakeDate,HBarCode" +
@@ -1255,7 +1259,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