From a5ac8ae1764596ada3aa17eb087185456c592cfd Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 04 四月 2023 13:49:04 +0800
Subject: [PATCH] 乔一优化
---
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | 17 ++++++++
Model/车间管理/ClsSc_ProcessExchangeBillMain.cs | 10 +++++
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 2
DAL/车间管理/ClsSc_ProcessExchangeBill.cs | 14 ++++++-
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 45 ++++++++++++++++++++++
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 31 +++++++++++----
6 files changed, 107 insertions(+), 12 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 b9d56ce..53370d7 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"
@@ -103,6 +103,14 @@
",HAuxQty='" + omodel.HAuxQty + "'" +
",HAuxUnit='" + omodel.HAuxUnit + "'" +
",HSplitNo='" + omodel.HSplitNo + "'" +
+ ",HHeight='" + omodel.HHeight + "'" +
+ ",HInches='" + omodel.HInches + "'" +
+ ",HAl1Long='" + omodel.HAl1Long + "'" +
+ ",HDensity='" + omodel.HDensity + "'" +
+ ",HTela='" + omodel.HTela + "'" +
+ ",HUnderTela='" + omodel.HUnderTela + "'" +
+ ",HSizing='" + omodel.HSizing + "'" +
+ ",HSellDate='" + omodel.HSellDate + "'" +
",HProdMaterCode='" + omodel.HProdMaterCode + "'" +
",HSeOrderBillNo='" + omodel.HSeOrderBillNo + "'" +
",HCusShortName='" + omodel.HCusShortName + "'" +
@@ -305,7 +313,8 @@
",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" +
",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" +
",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HXTNumber,HXTModel,HWorkBillSortNo" +
- ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo) " +
+ ", HRoutingBillID,HMaterModel,HWidth,HWeight,HAuxQty,HAuxUnit,HSplitNo" +
+ ",HHeight,HInches,HAl1Long,HDensity,HTela,HUnderTela,HSizing,HSellDate) " +
" 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() +
@@ -317,7 +326,8 @@
",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" +
",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID +
",'" + 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.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 + "')");
sErr = sErr + "1;";
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_ProcessExchangeBillSub oSub in DetailColl)
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 35eaeba..095b62a 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"
@@ -72,6 +72,16 @@
public string HPickLabelNumber;
public string HXTNumber;
public string HXTModel;
+
+ public string HHeight;//毛高
+ public string HInches;//寸数组织
+ public string HAl1Long;//全毛长
+ public string HDensity;//坏布密度
+ public string HTela;//毛纱名称及规格
+ public string HUnderTela;//底丝
+ public string HSizing;//定型浆料
+ public string HSellDate;//交货日期
+
public string HRoutingBillID;//工艺路线ID
public string HMaterModel;//材料规格
public double HWidth;//幅宽
diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index 90fb06d..4445410 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -42,7 +42,22 @@
objJsonResult.data = null;
return objJsonResult;
}
- string sql1 = string.Format(@"select * from h_v_Gy_CustomerList where 缁勭粐鍚嶇О='" + Organization + "'");
+ string sql1 = "";
+ //瀹㈡埛鍒跺畾
+ string sErr = "";
+ if (oSystemParameter.ShowBill(ref sErr))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴")
+ {
+ sql1 = string.Format(@"select * from h_v_Gy_CustomerList where 1=1");
+ }
+ else
+ {
+ sql1 = string.Format(@"select * from h_v_Gy_CustomerList where 缁勭粐鍚嶇О='" + Organization + "'");
+ }
+ }
+
+
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn(sql1 + sWhere + " order by 瀹㈡埛浠g爜 ", "h_v_Gy_CustomerList");
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 58a1a4e..9bf6d9e 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -193,7 +193,7 @@
{ //绯荤粺鍙傛暟鏄惁涓哄彧鏄剧ず褰撳墠鐧诲綍鐢ㄦ埛鍏宠仈鐨勫伐搴忎俊鎭�,N涓哄惁锛孻涓烘槸
if (oSystemParameter.omodel.MES_StationInBill_ShowUSERProcess == "Y")
{
- ds = oCN.RunProcReturn($"exec h_p_ProcessExchangeBillLastHProNo '{BillNo_PGD}','{UserID}'", "h_v_Gy_ProcessList_GetProcNoByUser");
+ ds = oCN.RunProcReturn($"exec h_p_ProcessExchangeBillLastHProNo '{BillNo_PGD}','{UserID}','In'", "h_v_Gy_ProcessList_GetProcNoByUser");
}
else
{
diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index d884619..5bc4ed7 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -379,6 +379,51 @@
#endregion
+ #region 宸ュ簭杩涚珯鎺ユ敹鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅
+ [Route("Cj_StationInBill/txtHProcNo_KeyDown_qiaoyi")]
+ [HttpGet]
+ public object txtHProcNo_KeyDown_qiaoyi(string sBillNo, string sProcNo)
+ {
+ try
+ {
+ if (sBillNo.Equals("") || sProcNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //寰楀埌淇℃伅锛堝澶栨爣璁颁负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 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)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇烽噸鏂拌緭鍏ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 宸ュ簭杩涚珯鎺ユ敹鍗曟牴鎹亴鍛樹唬鐮佹ā绯婂洖杞︽煡璇�
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
index 9a42063..06c9b44 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs"
@@ -507,6 +507,28 @@
public json AddBillSub_NoTable(string msg3, long HInterID, int OperationType,int HEntryID)
{
ClsSc_ICMOBillSub oSub = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSc_ICMOBillSub>(msg3);
+
+ //瀹㈡埛鍒跺畾
+ string sErr = "";
+ if (oSystemParameter.ShowBill(ref sErr))
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴")
+ {
+
+ }
+ else
+ {
+ if (oSub.HDeptID == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐢熶骇杞﹂棿涓嶈兘涓虹┖";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
if (oSub.HQty <= 0 || oSub.HQty == null)
{
objJsonResult.code = "0";
@@ -525,14 +547,7 @@
return objJsonResult;
}
- if (oSub.HDeptID == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鐢熶骇杞﹂棿涓嶈兘涓虹┖";
- objJsonResult.data = null;
- return objJsonResult;
- }
+
if (oSub.HUnitID == 0)
{
--
Gitblit v1.9.1