From 39965ac16351d5b814ea4cdaf8017695ba42530f Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期一, 30 五月 2022 13:36:19 +0800
Subject: [PATCH] 修改了选机台直接根据系统登录人员过滤功能
---
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 69 +++++++++++++++++++++++++---------
1 files changed, 51 insertions(+), 18 deletions(-)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
index 84cbef5..14414ac 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
@@ -42,9 +42,21 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string OperationType = sArray[2].ToString().Trim();
+ string user = sArray[3].ToString();//鐢ㄦ埛鍚�
+
bool bResult;
try
{
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
msg2 = "[" + msg2.ToString() + "]";
List<Model.ClsQC_ProcessCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillMain>>(msg2);
DAL.ClsQC_ProcessCheckBill BillNew = new DAL.ClsQC_ProcessCheckBill();
@@ -370,11 +382,21 @@
/// </summary>
[Route("QC_ProcessCheckBill/Delete_Json")]
[HttpGet]
- public object Delete_Json(long HItemID)
+ public object Delete_Json(long HItemID,string user)
{
DAL.ClsQC_ProcessCheckBill BillOld = new DAL.ClsQC_ProcessCheckBill();
try
{
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
if (BillOld.DeleteBill(HItemID, ref ClsPub.sExeReturnInfo) != true)
{
objJsonResult.code = "1";
@@ -408,10 +430,20 @@
/// </summary>
[Route("QC_ProcessCheckBill/GetProcessCheckBillList")]
[HttpGet]
- public object GetProcessCheckBillList(string sWhere)
+ public object GetProcessCheckBillList(string sWhere,string user)
{
try
{
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_Query", 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_QC_ProcessCheckBillListDetail order by hmainid desc ", "h_v_QC_ProcessCheckBillListDetail");
@@ -422,22 +454,23 @@
string sql = sql1 + sWhere+ " order by hmainid desc ";
ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillListDetail");
}
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
}
catch (Exception e)
{
--
Gitblit v1.9.1