20230529_出库计划针对app增加字段;导入初始化库存时增加按照仓库分开入库计划和入库执行

temp
ddlucky 2 years ago
parent b1e28ec2f5
commit 0fdbd4d2e9

@ -250,5 +250,13 @@ namespace VOL.Entity.DomainModels
[Column(TypeName = "varchar(150)")]
public string CORPNAME { get; set; }
/// <summary>
///币别
/// </summary>
[Display(Name = "币别")]
[MaxLength(20)]
[Column(TypeName = "varchar(20)")]
public string CURRENCY { get; set; }
}
}

@ -441,6 +441,13 @@ namespace VOL.Entity.DomainModels
[Column(TypeName = "uniqueidentifier")]
public Guid? SALE { get; set; }
[Display(Name = "库管")]
[Column(TypeName = "varchar(50)")]
public string OPNAME { get; set; }
[Display(Name = "客户账期")]
[Column(TypeName = "varchar(50)")]
public string ACCTYPE { get; set; }
public decimal? NETWEIGHT_TON { get { return NETWEIGHT == null ? null : NETWEIGHT / 1000; } }
public decimal? KGS_TON { get { return KGS == null ? null : KGS / 1000; } }

@ -276,7 +276,7 @@ namespace VOL.WMS.Services
public override WebResponseContent Import(List<IFormFile> files)
{
DownLoadTemplateColumns = x => new { x.CUSTOMERNAME,x.GOODSOWNER,x.GOODSNAME,x.MBLNO,x.CNTRNO,x.CUSTOMNO,x.PKGS,x.KGS,x.CBM,x.NETWEIGHT,x.STORAGEUNIT,x.STORAGEUNITCOUNT,x.RULEUNIT,x.RULEUNITCOUNT,x.INDATE,x.OPNAME,x.ACCBOOKNO,x.STORAGENAME,x.AREANAME,x.GOODSMODEL,x.GOODSHSCODE,x.COUNTRY,x.RULEAMOUNT,x.REMARK,x.KINDPKGS,x.PALLET,x.SALENAME, x.CORPNAME };
DownLoadTemplateColumns = x => new { x.CUSTOMERNAME,x.GOODSOWNER,x.GOODSNAME,x.MBLNO,x.CNTRNO,x.CUSTOMNO,x.PKGS,x.KGS,x.CBM,x.NETWEIGHT,x.STORAGEUNIT,x.STORAGEUNITCOUNT,x.RULEUNIT,x.RULEUNITCOUNT,x.INDATE,x.OPNAME,x.ACCBOOKNO,x.STORAGENAME,x.AREANAME,x.GOODSMODEL,x.GOODSHSCODE,x.COUNTRY,x.RULEAMOUNT,x.REMARK,x.KINDPKGS,x.PALLET,x.SALENAME, x.CORPNAME,x.CURRENCY };
var WmsImportList = base.GetListByExcel(files,out WebResponseContent _webResponseContent);
@ -366,6 +366,7 @@ namespace VOL.WMS.Services
//每个提单号的每个入库日期 都只生成一条入库信息
//20230529 增加一个限制 每个提单号的每个入库日期的 每个仓库的入库计划
foreach (var head in headList)
{
@ -406,14 +407,14 @@ namespace VOL.WMS.Services
var oldindoGoodsList = VW_OP_WMS_IN_DO_GOODSRepository.Instance.FindAsIQueryable(x => oldindoList.Contains((Guid)x.WMSDOID)).ToList();
if (oldindoGoodsList.Exists(x => x.CNTRNO == goods.CNTRNO && x.MBLNO == .MBLNO))
//20230529 增加一个限制 每个提单号的每个入库日期的 每个仓库的入库计划
if (oldindoGoodsList.Exists(x => x.CNTRNO == goods.CNTRNO && x.MBLNO == .MBLNO && x.STOREHOUSE == .STOREHOUSE))
{
continue;
}
var = get(goods, List, List);
var = get(goods, List, List, CORPID);
var = get(, goods);
List.Add();
@ -428,7 +429,7 @@ namespace VOL.WMS.Services
//根据入库执行生成一条入库计划和入库计划明细
var = get(goods, List, List, List);
var = get(goods, List, List, List,CORPID);
List.Add();
var base = AutoMapperHelper.MapTo<OP_WMS, OP_WMS_BASE>();
@ -436,6 +437,7 @@ namespace VOL.WMS.Services
base.RULEAMOUNT = goods.RULEAMOUNT;
base.KINDPKGS = goods.KINDPKGS;
base.PALLET= goods.PALLET;
base.CORPID = CORPID;
BaseList.Add(base);
var = get(, );
@ -581,7 +583,7 @@ namespace VOL.WMS.Services
return result;
}
private OP_WMS_IN_PLAN get( VW_OP_WMS_IMPORT detail, List<OP_WMS_STOREHOUSE> List, List<Sys_DictionaryList> userlist)
private OP_WMS_IN_PLAN get( VW_OP_WMS_IMPORT detail, List<OP_WMS_STOREHOUSE> List, List<Sys_DictionaryList> userlist,string CORPID)
{
var result = new OP_WMS_IN_PLAN();
@ -594,7 +596,7 @@ namespace VOL.WMS.Services
result.ACCDATE = detail.INDATE;
result.CUSTOMERNAME = detail.CUSTOMERNAME;
result.GOODSOWNER = detail.CUSTOMERNAME;
result.GOODSOWNER = detail.GOODSOWNER;
result.ARCLIENTWMSOUT = detail.CUSTOMERNAME;
if (string.IsNullOrWhiteSpace(detail.ACCBOOKNO))
@ -628,6 +630,17 @@ namespace VOL.WMS.Services
result.SALE = getuserid(detail.SALENAME, userlist);
result.CORPID = CORPID;
result.CURRENCY = detail.CURRENCY;
if (!string.IsNullOrWhiteSpace(detail.ACCBOOKNO))
{
result.BILLTYPE = "1";
}
else
{
result.BILLTYPE = "0";
}
result.KINDPKGS=detail.KINDPKGS;
return result;
}
@ -676,7 +689,7 @@ namespace VOL.WMS.Services
return result;
}
private OP_WMS get(VW_OP_WMS_IMPORT detail, List<OP_WMS_STOREHOUSE> List, List<OP_WMS_STOREHOUSE_AREA> List, List<Sys_DictionaryList> userlist) {
private OP_WMS get(VW_OP_WMS_IMPORT detail, List<OP_WMS_STOREHOUSE> List, List<OP_WMS_STOREHOUSE_AREA> List, List<Sys_DictionaryList> userlist,string CORPID) {
OP_WMS WMS = new OP_WMS();
var billno = base.GetBillNo("库存信息");
@ -684,14 +697,18 @@ namespace VOL.WMS.Services
WMS.WMSID = Guid.NewGuid();
WMS.WMSBASEID = WMS.WMSID;
WMS.BSNO = billno;
WMS.CORPID = UserContext.Current.UserInfo.CompanyId;
//WMS.CORPID = UserContext.Current.UserInfo.CompanyId;
WMS.CORPID = CORPID;
WMS.CUSTOMERNAME = detail.CUSTOMERNAME;
WMS.GOODSOWNER = detail.GOODSOWNER;
WMS.GOODSNAME = detail.GOODSNAME;
WMS.KGS = detail.KGS;
WMS.CBM = detail.CBM;
WMS.PKGS = detail.PKGS;
//WMS.KINDPKGS = detail.KINDPKGS;
WMS.KINDPKGS = detail.KINDPKGS;
WMS.STORAGEUNIT = detail.STORAGEUNIT;
WMS.STORAGEUNITCOUNT = detail.STORAGEUNITCOUNT;
WMS.RULEUNIT = detail.RULEUNIT;

@ -1005,7 +1005,7 @@ namespace VOL.WMS.Services
WMS.ACCBOOKNO = .First(x => x.AREACODE == InDoGoods.AREACODE.Substring(0, 4)).ACCBOOKNO;
WMS.BILLTYPE = .BILLTYPE;
WMS.BILLTYPE = inplan.BILLTYPE;
WMS.GOODSOWNER = .GOODSOWNER;
var = List.FirstOrDefault(x => x.GID == InDoGoods.WMSPLANDETAILID);

@ -577,7 +577,22 @@ namespace VOL.WMS.Services
head.NETWEIGHT = DetailList.Sum(x => x.NETWEIGHT);
head.STORAGEUNITCOUNT = DetailList.Sum(x => x.STORAGEUNITCOUNT);
head.RULEUNITCOUNT = DetailList.Sum(x => x.RULEUNITCOUNT);
head.CTNNUM = DetailList.Count();
if (DetailList.Exists(x => x.OLD_CNTRNO != null && x.OLD_CNTRNO.Trim() != "")) {
var cntrlist = new List<string>();
head.CTNNUM = 0;
foreach (var item in DetailList) {
if (!cntrlist.Exists(x => x == item.OLD_CNTRNO)) {
head.CTNNUM++;
cntrlist.Add(item.OLD_CNTRNO);
}
}
}
//OP_WMS_IN_DORepository.Instance.Update(head, true);
}

@ -2687,7 +2687,7 @@ namespace VOL.WMS.Services
/// <param name="执行明细list"></param>
private WebResponseContent DealClearWmsList(List<VW_OP_WMS_OUT_DO_GOODS> _list, ref List<Vw_Op_Wms> list, ref List<Vw_Op_Wms_Physics> list, bool DetailDODATE = false)
{
var _wmsidList = list.Select(s => s.WMSID).ToList();
var list = _list.Where(x => x.CLEARWMS == true).ToList();
@ -2762,7 +2762,7 @@ namespace VOL.WMS.Services
var List = Vw_Op_WmsRepository.Instance.FindAsIQueryable(x => x.CORPID == item.CORPID && x.MBLNO == item.MBLNO && x.CUSTOMERNAME == item.CUSTOMERNAME && x.GOODSOWNER == item.GOODSOWNER && !_list.Select(s => s.WMSID).Contains(x.WMSID)).ToList();
var List = Vw_Op_WmsRepository.Instance.FindAsIQueryable(x => x.CORPID == item.CORPID && x.MBLNO == item.MBLNO && x.CUSTOMERNAME == item.CUSTOMERNAME && x.GOODSOWNER == item.GOODSOWNER && !_wmsidList.Contains(x.WMSID)).ToList();
var List = Vw_Op_Wms_PhysicsRepository.Instance.FindAsIQueryable(x => List.Select(s => s.WMSID).ToList().Contains((Guid)x.WMSID)).ToList();

Loading…
Cancel
Save