From 4bf3ca7fc8e3cceba62d6617724cac3cbc919746 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期一, 15 八月 2022 21:53:14 +0800
Subject: [PATCH] 工资系统部署测试
---
WebAPI/Controllers/生产管理/报工台工序/Sc_MaterToSourceStepBillController.cs | 103 +++++++++++++++++++++++++++++----------------------
1 files changed, 58 insertions(+), 45 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_MaterToSourceStepBillController.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_MaterToSourceStepBillController.cs"
index 59f5c29..4f5a663 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_MaterToSourceStepBillController.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_MaterToSourceStepBillController.cs"
@@ -12,7 +12,7 @@
namespace WebAPI.Controllers
{
//鐢熶骇涓婃枡鍗旵ontroller
- public class Sc_MaterToSourceStepBill : ApiController
+ public class Sc_MaterToSourceStepBillController : ApiController
{
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -34,36 +34,47 @@
/// </summary>
[Route("Sc_MaterToSourceStepBill/list")]
[HttpGet]
- public object list(string sWhere)
+ public object list(string sWhere,string user)
{
try
{
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Sc_MaterToSourceStepBill_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_MaterToSourceBillMain " + sWhere, "h_v_Sc_MaterToSourceBillMain");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MaterToSourceBillMain order by hmainid desc ", "h_v_Sc_MaterToSourceBillMain");
}
else
{
string sql1 = "select * from h_v_Sc_MaterToSourceBillMain where 1 = 1 ";
- string sql = sql1 + sWhere;
+ string sql = sql1 + sWhere+ " order by hmainid desc ";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillMain");
}
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鏌ヨ鏁版嵁鎴愬姛锛�";
- 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)
{
@@ -146,14 +157,14 @@
{
DBUtility.ClsPub.CurUserName = UserName;
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_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_MaterToSourceStepBill_Drop", 1, false, DBUtility.ClsPub.CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -417,16 +428,17 @@
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
string refSav = sArray[2].ToString();
+ string user = sArray[3].ToString();
//淇濆瓨鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_Edit", 1, false, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("Sc_MaterToSourceStepBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
string s = "";
@@ -640,19 +652,20 @@
[HttpGet]
public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName)
{
- string ModRightNameCheck = "MES_MaterToSourceBill_Check";
+ string ModRightNameCheck = "Sc_MaterToSourceStepBill_Check";
DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
if (HInterID <= 0)
{
objJsonResult.code = "0";
--
Gitblit v1.9.1