From 53c7de340f55ab0c917a03d54d883b4a8082f42d Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期四, 27 十一月 2025 09:47:48 +0800
Subject: [PATCH] 增加通过网址获取供应商评分数据的接口
---
Controllers/Wom/WwGdController.cs | 210 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 205 insertions(+), 5 deletions(-)
diff --git a/Controllers/Wom/WwGdController.cs b/Controllers/Wom/WwGdController.cs
index e643409..505e1aa 100644
--- a/Controllers/Wom/WwGdController.cs
+++ b/Controllers/Wom/WwGdController.cs
@@ -1,7 +1,9 @@
锘縰sing System.Dynamic;
+using Masuit.Tools.Win32.AntiVirus;
using Microsoft.AspNetCore.Mvc;
using NewPdaSqlServer.Dto.service;
using NewPdaSqlServer.entity;
+using NewPdaSqlServer.service.@base;
using NewPdaSqlServer.service.Wom;
using NewPdaSqlServer.util;
@@ -9,9 +11,10 @@
[ApiController]
[Route("api/[controller]")]
-public class WwGdController : ControllerBase
+public class WwGdController : BaseController
{
private readonly WwGdManager m = new();
+ private readonly MesPrintMangeer _mCf = new();
/// <summary>
/// 鎵爜
@@ -20,7 +23,7 @@
/// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
/// // Demo Request:
// POST /api/WwGd/ScanCode
- // Body:
+ // BodyGetItemsByDaa001
// {
// "query": {
// "Code": "SampleCode",
@@ -35,6 +38,15 @@
// 璋冪敤WwGdManager鐨凷canCode鏂规硶杩涜鎵爜鎿嶄綔
dynamic resultInfos = new ExpandoObject();
resultInfos.tbBillList = m.ScanCode(query);
+ if (resultInfos.tbBillList.result == "2")
+ {
+ return new ResponseResult
+ {
+ status = Convert.ToInt32(resultInfos.tbBillList.result),
+ message = resultInfos.tbBillList.strMsg,
+ data = resultInfos
+ };
+ }
return new ResponseResult
{
status = 0,
@@ -85,6 +97,61 @@
}
}
+
+ /// <summary>
+ /// 鑾峰彇搴撲綅淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("GetBarKwByItem")]
+ public ResponseResult GetBarKwByItem(dynamic unity)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetBarKwByItem(unity);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 閫夊彇鍒楄〃
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ /// <summary>
+ /// 鐜板満鏀舵枡鑾峰彇鍙�夊伐鍗曚俊鎭�
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ [HttpPost("GetXcslDaa")]
+ public ResponseResult GetXcslDaa([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetXcslDaa(query, RequestInfo);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
/// <summary>
/// 鏍规嵁宸ュ崟鍙疯幏鍙栦唬棰嗙墿鏂欐槑缁�
/// </summary>
@@ -105,7 +172,7 @@
{
// 璋冪敤WwGdManager鐨凣etItemsByDaa001鏂规硶鑾峰彇浠i鐗╂枡鏄庣粏
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.GetItemsByDaa001(query);
+ resultInfos.tbBillList = m.GetItemsByDaa001(query, RequestInfo);
return new ResponseResult
{
status = 0,
@@ -140,9 +207,19 @@
{
try
{
- // 璋冪敤WwGdManager鐨刉wblScanBarcode鏂规硶鑾峰彇鐗╂枡淇℃伅
dynamic resultInfos = new ExpandoObject();
- resultInfos.materialInfo = m.WwblScanBarcode(query);
+ var (success, pendingList) = m.WwblScanBarcode(query);
+ resultInfos.success = success;
+ resultInfos.pendingList = pendingList;
+ if (success.status == 2)
+ {
+ return new ResponseResult
+ {
+ status = Convert.ToInt32(success.status),
+ message = success.message,
+ data = resultInfos.success
+ };
+ }
return new ResponseResult
{
status = 0,
@@ -256,6 +333,129 @@
}
}
+
+
+ /// <summary>
+ /// 閫夊彇鍒楄〃
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ /// <summary>
+ /// 鑾峰彇濮斿鍑哄簱鐢宠鍗曞彿
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ [HttpPost("GetWWCKsq")]
+ public ResponseResult GetWWCKsq([FromBody] dynamic query)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetWWCKsq(query, RequestInfo);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
+ /// 鏍规嵁濮斿棰嗘枡鐢宠鍗曡幏鍙栨槑缁�
+ /// </summary>
+ /// <param name="query">宸ュ崟鍙疯姹傚弬鏁�</param>
+ /// <returns>ResponseResult瀵硅薄锛屽寘鍚姸鎬併�佹秷鎭拰鏁版嵁</returns>
+ [HttpPost("GetItemsByWwckNo")]
+ public ResponseResult GetItemsByWwckNo(WarehouseQuery query)
+ {
+ try
+ {
+ // 璋冪敤WwGdManager鐨凣etItemsByDaa001鏂规硶鑾峰彇浠i鐗╂枡鏄庣粏
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.GetItemsByWwckNo(query, RequestInfo);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ [HttpPost("WwckScanCode")]
+ public ResponseResult WwckScanCode(WarehouseQuery query)
+ {
+ try
+ {
+ // 璋冪敤WwGdManager鐨凷canCode鏂规硶杩涜鎵爜鎿嶄綔
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = m.WwckScanCode(query);
+ if (resultInfos.tbBillList.result == "2")
+ {
+ return new ResponseResult
+ {
+ status = Convert.ToInt32(resultInfos.tbBillList.result),
+ message = resultInfos.tbBillList.strMsg,
+ data = resultInfos
+ };
+ }
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 濮斿鐢宠鍑哄簱鎷嗗垎
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ [HttpPost("WwckScanCodeCF")]
+ public ResponseResult WwckScanCodeCF(WarehouseQuery query)
+ {
+ try
+ {
+ // 璋冪敤WwGdManager鐨凷canCodeCF鏂规硶杩涜鎵爜纭鎿嶄綔
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(query);
+ var scanResult = m.WwckScanCodeCF(query);
+ resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ // 濡傛灉鍙戠敓寮傚父锛岃繑鍥為敊璇俊鎭�
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
/// <summary>
/// 鑾峰彇鎵�鏈�
/// </summary>
--
Gitblit v1.9.3