From 0dc38a2e38568bdf42f8385dd9355c8f3de4c025 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 05 一月 2022 17:34:00 +0800
Subject: [PATCH] 委外发料单+设备器具点检保养规程完善
---
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 8
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 95 -------
WebAPI/Controllers/仓存管理/领料发货/Kf_MateOutBackBillController.cs | 31 ++
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 79 +++---
WebAPI/Controllers/ProductInController.cs | 88 ++++++
WebAPI/Controllers/仓存管理/领料发货/apiController.cs | 6
WarM/条码打印/Gy_BarCodeBill.cs | 90 ++++--
WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs | 67 +++++
WebAPI/Controllers/仓存管理/调拨盘点/Kf_MoveStockRequestBillController.cs | 65 +++++
WebAPI/Controllers/仓存管理/领料发货/Kf_StepFoldOutBillController.cs | 67 +++++
DAL/WMS/ClsKF_PonderationBillMain_Temp_Ctl.cs | 14 +
WebAPI/DLL/ClsSc_PackUnionBill.cs | 6
WebAPI/Controllers/博日自动扫码线/ScanlineAPIController.cs | 20 +
WebAPI/WebServer.cs | 45 +++
WebAPI/WebAPI.csproj | 11
WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs | 20
WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs | 2
17 files changed, 511 insertions(+), 203 deletions(-)
diff --git a/DAL/WMS/ClsKF_PonderationBillMain_Temp_Ctl.cs b/DAL/WMS/ClsKF_PonderationBillMain_Temp_Ctl.cs
index 938647e..433fb22 100644
--- a/DAL/WMS/ClsKF_PonderationBillMain_Temp_Ctl.cs
+++ b/DAL/WMS/ClsKF_PonderationBillMain_Temp_Ctl.cs
@@ -1045,6 +1045,20 @@
}
}
+ //鍒犻櫎鍗曟嵁淇℃伅
+ public bool DeleteBill(Int64 sHInterID,string HBillNo,string HBillType,string HBarCode)
+ {
+ try
+ {
+ oCn.RunProc("Delete from " + MvarItemKey + " where HInterID=" + sHInterID.ToString() + " and HBillNo='" + HBillNo.ToString() + "'and HBillType='" + HBillType + "'and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
//鏂板
public bool AddNew_sQty_FIFO(string sQty, ref string sReturn)
{
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 64a818b..c7628f3 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -688,6 +688,7 @@
string HModelName = ""; //鏈哄瀷
string HICMOBillNo = ""; //婧愬崟鍙�
string HBarCodeBatchNo = ""; //鏉$爜鎵规鍙�
+ string HBarCodeDate = ""; //鏉$爜鏃ユ湡
int k = 0;
int n = 0; //鍚屼竴鎵圭敓鎴愭潯鐮佷腑鐨勭鍑犳潯
string sTMNumber = ""; //鏉$爜鑷畾涔夊墠缂�
@@ -704,7 +705,7 @@
//鏃ユ湡鑾峰彇鏂瑰紡
sDate = dtpHDate.Value.ToShortDateString();
//
- if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�") //鍗曟嵁鏃ユ湡(鏀舵枡閫氱煡鍗�)
+ if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" || cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�") //鍗曟嵁鏃ユ湡(鏀舵枡閫氱煡鍗�)
{
sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value);
}
@@ -712,14 +713,15 @@
{
sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HEndDateCol].Value);
}
- else if (CompanyName=="澶忓疂鐢靛櫒")// 鏃ユ湡锛氱敓浜ц鍗� 鏉$爜鏃ユ湡
+ else if (CampanyName == "澶忓疂鐢靛櫒")// 鏃ユ湡锛氱敓浜ц鍗� 鏉$爜鏃ユ湡
{
sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value);
}
HYasuoji= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanCol].Value); //鍘嬬缉鏈轰唬鐮侊紙澶忓疂鐢靛櫒锛�
- HModelName= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterModelCol].Value); //鏈哄瀷锛堝瀹濈數鍣級
+ HModelName= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusTypeCol].Value); //鏈哄瀷锛堝瀹濈數鍣級
HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSourceBillNoCol].Value); //鐢熶骇璁㈠崟鍙凤紙澶忓疂鐢靛櫒锛�
HBarCodeBatchNo= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanBarCodeCol].Value); //鏉$爜鎵规鍙凤紙澶忓疂鐢靛櫒锛�
+ HBarCodeDate= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSupNumberCol].Value); //鏉$爜鏃ユ湡锛堝瀹濈數鍣級
//
sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString();
@@ -776,7 +778,7 @@
{
TM = HOrgNumber + HNumber + HBatchNo;
}//鍗氭棩鐗规畩澶勭悊
- else if(cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�")
+ else if(cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" || cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�")
{
//鐗╂枡缂栫爜+鍗曟嵁鏃ユ湡锛圷YMMDD锛�+娴佹按4浣�
sTMNumber = HMaterNumber + sYear + sPeriod + sDay;
@@ -795,8 +797,8 @@
}
else if (cmbHBarCodeType.Text == "璇曞墏鎴愬搧鏉$爜瑙勫垯")
{
- //鐗╂枡缂栫爜+鐢熶骇鎵瑰彿+澶辨晥鏃ユ湡锛圷YMMDD锛�+娴佹按鍙�6浣�-
- sTMNumber = HMaterNumber + HBatchNo + sYear + sPeriod + sDay;
+ //鐗╂枡缂栫爜+鐢熶骇鎵瑰彿+娴佹按鍙�6浣�-
+ sTMNumber = HMaterNumber + HBatchNo ;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
@@ -806,20 +808,31 @@
{
//鍒堕�犳湰閮�1浣嶏紙榛樿1锛�+鏈哄瀷浠g爜5浣嶏紙锛�+骞�2浣�+鏈�1浣嶏紙A銆丅銆丆浠f浛10鏈堜唤锛�
//+鏃�2浣�+鏉$爜鎵规鐮�2浣�+鍘嬬缉鏈轰唬鐮�1浣�+00+娴佹按鍙�4浣�+鏍¢獙鐮侊紙榛樿0锛�
- sTMNumber = "1" + HModelName + sYear + Sub_PeriodChange(sPeriod) + sDay + HBarCodeBatchNo + HYasuoji + "00" ;
+ sTMNumber = "1" + HModelName + HBarCodeDate + HBarCodeBatchNo + HYasuoji + "00" ;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
LSHlen = 4;
+ if (sTMNumber.Length != 16)
+ {
+ MessageBox.Show("鏉$爜闀垮害涓嶅16浣嶏紝鏄惁鏁版嵁涓嶅叏锛佸埗閫犳湰閮�1浣�:[0] + 鏈哄瀷浠g爜5浣�:[" + HModelName + "] + 骞存湀鏃�5浣�:["+ HBarCodeDate + "] + 鎵规鍙�2浣�:[" + HBarCodeBatchNo + "]+ 鍘嬬缉鏈�1浣�:["+ HYasuoji + "]+00 ; ");
+ return;
+ }
}
else if (cmbHBarCodeType.Text == "澶栭攢鏈烘潯鐮�")
{
//鐗╂枡浠g爜11浣�+骞�2浣�+鏈�1浣嶏紙A銆丅銆丆浠f浛10鏈堜唤锛�+鏃�2浣�+鎵规2浣�+娴佹按鍙�4浣�
- sTMNumber = HMaterNumber + sYear + Sub_PeriodChange(sPeriod) + sDay + HBarCodeBatchNo ;
+ //sTMNumber = HMaterNumber.Replace(Convert.ToChar("."),Convert.ToChar("")) + HBarCodeDate + HBarCodeBatchNo;
+ sTMNumber = HMaterNumber.Replace( "." , "" ) + HBarCodeDate + HBarCodeBatchNo;
Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
//oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]);
LSHlen = 4;
+ if (sTMNumber.Length != 18)
+ {
+ MessageBox.Show("鏉$爜闀垮害涓嶅18浣嶏紝鏄惁鏁版嵁涓嶅叏锛佺墿鏂欎唬鐮�11浣�:["+ HMaterNumber.Replace(".", "") + "]+骞存湀鏃�5浣�:["+ HBarCodeDate + "]+鎵规鍙�2浣�:[" + HBarCodeBatchNo + "];");
+ return;
+ }
}
else if (cmbHBarCodeType.Text == "鍗婃垚鍝佹潯鐮�")
{
@@ -875,10 +888,11 @@
//鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
TM = sTMNumber + LSH2;
}
- else if(cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" || cmbHBarCodeType.Text == "璇曞墏鎴愬搧鏉$爜瑙勫垯"
+ else if(cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" || cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�" || cmbHBarCodeType.Text == "璇曞墏鎴愬搧鏉$爜瑙勫垯"
|| cmbHBarCodeType.Text == "鍗婃垚鍝佹潯鐮�" || cmbHBarCodeType.Text == "澶栭攢鏈烘潯鐮�")
{
TM = sTMNumber + LSH2;
+
}
else if (cmbHBarCodeType.Text == "鍐呴攢鏈烘潯鐮�")
{
@@ -1100,26 +1114,26 @@
}
}
- //鏈堜唤杞寲
- private string Sub_PeriodChange(string sPeriod)
- {
- if(sPeriod=="10")
- {
- return "A";
- }
- else if (sPeriod == "11")
- {
- return "B";
- }
- else if (sPeriod == "12")
- {
- return "C";
- }
- else
- {
- return sPeriod.Substring(2, 1);
- }
- }
+ ////鏈堜唤杞寲
+ //private string Sub_PeriodChange(string sPeriod)
+ //{
+ // if(sPeriod=="10")
+ // {
+ // return "A";
+ // }
+ // else if (sPeriod == "11")
+ // {
+ // return "B";
+ // }
+ // else if (sPeriod == "12")
+ // {
+ // return "C";
+ // }
+ // else
+ // {
+ // return sPeriod.Substring(1, 1);
+ // }
+ //}
//鐢熸垚鏉$爜 鍗氭棩
@@ -1229,7 +1243,8 @@
//if (cmbHBarCodeType.Text == "鍞竴鏉$爜")
//{
//鏉$爜缂栧彿 = 鏉$爜鍓嶇紑 + 娴佹按鍙�
- TM = HMaterNumber + LSH2 + sYear + sPeriod + sDay ;
+ //T/*M*/ = HMaterNumber + LSH2 + sYear + sPeriod + sDay;
+ TM = LSH2 + sYear + sPeriod + sDay;
//}
if (i + 1 > grdSub.Rows.Count)
@@ -2310,6 +2325,7 @@
grdMain.Rows[i].Cells[HMainIDCol].Value = oTable.Rows[0]["hmainid"].ToString();
grdMain.Rows[i].Cells[HSubIDCol].Value = oTable.Rows[0]["hsubid"].ToString();
grdMain.Rows[i].Cells[HBillNoCol].Value = oTable.Rows[0]["鍗曟嵁鍙�"].ToString();
+ grdMain.Rows[i].Cells[HSourceBillNoCol].Value = oTable.Rows[0]["鍗曟嵁鍙�"].ToString();
grdMain.Rows[i].Cells[HBillTypeCol].Value = oTable.Rows[0]["HBillType"].ToString();
grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["鏃ユ湡"].ToString(); //鍗氭棩 鏀舵枡鍗曟嵁鏃ユ湡
grdMain.Rows[i].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString();
@@ -2334,15 +2350,19 @@
grdMain.Rows[i].Cells[HCusNumberCol].Value = oTable.Rows[0]["瀹㈡埛浠g爜"].ToString();
grdMain.Rows[i].Cells[HCusNameCol].Value = oTable.Rows[0]["瀹㈡埛"].ToString();
grdMain.Rows[i].Cells[HCusTypeCol].Value = oTable.Rows[0]["瀹㈡埛鍨嬪彿"].ToString();
+ grdMain.Rows[i].Cells[HPinfanBarCodeCol].Value = oTable.Rows[0]["HPinfanBarCode"].ToString();
+ grdMain.Rows[i].Cells[HPinfanCol].Value = oTable.Rows[0]["HPinfan"].ToString();
//grdMain.Rows[i].Cells[HSourceIDCol].Value = oTable.Rows[0]["HSourceID"].ToString();
//grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["鐢熶骇绾夸唬鐮�"].ToString();
grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["鐢熶骇绾�"].ToString();
grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["璁″垝瀹屽伐鏃ユ湡"].ToString();//鍗氭棩 鐢熶骇璁㈠崟 澶辨晥鏃ユ湡
- if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�" && CampanyName == "鍗氭棩绉戞妧")
+ if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�" )
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
}
- else if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�" && CampanyName == "鍗氭棩绉戞妧")
+ else if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�"
+ || cmbHBarCodeType.Text == "浠櫒鎴愬搧鏉$爜瑙勫垯"
+ || cmbHBarCodeType.Text == "璇曞墏鎴愬搧鏉$爜瑙勫垯")
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = "1";
}
@@ -2399,10 +2419,14 @@
grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["璁¢噺鍗曚綅"].ToString();
grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["澶囨敞"].ToString();
grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["璁″垝璺熻釜鍙�"].ToString();
- if (cmbHBarCodeType.Text == "鎵规鏉$爜" && CampanyName == "鍗氭棩绉戞妧")
+ if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�")
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["鏈敓鎴愭潯鐮佹暟閲�"]);
}
+ else if (cmbHBarCodeType.Text == "浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�")
+ {
+ grdMain.Rows[i].Cells[HMinQtyCol].Value = "1";
+ }
else
{
grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["鏈�灏忓寘瑁呮暟"].ToString();
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 543c1c8..41081e7 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -608,7 +608,7 @@
",HMaterID,HMaterNumber,HMouldType,HUnitID" +
",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
- ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" +
+ ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
") " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
@@ -618,8 +618,8 @@
"," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+
- "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife +
- "','" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
+ "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+
+ ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
") ");
@@ -784,6 +784,8 @@
",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+
",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
",HMouldOWNER='" + HMouldOWNER + "'" +
+ ",HNowSupID="+HNowSupID.ToString()+
+ ",HNowSupTypeID="+HNowSupTypeID.ToString()+
",HProdWeight=" + HProdWeight.ToString() +
" where HInterID=" + HInterID.ToString());
diff --git a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
index 29bec74..0b4731a 100644
--- a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
@@ -25,7 +25,7 @@
{
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList " + sWhere, "h_v_Kf_PurchaseReturnList");
+ ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList " , "h_v_Kf_PurchaseReturnList");
}
else
{
diff --git a/WebAPI/Controllers/ProductInController.cs b/WebAPI/Controllers/ProductInController.cs
index 3269a5b..48559e9 100644
--- a/WebAPI/Controllers/ProductInController.cs
+++ b/WebAPI/Controllers/ProductInController.cs
@@ -284,6 +284,84 @@
/// <summary>
+ /// 缂栬緫椤甸潰杩斿洖浜у搧鍏ュ簱鏉$爜涓存椂琛ㄤ俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetHBarCodeShowBillSub")]
+ [HttpGet]
+ public object GetHBarCodeShowBillSub(long HInterID, long HMaterID, Int64 HAuxPropID, string HMTONo, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, string HBatchNo, Int64 HSourceInterID, Int64 HSourceEntryID, string sBillType, string sWhere)
+ {
+ try
+ {
+ ds = webserver.GetBarCode_Temp(HInterID, HMaterID, HAuxPropID, HMTONo, HWhID, HSPID, HSCWhID, HSCSPID, HBatchNo, HSourceInterID, HSourceEntryID, sBillType, sWhere);
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+ }
+ 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;
+ }
+ }
+
+ //鐐瑰嚮缂栬緫 鍏敤绐椾綋鍒犻櫎鏂规硶
+ [Route("Kf_BarCodeEditDlg/DeltetBill")]
+ [HttpGet]
+ public object DeltetBill(long HInterID,string HBarCode,string HBillType)
+ {
+ string sErrMsg = string.Empty;
+ try
+ {
+ if (webserver.set_DelPonderationBillMain_Temp_BarCode(HInterID,HBarCode, HBillType, ref sErrMsg))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+
+ /// <summary>
/// 杩斿洖浜у搧鍏ュ簱鎵爜鏄庣粏
/// </summary>
/// <returns></returns>
@@ -684,12 +762,12 @@
[Route("ProductIn/Delete_Json")]
[HttpGet]
- public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType)
+ public object Delete_Json(long HInterID,string HBillNo,string HBillType,string HBarCode)
{
string sErrMsg = string.Empty;
try
{
- if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType, ref sErrMsg))
+ if (webserver.DeleteBill(HInterID, HBillNo, HBillType, HBarCode, ref sErrMsg))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -701,17 +779,17 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" ;
objJsonResult.data = null;
return objJsonResult;
}
}
- catch (Exception)
+ catch (Exception e)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
diff --git a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
index 0c10e5a..07dab3b 100644
--- a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
@@ -27,8 +27,15 @@
{
try
{
-
- ds = Sc_GetProductInBill(sWhere);
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_ProductionReturnList where 1=1 order by 鏃ユ湡 desc", "h_v_IF_ProductionReturnList");
+ }
+ else
+ {
+ string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by 鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList");
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -55,14 +62,5 @@
return objJsonResult;
}
}
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetProductInBill(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProductionReturnList order by 鏃ユ湡 desc", "h_v_IF_ProductionReturnList");
- }
- #endregion
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index bafeb07..b153a67 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -880,8 +880,16 @@
{
try
{
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by 鏃ユ湡 desc", "h_v_Kf_OtherOutBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_Kf_OtherOutBillList where 1 = 1 " + sWhere+ " order by 鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList");
+ }
- ds = Sc_GetOtherOutBillList(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -908,15 +916,6 @@
return objJsonResult;
}
}
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetOtherOutBillList(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherOutBillList order by 鏃ユ湡 desc", "h_v_Kf_OtherOutBillList");
- }
- #endregion
/// <summary>
@@ -1029,7 +1028,15 @@
try
{
- ds = Sc_GetProductInBill(sWhere);
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by 鏃ユ湡 desc", "h_v_IF_ProductInBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by 鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList");
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -1056,6 +1063,7 @@
return objJsonResult;
}
}
+
/// <summary>
///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳�
/// </summary>
@@ -1086,14 +1094,7 @@
return objJsonResult;
}
}
- #region sql璇彞
-
-
- public static DataSet Sc_GetProductInBill(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProductInBillList order by 鏃ユ湡 desc", "h_v_IF_ProductInBillList");
- }
- #endregion
+
/// <summary>
@@ -1107,7 +1108,15 @@
try
{
- ds = Sc_GetOtherInBill(sWhere);
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by 鏃ユ湡 desc", "h_v_Kf_OtherInBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by 鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList");
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -1134,16 +1143,6 @@
return objJsonResult;
}
}
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetOtherInBill(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherInBillList order by 鏃ユ湡 desc ", "h_v_Kf_OtherInBillList");
- }
- #endregion
-
/// <summary>
/// 濮斿鍏ュ簱鍗曞垪琛�
@@ -1155,7 +1154,15 @@
{
try
{
- ds = Sc_GetEntrustInBill(sWhere);
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Kf_EntrustInBillList where 1=1", "h_v_Kf_EntrustInBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList");
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -1182,16 +1189,6 @@
return objJsonResult;
}
}
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetEntrustInBill(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_EntrustInBillList ", "h_v_Kf_EntrustInBillList");
- }
- #endregion
-
//娴嬭瘯涓撶敤鎺ュ彛
[Route("LookingFor/Test")]
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs"
new file mode 100644
index 0000000..4f6617d
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\350\260\203\346\213\250\347\233\230\347\202\271/Kf_MoveStockRequestBillController.cs"
@@ -0,0 +1,65 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.浠撳瓨绠$悊.璋冩嫧鐩樼偣
+{
+ public class Kf_MoveStockRequestBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+ #region 璋冩嫧鍗曞垪琛�
+ [Route("Kf_MoveStockRequestBill/GetMoveStockRequestBillList")]
+ [HttpGet]
+ public object GetMoveStockRequestBillList(string sWhere)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺(鐣�)
+
+ string sql1 = string.Format("select * from h_v_IF_MoveStockRequestBillList_Litee where 1=1 ");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn(sql1 + " order by 鏃ユ湡 desc", "h_v_IF_MoveStockRequestBillList_Litee");
+ }
+ else
+ {
+ string sql = sql1 + sWhere ;
+ ds = oCn.RunProcReturn(sql, "h_v_IF_MoveStockRequestBillList_Litee");
+ }
+ 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 = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs"
index b26e5a0..c628f55 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutBackBillController.cs"
@@ -28,12 +28,31 @@
{
try
{
- ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBackBillList");
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBackBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_IF_MateOutBackBillList " + sWhere+ " order by 鏃ユ湡 desc";
+ ds = oCn.RunProcReturn(sql, "h_v_IF_MateOutBackBillList");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
}
catch (Exception ex)
{
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs"
new file mode 100644
index 0000000..22f70e4
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs"
@@ -0,0 +1,67 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.浠撳瓨绠$悊.棰嗘枡鍙戣揣
+{
+ public class Kf_StepFoldOutBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+ #region 鍒嗘寮忚皟鍑哄崟 鏌ヨ
+
+ [Route("Kf_StepFoldOutBill/GetStepFoldOutBillList")]
+ [HttpGet]
+ public object GetStepFoldOutBillList(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺(鐣�)
+
+ string sql1 = string.Format("select * from h_v_Kf_MoveStockStepOutBillList where (璋冨叆缁勭粐='" + Organization + "')");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn(sql1 + " order by 鏃ユ湡 desc", "h_v_Kf_MoveStockStepOutBillList");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + " order by 鏃ユ湡 desc";
+ ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepOutBillList");
+ }
+ 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 = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/apiController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/apiController.cs"
new file mode 100644
index 0000000..c71c79b
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/apiController.cs"
@@ -0,0 +1,6 @@
+锘縩amespace WebAPI.Controllers.浠撳瓨绠$悊.棰嗘枡鍙戣揣
+{
+ public class apiController
+ {
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs"
new file mode 100644
index 0000000..34892ea
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs"
@@ -0,0 +1,67 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.浠撳瓨绠$悊.楠屾敹鍏ュ簱
+{
+ public class Kf_StepFoldinBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+
+ #region 鍒嗘寮忚皟鍏ュ崟 鏌ヨ
+
+ [Route("Kf_StepFoldinBill/GetStepFoldinBillList")]
+ [HttpGet]
+ public object GetStepFoldinBillList(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺(鐣�)
+
+ string sql1 = string.Format("select * from h_v_Kf_MoveStockStepInBillList where (璋冨叆缁勭粐='" + Organization + "')");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn(sql1 + " order by 鏃ユ湡 desc", "h_v_Kf_MoveStockStepInBillList");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + " order by 鏃ユ湡 desc";
+ ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepInBillList");
+ }
+ 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 = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
index 0e1a8c2..94f0f7a 100644
--- "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
+++ "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
@@ -78,7 +78,7 @@
ScanLineCode list = js.Deserialize<ScanLineCode>(msg.ToString()); //灏唈son鏁版嵁杞寲涓哄璞$被鍨嬪苟璧嬪�肩粰list
if (list.billno != "" && list.billno != null) //浠诲姟鍗曞彿锛岄潪蹇呴』锛岄潪绌哄垯鏍¢獙barcodes閲宐arcode鏄惁鐢辨浠诲姟鍗曞埗浣滅敓鎴愮殑
{
- ds = oCN.RunProcReturn("Select HBarCode barcode from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill");
+ ds = oCN.RunProcReturn("Select HBarCode barcode,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.status = -1;
@@ -227,7 +227,17 @@
{
try
{
- ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill");
+ //鍒ゆ柇鏄惁鍏ュ簱
+ ds = oCN.RunProcReturn("select * from Sc_ScanLineInStock where HBarCode_Pack='" + packagebarcode + "'", "Sc_ScanLineInStock");
+ if (ds!= null && ds.Tables[0].Rows.Count>0)
+ {
+ objJsonResult.status = -1;
+ objJsonResult.msg = "璇ョ鏉$爜宸插叆搴撲笉鍏佽鍙栨秷!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill");
if (ds == null && ds.Tables[0].Rows.Count == 0)
{
objJsonResult.status = -1;
@@ -235,7 +245,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill");
+ ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill");
if (ds != null && ds.Tables[0].Rows.Count>0)
{
objJsonResult.status = -1;
@@ -246,12 +256,14 @@
//
oCN.BeginTran();
+ //鍒犻櫎SUM涓昏〃
+ oCN.RunProc("Delete From Sc_PackUnionBillSub_Sum where HBarCode_Pack='" + packagebarcode.ToString() + "'");
//鍒犻櫎瀛愯〃
oCN.RunProc("Delete From Sc_PackUnionBillSub where HBarCode_Pack='"+ packagebarcode.ToString() + "'");
//鍒犻櫎涓昏〃
oCN.RunProc("Delete From Sc_PackUnionBillMain where HBarCode_Pack='" + packagebarcode.ToString() + "'");
//浣滃簾鏉$爜妗f琛�
- oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode .ToString()+ "'");
+ oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode.ToString()+ "'");
oCN.Commit();
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
index 573a432..14262b3 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
@@ -278,7 +278,7 @@
left join Gy_Customer c1 on m.HNowSupID=c1.HItemID
left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID
left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID
- where k.HBillType='3822' and " + sWhere);
+ where " + sWhere);
}
else
{
@@ -296,7 +296,7 @@
left join Gy_Customer c1 on m.HNowSupID=c1.HItemID
left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID
left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID
- where k.HBillType='3822' and " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")");
+ where " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")");
}
ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp");
list.Add(ds.Tables[0]);
@@ -317,98 +317,9 @@
}
#endregion
-
- #region 鐩樼偣璁板綍鍒楄〃
- [Route("Gy_StockCheckItemBill/Get_MouldStockBillMainTemp")]
- [HttpGet]
- public object Get_MouldStockBillMainTemp(string sWhere)
- {
- try
- {
- ds = MouldStockBillMainTemp(sWhere);
- if (ds == null)
- {
- 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 ex)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
- public static DataSet MouldStockBillMainTemp(string sWhere)
- {
- string sql1 = string.Format(@"select * from h_v_Gy_MouldStockBillMainTempList where 1=1 ");
- if (sWhere == null || sWhere.Equals(""))
- {
- return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc", "h_v_Gy_MouldStockBillMainTempList");
- }
- else
- {
- string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
- return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_MouldStockBillMainTempList");
- }
- }
- #endregion
-
- #region [鐩樼偣鏂规鍒犻櫎鍔熻兘]
- [Route("Gy_StockCheckItemBill/set_DeleteBill_Temp")]
- [HttpGet]
- public object set_DeleteBill_Temp(string HItemID)
- {
- Int64 lngBillKey = 0;
- lngBillKey = DBUtility.ClsPub.isLong(HItemID);
- if (lngBillKey == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- ds = oCn.RunProcReturn("select * from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey, "Sc_MouldStockBillMain_Temp");
- if (ds != null)
- {
- oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey);
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "姝ゅ崟鎹笉瀛樺湪锛岃鏌ョ湅鏄惁閲嶅鍒犻櫎";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- }
-
- #endregion
-
#region 鐩樼偣鍒嗘瀽瀹℃牳
#region 璋冩嫧鈥旂洿鎺ヨ皟鎷�
- [Route("Gy_StockCheckItemBill/MakeProdMove")]
+ [Route("Gy_StockCheckItemBill/MakeProdMove")]
[HttpGet]
public object MakeProdMove(string HBarCode, string user, string userID)
{
diff --git a/WebAPI/DLL/ClsSc_PackUnionBill.cs b/WebAPI/DLL/ClsSc_PackUnionBill.cs
index 2fcf05d..0f94328 100644
--- a/WebAPI/DLL/ClsSc_PackUnionBill.cs
+++ b/WebAPI/DLL/ClsSc_PackUnionBill.cs
@@ -83,6 +83,7 @@
//鏂板鍗曟嵁
public override bool AddBill(ref string sReturn)
{
+ string ww = "";
try
{
//寰楀埌mainid
@@ -99,7 +100,7 @@
" values(" + omodel.HYear + "," + omodel.HPeriod + ",'" + this.BillType + "'," + omodel.HInterID + "" +
",'" + omodel.HDate + "','" + omodel.HBillNo.ToString() + "'," + omodel.HBillStatus + ",'" + omodel.HRemark + "'," + omodel.HICMOInterID + "" +
",'" + omodel.HICMOBillNo.ToString() + "','" + omodel.HBarCode_Pack.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" +
- ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'" +
+ ",'Admin','" + DBUtility.ClsPub.GetServerDate(-1) + "'" +
") ");
////鎻掑叆瀛愯〃
string HSourceInterID = "0";
@@ -135,8 +136,9 @@
//Int64 ZHInterID = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo);
oCn.RunProc("insert into Gy_BarCodeBill(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBatchNo,HMakeDate " +
",HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HUseFlag, HStopflag, HSupID, HGroupID, HPrintQty)" +
- "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', '绠卞彿鏉$爜', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" +
+ "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', '鎵樼洏鏉$爜', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" +
", '" + HSourceInterID + "', '" + HSourceEntryID + "', '" + HSourceBillNo + "', '" + HSourceBillType + "', 1, 0, 0, 0, 0)");
+ oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_SumSubBill2 " + omodel.HInterID + ",'"+ omodel.HBillNo.ToString() + "','"+ this.BillType + "','Admin'", "h_p_JIT_MESBeginWorkBill_SaveCtrl");
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 334652f..c836f21 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -351,7 +351,10 @@
<Compile Include="Controllers\SCGL\Sc_ProductionReturnBillController.cs" />
<Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" />
<Compile Include="Controllers\Sc_ProcessMangementController.cs" />
- <Compile Include="Controllers\浠撳瓨绠$悊\濮斿鐢ㄦ枡\WW_PPBomBillController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\璋冩嫧鐩樼偣\Kf_MoveStockRequestBillController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\apiController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\Kf_StepFoldOutBillController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\楠屾敹鍏ュ簱\Kf_StepFoldinBillController.cs" />
<Compile Include="Controllers\鍗氭棩鑷姩鎵爜绾縗ScanlineAPIController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockCheckItemBillController.cs" />
<Compile Include="Controllers\宸ヨ祫绠$悊\Gy_ClassTimePrjBillController.cs" />
@@ -458,7 +461,6 @@
<Compile Include="DLL\ClsSc_MouldOtherInBill.cs" />
<Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" />
<Compile Include="DLL\ClsSc_PackUnionBill.cs" />
- <Compile Include="DLL\ClsWW_PPBomBill.cs" />
<Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_GroupBalBill.cs" />
<Compile Include="DLL\宸ヨ祫绠$悊\ClsGy_GroupEmpBill.cs" />
<Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_WorkTimesBill.cs" />
@@ -469,8 +471,6 @@
<Compile Include="Models\ClsSc_PackUnionBillSub.cs" />
<Compile Include="Models\ClsSc_ProcessReportMain.cs" />
<Compile Include="Models\ClsSc_ProcessReportSub.cs" />
- <Compile Include="Models\ClsWW_PPBomBillMain.cs" />
- <Compile Include="Models\ClsWW_PPBomBillSub.cs" />
<Compile Include="Models\GetWeekList.cs" />
<Compile Include="Models\jsonScanline.cs" />
<Compile Include="Models\ScanLineCode.cs" />
@@ -722,6 +722,9 @@
<Folder Include="Views\Cg_PurchaseReturn\" />
<Folder Include="Views\Gy_EquipType\" />
<Folder Include="Views\Kf_ICStockBillMain\" />
+ <Folder Include="Views\Kf_MoveStockRequestBill\" />
+ <Folder Include="Views\kf_StepFoldinBill\" />
+ <Folder Include="Views\Kf_StepFoldOutBill\" />
<Folder Include="Views\MoveStockBill\" />
<Folder Include="Views\ProductionReturnBill\" />
<Folder Include="Views\QC_Management\" />
diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs
index 196ef0d..e7cc53b 100644
--- a/WebAPI/WebServer.cs
+++ b/WebAPI/WebServer.cs
@@ -4048,6 +4048,22 @@
return false;
}
}
+ //鍒犻櫎鍗曟嵁涓存椂琛ㄤ俊鎭�
+ public bool DeleteBill(Int64 sHInterID,string HBillNo,string HBillType,string HBarCode, ref string sErrMsg)
+ {
+ DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+ if (dal.DeleteBill(sHInterID, HBillNo, HBillType, HBarCode))
+ {
+ sErrMsg = "鍒犻櫎鎴愬姛锛�";
+ return true;
+ }
+ else
+ {
+ sErrMsg = "鍒犻櫎澶辫触锛�";
+ return false;
+ }
+ }
+
//public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode_Source(string sBarCode, Int64 sInterID, ref bool sBool, ref string sErrMsg)
//{
// SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -4080,7 +4096,7 @@
// return null;
// }
//}
-
+
#endregion
#region 澶栬喘鍏ュ簱
@@ -7847,6 +7863,33 @@
}
#endregion
+ //杩斿洖鏉$爜涓存椂琛�
+ /// <summary>
+ /// 杩斿洖鏉$爜涓存椂琛�
+ /// </summary>
+ public DataSet GetBarCode_Temp(long HInterID, long HMaterID, Int64 HAuxPropID, string HMTONo, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, string HBatchNo, Int64 HSourceInterID, Int64 HSourceEntryID, string sBillType, string sWhere)
+ {
+ DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View();
+ return dal.GetBarCodeByID_View(HInterID, sBillType, HMaterID, HAuxPropID, HMTONo, HWhID, HSPID, HSCWhID, HSCSPID, HBatchNo, HSourceInterID, HSourceEntryID, sWhere);
+ }
+
+ //鍒犻櫎鍑哄叆搴撴潯鐮佷复鏃惰〃(鏍规嵁鏉$爜)
+ public bool set_DelPonderationBillMain_Temp_BarCode(long HInterID, string sBarCode, string sHBillType, ref string sErrMsg)
+ {
+ DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+ if (dal.DeleteByBarCode(HInterID, sBarCode, sHBillType))
+ {
+ sErrMsg = "鍒犻櫎鎴愬姛锛�";
+ return true;
+ }
+ else
+ {
+ sErrMsg = "鍒犻櫎澶辫触锛�";
+ return false;
+ }
+ }
+
+
/// <summary>
/// 杩斿洖鎵爜鏄庣粏淇℃伅
/// </summary>
--
Gitblit v1.9.1