去除引用common.props

This commit is contained in:
2023-11-06 19:35:59 +08:00
parent 6a2154edd9
commit c6b8dfc861
810 changed files with 3910 additions and 6695 deletions

View File

@@ -1,31 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells.Drawing;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Dtos.VisualDev;
using JNPF.Common.Filter;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.VisualDev;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Entitys;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.BasicData.Entities;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Interfaces;
using JNPF.Systems.Interfaces.System;
using Tnb.BasicData;
using JNPF.Common.Extension;
using JNPF.Common.Filter;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev;
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SqlSugar;
using Tnb.BasicData;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Interfaces;
namespace Tnb.ProductionMgr
{
@@ -85,7 +75,7 @@ namespace Tnb.ProductionMgr
// //}
// return data!;
// }
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
{
@@ -100,11 +90,11 @@ namespace Tnb.ProductionMgr
}
var db = _repository.AsSugarClient();
var result = await db.Queryable<PrdReportRecord>()
.LeftJoin<DictionaryDataEntity>((a,b)=>a.mo_task_type==b.Id)
.LeftJoin<DictionaryDataEntity>((a,b,c)=>a.status==c.EnCode)
.LeftJoin<PrdMoTask>((a,b,c,d)=>a.mo_task_id==d.id)
.WhereIF(!string.IsNullOrEmpty(moTaskCode),(a,b,c)=>a.mo_task_code.Contains(moTaskCode))
.Select((a,b,c,d)=>new ReportRecordListOutput
.LeftJoin<DictionaryDataEntity>((a, b) => a.mo_task_type == b.Id)
.LeftJoin<DictionaryDataEntity>((a, b, c) => a.status == c.EnCode)
.LeftJoin<PrdMoTask>((a, b, c, d) => a.mo_task_id == d.id)
.WhereIF(!string.IsNullOrEmpty(moTaskCode), (a, b, c) => a.mo_task_code.Contains(moTaskCode))
.Select((a, b, c, d) => new ReportRecordListOutput
{
id = a.id,
masterial_code = a.masterial_code,
@@ -113,27 +103,27 @@ namespace Tnb.ProductionMgr
mo_task_id = a.mo_task_code,
mo_task_id_id = a.mo_task_id,
mo_task_type = b.FullName,
plan_end_date = a.plan_end_date==null ? "" : a.plan_end_date.Value.ToString("yyyy-mm-dd"),
plan_start_date = a.plan_start_date==null ? "" : a.plan_start_date.Value.ToString("yyyy-mm-dd"),
plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString("yyyy-mm-dd"),
plan_start_date = a.plan_start_date == null ? "" : a.plan_start_date.Value.ToString("yyyy-mm-dd"),
plan_qty = d.scheduled_qty,
reported_work_qty = a.reported_work_qty,
completed_qty = SqlFunc.IsNull(d.reported_work_qty,0) + SqlFunc.IsNull(d.scrap_qty,0),
completed_qty = SqlFunc.IsNull(d.reported_work_qty, 0) + SqlFunc.IsNull(d.scrap_qty, 0),
status = c.FullName,
tablefield107 = SqlFunc.Subqueryable<PrdReport>()
.LeftJoin<UserEntity>((x,y)=>x.create_id==y.Id)
.Where(x=>x.mo_task_code==a.mo_task_code).ToList((x,y)=>new ReportRecordListChildrenOutput
{
reported_qty = x.reported_qty,
create_id = y.RealName,
create_id_id = x.create_id,
create_time = x.create_time==null ? "" : x.create_time.Value.ToString(DbTimeFormat.MM),
batch = x.barcode
})
.LeftJoin<UserEntity>((x, y) => x.create_id == y.Id)
.Where(x => x.mo_task_code == a.mo_task_code).ToList((x, y) => new ReportRecordListChildrenOutput
{
reported_qty = x.reported_qty,
create_id = y.RealName,
create_id_id = x.create_id,
create_time = x.create_time == null ? "" : x.create_time.Value.ToString(DbTimeFormat.MM),
batch = x.barcode
})
}).ToPagedListAsync(input.currentPage, input.pageSize);
return PageResult<ReportRecordListOutput>.SqlSugarPageResult(result);
}
private async Task<dynamic> AddRecord(string id,VisualDevModelDataUpInput input)
private async Task<dynamic> AddRecord(string id, VisualDevModelDataUpInput input)
{
var db = _repository.AsSugarClient();
var result = await db.Ado.UseTranAsync(async () =>
@@ -147,7 +137,7 @@ namespace Tnb.ProductionMgr
{
mo_task_id = input.data["mo_task_id"]?.ToString(),
mo_task_code = input.data["mo_task_code"]?.ToString(),
reported_qty = item["reported_qty"]!=null ? (int)item["reported_qty"] : 0,
reported_qty = item["reported_qty"] != null ? (int)item["reported_qty"] : 0,
create_id = item["create_id"]?.ToString(),
create_time = DateTime.Now,
});