From 2b340d4f5a850ce29f030aae74a186b3771428b0 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 08 一月 2024 13:50:58 +0800
Subject: [PATCH] 1
---
DAL/基础资料/公用基础资料/ClsUser.cs | 2
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs | 13 ++-
WebAPI/Controllers/SCGL/日计划管理/Sc_WorkBillSortBillController.cs | 4
WebAPI/Controllers/条码管理/WEBSController.cs | 126 ++++++++++++++++++++++++++++++++++++++++--
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 9 ++
5 files changed, 138 insertions(+), 16 deletions(-)
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsUser.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsUser.cs"
index c41b316..dc0f827 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsUser.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsUser.cs"
@@ -72,7 +72,7 @@
DataSet DS;
try
{
- DS = oCn.RunProcReturn("select * from Gy_Czygl where Czybm='" + MainID + "' and Czmm='" + sPsd + "' ", "Gy_Czygl");
+ DS = oCn.RunProcReturn("select * from h_v_Gy_Czygl_Login where Czybm='" + MainID + "' and Czmm='" + sPsd + "' ", "Gy_Czygl");
if (DS.Tables[0].Rows.Count == 0)
return null;
else
diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 80a4c67..a48c4da 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -118,7 +118,9 @@
{
ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,鐗╂枡浠g爜 HMaterCode,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,
HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅 HUnitName,HSourceID,鐢熶骇璧勬簮浠g爜 HSourceCode,鐢熶骇璧勬簮 HSourceName,
- HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞 HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo
+ HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞 HRemark,
+ HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID,
+ HICMOBillNo as HSourceBillNo,3710 as HSourceBillType
FROM h_v_IF_ICMOReportBillList_Edit"), "h_v_IF_ICMOReportBillList_Edit");
objJsonResult.code = "0";
@@ -132,7 +134,10 @@
//string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 ";
string sql1 = string.Format(@"SELECT HMaterID,鐗╂枡浠g爜 HMaterCode,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,
HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅 HUnitName,HSourceID,鐢熶骇璧勬簮浠g爜 HSourceCode,鐢熶骇璧勬簮 HSourceName,
- HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞 HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo
+ HWorkerid,鎿嶄綔鍛樹唬鐮� HWorkerCode,鎿嶄綔鍛� HWorkerName,鐢熶骇鏁伴噺 HQty,琛ㄤ綋澶囨敞
+ HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo,
+ HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID,
+ HICMOBillNo as HSourceBillNo,3710 as HSourceBillType
FROM h_v_IF_ICMOReportBillList_Edit where 1 = 1 ");
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit");
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index 325f71c..914e073 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -160,7 +160,7 @@
LogService.CustomWriteLog("2:", DateTime.Now.ToString("yyyy-MM-dd"));
int TrueCount = 0, SumCount = 0;
-
+ LogService.CustomWriteLog("list.Count:"+ list.Count, DateTime.Now.ToString("yyyy-MM-dd"));
for (int i = 0; i < list.Count; i++)
{
TrueCount = 0;
@@ -204,7 +204,7 @@
return objJsonResult;
}
- ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain a inner join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID where HMainSourceInterID={HMainSourceInterID}" +
+ ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
$" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
if (ds.Tables[0].Rows.Count > 0)
{
@@ -283,6 +283,9 @@
if (ds.Tables[0].Rows.Count > 1)
{
+ LogService.CustomWriteLog("绗�" + i + 1 + "琛岀敓浜ц祫婧愭湁閲嶅,璇蜂慨鏀�", DateTime.Now.ToString("yyyy-MM-dd"));
+ LogService.CustomWriteLog($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
+ $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", DateTime.Now.ToString("yyyy-MM-dd"));
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = $"绗瑊i + 1}琛岀敓浜ц祫婧愭湁閲嶅,璇蜂慨鏀�!";
@@ -355,7 +358,7 @@
}
public json AddBillSub(string HInterID, string HBillNo, DateTime date, double HQTY, Dictionary<string, string> dic)
- {
+ {
//鑾峰彇琛ㄦ牸鏁版嵁
ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where 鍗曟嵁鍙�='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList");
int count = 0;
@@ -372,14 +375,14 @@
}
}
}
-
+
if (count != 1)
{
//鎻掑叆瀛愯〃
oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," +
"HMasterDate,HQty,HUseTimes)" +
$"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," +
- $" '{date}', {HQTY},{(dic["灏忔椂浜ц兘"] == "0" ? 0 : HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))})");
+ $" '{date}', {HQTY},{(dic["灏忔椂浜ц兘"] == "0" ? 0 : HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))})");
}
objJsonResult.code = "1";
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
index cd6758c..e8fd889 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Sc_WorkBillSortBillController.cs"
@@ -35,7 +35,7 @@
return objJsonResult;
}
- ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1" + sWhere + " order by 鍗曟嵁鍙� desc ", "h_v_JIT_Sc_WorkBillSortBillList");
+ ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList_Left where 1=1" + sWhere + " order by 鍗曟嵁鍙� desc ", "h_v_JIT_Sc_WorkBillSortBillList");
objJsonResult.code = "1";
objJsonResult.count = 1;
@@ -264,7 +264,7 @@
{
var NumData_T = NumData[i].Split('_');
- ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1 and hmainid=" + NumData_T[0], "h_v_JIT_Sc_WorkBillSortBillList");
+ ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList_Left where 1=1 and hmainid=" + NumData_T[0], "h_v_JIT_Sc_WorkBillSortBillList");
if (ds.Tables[0].Rows.Count > 0)
{
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 4e08991..d1fe44e 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -37,6 +37,78 @@
#region 鍏敤鏂规硶
+ #region 璐﹀彿鐧诲叆
+
+ /// <summary>
+ /// 璐﹀彿鐧诲叆鏃堕獙璇佽处鍙枫�佸瘑鐮佷俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetUser_Json")]
+ [HttpGet]
+ public object GetUser_Json(string HUserNumber, string HPassWord, Int64 HStockOrgID, string HStockOrgName)
+ {
+ try
+ {
+ HPassWord = DBUtility.ClsPub.StrToPsd(HPassWord.Trim());
+ ds = oCn.RunProcReturn("exec h_p_Gy_User '" + HUserNumber + "','" + HPassWord + "'," + HStockOrgID.ToString(), "h_p_Gy_User");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杈撳叆鐨勭敤鎴峰悕鎴栧瘑鐮侀敊璇紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ //鍒ゆ柇鐢ㄦ埛瀵瑰簲缁勭粐鏉冮檺锛屽緱鍒扮櫥鍏ョ粍缁囦俊鎭紙ID銆佷唬鐮併�佸悕绉帮級
+ DataSet ds2 = oWebs.get_ORGANIZATIONS_UserByOrgRelation(HUserNumber, HStockOrgName);
+ if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒ゆ柇鐢ㄦ埛瀵瑰簲缁勭粐鏉冮檺閿欒锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"])==1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇鐢ㄦ埛璐﹀彿瀵嗙爜锛圵ISE銆丆LOUD锛夋槸鍚︽纭�
+ if (!oWebs.CheckUser(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["Czymc"]), ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鐧诲綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鐧诲綍寮傚父锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
/// <summary>
@@ -465,16 +537,56 @@
/// <returns></returns>
[Route("WEBSController/GetSupplier_Json")]
[HttpGet]
- public object GetSupplier_Json(Int64 HSupID)
+ public object GetSupplier_Json(string HBarCode, Int64 HStockOrgID)
{
try
{
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier");
+ Int64 HSupID = 0;
+ HSupID = DBUtility.ClsPub.isLong(HBarCode);
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Supplier");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵緵搴斿晢鏉$爜鏄惁姝g‘锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵緵搴斿晢鏉$爜鏄惁灞炰簬璇ョ粍缁囷紝涓斾负闈炵鐢ㄧ姸鎬侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖渚涘簲鍟嗕俊鎭け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇渚涘簲鍟嗗垪琛ㄤ俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetSupplierList_Json")]
+ [HttpGet]
+ public object GetSupplierList_Json(string Supplier, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%')", "Gy_Supplier");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍渚涘簲鍟嗚褰曪紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -507,16 +619,18 @@
/// <returns></returns>
[Route("WEBSController/GetCustomer_Json")]
[HttpGet]
- public object GetCustomer_Json(Int64 HCusID)
+ public object GetCustomer_Json(string HBarCode, Int64 HStockOrgID)
{
try
{
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer");
+ Int64 HCusID = 0;
+ HCusID = DBUtility.ClsPub.isLong(HBarCode);
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Customer");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵鎴锋潯鐮佹槸鍚︽纭紝涓斾负闈炵鐢ㄧ姸鎬侊紒";
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵鎴锋潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
objJsonResult.data = null;
return objJsonResult;
}
--
Gitblit v1.9.1