From 3378439708add2bc40f4d6d77aebc11367e380fd Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 20 四月 2026 15:48:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index efc32da..786424d 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -768,19 +768,15 @@
{
try
{
- LogService.Write("1");
Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
- LogService.Write("2");
string HBeginDate = dic["HBeginDate"].ToString();//寮�濮嬫棩鏈�
- LogService.Write("3"+ HBeginDate);
string HEndDate = dic["HEndDate"].ToString();//缁撴潫鏃ユ湡
- LogService.Write("4" + HEndDate);
string HMouldNo = dic["HMouldNo"].ToString();//妯″叿缂栫爜
- LogService.Write("5" + HMouldNo);
string HName = dic["HName"].ToString();//妯″叿鍚嶇О
- LogService.Write("6" + HName);
- ds = oCN.RunProcReturn("exec h_P_Sc_MouldLifeUsePicReport '" + HBeginDate + "'," + HEndDate + ",'" + HMouldNo + "','" + HName + "'", "h_P_Sc_MouldLifeUsePicReport");
+ LogService.Write("exec h_P_Sc_MouldLifeUsePicReport '" + HBeginDate + "','" + HEndDate + "','" + HMouldNo + "','" + HName + "'");
+
+ ds = oCN.RunProcReturn("exec h_P_Sc_MouldLifeUsePicReport '" + HBeginDate + "','" + HEndDate + "','" + HMouldNo + "','" + HName + "'", "h_P_Sc_MouldLifeUsePicReport");
List<object> columnNameList = new List<object>();
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -795,7 +791,6 @@
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
return objJsonResult;
- //}
}
catch (Exception e)
{
@@ -1453,7 +1448,7 @@
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
objJsonResult.data = null;
oCN.RollBack();
@@ -1463,7 +1458,7 @@
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
objJsonResult.data = null;
oCN.RollBack();
@@ -1476,7 +1471,7 @@
if (!oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_MoveStockBill_AfterCheckCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -1507,7 +1502,7 @@
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
objJsonResult.data = null;
return objJsonResult;
@@ -1516,7 +1511,7 @@
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
objJsonResult.data = null;
return objJsonResult;
@@ -1531,7 +1526,7 @@
else
{
objJsonResult.code = "0";
- objJsonResult.count = 1;
+ objJsonResult.count = 0;
objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -1788,6 +1783,62 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鐩存帴璋冩嫧鍗曞垪琛ㄥ垎椤靛垪琛�
+ [Route("Kf_MoveStockBill/page")]
+ [HttpGet]
+ public json Sc_MouldProdOutBillPage(string sWhere, string user, int page, int size, string Type)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒楄〃杩涘叆鏃跺垽鏂潈闄愶紝閫夋簮鍗曡繘鍏ヤ笉鍒ゆ柇鏉冮檺
+
+ if (!DBUtility.ClsPub.Security_Log("Kf_MoveStockBillQuery", 3, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ sWhere = sWhere.Replace("'", "''");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn("exec h_p_IF_MoveStockBillList " + page + "," + size + ",'','" + Type + "'", "h_p_IF_MoveStockBillList");
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("exec h_p_IF_MoveStockBillList " + page + "," + size + ",'" + sWhere + "','" + Type + "'", "h_p_IF_MoveStockBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -8510,7 +8561,7 @@
objJsonResult.data = null;
return objJsonResult;
}
-
+
DAL.ClsSc_MouldDotCheckBill oBill = new DAL.ClsSc_MouldDotCheckBill();
List<Model.ClsSc_MouldDotCheckBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -8525,6 +8576,8 @@
oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
{
@@ -8535,6 +8588,21 @@
return objJsonResult;
}
oBill.omodel = oItem;
+
+ LogService.Write("Insert Into Sc_MouldDotCheckBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+ ",HYear,HPeriod,HRemark" +
+ ",HMouldID,HBeginDate" +
+ ",HEndDate,HPlanNo,HPlanInterID" +
+ ",HInnerBillNo,HExplanation,HMouldDotCheckRuleID" +
+ ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" +
+ ") " +
+ " values('" + oBill.BillType + "','" + oBill.HBillSubType + "'," + oBill.omodel.HInterID.ToString() + ",'" + oBill.omodel.HBillNo + "','" + oBill.omodel.HDate + "','" + oBill.omodel.HMaker + "',getdate()" +
+ "," + oBill.omodel.HYear.ToString() + "," + oBill.omodel.HPeriod.ToString() + ",'" + oBill.omodel.HRemark + "'" +
+ "," + oBill.omodel.HMouldID.ToString() + ",'" + oBill.omodel.HBeginDate + "'" +
+ ",'" + oBill.omodel.HEndDate + "','" + oBill.omodel.HPlanNo + "'," + oBill.omodel.HPlanInterID.ToString() +
+ ",'" + oBill.omodel.HInnerBillNo + "','" + oBill.omodel.HExplanation + "','" + oBill.omodel.HMouldDotCheckRuleID + "','" + oBill.omodel.HLastResult + "','" + oBill.omodel.HErrNote + "','" + oBill.omodel.HBigSafeNote + "'," + oBill.omodel.HShiftsID + ",'" + oBill.omodel.HDotCheckNote + "'" +
+ ") ");
}
//琛ㄤ綋鏁版嵁
//鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
@@ -8560,9 +8628,21 @@
oBill.DetailColl.Add(oItemSub);
-
+ LogService.Write("Insert into Sc_MouldDotCheckBillSub " +
+ " (HInterID,HEntryID" +
+ ",HManagerID" +
+ ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" +
+ ",HCloseMan,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" +
+ ") values("
+ + oBill.omodel.HInterID.ToString() + "," + oItemSub.HEntryID.ToString() +
+ "," + oItemSub.HManagerID.ToString() + "," + oItemSub.HDotCheckItemID.ToString() +
+ ",'" + oItemSub.HDotCheckItem + "','" + oItemSub.HDotCheckPart + "','" + oItemSub.HClaim + "'" +
+ ",'" + oItemSub.HCloseMan + "'," + Convert.ToString(oItemSub.HCloseType ? 1 : 0) + ",'" + oItemSub.HRemark + "'" +
+ "," + oItemSub.HSourceInterID.ToString() + "," + oItemSub.HSourceEntryID.ToString() + ",'" + oItemSub.HSourceBillNo + "','" + oItemSub.HSourceBillType + "'," + oItemSub.HRelationQty.ToString() + "," + oItemSub.HRelationMoney.ToString() + "," + oItemSub.HDotCheckItemClassID + "," + oItemSub.HDotCheckItemMethodID + ",'" + oItemSub.HDotCheckResult + "'" +
+ ") ");
}
-
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
--
Gitblit v1.9.1