入库确认费用

master
ZR20090193-陈敬勇 2 years ago
parent f2a33a90e5
commit 3110e299b0

@ -12,8 +12,15 @@ enum Api {
accountWmsInDo = '/WmsInDo/AccountWmsInDo',
delWmsInDo = '/WmsInDo/DelWmsInDo',
getFeeRateList = '/WmsInDo/GetWmsInDoFeeRateList',
}
export function getFeeRateList(query: { id: string }) {
return request<DataResult>({
url: Api.getFeeRateList,
method: 'get',
params: query,
})
}
export function delWmsInDo(query: { id: string }) {
return request<DataResult>({
url: Api.delWmsInDo,

@ -25,9 +25,19 @@
/>
</template>
</BasicForm>
<Divider>入库确认明细</Divider>
<!-- <WmsInDoGoods ref="tableRef" :dataList="dataSource" :areaList="areaList" @change="setValue" />-->
<vxe-grid ref="xGrid" v-bind="gridOptions" />
<!-- <Divider>入库确认明细</Divider>-->
<!-- &lt;!&ndash; <WmsInDoGoods ref="tableRef" :dataList="dataSource" :areaList="areaList" @change="setValue" />&ndash;&gt;-->
<!-- <vxe-grid ref="xGrid" v-bind="gridOptions" />-->
<CollapseContainer title="其他信息">
<Tabs v-model:activeKey="activeKey">
<TabPane key="detailTab" tab="入库确认明细">
<vxe-grid ref="xGrid" v-bind="gridOptions" />
</TabPane>
<TabPane key="feeTab" tab="费率信息">
<vxe-grid ref="feeGrid" v-bind="feeOptions" />
</TabPane>
</Tabs>
</CollapseContainer>
<!--右下角按钮-->
<template #footer>
<a-button
@ -106,9 +116,11 @@
accountWmsInDo,
cancelAuditWmsInDo,
getWmsInDoGoodslist,
getFeeRateList,
} from '/@/api/wms/wmsindo'
import { TabPane, Tabs } from 'ant-design-vue'
import { CollapseContainer } from '/@/components/Container'
import { getStoreHouseAreaList } from '/@/api/common'
import { Divider } from 'ant-design-vue'
import { VxeGridProps } from 'vxe-table'
import { getWmsOutDoGoodslist } from '/@/api/wms/wmsoutdo'
// Emits
@ -118,7 +130,9 @@
const rowId = ref('')
const attrs = useAttrs()
const dataSource = ref<any[]>([])
const feeSource = ref<any[]>([])
const areaList = ref<any[]>([])
const activeKey = ref('detailTab')
const [
registerForm,
{ setProps, resetFields, setFieldsValue, validate, updateSchema, getFieldsValue },
@ -282,6 +296,101 @@
toolbarConfig: {},
data: dataSource,
})
const feeOptions = reactive<VxeGridProps>({
border: true,
height: 500,
align: null,
columnConfig: {
resizable: true,
},
columns: [
{
title: '序号',
type: 'seq',
fixed: 'left',
width: 50,
align: 'center',
},
{
title: 'id',
field: 'id',
visible: false,
},
{
title: 'feerateid',
field: 'feerateid',
visible: false,
},
{
title: 'feetype',
field: 'feetype',
visible: false,
},
{
title: '费用类型',
field: 'feemaketype',
width: 100,
fixed: 'left',
},
{
title: '费用名称',
field: 'feename',
width: 100,
},
{
title: '计费单位',
field: 'defaultunit',
width: 100,
},
{
title: '计费大类',
field: 'goodsfeetype',
width: 100,
},
{
title: '计费单价',
field: 'feeprice',
width: 100,
},
{
title: '收付方向',
field: 'feetypename',
width: 100,
},
{
title: '计费等级',
field: 'feegrade',
width: 100,
},
{
title: '计费区间',
field: 'feescale',
width: 100,
},
{
title: '增值价',
field: 'addprice',
width: 100,
},
{
title: '封顶价',
field: 'endprice',
width: 100,
},
{
title: '结算账期',
field: 'inputmode',
width: 100,
},
{
title: '备注',
field: 'remark',
},
],
toolbarConfig: {},
data: feeSource,
})
async function loadListData() {
// const { summaryFunc, summaryData } = props;
const res: API.DataResult = await getWmsInDoGoodslist({ id: unref(rowId) })
@ -292,6 +401,14 @@
dataSource.value = []
}
console.log(dataSource.value)
const fee: API.DataResult = await getFeeRateList({ id: unref(rowId) })
console.log(fee)
if (fee.succeeded) {
feeSource.value = fee.data
} else {
feeSource.value = []
}
}
async function loadAreaListData(code: string) {

@ -232,7 +232,7 @@ public class AppStockInService : IAppStockInService
foreach (var item in infee)
{
var dofee = item.Adapt<OP_WMS_FEERATE_DO_DETAIL>();
item.PID = doId;
dofee.PID = doId;
db.Insertable(dofee).ExecuteCommand();
}

@ -0,0 +1,503 @@
using SqlSugar;
namespace DS.WMS.Core.FeeModule.Entity;
[SugarTable("ch_fee")]
public class Fee
{
[SugarColumn(IsPrimaryKey = true)]
public string GID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string BSNO { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public int? FEETYPE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string FEENAME { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string FEEDESCRIPTION { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string CUSTOMERTYPE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string CUSTOMERNAME { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string UNIT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? UNITPRICE { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? QUANTITY { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? AMOUNT { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string CURRENCY { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? EXCHANGERATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string REASON { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string REMARK { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? COMMISSIONRATE { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? SETTLEMENT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? INVOICE { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? ORDERAMOUNT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public decimal? ORDERINVOICE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public DateTime? SUBMITDATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string AUDITOPERATOR { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public DateTime? AUDITDATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string ENTEROPERATOR { get; set; }
/// <summary>
/// Desc:
/// Default:DateTime.Now
/// Nullable:True
/// </summary>
public DateTime? ENTERDATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string DEBITNO { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISDEBIT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISOPEN { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISADVANCEDPAY { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public int? SORT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISINVOICE { get; set; }
/// <summary>
/// Desc:
/// Default:1
/// Nullable:True
/// </summary>
public int? FEESTATUS { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string FEEFRT { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISCRMORDERFEE { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public int? AUDITSTATUS { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string INVOICENUM { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string CHEQUENUM { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string WMSOUTBSNO { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public int? LINENUM { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? TAXRATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? NOTAXAMOUNT { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? ACCTAXRATE { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISVOU { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string VOUCHERNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string ACCDATE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string BXGID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? TAX { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string F_NO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? ORDERSETTLEMENT { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? TAXUNITPRICE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? ORDERINVSETTLEMENT { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string MODIFIEDUSER { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public DateTime? MODIFIEDTIME { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string VOUALLNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string SALESNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string CARGO_GID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string JKGID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public decimal? PREAMOUNT { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string INPUTMODE { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string DELIVERYNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string LOCALCURR { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string MANAGER { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string MBSNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public bool? ISACC { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string PaymentGID { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string STATEMENTNO { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public string SALECORP { get; set; }
/// <summary>
/// Desc:
/// Default:
/// Nullable:True
/// </summary>
public bool? CUSTDUI { get; set; }
/// <summary>
/// Desc:
/// Default:0
/// Nullable:True
/// </summary>
public bool? ISDJY { get; set; }
public void setTax(ref Fee ch_fee) {
var taxrateb = 1 + ch_fee.TAXRATE / 100;
ch_fee.NOTAXAMOUNT = ch_fee.AMOUNT / taxrateb;
ch_fee.TAX = ch_fee.AMOUNT - ch_fee.NOTAXAMOUNT;
if (ch_fee.QUANTITY > 0)
{
ch_fee.UNITPRICE = ch_fee.NOTAXAMOUNT / ch_fee.QUANTITY;
ch_fee.TAXUNITPRICE = ch_fee.AMOUNT / ch_fee.QUANTITY;
}
else
{
ch_fee.UNITPRICE = ch_fee.NOTAXAMOUNT;
ch_fee.TAXUNITPRICE = ch_fee.AMOUNT;
}
}
}

@ -0,0 +1,35 @@
using DS.Module.Core;
using DS.WMS.Core.FeeModule.Entity;
using DS.WMS.Core.WmsModule.Entity;
namespace DS.WMS.Core.FeeModule.Interface;
public interface IWmsFeeComonService
{
/// <summary>
/// 初始化库存费率
/// </summary>
/// <param name="wmsId"></param>
/// <param name="doFees"></param>
/// <param name="feeTypeGid"></param>
/// <returns></returns>
public DataResult<List<OP_WMS_FEERATE_STORE_DETAIL>> InitOpWmsStoreRate (Guid wmsId,List<OP_WMS_FEERATE_DO_DETAIL> doFees, Guid? feeTypeGid);
/// <summary>
/// 获取费用记录表
/// </summary>
/// <param name="inDo"></param>
/// <param name="wms"></param>
/// <returns></returns>
public DataResult<OP_WMS_FEEPAYINFO> InitOpWmsPayInfo (OP_WMS_IN_DO inDo, OP_WMS wms);
/// <summary>
/// 入库现结费用
/// </summary>
/// <param name="doFees"></param>
/// <param name="details"></param>
/// <param name="inDo"></param>
/// <returns></returns>
public DataResult<List<Fee>> InitOpWmsFee(List<OP_WMS_FEERATE_DO_DETAIL> doFees,
List<OP_WMS_IN_DO_GOODS> details, OP_WMS_IN_DO inDo, List<CodeFee> codeFees);
}

@ -0,0 +1,158 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.UserModule;
using DS.WMS.Core.FeeModule.Entity;
using DS.WMS.Core.FeeModule.Interface;
using DS.WMS.Core.WmsModule.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
namespace DS.WMS.Core.FeeModule.Method;
/// <summary>
/// 费用公共方法
/// </summary>
public class WmsFeeComonService:IWmsFeeComonService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="serviceProvider"></param>
public WmsFeeComonService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
}
public DataResult<List<OP_WMS_FEERATE_STORE_DETAIL>> InitOpWmsStoreRate(Guid wmsId, List<OP_WMS_FEERATE_DO_DETAIL> doFees, Guid? feeTypeGid)
{
var res = new List<OP_WMS_FEERATE_STORE_DETAIL>();
if (feeTypeGid.IsNull())
{
feeTypeGid = doFees.Where(x => x.GoodsFeeTypeGID.IsNotNull()).First().GoodsFeeTypeGID;
}
foreach (var item in doFees)
{
if (item.GOODSFEETYPE.IsNullOrEmpty() || item.GoodsFeeTypeGID == feeTypeGid)
{
var newfeerate = item.Adapt<OP_WMS_FEERATE_STORE_DETAIL>();
newfeerate.PID = wmsId;
res.Add(newfeerate);
}
}
return DataResult<List<OP_WMS_FEERATE_STORE_DETAIL>>.Success(res);
}
public DataResult<OP_WMS_FEEPAYINFO> InitOpWmsPayInfo(OP_WMS_IN_DO inDo, OP_WMS wms)
{
var res = new OP_WMS_FEEPAYINFO();
// res.GID = Guid.NewGuid();
res.WMSID = wms.WMSID;
res.WMSBASEID = wms.WMSBASEID==null?Guid.Empty: (Guid)wms.WMSBASEID;
res.FEESTARTDATE = (DateTime)wms.FEESTARTDATE;
res.ARCLIENTWMSOUT = wms.ARCLIENTWMSOUT;
res.ARCLIENTWMSIN = wms.ARCLIENTWMSOUT;
res.ARCLIENTWMS_OUTDO = wms.ARCLIENTWMSOUT;
res.APCLIENTWMSOUT = inDo.APCLIENTWMSOUT;
res.APCLIENTWMSIN = inDo.APCLIENTWMSOUT;
res.APCLIENTWMS_OUTDO = inDo.APCLIENTWMSOUT;
res.STORAGEUNITCOUNT = wms.STORAGEUNITCOUNT;
res.FEERATEWMSID = wms.WMSID;
res.SOURCEDOID = wms.WMSID;
return DataResult<OP_WMS_FEEPAYINFO>.Success(res);
}
public DataResult<List<Fee>> InitOpWmsFee(List<OP_WMS_FEERATE_DO_DETAIL> doFees, List<OP_WMS_IN_DO_GOODS> details, OP_WMS_IN_DO inDo,List<CodeFee> codeFees)
{
var res = new List<Fee>();
foreach (var item in doFees)
{
if (item.FEEMAKETYPE=="入库现结")
{
decimal num = 0.0m;
if (item.DEFAULTUNIT == "计费单位")
{
foreach (var detail in details)
{
num += (decimal)(detail.STORAGEUNITCOUNT);
}
};
if (item.DEFAULTUNIT == "单票") num = 1;
if (item.DEFAULTUNIT == "单柜")
{
//遍历入库执行明细 看看有几个箱号
var cntrnolist = new List<string>();
foreach (var detail in details)
{
if (!cntrnolist.Exists(x => x == detail.CNTRNO))
{
cntrnolist.Add(detail.CNTRNO);
}
}
num = cntrnolist.Count();
};
decimal amount = num * item.FEEPRICE.ToDecimal();
if (amount != 0)
{
if (res.Count == 0 || !res.Any(e => e.FEENAME == item.FEENAME))
{
var codefee = codeFees.First(x => x.NAME == item.FEENAME);
//给列表增加一条费用
var newfee = new Fee()
{
GID = Guid.NewGuid().ToString(),
SETTLEMENT = 0,
ORDERAMOUNT = 0,
ORDERINVOICE = 0,
ORDERINVSETTLEMENT = 0,
INVOICE = 0,
CURRENCY = "RMB",
EXCHANGERATE = 1,
ENTERDATE = DateTime.Now,
ENTEROPERATOR = user.GetUserGID(),
FEESTATUS = 1,
TAXRATE = 0,
ISADVANCEDPAY = false,
ISINVOICE = false,
ISCRMORDERFEE = false,
INPUTMODE = "月结",
};
newfee.BSNO = inDo.WMSDOID.ToString().ToUpper();
//newfee.SetCreateDefaultVal();
//newfee.FEENAME = 入库计划费率.FEENAME;
newfee.UNITPRICE = item.FEEPRICE;
newfee.QUANTITY = num;
newfee.AMOUNT = amount;
newfee.CUSTOMERNAME = inDo.CUSTOMERNAME;
newfee.FEETYPE = item.FEETYPE;
newfee.setTax(ref newfee);
res.Add(newfee);
}
else
{
var fee = res.First(e => e.FEENAME == item.FEENAME);
var index = res.IndexOf(fee);
fee.QUANTITY = fee.QUANTITY + num;
fee.AMOUNT = fee.AMOUNT + amount;
fee.setTax(ref fee);
res[index] = fee;
}
}
}
}
return DataResult<List<Fee>>.Success(res);
}
}

@ -57,4 +57,10 @@ public interface IWmsInDoService
/// <param name="id"></param>
/// <returns></returns>
DataResult DelWmsInDo(string id);
/// <summary>
/// 获取入库确认费率
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public DataResult GetWmsInDoFeeRateList(string id);
}

@ -2,7 +2,9 @@ using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.UserModule;
using DS.WMS.Common.Enum;
using DS.WMS.Core.App.Entity;
using DS.WMS.Core.BaseInfo.Entity;
using DS.WMS.Core.FeeModule.Entity;
using DS.WMS.Core.FeeModule.Interface;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.WmsModule.Dtos;
@ -11,6 +13,8 @@ using DS.WMS.Core.WmsModule.Interface;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using OP_WMS_STOREHOUSE = DS.WMS.Core.App.Entity.OP_WMS_STOREHOUSE;
using OP_WMS_STOREHOUSE_AREA = DS.WMS.Core.App.Entity.OP_WMS_STOREHOUSE_AREA;
namespace DS.WMS.Core.WmsModule.Method;
@ -21,7 +25,7 @@ public class WmsInDoService:IWmsInDoService
private readonly IUser user;
private readonly IWmsCommonService _wmsCommonService;
private readonly IWmsFeeComonService _wmsFeeCommonService;
/// <summary>
///
/// </summary>
@ -32,6 +36,7 @@ public class WmsInDoService:IWmsInDoService
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
_wmsCommonService = _serviceProvider.GetRequiredService<IWmsCommonService>();
_wmsFeeCommonService = _serviceProvider.GetRequiredService<IWmsFeeComonService>();
}
public DataResult<List<WmsInDoListPageModel>> GetListByPage(PageRequest request)
{
@ -314,7 +319,11 @@ public class WmsInDoService:IWmsInDoService
{
return DataResult.Failed("执行明细不能为空!");
}
var feerateIndo = db.Queryable<OP_WMS_FEERATE_DO_DETAIL>().Where(x => x.PID == gid).ToList();
if (feerateIndo.Count() == 0)
{
return DataResult.Failed("请先维护入库确认费率!!!");
}
try
{
//开启事务
@ -322,10 +331,12 @@ public class WmsInDoService:IWmsInDoService
Guid? WMSPLANID = Guid.Empty;
WMSPLANID = detail.First().WMSPLANID;
//费率明细
var feeList = db.Queryable<OP_WMS_FEERATE_DO_DETAIL>().Where(x => x.PID == gid).ToList();
foreach (var item in detail)
{
var plandetail = db.Queryable<OP_WMS_IN_PLAN_GOODS>().First(x => x.GID == item.WMSPLANDETAILID);
var good = db.Queryable<code_goods>().First(x => x.GID == item.GoodsId);
if (plandetail != null)
{
// var doPkgs = db.Queryable<OP_WMS_IN_DO_GOODS>().Where(x => x.WMSPLANDETAILID == item.WMSPLANDETAILID)
@ -354,9 +365,33 @@ public class WmsInDoService:IWmsInDoService
var wmsPhysicsChange = _wmsCommonService.InitOpWmsPhysicsChange(wms.WMSID,wmsPhysics.WMSPHYSICSID,wmsInDo.DODATE,item).Data;
db.Insertable(wmsPhysicsChange).ExecuteCommand();
#endregion
#region 费率相关
//库存费率
var storefees = _wmsFeeCommonService.InitOpWmsStoreRate(wms.WMSID,feeList,good.GoodsFeeTypeGID).Data;
db.Insertable(storefees).ExecuteCommand();
//费用记录表
var payinfo = _wmsFeeCommonService.InitOpWmsPayInfo(wmsInDo,wms).Data;
db.Insertable(payinfo).ExecuteCommand();
#endregion
}
#region 处理现结费用
var codefee = db.Queryable<CodeFee>().Where(x=>feerateIndo.Select(a=>a.FEENAME).Contains(x.NAME)).ToList();
var fee = _wmsFeeCommonService.InitOpWmsFee(feerateIndo,detail,wmsInDo,codefee).Data;
if (fee.Count > 0)
{
foreach (var item in fee)
{
item.FEESTATUS = 0;
db.Insertable(item).ExecuteCommand();
}
}
#endregion
#region 处理计划结束标识
if (WMSPLANID.IsNotNull())
{
@ -373,10 +408,7 @@ public class WmsInDoService:IWmsInDoService
wmsInDo.BILLSTATUS = "1003";
db.Updateable(wmsInDo).ExecuteCommand();
db.Ado.CommitTran();
return DataResult.Successed("执行成功!");
}
@ -386,4 +418,16 @@ public class WmsInDoService:IWmsInDoService
return DataResult.Failed("执行失败!" + ex);
}
}
public DataResult GetWmsInDoFeeRateList(string id)
{
var data = db.Queryable<OP_WMS_FEERATE_DO_DETAIL>().Where(a => a.PID == Guid.Parse(id))
.Select(x => new WmsInFeeRateDetailListModel()
{
FEETYPENAME = x.FEETYPE == 1 ? "应收" : "应付",
},
true)
.ToList();
return DataResult.Successed("查询成功!", data);
}
}

@ -1114,6 +1114,13 @@
<param name="id"></param>
<returns></returns>
</member>
<member name="M:DS.WMS.WebApi.Controllers.WmsInDoController.GetWmsInDoFeeRateList(System.String)">
<summary>
获取入库确认费率
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="T:DS.WMS.WebApi.Controllers.WmsInPlanController">
<summary>
预约入库

@ -119,4 +119,16 @@ public class WmsInDoController : ApiController
var res = _invokeService.AccountWmsInDo(id);
return res;
}
/// <summary>
/// 获取入库确认费率
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetWmsInDoFeeRateList")]
public DataResult GetWmsInDoFeeRateList([FromQuery]string id)
{
var res = _invokeService.GetWmsInDoFeeRateList(id);
return res;
}
}

@ -6667,3 +6667,60 @@
2023-04-25 14:52:59.4157 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 14:52:59.4532 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 14:52:59.4618 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 16:09:59.4954 Info Shutdown() called. Logger closing...
2023-04-25 16:09:59.4954 Info Closing old configuration.
2023-04-25 16:09:59.5378 Info Logger has been closed down.
2023-04-25 16:10:46.9673 Info Message Template Auto Format enabled
2023-04-25 16:10:46.9871 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 16:10:47.1816 Info Adding target FileTarget(Name=allfile)
2023-04-25 16:10:47.1816 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 16:10:47.2343 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 16:10:47.3805 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 16:10:47.4130 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 17:53:54.1086 Info Shutdown() called. Logger closing...
2023-04-25 17:53:54.1086 Info Closing old configuration.
2023-04-25 17:53:54.1799 Info Logger has been closed down.
2023-04-25 17:54:34.8060 Info Message Template Auto Format enabled
2023-04-25 17:54:34.8233 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 17:54:34.9767 Info Adding target FileTarget(Name=allfile)
2023-04-25 17:54:34.9767 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 17:54:35.0018 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 17:54:35.0633 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 17:54:35.0808 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 18:00:21.6185 Info Shutdown() called. Logger closing...
2023-04-25 18:00:21.6185 Info Closing old configuration.
2023-04-25 18:00:21.6449 Info Logger has been closed down.
2023-04-25 18:00:54.7254 Info Message Template Auto Format enabled
2023-04-25 18:00:54.7533 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 18:00:54.8701 Info Adding target FileTarget(Name=allfile)
2023-04-25 18:00:54.8814 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 18:00:54.8974 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 18:00:54.9417 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 18:00:54.9545 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 18:04:54.2417 Info Message Template Auto Format enabled
2023-04-25 18:04:54.2575 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 18:04:54.3193 Info Adding target FileTarget(Name=allfile)
2023-04-25 18:04:54.3193 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 18:04:54.3371 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 18:04:54.3691 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 18:04:54.3691 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 18:08:23.0262 Info Message Template Auto Format enabled
2023-04-25 18:08:23.0396 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 18:08:23.1371 Info Adding target FileTarget(Name=allfile)
2023-04-25 18:08:23.1371 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 18:08:23.1613 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 18:08:23.2233 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 18:08:23.2388 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 18:09:02.1704 Info Shutdown() called. Logger closing...
2023-04-25 18:09:02.1704 Info Closing old configuration.
2023-04-25 18:09:02.2069 Info Logger has been closed down.
2023-04-25 18:09:37.8031 Info Message Template Auto Format enabled
2023-04-25 18:09:37.8466 Info Loading assembly: NLog.Web.AspNetCore
2023-04-25 18:09:38.1715 Info Adding target FileTarget(Name=allfile)
2023-04-25 18:09:38.1836 Info Adding target FileTarget(Name=ownFile-web)
2023-04-25 18:09:38.2339 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-25 18:09:38.3748 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-25 18:09:38.4019 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-25 18:13:20.0997 Info Shutdown() called. Logger closing...
2023-04-25 18:13:20.0997 Info Closing old configuration.
2023-04-25 18:13:20.1486 Info Logger has been closed down.

Loading…
Cancel
Save