From 091468bc308c7eb8141b47d02b704f7c53782a76 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 02 十二月 2021 17:38:50 +0800
Subject: [PATCH] 器具领用退库单 增加 存储过程 更新 器具档案的 使用寿命、剩余寿命;

---
 WebAPI/Models/Gy_Mould.cs                                   |    1 +
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs         |    7 +++++--
 WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs |    5 ++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index a5b9391..515fc32 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -591,6 +591,7 @@
                 long HPrintQty = mainList[0].HPrintQty;
                 string HMouldOWNER = mainList[0].HMouldOWNER;
                 string HSaveLife = mainList[0].HSaveLife;
+                int HCaveQty = mainList[0].HCaveQty;
                 int HMouldDotCheckRuleInterID= mainList[0].HMouldDotCheckRuleInterID;
                 int HMouldMaintainRuleInterID= mainList[0].HMouldMaintainRuleInterID;
 
@@ -604,7 +605,7 @@
                 ",HSubjoin,HSubjoin2,HPICNo,HWorkMaterModel" +
                 ",HMaterID,HMaterNumber,HMouldType,HUnitID" +
                 ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
-                ",HPrintQty,HMouldStatus,HWhID,HRoutingID" +
+                ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
                 ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" +
                 ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
                 ") " +
@@ -614,7 +615,7 @@
                 ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
                 "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
                 ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
-                "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +
+                "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+
                 "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" +
                 ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
                 ") ");
@@ -728,6 +729,7 @@
                 long HPrintQty = mainList[0].HPrintQty;
                 string HMouldOWNER = mainList[0].HMouldOWNER;
                 string HSaveLife = mainList[0].HSaveLife;
+                int HCaveQty = mainList[0].HCaveQty;
                 int HMouldDotCheckRuleInterID = mainList[0].HMouldDotCheckRuleInterID;
                 int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID;
 
@@ -772,6 +774,7 @@
                 ",HSPGroupID=" + HSPGroupID.ToString() +
                 ",HSPID=" + HSPID.ToString() +
                 ",HDesignLife=" + HDesignLife.ToString() +
+                ",HCaveQty="+ HCaveQty.ToString()+
                 ",HUseLife=" + HUseLife.ToString() +
                 ",HLeaveLife=" + HLeaveLife.ToString() +
                 ",HProdQty=" + HProdQty.ToString() +
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
index 02348d8..7cd5fe5 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -4479,7 +4479,7 @@
                 lsmain = oListModels.getObjectByJson_Gy_MouldProdBackBillMain(msg2);
                 foreach (Model.ClsSc_MouldProdBackBillMain oItem in lsmain)
                 {
-                    //oItem.HMaker = "";
+                     //oItem.HMaker = "";
                     UserName = oItem.HMaker;  //鍒跺崟浜�
                     oItem.HBillType = "3803";
                     oItem.HBillSubType = "3803";
@@ -4552,6 +4552,7 @@
                 {
                     // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                     bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                  
                 }
                 else
                 {
@@ -4559,6 +4560,8 @@
                 }
                 if (bResult)
                 {
+                    string sql = $"exec h_p_Sc_MouldProdBackBillList '{oBill.omodel.HBillNo}' ";
+                    oCn.RunProc(sql);
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
diff --git a/WebAPI/Models/Gy_Mould.cs b/WebAPI/Models/Gy_Mould.cs
index 33e5ad1..9c3b871 100644
--- a/WebAPI/Models/Gy_Mould.cs
+++ b/WebAPI/Models/Gy_Mould.cs
@@ -53,6 +53,7 @@
         public string HNumber { get; set; }
         public string HInnerBillNo { get; set; }
         public long HLifeUnitID { get; set; }
+        public int HCaveQty { get; set; }
 
         public long HBOMID { get; set; }
         public string HSaveLife { get; set; }

--
Gitblit v1.9.1