From 8a5a1c5f786298d72fa56f54cb3745e807e084d7 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期六, 05 十月 2024 09:19:45 +0800
Subject: [PATCH] 获取单据内码-流转卡
---
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | 73 +++++++++++++++++++++++++++++++++---
1 files changed, 67 insertions(+), 6 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 5cdf611..a14f30b 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1,6 +1,7 @@
锘縰sing Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -1065,7 +1066,7 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
string sql = string.Format(@"exec h_p_Sc_GetProcessExchangeBillSubTech ");
- ds = oCN.RunProcReturn(sql + HInterID, "h_p_Sc_GetProcessExchangeBillSubTech");
+ ds = oCN.RunProcReturn(sql + " '" + HInterID + "'", "h_p_Sc_GetProcessExchangeBillSubTech");
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1911,6 +1912,59 @@
}
#endregion
+ #region 宸ュ簭娴佽浆鍗″垎椤靛垪琛�
+ [Route("Sc_ProcessExchangeBillList/page")]
+ [HttpGet]
+ public json page(string sWhere, string user, int page, int size)
+ {
+ json res = new json();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessExchangeBill_SubQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",''", "h_p_Sc_ProcessExchangeBillList_Query");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_Query");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ res.code = CodeConstant.SUCCEED;
+ res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ res.Message = "Sucess锛�";
+ res.list = columnNameList;
+ res.data = ds.Tables[0];
+ return res;
+ }
+ catch (Exception e)
+ {
+ res.code = CodeConstant.FAIL;
+ res.count = CountConstant.FAIL;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 宸ュ簭娴佽浆鍗″垪琛�
/// <summary>
/// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛ㄤ俊鎭�
@@ -2083,18 +2137,24 @@
DateTime dt = DateTime.Now;
string sql = "";
+ Int64 HInterID = 0;
string HBillNo = "";
Int64 HICMOInterID = 0;
Int64 HICMOEntryID = 0;
string HICMOBillNo = "";
double HQty = 0;
+ double HProQty = 0;
+
foreach (Model.ClsSc_ProcessExchangeBillSub_BatchSplit oItemSub in ls)
{
- HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true);
+ //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3772", ref DBUtility.ClsPub.sExeReturnInfo, true);
+ HInterID = oItemSub.HInterID;
+ HBillNo = oItemSub.HBillNo;
HICMOInterID = oItemSub.HICMOInterID;
HICMOEntryID = oItemSub.HICMOEntryID;
HICMOBillNo = oItemSub.HICMOBillNo;
HQty = oItemSub.HQty;
+ HProQty = oItemSub.HProQty;
sql = "select * from h_v_Sc_ProcessExchangeBill_BatchSplit where hmainid = " + oItemSub.HICMOInterID + " and hentryid = "
+ oItemSub.HICMOEntryID;
@@ -2102,6 +2162,7 @@
//涓昏〃璧嬪��
if (ds.Tables[0].Rows.Count > 0 && ds != null)
{
+ oBill.omodel.HInterID = HInterID;
oBill.omodel.HBillNo = HBillNo;
oBill.omodel.HBillSubType = "3772";
oBill.omodel.HMainSourceBillSubType = "3710";
@@ -2112,7 +2173,7 @@
oBill.omodel.HYear = DBUtility.ClsPub.isLong(oItemSub.HDate.Year);
oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(oItemSub.HDate.Month);
oBill.omodel.HRemark = "";
- oBill.omodel.HBatchNo = "";
+ oBill.omodel.HBatchNo = oItemSub.HBatchNo;
oBill.omodel.HMainMaterID = 0;
oBill.omodel.HKeyMaterID = 0;
oBill.omodel.HNo = 0;
@@ -2205,7 +2266,7 @@
oBill.omodel.HRemark_New = "";
oBill.omodel.HWeight_New = 0;
oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString();
- oBill.omodel.HMouldNum = "0";
+ oBill.omodel.HMouldNum = "0";
}
//瀛愯〃璧嬪��
for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
@@ -2235,11 +2296,11 @@
oItemSubs.HDeptID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[i]["HDeptID"]);
oItemSubs.HDeptNumber = ds.Tables[0].Rows[i]["HDeptNumber"].ToString();
oItemSubs.HGroupID = 0;
- oItemSubs.HGroupNumber = "";
+ oItemSubs.HGroupNumber = oItemSub.HGroupNumber;
oItemSubs.HWorkerID = 0;
oItemSubs.HWorkerNumber = "";
oItemSubs.HSourceID = 0;
- oItemSubs.HQty = HQty;
+ oItemSubs.HQty = HProQty;
oItemSubs.HTimeUnit = "";
oItemSubs.HPlanWorkTimes = 0;
oItemSubs.HPlanBeginDate = Convert.ToDateTime(dt.ToShortDateString().ToString());
--
Gitblit v1.9.1