From a985e6ba578b4ec28a25932f871c4df76ce092f2 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 12 五月 2026 15:02:39 +0800
Subject: [PATCH] 模块添加自定义标签鉴权 在Token启用的情况下。通过自定义标签定义的modname和Operate 判断用户是否有访问模块的权限
---
WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
index 721bad5..55868ee 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldinventoryBillController.cs
@@ -10,9 +10,11 @@
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
+using WebAPI.Utility;
namespace WebAPI.Controllers.MJGL
{
+ [Permission(HModName = "Gy_MaterialMouldBillMain")]
public class Sc_MouldinventoryBillController : ApiController
{
@@ -30,6 +32,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟鍗曞垪琛�
[Route("Sc_MouldDotCheckRuleBill/Gy_MaterialMouldBillMainList")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Query")]
public object Sc_MouldDotCheckRuleList(string sWhere, string user)
{
try
@@ -90,6 +93,7 @@
/// <returns></returns>
[Route("Sc_MouldinventoryBill/SaveGy_MaterialMouldBillMain")]
[HttpPost]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Edit")]
public object SaveGy_MaterialMouldBillMain([FromBody] JObject sMainSub)
{
var _value = sMainSub["sMainSub"].ToString();
@@ -258,6 +262,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟缂栬緫鏃惰幏鍙栬〃浣撴暟鎹�
[Route("Sc_MouldinventoryBill/Gy_MaterialMouldBillMainEditList")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Edit")]
public object Gy_MaterialMouldBillMainEditList(string HInterID, string User)
{
try
@@ -307,6 +312,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟璁板綍鍒犻櫎鍔熻兘
[Route("Sc_MouldinventoryBill/DeleteGy_MaterialMouldBillMain")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Drop")]
public object DeleteGy_MaterialMouldBillMain(string HInterID, string user)
{
try
@@ -403,6 +409,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟鍒楄〃 瀹℃牳/鍙嶅鏍稿姛鑳�
[Route("Sc_MouldinventoryBill/CheckGy_MaterialMouldBillMain")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Check")]
public object CheckGy_MaterialMouldBillMain(int HInterID, int IsAudit, string CurUserName)
{
DBUtility.ClsPub.CurUserName = CurUserName;
@@ -603,6 +610,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟鍒楄〃 鍏抽棴/鍙嶅叧闂姛鑳�
[Route("Sc_MouldinventoryBill/CloseGy_MaterialMouldBillMain")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Close")]
public object CloseGy_MaterialMouldBillMain(string HInterID, int IsAudit, string user)
{
try
@@ -692,6 +700,7 @@
#region 浜у搧鍣ㄥ叿娓呭崟浣滃簾/鍙嶄綔搴熷姛鑳�
[Route("Sc_MouldinventoryBill/DeleteGy_MaterialMouldBillMain")]
[HttpGet]
+ [Permission(HModName = "Gy_MaterialMouldBillMain_Delete")]
public object DeleteGy_MaterialMouldBillMain(string HInterID, int Type, string user)
{
try
--
Gitblit v1.9.1