丽知:调拨订单新增期初价格查询
This commit is contained in:
parent
ecc9207aa0
commit
898c1c16cc
|
@ -373,7 +373,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
|
||||
//nprice 单价(含税单价),取上一次结账的单价 nmny金额 nnotaxmny无税金额 nnotaxprice 无税单价
|
||||
//202411091719:妮妮姐说:优先取结存价,没有的话取采购价,如果都没有就报错!!!
|
||||
String nabprice = queryIaMonthledger(ofsDetail, ofsTranseferOrder.getHeader().getCompanyCode());
|
||||
String nabprice = queryIaMonthledger(ofsDetail, ofsTranseferOrder.getHeader().getCompanyCode(), ofsTranseferOrder.getHeader().getFacilityCode());
|
||||
if (nabprice == null) {
|
||||
Assert.state(false, "公司:{},货品:{},SKU编码:{},无结存价、起初价、采购价,请维护!", ofsTranseferOrder.getHeader().getCompanyCode(), ofsDetail.getSkuName(), ofsDetail.getSkuCode());
|
||||
} else {
|
||||
|
@ -393,7 +393,8 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
billVO.setChildrenvo(childrenvo);
|
||||
String jsonStr = JSONUtil.toJsonStr(billVO);
|
||||
mapStr = "{\"billvo\":" + jsonStr + "}";
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("approveqzCode"), mapStr);
|
||||
// ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("approveqzCode"), mapStr);
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(null, mapStr);
|
||||
//两层判断,一层中台转发,一层u8c返回
|
||||
if ("false".equals(ztResult.getFlag())) {
|
||||
//转发失败
|
||||
|
@ -589,7 +590,7 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
* 202502071359:妮妮姐电话:取值顺序 结存->期初->采购
|
||||
* eg:1月 如果结存价取结存价,如果没有取期初,如果没有再去最后一次采购
|
||||
*/
|
||||
public String queryIaMonthledger(OFSTranseferOrderSearchResponse.OFSTranseferOrder.OFSTranseferB sku, String companyCode) throws Exception {
|
||||
public String queryIaMonthledger(OFSTranseferOrderSearchResponse.OFSTranseferOrder.OFSTranseferB sku, String companyCode, String facilityCode) throws Exception {
|
||||
String totalPayAmount = null;
|
||||
//查询公司
|
||||
BdCorpEntity bdCorpEntity = queryU8CEntityUtil.queryBdCorpByUnitCode(companyCode);
|
||||
|
@ -608,6 +609,11 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
if (bdInvmandocEntity == null) {
|
||||
Assert.state(false, "根据U8C存货基本档案主键:{},U8C公司主键:{},查询U8C存货管理档案不存在。请检查U8C档案", bdInvbasdocEntity.getPkInvbasdoc(), bdCorpEntity.getPkCorp());
|
||||
}
|
||||
//查询仓库
|
||||
BdStordocEntity bdStordocEntity = queryU8CEntityUtil.queryBdStordocByCode(facilityCode);
|
||||
if (bdStordocEntity == null) {
|
||||
Assert.state(false, "根据OFS仓库编码:{},查询U8C仓库不存在。请检查U8C档案", facilityCode);
|
||||
}
|
||||
|
||||
//结存价(月份)
|
||||
IaMonthledgerEntity iaMonthledgerEntity = new IaMonthledgerEntity();
|
||||
|
@ -627,9 +633,10 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
|
||||
//取期初价格,需要总价nabmny/数量nabnum,保留四位小数
|
||||
//取期初价格,需要总价nabmny/数量nabnum,保留四位小数 因为存在多个仓库
|
||||
IaPeriodaccountEntity iaPeriodaccountEntity = new IaPeriodaccountEntity();
|
||||
iaPeriodaccountEntity.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());
|
||||
iaPeriodaccountEntity.setCwarehouseid(bdStordocEntity.getPkStordoc());
|
||||
iaPeriodaccountEntity.setCaccountmonth("00");
|
||||
iaPeriodaccountEntity.setDr("0");
|
||||
iaPeriodaccountEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
|
|
Loading…
Reference in New Issue