丽知:调拨订单新增期初价格查询

This commit is contained in:
zhengyf 2025-02-09 12:36:50 +08:00
parent ecc9207aa0
commit 898c1c16cc
1 changed files with 11 additions and 4 deletions

View File

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