|
|
|
@ -10,6 +10,7 @@ using DS.WMS.Core.Fee.Interface;
|
|
|
|
|
using DS.WMS.Core.Flow.Dtos;
|
|
|
|
|
using DS.WMS.Core.Flow.Entity;
|
|
|
|
|
using DS.WMS.Core.Flow.Interface;
|
|
|
|
|
using DS.WMS.Core.Info.Entity;
|
|
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
|
using LanguageExt;
|
|
|
|
@ -870,6 +871,37 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
return rows > 0 ? DataResult.Successed("设置成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("设置失败!", MultiLanguageConst.Operation_Failed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置费用对象
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="customerId">费用对象ID</param>
|
|
|
|
|
/// <param name="customerType">客户类别</param>
|
|
|
|
|
/// <param name="idArray">费用记录ID</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public DataResult SetCustomer(long customerId, string customerType, params long[] idArray)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var model = tenantDb.Queryable<InfoClient>().Where(x => x.Id == customerId).Select(x => new
|
|
|
|
|
{
|
|
|
|
|
Id = customerId,
|
|
|
|
|
x.CodeName,
|
|
|
|
|
x.Name
|
|
|
|
|
}).First();
|
|
|
|
|
if (model == null)
|
|
|
|
|
return DataResult.Failed("未能找到费用对象信息,设置失败!", MultiLanguageConst.Operation_Failed);
|
|
|
|
|
|
|
|
|
|
var list = idArray.Select(x => new FeeRecord
|
|
|
|
|
{
|
|
|
|
|
Id = x,
|
|
|
|
|
CustomerId = customerId,
|
|
|
|
|
CustomerCode = model.CodeName,
|
|
|
|
|
CustomerName = model.Name,
|
|
|
|
|
CustomerType = customerType
|
|
|
|
|
}).ToList();
|
|
|
|
|
int rows = tenantDb.Updateable(list).UpdateColumns(x => new { x.CustomerId, x.CustomerCode, x.CustomerName, x.CustomerType }).ExecuteCommand();
|
|
|
|
|
return rows > 0 ? DataResult.Successed("设置成功!", MultiLanguageConst.DataUpdateSuccess) : DataResult.Failed("设置失败!", MultiLanguageConst.Operation_Failed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取费用核算单打印信息
|
|
|
|
|
/// </summary>
|
|
|
|
|