add-生成大条码时完善计划明细字段

dev
liuwf 2 months ago
parent 5fcc166047
commit 6346490cad

@ -72,12 +72,12 @@ namespace SlnMesnac.Business
_mesProductOrderService = serviceProvider.GetRequiredService<IMesProductOrderService>(); _mesProductOrderService = serviceProvider.GetRequiredService<IMesProductOrderService>();
_baseMaterialInfoService = serviceProvider.GetRequiredService<IBaseMaterialInfoService>(); _baseMaterialInfoService = serviceProvider.GetRequiredService<IBaseMaterialInfoService>();
Init(); Init();
} }
private void test() private void test()
{ {
// MesProductPlanDetail? mesProductPlanDetail = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<MesProductPlanDetail>().First(x => x.PlanCode == "20240724144533JL001");
string epc = "A123456"; string epc = "A123456";
_mesProductPlanService.GetStartedProdPlan(out MesProductPlanDto productPlanDto); _mesProductPlanService.GetStartedProdPlan(out MesProductPlanDto productPlanDto);
string bigCode = GenerateBigBarcode(productPlanDto, epc); string bigCode = GenerateBigBarcode(productPlanDto, epc);
@ -316,6 +316,11 @@ namespace SlnMesnac.Business
mesBaseBarcodeInfo.productionDate = DateTime.Now; mesBaseBarcodeInfo.productionDate = DateTime.Now;
mesBaseBarcodeInfo.acceptedDate = DateTime.Now; mesBaseBarcodeInfo.acceptedDate = DateTime.Now;
mesBaseBarcodeInfo.planCode = productPlanDto.PlanCode; mesBaseBarcodeInfo.planCode = productPlanDto.PlanCode;
MesProductPlanDetail? mesProductPlanDetail = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<MesProductPlanDetail>().First(x=>x.PlanCode== productPlanDto.PlanCode);
if(mesProductPlanDetail != null)
{
mesBaseBarcodeInfo.planDetailCode = mesProductPlanDetail.PlanDetailCode;
}
mesBaseBarcodeInfo.safeFlag = productPlanDto.SaleOrderId == 0 ? "1" : "0"; mesBaseBarcodeInfo.safeFlag = productPlanDto.SaleOrderId == 0 ? "1" : "0";
mesBaseBarcodeInfo.saleOrderId = productPlanDto.SaleOrderId; mesBaseBarcodeInfo.saleOrderId = productPlanDto.SaleOrderId;
mesBaseBarcodeInfo.saleorderCode = productPlanDto.SaleorderCode; mesBaseBarcodeInfo.saleorderCode = productPlanDto.SaleorderCode;

@ -0,0 +1,140 @@
using SlnMesnac.Model.enums;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2024 WenJY
* CLR4.0.30319.42000
* LAPTOP-E0N2L34V
* SlnMesnac.Model.domain
* 15806f20-59dd-494f-90ed-add2b6f0a0a1
*
* WenJY
* wenjy@mesnac.com
* 2024-04-07 16:55:41
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.Model.domain
{
/// <summary>
/// 生产计划明细;车间生产派工
/// </summary>
[SugarTable("mes_product_plan_detail")]
public class MesProductPlanDetail
{
/// <summary>
/// 主键标识
/// </summary>
[SugarColumn(ColumnName = "plan_detail_id", IsPrimaryKey = true, IsIdentity = true)]
public long PlanDetailId { get; set; }
/// <summary>
/// 明细编号
/// </summary>
[SugarColumn(ColumnName = "plan_detail_code")]
public string PlanDetailCode { get; set; }
/// <summary>
/// 生产计划ID
/// </summary>
[SugarColumn(ColumnName = "plan_id")]
public long PlanId { get; set; }
/// <summary>
/// 计划编号, 关联mes_product_plan_info的plan_code
/// </summary>
[SugarColumn(ColumnName = "plan_code")]
public string PlanCode { get; set; }
/// <summary>
/// 操作人员ID关联sys_user的user_id
/// </summary>
[SugarColumn(ColumnName = "user_id")]
public long? UserId { get; set; }
/// <summary>
/// 操作人员名称关联sys_user的user_name
/// </summary>
[SugarColumn(ColumnName = "user_name")]
public string UserName { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[SugarColumn(ColumnName = "real_begin_time")]
public DateTime? RealBeginTime { get; set; }
/// <summary>
/// 完成时间
/// </summary>
[SugarColumn(ColumnName = "real_end_time")]
public DateTime? RealEndTime { get; set; }
/// <summary>
/// 文件ID关联附件信息主键
/// </summary>
[SugarColumn(ColumnName = "attach_id")]
public int? AttachId { get; set; }
/// <summary>
/// 明细状态1-未开始2-已开始3-已完成9-异常完成
/// </summary>
[SugarColumn(ColumnName = "plan_detail_status")]
public string PlanDetailStatus { get; set; }
/// <summary>
/// 是否标识1-是0-否
/// </summary>
[SugarColumn(ColumnName = "is_flag")]
public string IsFlag { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(ColumnName = "remark")]
public string Remark { get; set; }
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnName = "create_by")]
public string CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "create_time")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
[SugarColumn(ColumnName = "update_by")]
public string UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(ColumnName = "update_time")]
public DateTime? UpdateTime { get; set; }
/// <summary>
/// 物料条码
/// </summary>
[SugarColumn(ColumnName = "material_barcode")]
public string MaterialBarcode { get; set; }
}
}
Loading…
Cancel
Save