bug
This commit is contained in:
@@ -40,13 +40,15 @@ namespace Tnb.ProductionMgr
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly RedisData _redisData;
|
||||
private readonly IWmsEmptyOutstockService _wmsEmptyOutstockService;
|
||||
private readonly IWareHouseService _wareHouseService;
|
||||
|
||||
public TimeWorkService(
|
||||
RedisData redisData,
|
||||
ISqlSugarRepository<BasMaterial> repository,
|
||||
IBillRullService billRullService,
|
||||
IOrganizeService organizeService,
|
||||
IWmsEmptyOutstockService wmsEmptyOutstockService
|
||||
IWmsEmptyOutstockService wmsEmptyOutstockService,
|
||||
IWareHouseService wareHouseService
|
||||
)
|
||||
{
|
||||
_redisData = redisData;
|
||||
@@ -55,6 +57,7 @@ namespace Tnb.ProductionMgr
|
||||
_organizeService = organizeService;
|
||||
_billRullService = billRullService;
|
||||
_wmsEmptyOutstockService = wmsEmptyOutstockService;
|
||||
_wareHouseService = wareHouseService;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -225,7 +228,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
List<String> eqpIds = equipments.Select(x => x.id).ToList();
|
||||
List<EqpDaq> eqpDaqs = await _db.Queryable<EqpDaq>().Where(x => eqpIds.Contains(x.equip_id) && x.label_name.Contains("允许入空箱")).ToListAsync();
|
||||
BasFactoryConfig config = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
|
||||
//BasFactoryConfig config = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DOMAIN);
|
||||
foreach (var equipment in equipments)
|
||||
{
|
||||
EqpDaq eqpDaq = eqpDaqs.FirstOrDefault(x => x.equip_id==equipment.id);
|
||||
@@ -255,10 +258,11 @@ namespace Tnb.ProductionMgr
|
||||
postData.biz_type = WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID;
|
||||
postData.task_type = WmsWareHouseConst.WMS_PRETASK_OUTSTOCK_TYPE_ID;
|
||||
Log.Information($"【FixedPointDelivery】注塑定点配送,参数:{JsonConvert.SerializeObject(postData)}");
|
||||
string sendResult = HttpUtils.RequestPost($"{config.value}/api/wms/ware-house/common-create-pretask", JsonConvert.SerializeObject(postData), null);
|
||||
Result result = await _wareHouseService.CommonCreatePretask(postData);
|
||||
// string sendResult = HttpUtils.RequestPost($"{config.value}/api/wms/ware-house/common-create-pretask", JsonConvert.SerializeObject(postData), null);
|
||||
// string sendResult = HttpUtils.RequestPost($"http://localhost:9232/api/wms/ware-house/common-create-pretask", JsonConvert.SerializeObject(postData), null);
|
||||
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
||||
if(authResponse.code == 200 && authResponse.data.ObjToBool())
|
||||
// AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
||||
if(result.code == HttpStatusCode.OK)
|
||||
{
|
||||
msg += $"{equipment.name}注塑定点配送成功,";
|
||||
Log.Information($"【FixedPointDelivery】{equipment.name}注塑定点配送成功");
|
||||
@@ -266,8 +270,8 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
else
|
||||
{
|
||||
msg += $"{equipment.name}注塑定点配送失败:{authResponse.msg},";
|
||||
Log.Error($"【FixedPointDelivery】{equipment.name}注塑定点配送失败:{authResponse.msg}");
|
||||
msg += $"{equipment.name}注塑定点配送失败:{result.msg},";
|
||||
Log.Error($"【FixedPointDelivery】{equipment.name}注塑定点配送失败:{result.msg}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user