From e3d4c1677d51d6b6a68e100773a53b7a052338b4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 02 七月 2024 14:34:27 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 157 insertions(+), 11 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index bd9af46..0d3a324 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -1,4 +1,6 @@
-锘縰sing DBUtility;
+锘縰sing DAL;
+using DBUtility;
+using DLL;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -7,8 +9,11 @@
using System.Linq;
using System.Net;
using System.Net.Http;
+using System.Timers;
+using System.Threading.Tasks;
using System.Web.Http;
using WebAPI.Models;
+using System.Threading;
namespace WebAPI.Controllers.SCGL
{
@@ -43,7 +48,7 @@
/// <returns></returns>
[Route("Sc_MESTransFerWorkBill/SaveGetMESTransFerWorkFrom")]
[HttpPost]
- public object SaveGetMESTransFerWorkFrom([FromBody] JObject msg)
+ public object SaveGetMESTransFerWorkFromAsync([FromBody] JObject msg)
{
var _value = msg["msg"].ToString();
@@ -151,10 +156,19 @@
objJsonResult.data = 1;
return objJsonResult;
}
-
+
//string[] arrStr = oItem.HSendMan.Split(','); //鍙戦�佷汉
//arrStr = oItem.HReceiveMan.Split(','); //鎺ユ敹浜�
- string[] arrStr = oItem.HCopyMan.Split(','); //鎶勯�佷汉
+ string[] arrStr;
+
+ if (string.IsNullOrEmpty(oItem.HCopyMan))
+ {
+ arrStr = new string[0]; // 濡傛灉 oItem.HCopyMan 涓虹┖锛屽垯璧嬪�间负绌烘暟缁�
+ }
+ else
+ {
+ arrStr = oItem.HCopyMan.Split(','); // 鍚﹀垯锛屼娇鐢� Split(',') 鏂规硶鎷嗗垎瀛楃涓�
+ }
List<string> b = new List<string>(arrStr);
b.Add(oItem.HSendMan);
b.Add(oItem.HReceiveMan);
@@ -165,12 +179,13 @@
Models.ClsOA_ErrMsgBackBillSub2 sb = new Models.ClsOA_ErrMsgBackBillSub2();
sb.HEntryID = i;
sb.HReceiveMan = arrStr[i - 1];
- if (arrStr[i-1].ToString() == oItem.HSendMan)
+ if (arrStr[i - 1].ToString() == oItem.HSendMan)
{
sb.HReadFlag = true;
}
oBill.DetailColl2.Add(sb);
}
+
oBill.omodel = oItem;
}
@@ -180,7 +195,7 @@
bool bResult;
if (refSav == "Add")
{
- bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
if (bResult)
{
objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D
@@ -196,8 +211,8 @@
{
objJsonResult.Verify = "N";
}
- }
- }
+ }
+ }
}
else
@@ -396,7 +411,7 @@
if (sWhere == null || sWhere.Equals(""))
{
string sql = "select * from h_v_OA_ErrMsgBackBillList order by 鍗曟嵁鍙� desc";
- ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
+ ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList");
}
else
{
@@ -516,12 +531,14 @@
A.HQty,A.HSendType,
A.HDeptID,D.HName HDeptName, A.HSendMan,
A.HReceiveMan,A.HCopyMan,A.HHasten,
- A.HLevel,A.HMaterName,A.HMaterModel,
+ A.HLevel,A.HMaterNumber,A.HMaterName,A.HMaterModel,
B.HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate,A.HChecker,A.HCheckDate,A.HCloseMan,A.HCloseDate,A.HDeleteMan,A.HDeleteDate,
- A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType
+ A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType,
+ A.HHandleEmpID,f.HName HHandleEmpName
from OA_ErrMsgBackBillMain A
inner join OA_ErrMsgBackBillSub2 B on A.HInterID=B.HInterID
left join Gy_Department D on A.HDeptID=D.HItemID
+ left join Gy_Employee f on A.HHandleEmpID=f.HItemID
where A.HInterID='" + HID + "' and b.HEntryID='" + HEntryID + "'");
var dataSet = oCN.RunProcReturn(sql, "OA_ErrMsgBackBillMain");
if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
@@ -6466,6 +6483,83 @@
}
#endregion
+ #region 宸ヤ綔鑱旂郴鍗曞偓淇�
+ [Route("Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillHHasten")]
+ [HttpGet]
+ public object UpdateOA_WorkLinkBillHHasten(Int64 HInterID,string CurUserName)
+ {
+ try
+ {
+ //鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("OA_WorkLinkBill_Edit", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ DAL.ClsOA_WorkLinkBill oBill = new DAL.ClsOA_WorkLinkBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍌績锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍌績锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql = "update OA_WorkLinkBillMain set HHasten = HHasten + 1 where HInterID = " + HInterID ;
+
+ oCN.RunProc(sql);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 宸ヤ綔鑱旂郴鍗曟牴鎹簮鍗旾D鏌ョ湅鏄惁鏈夊搴旇仈绯诲崟
[Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListBySourceID")]
[HttpGet]
@@ -6511,5 +6605,57 @@
#endregion
#endregion
+
+
+
+ #region 寮傚父鍙嶉鍗曟煡璇紙鎺ユ敹鐨勶紝鍙戦�佺殑锛屾妱閫佺殑锛�
+
+ [Route("Sc_MESTransFerWorkBill/GetSc_MESTransFerWorkBillQuery")]
+ [HttpGet]
+ public object GetSc_MESTransFerWorkBillQuery(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_OA_ErrMsgBackSelfQuery " + user, "h_p_OA_ErrMsgBackSelfQuery");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1