diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs
index 66479a8a..73363b30 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/InstockInput.cs
@@ -4,6 +4,5 @@ namespace Tnb.ProductionMgr.Entities.Dto
{
public string equip_code { get; set; }
public string label_code { get; set; }
- public string as_location_code { get; set; }
}
}
\ No newline at end of file
diff --git a/ProductionMgr/Tnb.ProductionMgr.Interfaces/IPrdInstockService.cs b/ProductionMgr/Tnb.ProductionMgr.Interfaces/IPrdInstockService.cs
index 82f82e86..68a697ea 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Interfaces/IPrdInstockService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Interfaces/IPrdInstockService.cs
@@ -43,5 +43,12 @@ namespace Tnb.ProductionMgr.Interfaces
///
///
public Task InstockTubeThree(PrdReport prdReport);
+
+ ///
+ /// 外包装入库申请
+ ///
+ ///
+ ///
+ public Task InstockOutPack(InstockInput inut);
}
}
\ No newline at end of file
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs
index 80cc8a35..abbf5355 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdInstockService.cs
@@ -263,7 +263,6 @@ namespace Tnb.ProductionMgr
{
string equip_code = inut.equip_code;
string label_code = inut.label_code;
- string as_location_code = inut.as_location_code;
string warehouse_id = "2";
if (!string.IsNullOrEmpty(equip_code))
{
@@ -621,5 +620,15 @@ namespace Tnb.ProductionMgr
return result2.IsSuccess ? "true" : "false";
}
+
+ ///
+ /// 外包装入库申请
+ ///
+ ///
+ ///
+ public Task InstockOutPack(InstockInput inut)
+ {
+ throw new NotImplementedException();
+ }
}
}
\ No newline at end of file
diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
index c1278d4b..5ac1eaf7 100644
--- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs
@@ -120,7 +120,12 @@ namespace Tnb.ProductionMgr
{
if (res.Value("Value"))
{
- //
+ InstockInput instockInput = new()
+ {
+ equip_code = res["DevName"]!.ToString(),
+ label_code = res["TagName"]!.ToString()
+ };
+ _prdInstockService.InstockOutPack(instockInput);
}
}
}
diff --git a/QcMgr/Tnb.QcMgr/QcCheckTaskService.cs b/QcMgr/Tnb.QcMgr/QcCheckTaskService.cs
index 4e196ed9..51b94859 100644
--- a/QcMgr/Tnb.QcMgr/QcCheckTaskService.cs
+++ b/QcMgr/Tnb.QcMgr/QcCheckTaskService.cs
@@ -15,6 +15,8 @@ using SqlSugar;
using Tnb.BasicData.Entities;
using Tnb.QcMgr.Entities;
using Tnb.QcMgr.Interfaces;
+using Tnb.WarehouseMgr.Entities.Dto.Inputs;
+using Tnb.WarehouseMgr.Interfaces;
namespace Tnb.QcMgr
{
@@ -29,12 +31,16 @@ namespace Tnb.QcMgr
private const string ModuleId = "26745613138709";
private readonly ISqlSugarRepository _repository;
private readonly IUserManager _userManager;
+ private readonly IWmsSaleService _wmsSaleService;
+ private readonly IWmsPurchaseService _wmsPurchaseService;
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
- public QcCheckTaskService(ISqlSugarRepository repository, IUserManager userManager)
+ public QcCheckTaskService(ISqlSugarRepository repository, IUserManager userManager, IWmsSaleService wmsSaleService, IWmsPurchaseService wmsPurchaseService)
{
_repository = repository;
_userManager = userManager;
OverideFuncs.GetListAsync = GetListAsync;
+ _wmsSaleService= wmsSaleService;
+ _wmsPurchaseService= wmsPurchaseService;
}
private async Task GetListAsync(VisualDevModelListQueryInput input)
@@ -197,6 +203,14 @@ namespace Tnb.QcMgr
ISqlSugarClient db = _repository.AsSugarClient();
try
{
+ Dictionary dic = new()
+ {
+ { "ok", 1 },
+ { "no", 2 },
+ { "barelyOk", 4 },
+ { "await", 8 },
+ { "temporarily", 16 }
+ };
QcCheckExecH QcCheckExecH = await db.Queryable().Where(p => p.id == CheckTaskInput.mainid).FirstAsync();
DictionaryTypeEntity DictionaryType = await db.Queryable().Where(p => p.FullName == "质检状态").FirstAsync();
DictionaryDataEntity DictionaryData = await db.Queryable().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "已完成").FirstAsync();
@@ -267,6 +281,22 @@ namespace Tnb.QcMgr
_ = await db.Updateable(QcCheckExecH).ExecuteCommandAsync();
_ = await db.Deleteable(QcCheckExecDdel).ExecuteCommandAsync();
_ = await db.Insertable(QcCheckExecDinsert).ExecuteCommandAsync();
+ //出厂检
+ if (QcCheckExecH.checktype == "26589783783701" && !string.IsNullOrEmpty(QcCheckExecH.extras))
+ {
+ MesCheckdCallbackUpinput mesCheckdCallbackUpinput = new MesCheckdCallbackUpinput();
+ mesCheckdCallbackUpinput.maintableid = QcCheckExecH.extras;
+ mesCheckdCallbackUpinput.check_conclusion = dic.Where(p => p.Key == CheckTaskInput.result).Any() ? dic.Where(p => p.Key == CheckTaskInput.result).First().Value : 0;
+ await _wmsSaleService.MesCheckdSaleCallback(mesCheckdCallbackUpinput);
+ }
+ //入厂检
+ else if (QcCheckExecH.checktype == "26589773352981" && !string.IsNullOrEmpty(QcCheckExecH.extras))
+ {
+ MesCheckdCallbackUpinput mesCheckdCallbackUpinput = new MesCheckdCallbackUpinput();
+ mesCheckdCallbackUpinput.maintableid = QcCheckExecH.extras;
+ mesCheckdCallbackUpinput.check_conclusion = dic.Where(p => p.Key == CheckTaskInput.result).Any() ? dic.Where(p => p.Key == CheckTaskInput.result).First().Value : 0;
+ await _wmsPurchaseService.MesCheckdPurchaseCallback(mesCheckdCallbackUpinput);
+ }
await db.Ado.CommitTranAsync();
}
catch (Exception)
diff --git a/QcMgr/Tnb.QcMgr/Tnb.QcMgr.csproj b/QcMgr/Tnb.QcMgr/Tnb.QcMgr.csproj
index 612c4841..1cf08455 100644
--- a/QcMgr/Tnb.QcMgr/Tnb.QcMgr.csproj
+++ b/QcMgr/Tnb.QcMgr/Tnb.QcMgr.csproj
@@ -10,6 +10,7 @@
+