去除引用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,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Consts
namespace Tnb.ProductionMgr.Entities.Consts
{
/// <summary>
/// 工单状态
@@ -19,8 +13,8 @@ namespace Tnb.ProductionMgr.Entities.Consts
/// 待排产
/// </summary>
public const string WaitProductId = "25019244276501";
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr;
namespace Tnb.ProductionMgr;
public class ModuleConst
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
public class DictionaryTreeOutput
{

View File

@@ -3,9 +3,9 @@ namespace Tnb.ProductionMgr.Entities.Dto
public class AddAndonInput
{
public string andon_type_id { get; set; }
public string andon_info_id { get; set; }
public string andon_breakdown_id { get; set; }
}
}

View File

@@ -3,9 +3,9 @@ namespace Tnb.ProductionMgr.Entities.Dto
public class AndonPadListInput
{
public string andon_type_id { get; set; }
public string status { get; set; }
/// <summary>
/// 页码.
/// </summary>

View File

@@ -2,15 +2,15 @@ namespace Tnb.ProductionMgr.Entities.Dto
{
public class AndonPadListOutput
{
public string id { get; set; }
public string andon_info_name { get; set; }
public string promoter_name { get; set; }
public string repair_name { get; set; }
public string? promoter_time { get; set; }
public string? response_time { get; set; }
public string? start_repair_time { get; set; }
public string? end_repair_time { get; set; }
public string? confirm_time { get; set; }
public string status { get; set; }
public string id { get; set; }
public string andon_info_name { get; set; }
public string promoter_name { get; set; }
public string repair_name { get; set; }
public string? promoter_time { get; set; }
public string? response_time { get; set; }
public string? start_repair_time { get; set; }
public string? end_repair_time { get; set; }
public string? confirm_time { get; set; }
public string status { get; set; }
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public class AndonRecordInput
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 停机开始输入参数

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public class ClosedownHistoryOutput
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Filter;
using JNPF.Common.Filter;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{

View File

@@ -6,17 +6,17 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public class CountEstimatedEndTimeInput
{
public DateTime estimated_start_date { get; set; }
public int scheduled_qty { get; set; }
public string? equip_id { get; set; }
public string? molds_id { get; set; }
public string? material_id { get; set; }
public string? mbom_id { get; set; }
/// <summary>
/// 1 注塑挤出排产 2 组装包装排产
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 设备列表输出参数

View File

@@ -11,16 +11,16 @@ namespace Tnb.ProductionMgr.Entities.Dto
{
public string id { get; set; }
public string code { get; set; }
public string mo_task_id { get; set; }
public List<FeedingRecordMaterialChildren> children { get; set; } = new List<FeedingRecordMaterialChildren>();
}
public class FeedingRecordMaterialChildren
{
public string material_code { get; set; }
public string material_name { get; set; }
}
}

View File

@@ -6,13 +6,13 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string row_id { get; set; }
public GanntTime time { get; set; }
}
public class GanntTime
{
public DateTime? start { get; set; }
public DateTime? end { get; set; }
}
public class GanntTimeTips
{
public string mo_task_code { get; set; }

View File

@@ -1,15 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public class GenSubMoCrInput
{
public string bom_id { get; set; }
/// <summary>
/// 父工单id
/// </summary>

View File

@@ -6,11 +6,11 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 目标库位编号
/// </summary>
public string location_code { get; set; } = string.Empty;
/// 所属工位
/// </summary>
public string? workstation_id { get; set; }
/// <summary>
/// 任务单
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产任务单更新输入参数
@@ -35,5 +29,5 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 生产任务单数量
/// </summary>
//public int scheduled_qty { get; set; }
}
}
}

View File

@@ -7,82 +7,82 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 出库仓库ID
/// </summary>
public string warehouse_id { get; set; } = string.Empty;
/// <summary>
/// 目标库位编号
/// </summary>
public string location_code { get; set; } = string.Empty;
/// <summary>
/// 产品ID
/// </summary>
public string material_id { get; set; } = string.Empty;
/// <summary>
/// 产品编号
/// </summary>
public string? material_code { get; set; }
/// <summary>
/// 齐套搭配方案ID
/// </summary>
public string collocation_scheme_id { get; set; } = string.Empty;
/// <summary>
/// 齐套搭配方案编号
/// </summary>
public string? collocation_scheme_code { get; set; }
/// <summary>
/// 顺序号
/// </summary>
public string? seq { get; set; }
/// <summary>
/// 创建用户
/// </summary>
public string? create_id { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? create_time { get; set; }
/// <summary>
/// 所属组织
/// </summary>
public string? org_id { get; set; }
/// <summary>
/// 流程任务Id
/// </summary>
public string? f_flowtaskid { get; set; }
/// <summary>
/// 流程引擎Id
/// </summary>
public string? f_flowid { get; set; }
/// <summary>
/// 单据号
/// </summary>
public string code { get; set; } = string.Empty;
/// <summary>
/// 所属工位
/// </summary>
public string? workstation_id { get; set; }
/// <summary>
/// 所属产线
/// </summary>
public string? workline_id { get; set; }
/// <summary>
/// 任务单
/// </summary>
public string? mo_task_id { get; set; }
public List<Dictionary<string,object>> tableField115 { get; set; }
public List<Dictionary<string, object>> tableField115 { get; set; }
}
}

View File

@@ -2,26 +2,26 @@ namespace Tnb.ProductionMgr.Entities.Dto
{
public class KittingOutNewInput
{
/// <summary>
/// 目标库位编号
/// </summary>
public string location_code { get; set; } = string.Empty;
/// <summary>
/// 齐套搭配方案ID
/// </summary>
public string collocation_scheme_id { get; set; } = string.Empty;
/// 所属工位
/// </summary>
public string? workstation_id { get; set; }
/// <summary>
/// 任务单
/// </summary>
public string? mo_task_id { get; set; }
}
}

View File

@@ -21,7 +21,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string workstation_id { get; set; }
public List<MaterialPreparationPlanDDOutput> children { get; set; } = new List<MaterialPreparationPlanDDOutput>();
}
public class MaterialPreparationPlanDDOutput
{
public string material_id { get; set; }

View File

@@ -3,52 +3,52 @@ namespace Tnb.ProductionMgr.Entities.Dto
public class MaterialReceiptInput
{
public string? id { get; set; }
/// <summary>
/// 签收单号
/// </summary>
public string code { get; set; } = string.Empty;
/// <summary>
/// 工位id
/// </summary>
public string station_id { get; set; } = string.Empty;
/// <summary>
/// 任务单id
/// </summary>
public string? mo_task_id { get; set; }
/// <summary>
/// 工序id
/// </summary>
public string? process_id { get; set; }
/// <summary>
/// 设备id
/// </summary>
public string? equip_id { get; set; }
/// <summary>
/// 车间id
/// </summary>
public string? workshop_id { get; set; }
/// <summary>
/// 载具id
/// </summary>
public string? carry_id { get; set; }
/// <summary>
/// 产线id
/// </summary>
public string? workline_id { get; set; }
/// <summary>
/// 二维码信息
/// </summary>
public string? carry_code { get; set; }
/// <summary>
/// 备注
/// </summary>
@@ -58,7 +58,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 生产bom工序id
/// </summary>
public string? mbom_process_id { get; set; }
public List<Dictionary<string,object>>? details { get; set; }
public List<Dictionary<string, object>>? details { get; set; }
}
}

View File

@@ -6,22 +6,22 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 工位id
/// </summary>
public string station_id { get; set; } = string.Empty;
/// <summary>
/// 任务单id
/// </summary>
public string? mo_task_id { get; set; }
/// <summary>
/// 设备id
/// </summary>
public string? equip_id { get; set; }
/// <summary>
/// 二维码信息
/// </summary>
public string? carry_code { get; set; }
public List<Dictionary<string,string>>? details { get; set; }
public List<Dictionary<string, string>>? details { get; set; }
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产工单下发输入参数

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 模具列表输出参数
@@ -36,6 +29,6 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 可用台数
/// </summary>
public int available_stations { get; set; }
public string mold_id { get; set;}
public string mold_id { get; set; }
}
}

View File

@@ -3,12 +3,12 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public class PADPackageTaskPageOutput
{
public string id { get; set; }
/// <summary>
/// 工单号号
/// </summary>
public string? mo_code { get; set; }
/// <summary>
/// 生产任务编号
/// </summary>
@@ -23,15 +23,15 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 物料Id
/// </summary>
public string material_id { get; set; }
public string material_code { get; set; }
public string material_name { get; set; }
/// <summary>
/// 产线id
/// </summary>
public string? workline_id { get; set; }
public string? workline_name { get; set; }
/// <summary>
@@ -43,7 +43,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 任务单状态
/// </summary>
public string? mo_task_status { get; set; }
/// <summary>
@@ -65,7 +65,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 排产类型:1、注塑、挤出2、组装、包装
/// </summary>
public int? schedule_type { get; set; }
public int? reported_work_qty { get; set; }
/// <summary>
@@ -81,14 +81,14 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 父任务Id
/// </summary>
public string? parent_id { get; set; }
/// <summary>
/// 工序id
/// </summary>
public string process_id { get; set; }
public string process_name { get; set; }
public string mbom_process_id { get; set; }
public string equip_id { get; set; }
public string equip_code { get; set; }
@@ -97,7 +97,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string mold_code { get; set; }
public string mold_name { get; set; }
public DateTime? create_time { get; set; }
/// <summary>
/// 成型周期
/// </summary>
@@ -107,17 +107,17 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 模穴数
/// </summary>
public int? mold_cavity { get; set; }
/// <summary>
/// 标准工时
/// </summary>
public string? standard_time { get; set; }
/// <summary>
/// 实际开工日期
/// </summary>
public string? act_start_date { get; set; }
/// <summary>
/// 预计结束时间
/// </summary>
@@ -134,22 +134,22 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 最小包装
/// </summary>
public decimal? minpacking { get; set; }
/// <summary>
/// 主单位数量
/// </summary>
public string? main_num { get; set; }
/// <summary>
/// 副单位数量kg
/// </summary>
public string? deputy_num { get; set; }
/// <summary>
/// 第三方平台设备编号
/// </summary>
public string? third_equip_code { get; set; }
/// <summary>
/// 称重点位名称
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 组装、包装,生产任务修改输入参数

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Security;
using JNPF.Common.Security;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 组装、包装排产输入参数
@@ -27,7 +21,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 物料Id
/// </summary>
public string material_id { get; set; }
/// <summary>
/// 排产数量
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 组装、包装待下发列表输入参数

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.DirectoryServices.Protocols;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 组装、包装生产任务待下发输出参数列表
@@ -80,7 +73,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 预计结束时间
/// </summary>
public string? estimated_end_date { get; set; }
/// <summary>
/// 工序名称
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 组装、包装排产列表输出类

View File

@@ -7,7 +7,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 单据类型
/// </summary>
public string bill_type { get; set; } = string.Empty;
/// <summary>
/// 载具编号
@@ -18,22 +18,22 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 起始库位编号
/// </summary>
public string location_code { get; set; } = string.Empty;
/// <summary>
/// 检验(0-未检 1-已检)
/// </summary>
public int is_check { get; set; }
public string? station_id { get; set; }
public string? workline_id { get; set; }
public string? workshop_id { get; set; }
/// <summary>
/// 子表明细
/// </summary>
public List<Dictionary<string,string>> details { get; set; }
public List<Dictionary<string, string>> details { get; set; }
}
}

View File

@@ -9,28 +9,28 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 工单id
/// </summary>
public string id { get; set; }
public string mo_code { get; set; }
public string material_id { get; set; }
public string material_code { get; set; }
public string material_name { get; set; }
public string? material_standard { get; set; }
public string? act_start_date { get; set; }
public string? act_end_date { get; set; }
/// <summary>
/// 类型 1注塑挤出 2 组装包装
/// </summary>
public int type { get; set; }
}
/// <summary>
/// 工单追溯二级列表输出类
/// </summary>
@@ -40,33 +40,33 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 任务单id
/// </summary>
public string id { get; set; }
public string mo_task_code { get; set; }
public string material_id { get; set; }
public string material_code { get; set; }
public string material_name { get; set; }
public string? material_standard { get; set; }
public string? act_start_date { get; set; }
public string? act_end_date { get; set; }
public string? workline_name { get; set; }
public string? workshop_name { get; set; }
public string? mbom_version { get; set; }
public string station_name { get; set; }
public string equip_code { get; set; }
}
/// <summary>
/// 工单追溯三级列表输出类
/// </summary>
@@ -76,25 +76,25 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 任务单id
/// </summary>
public string id { get; set; }
public string mo_task_code { get; set; }
public string material_id { get; set; }
public string material_code { get; set; }
public string material_name { get; set; }
public string? workline_id { get; set; }
public string? batch { get; set; }
public string process_id { get; set; }
public string process_name { get; set; }
public string station_name { get; set; }
}
/// <summary>
/// 工单追溯人输出类
/// </summary>
@@ -106,16 +106,16 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
// public string id { get; set; }
//
// public string workgroup_name { get; set; }
public string employee_name { get; set; }
public string work_time { get; set; }
public DateTime? start_time { get; set; }
public DateTime? end_time { get; set; }
}
/// <summary>
/// 工单追溯机输出类
/// </summary>
@@ -123,9 +123,9 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public string equip_code { get; set; }
public string mold_code { get; set; }
}
/// <summary>
/// 工单追溯料输出类
/// </summary>
@@ -138,8 +138,8 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string instock_time { get; set; }
public string feeding_time { get; set; }
public string check_conclusion { get; set; }
}
public class PrdMoReverseFromMaterialoutput
@@ -163,7 +163,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// <summary>
/// 批次
/// </summary>
public string code_batch { get; set;}
public string code_batch { get; set; }
/// <summary>
/// 采购单号
/// </summary>
@@ -223,7 +223,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string supplier_name { get; set; }
public string unit_name { get; set; }
}
/// <summary>
/// 物料反向追溯投料信息输出父类
/// </summary>
@@ -236,9 +236,9 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string material_name { get; set; }
public string material_standard { get; set; }
public List<PrdMoReverseFromFeedingDetailOutput> children { get; set; } = new List<PrdMoReverseFromFeedingDetailOutput>();
}
/// <summary>
/// 物料反向追溯投料信息输出字类
/// </summary>
@@ -255,9 +255,9 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string feeding_name { get; set; }
public string station_name { get; set; }
public string process_name { get; set; }
}
public class PrdMoReverseFromOutput
{
/// <summary>
@@ -278,7 +278,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// <summary>
/// 批次
/// </summary>
public string code_batch { get; set;}
public string code_batch { get; set; }
/// <summary>
/// 单位ID
/// </summary>
@@ -332,5 +332,5 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// </summary>
public string delivery_time { get; set; }
}
}

View File

@@ -11,11 +11,11 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 每页行数.
/// </summary>
public int pageSize { get; set; } = 50;
public string? mo_code { get; set; }
public string? mo_task_code { get; set; }
public string? barcode { get; set; }
}
@@ -25,25 +25,25 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string mo_task_code { get; set; }
public string barcode { get; set; }
}
public class PrdMoFromThreeQueryInput
{
public string mo_task_id { get; set; }
public string mo_task_code { get; set; }
public string barcode { get; set; }
}
}
public class PrdMoFromTabQueryInput
{
public string mo_task_id { get; set; }
public string barcode { get; set; }
}
}
public class PrdMoReverseFromQueryInput
{
public string barcode { get; set; }
}
public class PrdMoReverseFromOutInfoQueryInput
{
public string feeding_detail_id { get; set; }

View File

@@ -3,9 +3,9 @@ namespace Tnb.ProductionMgr.Entities.Dto
public class PrdMoListOuput
{
public string id { get; set; }
public string mo_type { get; set; }
public string mo_source { get; set; }
public string mo_code { get; set; }
public string plan_start_date { get; set; }

View File

@@ -1,13 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Security;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public class PrdMoListTreeOutput
public class PrdMoListTreeOutput
{
//public Dictionary<string, object> row { get; set; }
@@ -136,7 +129,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 父工单id
/// </summary>
public string parent_id { get; set; } = string.Empty;
/// <summary>
/// 获取节点id.
/// </summary>

View File

@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DbModels;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 提报记录统计明细
@@ -27,7 +19,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string? batch { get; set; }
public string? create_time { get; set; }
public string? create_name { get; set; }
/// <summary>
/// 报废数量

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 根据设备id 获取生产任务列表,输入参数

View File

@@ -5,8 +5,8 @@ namespace Tnb.ProductionMgr.Entities.Dto
public string id { get; set; }
public string mo_task_code { get; set; }
public string material_id { get; set; }
public string mold_id { get; set; }
public string eqp_id { get; set; }
public string mold_id { get; set; }
public string eqp_id { get; set; }
public string mo_task_status { get; set; }
public int? plan_qty { get; set; }
public int? scheduled_qty { get; set; }

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.DirectoryServices.Protocols;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Security;
using JNPF.Common.Security;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
@@ -76,7 +69,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// <summary>
/// 预计完工时间
/// </summary>
public string estimated_end_date { get; set; }= string.Empty;
public string estimated_end_date { get; set; } = string.Empty;
/// <summary>
/// 工序编码
/// </summary>
@@ -84,8 +77,8 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// <summary>
/// 工序名称
/// </summary>
public string process_name { get; set;}
public string process_name { get; set; }
public string create_time { get; set; }
}
public class PrdMoTaskTreeOutput : TreeModel
@@ -97,7 +90,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public string? material_id { get; set; }
public string? mold_id { get; set; }
public string? eqp_id { get; set; }
/// <summary>
/// 物料
/// </summary>
@@ -122,7 +115,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// 预计结束时间
/// </summary>
public string? estimated_end_date { get; set; }
/// <summary>
/// 创建时间
/// </summary>

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Security;
using JNPF.Common.Security;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Filter;
using Microsoft.AspNetCore.Mvc.RazorPages;
using JNPF.Common.Filter;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 生产提报输入参数
@@ -98,12 +92,12 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// Nullable:True
/// </summary>
public int icmo_qty { get; set; }
/// <summary>
/// 工位
/// </summary>
public string? station { get; set; }
/// <summary>
/// 料箱二维码
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
public class PrdReportOutput
{
@@ -47,6 +41,6 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// </summary>
public string material_property { get; set; }
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产操作记录查询参数
@@ -30,7 +24,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// <summary>
/// 计划生产开始日期
/// </summary>
public DateTime? plan_start_date{ get; set; }
public DateTime? plan_start_date { get; set; }
/// <summary>
/// 计划生产结束日期
/// </summary>

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产操作记录输出类
@@ -16,7 +9,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
///任务单操作状态
/// </summary>
public string statusName { get; set; }
/// <summary>
/// 排产类型:1、注塑、挤出2、组装、包装
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产任务单下发输入参数

View File

@@ -1,16 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产任务重新排序输出参数
/// </summary>
public class PrdTaskSortOutput
public class PrdTaskSortOutput
{
/// <summary>
/// 序号
@@ -24,7 +17,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 生产任务状态
/// 生产任务状态
/// </summary>
public string status { get; set;}
public string status { get; set; }
/// <summary>
/// 是否同组标识
/// </summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 生产工单排产输入参数
@@ -15,7 +9,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
///
/// </summary>
public string id { get; set; }
/// <summary>
/// Desc:排产类型 1、注塑/挤出工单 2、组装/包装工单
/// Default:
@@ -43,14 +37,14 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// Nullable:True
/// </summary>
public DateTime? estimated_start_date { get; set; }
/// <summary>
/// Desc:预计结束时间
/// Default:
/// Nullable:True
/// </summary>
public DateTime? estimated_end_date { get; set; }
// /// <summary>
// /// Desc:预计开始时间
// /// Default:
@@ -126,5 +120,5 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// </summary>
public string bom_id { get; set; }
}
}

View File

@@ -10,10 +10,10 @@ namespace Tnb.ProductionMgr.Entities.Dto
public string? mo_task_id_id { get; set; } = string.Empty;
public string? mo_task_type { get; set; } = string.Empty;
public string? plan_end_date { get; set; } = string.Empty;
public int? plan_qty { get; set; }
public int? plan_qty { get; set; }
public int? completed_qty { get; set; }
public string? plan_start_date { get; set; } = string.Empty;
public int? reported_work_qty { get; set; }
public int? reported_work_qty { get; set; }
public string? status { get; set; } = string.Empty;
public List<ReportRecordListChildrenOutput>? tablefield107 { get; set; } = new List<ReportRecordListChildrenOutput>();
@@ -27,7 +27,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
public string? create_id { get; set; } = string.Empty;
public string? create_id_id { get; set; } = string.Empty;
public string? create_time { get; set; } = string.Empty;
public string? batch { get; set; } = string.Empty;
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 自检报废输入类
@@ -57,7 +51,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
public List<defectItem> items { get; set; }
}
public class defectItem
public class defectItem
{
/// <summary>

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 模具更换输入参数

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
public class TaskOperRecordOutput
{

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto
namespace Tnb.ProductionMgr.Entities.Dto
{
/// <summary>
/// 转移机台输入参数

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
{
/// <summary>
/// 拆解组装包装排产输入参数

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;

View File

@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
@@ -17,16 +12,16 @@ namespace Tnb.ProductionMgr.Entities.Entity
id = SnowflakeIdHelper.NextId();
}
public string? region_name { get; set; }
public string? name { get; set; }
public string? push_rule_id { get; set; }
/// <summary>
/// 故障类别
/// </summary>
public string? andon_type { get; set; }
/// <summary>
/// 故障

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
@@ -38,14 +33,14 @@ namespace Tnb.ProductionMgr.Entities
public string? remark { get; set; }
public string? andon_type_id { get; set; }
public string? andon_info_id { get; set; }
public string? repair_id { get; set; }
public string? repair_id { get; set; }
public DateTime? response_time { get; set; }
public DateTime? start_repair_time { get; set; }
public DateTime? end_repair_time { get; set; }
public DateTime? confirm_time { get; set; }
public string status { get; set; }
}
}

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JNPF.Common.Contracts;
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
@@ -20,7 +15,7 @@ namespace Tnb.ProductionMgr.Entities
/// 名称
/// </summary>
public string? name { get; set; }
public string? remark { get; set; }
public string? create_id { get; set; }
@@ -31,6 +26,6 @@ namespace Tnb.ProductionMgr.Entities
/// 所属组织
/// </summary>
public string? org_id { get; set; }
}
}

View File

@@ -15,7 +15,7 @@ namespace Tnb.ProductionMgr.Entities.Entity
public string eqp_id { get; set; }
public string eqp_id_id { get; set; }
public string equip_code { get; set; }
public string process_id { get; set; }
public string process_id_id { get; set; }
public string process_code { get; set; }
@@ -23,9 +23,9 @@ namespace Tnb.ProductionMgr.Entities.Entity
public int? scheduled_qty { get; set; }
public int? reported_work_qty { get; set; }
public int? scrap_qty { get; set; }
public string plan_start_date { get; set; }
public string plan_end_date { get; set; }
}
}

View File

@@ -15,7 +15,7 @@ namespace Tnb.ProductionMgr.Entities
public string eqp_id { get; set; }
public string eqp_id_id { get; set; }
public string equip_code { get; set; }
public string process_id { get; set; }
public string process_id_id { get; set; }
public string process_code { get; set; }
@@ -23,9 +23,9 @@ namespace Tnb.ProductionMgr.Entities
public int? scheduled_qty { get; set; }
public int? reported_work_qty { get; set; }
public int? scrap_qty { get; set; }
public string plan_start_date { get; set; }
public string plan_end_date { get; set; }
}
}

View File

@@ -3,7 +3,7 @@ namespace Tnb.ProductionMgr.Entities.Entity
public class CheckMoldInput
{
public string mo_task_id { get; set; }
public string mold_qrcode { get; set; }
}
}

View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using JNPF.Common.Contracts;
using SqlSugar;
using JNPF.Common.Contracts;
namespace Tnb.ProductionMgr.Entities
{

View File

@@ -53,7 +53,7 @@ public partial class PrdFeedingD : BaseEntity<string>
/// 物料签收单子表id
/// </summary>
public string? material_receipt_detail_id { get; set; }
/// <summary>
/// 创建用户
/// </summary>
@@ -63,7 +63,7 @@ public partial class PrdFeedingD : BaseEntity<string>
/// 创建时间
/// </summary>
public DateTime? create_time { get; set; }
/// <summary>
/// 状态 0 未消耗 1 部分消耗 2 消耗完
/// </summary>

View File

@@ -53,7 +53,7 @@ public partial class PrdInstockD : BaseEntity<string>
/// 生产提报id
/// </summary>
public string report_id { get; set; } = string.Empty;
/// <summary>
/// 生产任务单号
/// </summary>

View File

@@ -38,7 +38,7 @@ public partial class PrdInstockH : BaseEntity<string>
/// 起始库位编号
/// </summary>
public string location_code { get; set; } = string.Empty;
/// <summary>
/// 工位id
/// </summary>
@@ -54,7 +54,7 @@ public partial class PrdInstockH : BaseEntity<string>
/// </summary>
public string? workshop_id { get; set; }
/// <summary>
/// 检验(0-未检 1-已检)

View File

@@ -38,7 +38,7 @@ public partial class PrdMaterialReceiptD : BaseEntity<string>
/// 单位id
/// </summary>
public string? unit_id { get; set; }
/// <summary>
/// 条码编号
/// </summary>
@@ -48,7 +48,7 @@ public partial class PrdMaterialReceiptD : BaseEntity<string>
/// 载具id
/// </summary>
public string carry_id { get; set; } = string.Empty;
/// <summary>
/// 子载具id
/// </summary>
@@ -69,7 +69,7 @@ public partial class PrdMaterialReceiptD : BaseEntity<string>
/// 已投料数量
/// </summary>
public decimal feeding_num { get; set; }
/// <summary>
/// 供应商
/// </summary>

View File

@@ -14,12 +14,12 @@ public partial class PrdMaterialReceiptH : BaseEntity<string>
{
id = SnowflakeIdHelper.NextId();
}
/// <summary>
/// 签收单号
/// </summary>
public string code { get; set; } = string.Empty;
/// <summary>
/// 工位id
/// </summary>

View File

@@ -53,7 +53,7 @@ public partial class PrdMo : BaseEntity<string>
/// 已完工数量
/// </summary>
public int? complete_qty { get; set; }
/// <summary>
/// 已报工数量
/// </summary>
@@ -227,12 +227,12 @@ public partial class PrdMo : BaseEntity<string>
/// 父工单id
/// </summary>
public string parent_id { get; set; }
/// <summary>
/// 物料单位
/// </summary>
public string? unit_id { get; set; }
/// <summary>
/// 工单来源
/// </summary>

View File

@@ -78,7 +78,7 @@ public partial class PrdMoTask : BaseEntity<string>
/// 已完工数量
/// </summary>
public int? complete_qty { get; set; }
/// <summary>
/// 已报工数量
/// </summary>
@@ -177,22 +177,22 @@ public partial class PrdMoTask : BaseEntity<string>
/// 工序id
/// </summary>
public string process_id { get; set; }
/// <summary>
/// 生产bom工序id
/// </summary>
public string? mbom_process_id { get; set; }
/// <summary>
/// 最后一道工序完成数量
/// </summary>
public int? last_process_complete_qty { get; set; }
/// <summary>
/// 物料单位
/// </summary>
public string? unit_id { get; set; }
/// <summary>
/// 物料清单id
/// </summary>

View File

@@ -1,7 +1,3 @@
using System;
using System.Linq;
using System.Text;
using JNPF.Common.Security;
using SqlSugar;
namespace Tnb.ProductionMgr.Entities

View File

@@ -73,7 +73,7 @@ public partial class PrdMoTaskLog : BaseEntity<string>
/// 任务单编号
/// </summary>
public string? mo_task_code { get; set; }
/// <summary>
/// 工位编号
/// </summary>

View File

@@ -1,5 +1,4 @@
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
namespace Tnb.ProductionMgr.Entities;
@@ -12,7 +11,7 @@ public partial class PrdOnwipTool : BaseEntity<char>
{
public PrdOnwipTool()
{
}
/// <summary>
/// TODO

View File

@@ -78,18 +78,18 @@ public partial class PrdReport : BaseEntity<string>
/// 生产任务量
/// </summary>
public int? icmo_qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public string? batch { get; set; }
/// <summary>
/// 条码
/// </summary>
public string? barcode { get; set; }
/// <summary>
/// 设备id
/// </summary>
@@ -109,7 +109,7 @@ public partial class PrdReport : BaseEntity<string>
/// 状态 0 未入库 1 已入库
/// </summary>
public int status { get; set; }
/// <summary>
/// 物料id
/// </summary>
@@ -119,12 +119,12 @@ public partial class PrdReport : BaseEntity<string>
/// 物料单位
/// </summary>
public string? unit_id { get; set; }
/// <summary>
/// 工序id
/// </summary>
public string? process_id { get; set; }
/// <summary>
/// 料箱编号
/// </summary>

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Text;
using SqlSugar;
using SqlSugar;
namespace DbModels
{

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Text;
using SqlSugar;
using SqlSugar;
namespace Tnb.ProductionMgr.Entities
{
@@ -138,7 +135,7 @@ namespace Tnb.ProductionMgr.Entities
/// <summary>
/// 工单数(生产任务数)
/// </summary>
public int mo_qty{ get; set; }
public int mo_qty { get; set; }
/// <summary>
/// Desc:模具Id
/// Default:NULL::character varying

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Text;
using SqlSugar;
using SqlSugar;
namespace Tnb.ProductionMgr.Entities
{

View File

@@ -1,17 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Entities.Enums
namespace Tnb.ProductionMgr.Entities.Enums
{
public enum Eagvmode
{
=0,
=1,
=2,
=3,
=4
= 0,
= 1,
= 2,
= 3,
= 4
}
}

View File

@@ -1,21 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spire.License;
namespace Tnb.ProductionMgr.Entities.Enums
namespace Tnb.ProductionMgr.Entities.Enums
{
public enum MoBehavior
{
/// <summary>
/// 下发
/// </summary>
Release=1,
Release = 1,
/// <summary>
/// 强制结单
/// </summary>
Closed=2,
Closed = 2,
}
}

View File

@@ -1,6 +1,4 @@
using Mapster;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Entities.Mapper
{

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -20,29 +20,29 @@ namespace Tnb.ProductionMgr.Interfaces
/// <param name="input"></param>
/// <returns></returns>
public Task<dynamic> AddAndon(AddAndonInput input);
/// <summary>
/// 响应andon
/// </summary>
/// <returns></returns>
public Task<dynamic> ResponseAndon(Dictionary<string,string> dic);
public Task<dynamic> ResponseAndon(Dictionary<string, string> dic);
/// <summary>
/// 开始处理andon
/// </summary>
/// <returns></returns>
public Task<dynamic> StartAndon(Dictionary<string,string> dic);
public Task<dynamic> StartAndon(Dictionary<string, string> dic);
/// <summary>
/// 结束处理andon
/// </summary>
/// <returns></returns>
public Task<dynamic> EndAndon(Dictionary<string,string> dic);
public Task<dynamic> EndAndon(Dictionary<string, string> dic);
/// <summary>
/// 确认andon
/// </summary>
/// <returns></returns>
public Task<dynamic> ConfirmAndon(Dictionary<string,string> dic);
public Task<dynamic> ConfirmAndon(Dictionary<string, string> dic);
}
}

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
namespace Tnb.ProductionMgr.Interfaces
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
/// <summary>
/// 异常停机服务接口

View File

@@ -14,7 +14,7 @@ namespace Tnb.ProductionMgr.Interfaces
/// <param name="input"></param>
/// <returns></returns>
public Task<dynamic> SaveData(MaterialReceiptInput input);
/// <summary>
/// 保存数据
/// </summary>

View File

@@ -15,21 +15,21 @@ namespace Tnb.ProductionMgr.Interfaces
/// <param name="input"></param>
/// <returns></returns>
public Task<dynamic> SaveData(PrdInstockInput input);
/// <summary>
/// 入库申请同步
/// </summary>
/// <param name="dic">source_id</param>
/// <returns></returns>
public Task<dynamic> SyncInstock(Dictionary<string, string> dic);
/// <summary>
/// 注塑满箱到位后入库申请
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public Task<dynamic> InstockTypeOne(InstockInput inut);
/// <summary>
/// 短管挤出入库申请
/// </summary>

View File

@@ -5,6 +5,6 @@ namespace Tnb.ProductionMgr.Interfaces
/// </summary>
public interface IPrdKittingOutService
{
}
}

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
/// <summary>
/// 生产任务单下发接口

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.Interfaces
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
/// <summary>
/// 组装、包装 生产提报接口

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
public interface IPrdTaskManageService
{

View File

@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
public interface IProductionReportRecordService
{

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
public interface IRedisDataService
{

View File

@@ -1,6 +1,4 @@
using Tnb.ProductionMgr.Entities.Dto;
namespace Tnb.ProductionMgr.Interfaces
namespace Tnb.ProductionMgr.Interfaces
{
/// <summary>
/// 工单生成

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

View File

@@ -1,4 +1,3 @@
using COSXML.Model.Tag;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.DependencyInjection;
@@ -10,10 +9,10 @@ using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.ProductionMgr.Entities;
using Tnb.BasicData;
using Tnb.BasicData.Entities;
using Tnb.EquipMgr.Entities;
using Tnb.BasicData;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.APP
{
@@ -53,7 +52,7 @@ namespace Tnb.ProductionMgr.APP
_dictionaryDataService = dictionaryDataService;
_billRuleService = billRullService;
}
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
{
var db = _repository.AsSugarClient();
@@ -66,18 +65,18 @@ namespace Tnb.ProductionMgr.APP
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.EnCode == a.mo_task_status && e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId)
.LeftJoin<BasProcess>((a,b,c,d,e,f)=>a.process_id==f.id)
.LeftJoin<BasProcess>((a, b, c, d, e, f) => a.process_id == f.id)
.WhereIF(!string.IsNullOrEmpty(mo_task_code), (a, b, c, d, e) => a.mo_task_code.Contains(mo_task_code))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e) => b.code.Contains(material_code) || b.name.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(equip_code), (a, b, c, d, e) => d.code.Contains(equip_code) || d.name.Contains(equip_code))
.OrderByDescending(a => a.create_time)
.Select((a, b, c, d, e,f) => new AppPrdMoTaskOneListOutput
.Select((a, b, c, d, e, f) => new AppPrdMoTaskOneListOutput
{
id = a.id,
mo_task_code = a.mo_task_code,
mo_task_status = e.FullName,
material_id_id = a.material_id,
material_id = b.code+"/"+b.name,
material_id = b.code + "/" + b.name,
material_code = b.code,
material_name = b.name,
mold_id_id = a.mold_id,
@@ -93,8 +92,8 @@ namespace Tnb.ProductionMgr.APP
scheduled_qty = a.scheduled_qty,
reported_work_qty = a.reported_work_qty,
scrap_qty = a.scrap_qty,
plan_start_date = a.estimated_start_date==null ? "" : a.estimated_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.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd"),
plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString("yyyy-MM-dd"),
}).ToPagedListAsync(input.currentPage, input.pageSize);
return PageResult<AppPrdMoTaskOneListOutput>.SqlSugarPageResult(result);
}
@@ -109,9 +108,9 @@ namespace Tnb.ProductionMgr.APP
{
string mo_task_id = dic.ContainsKey("mo_task_id") ? dic["mo_task_id"] : "";
if (string.IsNullOrEmpty(mo_task_id)) return Array.Empty<string>();
Dictionary<string,object> statsDic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
return await _db.Queryable<PrdMoTaskLog>().Where(x=>x.mo_task_id==mo_task_id)
.OrderBy(x=>x.create_time)
Dictionary<string, object> statsDic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
return await _db.Queryable<PrdMoTaskLog>().Where(x => x.mo_task_id == mo_task_id)
.OrderBy(x => x.create_time)
.Mapper(x =>
{
if (statsDic.ContainsKey(x.status))

View File

@@ -1,4 +1,3 @@
using COSXML.Model.Tag;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.DependencyInjection;
@@ -10,10 +9,10 @@ using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.ProductionMgr.Entities;
using Tnb.BasicData;
using Tnb.BasicData.Entities;
using Tnb.EquipMgr.Entities;
using Tnb.BasicData;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.APP
{
@@ -50,7 +49,7 @@ namespace Tnb.ProductionMgr.APP
OverideFuncs.GetListAsync = GetList;
_billRuleService = billRullService;
}
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
{
var db = _repository.AsSugarClient();
@@ -67,7 +66,7 @@ namespace Tnb.ProductionMgr.APP
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e) => b.code.Contains(material_code) || b.name.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(equip_code), (a, b, c, d, e) => d.code.Contains(equip_code) || d.name.Contains(equip_code))
.Where(a => a.schedule_type == 1)
.Where(a => (a.mo_task_status==DictConst.ToBeStartedEnCode || a.mo_task_status==DictConst.InProgressEnCode || a.mo_task_status==DictConst.MoStatusExceptionCode || a.mo_task_status==DictConst.MoStatusPauseCode || a.mo_task_status==DictConst.ComplatedEnCode))
.Where(a => (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.InProgressEnCode || a.mo_task_status == DictConst.MoStatusExceptionCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode))
.OrderByDescending(a => a.create_time)
.Select((a, b, c, d, e) => new AppPrdMoTaskOneListOutput
{
@@ -75,7 +74,7 @@ namespace Tnb.ProductionMgr.APP
mo_task_code = a.mo_task_code,
mo_task_status = e.FullName,
material_id_id = a.material_id,
material_id = b.code+"/"+b.name,
material_id = b.code + "/" + b.name,
material_code = b.code,
material_name = b.name,
mold_id_id = a.mold_id,
@@ -87,8 +86,8 @@ namespace Tnb.ProductionMgr.APP
scheduled_qty = a.scheduled_qty,
reported_work_qty = a.reported_work_qty,
scrap_qty = a.scrap_qty,
plan_start_date = a.estimated_start_date==null ? "" : a.estimated_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.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd"),
plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString("yyyy-MM-dd"),
}).ToPagedListAsync(input.currentPage, input.pageSize);
return PageResult<AppPrdMoTaskOneListOutput>.SqlSugarPageResult(result);
}

View File

@@ -1,4 +1,3 @@
using COSXML.Model.Tag;
using JNPF.Common.Core.Manager;
using JNPF.Common.Filter;
using JNPF.DependencyInjection;
@@ -10,10 +9,10 @@ using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using JNPF.VisualDev.Interfaces;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.ProductionMgr.Entities;
using Tnb.BasicData;
using Tnb.BasicData.Entities;
using Tnb.EquipMgr.Entities;
using Tnb.BasicData;
using Tnb.ProductionMgr.Entities;
namespace Tnb.ProductionMgr.APP
{
@@ -50,7 +49,7 @@ namespace Tnb.ProductionMgr.APP
OverideFuncs.GetListAsync = GetList;
_billRuleService = billRullService;
}
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
{
var db = _repository.AsSugarClient();
@@ -63,20 +62,20 @@ namespace Tnb.ProductionMgr.APP
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.EnCode == a.mo_task_status && e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId)
.LeftJoin<BasProcess>((a,b,c,d,e,f)=>a.process_id==f.id)
.LeftJoin<BasProcess>((a, b, c, d, e, f) => a.process_id == f.id)
.WhereIF(!string.IsNullOrEmpty(mo_task_code), (a, b, c, d, e) => a.mo_task_code.Contains(mo_task_code))
.WhereIF(!string.IsNullOrEmpty(material_code), (a, b, c, d, e) => b.code.Contains(material_code) || b.name.Contains(material_code))
.WhereIF(!string.IsNullOrEmpty(equip_code), (a, b, c, d, e) => d.code.Contains(equip_code) || d.name.Contains(equip_code))
.Where(a => a.schedule_type == 2)
.Where(a => (a.mo_task_status==DictConst.ToBeStartedEnCode || a.mo_task_status==DictConst.InProgressEnCode || a.mo_task_status==DictConst.MoStatusExceptionCode || a.mo_task_status==DictConst.MoStatusPauseCode || a.mo_task_status==DictConst.ComplatedEnCode))
.Where(a => (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.InProgressEnCode || a.mo_task_status == DictConst.MoStatusExceptionCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode))
.OrderByDescending(a => a.create_time)
.Select((a, b, c, d, e,f) => new AppPrdMoTaskOneListOutput
.Select((a, b, c, d, e, f) => new AppPrdMoTaskOneListOutput
{
id = a.id,
mo_task_code = a.mo_task_code,
mo_task_status = e.FullName,
material_id_id = a.material_id,
material_id = b.code+"/"+b.name,
material_id = b.code + "/" + b.name,
material_code = b.code,
material_name = b.name,
mold_id_id = a.mold_id,
@@ -92,8 +91,8 @@ namespace Tnb.ProductionMgr.APP
scheduled_qty = a.scheduled_qty,
reported_work_qty = a.reported_work_qty,
scrap_qty = a.scrap_qty,
plan_start_date = a.estimated_start_date==null ? "" : a.estimated_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.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd"),
plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString("yyyy-MM-dd"),
}).ToPagedListAsync(input.currentPage, input.pageSize);
return PageResult<AppPrdMoTaskOneListOutput>.SqlSugarPageResult(result);
}

View File

@@ -9,6 +9,7 @@ using JNPF.FriendlyException;
using JNPF.Message.Entitys.Entity;
using JNPF.Message.Service;
using JNPF.Systems.Entitys.Permission;
using JNPF.Systems.Entitys.System;
using JNPF.TaskScheduler;
using JNPF.TaskScheduler.Entitys.Dto.TaskScheduler;
using JNPF.TaskScheduler.Entitys.Model;
@@ -16,30 +17,27 @@ using Mapster;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SqlSugar;
using Tnb.BasicData;
using Tnb.BasicData.Entities;
using Tnb.BasicData.Interfaces;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.ProductionMgr.Entities.Entity;
using Tnb.ProductionMgr.Interfaces;
using Tnb.BasicData.Entities;
using JNPF.Systems.Entitys.System;
using JNPF.Message.Entitys.Entity;
using Tnb.BasicData;
using Tnb.BasicData.Interfaces;
using MessageTemplateEntity = JNPF.Message.Entitys.Entity.MessageTemplateEntity;
namespace Tnb.ProductionMgr
{
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
[Route("api/[area]/[controller]/[action]")]
public class AndonRecordService: IAndonRecordService, IDynamicApiController, ITransient
public class AndonRecordService : IAndonRecordService, IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
private readonly IUserManager _userManager;
private SendMessageService _sendMessageService;
private readonly IBasPushRuleLogService _basPushRuleLogService;
private readonly TimeTaskService _timeTaskService;
public AndonRecordService(ISqlSugarRepository<AndonRecords> repository,
SendMessageService sendMessageService,
TimeTaskService timeTaskService,
@@ -60,11 +58,11 @@ namespace Tnb.ProductionMgr
.LeftJoin<AndonInfo>((a, b) => a.andon_info_id == b.id)
.LeftJoin<UserEntity>((a, b, c) => a.repair_id == c.Id)
.LeftJoin<UserEntity>((a, b, c, d) => a.create_id == d.Id)
.LeftJoin<DictionaryTypeEntity>((a,b,c,d,e)=>e.EnCode==DictConst.AndonStatus)
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e,f)=>a.status==f.EnCode && e.Id==f.DictionaryTypeId)
.LeftJoin<DictionaryTypeEntity>((a, b, c, d, e) => e.EnCode == DictConst.AndonStatus)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e, f) => a.status == f.EnCode && e.Id == f.DictionaryTypeId)
.Where((a, b, c, d) => a.andon_type_id == input.andon_type_id)
.WhereIF(!string.IsNullOrEmpty(input.status),(a, b, c, d)=>a.status==input.status)
.Select((a, b, c, d,e,f) => new AndonPadListOutput
.WhereIF(!string.IsNullOrEmpty(input.status), (a, b, c, d) => a.status == input.status)
.Select((a, b, c, d, e, f) => new AndonPadListOutput
{
id = a.id,
andon_info_name = b.name,
@@ -87,30 +85,30 @@ namespace Tnb.ProductionMgr
{
AndonInfo andonInfo = await _db.Queryable<AndonInfo>().SingleAsync(x => x.id == input.andon_info_id);
AndonRecords andonRecords = input.Adapt<AndonRecords>();
DbResult<bool> result = await _db.Ado.UseTranAsync(async () =>
DbResult<bool> result = await _db.Ado.UseTranAsync(async () =>
{
andonRecords.create_time = DateTime.Now;
andonRecords.create_id = _userManager.UserId;
andonRecords.status = DictConst.AndonStatusHJZ;
List<string> toUsers = new List<string>();
if (!string.IsNullOrEmpty(andonInfo.personnel))
{
toUsers.AddRange(JsonConvert.DeserializeObject<List<string>>(andonInfo.personnel));
}
if (!string.IsNullOrEmpty(andonInfo.position))
{
toUsers.AddRange(_db.Queryable<UserRelationEntity>().Where(x => andonInfo.position.Contains(x.Id)).Select(s => s.UserId).ToList());
}
if (!string.IsNullOrEmpty(andonInfo.role))
{
toUsers.AddRange(_db.Queryable<UserRelationEntity>().Where(x => andonInfo.role.Contains(x.Id)).Select(s => s.UserId).ToList());
}
@@ -132,76 +130,76 @@ namespace Tnb.ProductionMgr
await _db.Insertable<AndonRecords>(andonRecords).ExecuteCommandAsync();
});
if (result.IsSuccess)
{
BasPushRuleH basPushRuleH = await _db.Queryable<BasPushRuleH>().SingleAsync(x => x.id == andonInfo.push_rule_id);
BasPushRuleD basPushRuleD = await _db.Queryable<BasPushRuleD>().FirstAsync(x => x.push_rule_id == andonInfo.push_rule_id && x.ordinal == 1);
if (basPushRuleH?.enabled == 1)
{
BasPushRuleH basPushRuleH = await _db.Queryable<BasPushRuleH>().SingleAsync(x=>x.id==andonInfo.push_rule_id);
BasPushRuleD basPushRuleD = await _db.Queryable<BasPushRuleD>().FirstAsync(x => x.push_rule_id == andonInfo.push_rule_id && x.ordinal == 1);
if (basPushRuleH?.enabled == 1)
string sendConfigId = basPushRuleD?.send_config_id ?? "";
List<MessageSendModel> sendModels = await GetSendParamJson(sendConfigId);
if (sendModels != null && sendModels.Count > 0)
{
string sendConfigId = basPushRuleD?.send_config_id ?? "";
List<MessageSendModel> sendModels = await GetSendParamJson(sendConfigId);
if (sendModels != null && sendModels.Count > 0)
DateTime executeTime = DateTime.Now.AddMinutes(basPushRuleD.interval);
// string cron = $"0 {executeTime.Minute} {executeTime.Hour} {executeTime.Day} {executeTime.Month} ? {executeTime.Year}";
string cron = $"0 {executeTime.Minute} {executeTime.Hour} {executeTime.Day} {executeTime.Month} ?";
var comtentModel = new ContentModel();
// comtentModel.cron = (2 * 60).ToString();
comtentModel.cron = cron;
comtentModel.interfaceId = "";
comtentModel.interfaceName = "";
comtentModel.parameter = new List<InterfaceParameter>();
comtentModel.localHostTaskId = "PushMsgTimeWorker/PushMsg";
comtentModel.startTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();
// comtentModel.endTime = DateTimeOffset.Now.AddSeconds(3).ToUnixTimeMilliseconds().ToString();
comtentModel.TenantId = _userManager?.TenantId;
comtentModel.TenantDbName = _userManager?.TenantDbName;
comtentModel.ConnectionConfig = _userManager?.ConnectionConfig;
comtentModel.Token = _userManager?.ToKen;
// foreach (var item in sendModels)
// {
// }
//
TimeTaskCrInput timeTaskCrInput = new TimeTaskCrInput()
{
DateTime executeTime = DateTime.Now.AddMinutes(basPushRuleD.interval);
// string cron = $"0 {executeTime.Minute} {executeTime.Hour} {executeTime.Day} {executeTime.Month} ? {executeTime.Year}";
string cron = $"0 {executeTime.Minute} {executeTime.Hour} {executeTime.Day} {executeTime.Month} ?";
var comtentModel = new ContentModel();
// comtentModel.cron = (2 * 60).ToString();
comtentModel.cron = cron;
comtentModel.interfaceId = "";
comtentModel.interfaceName = "";
comtentModel.parameter = new List<InterfaceParameter>();
comtentModel.localHostTaskId = "PushMsgTimeWorker/PushMsg";
comtentModel.startTime = DateTimeOffset.Now.ToUnixTimeMilliseconds();
// comtentModel.endTime = DateTimeOffset.Now.AddSeconds(3).ToUnixTimeMilliseconds().ToString();
comtentModel.TenantId = _userManager?.TenantId;
comtentModel.TenantDbName = _userManager?.TenantDbName;
comtentModel.ConnectionConfig = _userManager?.ConnectionConfig;
comtentModel.Token = _userManager?.ToKen;
// foreach (var item in sendModels)
// {
// }
//
TimeTaskCrInput timeTaskCrInput = new TimeTaskCrInput()
{
enCode = DateTime.Now.ToString("yyyyMMddHHmmss"),
fullName = "andon推送消息" + DateTime.Now.ToString("yyyyMMddHHmmss"),
executeType = "3",
executeContent = comtentModel.ToJsonString(),
description = JsonConvert.SerializeObject(sendModels[0].paramJson),
sortCode = 9999,
enabledMark = 1,
};
enCode = DateTime.Now.ToString("yyyyMMddHHmmss"),
fullName = "andon推送消息" + DateTime.Now.ToString("yyyyMMddHHmmss"),
executeType = "3",
executeContent = comtentModel.ToJsonString(),
description = JsonConvert.SerializeObject(sendModels[0].paramJson),
sortCode = 9999,
enabledMark = 1,
};
await _timeTaskService.Create(timeTaskCrInput,false);
await _timeTaskService.Create(timeTaskCrInput, false);
TimeTaskEntity timeTaskEntity = await _db.Queryable<TimeTaskEntity>().Where(x => x.EnCode == timeTaskCrInput.enCode).FirstAsync();
BasPushRuleLog basPushRuleLog = new BasPushRuleLog()
{
push_rule_id = andonInfo.push_rule_id,
timetask_id = timeTaskEntity?.Id,
biz_id = andonRecords.id,
ordinal = 1,
is_push = 1,
};
TimeTaskEntity timeTaskEntity = await _db.Queryable<TimeTaskEntity>().Where(x => x.EnCode == timeTaskCrInput.enCode).FirstAsync();
await _db.Insertable<BasPushRuleLog>(basPushRuleLog).ExecuteCommandAsync();
}
BasPushRuleLog basPushRuleLog = new BasPushRuleLog()
{
push_rule_id = andonInfo.push_rule_id,
timetask_id = timeTaskEntity?.Id,
biz_id = andonRecords.id,
ordinal = 1,
is_push = 1,
};
await _db.Insertable<BasPushRuleLog>(basPushRuleLog).ExecuteCommandAsync();
}
}
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
}
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
return result.IsSuccess ? "发起成功" : result.ErrorMessage;
}
[HttpPost]
public async Task<dynamic> ResponseAndon(Dictionary<string,string> dic)
public async Task<dynamic> ResponseAndon(Dictionary<string, string> dic)
{
string id = dic.ContainsKey("id") ? dic["id"] : "";
AndonRecords andonRecords = await _db.Queryable<AndonRecords>().SingleAsync(x => x.id == id);
@@ -216,13 +214,13 @@ namespace Tnb.ProductionMgr
{
if (andonRecords.status != DictConst.AndonStatusHJZ)
{
throw Oops.Bah($"状态错误");
throw Oops.Bah($"状态错误");
}
else
{
await _db.Updateable<AndonRecords>()
.SetColumns(x => x.repair_id == _userManager.UserId)
.SetColumns(x=>x.response_time==DateTime.Now)
.SetColumns(x => x.response_time == DateTime.Now)
.ExecuteCommandAsync();
Dictionary<string, string> postData = new Dictionary<string, string>()
{
@@ -231,13 +229,13 @@ namespace Tnb.ProductionMgr
await _basPushRuleLogService.Stop(postData);
return true;
}
}
}
else
{
throw Oops.Bah($"无该andon记录");
throw Oops.Bah($"无该andon记录");
}
}
@@ -250,21 +248,21 @@ namespace Tnb.ProductionMgr
{
if (andonRecords.status != DictConst.AndonStatusYXY)
{
throw Oops.Bah($"状态错误");
throw Oops.Bah($"状态错误");
}
else
{
await _db.Updateable<AndonRecords>()
.SetColumns(x=>x.start_repair_time==DateTime.Now)
.Where(x=>x.id==id)
.SetColumns(x => x.start_repair_time == DateTime.Now)
.Where(x => x.id == id)
.ExecuteCommandAsync();
return true;
}
}
else
{
throw Oops.Bah($"无该andon记录");
throw Oops.Bah($"无该andon记录");
}
}
@@ -277,24 +275,24 @@ namespace Tnb.ProductionMgr
{
if (andonRecords.status != DictConst.AndonStatusCLZ)
{
throw Oops.Bah($"状态错误");
throw Oops.Bah($"状态错误");
}
else
{
await _db.Updateable<AndonRecords>()
.SetColumns(x=>x.end_repair_time==DateTime.Now)
.Where(x=>x.id==id)
.SetColumns(x => x.end_repair_time == DateTime.Now)
.Where(x => x.id == id)
.ExecuteCommandAsync();
return true;
}
}
else
{
throw Oops.Bah($"无该andon记录");
throw Oops.Bah($"无该andon记录");
}
}
[HttpPost]
public async Task<dynamic> ConfirmAndon(Dictionary<string, string> dic)
{
@@ -304,21 +302,21 @@ namespace Tnb.ProductionMgr
{
if (andonRecords.status != DictConst.AndonStatusYWC)
{
throw Oops.Bah($"状态错误");
throw Oops.Bah($"状态错误");
}
else
{
await _db.Updateable<AndonRecords>()
.SetColumns(x=>x.confirm_time==DateTime.Now)
.Where(x=>x.id==id)
.SetColumns(x => x.confirm_time == DateTime.Now)
.Where(x => x.id == id)
.ExecuteCommandAsync();
return true;
}
}
else
{
throw Oops.Bah($"无该andon记录");
throw Oops.Bah($"无该andon记录");
}
}

View File

@@ -1,25 +1,11 @@
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Numerics;
using System.Reactive.Joins;
using System.Text;
using System.Threading.Tasks;
using Aop.Api.Domain;
using Aspose.Cells.Drawing;
using System.Dynamic;
using JNPF.Common.Core.Manager;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Message.Service;
using JNPF.Systems.Interfaces.System;
using JNPF.TaskScheduler;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SqlSugar;
using Tnb.BasicData.Entities;
using Tnb.EquipMgr.Interfaces;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.ProductionMgr.Entities.Entity;
@@ -33,7 +19,7 @@ namespace Tnb.ProductionMgr
{
private readonly ISqlSugarClient _db;
private readonly IUserManager _userManager;
public AndonService(ISqlSugarRepository<AndonRecords> repository,IUserManager userManager)
public AndonService(ISqlSugarRepository<AndonRecords> repository, IUserManager userManager)
{
_userManager = userManager;
_db = repository.AsSugarClient();
@@ -99,11 +85,11 @@ namespace Tnb.ProductionMgr
{
label = andonType.name,
value = andonType.id,
children = andonInfos.Where(x=>x.andon_type==andonType.id).Select(x=>new AndonCascaderOptionsOuput()
children = andonInfos.Where(x => x.andon_type == andonType.id).Select(x => new AndonCascaderOptionsOuput()
{
label = x.name,
value = x.id,
children = andonBreakDowns.Where(y=>x.breakdown_id.Contains(y.id)).Select(y=>new AndonCascaderOptionsOuput()
children = andonBreakDowns.Where(y => x.breakdown_id.Contains(y.id)).Select(y => new AndonCascaderOptionsOuput()
{
label = y.name,
value = y.id
@@ -119,8 +105,8 @@ namespace Tnb.ProductionMgr
defaultValue = breakdownIdArr[0];
}
result.Add("options",options);
result.Add("defaultValue",defaultValue);
result.Add("options", options);
result.Add("defaultValue", defaultValue);
return result;
}
}

Some files were not shown because too many files have changed in this diff Show More