From cfee793e8fb3ec23c879e6086db8c25ddd368b46 Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期四, 13 四月 2023 14:28:22 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 12 ++++++
Model/车间管理/ClsSc_ProcessExchangeBillMain.cs | 1
WebAPI/Controllers/WebAPIController.cs | 61 ++++++++++++++++++++++++++++++
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 3 +
DAL/车间管理/ClsSc_ProcessExchangeBill.cs | 18 ++++++++-
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 2
6 files changed, 94 insertions(+), 3 deletions(-)
diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
index 5ef435e..5fc5c66 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
@@ -87,6 +87,8 @@
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
",HSupID=" + omodel.HSupID.ToString() +
+ ",HEmpID=" + omodel.HEmpID.ToString() +
+ ",HCusID=" + omodel.HCusID.ToString() +
",HMainMaterID=" + omodel.HMainMaterID.ToString() +
",HKeyMaterID=" + omodel.HKeyMaterID.ToString() +
",HWorkShopID=" + omodel.HWorkShopID.ToString() +
@@ -317,7 +319,7 @@
",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HXTNumber,HXTModel,HWorkBillSortNo" +
", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo" +
",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate" +
- ",HRemark2,HRemark3) " +
+ ",HRemark2,HRemark3,HEmpID,HCusID) " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" +
"," + omodel.HWWOrderInterID.ToString() + "," + omodel.HWWOrderEntryID.ToString() + ",'" + omodel.HWWOrderBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HEquipMentID.ToString() +
@@ -331,7 +333,7 @@
",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','" + (omodel.HBLFlag ? 1 : 0) + "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo +
"',"+ omodel.HRoutingBillID + ",'"+ omodel.HMaterModel + "',"+ omodel.HWidth + ","+ omodel.HWeight + ","+ omodel.HAuxQty + ","+ omodel.HAuxUnit +","+ omodel.HSplitNo +"" +
",'" + omodel.HHeight + "','" + omodel.HInches + "','" + omodel.HAl1Long + "','" + omodel.HDensity + "','" + omodel.HTela + "','" + omodel.HUnderTela + "','" + omodel.HSizing + "','" + omodel.HSellDate + "'" +
- ",'"+ omodel.HRemark2 + "','"+ omodel.HRemark3 + "')");
+ ",'"+ omodel.HRemark2 + "','"+ omodel.HRemark3 + "',"+ omodel.HEmpID + "," + omodel.HCusID + ")");
sErr = sErr + "1;";
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl)
@@ -547,6 +549,18 @@
omodel.HAuxQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HAuxQty"]);
omodel.HAuxUnit = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HAuxUnit"]);
omodel.HSplitNo = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HSplitNo"]);
+ omodel.HRemark2 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark2"]);
+ omodel.HRemark3 = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark3"]);
+ omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"].ToString());
+ omodel.HHeight = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HHeight"]);
+ omodel.HInches = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInches"]);
+ omodel.HAl1Long = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HAl1Long"]);
+ omodel.HDensity = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDensity"]);
+ omodel.HTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HTela"]);
+ omodel.HUnderTela = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HUnderTela"]);
+ omodel.HSizing = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSizing"]);
+ omodel.HSellDate = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSellDate"]);
+ omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"].ToString());
//
//寰幆
DataSet DsSub;
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
index 59ccd6f..875bfa7 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs"
@@ -40,6 +40,7 @@
public Int64 HEquipMentID;//设备模具
public string HProjectNum;//项目号
public Int64 HEmpID;//职员
+ public Int64 HCusID;//客户
public string HProdMaterCode;
public string HSeOrderBillNo;
public string HCusShortName;
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
index 9583385..bc7675f 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -2847,6 +2847,13 @@
{
omodel.MES_StationInBill_DeleteRelationCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
}
+ //本道进站数量不能大于上道出站合格数量
+ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_PreQtyCtl")
+ {
+ omodel.MES_StationInBill_PreQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+ }
+
+
//===============工序出站汇报单
//自动新增
@@ -2889,6 +2896,11 @@
{
omodel.MES_StationOutBill_InStockType = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
}
+ //本道出站数量不允许小于下道进站数量
+ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_NextQtyCtl")
+ {
+ omodel.MES_StationOutBill_NextQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+ }
//=====不良评审单
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
index 9cf0ed2..798e3f1 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -371,6 +371,8 @@
public string MES_StationInBill_ShowUSERProcess; //进站接收单只显示用户对应工序
public string MES_StationInBill_SaveAutoAddnew; //保存后变为新增状态
public string MES_StationInBill_DeleteRelationCtl; //进站接收单删除时是否进行关联控制
+ public string MES_StationInBill_PreQtyCtl; //本道进站数量不能大于上道出站合格数量
+
//工序出站汇报单
public string MES_StationOutBill_QtyCtl; //出站数量不能大于本道进站汇总数
public string MES_StationOutBill_QtyPreQtyCtl; //出站数量(合格数量或总数量)汇总不能大于上道合格汇总数
@@ -386,6 +388,7 @@
public string MES_StationOutBill_ShowUSERProcess; //出站汇报单只显示用户对应工序
public string MES_StationOutBill_SaveAutoAddnew; //保存后变为新增状态
public string MES_StationOutBill_DeleteRelationCtl; //出站汇报单删除时是否进行关联控制
+ public string MES_StationOutBill_NextQtyCtl; //本道出站数量不允许小于下道进站数量
//不良品评审单
public string QC_NoPassProdCheckBill_QtyCtl; //不良品数不能大于出站单报废数量
diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index 5bc4ed7..80f8aee 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -396,7 +396,7 @@
}
//寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃讹級
- ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "' and 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 and 宸ュ簭鍙�<='" + sProcNo + "' order by cast(宸ュ簭鍙� as int) desc", "h_v_Sc_ProcessExchangeBillList");
+ ds = oCN.RunProcReturn("select top 2 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "' and 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 and cast(宸ュ簭鍙� as int)<='" + sProcNo + "' order by cast(宸ュ簭鍙� as int) desc", "h_v_Sc_ProcessExchangeBillList");
//Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList where 鍗曟嵁鍙�= '" + sBillNo + "' and 宸ュ簭鍙�='" + sProcNo + "' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 ", "h_v_Sc_ProcessExchangeBillList");
//鍐欏叆淇℃伅
if (ds == null || ds.Tables[0].Rows.Count == 0)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 3db330f..e94b3a7 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -3984,6 +3984,67 @@
}
}
+ /// <summary>
+ /// 浜у搧鍏ュ簱缂撳瓨鍒楄〃鍒锋柊淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/chanpinruk1")]
+ [HttpGet]
+ public object chanpinruk1(string HBillType, string sHMaker, Int64 HOrgID)
+ {
+ WebS.WebService1 oWebs = new WebS.WebService1();
+ try
+ {
+ ds = oWebs.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID);
+
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
#region PDA鍏朵粬鍏ュ簱鍒楄〃妯″潡
/// <summary>
--
Gitblit v1.9.1