From 32697b2f31356dc6be27dea34ff2eccc5fdd0582 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 31 八月 2023 16:12:45 +0800
Subject: [PATCH] 涤纶半成品生成条码模块,出站汇报单单据号、单据ID获取修改
---
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs | 16 +++++++---------
1 files changed, 7 insertions(+), 9 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..2a7ef44 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"
@@ -300,12 +300,11 @@
{
SumCount += 1;
////淇濆瓨瀛愯〃
-
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)
{
TrueCount += 1;
@@ -314,7 +313,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,11 +346,10 @@
}
}
- 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");
-
int count = 0;
if (ds.Tables[0].Rows.Count > 0)
{
@@ -360,7 +358,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"?0: HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))}" +
$" where HInterID={HInterID} and HEntryID={ds.Tables[0].Rows[i]["hsubid"].ToString()}");
count += 1;
}
@@ -371,9 +369,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