From 22431386b2f13aa6bd30b9444974e98a3e8d7e01 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 20 九月 2024 09:50:04 +0800
Subject: [PATCH] 关键件绑定,物料新增编辑,流转卡
---
WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs | 366 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 330 insertions(+), 36 deletions(-)
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index 6a3a178..be44a06 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -1,4 +1,6 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing DBUtility;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -20,13 +22,34 @@
public DAL.ClsSc_MouldMaintainRuleBill BillNew = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
public DAL.ClsSc_MouldMaintainRuleBill BillOld = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
+
+ //public class HlpBill
+ //{
+ // public int HSouceInterID = 0;
+ // public int HSourceEntryID = 0;
+ // public int Type = 0;
+ // public string user { get; set; }
+ //}
#region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛�
[Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleList")]
[HttpGet]
- public object GetMouldMaintainRuleList(string sWhere)
+ public object GetMouldMaintainRuleList(string sWhere,string user)
{
try
{
+ List<object> columnNameList = new List<object>();
+ //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+ //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn("select * from h_v_Sc_MouldMaintainRuleBillList " + sWhere + " order by hmainid desc", "h_v_Sc_MouldMaintainRuleBillList");
@@ -37,22 +60,80 @@
string sql = sql1 + sWhere + " order by hmainid desc";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList");
}
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛≒DA
+ [Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleListPDA")]
+ [HttpGet]
+ public object GetMouldMaintainRuleListPDA(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍙嶅簭鍒楀寲浼犻�掔殑鍊�
+ //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�";
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
objJsonResult.data = null;
return objJsonResult;
}
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MouldMaintainRuleListByMould " + sWhere + " order by hmainid desc", "h_v_Sc_MouldMaintainRuleListByMould");
+ }
else
{
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
+ string sql1 = "select * from h_v_Sc_MouldMaintainRuleListByMould where 1 = 1";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleListByMould");
}
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
}
catch (Exception ex)
{
@@ -68,8 +149,18 @@
#region 鍣ㄥ叿淇濆吇瑙勭▼璁板綍鍒犻櫎鍔熻兘
[Route("Sc_MouldMaintainRuleBill/DeltetMouldMaintainRuleBillList")]
[HttpGet]
- public object DeltetMouldMaintainRuleBillList(string HInterID)
+ public object DeltetMouldMaintainRuleBillList(string HInterID,string user)
{
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
Int64 lngBillKey = 0;
lngBillKey = DBUtility.ClsPub.isLong(HInterID);
if (lngBillKey == 0)
@@ -150,11 +241,11 @@
}
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
- string sql = "select * from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
+ string sql = "select 淇濆吇椤圭洰ID,淇濆吇椤圭洰浠g爜,淇濆吇椤圭洰,淇濆吇閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜哄悕绉�,瀛愬娉�2 from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillSub_Item");
//鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
- string sql1 = "select 閰嶄欢ID,閰嶄欢浠g爜,閰嶄欢鍚嶇О,鍗曚綅ID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅鍚嶇О,鐢ㄩ噺,鏍囧噯鐢ㄩ噺,瀛愬娉� from h_v_Sc_MouldMaintainRuleBillList where 1 = 1 " + Swhere + "";
- ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillList");
+ string sql1 = "select 閰嶄欢ID,閰嶄欢浠g爜,閰嶄欢鍚嶇О,鍗曚綅ID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅鍚嶇О,鐢ㄩ噺,鏍囧噯鐢ㄩ噺,瀛愬娉�1 from h_v_Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + "";
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillSub");
list.Add(ds.Tables[0]);
list.Add(ds1.Tables[0]);
@@ -182,14 +273,64 @@
if (string.IsNullOrEmpty(HID))
return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldMaintainRuleBillList where hmainid= " + HID + " ", "h_v_Sc_MouldMaintainRuleBillList");
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldMaintainRuleBill_Edit where HInterID= " + HID + " ", "h_v_Sc_MouldMaintainRuleBill_Edit");
if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ櫒鍏蜂繚鍏昏绋嬭褰�" };
return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
}
#endregion
+ #region 鍣ㄥ叿淇濆吇瑙勭▼缂栬緫鏃惰幏鍙栬〃浣撴暟鎹柊(淇濆吇椤瑰垪琛ㄣ�侀厤浠堕」鍒楄〃)
+ [Route("Sc_MouldMaintainRuleBill/Sc_MouldMaintainRuleBillSubAndSubItem")]
+ [HttpGet]
+ public object Sc_MouldMaintainRuleBillSubAndSubItem(string HInterID)
+ {
+
+ DataSet ds, ds1;
+ List<object> list = new List<object>();
+ string Swhere = "";
+ try
+ {
+ if (HInterID != "" || HInterID != null)
+ {
+ Swhere = " and hmainid='" + HInterID + "'";
+ }
+ else
+ {
+ Swhere = HInterID;
+ }
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
+ string sql = "select 淇濆吇椤圭洰ID HMaintainItemID,淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillSub_Item");
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark from h_v_Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + "";
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainRuleBillSub");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
#region 鍣ㄥ叿淇濆吇瑙勭▼琛� 淇濆瓨/缂栬緫
+ /// <summary>
+ /// 淇濆瓨妯″叿缁翠慨鍗�
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
[Route("Sc_MouldMaintainRuleBill/SaveMouldMaintainRuleBillList")]
[HttpPost]
public object SaveMouldMaintainRuleBillList([FromBody] JObject msg)
@@ -200,29 +341,38 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string msg4 = sArray[2].ToString();
+ string msg5 = sArray[3].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBill_Edit", 1, false, msg5))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DAL.ClsSc_MouldMaintainRuleBill oBill = new DAL.ClsSc_MouldMaintainRuleBill();
List<Model.ClsSc_MouldMaintainRuleBillMain> lsmain = new List<Model.ClsSc_MouldMaintainRuleBillMain>();
msg2 = msg2.Replace("\\", "");
msg2 = msg2.Replace("\n", ""); //\n
+ //涓昏〃
lsmain = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillMain(msg2);
foreach (Model.ClsSc_MouldMaintainRuleBillMain oItem in lsmain)
{
- //oItem.HMaker = "";
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "3833";
oItem.HBillSubType = "3833";
- //oItem.HInterID =0;
- //oItem.HBillNo = "";
oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-
- //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+
if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
{
objJsonResult.code = "0";
@@ -248,20 +398,17 @@
i++;
item.HEntryID = i;
- //oItemSub.HCloseMan = ""; //琛屽叧闂�
item.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
item.HCloseType = false; //鍏抽棴绫诲瀷
- //oItemSub.HRemark = ""; //澶囨敞
item.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
item.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
- //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
- //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
item.HRelationQty = 0; //鍏宠仈鏁伴噺
oBill.DetailColl_Pay.Add(item);
}
- //閰嶄欢琛ㄤ綋鏁版嵁
+
+ //閰嶄欢椤硅〃浣撴暟鎹�
//鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
msg4 = msg4.Substring(1, msg4.Length - 2);
msg4 = msg4.Replace("\\", "");
@@ -274,26 +421,19 @@
{
j++;
- oItemSub.HEntryID = i;
+ oItemSub.HEntryID = j;
//oItemSub.HCloseMan = ""; //琛屽叧闂�
oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
- //oItemSub.HRemark = ""; //澶囨敞
+
oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
- //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
- //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+
oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
- //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
- //HMaterID = "";//閰嶄欢浠g爜
- //HUnitID = "";//鍗曚綅浠g爜
- //HQty = "";//瀹為檯鐢ㄩ噺
- //HQtyMust = "";//鍗曚綅鐢ㄩ噺
- //HRemark = "";//澶囨敞
-
oBill.DetailColl_Mater.Add(oItemSub);
-
}
+
+
//淇濆瓨
//淇濆瓨瀹屾瘯鍚庡鐞�
bool bResult;
@@ -334,5 +474,159 @@
}
}
#endregion
+
+ #region 鍣ㄥ叿淇濆吇瑙勭▼瀹℃牳/鍙嶅鏍稿姛鑳�
+ [Route("Sc_MouldMaintainRuleBill/CheckSc_MouldMaintainRuleBill")]
+ [HttpGet]
+ public object CheckSc_MouldMaintainRuleBill(string HInterID, int Type, string user, string HBillSubType)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁瀹℃牳鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Sc_MouldMaintainRuleBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶉渶瑕佸啀瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //瀹℃牳鍓嶆帶鍒�
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_BeforeCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.CheckBill(Int64.Parse(HInterID), HBillNo, "h_p_Sc_MouldMaintainRuleBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插弽瀹℃牳!涓嶉渶瑕佸啀鍙嶅鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //鍙嶅鏍稿墠鎺у埗
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ sql = "exec h_p_Sc_MouldMaintainRuleBill_BeforeUnCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldMaintainRuleBill_BeforeUnCheckCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.AbandonCheck(Int64.Parse(HInterID), HBillNo, "h_p_Sc_MouldMaintainRuleBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
--
Gitblit v1.9.1