From b1c5e0b780d7ddda8addcae57ca9d91b2ca21c96 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 01 十二月 2023 13:15:23 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 68 ++++++++++++++++++++++++++++++++--
1 files changed, 64 insertions(+), 4 deletions(-)
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 427a570..2c0e854 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"
@@ -450,7 +450,7 @@
ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ICMOBillList");
- if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
+ if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
{
//涓昏〃
oCN.RunProc(@"Insert Into Sc_ICMOBillMain
@@ -464,6 +464,8 @@
",'" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HEmpID + "," + HCusID +
"," + HCenterID + ",0,0,0,0," + HBomID + ",'',''" +
",'"+ HIsStockQty + "','"+ HRemark3 + "') ");
+
+
LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板鐢熶骇璁㈠崟鍗曟嵁:" + HBillNo);
oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "鏂板鐢熶骇璁㈠崟鍗曟嵁锛�" + HBillNo + "','LMES-鐢熶骇璁㈠崟妯″潡','" + DBUtility.ClsPub.IPAddress + "','鏂板鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -494,6 +496,23 @@
}
//淇濆瓨瀛愯〃
objJsonResult = AddBillSub_NoTable(msg3, HInterID, OperationType, HEntryID);
+
+
+ //鍙嶅啓婧愬崟-閿�鍞鍗曟暟鎹�
+ if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)
+ {
+ //鐢熶骇璁㈠崟鏂板鍥炲~閿�鍞鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Add " + HInterID);
+ }
+ else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
+ {
+ //鐢熶骇璁㈠崟鍒犻櫎鍥炲~閿�鍞鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID);
+ //鐢熶骇璁㈠崟鏂板鍥炲~閿�鍞鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Add " + HInterID);
+ }
+
+
if (objJsonResult.code == "0")
{
@@ -570,14 +589,14 @@
,HMaterID,HUnitID,HRemark,HSourceID,HDeptID,HSTATUS
,HBomID,HEntryCusID,HSTOCKINORGID
,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney
- ,HAuxQty,HAuxUnit,HWidth,HWeight,HColorRemark,HCusMaterName,HCusModel)
+ ,HAuxQty,HAuxUnit,HWidth,HWeight,HColorRemark,HCusMaterName,HCusModel,HOrderPickRemark)
values({HInterID},{HEntryID},{(oSub.HQty == null ? 0 : oSub.HQty)}
,'{(oSub.HPlanBeginDate == null ? DateTime.Now.ToString("yyyy-MM-dd") : oSub.HPlanBeginDate.ToString())}','{(oSub.HPlanEndDate == null ? DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") : oSub.HPlanEndDate.ToString())}'
,'{(oSub.HBeginDate == null ? DateTime.Now.ToString("yyyy-MM-dd") : oSub.HBeginDate.ToString())}','{(oSub.HEndDate == null ? DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") : oSub.HEndDate.ToString())}'
,{oSub.HMaterID},{oSub.HUnitID},'{oSub.HRemark}',{oSub.HSourceID},{oSub.HDeptID},{oSub.HSTATUS}
,{oSub.HBomID} ,{oSub.HCusID} ,{oSub.HSTOCKINORGID}
- ,0,0,'','',0,0
- ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}')");
+ ,{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',0,0
+ ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}','{oSub.HOrderPickRemark}')");
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -918,6 +937,8 @@
return objJsonResult; ;
}
+ //鐢熶骇璁㈠崟鍒犻櫎鍥炲~閿�鍞鍗曞叧鑱旀暟閲�
+ oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID);
oCN.RunProc("delete from Sc_ICMOBillMain where HInterID=" + HInterID);
@@ -1979,5 +2000,44 @@
}
#endregion
+
+ #region 鐢熶骇浠诲姟鍗曡鍗曞寘瑁呭娉� 淇濆瓨鍔熻兘
+ [Route("Sc_ICMOBill/ICMOBillSaveRemark")]
+ [HttpGet]
+ public object ICMOBillSaveRemark(string HInterID,string HEntryID, string HOrderPickRemark)
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛丠InterID涓嶈兘涓虹┖";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ oCN.BeginTran();
+ oCN.RunProc("update Sc_ICMOBillSub set HOrderPickRemark = '" + HOrderPickRemark + "' where HInterID = " + HInterID + " and HEntryID = " + HEntryID + "");
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1