From 21d897787e7e45fafc140dd596e11b70af5c87b1 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期四, 05 三月 2026 16:37:46 +0800
Subject: [PATCH] 修改数据类型
---
WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs | 490 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 478 insertions(+), 12 deletions(-)
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
index 7395023..d7a0cf4 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -328,10 +328,10 @@
oCN.RunProc(@"Insert Into Sc_MouldUpperBillSub
(HInterID, HBillNo_bak, HEntryID, HMouldID, HQty
- , HSourceID, HICMOInterID, HICMOEntryID, HICMOBillNo)
+ , HSourceID, HICMOInterID, HICMOEntryID, HICMOBillNo,HScanDate,HBarCode)
values("
+ HInterID + ",'"+ HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty
- + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString()+",'"+ oSub.HICMOBillNo.ToString() +
+ + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString()+",'"+ oSub.HICMOBillNo.ToString() + "',getdate(),'" + oSub.HBarCode.ToString() +
"') ");
}
@@ -442,7 +442,7 @@
BillOld.MvarItemKey = "Sc_MouldUpperBillMain";
//鍒犻櫎鍓嶆帶鍒�=========================================
DataSet ds2;
- string sql1 = "exec h_p_Sc_MouldUpperBill_BeforeDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+ string sql1 = "exec h_p_Sc_MouldUpperBill_BeforeDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldUpperBill_BeforeDelCtrl");
if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
{
@@ -470,7 +470,7 @@
oCN.RunProc("delete from Sc_MouldUpperBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid);
//鍒犻櫎鍚庢帶鍒�=========================================
- string sql2 = "exec h_p_Sc_MouldUpperBill_AfterDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+ string sql2 = "exec h_p_Sc_MouldUpperBill_AfterDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
ds2 = oCN.RunProcReturn(sql2, "h_p_Sc_MouldUpperBill_AfterDelCtrl");
if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
{
@@ -1432,7 +1432,7 @@
BillOld.MvarItemKey = "Sc_MouldLowerBillMain";
//鍒犻櫎鍓嶆帶鍒�=========================================
DataSet ds2;
- string sql1 = "exec h_p_Sc_MouldLowerBill_BeforeDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+ string sql1 = "exec h_p_Sc_MouldLowerBill_BeforeDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldLowerBill_BeforeDelCtrl");
if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
{
@@ -1461,7 +1461,7 @@
oCN.RunProc("delete from Sc_MouldLowerBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid);
//鍒犻櫎鍚庢帶鍒�=========================================
- string sql2 = "exec h_p_Sc_MouldLowerBill_AfterDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+ string sql2 = "exec h_p_Sc_MouldLowerBill_AfterDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
ds2 = oCN.RunProcReturn(sql2, "h_p_Sc_MouldLowerBill_AfterDelCtrl");
if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
{
@@ -2281,15 +2281,188 @@
#endregion
- #region 涓嬫ā鍗� PDA鏂板
- /// <summary>
- /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
+ #region 涓嬫ā鍗� PDA鏂板 鏂扮殑260227 app鍦ㄥ彂淇℃伅鐨勬椂鍊欏洖鏀惧埌浜嬪姟澶�
[Route("Sc_MouldUpperBill/AddSc_MouldLowerBill_PDA")]
[HttpPost]
public object AddSc_MouldLowerBill_PDA([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string user = sArray[1].ToString(); // 鐢ㄦ埛鍚�
+ int OperationType = int.Parse(sArray[2].ToString()); // 鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2澶嶅埗
+
+ // 寮�濮嬩簨鍔�
+ oCN.BeginTran();
+
+ try
+ {
+ // 鏉冮檺鏍¢獙
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldLowerBill_Edit", 1, false, user))
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愮紪杈�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ // 澶勭悊涓昏〃 JSON锛堝寘瑁呮垚鏁扮粍褰㈠紡锛�
+ string mainJsonArray = "[" + msg2 + "]";
+ List<ClsSc_MouldLowerBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldLowerBillMain>>(mainJsonArray);
+ string HBillType = "3847";
+ long HInterID = mainList[0].HInterID;
+ string HBillNo = mainList[0].HBillNo;
+ DateTime HDate = mainList[0].HDate;
+ int HYear = DateTime.Now.Year;
+ double HPeriod = DateTime.Now.Month;
+ string HRemark = mainList[0].HRemark;
+ string HMaker = mainList[0].HMaker;
+ int HOrgID = mainList[0].HOrgID;
+ Int64 HDeptID = mainList[0].HDeptID;
+ Int64 HEmpID = mainList[0].HEmpID;
+ Int64 HMangerID = mainList[0].HMangerID;
+
+ // 鏌ヨ涓昏〃鏄惁瀛樺湪锛堢敤浜庡垽鏂柊澧�/淇敼锛�
+ ds = oCN.RunProcReturn("select * from h_v_Qj_Sc_MouldLowerBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Qj_Sc_MouldLowerBillList");
+
+ // ----- 涓昏〃淇濆瓨閫昏緫 -----
+ if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0) // 鏂板
+ {
+ // 淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ // 鎻掑叆涓昏〃
+ oCN.RunProc(@"Insert Into Sc_MouldLowerBillMain
+ (HBillType, HBillStatus, HBillSubType, HInterID, HBillNo, HDate
+ , HYear, HPeriod, HRemark, HMaker, HMakeDate, HOrgID
+ , HDeptID, HEmpID, HMangerID) values('" + HBillType + "','1','" + HBillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'"
+ + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HOrgID
+ + "," + HDeptID + "," + HEmpID + "," + HMangerID + ") ");
+ }
+ else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) // 淇敼鎴栧凡瀛樺湪
+ {
+ // 淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldLowerBill(HInterID, HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ // 鏇存柊涓昏〃
+ oCN.RunProc("update Sc_MouldLowerBillMain set " +
+ "HDate='" + HDate +
+ "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
+ "',hupdatedate=getdate(),HDeptID=" + HDeptID + ",HEmpID=" + HEmpID + ",HMangerID=" + HMangerID +
+ " where HInterID='" + HInterID + "'");
+
+ // 鍒犻櫎鍘熸湁瀛愯〃锛堜慨鏀规椂閲嶆柊鎻掑叆锛�
+ oCN.RunProc("delete from Sc_MouldLowerBillSub where HInterID='" + HInterID + "'");
+ }
+
+ // ----- 瀛愯〃淇濆瓨閫昏緫 -----
+ List<ClsSc_MouldLowerBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldLowerBillSub>>(mainJsonArray);
+ int i = 0;
+ foreach (ClsSc_MouldLowerBillSub oSub in DetailColl)
+ {
+ i++;
+ oCN.RunProc(@"Insert Into Sc_MouldLowerBillSub
+ (HInterID, HBillNo_bak, HEntryID, HMouldID, HQty
+ , HSourceID, HICMOInterID, HICMOEntryID, HICMOBillNo
+ , HProcExchBillNo, HProcExchInterID, HProcExchEntryID
+ , HScanDate, HBarCode)
+ values("
+ + HInterID + ",'" + HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty
+ + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString()
+ + "','" + oSub.HProcExchBillNo.ToString() + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString()
+ + ",'" + oSub.HScanDate.ToString() + "','" + oSub.HMouldNumber.ToString() + "') ");
+ }
+
+ // 淇濆瓨鍚庢帶鍒讹紙鏍规嵁鎿嶄綔绫诲瀷锛�
+ if (OperationType == 1) // 鏂板
+ {
+ objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else // 淇敼/澶嶅埗
+ {
+ objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ // 鎵�鏈夋搷浣滄垚鍔燂紝鎻愪氦浜嬪姟
+ oCN.Commit();
+
+ if (OperationType == 1) // 鏂板
+ {
+ // 鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗曪紙鍗庤垷涓撶敤锛�
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + HInterID + "," + 3847, "h_p_OA_WorkLinkBill_Create");
+ if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
+ {
+ int HInterID0 = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
+ LogService.Write("鎵ц娑堟伅鎺ㄩ��..." + HInterID0);
+ Service.GeTuiService.PubishSingle(HInterID0);
+ }
+ }
+ }
+ }
+
+ // 杩斿洖鎴愬姛缁撴灉锛堟敞鎰忓師閫昏緫涓娇鐢ㄤ簡 ds.Tables[0]锛�
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 涓嬫ā鍗� PDA鏂板 鑰佺殑 鑰佺殑app鍦ㄥ彂淇℃伅鐨勬椂鍊欏洖瀵艰嚧琛ㄨ閿佷綇
+ [Route("Sc_MouldUpperBill/AddSc_MouldLowerBill_PDA_OLD")]
+ [HttpPost]
+ public object AddSc_MouldLowerBill_PDA_OLD([FromBody] JObject oMain)
{
var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
@@ -2441,6 +2614,26 @@
{
//淇濆瓨鍚庢帶鍒�
objJsonResult = AfterSave_MouldLowerBill(HInterID, HBillNo, 1);
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ //鑷姩鐢熸垚宸ヤ綔鑱旂郴鍗�
+ var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 3847, "h_p_OA_WorkLinkBill_Create");
+
+ if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
+ {
+ int HInterID0 = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString());
+ LogService.Write("鎵ц娑堟伅鎺ㄩ��..." + HInterID0);
+
+ // 瑙﹀彂娑堟伅鎺ㄩ��
+ //Service.GeTuiService.PubishSingle(HInterID0);
+
+ }
+ }
+ }
+
if (objJsonResult.count == 0)
{
objJsonResult.code = "0";
@@ -2471,5 +2664,278 @@
}
#endregion
+
+ #region 涓婃ā鍗� APP鏂板
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sc_MouldUpperBill/AddSc_MouldUpperBill_APP")]
+ [HttpPost]
+ public object AddSc_MouldUpperBill_APP([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ oCN.BeginTran();
+ //淇濆瓨涓昏〃
+ objJsonResult = AddBillMain_APP(msg1);
+ if (objJsonResult.code == "0")
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+
+ public json AddBillMain_APP(string msg1)
+ {
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ string user = sArray[3].ToString();//鐢ㄦ埛鍚�
+ try
+ {
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldUpperBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愮紪杈�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ msg2 = "[" + msg2.ToString() + "]";
+ List<ClsSc_MouldUpperBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldUpperBillMain>>(msg2);
+ string HBillType = "3846";
+ long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
+ string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
+ DateTime HDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));//鏃ユ湡
+ int HYear = DateTime.Now.Year;
+ double HPeriod = DateTime.Now.Month;
+ string HRemark = mainList[0].HRemark;//澶囨敞
+ string HMaker = mainList[0].HMaker;//鍒跺崟浜�
+ int HOrgID = mainList[0].HOrgID; //缁勭粐
+ Int64 HDeptID = mainList[0].HDeptID;
+ Int64 HEmpID = mainList[0].HEmpID;
+ Int64 HMangerID = mainList[0].HMangerID;
+
+ ds = oCN.RunProcReturn("select * from h_v_Qj_Sc_MouldUpperBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Qj_Sc_MouldUpperBillList");
+
+ if ((OperationType == 1) && ds.Tables[0].Rows.Count == 0)//鏂板
+ {
+ //淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //涓昏〃
+ oCN.RunProc(@"Insert Into Sc_MouldUpperBillMain
+ (HBillType,HBillStatus, HBillSubType, HInterID, HBillNo, HDate
+ , HYear, HPeriod, HRemark, HMaker, HMakeDate, HOrgID
+ , HDeptID, HEmpID, HMangerID)" +
+ " values('" + HBillType + "','1','" + HBillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+ "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HOrgID +
+ "," + HDeptID + "," + HEmpID + "," + HMangerID + ") ");
+
+ }
+ else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
+ {
+ //淇濆瓨鍓嶆帶鍒�
+ objJsonResult = BeforeSave_MouldUpperBill(HInterID, HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //淇敼
+ oCN.RunProc("update Sc_MouldUpperBillMain set " +
+ "HDate='" + HDate +
+ "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',hupdater='" + HMaker +
+ "',hupdatedate=getdate(),HDeptID=" + HDeptID + ",HEmpID=" + HEmpID + ",HMangerID=" + HMangerID + " where HInterID='" + HInterID + "'");
+
+ //鍒犻櫎瀛愯〃
+ oCN.RunProc("delete from Sc_MouldUpperBillSub where HInterID='" + HInterID + "'");
+ }
+ //淇濆瓨瀛愯〃
+ objJsonResult = AddBillSub_APP(msg3, HInterID, HBillNo, OperationType);
+ if (objJsonResult.code == "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = null;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ public json AddBillSub_APP(string msg3, long HInterID, string HBillNo, Int64 OperationType)
+ {
+ List<ClsSc_MouldUpperBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_MouldUpperBillSub>>(msg3);
+ int i = 0;
+ foreach (ClsSc_MouldUpperBillSub oSub in DetailColl)
+ {
+ i++;
+
+ oCN.RunProc(@"Insert Into Sc_MouldUpperBillSub
+ (HInterID, HBillNo_bak, HEntryID, HMouldID, HQty
+ , HSourceID, HICMOInterID, HICMOEntryID, HICMOBillNo,HScanDate,HBarCode)
+ values("
+ + HInterID + ",'" + HBillNo + "'," + i + "," + oSub.HMouldID.ToString() + ",'" + oSub.HQty
+ + "'," + oSub.HSourceID.ToString() + "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo.ToString() + "',getdate(),'" + oSub.HBarCode.ToString() +
+ "') ");
+ }
+
+ if (OperationType == 1)//鏂板
+ {
+ //淇濆瓨鍚庢帶鍒�
+ objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 1);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //淇濆瓨鍚庢帶鍒�
+ objJsonResult = AfterSave_MouldUpperBill(HInterID, HBillNo, 2);
+ if (objJsonResult.count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = objJsonResult.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = null;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ #endregion
+
+ #region 涓婃ā鍗曟壂鎻忔潯鐮佹煡璇㈡槸鍚﹀瓨鍦� 骞舵牎楠屼骇鍝侀槻閿欎俊鎭�
+ [Route("Sc_MouldUpperBill/GetBarCode_FC")]
+ [HttpGet]
+ public object GetBarCode_FC(string HBarCode, int HMaterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldFill_Verification '" + HBarCode + "','" + HMaterID + "'", "h_p_Sc_MouldFill_Verification");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0; //澶辫触锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1; //鎴愬姛锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ 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
+
+ #region 涓婃ā鍗曟壂鎻忓伐鍗曟潯鐮佹煡璇㈠搴旂殑鍣ㄥ叿娓呭崟
+ [Route("Sc_MouldUpperBill/GetMaterialMouldList")]
+ [HttpGet]
+ public object GetMaterialMouldList(string sWhere, string user)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_MaterialMouldBillMainList_APP where 1 = 1"+sWhere, "h_v_Gy_MaterialMouldBillMainList_APP");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈壘鍒板綋鍓嶇墿鏂欏搴旂殑妫�鍏锋竻鍗曪紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1; //鎴愬姛锛�
+ objJsonResult.Message = "鏌ヨ鎴愬姛";
+ 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
}
}
\ No newline at end of file
--
Gitblit v1.9.1