From 2f21e4d7ef8c407e67a2f9880a0a6af3ad2e354f Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 07 二月 2022 22:09:03 +0800
Subject: [PATCH] 班组职员清单
---
WebAPI/Controllers/生产管理/报工台工序/Sc_QualityReportStepBillController.cs | 60 ++++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 42 insertions(+), 18 deletions(-)
diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs"
index 5748e4a..0943ccb 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_QualityReportStepBillController.cs"
@@ -6,6 +6,7 @@
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
+using ViewAPI;
using WebAPI.Models;
namespace WebAPI.Controllers
@@ -25,10 +26,20 @@
#region 杩斿洖鐢熶骇璐ㄩ噺姹囨姤鍗曞垪琛�
[Route("Sc_QualityReportStepBill/list")]
[HttpGet]
- public object list(string sWhere)
+ public object list(string sWhere,string user)
{
try
{
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_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_Sc_QualityReportBillListDetail " + sWhere, "h_v_Sc_QualityReportBillListDetail");
@@ -87,8 +98,11 @@
ds = oCN.RunProcReturn
("select a.HInterID,a.HBillType,a.HICMOBillNo,a.HICMOInterID,a.HMaterID" +
",m.HNumber HMaterNumber,m.HName HMaterName,m.HModel HMaterModel,a.HICMOEntryID " +
+ ",a.HProcID,p.HNumber HProcNo,p.HName HProcName,a.HSourceID,s.HNumber HSourceNumber,s.HName HSourceName " +
" from Sc_ICMOBillStatus_Tmp a " +
" left join Gy_Material m on a.HMaterID=m.HItemID " +
+ " left join Gy_Process p on a.HProcID=p.HItemID " +
+ " left join Gy_Source s on a.HSourceID=s.HItemID " +
" Where a.HInterID=" + HInterID + " and a.HBillType="+ HBillType, "Sc_ICMOBillStatus_Tmp");
}
if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -255,21 +269,21 @@
#region 璐ㄩ噺姹囨姤鍗曞垪琛ㄥ垹闄ゆ寜閽�
[Route("Sc_QualityReportStepBill/DeltetSc_QualityReportBill")]
[HttpGet]
- public object DeltetSc_QualityReportBill(long HItemID)
+ public object DeltetSc_QualityReportBill(long HItemID,string user)
{
DataSet ds;
DataSet ds1;
try
{
//鍒犻櫎鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (HItemID == 0)
@@ -281,8 +295,8 @@
return objJsonResult;
}
oCN.BeginTran();//寮�濮嬩簨鍔�
- ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain where hmainid=" + HItemID, "Sc_QualityReportBillMain");
- ds1 = oCN.RunProcReturn("select * from Sc_QualityReportBillSub where hmainid=" + HItemID, "Sc_QualityReportBillSub");
+ ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain where HInterID=" + HItemID, "Sc_QualityReportBillMain");
+ ds1 = oCN.RunProcReturn("select * from Sc_QualityReportBillSub where HInterID=" + HItemID, "Sc_QualityReportBillSub");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -310,18 +324,18 @@
// objJsonResult.data = null;
// return objJsonResult;
//}
- string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
- if (HUseFlag == "宸蹭娇鐢�")
+ string HBillStatus = Convert.ToString(ds.Tables[0].Rows[0]["HBillStatus"]);
+ if (HBillStatus == "2")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+ objJsonResult.Message = "姝ら」鐩凡瀹℃牳锛屼笉鑳藉垹闄わ紒";
objJsonResult.data = null;
return objJsonResult;
}
- oCN.RunProc("delete from Sc_QualityReportBillMain where hmainid=" + HItemID);
- oCN.RunProc("delete from Sc_QualityReportBillSub where hmainid=" + HItemID);
+ oCN.RunProc("delete from Sc_QualityReportBillMain where HInterID=" + HItemID);
+ oCN.RunProc("delete from Sc_QualityReportBillSub where HInterID=" + HItemID);
oCN.Commit();//鎻愪氦浜嬪姟
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -385,7 +399,7 @@
{
oCN1.BeginTran();
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Check", 1, true, HChecker))
+ if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Check", 1, false, HChecker))
{
oCN1.RollBack();
objJsonResult.code = "0";
@@ -618,6 +632,16 @@
{
try
{
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Edit", 1, false, HChecker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愮紪杈�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
bool bResult2 = false;
oCN.BeginTran();
--
Gitblit v1.9.1