|
|
@@ -22,6 +22,7 @@ using MongoDB.Driver.Linq;
|
|
|
using Newtonsoft.Json;
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
using NUglify.JavaScript.Syntax;
|
|
|
+using Org.BouncyCastle.Asn1.X500;
|
|
|
using Org.BouncyCastle.Asn1.X509;
|
|
|
using Org.BouncyCastle.Crypto;
|
|
|
using SixLabors.ImageSharp;
|
|
|
@@ -330,6 +331,11 @@ namespace Business.ResourceExamineManagement
|
|
|
/// </summary>
|
|
|
private readonly CalcBomViewAppService _CalcBomViewAppService;
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 账号时效性验证
|
|
|
+ /// </summary>
|
|
|
+ private readonly AccountValidityAppService _AccountValidityAppService;
|
|
|
+
|
|
|
private List<ICItemLeadTimeDto> leadTimeList;
|
|
|
|
|
|
private List<mo_srm_purchase> supplierList;
|
|
|
@@ -466,6 +472,7 @@ namespace Business.ResourceExamineManagement
|
|
|
ISqlRepository<ItemMaster> itemMaster,
|
|
|
PretreatmentAppService pretreatmentAppService,
|
|
|
CalcBomViewAppService calcbomviewAppService,
|
|
|
+ AccountValidityAppService accountValidityAppService,
|
|
|
PurchaseOrderAppService purchaseOrderAppService,
|
|
|
ICurrentTenant currentTenant,
|
|
|
MorderAppService morderAppService,
|
|
|
@@ -573,6 +580,7 @@ namespace Business.ResourceExamineManagement
|
|
|
_empWorkDutyMaster = empWorkDutyMaster;
|
|
|
_pretreatmentAppService = pretreatmentAppService;
|
|
|
_CalcBomViewAppService = calcbomviewAppService;
|
|
|
+ _AccountValidityAppService = accountValidityAppService;
|
|
|
_purchaseOrderAppService = purchaseOrderAppService;
|
|
|
_currentTenant = currentTenant;
|
|
|
_morderAppService = morderAppService;
|
|
|
@@ -622,15 +630,20 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <returns></returns>
|
|
|
public async Task<string> receiveresultControllerApi(string companyid)
|
|
|
{
|
|
|
- //获取订单行数据
|
|
|
- var sentrys = await _mysql_crm_seorderentry.GetListAsync(p => (p.progress == "1" || p.progress == "2") && p.company_id.ToString() == companyid && !p.IsDeleted);
|
|
|
- var seorders = _mysql_crm_seorder.GetListAsync(s => sentrys.Select(x => x.seorder_id.GetValueOrDefault()).Contains(s.Id) && s.company_id.ToString() == companyid).Result;
|
|
|
- string ids = string.Join(',', seorders.Select(x => x.Id));
|
|
|
- var rtn = await ReceiveResult(ids, 0, companyid);
|
|
|
- if (rtn == "ok")
|
|
|
+ var IsActived = _AccountValidityAppService.IsActived();
|
|
|
+ if (!IsActived)
|
|
|
{
|
|
|
- rtn = await ReviewExamineResult(ids, 0);
|
|
|
+ return "此账号已限制访问";
|
|
|
}
|
|
|
+ ////获取订单行数据
|
|
|
+ var sentrys = await _mysql_crm_seorderentry.GetListAsync(p => (p.progress == "1" || p.progress == "2") && p.company_id.ToString() == companyid && !p.IsDeleted);
|
|
|
+ var seorders = _mysql_crm_seorder.GetListAsync(s => sentrys.Select(x => x.seorder_id.GetValueOrDefault()).Contains(s.Id) && s.company_id.ToString() == companyid).Result;
|
|
|
+ string ids = string.Join(',', seorders.Select(x => x.Id));
|
|
|
+ var rtn = await ReceiveResult(ids, 0, companyid);
|
|
|
+ if (rtn == "ok")
|
|
|
+ {
|
|
|
+ rtn = await ReviewExamineResult(ids, 0);
|
|
|
+ }
|
|
|
return rtn;
|
|
|
}
|
|
|
|
|
|
@@ -643,7 +656,12 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
public async Task<string> ReceiveResult(string ids, int type, string companyid)
|
|
|
{
|
|
|
- if (string.IsNullOrEmpty(ids))
|
|
|
+ var IsActived = _AccountValidityAppService.IsActived();
|
|
|
+ if (!IsActived)
|
|
|
+ {
|
|
|
+ return "此账号已限制访问";
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(ids))
|
|
|
{
|
|
|
throw new NotImplementedException("请输入正确的订单号!");
|
|
|
}
|
|
|
@@ -5031,6 +5049,11 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="allRoutings">工艺路线数据</param>
|
|
|
public void CreateWorkOrdDates(List<mes_morder> morders, List<mo_mes_moentry> WriteMoentry, List<RoutingOpDetail> allRoutings, List<WorkOrdMaster> workOrds, List<WorkOrdRouting> workOrdRoutings, List<WorkOrdDetail> workOrdDetails, List<b_examine_result> exmResult, List<b_bom_child_examine> childExamineList)
|
|
|
{
|
|
|
+ var IsActived = _AccountValidityAppService.IsActived();
|
|
|
+ if (!IsActived)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//工单主表
|
|
|
WorkOrdMaster workOrd;
|
|
|
//工单工艺路线表
|
|
|
@@ -5597,6 +5620,11 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
public async Task<string> ProductionSchedule(string domain)
|
|
|
{
|
|
|
+ var IsActived = _AccountValidityAppService.IsActived();
|
|
|
+ if (!IsActived)
|
|
|
+ {
|
|
|
+ return "此账号已限制访问";
|
|
|
+ }
|
|
|
//取数开始时间为当前日期
|
|
|
DateTime startTime = DateTime.Now;
|
|
|
////获取需要排产的工单(获取四周的工单:正常工单+已审批通过的特殊工单)
|