From 56877a7dbdf1983b7e5c74d9fd15798a0f782f89 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期日, 28 四月 2024 17:32:20 +0800
Subject: [PATCH] 销售订单,收料通知单,采购入库单修复bug,供应商列表增加保存字段
---
WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 66 +++++++++++++++++---------------
1 files changed, 35 insertions(+), 31 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index cefcc62..7f6aac8 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -207,26 +207,30 @@
////鎵ц瀛樺偍杩囩▼杩涜鍙嶅啓 璇ヨ涔熸槸 鏀舵枡閫氱煡鍗� 鍙嶅啓 閲囪喘璁㈠崟
// dss = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain_Delete " + HQty + ", '" + HSourceInterID + "', '" + HSourceEntryID + "','" + user + " '", "h_p_Cg_POInStockBillMain");
var sReturn = "";
- if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBacker"]) != 0)
- {
- sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = sReturn;
- objJsonResult.data = null;
- return objJsonResult;
- }
- if (ds.Tables[0].Rows.Count == 1)
- {
- oCN.RunProc("delete Cg_POInStockBillMain where HInterID=" + HInterID);
- oCN.RunProc("delete Cg_POInStockBillSub where HInterID=" + HInterID);
- }
- else
- {
- oCN.RunProc($"delete Cg_POInStockBillSub where HInterID={ HInterID}and HEntryID={HsupId}");
- }
-
+ oCN.RunProc("delete Cg_POInStockBillMain where HInterID=" + HInterID);
+ oCN.RunProc("delete Cg_POInStockBillSub where HInterID=" + HInterID);
+
+ //if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBacker"]) != 0)
+ //{
+ // sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = sReturn;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //if (ds.Tables[0].Rows.Count == 1)
+ //{
+ // oCN.RunProc("delete Cg_POInStockBillMain where HInterID=" + HInterID);
+ // oCN.RunProc("delete Cg_POInStockBillSub where HInterID=" + HInterID);
+ //}
+ //else
+ //{
+ // oCN.RunProc($"delete Cg_POInStockBillSub where HInterID={ HInterID}and HEntryID={HsupId}");
+ //}
+
+
oCN.Commit();
@@ -683,19 +687,19 @@
NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
NewHEntryID += 1;
}
- //鍙嶅啓閲囪喘璁㈠崟鍗� 涓婇潰鏂规硶涓篃鏈夊弽鍐� 姝よ缁欐敞閿�
+ //鍙嶅啓閲囪喘璁㈠崟鍗� 涓婇潰鏂规硶涓篃鏈夊弽鍐� 姝よ 璺� 杩斿洖缁撴灉 缁欐敞閿�
string sReturn = "";
//ds = oCN.RunProcReturn("exec h_p_Cg_POOrderBillMain " + oSub.HQty + ", '" + oSub.HSourceInterID + "', '" + oSub.HSourceEntryID + "','" + user + " '", "h_p_Cg_POOrderBillMain");
- if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0)
- {
- sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = sReturn;
- objJsonResult.data = null;
- return objJsonResult;
- }
-
+ //if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0)
+ //{
+ // sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = sReturn;
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
oCN.RunProc($@"Insert into Cg_POInStockBillSub
(HInterID,HEntryID,HMaterID,HUnitID,HQty,HPrice
,HMoney,HTaxRate,HTaxMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID
@@ -707,7 +711,7 @@
,HEXCHANGERATE,HLOCALCURRID,HISINCLUDEDTAX,HISPRICEEXCLUDETAX
,HTAXRATEID,HCOSTPERCENT,HCOSTAMOUNT,HVAT,HSELLERWITHHOLDING,HBUYERWITHHOLDING,HSecUnitID)
values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQty == null ? 0 : oSub.HQty)}
- ,{oSub.HPrice},{oSub.HMoney},{oSub.HTaxRate},{oSub.HTaxMoney},{oSub.HWHID},{oSub.HSPID},'{HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{HSourceBillNo}',{HSourceBillType},{oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},'{HPOOrderBillNo}',{HAuxPropID},{HBatchNO},{HMTONo},{HPlanMode},{HERPInterID},{HERPEntryID},{HRelationQty},{HGiveAwayFlag},{HReceiveQty},{HSEQ},{HPRODUCEDATE},{HEXPIRYDATE},
+ ,{oSub.HPrice},{oSub.HMoney},{oSub.HTaxRate},{oSub.HTaxMoney},{oSub.HWHID},{oSub.HSPID},'{oSub.HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{HSourceBillNo}',{HSourceBillType},{oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},'{HPOOrderBillNo}',{HAuxPropID},{HBatchNO},{HMTONo},{HPlanMode},{HERPInterID},{HERPEntryID},{HRelationQty},{HGiveAwayFlag},{HReceiveQty},{HSEQ},{HPRODUCEDATE},{HEXPIRYDATE},
{HSUPPLYLOT},{HREQTRACENO},{HBOMID},{HSTOCKUNITID},{HBASEUNITID},{HSTOCKSTATUSID},'{HKEEPERTYPEID}',{HPROJECTNO},{HCHECKINCOMING},{oSub.HTaxPrice},{HDISCOUNTRATE},{HPRICECOEFFICIENT},{HPRICEUNITID},{HPRICELISTENTRY},{HSAMPLEDAMAGEQTY},{HSAMPLEDAMAGEBASEQTY},{HPAYORGID},{HSETTLEORGID},{HSETTLECURRID},{HSETTLEMODEID},{HEXCHANGETYPEID},{HPAYCONDITONID},{oSub.HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},{oSub.HSecUnitID})");
}
--
Gitblit v1.9.1