From 7c026025675e1ea24be6d5c75360e41a60c4c78f Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期日, 23 一月 2022 11:05:36 +0800
Subject: [PATCH] 2
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 327 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 238 insertions(+), 89 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 3c105dc..e9279f3 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -183,10 +183,18 @@
/// <returns></returns>
[Route("Sc_MouldMaintainBill/GetMouldMaintainBillList")]
[HttpGet]
- public object GetMouldMaintainBillList(string sWhere)
+ public object GetMouldMaintainBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldMaintainBillList_s(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -244,10 +252,18 @@
/// <returns></returns>
[Route("Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList")]
[HttpGet]
- public object GetMouldDotCheckPlanBillList(string sWhere)
+ public object GetMouldDotCheckPlanBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldDotCheckPlanBillList_s(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -292,11 +308,18 @@
/// <returns></returns>
[Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillList")]
[HttpGet]
- public object GetMouldDotCheckBillList(string sWhere)
+ public object GetMouldDotCheckBillList(string sWhere,string user)
{
try
{
-
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldDotCheckBillList_s(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
@@ -390,10 +413,18 @@
/// <returns></returns>
[Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")]
[HttpGet]
- public object GetMouldMaintainPlanBillList(string sWhere)
+ public object GetMouldMaintainPlanBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldMaintainPlanBillList_s(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -439,10 +470,18 @@
/// <returns></returns>
[Route("Sc_MouldConkBookBill/GetMouldConkBookBillList")]
[HttpGet]
- public object GetMouldConkBookBillList(string sWhere)
+ public object GetMouldConkBookBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldConkBookBillList_s(sWhere);
objJsonResult.code = "1";
@@ -489,10 +528,19 @@
/// <returns></returns>
[Route("Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList")]
[HttpGet]
- public object GetMouldRepairCheckBillList(string sWhere)
+ public object GetMouldRepairCheckBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
ds = Sc_MouldRepairCheckBillList_s(sWhere);
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -595,10 +643,18 @@
/// <returns></returns>
[Route("Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList")]
[HttpGet]
- public object GetMouldRepairWorkBillList(string sWhere)
+ public object GetMouldRepairWorkBillList(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_MouldRepairWorkBillList_s(sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
@@ -1235,12 +1291,22 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill();
List<Model.ClsSb_MouldRepairWorkBillMain> lsmain = new List<Model.ClsSb_MouldRepairWorkBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -1420,17 +1486,17 @@
/// <returns></returns>
[Route("Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill")]
[HttpGet]
- public object DeltetMouldRepairWorkBill(string HInterID)
+ public object DeltetMouldRepairWorkBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -1656,6 +1722,15 @@
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DLL.ClsSc_MouldRepairCheckBill oBill = new DLL.ClsSc_MouldRepairCheckBill();
List<Model.ClsSc_MouldRepairCheckBillMain> lsmain = new List<Model.ClsSc_MouldRepairCheckBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -1839,17 +1914,17 @@
/// <returns></returns>
[Route("Sc_MouldRepairCheckBill/DeltetMouldRepairCheckBill")]
[HttpGet]
- public object DeltetMouldRepairCheckBill(string HInterID)
+ public object DeltetMouldRepairCheckBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -1917,7 +1992,7 @@
#region 妯″叿鏁呴殰鐧昏琛ㄤ繚瀛�/缂栬緫
/// <summary>
- /// 淇濆瓨妯″叿缁翠慨鍗�
+ /// 淇濆瓨鏁呴殰鐧昏琛�
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
@@ -1930,12 +2005,20 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
-
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
DAL.ClsSc_MouldConkBookBill oBill = new DAL.ClsSc_MouldConkBookBill();
List<Model.ClsSc_MouldConkBookBillMain> lsmain = new List<Model.ClsSc_MouldConkBookBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -2115,22 +2198,22 @@
#region [妯″叿鏁呴殰鐧昏琛ㄥ垹闄ゅ姛鑳絔
/// <summary>
- /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+ /// 妯″叿鏁呴殰鐧昏琛ㄥ垹闄ゅ姛鑳�
/// </summary>
/// <returns></returns>
[Route("Sc_MouldConkBookBill/DeltetMouldConkBookBill")]
[HttpGet]
- public object DeltetMouldConkBookBill(string HInterID)
+ public object DeltetMouldConkBookBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -2212,12 +2295,22 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DAL.ClsSc_MouldMaintainPlanBill oBill = new DAL.ClsSc_MouldMaintainPlanBill();
List<Model.ClsSc_MouldMaintainPlanBillMain> lsmain = new List<Model.ClsSc_MouldMaintainPlanBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -2391,17 +2484,17 @@
/// <returns></returns>
[Route("Sc_MouldMaintainPlanBill/DeltetMouldMaintainPlanBill")]
[HttpGet]
- public object DeltetMouldMaintainPlanBill(string HInterID)
+ public object DeltetMouldMaintainPlanBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -2484,11 +2577,21 @@
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_MouldMaintainBill_Edit", 1, false, msg5))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DAL.ClsSc_MouldMaintainBill oBill = new DAL.ClsSc_MouldMaintainBill();
List<Model.ClsSc_MouldMaintainBillMain> lsmain = new List<Model.ClsSc_MouldMaintainBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -2732,8 +2835,17 @@
/// <returns></returns>
[Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
[HttpGet]
- public object DeltetSc_MouldMaintainBill(string HInterID)
+ public object DeltetSc_MouldMaintainBill(string HInterID,string user)
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_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)
@@ -2813,12 +2925,21 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
-
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ 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("\\", "");
@@ -2987,22 +3108,22 @@
#region [妯″叿鐐规璁板綍琛ㄥ垹闄ゅ姛鑳絔
/// <summary>
- /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+ /// 妯″叿鐐规璁板綍鍒犻櫎鍔熻兘
/// </summary>
/// <returns></returns>
[Route("Sc_MouldDotCheckBill/DeltetSc_MouldDotCheckBill")]
[HttpGet]
- public object DeltetSc_MouldDotCheckBill(string HInterID)
+ public object DeltetSc_MouldDotCheckBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -3085,12 +3206,22 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DAL.ClsSc_MouldDotCheckPlanBill oBill = new DAL.ClsSc_MouldDotCheckPlanBill();
List<Model.ClsSc_MouldDotCheckPlanBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckPlanBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -3265,17 +3396,17 @@
/// <returns></returns>
[Route("Sc_MouldDotCheckPlanBill/DeltetSc_MouldDotCheckPlanBillBill")]
[HttpGet]
- public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID)
+ public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -3426,7 +3557,7 @@
/// <returns></returns>
[Route("Sc_MouldScrapInHouseBill/SaveGetMouldScrapInHouseBillList")]
[HttpPost]
- public object fSaveGetMouldScrapInHouseBillList([FromBody] JObject msg)
+ public object SaveGetMouldScrapInHouseBillList([FromBody] JObject msg)
{
var _value = msg["msg"].ToString();
string msg1 = _value.ToString();
@@ -3795,11 +3926,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList");
}
}
@@ -4370,11 +4501,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdBackBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldProdBackBillList");
}
else
{
- string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
}
@@ -4414,7 +4545,7 @@
{
ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty,
- 鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
+ 鍗曚环 HPrice, 閲戦 HMoney,鏀舵枡浠撳簱ID HWHID, 鏀舵枡浠撳簱浠g爜 HWHCode, 鏀舵枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdBackBillList"), "h_v_Sc_MouldProdBackBillList");
}
@@ -4424,7 +4555,7 @@
//string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 ";
string sql1 = string.Format(@"SELECT HMaterID,妯″叿浠g爜 HMaterCode,妯″叿鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,鎵规 HBatchNo,
璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 绱Н浣跨敤瀵垮懡 HUseLife, 搴斿彂鏁伴噺 HQtyMust, 瀹炲彂鏁伴噺 HQty,
- 鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
+ 鍗曚环 HPrice, 閲戦 HMoney,鏀舵枡浠撳簱ID HWHID, 鏀舵枡浠撳簱浠g爜 HWHCode, 鏀舵枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdBackBillList where 1 = 1 ");
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
@@ -4432,8 +4563,8 @@
}
//鏌ユ眹鎬�
ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
- HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdBackBillList
- where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdBackBillList");
+ 鏀舵枡浠撳簱ID,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱)鏀舵枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdBackBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,鏀舵枡浠撳簱ID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdBackBillList");
list.Add(ds.Tables[0]);
list.Add(ds1.Tables[0]);
@@ -4808,11 +4939,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鍒跺崟鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList");
}
@@ -5245,10 +5376,18 @@
[Route("Sc_MouldLifeChangeBill/GetMouldLifeChangeBill")]
[HttpGet]
- public object GetMouldLifeChangeBill(string sWhere)
+ public object GetMouldLifeChangeBill(string sWhere,string user)
{
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBillList", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = Sc_GetMouldLifeChangeBill(sWhere);
objJsonResult.code = "1";
@@ -5367,12 +5506,22 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
ListModels oListModels = new ListModels();
try
{
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Edit", 1, false, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
DLL.ClsSc_MouldLifeChangeBill oBill = new DLL.ClsSc_MouldLifeChangeBill();
List<Model.ClsSc_MouldLifeChangeBillMain> lsmain = new List<Model.ClsSc_MouldLifeChangeBillMain>();
msg2 = msg2.Replace("\\", "");
@@ -5494,17 +5643,17 @@
/// <returns></returns>
[Route("Sc_MouldLifeChangeBill/DeltetMouldLifeChangeBill")]
[HttpGet]
- public object DeltetMouldLifeChangeBill(string HInterID)
+ public object DeltetMouldLifeChangeBill(string HInterID,string user)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
--
Gitblit v1.9.1