From 17026667d6fa0683257dbee07325acdfb5c29dd3 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 16 一月 2024 13:42:49 +0800
Subject: [PATCH] 工艺路线 子表增加 字段 排产工序标记, 并且界面上 只有一行 是打勾的,要么全部不打勾,要么一行打勾;不能超过一行 排产工序标记 打勾。 HSortProcFlag bit //排产工序标记(一个工艺路线只有一行可以打勾,物料的产能获取这个是1的) 增加单品过站工序控制
---
WebAPI/Models/Gy_RoutingBillSub.cs | 2 ++
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 8 ++++----
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 20 +++++++++++++++++++-
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index e827810..90b0de6 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -479,6 +479,24 @@
sub = JsonConvert.DeserializeObject<List<Model.ClsSc_AssemblyBillSub>>(sSubStr);
+ ds = oCN.RunProcReturn("exec h_p_Sc_SNBarcodeProcCtrl_S '" + omodel.HBarCode_P + "'," + omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
+ if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤鏁版嵁!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (ds.Tables[0].Rows[0]["HBack"].ToString() == "2")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
ds = oCN.RunProcReturn("select * from h_v_Gy_QualifiedRecordsList WITH(NOLOCK) where 浜у搧鏉$爜='" + omodel.HBarCode_P + "' and HProcExchInterID="+ omodel .HProcExchInterID+ " and HProcExchEntryID="+ omodel.HProcExchEntryID + " and HProcID="+ omodel.HProcID, "h_v_Gy_QualifiedRecordsList");
if (ds.Tables[0].Rows.Count > 0)
@@ -650,7 +668,7 @@
values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{omodel.HBarCode_P}', 1, GETDATE(), '', " + HProcExchInterID + ","+ HProcExchEntryID + ", '"+ HProcExchBillNo + "', '', 0, 0)");
//鍙嶅啓宸ュ簭鍑虹珯鍗曠殑鍚堟牸鏁伴噺
- oCN.RunProc("update Sc_StationOutBillMain set HQty+=1 where HProcExchInterID='" + HProcExchInterID + "' and HProcExchEntryID=" + HProcExchEntryID);
+ oCN.RunProc("update Sc_StationOutBillMain set HQty+=1 where HProcExchInterID='" + HProcExchInterID + "' and HProcExchEntryID=" + HProcExchEntryID+ " and HInterID=" + HInterID);
oCN.Commit();
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index cde5732..fce79d7 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -430,7 +430,7 @@
",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
",HTechnologyParameter,HPicNum,HProcCheckNote" +
",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HIsTime,HEstimate " +
- ",HWorkTimes_S " +
+ ",HWorkTimes_S,HSortProcFlag " +
") values("
+ HInterID + "," + i + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNo + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
"," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
@@ -443,7 +443,7 @@
",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() +
",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
"', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + "," + Convert.ToString(oSub.HIsTime ? 1 : 0) + "," + oSub.HEstimate.ToString() +
- ", " + oSub.HWorkTimes_S.ToString() +
+ ", " + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSortProcFlag ? 1 : 0) +
") ");
//璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
if (oSub.HIsTime == false)
@@ -473,7 +473,7 @@
",HTechnologyParameter,HPicNum,HProcCheckNote" +
",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HEstimate,HIsTime" +
",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol" +
- ",HWorkTimes_S " +
+ ",HWorkTimes_S,HSortProcFlag " +
") values("
+ HInterID + "," + i + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNo + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
"," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
@@ -487,7 +487,7 @@
",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
"', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HEstimate.ToString() + "," + Convert.ToString(oSub.HIsTime ? 1 : 0) + "," + oSub.HQCSchemeID_Fst + "," +
oSub.HQCSchemeID_Proc + "," + oSub.HQCSchemeID_Patrol +
- ", " + oSub.HWorkTimes_S.ToString() +
+ ", " + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSortProcFlag ? 1 : 0) +
") ");
//璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
if (oSub.HIsTime == false)
diff --git a/WebAPI/Models/Gy_RoutingBillSub.cs b/WebAPI/Models/Gy_RoutingBillSub.cs
index 59d1023..ac11bb8 100644
--- a/WebAPI/Models/Gy_RoutingBillSub.cs
+++ b/WebAPI/Models/Gy_RoutingBillSub.cs
@@ -74,6 +74,8 @@
public double HEstimate;//璁℃椂鏆備及
public bool HIsTime;//鏄惁璁℃椂
+ public bool HSortProcFlag;
+
public int HQCSchemeID_Fst;
public int HQCSchemeID_Proc;
public int HQCSchemeID_Patrol;
--
Gitblit v1.9.1