Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
e408a90049
|
@ -7,7 +7,7 @@ public class ProfilesActiveConstant {
|
|||
|
||||
public static final String LETS_DATE_SOURCE = "lets_u8c";
|
||||
|
||||
public static final String LETS_PROFILES_ACTIVE = "dev";
|
||||
public static final String LETS_PROFILES_ACTIVE = "prod";
|
||||
|
||||
public static final String LOG_STATUS_Y = "Y";
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
//存货基础档案
|
||||
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), bdCorpEntity.getPkCorp());
|
||||
//存货对应的BOM
|
||||
List<BdBomEntity> bomVersion = getBomVersion(bdCalbodyEntity.getPkCalbody(), bdInvbasdocEntity.getPkInvbasdoc());
|
||||
List<BdBomEntity> bomVersion = getBomVersion(bdCalbodyEntity.getPkCalbody(), bdInvbasdocEntity.getPkInvbasdoc(), bdInvbasdocEntity.getInvcode());
|
||||
|
||||
//计算含税单价
|
||||
BigDecimal noriginalcurprice = null;
|
||||
|
@ -571,9 +571,9 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
bdCubasdocEntity.setDef1(shipFromCode);
|
||||
List<BdCubasdocEntity> bdCubasdocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
|
||||
if (bdCubasdocEntityList == null || bdCubasdocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据OFS供应商业务编码{},无法查询到U8C客商档案信息(供应商)", shipFromCode);
|
||||
Assert.state(false, "根据OFS供应商业务编码{}(客商自定义项1记录O客商业务编码),无法查询到U8C客商档案信息(供应商)", shipFromCode);
|
||||
} else if (bdCubasdocEntityList.size() >= 2) {
|
||||
Assert.state(false, "根据OFS供应商业务编码{},查询到多个U8C客商档案信息(供应商)", shipFromCode);
|
||||
Assert.state(false, "根据OFS供应商业务编码{}(客商自定义项1记录O客商业务编码),查询到多个U8C客商档案信息(供应商)", shipFromCode);
|
||||
}
|
||||
|
||||
//客商管理档案
|
||||
|
@ -939,7 +939,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
* @param gcbm 工厂主键
|
||||
* @param wlbmid 物料编码id,经过测试,这是存货基本档案主键
|
||||
*/
|
||||
private List<BdBomEntity> getBomVersion(String gcbm, String wlbmid) throws Exception {
|
||||
private List<BdBomEntity> getBomVersion(String gcbm, String wlbmid, String vbillCode) throws Exception {
|
||||
Assert.notNull(gcbm, "gcbm工厂主键");
|
||||
Assert.notNull(wlbmid, "wlbmid物料编码id不能为空");
|
||||
|
||||
|
@ -951,7 +951,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
//2024年9月2日 15:08:30 等待妮姐确认,如果对应的存货没有BOM,是否抛出异常
|
||||
//2024年9月2日 15:14:18 已经和妮姐确认,如果存货对应的BOM不存在,则抛出异常
|
||||
if (bdBomEntityList == null || bdBomEntityList.size() == 0) {
|
||||
Assert.state(false, "存货:{} 工厂(库存足足):{}对应的BOM不存在(该存货需要维护BOM)!");
|
||||
Assert.state(false, "存货:{}对应的BOM不存在(该存货需要维护BOM)!", vbillCode);
|
||||
}
|
||||
return bdBomEntityList;
|
||||
}
|
||||
|
|
|
@ -783,8 +783,8 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
//查询收支项目
|
||||
BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
// BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
// BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
|
||||
SaleorderRequestChildrenDto saleorderRequestChildrenDto = new SaleorderRequestChildrenDto();
|
||||
saleorderRequestChildrenDto.setBlargessflag(isblargessflag);//是否赠品
|
||||
|
@ -815,8 +815,8 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
// saleorderRequestChildrenDto.setVdef19(header.getCode());//原单单号
|
||||
saleorderRequestChildrenDto.setVdef20(detailsDto.getId());//原单明细主键
|
||||
|
||||
saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
// saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
// saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
saleorderRequestChildrenDtoList.add(saleorderRequestChildrenDto);
|
||||
}
|
||||
//记录成功
|
||||
|
|
|
@ -259,10 +259,10 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
// queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
|
@ -816,8 +816,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
BdTaxitemsEntity bdTaxitemsEntity1 = sonDetailsDto.getBdTaxitemsEntity();
|
||||
|
||||
//查询收支项目
|
||||
BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
// BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
// BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
|
||||
String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString();
|
||||
BigDecimal noriginalcurprice = null;//无税单价
|
||||
|
@ -868,8 +868,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
saleorderRequestChildrenDto.setNtaxrate(new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString());//税率
|
||||
// saleorderRequestChildrenDto.setCreccalbodyid(bdCalbodyEntity1.getPkCalbody());//收货库存组织:2024年8月7日 16:21:48 和佳妮、道品一起测试,收货库存组织、收货仓库 是不需要传递的
|
||||
// saleorderRequestChildrenDto.setCrecwareid(bdStordocEntity1.getPkStordoc());//收货仓库
|
||||
saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
// saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
// saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
saleorderRequestChildrenDtoList.add(saleorderRequestChildrenDto);
|
||||
|
||||
//销售订单单据推送到u8c
|
||||
|
|
|
@ -1743,8 +1743,8 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
//查找来源销售订单明细行
|
||||
SoSaleorderBEntity sourceDocumentsV2 = findSourceDocumentsV2(header, stockinB, soSaleorderBEntityList, extIntegrationTaskLivingDetailsQueryVos);
|
||||
//查询收支项目
|
||||
BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
// BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
// BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
|
||||
BigDecimal noriginalcurtaxprice = null;//含税单价
|
||||
try {
|
||||
|
@ -1773,8 +1773,8 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
salesInvoiceBodyDto.setCupsourcebillbodyid(sourceDocuments.getCgeneralbid());//上层来源明细行主键
|
||||
salesInvoiceBodyDto.setCupsourcebillcode(icGeneralHEntity.getVbillcode());//直接来源单据号
|
||||
salesInvoiceBodyDto.setCupsourcebillid(icGeneralHEntity.getCgeneralhid());//来源主表主键
|
||||
salesInvoiceBodyDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
salesInvoiceBodyDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
// salesInvoiceBodyDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
// salesInvoiceBodyDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
salesInvoiceBodyDtoList.add(salesInvoiceBodyDto);
|
||||
}
|
||||
SalesInvoiceDto salesInvoiceDto = new SalesInvoiceDto();
|
||||
|
|
|
@ -842,8 +842,8 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
//根据存货基础档案编码,查询当前存货的税率
|
||||
BdTaxitemsEntity bdTaxitemsEntity1 = oldValue.get(0).getBdTaxitemsEntity();
|
||||
//查询收支项目
|
||||
BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
// BdInvclEntity bdInvclEntity = queryU8CEntityUtil.queryBdInvbasdocByBdInvcl(bdInvbasdocEntity);
|
||||
// BdCostsubjEntity bdCostsubjEntity = queryU8CEntityUtil.queryBdCostsubj(bdInvclEntity);
|
||||
|
||||
String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString();
|
||||
BigDecimal noriginalcurprice = null;//无税单价
|
||||
|
@ -890,8 +890,8 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
saleorderRequestChildrenDto.setNoriginalcurtaxnetprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税净价
|
||||
saleorderRequestChildrenDto.setNoriginalcurtaxprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税单价
|
||||
saleorderRequestChildrenDto.setNtaxrate(new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString());//税率
|
||||
saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
// saleorderRequestChildrenDto.setVdef2(bdCostsubjEntity.getCostname());//收支项目
|
||||
// saleorderRequestChildrenDto.setPk_defdoc2(bdCostsubjEntity.getPkCostsubj());
|
||||
saleorderRequestChildrenDtoList.add(saleorderRequestChildrenDto);
|
||||
|
||||
//销售订单单据推送到u8c
|
||||
|
|
|
@ -36,7 +36,7 @@ public class SaveOrUpdateBusinessLogUtil {
|
|||
*
|
||||
* @param integrationTaskLivingDetailsEntity 提交参数
|
||||
*/
|
||||
public void saveOrUpdate(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
|
||||
public synchronized void saveOrUpdate(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
|
||||
Assert.notNull(integrationTaskLivingDetailsEntity, "integrationTaskLivingDetailsEntity不能为空");
|
||||
Assert.notNull(integrationTaskLivingDetailsEntity.getRootAppPk(), "源系统单号不能为空");
|
||||
Assert.notNull(integrationTaskLivingDetailsEntity.getPluginId(), "场景id不能为空");
|
||||
|
@ -71,9 +71,11 @@ public class SaveOrUpdateBusinessLogUtil {
|
|||
//2024年9月3日 10:26:45 如果这里往上抛出异常,没有功能搭配处理
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新日志 存在,则更新,可能是N→Y / N→N
|
||||
* 肯定有id
|
||||
*
|
||||
* @param integrationTaskLivingDetailsEntity
|
||||
*/
|
||||
private void updateSuccessMessage(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
|
||||
|
@ -105,6 +107,7 @@ public class SaveOrUpdateBusinessLogUtil {
|
|||
|
||||
/**
|
||||
* 新增日志 不存在,则新增,可能是→Y / →N
|
||||
*
|
||||
* @param integrationTaskLivingDetailsEntity
|
||||
*/
|
||||
private void saveSuccessMessage(IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity) {
|
||||
|
@ -192,6 +195,7 @@ public class SaveOrUpdateBusinessLogUtil {
|
|||
Assert.notNull(integrationTaskLivingDetailsEntity1, "根据主键id没有查询到明细信息");
|
||||
return integrationTaskLivingDetailsEntity1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据明细id查询明细信息,错误表 integration_task_living_details
|
||||
*/
|
||||
|
|
|
@ -60,9 +60,10 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
try{
|
||||
soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00");
|
||||
}catch (Exception e){
|
||||
try {
|
||||
// soSaleOutPluginInitializerToB.startImplementByTranTime("2024-09-12 14:04:00","2024-09-12 14:12:00");
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024092000000003", "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// soSaleOutPluginInitializerToC.splitDateAndPush(computingTime, "tran");
|
||||
|
||||
|
||||
String s = "LETS-SH2024032800000001";
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode(s, "tran");
|
||||
String s = "LETS-SH2024073100000004";
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue