From 97bbd786a9fbdd2a1219f9db8a1e4c9e91875b75 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 21 二月 2022 10:13:57 +0800
Subject: [PATCH] nothing
---
WebAPI/Controllers/博日自动扫码线/ScanlineAPIController.cs | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs" "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
index 0e1a8c2..98467d9 100644
--- "a/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
+++ "b/WebAPI/Controllers/\345\215\232\346\227\245\350\207\252\345\212\250\346\211\253\347\240\201\347\272\277/ScanlineAPIController.cs"
@@ -9,6 +9,7 @@
using System.Net.Http;
using System.Web.Http;
using System.Web.Script.Serialization;
+using ViewAPI;
using WebAPI.Models;
namespace WebAPI.Controllers.鍗氭棩鑷姩鎵爜绾�
@@ -74,11 +75,12 @@
{
try
{
+ Log.LogInfo(msg.ToString()); //璁板綍鎻愪氦鏁版嵁
JavaScriptSerializer js = new JavaScriptSerializer(); //瀹炰緥鍖栦竴涓兘澶熷簭鍒楀寲鏁版嵁鐨勭被
ScanLineCode list = js.Deserialize<ScanLineCode>(msg.ToString()); //灏唈son鏁版嵁杞寲涓哄璞$被鍨嬪苟璧嬪�肩粰list
if (list.billno != "" && list.billno != null) //浠诲姟鍗曞彿锛岄潪蹇呴』锛岄潪绌哄垯鏍¢獙barcodes閲宐arcode鏄惁鐢辨浠诲姟鍗曞埗浣滅敓鎴愮殑
{
- ds = oCN.RunProcReturn("Select HBarCode barcode from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill");
+ ds = oCN.RunProcReturn("Select HBarCode barcode,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.status = -1;
@@ -200,6 +202,7 @@
objJsonResult.status = 0;
objJsonResult.msg = "success";
objJsonResult.data = null;
+ Log.LogSaveInfo("鎻愪氦鎴愬姛绠辨潯鐮侊細"+ list.packagebarcode); //璁板綍鎻愪氦鏁版嵁
return objJsonResult;
}
else
@@ -227,7 +230,17 @@
{
try
{
- ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill");
+ //鍒ゆ柇鏄惁鍏ュ簱
+ ds = oCN.RunProcReturn("select * from Sc_ScanLineInStock where HBarCode_Pack='" + packagebarcode + "'", "Sc_ScanLineInStock");
+ if (ds!= null && ds.Tables[0].Rows.Count>0)
+ {
+ objJsonResult.status = -1;
+ objJsonResult.msg = "璇ョ鏉$爜宸插叆搴撲笉鍏佽鍙栨秷!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill");
if (ds == null && ds.Tables[0].Rows.Count == 0)
{
objJsonResult.status = -1;
@@ -235,7 +248,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill");
+ ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill");
if (ds != null && ds.Tables[0].Rows.Count>0)
{
objJsonResult.status = -1;
@@ -246,12 +259,14 @@
//
oCN.BeginTran();
+ //鍒犻櫎SUM涓昏〃
+ oCN.RunProc("Delete From Sc_PackUnionBillSub_Sum where HBarCode_Pack='" + packagebarcode.ToString() + "'");
//鍒犻櫎瀛愯〃
oCN.RunProc("Delete From Sc_PackUnionBillSub where HBarCode_Pack='"+ packagebarcode.ToString() + "'");
//鍒犻櫎涓昏〃
oCN.RunProc("Delete From Sc_PackUnionBillMain where HBarCode_Pack='" + packagebarcode.ToString() + "'");
//浣滃簾鏉$爜妗f琛�
- oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode .ToString()+ "'");
+ oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode.ToString()+ "'");
oCN.Commit();
--
Gitblit v1.9.1