33333
This commit is contained in:
@@ -51,6 +51,20 @@ namespace MyCode.Project.Domain.Message.Act.PurchaseOrder
|
|||||||
public string FSupplierLot { get; set; }
|
public string FSupplierLot { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class TiaoMaAct
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 明细主键ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 每包数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal CuseQty { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class PushReceiveAct
|
public class PushReceiveAct
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Domain.Message.Response.InvoiceOrder
|
||||||
|
{
|
||||||
|
public class TiaoMaResp
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 明细主键ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 对应的条码数组
|
||||||
|
/// </summary>
|
||||||
|
public List<string> BarCodeList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
139
MyCode.Project.Domain/Model/TiaoMa.cs
Normal file
139
MyCode.Project.Domain/Model/TiaoMa.cs
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Domain.Model
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("TiaoMa")]
|
||||||
|
public partial class TiaoMa
|
||||||
|
{
|
||||||
|
public TiaoMa(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey=true)]
|
||||||
|
public Guid Id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:金蝶的收料通知单ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? Fid {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:物料编码
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string MaterialCode {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:物料名称
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string MaterialName {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:规格型号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string SpecificationModel {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:发货数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? Qty {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:单价
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? UnitPrice {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:排序字段
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? SortNum {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:采购明细单主键ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public Guid? PurchaseOrderItemId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:采购明细单主键ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public Guid? InvoceOrderItemId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:条码
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string FBarCode {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:供应商批号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string FSupplierLot {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:美塞斯批号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string MSSSupplierLot {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:金蝶的采购明细主键ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? PurchaseEntityId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:发货日期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? DeliveryDate {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:金蝶的采购订单号,PO 号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string PurchaseBillNo {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:金蝶的收料订单号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string FBillNo {get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -141,6 +141,7 @@
|
|||||||
<Compile Include="Message\Response\EnterpriseWechat\UserIdChangeOpenIdResp.cs" />
|
<Compile Include="Message\Response\EnterpriseWechat\UserIdChangeOpenIdResp.cs" />
|
||||||
<Compile Include="Message\Response\EnterpriseWechat\WechatSysParameter.cs" />
|
<Compile Include="Message\Response\EnterpriseWechat\WechatSysParameter.cs" />
|
||||||
<Compile Include="Message\Response\InvoiceOrder\InvoiceOrderPageList.cs" />
|
<Compile Include="Message\Response\InvoiceOrder\InvoiceOrderPageList.cs" />
|
||||||
|
<Compile Include="Message\Response\InvoiceOrder\TiaoMaResp.cs" />
|
||||||
<Compile Include="Message\Response\PurchaseOrder\KingDeePurchaseOrderRespon.cs" />
|
<Compile Include="Message\Response\PurchaseOrder\KingDeePurchaseOrderRespon.cs" />
|
||||||
<Compile Include="Message\Response\PurchaseOrder\PurchaseOrderPageList.cs" />
|
<Compile Include="Message\Response\PurchaseOrder\PurchaseOrderPageList.cs" />
|
||||||
<Compile Include="Message\Response\User\AccountPageList.cs" />
|
<Compile Include="Message\Response\User\AccountPageList.cs" />
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
<Compile Include="Model\SysGlobalConfig.cs" />
|
<Compile Include="Model\SysGlobalConfig.cs" />
|
||||||
<Compile Include="Model\SysLogin.cs" />
|
<Compile Include="Model\SysLogin.cs" />
|
||||||
<Compile Include="Model\SysWorkProcessV2.cs" />
|
<Compile Include="Model\SysWorkProcessV2.cs" />
|
||||||
|
<Compile Include="Model\TiaoMa.cs" />
|
||||||
<Compile Include="Procs\ProcTemp2Official.cs" />
|
<Compile Include="Procs\ProcTemp2Official.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Repositories\IInvoiceOrderItemRepository.cs" />
|
<Compile Include="Repositories\IInvoiceOrderItemRepository.cs" />
|
||||||
@@ -165,6 +167,7 @@
|
|||||||
<Compile Include="Repositories\ISysGlobalConfigRepository.cs" />
|
<Compile Include="Repositories\ISysGlobalConfigRepository.cs" />
|
||||||
<Compile Include="Repositories\ISysLoginRepository.cs" />
|
<Compile Include="Repositories\ISysLoginRepository.cs" />
|
||||||
<Compile Include="Repositories\ISysWorkProcessV2Repository.cs" />
|
<Compile Include="Repositories\ISysWorkProcessV2Repository.cs" />
|
||||||
|
<Compile Include="Repositories\ITiaoMaRepository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
|||||||
18
MyCode.Project.Domain/Repositories/ITiaoMaRepository.cs
Normal file
18
MyCode.Project.Domain/Repositories/ITiaoMaRepository.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using MyCode.Project.Infrastructure;
|
||||||
|
using MyCode.Project.Domain;
|
||||||
|
using MyCode.Project.Domain.Model;
|
||||||
|
using MyCode.Project.Infrastructure.Common;
|
||||||
|
using MyCode.Project.Domain.Message;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Domain.Repositories
|
||||||
|
{
|
||||||
|
public interface ITiaoMaRepository : IRepository<TiaoMa>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -91,6 +91,7 @@
|
|||||||
<Compile Include="SysGlobalConfigRepository.cs" />
|
<Compile Include="SysGlobalConfigRepository.cs" />
|
||||||
<Compile Include="SysLoginRepository.cs" />
|
<Compile Include="SysLoginRepository.cs" />
|
||||||
<Compile Include="SysWorkProcessV2Repository.cs" />
|
<Compile Include="SysWorkProcessV2Repository.cs" />
|
||||||
|
<Compile Include="TiaoMaRepository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config">
|
<None Include="App.config">
|
||||||
|
|||||||
26
MyCode.Project.Repositories/TiaoMaRepository.cs
Normal file
26
MyCode.Project.Repositories/TiaoMaRepository.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using MyCode.Project.Repositories.Common;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using MyCode.Project.Domain.Message;
|
||||||
|
using MyCode.Project.Domain.Model;
|
||||||
|
using MyCode.Project.Domain.Repositories;
|
||||||
|
using MyCode.Project.Infrastructure.Common;
|
||||||
|
using MyCode.Project.Infrastructure.Search;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Repositories
|
||||||
|
{
|
||||||
|
public class TiaoMaRepository: Repository<TiaoMa>, ITiaoMaRepository
|
||||||
|
{
|
||||||
|
public TiaoMaRepository(MyCodeSqlSugarClient context) : base(context)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<!-- 若第三方系统登录授权已勾选“允许全部用户登录”,则无以上限制 -->
|
<!-- 若第三方系统登录授权已勾选“允许全部用户登录”,则无以上限制 -->
|
||||||
|
|
||||||
<add key="X-KDApi-UserName" value="ERP1" />
|
<add key="X-KDApi-UserName" value="lxb" />
|
||||||
|
|
||||||
<!-- 第三方系统登录授权的 应用ID -->
|
<!-- 第三方系统登录授权的 应用ID -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using MyCode.Project.Domain.Message.Common;
|
using MyCode.Project.Domain.Message.Act.PurchaseOrder;
|
||||||
|
using MyCode.Project.Domain.Message.Common;
|
||||||
using MyCode.Project.Domain.Message.Request.InvoiceOrder;
|
using MyCode.Project.Domain.Message.Request.InvoiceOrder;
|
||||||
using MyCode.Project.Domain.Message.Response.InvoiceOrder;
|
using MyCode.Project.Domain.Message.Response.InvoiceOrder;
|
||||||
using MyCode.Project.Domain.Message.Response.User;
|
using MyCode.Project.Domain.Message.Response.User;
|
||||||
@@ -35,5 +36,12 @@ namespace MyCode.Project.Services
|
|||||||
/// <param name="sheet"></param>
|
/// <param name="sheet"></param>
|
||||||
/// <exception cref="BaseException"></exception>
|
/// <exception cref="BaseException"></exception>
|
||||||
void SetMSSSupplierLot(string sheet);
|
void SetMSSSupplierLot(string sheet);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据每包数量得到全部包裹打印条码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="act"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
TiaoMaResp SetBaoShuTiaoMa(TiaoMaAct act);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,13 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
private IPurchaseOrderItemRepository _purchaseOrderItemRepository;
|
private IPurchaseOrderItemRepository _purchaseOrderItemRepository;
|
||||||
private IInvoiceOrderItemRepository _invoiceOrderItemRepository;
|
private IInvoiceOrderItemRepository _invoiceOrderItemRepository;
|
||||||
private IInvoiceOrderRepository _invoiceOrderRepository;
|
private IInvoiceOrderRepository _invoiceOrderRepository;
|
||||||
|
private ITiaoMaRepository _tiaoMaRepository;
|
||||||
|
|
||||||
|
|
||||||
public InvoiceOrderService(IPurchaseOrderRepository purchaseOrderRepository
|
public InvoiceOrderService(IPurchaseOrderRepository purchaseOrderRepository
|
||||||
, IPurchaseOrderItemRepository purchaseOrderItemRepository
|
, IPurchaseOrderItemRepository purchaseOrderItemRepository
|
||||||
, IInvoiceOrderItemRepository invoiceOrderItemRepository
|
, IInvoiceOrderItemRepository invoiceOrderItemRepository
|
||||||
, IInvoiceOrderRepository invoiceOrderRepository
|
, IInvoiceOrderRepository invoiceOrderRepository
|
||||||
|
, ITiaoMaRepository tiaoMaRepository
|
||||||
, IWorkProcessService workProcessService
|
, IWorkProcessService workProcessService
|
||||||
, IKingDeeService kingDeeService)
|
, IKingDeeService kingDeeService)
|
||||||
{
|
{
|
||||||
@@ -47,6 +48,7 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
_purchaseOrderRepository = purchaseOrderRepository;
|
_purchaseOrderRepository = purchaseOrderRepository;
|
||||||
_invoiceOrderItemRepository = invoiceOrderItemRepository;
|
_invoiceOrderItemRepository = invoiceOrderItemRepository;
|
||||||
_invoiceOrderRepository = invoiceOrderRepository;
|
_invoiceOrderRepository = invoiceOrderRepository;
|
||||||
|
_tiaoMaRepository = tiaoMaRepository;
|
||||||
_workProcessService = workProcessService;
|
_workProcessService = workProcessService;
|
||||||
_kingDeeService = kingDeeService;
|
_kingDeeService = kingDeeService;
|
||||||
}
|
}
|
||||||
@@ -201,21 +203,100 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
}
|
}
|
||||||
_invoiceOrderItemRepository.Update(oldOrderItemList);
|
_invoiceOrderItemRepository.Update(oldOrderItemList);
|
||||||
//物料编码,数量,收料通知单号,供应商批号,key
|
//物料编码,数量,收料通知单号,供应商批号,key
|
||||||
AddTiaoMa addTiao = new AddTiaoMa();
|
//AddTiaoMa addTiao = new AddTiaoMa();
|
||||||
List<AddTiaoMa> addTiaoMas = new List<AddTiaoMa>();
|
//List<AddTiaoMa> addTiaoMas = new List<AddTiaoMa>();
|
||||||
addTiaoMas = oldOrderItemList.Select(t => new AddTiaoMa
|
//addTiaoMas = oldOrderItemList.Select(t => new AddTiaoMa
|
||||||
{
|
//{
|
||||||
FBarCode = $@"{t.MaterialCode}*{t.Qty.Value.ToString("F2")}*{sheetOrder.FBillNo}*{t.FSupplierLot}",
|
// FBarCode = $@"{t.MaterialCode}*{t.Qty.Value.ToString("F2")}*{sheetOrder.FBillNo}*{t.FSupplierLot}",
|
||||||
FBarCodeRule = "03",
|
// FBarCodeRule = "03",
|
||||||
FBillCode = sheetOrder.FBillNo,
|
// FBillCode = sheetOrder.FBillNo,
|
||||||
FSupplierLot = t.FSupplierLot == null ? "" : t.FSupplierLot,
|
// FSupplierLot = t.FSupplierLot == null ? "" : t.FSupplierLot,
|
||||||
FMaterialId = t.MaterialCode,
|
// FMaterialId = t.MaterialCode,
|
||||||
FLot=t.MSSSupplierLot,
|
// FLot=t.MSSSupplierLot,
|
||||||
FQty = t.Qty.Value.ToString()
|
// FQty = t.Qty.Value.ToString()
|
||||||
}).ToList();
|
//}).ToList();
|
||||||
_workProcessService.Add<IKingDeeService>(this.MerchantId, "AddTiaoMa", "生成条码档案", JsonHelper.ToJson(addTiaoMas), 5);
|
//_workProcessService.Add<IKingDeeService>(this.MerchantId, "AddTiaoMa", "生成条码档案", JsonHelper.ToJson(addTiaoMas), 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region SetBaoShuTiaoMa(根据每包数量得到全部包裹打印条码)
|
||||||
|
/// <summary>
|
||||||
|
/// 根据每包数量得到全部包裹打印条码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="act"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="BaseException"></exception>
|
||||||
|
[TransactionCallHandler]
|
||||||
|
public TiaoMaResp SetBaoShuTiaoMa(TiaoMaAct act)
|
||||||
|
{
|
||||||
|
if (act.CuseQty <= 0)
|
||||||
|
{
|
||||||
|
throw new BaseException("每包数量必须大于0");
|
||||||
|
}
|
||||||
|
_tiaoMaRepository.Delete(t => t.InvoceOrderItemId == act.Id);
|
||||||
|
var orderItem = _invoiceOrderItemRepository.Queryable().Where(t => t.Id == act.Id).First();
|
||||||
|
if (orderItem == null)
|
||||||
|
{
|
||||||
|
throw new BaseException("不正确的ID值");
|
||||||
|
}
|
||||||
|
var order = _invoiceOrderRepository.Queryable().Where(t => t.Id == orderItem.InvoiceOrderId).First();
|
||||||
|
|
||||||
|
decimal zongQty = orderItem.Qty.SafeValue();
|
||||||
|
int yu =(int) Math.Ceiling( zongQty % act.CuseQty);
|
||||||
|
int baoShu = 0;
|
||||||
|
baoShu = (int)(zongQty / act.CuseQty);
|
||||||
|
List<TiaoMa> addList = new List<TiaoMa>();
|
||||||
|
// 条码 :物料编码,数量,收料通知单号,供应商批号,key
|
||||||
|
for (int i = 0; i < baoShu; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
string FBarCode = $@"{orderItem.MaterialCode}*{act.CuseQty.ToString("F2")}*{orderItem.FBillNo}*{orderItem.FSupplierLot}";
|
||||||
|
TiaoMa tiaoMa = new TiaoMa();
|
||||||
|
tiaoMa = AutoMapperHelper.AutoMappToSingle<TiaoMa, InvoiceOrderItem>(orderItem);
|
||||||
|
tiaoMa.Id = Guid.NewGuid();
|
||||||
|
tiaoMa.FBarCode = FBarCode;
|
||||||
|
tiaoMa.Qty = act.CuseQty;
|
||||||
|
tiaoMa.SortNum = i+1;
|
||||||
|
tiaoMa.PurchaseBillNo = orderItem.FBillNo;
|
||||||
|
tiaoMa.FBillNo = order.FBillNo;
|
||||||
|
addList.Add(tiaoMa);
|
||||||
|
}
|
||||||
|
if (yu > 0)
|
||||||
|
{
|
||||||
|
string FBarCode = $@"{orderItem.MaterialCode}*{decimal.Parse(yu.ToString()).ToString("F2")}*{orderItem.FBillNo}*{orderItem.FSupplierLot}";
|
||||||
|
TiaoMa tiaoMa = new TiaoMa();
|
||||||
|
tiaoMa = AutoMapperHelper.AutoMappToSingle<TiaoMa, InvoiceOrderItem>(orderItem);
|
||||||
|
tiaoMa.Id = Guid.NewGuid();
|
||||||
|
tiaoMa.FBarCode = FBarCode;
|
||||||
|
tiaoMa.Qty = yu;
|
||||||
|
tiaoMa.SortNum = baoShu+1;
|
||||||
|
tiaoMa.PurchaseBillNo = orderItem.FBillNo;
|
||||||
|
tiaoMa.FBillNo = order.FBillNo;
|
||||||
|
addList.Add(tiaoMa);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tiaoMaRepository.Add(addList);
|
||||||
|
|
||||||
|
List<AddTiaoMa> addTiaoMas = new List<AddTiaoMa>();
|
||||||
|
addTiaoMas = addList.Select(t => new AddTiaoMa
|
||||||
|
{
|
||||||
|
FBarCode =t.FBarCode,
|
||||||
|
FBarCodeRule = "03",
|
||||||
|
FBillCode = t.FBillNo,
|
||||||
|
FSupplierLot = t.FSupplierLot == null ? "" : t.FSupplierLot,
|
||||||
|
FMaterialId = t.MaterialCode,
|
||||||
|
FLot = t.MSSSupplierLot,
|
||||||
|
FQty = t.Qty.Value.ToString()
|
||||||
|
}).ToList();
|
||||||
|
_workProcessService.Add<IKingDeeService>(this.MerchantId, "AddTiaoMa", "生成条码档案", JsonHelper.ToJson(addTiaoMas), 5);
|
||||||
|
|
||||||
|
TiaoMaResp result = new TiaoMaResp();
|
||||||
|
result.Id = orderItem.Id;
|
||||||
|
result.BarCodeList = addList.Select(t => t.FBarCode).ToList();
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
,FSupplierLot,FLot,FBaseDeliveryMaxQty,FBaseJoinQty
|
,FSupplierLot,FLot,FBaseDeliveryMaxQty,FBaseJoinQty
|
||||||
,FEntryNote,FBillAllAmount_LC,FMaterialId.FNAME,FQty,FEntryNote,FUnitId.fname,FDeliveryDate,FMaterialId.FSpecification,FPurchaserId.fname,FSupplierId.FNumber,FMaterialId.FNumber
|
,FEntryNote,FBillAllAmount_LC,FMaterialId.FNAME,FQty,FEntryNote,FUnitId.fname,FDeliveryDate,FMaterialId.FSpecification,FPurchaserId.fname,FSupplierId.FNumber,FMaterialId.FNumber
|
||||||
,FSettleCurrId.fname,FBillTaxAmount,FExchangeTypeId.fname,FExchangeRate,FEntryTaxRate,FPrice,FAllAmount,FEntryAmount,FEntryTaxAmount,FReceiveQty,FMRPCloseStatus
|
,FSettleCurrId.fname,FBillTaxAmount,FExchangeTypeId.fname,FExchangeRate,FEntryTaxRate,FPrice,FAllAmount,FEntryAmount,FEntryTaxAmount,FReceiveQty,FMRPCloseStatus
|
||||||
,FPurchaseOrgId,FPurchaseOrgId.FName
|
,FPurchaseOrgId,FPurchaseOrgId.FName,FPOORDERENTRY_D.FDeliveryDate
|
||||||
,FCancelStatus,FRemainReceiveQty",
|
,FCancelStatus,FRemainReceiveQty",
|
||||||
//FieldKeys ="",
|
//FieldKeys ="",
|
||||||
TopRowCount = 100000,
|
TopRowCount = 100000,
|
||||||
@@ -468,7 +468,7 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
userList.ForEach(t =>
|
userList.ForEach(t =>
|
||||||
{
|
{
|
||||||
var maxDate = _purchaseOrderRepository.Queryable().Where(h => h.SupplierId == t.SupplierId).Max(h => h.FModifyDate);
|
var maxDate = _purchaseOrderRepository.Queryable().Where(h => h.SupplierId == t.SupplierId).Max(h => h.FModifyDate);
|
||||||
DateTime begin = DateTime.Parse("2023-01-01");
|
DateTime begin = DateTime.Parse("2024-01-01");
|
||||||
if (maxDate.HasValue)
|
if (maxDate.HasValue)
|
||||||
{
|
{
|
||||||
begin = maxDate.Value.Date;
|
begin = maxDate.Value.Date;
|
||||||
@@ -583,14 +583,14 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
purchaseOrderItem.Remark = item["FEntryNote"];
|
purchaseOrderItem.Remark = item["FEntryNote"];
|
||||||
purchaseOrderItem.SupplierId = t.SupplierId;
|
purchaseOrderItem.SupplierId = t.SupplierId;
|
||||||
purchaseOrderItem.UnitName = item["FUnitId.fname"];
|
purchaseOrderItem.UnitName = item["FUnitId.fname"];
|
||||||
purchaseOrderItem.FDeliveryDate = item["FDeliveryDate"];
|
purchaseOrderItem.FDeliveryDate = item["FPOORDERENTRY_D.FDeliveryDate"];
|
||||||
purchaseOrderItem.TaxRate = item["FEntryTaxRate"];
|
purchaseOrderItem.TaxRate = item["FEntryTaxRate"];
|
||||||
purchaseOrderItem.FBillTaxAmount = item["FEntryTaxAmount"];
|
purchaseOrderItem.FBillTaxAmount = item["FEntryTaxAmount"];
|
||||||
purchaseOrderItem.FRemainReceiveQty = item["FBaseDeliveryMaxQty"];
|
purchaseOrderItem.FRemainReceiveQty = item["FBaseDeliveryMaxQty"];
|
||||||
purchaseOrderItem.FReceiveQty = item["FBaseJoinQty"];
|
purchaseOrderItem.FReceiveQty = item["FBaseJoinQty"];
|
||||||
purchaseOrderItem.FRemainReceiveQty = purchaseOrderItem.Qty - purchaseOrderItem.FReceiveQty.SafeValue();
|
purchaseOrderItem.FRemainReceiveQty = purchaseOrderItem.Qty - purchaseOrderItem.FReceiveQty.SafeValue();
|
||||||
purchaseOrderItem.FMRPCloseStatus = item["FMRPCloseStatus"];
|
purchaseOrderItem.FMRPCloseStatus = item["FMRPCloseStatus"];
|
||||||
purchaseOrderItem.EntityId = item["FPOOrderEntry.FEntryId"];
|
purchaseOrderItem.EntityId = item["FPOOrderEntry_FEntryId"];
|
||||||
purchaseOrderItem.MSSSupplierLot = item["FLot"];
|
purchaseOrderItem.MSSSupplierLot = item["FLot"];
|
||||||
purchaseOrderItem.SpecificationModel = item["FMaterialId.FSpecification"];
|
purchaseOrderItem.SpecificationModel = item["FMaterialId.FSpecification"];
|
||||||
_purchaseOrderItemRepository.Add(purchaseOrderItem);
|
_purchaseOrderItemRepository.Add(purchaseOrderItem);
|
||||||
@@ -607,7 +607,7 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
oldItem.Remark = item["FEntryNote"];
|
oldItem.Remark = item["FEntryNote"];
|
||||||
oldItem.SupplierId = t.SupplierId;
|
oldItem.SupplierId = t.SupplierId;
|
||||||
oldItem.UnitName = item["FUnitId.fname"];
|
oldItem.UnitName = item["FUnitId.fname"];
|
||||||
oldItem.FDeliveryDate = item["FDeliveryDate"];
|
oldItem.FDeliveryDate = item["FPOORDERENTRY_D.FDeliveryDate"];
|
||||||
oldItem.TaxRate = item["FEntryTaxRate"];
|
oldItem.TaxRate = item["FEntryTaxRate"];
|
||||||
oldItem.FBillTaxAmount = item["FEntryTaxAmount"];
|
oldItem.FBillTaxAmount = item["FEntryTaxAmount"];
|
||||||
oldItem.FReceiveQty = item["FBaseJoinQty"];
|
oldItem.FReceiveQty = item["FBaseJoinQty"];
|
||||||
@@ -616,10 +616,8 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
//oldItem.FRemainReceiveQty = item["FBaseDeliveryMaxQty"];
|
//oldItem.FRemainReceiveQty = item["FBaseDeliveryMaxQty"];
|
||||||
//purchaseOrderItem.FReceiveQty = item["FBaseDeliveryMaxQty"];
|
//purchaseOrderItem.FReceiveQty = item["FBaseDeliveryMaxQty"];
|
||||||
oldItem.FReceiveQty = oldItem.Qty - oldItem.FRemainReceiveQty.SafeValue();
|
oldItem.FReceiveQty = oldItem.Qty - oldItem.FRemainReceiveQty.SafeValue();
|
||||||
|
|
||||||
|
|
||||||
oldItem.FMRPCloseStatus = item["FMRPCloseStatus"];
|
oldItem.FMRPCloseStatus = item["FMRPCloseStatus"];
|
||||||
oldItem.EntityId = item["FPOOrderEntry.FEntryId"];
|
oldItem.EntityId = item["FPOOrderEntry_FEntryId"];
|
||||||
oldItem.MSSSupplierLot = item["FLot"];
|
oldItem.MSSSupplierLot = item["FLot"];
|
||||||
_purchaseOrderItemRepository.Update(oldItem);
|
_purchaseOrderItemRepository.Update(oldItem);
|
||||||
}
|
}
|
||||||
@@ -641,8 +639,9 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
// end = DateTime.Now.AddDays(-1);
|
// end = DateTime.Now.AddDays(-1);
|
||||||
// begin = end;
|
// begin = end;
|
||||||
//}
|
//}
|
||||||
|
Thread.Sleep(500);
|
||||||
}
|
}
|
||||||
Thread.Sleep(500);
|
|
||||||
keyValuePairs.Keys.ForEach(key =>
|
keyValuePairs.Keys.ForEach(key =>
|
||||||
{
|
{
|
||||||
List<int> templist = keyValuePairs[key];
|
List<int> templist = keyValuePairs[key];
|
||||||
@@ -695,24 +694,7 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// {
|
|
||||||
//"EntryIds": "100016,100017",
|
|
||||||
//"TargetFormId": "PUR_ReceiveBill",
|
|
||||||
//"IsEnableDefaultRule": "true",
|
|
||||||
//"CustomParams": {
|
|
||||||
// "AutoAudit":"true",
|
|
||||||
// "ScanEntry": [
|
|
||||||
// {
|
|
||||||
// "FENTRYID": 100016,
|
|
||||||
// "Qty": 15
|
|
||||||
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// "FENTRYID": 100017,
|
|
||||||
// "Qty": 15
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,22 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="act"></param>
|
/// <param name="act"></param>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public void DeleteOrder(IdAct act )
|
public void DeleteOrder(IdAct act)
|
||||||
{
|
{
|
||||||
_invoiceOrderService.DeleteOrder(act,this.CurrentLogin);
|
_invoiceOrderService.DeleteOrder(act, this.CurrentLogin);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region SetBaoShuTiaoMa(根据每包数量得到全部包裹打印条码)
|
||||||
|
/// <summary>
|
||||||
|
/// 根据每包数量得到全部包裹打印条码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="act"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public TiaoMaResp SetBaoShuTiaoMa(TiaoMaAct act)
|
||||||
|
{
|
||||||
|
return _invoiceOrderService.SetBaoShuTiaoMa(act);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user