From 00a72adae3be35f91d3edecb50a14b691104bdb4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 10 八月 2023 13:45:18 +0800
Subject: [PATCH] 工艺路线保存时 图号版本,总装图号,材质,成品编号,版本 改为 必录项目 jit 完善 产量汇报 删除反写 瑞琪生产入库包装标识

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index 263957f..a13a382 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -304,7 +304,8 @@
                             objJsonResult = AddBillSub(HInterID == 0 ? list[i]["hmainid"].ToString() : HInterID.ToString()
                                 , HBillNo == "" ? list[i]["鍗曟嵁鍙�"].ToString() : HBillNo
                                  , DateTime.Parse(DateTime.Now.AddDays(j).ToString("yyyy-MM-dd").ToString())
-                                 , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString()));
+                                 , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString())
+                                 , list[i]);
 
                             if (objJsonResult.count == 1)
                             {
@@ -314,7 +315,7 @@
                         //涓昏〃鏈夋暟鎹� 瀛愯〃鏃犳暟鎹�
                         if (j == 30 && SumCount == 0 && HInterID != 0 && HBillNo != "")
                         {
-                            objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0);
+                            objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0, list[i]);
                         }
                     }
                 }
@@ -347,7 +348,7 @@
             }
         }
 
-        public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY)
+        public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY, Dictionary<string, string> dic)
         {
             //鑾峰彇琛ㄦ牸鏁版嵁
             ds = oCN.RunProcReturn($"select * from  h_v_JIT_Sc_WorkBillSortBillList where 鍗曟嵁鍙�='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList");
@@ -360,7 +361,7 @@
                 {
                     if (DateTime.Parse(ds.Tables[0].Rows[i]["鏃ヨ鍒掔敓浜ф棩鏈�"].ToString()) == date)
                     {
-                        oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY}" +
+                        oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY},HUseTimes={(dic["灏忔椂浜ц兘"]==""?0: HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))}" +
                             $"  where HInterID={HInterID} and HEntryID={ds.Tables[0].Rows[i]["hsubid"].ToString()}");
                         count += 1;
                     }
@@ -371,9 +372,9 @@
             {
                 //鎻掑叆瀛愯〃
                 oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," +
-                    "HMasterDate,HQty)" +
+                    "HMasterDate,HQty,HUseTimes)" +
                             $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," +
-                            $" '{date}', {HQTY})");
+                            $" '{date}', {HQTY},{(dic["灏忔椂浜ц兘"] == "0" ? 0 : HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))})");
             }
 
             objJsonResult.code = "1";

--
Gitblit v1.9.1