From 815b5bed6a57c275d198c66428c82501292a42b9 Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期四, 06 一月 2022 08:38:01 +0800
Subject: [PATCH] 扫码异常记录查询
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 19 ++++-----
WebAPI/Controllers/仓存管理/扫码异常记录/KF_PonderationBillController.cs | 70 +++++++++++++++++++++++++++++++++++
WebAPI/WebAPI.csproj | 2 +
3 files changed, 81 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index b153a67..c452787 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -755,8 +755,15 @@
{
try
{
-
- ds = Sc_GetMoveStockBillList(sWhere);
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
+ }
+ else
+ {
+ string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by 鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList");
+ }
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
@@ -784,14 +791,6 @@
}
}
- #region sql璇彞
-
-
- public static DataSet Sc_GetMoveStockBillList(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
- }
- #endregion
/// <summary>
/// 閿�鍞嚭搴撳崟鍒楄〃
/// </summary>
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs"
new file mode 100644
index 0000000..01bbc3f
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\211\253\347\240\201\345\274\202\345\270\270\350\256\260\345\275\225/KF_PonderationBillController.cs"
@@ -0,0 +1,70 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.浠撳瓨绠$悊.鎵爜寮傚父璁板綍
+{
+ public class KF_PonderationBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ #region 鎵爜寮傚父璁板綍鏌ヨ
+ [Route("KF_PonderationBill/PonderationBillList")]
+ [HttpGet]
+ public object PonderationBillList(string HbarCode)
+ {
+ List<object> columnNameList = new List<object>();
+ try
+ {
+ ds = oCN.RunProcReturn("exec h_p_WMS_BarCodeStatusQuery '" + HbarCode + "'", "h_p_WMS_BarCodeStatusQuery");
+
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = ds.Tables[0].Rows.Count;
+ objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�";
+ objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�";
+ objJsonResult.data = null;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.Message.ToString();
+ objJsonResult.data = null;
+ objJsonResult.list = columnNameList;
+ }
+ return objJsonResult;
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index c836f21..c60c7b5 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -351,6 +351,7 @@
<Compile Include="Controllers\SCGL\Sc_ProductionReturnBillController.cs" />
<Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" />
<Compile Include="Controllers\Sc_ProcessMangementController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\鎵爜寮傚父璁板綍\KF_PonderationBillController.cs" />
<Compile Include="Controllers\浠撳瓨绠$悊\璋冩嫧鐩樼偣\Kf_MoveStockRequestBillController.cs" />
<Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\apiController.cs" />
<Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\Kf_StepFoldOutBillController.cs" />
@@ -723,6 +724,7 @@
<Folder Include="Views\Gy_EquipType\" />
<Folder Include="Views\Kf_ICStockBillMain\" />
<Folder Include="Views\Kf_MoveStockRequestBill\" />
+ <Folder Include="Views\KF_PonderationBill\" />
<Folder Include="Views\kf_StepFoldinBill\" />
<Folder Include="Views\Kf_StepFoldOutBill\" />
<Folder Include="Views\MoveStockBill\" />
--
Gitblit v1.9.1