From ac178542f0b9f1171d2e5d5ae907305c7c5abd33 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 27 六月 2024 16:53:43 +0800
Subject: [PATCH] 1
---
WebAPI/Models/StationBill.cs | 2
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 10 +
WebAPI/Controllers/条码管理/WEBSController.cs | 133 ++++++++++++++++++++++
WebAPI/WebAPI.csproj.user | 2
WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs | 53 ++++++++
DAL/生产管理/设备管理/ClsSb_EquipMaintainBill.cs | 10 +
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 3
DAL/车间管理/ClsSc_MaterToSourceBill.cs | 5
WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 4
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs | 91 ++++++++++++++
WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user | 36 +++---
Model/车间管理/ClsSc_MaterToSourceBillMain.cs | 2
WebAPI.suo | 0
Model/生产管理/设备管理/ClsSb_EquipMaintainBillMain.cs | 1
14 files changed, 321 insertions(+), 31 deletions(-)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBill.cs"
index c16e3e8..83d34f4 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBill.cs"
@@ -71,6 +71,7 @@
",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
",HEquipMaintainRuleInterID=" + omodel.HEquipMaintainRuleInterID.ToString()+
",HMaintainLevID=" + omodel.HMaintainLevID +
+ ",HLastResult='" + omodel.HLastResult + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -103,13 +104,14 @@
",HMaintainPart,HClaim" +
",HManagerID" +
",HCloseMan,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainResult" +
") values("
+ omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() +
",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
"," + Item.HManagerID.ToString() +
",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
- "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +
+ "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +
+ ",'" + Item.HMaintainResult + "'" +
") ");
}
@@ -174,11 +176,11 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark,HEquipID" +
",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipMaintainRuleInterID" +
- ",HDeptID,HMaintainLevID" +
+ ",HDeptID,HMaintainLevID,HLastResult" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
- ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString() + "," + omodel.HDeptID + "," + omodel.HMaintainLevID +
+ ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString() + "," + omodel.HDeptID + "," + omodel.HMaintainLevID + ",'" + omodel.HLastResult + "'" +
") ");
//鎻掑叆閰嶄欢瀛愯〃
foreach (Model.ClsSb_EquipMaintainBillSub oSub in DetailColl)
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 2dfc622..fef4650 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"
@@ -122,6 +122,7 @@
",HWorkerID=" + omodel.HWorkerID.ToString() +
",HWorkerBarCode='" + omodel.HWorkerBarCode + "'" +
",HGroupID=" + omodel.HGroupID.ToString() +
+ ",HProcNo=" + omodel.HProcNo.ToString() +
",HMainSourceInterID='" + omodel.HMainSourceInterID.ToString() + "'" +
",HMainSourceEntryID='" + omodel.HMainSourceEntryID.ToString() + "'" +
",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
@@ -196,14 +197,14 @@
",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" +
",HSourceID,HProcID,HMaterID,HSourceBarCode,HEquipID,HWorkerID,HWorkerBarCode" +
- ",HGroupID,HStockOrgID" +
+ ",HGroupID,HProcNo,HStockOrgID" +
") " +
" 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.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.HSTOCKORGID.ToString() +
+ "," + omodel.HGroupID.ToString() + "," + omodel.HProcNo.ToString() + "," + omodel.HSTOCKORGID.ToString() +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_MaterToSourceBillSub oSub in DetailColl)
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
index 1edef06..8272a5d 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
@@ -19,5 +19,6 @@
public int HEquipMaintainPlanEntryID; //设备保养计划单(Sb_EquipMaintainPlanBillSub_Plan)子内码
public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
+ public string HLastResult;// 最终结论(OK,NG)
}
}
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBillMain.cs"
index 249ad47..98e09a2 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBillMain.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_MaterToSourceBillMain.cs"
@@ -20,7 +20,7 @@
public Int64 HWorkerID;// int --操作工ID
public string HWorkerBarCode;// varchar(50) --操作工条码
public Int64 HGroupID;// int --生产班组ID
-
+ public Int64 HProcNo;// int --流水号(工序号)
public Int64 HProcID;// int --工序ID
public Int64 HMaterID;// int --产品ID
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
index c859e73..b80be6c 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -1606,6 +1606,11 @@
{
omodel.MES_StationInBill_ShowUSERProcess = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
}
+ //工序进站时默认带入数量(1.流转卡数,2.上道合格数量,3.物料最小包装数量,4.不带入)
+ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_DefQty")
+ {
+ omodel.MES_StationInBill_DefQty = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+ }
@@ -3551,6 +3556,11 @@
{
omodel.MES_StationInBill_PreQtyCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
}
+ //工序进站时默认带入数量(1.流转卡数,2.上道合格数量,3.物料最小包装数量,4.不带入)
+ if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationInBill_DefQty")
+ {
+ omodel.MES_StationInBill_DefQty = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+ }
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
index 198047d..f331b24 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -508,7 +508,8 @@
public string MES_StationInBill_DeleteRelationCtl; //进站接收单删除时是否进行关联控制
public string MES_StationInBill_PreQtyCtl; //本道进站数量不能大于上道出站合格数量
public string MES_StationInBill_QtyRateCtl; //本道进站数量汇总数不能大于流转卡数量上限
- public string MES_StationInBill_DyCentralInspectionControl; //判断工序进站之前是否做过检验单
+ public string MES_StationInBill_DyCentralInspectionControl; //判断工序进站之前是否做过检验单
+ public string MES_StationInBill_DefQty; //工序进站时默认带入数量(1.流转卡数,2.上道合格数量,3.物料最小包装数量,4.不带入)
//工序出站汇报单
public string MES_StationOutBill_AutoCheck; //保存后是否自动审核
diff --git a/WebAPI.suo b/WebAPI.suo
new file mode 100644
index 0000000..abf1d8b
--- /dev/null
+++ b/WebAPI.suo
Binary files differ
diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
index 8a21ba2..17da314 100644
--- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
@@ -274,7 +274,7 @@
string sql = string.Empty;
//淇濆瓨
oCN.BeginTran();
- sql = $"delete Gy_Supplier where HItemID = {lsmain[0].HItemID}";
+ sql = $"delete from Gy_Supplier where HItemID = {lsmain[0].HItemID}";
oCN.RunProc(sql);
sql = "set identity_insert Gy_Supplier on";
oCN.RunProc(sql);
@@ -290,7 +290,7 @@
",'" + lsmain[0].HShortName + "','" + lsmain[0].HAddress + "','" + lsmain[0].HLinkMan + "','" + lsmain[0].HLinkPhone + "','" + lsmain[0].HMobilePhone + "'" +
",'" + lsmain[0].HFax + "','" + lsmain[0].HPostalCode + "','" + lsmain[0].HEmail + "','" + lsmain[0].HBank + "','" + lsmain[0].HBankAccount + "'" +
",'" + lsmain[0].HTaxNum + "','" + lsmain[0].HTaxRate + "','" + lsmain[0].HCountry + "','" + lsmain[0].HCorMan + "','" + lsmain[0].HEnglishName + "'" +
- ",'" + lsmain[0].HEnglishAddress + "'," + lsmain[0].HCurID + "," + lsmain[0].HSSID + "," + lsmain[0].HAreaID +","+lsmain[0].HMaterClass+
+ ",'" + lsmain[0].HEnglishAddress + "'," + lsmain[0].HCurID + "," + lsmain[0].HSSID + "," + lsmain[0].HAreaID +",'"+lsmain[0].HMaterClass+ "'" +
") ");
//淇敼涓婄骇涓洪潪鏈骇浠g爜
sql = "set identity_insert Gy_Supplier off";
diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index a9e4e6e..779867e 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -115,10 +115,11 @@
string HBillNo = list[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
int HBillStatus = 0;
string HMaker = user;//鍒跺崟浜�
- int HYear = 2021;
- double HPeriod = 1;
+ int HYear = DateTime.Now.Year;
+ double HPeriod = DateTime.Now.Month;
string HRemark = list[0].HRemark;//澶囨敞
long HICMOInterID = list[0].HICMOInterID;//浠诲姟鍗旾D
+ long HICMOEntryID = list[0].HICMOEntryID;//浠诲姟鍗曞瓙ID
string HICMOBillNo = list[0].HICMOBillNo;//浠诲姟鍗�
long HProcPlanInterID = 0;
long HProcPlanEntryID = 0;
@@ -144,6 +145,8 @@
string HOrderProcNO = list[0].HOrderProcNO;//璁㈠崟璺熻釜鍙�
long HPRDOrgID = list[0].HPRDOrgID;//缁勭粐ID
double HmaterOutqty = list[0].HmaterOutqty;//鐧藉澂鍙戝竷
+ long HMaterToSourceInterID = list[0].HMaterToSourceInterID;//涓婃枡闃查敊鍗旾D
+ string HMaterToSourceBillNo = list[0].HMaterToSourceBillNo;//涓婃枡闃查敊鍗曞崟鎹彿
//鍗曟嵁瀹屾暣鎬у垽鏂�
if (HMaterID <= 0)
{
@@ -260,6 +263,29 @@
",'" + HProcNo + "','" + HOrderProcNO + "','" + HMainInterID + "'," + HPRDOrgID +
","+ HmaterOutqty + ") ");
+ if(HMaterToSourceInterID!=0)
+ {
+ //鐢熸垚涓婃枡闃查敊鍗�
+ //鎻掑叆瀛愯〃
+ oCN.RunProc("EXEC h_p_Sc_MaterToSourceBillSub_Insert " + HMaterToSourceInterID.ToString() + ",'" + HMaterToSourceBillNo + "'");
+ //鎻掑叆涓昏〃
+ oCN.RunProc("Insert Into Sc_MaterToSourceBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+ ",HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HICMOInterID,HICMOEntryID,HICMOBillNo" +
+ ",HSourceID,HProcID,HMaterID,HSourceBarCode,HEquipID,HWorkerID,HWorkerBarCode" +
+ ",HGroupID,HProcNo,HStockOrgID" +
+ ") " +
+ " values('3786','3790'," + HMaterToSourceInterID.ToString() + ",'" + HMaterToSourceBillNo + "',convert(varchar(10),getdate(),120)" +
+ ",year(getdate()),month(getdate()),'宸ュ簭杩涚珯缁戝畾鐢熸垚','" + HMaker + "',getdate(),'" + HMaker + "',getdate()" +
+ "," + HInterID.ToString() + ",0,'" + HBillNo + "','3790'" +
+ "," + HProcExchInterID.ToString() + "," + HProcExchEntryID.ToString() + ",'" + HProcExchBillNo + "'," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'" +
+ "," + HSourceID.ToString() + "," + HProcID.ToString() + "," + HMaterID.ToString() + ",'',0,0,''" +
+ "," + HGroupID.ToString() + "," + HProcNo.ToString() + "," + HPRDOrgID.ToString() +
+ ") ");
+ }
+ //鍐欏叆鏃ュ織
LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板宸ュ簭杩涚珯鍗曟嵁:" + HBillNo);
oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "鏂板宸ュ簭杩涚珯鍗曟嵁锛�" + HBillNo + "','LMES-宸ュ簭杩涚珯妯″潡','" + DBUtility.ClsPub.IPAddress + "','鏂板鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
}
@@ -423,6 +449,67 @@
}
#endregion
+ #region 宸ュ簭杩涚珯鎺ユ敹鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅锛屽苟鏍规嵁绯荤粺鍙傛暟鍒ゆ柇杩涚珯鍗曟槸鍚︾粦瀹氶厤浠舵竻鍗� 20240621
+ [Route("Cj_StationInBill/HProcNo_KeyDown")]
+ [HttpGet]
+ public object HProcNo_KeyDown(string HBillNo, string HProcExchBillNo, Int64 HProcNo, string HMaker)
+ {
+ try
+ {
+ if (HProcExchBillNo.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娴佽浆鍗℃病鏈夋壂鎻忥紝鎴栬�呮病鏈夋寜鍥炶溅閿紝璇锋壂鎻忔祦杞崱鎴栧湪娴佽浆鍗℃枃鏈涓寜鍥炶溅閿紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+ {
+ string MES_StationInBill_LineBindCtl = "N"; //杩涚珯鎺ユ敹鏃舵槸鍚︾粦瀹氳宸ュ簭鐨勯厤浠舵竻鍗曪紙Y鏄渶瑕佺粦瀹氾紝N涓嶉渶瑕佺粦瀹氾級
+ string MES_StationInBill_DefQty = "4"; //宸ュ簭杩涚珯鏃堕粯璁ゅ甫鍏ユ暟閲忥紙1.娴佽浆鍗℃暟锛�2.涓婇亾鍚堟牸鏁伴噺锛�3.鐗╂枡鏈�灏忓寘瑁呮暟閲忥紝4.涓嶅甫鍏ワ級
+ MES_StationInBill_LineBindCtl = oSystemParameter.omodel.MES_StationInBill_LineBindCtl;
+ MES_StationInBill_DefQty = oSystemParameter.omodel.MES_StationInBill_DefQty;
+
+ ds = oCN.RunProcReturn("exec h_p_MES_StationInBill_HProcNo_KeyDown '" + HBillNo + "','" + HProcExchBillNo + "'," + HProcNo.ToString() + ",'" + MES_StationInBill_LineBindCtl + "','" + MES_StationInBill_DefQty + "','" + HMaker + "'", "h_p_MES_StationInBill_HProcNo_KeyDown");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇烽噸鏂拌緭鍏ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ 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 宸ュ簭杩涚珯鎺ユ敹鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅
[Route("Cj_StationInBill/txtHProcNo_KeyDown")]
[HttpGet]
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 e2524f9..b3f7e39 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"
@@ -987,6 +987,88 @@
#endregion
+ #region 宸ュ簭璧勬枡
+
+ /// <summary>
+ /// 鎵爜杩斿洖宸ュ簭淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetProcess_Json")]
+ [HttpGet]
+ public object GetProcess_Json(string HBarCode, Int64 HStockOrgID)
+ {
+ try
+ {
+ Int64 HProcID = 0;
+ HProcID = DBUtility.ClsPub.isLong(HBarCode);
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Process with(nolock) where HStopflag=0 and HItemID=" + HProcID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Process");
+ 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/GetProcessList_Json")]
+ [HttpGet]
+ public object GetProcessList_Json(string Process, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Process with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Process + "%' or HName like '%" + Process + "%')", "Gy_Process");
+ 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;
+ }
+ }
+
+ #endregion
+
#endregion
@@ -3387,6 +3469,8 @@
BillNew.omodel.HWorkerID = mainList[0].HWorkerID;
BillNew.omodel.HWorkerBarCode = mainList[0].HWorkerBarCode;
BillNew.omodel.HGroupID = mainList[0].HGroupID;
+ BillNew.omodel.HProcID = mainList[0].HProcID;
+ BillNew.omodel.HProcNo = mainList[0].HProcNo;
BillNew.omodel.HMainSourceBillType = mainList[0].HMainSourceBillType;
if (mainList[0].HMainSourceBillType == "3772")
{
@@ -5969,6 +6053,55 @@
#endregion
+ #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧� 娴佹按鍙峰洖杞﹁皟鐢ㄦ柟娉�
+ /// <summary>
+ /// 娴佹按鍙峰洖杞﹁繑鍥炰俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_ProcNo_MaterToSource_Json")]
+ [HttpGet]
+ public object get_ProcNo_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HProcExchBillNo, Int64 HProcNo, string HMaker)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddProcNo_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HProcExchBillNo + "'," + HProcNo.ToString() + ",'" + HMaker + "'", "h_p_WMS_AddProcNo_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>
/// 鎵弿鐗╂枡鏉$爜
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
index 1fc4027..9c85b94 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
@@ -1667,6 +1667,59 @@
}
#endregion
+ #region 鐢熶骇璐ㄩ噺鏈堟眹鎶ュ崟鍒楄〃 鏌ヨ
+ public class ReportWorkDemandPlanBill1
+ {
+ public string HYear;
+ public string HWorkCenter;
+ public string HName;
+
+ }
+ [Route("Sc_QualityReportBill/getSc_QualityReportBillMonth")]
+ [HttpGet]
+ public object getSc_QualityReportBillMonth(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ReportWorkDemandPlanBill1 Report = JsonConvert.DeserializeObject<ReportWorkDemandPlanBill1>(sWhere);
+ ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMonth '{Report.HYear}','{Report.HWorkCenter}','{Report.HName}'", "h_p_Sc_StationOutBillMonth");
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ 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
diff --git a/WebAPI/Models/StationBill.cs b/WebAPI/Models/StationBill.cs
index f8120e6..294d78d 100644
--- a/WebAPI/Models/StationBill.cs
+++ b/WebAPI/Models/StationBill.cs
@@ -88,5 +88,7 @@
public double HToCheckQty { get; set; }
public double HLossQty { get; set; }
public Int64 HShiftsID { get; set; }
+ public long HMaterToSourceInterID { get; set; }
+ public string HMaterToSourceBillNo { get; set; }
}
}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
index a5b0053..977ef42 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <History>True|2024-06-25T04:30:32.4272933Z;True|2024-06-25T09:53:35.8089888+08:00;True|2024-06-25T09:50:45.0788666+08:00;True|2024-06-25T09:46:08.5825317+08:00;True|2024-06-25T09:44:17.5984285+08:00;True|2024-06-25T09:40:23.4977167+08:00;True|2024-06-25T09:37:55.3516214+08:00;True|2024-06-25T09:34:57.0498926+08:00;True|2024-06-24T23:22:12.1756387+08:00;True|2024-06-24T23:15:13.9995277+08:00;True|2024-06-24T23:05:20.8658324+08:00;True|2024-06-24T22:59:59.2842726+08:00;True|2024-06-24T16:29:08.9135923+08:00;True|2024-06-24T15:44:19.8100242+08:00;True|2024-06-18T16:08:52.3066991+08:00;True|2024-06-18T14:08:42.6969999+08:00;True|2024-06-17T13:22:25.8401219+08:00;True|2024-06-17T11:27:09.9223091+08:00;True|2024-06-17T11:23:37.5133763+08:00;True|2024-06-17T10:58:43.2727797+08:00;True|2024-06-14T13:32:57.5800980+08:00;False|2024-06-13T10:45:10.1375417+08:00;False|2024-06-13T10:43:52.8804222+08:00;</History>
+ <History>True|2024-06-25T04:33:00.3560503Z;True|2024-06-25T12:30:32.4272933+08:00;True|2024-06-25T09:53:35.8089888+08:00;True|2024-06-25T09:50:45.0788666+08:00;True|2024-06-25T09:46:08.5825317+08:00;True|2024-06-25T09:44:17.5984285+08:00;True|2024-06-25T09:40:23.4977167+08:00;True|2024-06-25T09:37:55.3516214+08:00;True|2024-06-25T09:34:57.0498926+08:00;True|2024-06-24T23:22:12.1756387+08:00;True|2024-06-24T23:15:13.9995277+08:00;True|2024-06-24T23:05:20.8658324+08:00;True|2024-06-24T22:59:59.2842726+08:00;True|2024-06-24T16:29:08.9135923+08:00;True|2024-06-24T15:44:19.8100242+08:00;True|2024-06-18T16:08:52.3066991+08:00;True|2024-06-18T14:08:42.6969999+08:00;True|2024-06-17T13:22:25.8401219+08:00;True|2024-06-17T11:27:09.9223091+08:00;True|2024-06-17T11:23:37.5133763+08:00;True|2024-06-17T10:58:43.2727797+08:00;True|2024-06-14T13:32:57.5800980+08:00;False|2024-06-13T10:45:10.1375417+08:00;False|2024-06-13T10:43:52.8804222+08:00;</History>
<_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
</PropertyGroup>
<ItemGroup>
@@ -45,28 +45,28 @@
<publishTime>02/22/2013 16:43:40</publishTime>
</File>
<File Include="bin/BLL.dll">
- <publishTime>06/25/2024 12:30:16</publishTime>
+ <publishTime>06/25/2024 12:32:51</publishTime>
</File>
<File Include="bin/BLL.pdb">
- <publishTime>06/25/2024 12:30:16</publishTime>
+ <publishTime>06/25/2024 12:32:51</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
</File>
<File Include="bin/DAL.dll">
- <publishTime>06/25/2024 12:30:15</publishTime>
+ <publishTime>06/25/2024 12:32:50</publishTime>
</File>
<File Include="bin/DAL.pdb">
- <publishTime>06/25/2024 12:30:15</publishTime>
+ <publishTime>06/25/2024 12:32:50</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 22:52:40</publishTime>
</File>
<File Include="bin/DBUtility.dll">
- <publishTime>06/25/2024 12:30:13</publishTime>
+ <publishTime>06/25/2024 12:32:48</publishTime>
</File>
<File Include="bin/DBUtility.pdb">
- <publishTime>06/25/2024 12:30:13</publishTime>
+ <publishTime>06/25/2024 12:32:48</publishTime>
</File>
<File Include="bin/Grpc.Core.Api.dll">
<publishTime>03/22/2022 13:17:26</publishTime>
@@ -111,10 +111,10 @@
<publishTime>07/25/2012 19:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
- <publishTime>06/25/2024 12:30:13</publishTime>
+ <publishTime>06/25/2024 12:32:48</publishTime>
</File>
<File Include="bin/Model.pdb">
- <publishTime>06/25/2024 12:30:13</publishTime>
+ <publishTime>06/25/2024 12:32:48</publishTime>
</File>
<File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
<publishTime>05/25/2024 09:46:41</publishTime>
@@ -147,25 +147,25 @@
<publishTime>10/23/2021 17:07:54</publishTime>
</File>
<File Include="bin/Pub_Class.dll">
- <publishTime>06/25/2024 12:30:11</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/Pub_Class.pdb">
- <publishTime>06/25/2024 12:30:11</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/Pub_Control.dll">
- <publishTime>06/25/2024 12:30:12</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/Pub_Control.pdb">
- <publishTime>06/25/2024 12:30:12</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/RestSharp.dll">
<publishTime>08/31/2012 06:22:50</publishTime>
</File>
<File Include="bin/SQLHelper.dll">
- <publishTime>06/25/2024 12:30:12</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/SQLHelper.pdb">
- <publishTime>06/25/2024 12:30:12</publishTime>
+ <publishTime>06/25/2024 12:32:47</publishTime>
</File>
<File Include="bin/Swashbuckle.Core.dll">
<publishTime>02/16/2015 01:57:08</publishTime>
@@ -282,10 +282,10 @@
<publishTime>11/24/2014 19:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>06/25/2024 12:30:22</publishTime>
+ <publishTime>06/25/2024 12:32:55</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>06/25/2024 12:30:22</publishTime>
+ <publishTime>06/25/2024 12:32:55</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>07/18/2013 01:03:52</publishTime>
@@ -480,7 +480,7 @@
<publishTime>05/25/2024 09:46:41</publishTime>
</File>
<File Include="Web.config">
- <publishTime>06/25/2024 12:30:31</publishTime>
+ <publishTime>06/25/2024 12:32:59</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 048da48..6e937af 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+ <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
--
Gitblit v1.9.1