From 00e25e4a9c9bd2fc91558c3c1a68f47db6d08b1d Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 08 七月 2024 18:57:35 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 58 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index 364928c..be3f59f 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -132,16 +132,32 @@
string user = sArray[3].ToString();//鐢ㄦ埛鍚�
string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
user_LongShan = sArray[3].ToString();//鐢ㄦ埛鍚�
+ string HBillSubType = sArray[4].ToString();//鍗曟嵁瀛愮被鍨�
try
{
- //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
- if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user))
+ if (HBillSubType == "3301")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳潈闄愮紪杈�!";
- objJsonResult.data = null;
- return objJsonResult;
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸ヨ壓璺嚎鏃犳潈闄愮紪杈�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ else {
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Sub_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀛愬伐鑹鸿矾绾挎棤鏉冮檺缂栬緫!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
msg2 = "[" + msg2.ToString() + "]";
@@ -241,7 +257,7 @@
ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList");
- if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
+ if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
{
//涓昏〃
oCN.RunProc("Insert Into Gy_RoutingBillMain " +
@@ -251,7 +267,7 @@
",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " +
- " values('" + BillType + "','"+(OperationType==4?"SUB":"") +"'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+ " values('" + BillType + "','"+ HBillSubType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
"," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
"," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
"," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
@@ -310,7 +326,7 @@
oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID);
}
}
- else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4))
+ else if (IsProNo == 1 && (OperationType == 1))
{
ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process");
@@ -414,6 +430,7 @@
",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
",HTechnologyParameter,HPicNum,HProcCheckNote" +
",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HIsTime,HEstimate " +
+ ",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() +
@@ -426,6 +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() + "," + Convert.ToString(oSub.HSortProcFlag ? 1 : 0) +
") ");
//璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
if (oSub.HIsTime == false)
@@ -455,6 +473,7 @@
",HTechnologyParameter,HPicNum,HProcCheckNote" +
",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HEstimate,HIsTime" +
",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol" +
+ ",HWorkTimes_S,HSortProcFlag,HSNCtrl " +
") 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() +
@@ -468,6 +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() + "," + Convert.ToString(oSub.HSortProcFlag ? 1 : 0) + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
") ");
//璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
if (oSub.HIsTime == false)
@@ -1223,14 +1243,14 @@
try
{
//鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
- //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
string sql1 = "select top 1000 * from h_v_Gy_RoutingBillQuery where 1 = 1 ";
@@ -1263,7 +1283,7 @@
DataSet ds;
try
{
-
+
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
string sql1 = "select top 1000 * from h_v_Gy_RoutingBillQuerySub where 1 = 1 and hmainid=" + sWhere;
string sql = sql1 + " order by hmainid desc,cast(宸ュ簭鍙� as int)";
--
Gitblit v1.9.1