1023 lines
47 KiB
C#
1023 lines
47 KiB
C#
using JNPF;
|
|
using JNPF.Common.Core.Manager;
|
|
using JNPF.Common.Enums;
|
|
using JNPF.Common.Filter;
|
|
using JNPF.Common.Security;
|
|
using JNPF.DependencyInjection;
|
|
using JNPF.DynamicApiController;
|
|
using JNPF.Extras.CollectiveOAuth.Models;
|
|
using JNPF.Extras.CollectiveOAuth.Utils;
|
|
using JNPF.FriendlyException;
|
|
using JNPF.Logging;
|
|
using JNPF.Systems.Entitys.Permission;
|
|
using JNPF.Systems.Interfaces.Permission;
|
|
using JNPF.Systems.Interfaces.System;
|
|
using JNPF.VisualDev;
|
|
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Newtonsoft.Json;
|
|
using SqlSugar;
|
|
using SqlSugar.Extensions;
|
|
using Tnb.BasicData;
|
|
using Tnb.BasicData.Entities;
|
|
using Tnb.EquipMgr.Entities;
|
|
using Tnb.ProductionMgr.Entities;
|
|
using Tnb.ProductionMgr.Entities.Dto;
|
|
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
|
using Tnb.ProductionMgr.Interfaces;
|
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
|
|
|
namespace Tnb.ProductionMgr
|
|
{
|
|
/// <summary>
|
|
/// mesÉú²úÈë¿âÉêÇë
|
|
/// </summary>
|
|
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
|
|
[Route("api/[area]/[controller]/[action]")]
|
|
[OverideVisualDev(ModuleId)]
|
|
public class PrdInstockService : IPrdInstockService, IDynamicApiController, ITransient, IOverideVisualDevService
|
|
{
|
|
private readonly ISqlSugarRepository<PrdInstockH> _repository;
|
|
private readonly IUserManager _userManager;
|
|
private readonly IOrganizeService _organizeService;
|
|
private readonly IBillRullService _billRuleService;
|
|
|
|
private const string ModuleId = "25572529329173";
|
|
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
|
|
|
public PrdInstockService(
|
|
ISqlSugarRepository<PrdInstockH> repository,
|
|
IOrganizeService organizeService,
|
|
IBillRullService billRullService,
|
|
IUserManager userManager
|
|
)
|
|
{
|
|
_repository = repository;
|
|
_organizeService = organizeService;
|
|
_userManager = userManager;
|
|
_billRuleService = billRullService;
|
|
OverideFuncs.GetListAsync = GetList;
|
|
}
|
|
|
|
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
|
{
|
|
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
|
string moCode = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : "";
|
|
var list = await _repository.AsSugarClient().Queryable<PrdMoTask>()
|
|
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
|
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
|
|
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
|
|
.WhereIF(!string.IsNullOrEmpty(moCode), (a, b, c, d) => a.mo_task_code!.Contains(moCode))
|
|
.Where(a => string.IsNullOrEmpty(a.parent_id))
|
|
.Select((a, b, c, d) => new PrdMoTaskTreeOutput()
|
|
{
|
|
id = a.id,
|
|
parentId = string.IsNullOrEmpty(a.parent_id) ? "0" : a.parent_id,
|
|
mo_task_code = a.mo_task_code,
|
|
material_id = b.name,
|
|
material_id_id = b.id,
|
|
mold_id = c.mold_name,
|
|
mold_id_id = c.id,
|
|
eqp_id = d.name,
|
|
eqp_id_id = d.id,
|
|
estimated_start_date = a.estimated_start_date!.ToString(),
|
|
estimated_end_date = a.estimated_end_date.ToString(),
|
|
create_time = a.create_time.ToString()
|
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
|
// List<PrdMoTaskTreeOutput> treeList = list.ToTree();
|
|
// treeList = treeList.Skip((input.currentPage - 1) * input.pageSize).Take(input.pageSize).ToList();
|
|
// SqlSugarPagedList<PrdMoTaskTreeOutput> pagedList = new()
|
|
// {
|
|
// list = treeList,
|
|
// pagination = new Pagination
|
|
// {
|
|
// CurrentPage = input.currentPage,
|
|
// PageSize = input.pageSize,
|
|
// Total = treeList.Count
|
|
// }
|
|
// };
|
|
return PageResult<PrdMoTaskTreeOutput>.SqlSugarPageResult(list);
|
|
}
|
|
|
|
[HttpPost]
|
|
public async Task<dynamic> SaveData(PrdInstockInput input)
|
|
{
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
BasLocation location = await db.Queryable<BasLocation>().FirstAsync(x => x.location_code == input.location_code);
|
|
PrdInstockH? prdInstockH = null;
|
|
List<PrdInstockD> prdInstockDs = new() { };
|
|
DbResult<bool> result2 = new();
|
|
|
|
if (string.IsNullOrEmpty(input.station_id))
|
|
{
|
|
throw Oops.Bah("ÇëÏÈÑ¡Ôñ¹¤Î»");
|
|
}
|
|
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorklineCode);
|
|
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(input.station_id, DictConst.RegionCategoryWorkshopCode);
|
|
|
|
prdInstockH = new PrdInstockH()
|
|
{
|
|
bill_type = input.bill_type,
|
|
bill_date = DateTime.Now,
|
|
create_id = _userManager.UserId,
|
|
location_code = input.location_code,
|
|
carry_code = input.carry_code,
|
|
is_check = input.is_check,
|
|
station_id = input.station_id,
|
|
workline_id = workline?.Id ?? "",
|
|
workshop_id = workshop?.Id ?? "",
|
|
org_id = _userManager.GetUserInfo().Result.organizeId,
|
|
warehouse_id = location?.wh_id,
|
|
status = 0,
|
|
};
|
|
|
|
foreach (Dictionary<string, string> item in input.details)
|
|
{
|
|
prdInstockDs.Add(new PrdInstockD()
|
|
{
|
|
instock_id = prdInstockH.id,
|
|
report_id = item.ContainsKey("report_id") ? item["report_id"] : "",
|
|
material_id = item.ContainsKey("material_id") ? item["material_id"] : "",
|
|
material_code = item.ContainsKey("material_code") ? item["material_code"] : "",
|
|
unit_id = item.ContainsKey("unit_id") ? item["unit_id"] : "",
|
|
// code_batch = item.ContainsKey("batch") ? item["batch"] : "",
|
|
// barcode = item.ContainsKey("batch") ? item["batch"]+"0001" : "",
|
|
barcode = item.ContainsKey("barcode") ? item["barcode"] : "",
|
|
code_batch = item.ContainsKey("barcode") ? item["barcode"] + "0001" : "",
|
|
quantity = Convert.ToInt32(item.ContainsKey("quantity") ? item["quantity"] : "0"),
|
|
});
|
|
}
|
|
|
|
// await _repository.InsertAsync(prdInstockH);
|
|
//
|
|
// if (prdInstockDs.Count > 0)
|
|
// {
|
|
// await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
// }
|
|
|
|
});
|
|
|
|
if (result.IsSuccess)
|
|
{
|
|
MESCreateInstockInput mesCreateInstockInput = new()
|
|
{
|
|
instock = new MESWmsInstockHInput()
|
|
{
|
|
org_id = _userManager.GetUserInfo().Result.organizeId,
|
|
bill_date = DateTime.Now,
|
|
bill_type = input.bill_type,
|
|
warehouse_id = location?.wh_id,
|
|
source_id = prdInstockH.id,
|
|
create_id = _userManager.UserId,
|
|
carry_code = input.carry_code,
|
|
location_code = input.location_code,
|
|
is_check = input.is_check,
|
|
},
|
|
instockds = new List<MESWmsInstockDInput>(),
|
|
instockcodes = new List<MESWmsInstockCodeInput>()
|
|
};
|
|
foreach (Dictionary<string, string> item in input.details)
|
|
{
|
|
mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
{
|
|
material_id = item.ContainsKey("material_id") ? item["material_id"] : "",
|
|
material_code = item.ContainsKey("material_code") ? item["material_code"] : "",
|
|
unit_id = item.ContainsKey("unit_id") ? item["unit_id"] : "",
|
|
code_batch = item.ContainsKey("barcode") ? item["barcode"] + "0001" : "",
|
|
pr_qty = Convert.ToInt32(item.ContainsKey("quantity") ? item["quantity"] : "0"),
|
|
});
|
|
|
|
mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
{
|
|
material_id = item.ContainsKey("material_id") ? item["material_id"] : "",
|
|
material_code = item.ContainsKey("material_code") ? item["material_code"] : "",
|
|
unit_id = item.ContainsKey("unit_id") ? item["unit_id"] : "",
|
|
// code_batch = item.ContainsKey("batch") ? item["batch"] : "",
|
|
// barcode = item.ContainsKey("batch") ? item["batch"]+"0001" : "",
|
|
barcode = item.ContainsKey("barcode") ? item["barcode"] : "",
|
|
code_batch = item.ContainsKey("barcode") ? item["barcode"] + "0001" : "",
|
|
codeqty = Convert.ToInt32(item.ContainsKey("quantity") ? item["quantity"] : "0"),
|
|
});
|
|
}
|
|
// string domain = _userManager.Domain;
|
|
string domain = _userManager.Domain;
|
|
Dictionary<string, object> header = new()
|
|
{
|
|
["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
};
|
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
Log.Information(sendResult);
|
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
result2 = authResponse.code != 200 || !authResponse.data.ObjToBool()
|
|
? throw Oops.Bah(authResponse.msg)
|
|
: await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
_ = await _repository.InsertAsync(prdInstockH);
|
|
|
|
if (prdInstockDs.Count > 0)
|
|
{
|
|
_ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
}
|
|
});
|
|
}
|
|
|
|
return !result2.IsSuccess ? throw Oops.Oh(ErrorCode.COM1008) : (dynamic)(result2.IsSuccess ? "±£´æ³É¹¦" : result2.ErrorMessage);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Èë¿âÉêÇëͬ²½
|
|
/// </summary>
|
|
/// <param name="dic">source_id</param>
|
|
/// <returns></returns>
|
|
public async Task<dynamic> SyncInstock(Dictionary<string, string> dic)
|
|
{
|
|
string sourceId = dic.ContainsKey("source_id") ? dic["source_id"] : "";
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
if (!string.IsNullOrEmpty(sourceId))
|
|
{
|
|
_ = await _repository.UpdateAsync(x => new PrdInstockH()
|
|
{
|
|
status = 1
|
|
}, x => x.id == sourceId);
|
|
List<PrdInstockD> details = await db.Queryable<PrdInstockD>().Where(x => x.instock_id == sourceId).ToListAsync();
|
|
|
|
foreach (PrdInstockD item in details)
|
|
{
|
|
_ = await db.Updateable<PrdReport>().SetColumns(x => x.status == 1)
|
|
.Where(x => x.id == item.report_id).ExecuteCommandAsync();
|
|
}
|
|
}
|
|
});
|
|
|
|
return result.IsSuccess;
|
|
}
|
|
|
|
/// <summary>
|
|
/// ×¢ËÜÂúÏ䵽λºóÈë¿âÉêÇë
|
|
/// </summary>
|
|
/// <param name="inut"></param>
|
|
/// <returns></returns>
|
|
/// <exception cref="AppFriendlyException"></exception>
|
|
[AllowAnonymous]
|
|
public async Task<dynamic> InstockTypeOne(InstockInput input)
|
|
{
|
|
string equip_code = input.equip_code;
|
|
string label_code = input.label_code;
|
|
string warehouse_id = "2";
|
|
if (string.IsNullOrEmpty(equip_code))
|
|
{
|
|
throw Oops.Bah("Çë´«»ų́ºÅ");
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(label_code))
|
|
{
|
|
throw Oops.Bah("Çë´«±êÇ©ºÅ");
|
|
}
|
|
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
EqpEquipment equipment = null;
|
|
try
|
|
{
|
|
equipment = await db.Queryable<EqpEquipment>()
|
|
.LeftJoin<EqpDaq>((x, y) => x.id == y.equip_id)
|
|
.Where((x, y) => y.equip_code == equip_code && y.label_name == label_code && y.label_point == "×¢ËÜ¿ÕÂúÏäÇëÇó")
|
|
.Select((x, y) => x)
|
|
.FirstAsync();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine(e);
|
|
throw;
|
|
}
|
|
if (equipment == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½»ų́");
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(equipment.as_location_id))
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
BasLocation basLocation = await db.Queryable<BasLocation>().SingleAsync(x => x.id == equipment.as_location_id);
|
|
if (basLocation == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
PrdReport prdReport = await db.Queryable<PrdReport>()
|
|
.Where(x => x.equip_id == equipment.id && x.status == 0).OrderByDescending(x => x.create_time)
|
|
.FirstAsync();
|
|
string create_id = prdReport.create_id;
|
|
UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
|
string org_id = user.OrganizeId;
|
|
if (prdReport == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Ìᱨ¼Ç¼");
|
|
}
|
|
|
|
|
|
PrdInstockH? prdInstockH = null;
|
|
List<PrdInstockD> prdInstockDs = new() { };
|
|
DbResult<bool> result2 = new();
|
|
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdReport.material_id);
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorklineCode);
|
|
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorkshopCode);
|
|
|
|
string code = await _billRuleService.GetBillNumber(CodeTemplateConst.PRDINSTOCK_CODE);
|
|
prdInstockH = new PrdInstockH()
|
|
{
|
|
code = code,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
bill_date = DateTime.Now,
|
|
create_id = create_id,
|
|
location_code = basLocation.location_code,
|
|
carry_code = prdReport.material_box_code,
|
|
is_check = 1,
|
|
station_id = prdReport.station,
|
|
workline_id = workline?.Id ?? "",
|
|
workshop_id = workshop?.Id ?? "",
|
|
org_id = org_id,
|
|
// warehouse_id = basLocation?.wh_id,
|
|
warehouse_id = warehouse_id,
|
|
status = 0,
|
|
mo_task_id = prdReport.mo_task_id,
|
|
};
|
|
|
|
prdInstockDs.Add(new PrdInstockD()
|
|
{
|
|
instock_id = prdInstockH.id,
|
|
report_id = prdReport.create_id,
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
quantity = (int)prdReport.reported_qty,
|
|
});
|
|
});
|
|
|
|
if (result.IsSuccess)
|
|
{
|
|
MESCreateInstockInput mesCreateInstockInput = new()
|
|
{
|
|
instock = new MESWmsInstockHInput()
|
|
{
|
|
org_id = org_id,
|
|
bill_date = DateTime.Now,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
// warehouse_id = basLocation?.wh_id,
|
|
warehouse_id = warehouse_id,
|
|
source_id = prdInstockH.id,
|
|
create_id = create_id,
|
|
carry_code = prdReport.material_box_code,
|
|
location_code = basLocation.location_code,
|
|
is_check = 1,
|
|
},
|
|
instockds = new List<MESWmsInstockDInput>(),
|
|
instockcodes = new List<MESWmsInstockCodeInput>()
|
|
};
|
|
mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
code_batch = prdReport.mo_task_code,
|
|
pr_qty = (int)prdReport.reported_qty,
|
|
});
|
|
|
|
mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
codeqty = (int)prdReport.reported_qty,
|
|
});
|
|
// string domain = _userManager.Domain;
|
|
// string domain = "http://localhost:9232";
|
|
string domain = _userManager.Domain;
|
|
Dictionary<string, object> header = new()
|
|
{
|
|
// ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
};
|
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
Log.Information(sendResult);
|
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
result2 = authResponse.code != 200 || !(bool)authResponse.data
|
|
? throw Oops.Bah(authResponse.msg)
|
|
: await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
_ = await _repository.InsertAsync(prdInstockH);
|
|
|
|
if (prdInstockDs.Count > 0)
|
|
{
|
|
_ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
}
|
|
//todo Èë¿âÉêÇëºóÊÇ·ñÐÞ¸ÄÌᱨ¼Ç¼״̬
|
|
});
|
|
}
|
|
|
|
return !result2.IsSuccess ? string.IsNullOrEmpty(result2.ErrorMessage) ? throw Oops.Oh(ErrorCode.COM1008) : throw Oops.Bah(result2.ErrorMessage) : "³É¹¦";
|
|
}
|
|
|
|
// [HttpPost]
|
|
// public async Task<string> InstockTubeOne(PrdReport prdReport)
|
|
// {
|
|
// ISqlSugarClient db = _repository.AsSugarClient();
|
|
// string location_code = "ZCR01";//todo ¶Ì¹Ü¼·³ö¼þÄ¿±ê¿âλ֮ºó¸Ä
|
|
// string warehouse_id = "2";
|
|
//
|
|
// PrdInstockH? prdInstockH = null;
|
|
// List<PrdInstockD> prdInstockDs = new() { };
|
|
// DbResult<bool> result2 = new();
|
|
// BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdReport.material_id);
|
|
// string create_id = prdReport.create_id;
|
|
// UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
|
// string org_id = user.OrganizeId;
|
|
// DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
// {
|
|
// OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorklineCode);
|
|
// OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorkshopCode);
|
|
//
|
|
// prdInstockH = new PrdInstockH()
|
|
// {
|
|
// bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
// bill_date = DateTime.Now,
|
|
// create_id = create_id,
|
|
// location_code = location_code,
|
|
// carry_code = prdReport.material_box_code,
|
|
// is_check = 1,
|
|
// station_id = prdReport.station,
|
|
// workline_id = workline?.Id ?? "",
|
|
// workshop_id = workshop?.Id ?? "",
|
|
// org_id = org_id,
|
|
// warehouse_id = warehouse_id,
|
|
// status = 0,
|
|
// };
|
|
//
|
|
// prdInstockDs.Add(new PrdInstockD()
|
|
// {
|
|
// instock_id = prdInstockH.id,
|
|
// report_id = prdReport.create_id,
|
|
// material_id = prdReport.material_id,
|
|
// material_code = basMaterial.code,
|
|
// unit_id = prdReport.unit_id,
|
|
// barcode = prdReport.barcode,
|
|
// code_batch = prdReport.mo_task_code,
|
|
// quantity = (int)prdReport.reported_qty,
|
|
// });
|
|
// });
|
|
//
|
|
// if (result.IsSuccess)
|
|
// {
|
|
// MESCreateInstockInput mesCreateInstockInput = new()
|
|
// {
|
|
// instock = new MESWmsInstockHInput()
|
|
// {
|
|
// org_id = org_id,
|
|
// bill_date = DateTime.Now,
|
|
// bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
// warehouse_id = warehouse_id,
|
|
// source_id = prdInstockH.id,
|
|
// create_id = create_id,
|
|
// carry_code = prdReport.material_box_code,
|
|
// location_code = location_code,
|
|
// is_check = 1,
|
|
// },
|
|
// instockds = new List<MESWmsInstockDInput>(),
|
|
// instockcodes = new List<MESWmsInstockCodeInput>()
|
|
// };
|
|
// mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
// {
|
|
// material_id = prdReport.material_id,
|
|
// material_code = basMaterial.code,
|
|
// unit_id = prdReport.unit_id,
|
|
// code_batch = prdReport.barcode,
|
|
// pr_qty = (int)prdReport.reported_qty,
|
|
// });
|
|
//
|
|
// mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
// {
|
|
// material_id = prdReport.material_id,
|
|
// material_code = basMaterial.code,
|
|
// unit_id = prdReport.unit_id,
|
|
// barcode = prdReport.barcode,
|
|
// code_batch = prdReport.mo_task_code,
|
|
// codeqty = (int)prdReport.reported_qty,
|
|
// });
|
|
// // string domain = _userManager.Domain;
|
|
// string domain = _userManager.Domain;
|
|
// Dictionary<string, object> header = new()
|
|
// {
|
|
// // ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
// };
|
|
// string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
// Log.Information(sendResult);
|
|
// AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
// result2 = authResponse.code != 200 || !(bool)authResponse.data
|
|
// ? throw Oops.Bah(authResponse.msg)
|
|
// : await db.Ado.UseTranAsync(async () =>
|
|
// {
|
|
// _ = await _repository.InsertAsync(prdInstockH);
|
|
//
|
|
// if (prdInstockDs.Count > 0)
|
|
// {
|
|
// _ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
// }
|
|
// });
|
|
// }
|
|
//
|
|
// return result2.IsSuccess ? "true" : "false";
|
|
// }
|
|
|
|
|
|
[HttpPost]
|
|
public async Task<string> InstockTubeOne(InstockInput input)
|
|
{
|
|
string equip_code = input.equip_code;
|
|
string label_code = input.label_code;
|
|
if (string.IsNullOrEmpty(equip_code))
|
|
{
|
|
throw Oops.Bah("Çë´«»ų́ºÅ");
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(label_code))
|
|
{
|
|
throw Oops.Bah("Çë´«±êÇ©ºÅ");
|
|
}
|
|
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
// string location_code = "ZCR01";//todo ¶Ì¹Ü¼·³ö¼þÄ¿±ê¿âλ֮ºó¸Ä
|
|
string warehouse_id = "2";
|
|
|
|
PrdInstockH? prdInstockH = null;
|
|
List<PrdInstockD> prdInstockDs = new() { };
|
|
DbResult<bool> result2 = new();
|
|
EqpEquipment equipment = null;
|
|
try
|
|
{
|
|
equipment = await db.Queryable<EqpEquipment>()
|
|
.LeftJoin<EqpDaq>((x, y) => x.id == y.equip_id)
|
|
.Where((x, y) => y.equip_code == equip_code && y.label_name == label_code && y.label_point == "¼·³ö¿ÕÂúÏäÇëÇó")
|
|
.Select((x, y) => x)
|
|
.FirstAsync();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine(e);
|
|
throw;
|
|
}
|
|
if (equipment == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½»ų́");
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(equipment.as_location_id))
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
BasLocation basLocation = await db.Queryable<BasLocation>().SingleAsync(x => x.id == equipment.as_location_id);
|
|
if (basLocation == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
string location_code = basLocation.location_code;
|
|
|
|
PrdReport prdReport = await db.Queryable<PrdReport>()
|
|
.LeftJoin<BasMaterial>((x, y) => x.material_id == y.id)
|
|
.Where((x, y) => y.category_id.Contains("\"DGJCJ\"") && x.status == 0).OrderByDescending(x => x.create_time)
|
|
.FirstAsync();
|
|
|
|
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdReport.material_id);
|
|
string create_id = prdReport.create_id;
|
|
UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
|
string org_id = user.OrganizeId;
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorklineCode);
|
|
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorkshopCode);
|
|
string code = await _billRuleService.GetBillNumber(CodeTemplateConst.PRDINSTOCK_CODE);
|
|
|
|
prdInstockH = new PrdInstockH()
|
|
{
|
|
code = code,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
bill_date = DateTime.Now,
|
|
create_id = create_id,
|
|
location_code = location_code,
|
|
carry_code = prdReport.material_box_code,
|
|
is_check = 1,
|
|
station_id = prdReport.station,
|
|
workline_id = workline?.Id ?? "",
|
|
workshop_id = workshop?.Id ?? "",
|
|
org_id = org_id,
|
|
warehouse_id = warehouse_id,
|
|
status = 0,
|
|
mo_task_id = prdReport.mo_task_id,
|
|
};
|
|
|
|
prdInstockDs.Add(new PrdInstockD()
|
|
{
|
|
instock_id = prdInstockH.id,
|
|
report_id = prdReport.create_id,
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
quantity = (int)prdReport.reported_qty,
|
|
});
|
|
});
|
|
|
|
if (result.IsSuccess)
|
|
{
|
|
MESCreateInstockInput mesCreateInstockInput = new()
|
|
{
|
|
instock = new MESWmsInstockHInput()
|
|
{
|
|
org_id = org_id,
|
|
bill_date = DateTime.Now,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
warehouse_id = warehouse_id,
|
|
source_id = prdInstockH.id,
|
|
create_id = create_id,
|
|
carry_code = prdReport.material_box_code,
|
|
location_code = location_code,
|
|
is_check = 1,
|
|
},
|
|
instockds = new List<MESWmsInstockDInput>(),
|
|
instockcodes = new List<MESWmsInstockCodeInput>()
|
|
};
|
|
mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
code_batch = prdReport.mo_task_code,
|
|
pr_qty = (int)prdReport.reported_qty,
|
|
});
|
|
|
|
mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
codeqty = (int)prdReport.reported_qty,
|
|
});
|
|
// string domain = _userManager.Domain;
|
|
// string domain = _userManager.Domain;
|
|
// string domain = "http://localhost:9232";
|
|
string domain = _userManager.Domain;
|
|
Dictionary<string, object> header = new()
|
|
{
|
|
// ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
};
|
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
Log.Information(sendResult);
|
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
result2 = authResponse.code != 200 || !(bool)authResponse.data
|
|
? throw Oops.Bah(authResponse.msg)
|
|
: await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
_ = await _repository.InsertAsync(prdInstockH);
|
|
|
|
if (prdInstockDs.Count > 0)
|
|
{
|
|
_ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
}
|
|
});
|
|
}
|
|
|
|
return !result2.IsSuccess ? string.IsNullOrEmpty(result2.ErrorMessage) ? throw Oops.Oh(ErrorCode.COM1008) : throw Oops.Bah(result2.ErrorMessage) : "³É¹¦";
|
|
}
|
|
|
|
/// <summary>
|
|
/// ³¤¹Ü¹Ü¼·³öÈë¿âÉêÇë
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
public async Task<string> InstockTubeThree(PrdReport prdReport)
|
|
{
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
string location_code = prdReport.location_code;
|
|
string warehouse_id = "27209786980373";//³¤¼þ¼·³ö»º´æ²Ö
|
|
|
|
PrdInstockH? prdInstockH = null;
|
|
List<PrdInstockD> prdInstockDs = new() { };
|
|
DbResult<bool> result2 = new();
|
|
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdReport.material_id);
|
|
string create_id = prdReport.create_id;
|
|
UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
|
string org_id = user.OrganizeId;
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorklineCode);
|
|
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(prdReport.station, DictConst.RegionCategoryWorkshopCode);
|
|
|
|
prdInstockH = new PrdInstockH()
|
|
{
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
bill_date = DateTime.Now,
|
|
create_id = create_id,
|
|
location_code = location_code,
|
|
carry_code = prdReport.material_box_code,
|
|
is_check = 1,
|
|
station_id = prdReport.station,
|
|
workline_id = workline?.Id ?? "",
|
|
workshop_id = workshop?.Id ?? "",
|
|
org_id = org_id,
|
|
warehouse_id = warehouse_id,
|
|
status = 0,
|
|
mo_task_id = prdReport.mo_task_id,
|
|
};
|
|
|
|
prdInstockDs.Add(new PrdInstockD()
|
|
{
|
|
instock_id = prdInstockH.id,
|
|
report_id = prdReport.create_id,
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
quantity = (int)prdReport.reported_qty,
|
|
});
|
|
});
|
|
|
|
if (result.IsSuccess)
|
|
{
|
|
MESCreateInstockInput mesCreateInstockInput = new()
|
|
{
|
|
instock = new MESWmsInstockHInput()
|
|
{
|
|
org_id = org_id,
|
|
bill_date = DateTime.Now,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
warehouse_id = warehouse_id,
|
|
source_id = prdInstockH.id,
|
|
create_id = create_id,
|
|
carry_code = prdReport.material_box_code,
|
|
location_code = location_code,
|
|
is_check = 1,
|
|
},
|
|
instockds = new List<MESWmsInstockDInput>(),
|
|
instockcodes = new List<MESWmsInstockCodeInput>()
|
|
};
|
|
mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
code_batch = prdReport.mo_task_code,
|
|
pr_qty = (int)prdReport.reported_qty,
|
|
});
|
|
|
|
mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
codeqty = (int)prdReport.reported_qty,
|
|
});
|
|
// string domain = _userManager.Domain;
|
|
string domain = _userManager.Domain;
|
|
// string domain = "http://localhost:9232";
|
|
Dictionary<string, object> header = new()
|
|
{
|
|
// ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
};
|
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
Log.Information(sendResult);
|
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
result2 = authResponse.code != 200 || !(bool)authResponse.data
|
|
? throw Oops.Bah(authResponse.msg)
|
|
: await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
_ = await _repository.InsertAsync(prdInstockH);
|
|
|
|
if (prdInstockDs.Count > 0)
|
|
{
|
|
_ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
}
|
|
});
|
|
}
|
|
|
|
return !result2.IsSuccess ? string.IsNullOrEmpty(result2.ErrorMessage) ? throw Oops.Oh(ErrorCode.COM1008) : throw Oops.Bah(result2.ErrorMessage) : "³É¹¦";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Íâ°ü×°Èë¿âÉêÇë
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
public async Task<string> InstockOutPack(InstockInput input)
|
|
{
|
|
string equip_code = input.equip_code;
|
|
string label_code = input.label_code;
|
|
string warehouse_id = "26103367464997";//ËÄÂ¥½âÎö¿â
|
|
if (!string.IsNullOrEmpty(equip_code))
|
|
{
|
|
throw Oops.Bah("Çë´«»ų́ºÅ");
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(label_code))
|
|
{
|
|
throw Oops.Bah("Çë´«±êÇ©ºÅ");
|
|
}
|
|
|
|
ISqlSugarClient db = _repository.AsSugarClient();
|
|
EqpEquipment equipment = await db.Queryable<EqpEquipment>()
|
|
.LeftJoin<EqpDaq>((x, y) => x.id == y.equip_id)
|
|
.Where((x, y) => y.equip_code == equip_code && y.label_name == label_code && y.label_point == "Íâ°ü×°³ÉÆ·Âë¶âµãλ")
|
|
.Select((x, y) => x)
|
|
.FirstAsync();
|
|
|
|
|
|
if (equipment == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½»ų́");
|
|
}
|
|
|
|
if (string.IsNullOrEmpty(equipment.as_location_id))
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
BasLocation basLocation = await db.Queryable<BasLocation>().SingleAsync(x => x.id == equipment.as_location_id);
|
|
if (basLocation == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Èë¿â¿âλ");
|
|
}
|
|
|
|
OrganizeEntity station = await db.Queryable<OrganizeEntity>()
|
|
.LeftJoin<OrganizeRelationEntity>((x, y) => x.Id == y.OrganizeId)
|
|
.Where((x, y) => y.ObjectType == "Eqp" && y.ObjectId == equipment.id).FirstAsync();
|
|
|
|
if (station == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½¹¤Î»");
|
|
}
|
|
|
|
PrdOutPacking prdOutPacking = await db.Queryable<PrdOutPacking>().Where(x => x.station_id == station.Id && x.status == "0").OrderByDescending(x => x.create_time).FirstAsync();
|
|
if (prdOutPacking == null)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½ÍÐÅÌ");
|
|
}
|
|
|
|
var prdOutPackMarkLabelList = await db.Queryable<PrdOutPackMarkLabel>().Where(x => x.station_id == station.Id && x.status == "1").ToListAsync();
|
|
if (prdOutPackMarkLabelList == null || prdOutPackMarkLabelList.Count <= 0)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Ìᱨ¼Ç¼");
|
|
}
|
|
|
|
List<string> reportIds = prdOutPackMarkLabelList.Select(x => x.report_id).ToList();
|
|
|
|
List<PrdReport> prdReports = await db.Queryable<PrdReport>().Where(x => reportIds.Contains(x.id)).ToListAsync();
|
|
|
|
|
|
if (prdReports == null || prdReports.Count <= 0)
|
|
{
|
|
throw Oops.Bah("δÕÒµ½Ìᱨ¼Ç¼");
|
|
}
|
|
string create_id = prdReports[0].create_id;
|
|
UserEntity user = await db.Queryable<UserEntity>().SingleAsync(x => x.Id == create_id);
|
|
string org_id = user.OrganizeId;
|
|
string mo_task_id = prdReports[0].mo_task_id;
|
|
|
|
PrdInstockH? prdInstockH = null;
|
|
List<PrdInstockD> prdInstockDs = new() { };
|
|
DbResult<bool> result2 = new();
|
|
string material_id = prdReports[0].material_id;
|
|
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == material_id);
|
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(station.Id, DictConst.RegionCategoryWorklineCode);
|
|
OrganizeEntity workshop = await _organizeService.GetAnyParentByWorkstationId(station.Id, DictConst.RegionCategoryWorkshopCode);
|
|
string code = await _billRuleService.GetBillNumber(CodeTemplateConst.PRDINSTOCK_CODE);
|
|
|
|
prdInstockH = new PrdInstockH()
|
|
{
|
|
code = code,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
bill_date = DateTime.Now,
|
|
create_id = create_id,
|
|
location_code = basLocation.location_code,
|
|
carry_code = prdOutPacking.code,
|
|
is_check = 1,
|
|
station_id = station.Id,
|
|
workline_id = workline?.Id ?? "",
|
|
workshop_id = workshop?.Id ?? "",
|
|
org_id = org_id,
|
|
// warehouse_id = basLocation?.wh_id,
|
|
warehouse_id = warehouse_id,
|
|
status = 0,
|
|
mo_task_id = mo_task_id,
|
|
};
|
|
|
|
foreach (var prdReport in prdReports)
|
|
{
|
|
prdInstockDs.Add(new PrdInstockD()
|
|
{
|
|
instock_id = prdInstockH.id,
|
|
report_id = prdReport.create_id,
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
quantity = (int)prdReport.reported_qty,
|
|
});
|
|
}
|
|
});
|
|
|
|
if (result.IsSuccess)
|
|
{
|
|
MESCreateInstockInput mesCreateInstockInput = new()
|
|
{
|
|
instock = new MESWmsInstockHInput()
|
|
{
|
|
org_id = org_id,
|
|
bill_date = DateTime.Now,
|
|
bill_type = DictConst.CHANCHENGPINRUKUDAN,
|
|
// warehouse_id = basLocation?.wh_id,
|
|
warehouse_id = warehouse_id,
|
|
source_id = prdInstockH.id,
|
|
create_id = create_id,
|
|
carry_code = prdOutPacking.code,
|
|
location_code = basLocation.location_code,
|
|
is_check = 1,
|
|
},
|
|
instockds = new List<MESWmsInstockDInput>(),
|
|
instockcodes = new List<MESWmsInstockCodeInput>()
|
|
};
|
|
|
|
foreach (var prdReport in prdReports)
|
|
{
|
|
mesCreateInstockInput.instockds.Add(new MESWmsInstockDInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
code_batch = prdReport.mo_task_code,
|
|
pr_qty = (int)prdReport.reported_qty,
|
|
});
|
|
|
|
mesCreateInstockInput.instockcodes.Add(new MESWmsInstockCodeInput()
|
|
{
|
|
material_id = prdReport.material_id,
|
|
material_code = basMaterial.code,
|
|
unit_id = prdReport.unit_id,
|
|
barcode = prdReport.barcode,
|
|
code_batch = prdReport.mo_task_code,
|
|
codeqty = (int)prdReport.reported_qty,
|
|
});
|
|
}
|
|
|
|
// string domain = _userManager.Domain;
|
|
string domain = _userManager.Domain;
|
|
Dictionary<string, object> header = new()
|
|
{
|
|
// ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : ""
|
|
};
|
|
string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_INSTOCK, JsonConvert.SerializeObject(mesCreateInstockInput), header);
|
|
Log.Information(sendResult);
|
|
AuthResponse authResponse = JsonConvert.DeserializeObject<AuthResponse>(sendResult);
|
|
result2 = authResponse.code != 200 || !(bool)authResponse.data
|
|
? throw Oops.Bah(authResponse.msg)
|
|
: await db.Ado.UseTranAsync(async () =>
|
|
{
|
|
_ = await _repository.InsertAsync(prdInstockH);
|
|
|
|
if (prdInstockDs.Count > 0)
|
|
{
|
|
_ = await db.Insertable<PrdInstockD>(prdInstockDs).ExecuteCommandAsync();
|
|
}
|
|
|
|
await db.Updateable<PrdOutPackMarkLabel>()
|
|
.SetColumns(x => x.status == "2")
|
|
.Where(x => x.station_id == station.Id && x.status == "1").ExecuteCommandAsync();
|
|
|
|
//todo Èë¿âÉêÇëºóÊÇ·ñÐÞ¸ÄÌᱨ¼Ç¼״̬
|
|
});
|
|
}
|
|
|
|
return !result2.IsSuccess ? throw Oops.Oh(ErrorCode.COM1008) : (dynamic)(result2.IsSuccess ? "ÉêÇë³É¹¦" : result2.ErrorMessage);
|
|
}
|
|
}
|
|
} |