From 3b9d0ef535563fff2102a76a59581301037a2b84 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 19 九月 2024 08:47:02 +0800
Subject: [PATCH] 设备维修记录单 模具维修记录单 保养记录单
---
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs | 74 +++++++++++++++++++++++++++++++++++-
1 files changed, 71 insertions(+), 3 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
index 84c4be6..1a3e078 100644
--- a/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
+++ b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
@@ -15,6 +15,7 @@
public class SB_EquipICMOTechParamBillController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
public const string ModName = "3919"; //鍗曟嵁绫诲瀷
public const string ModCaption = "璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�"; //鍗曟嵁鍚嶇О
public const string ModRightName = "SB_EquipICMOTechParamBill";
@@ -739,11 +740,29 @@
oBill.DetailColl.Add(oItemSub);
}
- //淇濆瓨
- bool bResult;
+ //鑾峰彇绯荤粺鍙傛暟
+ string Ret = "";
+ if (oSystemParameter.ShowBill(ref Ret))
+ {
+ if (oSystemParameter.omodel.SB_EquipICMOTechParamBill_MustBeginWorkCtl == "Y")
+ {
+ ds = oCn.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceID = '" + oBill.omodel.HSourceID + "' and HSourceBillNo = '" + oBill.omodel.HProcExchBillNo + "' and HSourceInterID = '" + oBill.omodel.HProcExchInterID + "'and HSourceEntryID = '" + oBill.omodel.HProcExchEntryID + "' and hicmostatus =1", "Sc_ICMOBillStatus_Tmp");
+ if (ds.Tables[0].Rows[0]["HICMOStatus"].ToString() != "1")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠宸ュ崟涓嶆槸寮�宸ョ姸鎬佷笉鑳借繘琛岃澶囧伐鑹哄弬鏁扮偣妫�锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+
+ //淇濆瓨
+ bool bResult;
if (OperationType == "1") //鏂板淇濆瓨
{
- bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill (ref DBUtility.ClsPub.sExeReturnInfo);
}
else //缂栬緫淇濆瓨
{
@@ -780,6 +799,55 @@
#endregion
+ #region 寮傚父宸ヨ壓鍙傛暟棰勮鍒楄〃淇℃伅
+ /// <summary>
+ /// 寮傚父宸ヨ壓鍙傛暟棰勮鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("SB_EquipICMOTechParamBillController/GetSb_EquipMentCollectionTechParam_ERR")]
+ [HttpGet]
+ public object GetSb_EquipMentCollectionTechParam_ERR(string sWhere, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //杩斿洖鍒楄〃淇℃伅
+ ds = oCn.RunProcReturn("select * from h_v_Sb_EquipMentCollectionTechParam_ERRList where 1=1 " + sWhere + " order by 鍙戠幇寮傚父鏃堕棿 desc", "h_v_Sb_EquipMentCollectionTechParam_ERRList");
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ 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 = 1;
+ 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;
+ }
+ }
+ #endregion
+
}
--
Gitblit v1.9.1