From 6d7a3ed745efd4526bdefc9fe5e1aa5a15db279e Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 30 五月 2024 09:46:17 +0800
Subject: [PATCH] 新增PDA上料防错单扫码模块、缓存列表模块所需调用方法,器具缓存列表模块返回缓存列表信息调用方法名修改
---
WebAPI/Controllers/条码管理/WEBSController.cs | 545 +++++++++++++++++++++++++++++++++++++++++++++
WebAPI/Web.config | 2
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml | 2
DAL/车间管理/ClsSc_MaterToSourceBill.cs | 152 ++++++++++-
WebAPI/Controllers/条码管理/MouldController.cs | 4
5 files changed, 677 insertions(+), 28 deletions(-)
diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBill.cs"
index 3a13dcd..2dfc622 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBill.cs"
@@ -18,7 +18,8 @@
base.MvarItemKeySub4 = "";
base.MvarItemKey="Sc_MaterToSourceBillMain";
base.MvarReportTitle="涓婃枡鍗�";
- base.BillType="3786";
+ base.BillType="3786";
+ base.HBillSubType = "3786";
}
#region 鍥哄畾浠g爜
@@ -27,8 +28,63 @@
{
DetailColl = null;
}
-
+
#endregion 鑷畾涔夋柟娉�
+
+ //淇濆瓨鍓嶆帶鍒�
+ public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 HSourceID, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MaterToSourceBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + HSourceID.ToString() + "," + OperationType.ToString(), "h_p_Sc_MaterToSourceBill_BeforeSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
+ //淇濆瓨鍚庢帶鍒�
+ public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MaterToSourceBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MaterToSourceBill_AfterSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
//淇敼鍗曟嵁
public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
{
@@ -36,6 +92,12 @@
{
//
oCn.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(lngBillKey, omodel.HBillNo, omodel.HSourceID, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
//鏇存柊涓昏〃
oCn.RunProc("UpDate Sc_MaterToSourceBillMain set " +
//鍥哄畾璧嬪��===============
@@ -46,7 +108,7 @@
",HRemark='" + omodel.HRemark + "'" +
",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
",HUpDateDate=getdate()" +
- //========================================
+ //========================================
",HProcExchInterID=" + omodel.HProcExchInterID.ToString() +
",HProcExchEntryID=" + omodel.HProcExchEntryID.ToString() +
",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" +
@@ -60,6 +122,11 @@
",HWorkerID=" + omodel.HWorkerID.ToString() +
",HWorkerBarCode='" + omodel.HWorkerBarCode + "'" +
",HGroupID=" + omodel.HGroupID.ToString() +
+ ",HMainSourceInterID='" + omodel.HMainSourceInterID.ToString() + "'" +
+ ",HMainSourceEntryID='" + omodel.HMainSourceEntryID.ToString() + "'" +
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
+ ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
+ ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -70,18 +137,24 @@
foreach (Model.ClsSc_MaterToSourceBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MaterToSourceBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
",HMaterID,HUnitID,HQty,HPieceQty,HScanDate" +
",HBarCode,HBarCode_Pack,HBillNo_bak" +
") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
"," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPieceQty.ToString() + ",'" + oSub.HScanDate.ToShortDateString() + "'" +
",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" +
- ") ");
+ ") ");
}
- sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛�";
oCn.Commit();
return true;
}
@@ -97,40 +170,73 @@
{
try
{
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false)
+ {
+ sReturn = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sReturn;
+ return false;
+ }
//寰楀埌mainid
- omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
- //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ if (omodel.HInterID == 0)
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(omodel.HInterID, omodel.HBillNo, omodel.HSourceID, 1, ref sReturn))
+ {
+ return false;
+ }
+
oCn.BeginTran();
//涓昏〃
oCn.RunProc("Insert Into Sc_MaterToSourceBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
- ",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOBillNo" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+ ",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" +
",HSourceID,HProcID,HMaterID,HSourceBarCode,HEquipID,HWorkerID,HWorkerBarCode" +
- ",HGroupID" +
+ ",HGroupID,HStockOrgID" +
") " +
- " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
- "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'" +
+ "," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
+ "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID.ToString() + ",'" + omodel.HICMOBillNo + "'" +
"," + omodel.HSourceID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HMaterID.ToString() + ",'" + omodel.HSourceBarCode + "'," + omodel.HEquipID.ToString() + "," + omodel.HWorkerID.ToString() + ",'" + omodel.HWorkerBarCode + "'" +
- "," + omodel.HGroupID.ToString() +
+ "," + omodel.HGroupID.ToString() +"," + omodel.HSTOCKORGID.ToString() +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_MaterToSourceBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MaterToSourceBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
",HMaterID,HUnitID,HQty,HPieceQty,HScanDate" +
",HBarCode,HBarCode_Pack,HBillNo_bak" +
") values("
- + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
- "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
- "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPieceQty.ToString() + ",'" + oSub.HScanDate.ToShortDateString() + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPieceQty.ToString() + ",'" + oSub.HScanDate + "'" +
",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" +
- ") ");
+ ") ");
}
- sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+
+ if (oSystemParameter.omodel.Sc_MaterToSourceBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Sc_MaterToSourceBillMain Set HChecker='" + DBUtility.ClsPub.CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString());
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板瀹℃牳鎴愬姛锛�";
+ }
+ else
+ {
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
+ }
oCn.Commit();
return true;
}
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
index 9c86a81..6a5a6b5 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
@@ -258,9 +258,9 @@
/// 鍣ㄥ叿缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
/// </summary>
/// <returns></returns>
- [Route("MouldController/GetKf_PonderationBillMain_TempList_New_Json")]
+ [Route("MouldController/GetSc_MouldStockBillMain_TempList_Json")]
[HttpGet]
- public object GetKf_PonderationBillMain_TempList_New_Json(string HBillType, string HMaker, Int64 HStockOrgID)
+ public object GetSc_MouldStockBillMain_TempList_Json(string HBillType, string HMaker, Int64 HStockOrgID)
{
try
{
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 5cd01d9..909b468 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -21,6 +21,7 @@
{
public class WEBSController : ApiController
{
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
public string sWhere = "";
public WebServer webserver = new WebServer();
public DataSet ds = new DataSet();
@@ -898,6 +899,86 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "杩斿洖鐝粍淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鐢熶骇璁惧璧勬枡
+
+ /// <summary>
+ /// 鎵爜杩斿洖鐢熶骇璁惧淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetEquip_Json")]
+ [HttpGet]
+ public object GetEquip_Json(string HBarCode)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID from h_v_Gy_EquipFileBill where HBarCode='" + HBarCode + "'", "h_v_Gy_EquipFileBill");
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖鐢熶骇璁惧淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐢熶骇璁惧鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetEquipList_Json")]
+ [HttpGet]
+ public object GetEquipList_Json(string Equip)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName from h_v_Gy_EquipFileBill where HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%'", "h_v_Gy_EquipFileBill");
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖鐢熶骇璁惧淇℃伅澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -3141,6 +3222,152 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鐢熸垚鐢熶骇缁勬墭鍗曞け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗� 涓婁紶鐢熷崟
+
+ /// <summary>
+ /// 涓婃枡闃查敊鍗曟柊澧炰笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMaterToSourceBill_Json")]
+ [HttpPost]
+ public object set_SaveMaterToSourceBill_Json([FromBody] JObject oMain)
+ {
+ BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+ DAL.ClsSc_MaterToSourceBill BillNew = new DAL.ClsSc_MaterToSourceBill();
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ string sMainStr = "[" + msg1.ToString() + "]";
+ List<Model.ClsSc_MaterToSourceBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MaterToSourceBillMain>>(sMainStr);
+
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍥哄畾璧嬪��=================================
+ BillNew.omodel.HYear = sYear;
+ BillNew.omodel.HPeriod = sPeriod;
+ BillNew.omodel.HBillType = "3786";
+ BillNew.omodel.HInterID = mainList[0].HInterID;
+ BillNew.omodel.HBillNo = mainList[0].HBillNo;
+ BillNew.omodel.HDate = mainList[0].HDate;
+ BillNew.omodel.HRemark = mainList[0].HRemark;
+ BillNew.omodel.HMaker = mainList[0].HMaker;
+ BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID;
+ DBUtility.ClsPub.CurUserName = mainList[0].HMaker;
+ //====================================================
+ BillNew.omodel.HProcExchInterID = mainList[0].HProcExchInterID;
+ BillNew.omodel.HProcExchEntryID = mainList[0].HProcExchEntryID;
+ BillNew.omodel.HProcExchBillNo = mainList[0].HProcExchBillNo;
+ BillNew.omodel.HICMOInterID = mainList[0].HICMOInterID;
+ BillNew.omodel.HICMOEntryID = mainList[0].HICMOEntryID;
+ BillNew.omodel.HICMOBillNo = mainList[0].HICMOBillNo;
+ BillNew.omodel.HSourceID = mainList[0].HSourceID;
+ BillNew.omodel.HSourceBarCode = mainList[0].HSourceBarCode;
+ BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.omodel.HWorkerID = mainList[0].HWorkerID;
+ BillNew.omodel.HWorkerBarCode = mainList[0].HWorkerBarCode;
+ BillNew.omodel.HGroupID = mainList[0].HGroupID;
+ BillNew.omodel.HMainSourceBillType = mainList[0].HMainSourceBillType;
+ if (mainList[0].HMainSourceBillType == "3772")
+ {
+ BillNew.omodel.HMainSourceInterID = mainList[0].HProcExchInterID;
+ BillNew.omodel.HMainSourceEntryID = mainList[0].HProcExchEntryID;
+ BillNew.omodel.HMainSourceBillNo = mainList[0].HProcExchBillNo;
+ }
+ else
+ {
+ BillNew.omodel.HMainSourceInterID = mainList[0].HICMOInterID;
+ BillNew.omodel.HMainSourceEntryID = mainList[0].HICMOEntryID;
+ BillNew.omodel.HMainSourceBillNo = mainList[0].HICMOBillNo;
+ }
+ //瀛愯〃璧嬪��
+ ds = oCn.RunProcReturn("exec h_p_Sc_GetMaterToSourceBill_Temp " + BillNew.omodel.HInterID.ToString() + ",'" + BillNew.omodel.HBillType + "'", "h_p_Sc_GetMaterToSourceBill_Temp");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
+ {
+ Model.ClsSc_MaterToSourceBillSub oSub = new Model.ClsSc_MaterToSourceBillSub();
+ //鍥哄畾璧嬪��========================================
+ oSub.HEntryID = i + 1;
+ oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillType"]);
+ oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillNo"]);
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HBillNo_bak = mainList[0].HBillNo;
+ //=============================
+ oSub.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HQty = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HQty"]);
+ oSub.HPieceQty = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HPieceQty"]);
+ oSub.HScanDate = DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["HScanDate"]);
+ oSub.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode"]);
+ oSub.HBarCode_Pack = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode_Pack"]);
+ BillNew.DetailColl.Add(oSub);
+ }
+ }
+ //淇濆瓨
+ bool bResult;
+ bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓婃枡闃查敊鍗曚笂浼犲け璐ワ紒" + e.Message;
objJsonResult.data = null;
return objJsonResult;
}
@@ -5597,8 +5824,324 @@
#endregion
- #region 澶勭悊鏂规硶
+ #region 涓婃枡闃查敊鍗曟ā鍧楄皟鐢ㄦ柟娉� 20240528
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 鎵弿婧愬崟鏉$爜璋冪敤鏂规硶
+ /// <summary>
+ /// 鎵弿婧愬崟鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_SourceBarCode_MaterToSource_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + HMaker + "'", "h_p_WMS_AddSourceBarCode_MaterToSource");
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 鎵弿鐗╂枡鏉$爜璋冪敤鏂规硶
+ /// <summary>
+ /// 鎵弿鐗╂枡鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_BarCode_MaterToSource_Json")]
+ [HttpGet]
+ public object get_BarCode_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HMaker + "'", "h_p_WMS_AddBarCode_MaterToSource");
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鐗╂枡鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 鑾峰彇鎵爜妯″潡鍒楄〃淇℃伅璋冪敤鏂规硶
+ /// <summary>
+ /// 鑾峰彇鎵爜妯″潡鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetBillEntryTmpList_MaterToSource_Json")]
+ [HttpGet]
+ public object GetBillEntryTmpList_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_MaterToSource " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_MaterToSource");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 鍒犻櫎鍔熻兘鎸夐挳璋冪敤 鍒犻櫎閫変腑琛岀墿鏂欐潯鐮佷复鏃惰〃璁板綍
+
+ /// <summary>
+ /// 鍒犻櫎閫変腑琛岀墿鏂欐潯鐮佷复鏃惰〃璁板綍
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_DelStationInBillSub_BindBarCodeTemp_Json")]
+ [HttpGet]
+ public object set_DelStationInBillSub_BindBarCodeTemp_Json(Int64 HInterID, string HBillType, string HBarCode)
+ {
+ try
+ {
+ oCn.RunProc("Delete from Sc_StationInBillSub_BindBarCodeTemp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鏉$爜璁板綍澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭�
+
+ /// <summary>
+ /// 浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetSourceBill_Temp_MaterToSource_Json")]
+ [HttpGet]
+ public object GetSourceBill_Temp_MaterToSource_Json(Int64 HInterID, string HBillType)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp_MaterToSource " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp_MaterToSource");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浠庣紦瀛樺垪琛ㄨ繑鍥炴椂锛屾病鏈夎繑鍥炰换浣曡褰曪紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖缂撳瓨鍒楄〃鍗曟嵁淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄦā鍧楄皟鐢ㄦ柟娉�
+
+ #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅
+
+ /// <summary>
+ /// 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetStationInBillSub_BindBarCodeTempList_Json")]
+ [HttpGet]
+ public object GetStationInBillSub_BindBarCodeTempList_Json(string HBillType, string HMaker, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Sc_GetStationInBillSub_BindBarCodeTempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_GetStationInBillSub_BindBarCodeTempList");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁缂撳瓨鍒楄〃淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鍗曟嵁缂撳瓨鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄦā鍧� 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+
+ /// <summary>
+ /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_DeleteStationInBillSub_BindBarCodeTemp_Json")]
+ [HttpGet]
+ public object set_DeleteStationInBillSub_BindBarCodeTemp_Json(long HInterID, string HBillType)
+ {
+ try
+ {
+ oCn.RunProc("Delete from Sc_StationInBillSub_BindSourceTemp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ oCn.RunProc("Delete from Sc_StationInBillSub_BindBarCodeTemp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #endregion
#endregion
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
index 2403f43..9250916 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,7 +10,7 @@
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>x86</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
- <PublishUrl>G:\issWeb\缃戠珯鍙戝竷\API</PublishUrl>
+ <PublishUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
</PropertyGroup>
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 1ae7701..2807e64 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
<!--<add key="FileIP" value="http://localhost:8080/" />-->
<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> -->
- <!--<add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/>--> <!--棰滃彴寮忔満-->
+ <add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/> <!--棰滃彴寮忔満-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> 鍗氭棩绉戞妧-->
--
Gitblit v1.9.1