Controllers/Warehouse/MesBarCFController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
service/Warehouse/MesBarCFManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Controllers/Warehouse/MesBarCFController.cs
@@ -1,9 +1,12 @@ using 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.Warehouse; using NewPdaSqlServer.util; using static Microsoft.EntityFrameworkCore.DbLoggerCategory; namespace NewPdaSqlServer.Controllers.Warehouse; @@ -12,6 +15,8 @@ public class MesBarCFController : ControllerBase { private readonly MesBarCFManager m = new(); private readonly MesPrintMangeer _mCf = new(); /// <summary> /// 获取条码信息和物料信息 @@ -48,11 +53,14 @@ try { dynamic resultInfos = new ExpandoObject(); resultInfos.tbBillList = m.BarCF(unity); resultInfos.tbBillList = new ExpandoObject(); resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(unity); var scanResult = m.BarCF(unity); resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult); return new ResponseResult { status = 0, message = resultInfos.tbBillList, message = "OK", data = resultInfos }; } service/Warehouse/MesBarCFManager.cs
@@ -32,10 +32,11 @@ return itemInfo; } public string BarCF(WarehouseQuery unity) public ProductionPickDto BarCF(WarehouseQuery unity) { var _strMsg = ""; var _intSum = ""; var _cfBar = "";//拆分后条码 using (var conn = new SqlConnection(DbHelperSQL.strConn)) { if (unity.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空"); @@ -67,11 +68,23 @@ cmd.ExecuteNonQuery(); _strMsg = parameters[0].Value.ToString(); _intSum = parameters[1].Value.ToString(); _cfBar = parameters[2].Value.ToString(); var result = Convert.ToInt32(_intSum); if (result <= 0) throw new Exception(_strMsg); return _strMsg; var dto = new ProductionPickDto { barcode = unity.barcode,//原条码 cfBarcode = _cfBar//拆分后条码 }; return dto; //var result = Convert.ToInt32(_intSum); //if (result <= 0) throw new Exception(_strMsg); //return _strMsg; //return 0;