From f52d27c5ae0e0d128fa44477ef1daa80aece6d00 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期一, 16 八月 2021 22:39:14 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 69 ++++++++++++++++++++++++++++------
1 files changed, 56 insertions(+), 13 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
index a320d3b..66f36c0 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -17,6 +17,10 @@
public WebServer webserver = new WebServer();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
private WebS.WebService1 oWebs = new WebS.WebService1();
+ //鑾峰彇绯荤粺鍙傛暟
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+ Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain = new Pub_Class.ClsXt_SystemParameterMain();
+
#region 寮�宸ュ崟
@@ -193,14 +197,14 @@
public object DeltetMESBeginWorkBill(string HInterID)
{
//缂栬緫鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("Sc_MESBeginWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 0;
- // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
- // objJsonResult.data = null;
- // return objJsonResult;
- //}
+ if (!DBUtility.ClsPub.Security_Log("MES_MESBeginWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
Int64 lngBillKey = 0;
@@ -455,14 +459,32 @@
[HttpPost]
public object SaveGetMESBeginWorkFrom([FromBody] JObject msg)
{
+ //淇濆瓨鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("MES_MESBeginWorkBill_Edit", 1, true, DBUtility.ClsPub.CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
var _value = msg["msg"].ToString();
string msg1 = _value.ToString();
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
-
-
-
-
ListModels oListModels = new ListModels();
try
{
@@ -473,6 +495,7 @@
lsmain = oListModels.getObjectByJson_Gy_MESBeginWorkFrom(msg2);
foreach (Models.ClsSc_MESBeginWorkBillMain oItem in lsmain)
{
+ DBUtility.ClsPub.CurUserName =oItem.HMaker;
oItem.HBillType = "3787";
oItem.HBillSubType = "3787";
oItem.HBillStatus = 1; //鍗曟嵁鐘舵�侊紙1鏈锛�2瀹℃牳閫氳繃锛�3鍏抽棴锛�4浣滃簾锛�5瀹℃牳閫�鍥�,6瀹℃牳涓�,7宸查槄锛�8宸插洖澶嶏紝9缁撴锛�10楠岃瘉,11涓嬭揪锛�12寮�宸�,13鐢宠瀹℃壒,15鐢宠妫�楠岋紝16 鍒ゅ畾鍚堟牸锛�17鍒ゅ畾涓嶅悎鏍硷級
@@ -495,15 +518,35 @@
bool bResult;
if (oBill.omodel.HInterID == 0)
{
- // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ if (bResult)
+ {
+ objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D
+ //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameterMain.Sc_MESBeginWorkBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ objJsonResult.Verify = "Y";
+ }
+ else
+ {
+ objJsonResult.Verify = "N";
+ }
+ }
+ }
+
}
else
{
bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.Verify = "N";
}
if (bResult)
{
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
--
Gitblit v1.9.1