Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
a8c40684e5
|
@ -86,31 +86,37 @@ public class OverallConstant {
|
|||
devOverAll.put("u8cApiNeedStackTraceCode", "Y");
|
||||
devOverAll.put("u8cApiZdrCode", "tbadmin");//单据制单人---测试环境:tbadmin
|
||||
|
||||
devOverAll.put("u8c自定义项档案-店铺主键", "0001A110000000000EBX");
|
||||
devOverAll.put("u8c自定义项档案-平台主键", "0001A110000000000EEU");
|
||||
|
||||
//中台地址
|
||||
devOverAll.put("u8c_url", "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
}
|
||||
|
||||
private static void loadProd() {
|
||||
devOverAll.put("u8cApiUrl", "http://192.168.10.118:9099");//测试U8C
|
||||
prodOverAll.put("u8cApiUrl", "http://192.168.10.118:9099");//测试U8C
|
||||
|
||||
//主键
|
||||
devOverAll.put("u8cApiUsercodePK", "admin");
|
||||
devOverAll.put("u8cApiPasswordPK", "83f1ad3e7fa3617f1aae62ae7413c810");
|
||||
devOverAll.put("u8cApiTrantypePK", "pk");
|
||||
devOverAll.put("u8cApiSystemPK", "lz");
|
||||
devOverAll.put("u8cApiNeedStackTracePK", "N");
|
||||
devOverAll.put("u8cApiZdrPK", "TB_NEW100000000004OP");//单据制单人---测试环境:tbadmin
|
||||
prodOverAll.put("u8cApiUsercodePK", "admin");
|
||||
prodOverAll.put("u8cApiPasswordPK", "83f1ad3e7fa3617f1aae62ae7413c810");
|
||||
prodOverAll.put("u8cApiTrantypePK", "pk");
|
||||
prodOverAll.put("u8cApiSystemPK", "lz");
|
||||
prodOverAll.put("u8cApiNeedStackTracePK", "N");
|
||||
prodOverAll.put("u8cApiZdrPK", "TB_NEW100000000004OP");//单据制单人---测试环境:tbadmin
|
||||
|
||||
//编码
|
||||
devOverAll.put("u8cApiUsercodeCode", "admin1");
|
||||
devOverAll.put("u8cApiPasswordCode", "83f1ad3e7fa3617f1aae62ae7413c810");
|
||||
devOverAll.put("u8cApiTrantypeCode", "code");
|
||||
devOverAll.put("u8cApiSystemCode", "lz1");
|
||||
devOverAll.put("u8cApiNeedStackTraceCode", "N");
|
||||
devOverAll.put("u8cApiZdrCode", "tbadmin");//单据制单人---测试环境:tbadmin
|
||||
prodOverAll.put("u8cApiUsercodeCode", "admin1");
|
||||
prodOverAll.put("u8cApiPasswordCode", "83f1ad3e7fa3617f1aae62ae7413c810");
|
||||
prodOverAll.put("u8cApiTrantypeCode", "code");
|
||||
prodOverAll.put("u8cApiSystemCode", "lz1");
|
||||
prodOverAll.put("u8cApiNeedStackTraceCode", "N");
|
||||
prodOverAll.put("u8cApiZdrCode", "tbadmin");//单据制单人---测试环境:tbadmin
|
||||
|
||||
prodOverAll.put("u8c自定义项档案-店铺主键", "0001A110000000000EBX");
|
||||
prodOverAll.put("u8c自定义项档案-平台主键", "0001A110000000000EEU");
|
||||
|
||||
//中台地址
|
||||
devOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
prodOverAll.put("u8c_url", "http://127.0.0.1:8081/kangarooDataCenterV3/entranceController/externalCallInterface");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -789,10 +789,10 @@
|
|||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into tocofs_saleout_detailed(id,clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, sourceLineNum, inventorySts, isGift, requestQty, shipQty, shipAt, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy, mainTableId, newPushDate, newTransmitInfo, newState, newState2, newState3, newState4, newSystemNumber, newSystemPrimary, newSystemNumber2, newSystemPrimary2, newSystemNumber3, newSystemPrimary3, newSystemNumber4, newSystemPrimary4, businessDate, successfulTradeDate, businessType, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def20, def21, def22, def23, def24, def25, def26, def27, def28, def29, def30, def31, def32, def33, def34, def35, def36, def37, def38, def39, def40)
|
||||
insert into tocofs_saleout_detailed(id,clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, sourceLineNum, inventorySts, isGift, requestQty, shipQty, shipAt, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy, mainTableId, businessDate, successfulTradeDate, businessType)
|
||||
values
|
||||
<foreach collection="list" item="entity" separator=",">
|
||||
(#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.sourcelinenum},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.shipat},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.maintableid},#{entity.newpushdate},#{entity.newtransmitinfo},#{entity.newstate},#{entity.newstate2},#{entity.newstate3},#{entity.newstate4},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.newsystemnumber2},#{entity.newsystemprimary2},#{entity.newsystemnumber3},#{entity.newsystemprimary3},#{entity.newsystemnumber4},#{entity.newsystemprimary4},#{entity.businessdate},#{entity.successfultradedate},#{entity.businesstype},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def20},#{entity.def21},#{entity.def22},#{entity.def23},#{entity.def24},#{entity.def25},#{entity.def26},#{entity.def27},#{entity.def28},#{entity.def29},#{entity.def30},#{entity.def31},#{entity.def32},#{entity.def33},#{entity.def34},#{entity.def35},#{entity.def36},#{entity.def37},#{entity.def38},#{entity.def39},#{entity.def40})
|
||||
(#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.sourcelinenum},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.shipat},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.maintableid},#{entity.businessdate},#{entity.successfultradedate},#{entity.businesstype})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
id = values(id),
|
||||
|
@ -827,63 +827,9 @@
|
|||
lastUpdated = values(lastUpdated),
|
||||
lastUpdatedBy = values(lastUpdatedBy),
|
||||
mainTableId = values(mainTableId),
|
||||
newPushDate = values(newPushDate),
|
||||
newTransmitInfo = values(newTransmitInfo),
|
||||
newState = values(newState),
|
||||
newState2 = values(newState2),
|
||||
newState3 = values(newState3),
|
||||
newState4 = values(newState4),
|
||||
newSystemNumber = values(newSystemNumber),
|
||||
newSystemPrimary = values(newSystemPrimary),
|
||||
newSystemNumber2 = values(newSystemNumber2),
|
||||
newSystemPrimary2 = values(newSystemPrimary2),
|
||||
newSystemNumber3 = values(newSystemNumber3),
|
||||
newSystemPrimary3 = values(newSystemPrimary3),
|
||||
newSystemNumber4 = values(newSystemNumber4),
|
||||
newSystemPrimary4 = values(newSystemPrimary4),
|
||||
businessDate = values(businessDate),
|
||||
successfulTradeDate = values(successfulTradeDate),
|
||||
businessType = values(businessType),
|
||||
def1 = values(def1),
|
||||
def2 = values(def2),
|
||||
def3 = values(def3),
|
||||
def4 = values(def4),
|
||||
def5 = values(def5),
|
||||
def6 = values(def6),
|
||||
def7 = values(def7),
|
||||
def8 = values(def8),
|
||||
def9 = values(def9),
|
||||
def10 = values(def10),
|
||||
def11 = values(def11),
|
||||
def12 = values(def12),
|
||||
def13 = values(def13),
|
||||
def14 = values(def14),
|
||||
def15 = values(def15),
|
||||
def16 = values(def16),
|
||||
def17 = values(def17),
|
||||
def18 = values(def18),
|
||||
def19 = values(def19),
|
||||
def20 = values(def20),
|
||||
def21 = values(def21),
|
||||
def22 = values(def22),
|
||||
def23 = values(def23),
|
||||
def24 = values(def24),
|
||||
def25 = values(def25),
|
||||
def26 = values(def26),
|
||||
def27 = values(def27),
|
||||
def28 = values(def28),
|
||||
def29 = values(def29),
|
||||
def30 = values(def30),
|
||||
def31 = values(def31),
|
||||
def32 = values(def32),
|
||||
def33 = values(def33),
|
||||
def34 = values(def34),
|
||||
def35 = values(def35),
|
||||
def36 = values(def36),
|
||||
def37 = values(def37),
|
||||
def38 = values(def38),
|
||||
def39 = values(def39),
|
||||
def40 = values(def40)
|
||||
businessType = values(businessType)
|
||||
</insert>
|
||||
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
//实时执行,每1分钟调度一次
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
startImplementByTranTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
// startImplementByTranTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -327,6 +327,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
try {
|
||||
Assert.notNull(code, "出库单单不能为空");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
logger.info("TOB-OFS店铺编码:{}", tobShop);
|
||||
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
|
@ -738,7 +739,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
for (int j = 0; j < details.size(); j++) {
|
||||
DetailsDto detailsDto = details.get(j);
|
||||
//存货管理档案:取发货公司的存货管理档案
|
||||
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(detailsDto, bdCalbodyEntity.getPkCorp());
|
||||
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(detailsDto, bdCalbodyEntity.getPkCorp(), bdCorpEntity.getUnitname());
|
||||
//存货基础档案
|
||||
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp());
|
||||
//根据存货基础档案编码,查询当前存货的税率
|
||||
|
@ -916,22 +917,19 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
List<ErrorHeaderDetailsDtoDto> errorHeaderDetailsDtoDtoList = new ArrayList<>();
|
||||
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
|
||||
try {
|
||||
//查询对应的OFS销售订单
|
||||
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtos = queryOfsOrder(headerDetailsDtoList);
|
||||
// findMatchingOfsOrder(headerDetailsDtos, headerDetailsDtoList);
|
||||
|
||||
for (int i = 0; i < headerDetailsDtoList.size(); i++) {
|
||||
HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i);
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
List<DetailsDto> details = headerDetailsDto.getDetails();
|
||||
|
||||
try {
|
||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = header.getHeaderDetailsDto();
|
||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header2 = headerDetailsDto1.getHeader();
|
||||
//如果没有O单据名称,则默认为「销售」
|
||||
if (header2.getSubOrderType() == null || "".equals(header2.getSubOrderType().trim())) {
|
||||
header2.setSubOrderType("SALES");
|
||||
}
|
||||
|
||||
//查询对应的收发类别
|
||||
BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject(header2.getSubOrderType());
|
||||
Assert.notNull(bdRdclEntity, "根据收发类别编码:{} 无法匹配到U8C收发类别");
|
||||
// Assert.notNull(header.getHeaderDetailsDto(), "OFS销售销售不能为空!");
|
||||
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = header.getHeaderDetailsDto();
|
||||
// com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header2 = headerDetailsDto1.getHeader();
|
||||
|
||||
//根据OFS销售出库单,查询得到OFS销售订单
|
||||
SaleOrderMessageDto saleOrderMessageDto = null;
|
||||
|
@ -947,9 +945,19 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = saleOrderMessageDto.getData().get(0).getHeader();
|
||||
String memberId = header1.getMemberId();
|
||||
//TODO 测试
|
||||
memberId = "hzz";
|
||||
Assert.notNull(memberId, "TOB销售订单(OFS)表头会员id不能为空,否则无法匹配U8C客商档案!");
|
||||
Assert.state(!"".equals(memberId.trim()), "TOB销售订单(OFS)表头会员id不能为空,否则无法匹配U8C客商档案!");
|
||||
|
||||
//如果没有O单据名称,则默认为「销售」
|
||||
if (header1.getSubOrderType() == null || "".equals(header1.getSubOrderType().trim())) {
|
||||
header1.setSubOrderType("SALES");
|
||||
}
|
||||
//查询对应的收发类别
|
||||
BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject(header1.getSubOrderType());
|
||||
Assert.notNull(bdRdclEntity, "根据收发类别编码:{} 无法匹配到U8C收发类别");
|
||||
|
||||
// 销售公司、发货公司
|
||||
// header.setCompanyCode("SHLZ");
|
||||
String companyCode = header.getCompanyCode();
|
||||
|
@ -1033,12 +1041,10 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
bdCubasdocEntity.setDef1(memberId);
|
||||
List<BdCubasdocEntity> bdCubasdocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
|
||||
if (bdCubasdocEntityList == null || bdCubasdocEntityList.size() == 0) {
|
||||
Assert.state(false, "根据OFS会员id{},无法查询到U8C客商基本档案", memberId);
|
||||
Assert.state(false, "根据OFS会员id:{},无法查询到U8C客商基本档案", memberId);
|
||||
} else if (bdCubasdocEntityList.size() >= 2) {
|
||||
Assert.state(false, "根据OFS会员id{},查询到U8C多个客商基本档案", memberId);
|
||||
}
|
||||
//TODO 测试
|
||||
// else if (bdCubasdocEntityList.size() >= 2) {
|
||||
// Assert.state(false, "根据OFS会员id{},查询到U8C多个客商基本档案", memberId);
|
||||
// }
|
||||
|
||||
//客商管理档案
|
||||
BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity();
|
||||
|
@ -1053,7 +1059,8 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
//查找平台
|
||||
String platformZdyId = "0001A210000000000JUD";
|
||||
// String platformZdyId = "0001A210000000000JUD";
|
||||
String platformZdyId = OverallConstant.getOverAllValue("u8c自定义项档案-平台主键");
|
||||
String sourcePlatformCode = header.getSourcePlatformCode();
|
||||
BdDefdocEntity bdDefdocEntity = new BdDefdocEntity();
|
||||
bdDefdocEntity.setPkDefdoclist(platformZdyId);
|
||||
|
@ -1068,7 +1075,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
//查询U8C店铺档案
|
||||
String platformZdyId2 = "0001A210000000000XZX";
|
||||
String platformZdyId2 = OverallConstant.getOverAllValue("u8c自定义项档案-店铺主键");
|
||||
String ofsStoreCode = header.getStoreCode();
|
||||
BdDefdocEntity bdDefdocEntity2 = new BdDefdocEntity();
|
||||
bdDefdocEntity2.setPkDefdoclist(platformZdyId2);
|
||||
|
@ -1192,7 +1199,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
* @param detailsDto 出库单存货明细行
|
||||
* @author liuyang
|
||||
*/
|
||||
private BdInvmandocEntity queryInventoryMan(DetailsDto detailsDto, String pkCorp) throws Exception {
|
||||
private BdInvmandocEntity queryInventoryMan(DetailsDto detailsDto, String pkCorp, String corpName) throws Exception {
|
||||
Assert.notNull(detailsDto, "sonDetailsDto不能为空");
|
||||
Assert.notNull(detailsDto.getSkuCode(), "O存货商家编码不能为空");
|
||||
Assert.notNull(pkCorp, "发货公司主键不能为空");
|
||||
|
@ -1202,9 +1209,9 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
bdInvmandocEntity.setPkCorp(pkCorp);
|
||||
List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
|
||||
if (bdInvmandocEntity2.size() == 0) {
|
||||
Assert.state(false, "根据O商家编码:{} U8C发货公司主键:{}没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp);
|
||||
Assert.state(false, "根据O商家编码:{} U8C发货公司主键:{} 发货公司名称:{} 没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp, corpName);
|
||||
} else if (bdInvmandocEntity2.size() >= 2) {
|
||||
Assert.state(false, "根据O商家编码:{} U8C发货公司主键:{}没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp);
|
||||
Assert.state(false, "根据O商家编码:{} U8C发货公司主键:{} 发货公司名称:{} 没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp, corpName);
|
||||
}
|
||||
return bdInvmandocEntity2.get(0);
|
||||
}
|
||||
|
@ -1427,11 +1434,9 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
List<SoSaleEntity> soSaleEntityList = iSoSaleDao.query(soSaleEntity);
|
||||
if (soSaleEntityList == null || soSaleEntityList.size() == 0) {
|
||||
Assert.state(false, "根据O出库单主键:{} 单号:{} 无法匹配到U8C销售订单(传到U8C可能失败了!bretinvflag=N)", header.getId(), header.getCode());
|
||||
} else if (soSaleEntityList.size() >= 2) {
|
||||
Assert.state(false, "根据O出库单主键:{} 单号:{} 匹配到{}个U8C销售订单", header.getId(), header.getCode(), soSaleEntityList.size());
|
||||
}
|
||||
//TODO 测试
|
||||
// else if (soSaleEntityList.size() >= 2) {
|
||||
// Assert.state(false, "根据O出库单主键:{} 单号:{} 匹配到{}个U8C销售订单", header.getId(), header.getCode(), soSaleEntityList.size());
|
||||
// }
|
||||
|
||||
//查询销售订单明细行表体
|
||||
SoSaleorderBEntity soSaleorderBEntity = new SoSaleorderBEntity();
|
||||
|
@ -1578,7 +1583,8 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
//查找平台
|
||||
String platformZdyId = "0001A210000000000JUD";
|
||||
// String platformZdyId = "0001A210000000000JUD";
|
||||
String platformZdyId = OverallConstant.getOverAllValue("u8c自定义项档案-平台主键");
|
||||
String sourcePlatformCode = header.getSourcePlatformCode();
|
||||
BdDefdocEntity bdDefdocEntity = new BdDefdocEntity();
|
||||
bdDefdocEntity.setPkDefdoclist(platformZdyId);
|
||||
|
@ -1593,7 +1599,8 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
//查询U8C店铺档案
|
||||
String platformZdyId2 = "0001A210000000000XZX";
|
||||
// String platformZdyId2 = "0001A210000000000XZX";
|
||||
String platformZdyId2 = OverallConstant.getOverAllValue("u8c自定义项档案-店铺主键");
|
||||
String ofsStoreCode = header.getStoreCode();
|
||||
BdDefdocEntity bdDefdocEntity2 = new BdDefdocEntity();
|
||||
bdDefdocEntity2.setPkDefdoclist(platformZdyId2);
|
||||
|
@ -1754,7 +1761,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
for (int j = 0; j < details.size(); j++) {
|
||||
DetailsDto detailsDto = details.get(j);
|
||||
//存货管理档案:取发货公司的存货管理档案
|
||||
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(detailsDto, bdCalbodyEntity.getPkCorp());
|
||||
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(detailsDto, bdCalbodyEntity.getPkCorp(), bdCorpEntity.getUnitname());
|
||||
//存货基础档案
|
||||
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp());
|
||||
//根据存货基础档案编码,查询当前存货的税率
|
||||
|
@ -2422,4 +2429,75 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
logger.error("updateFailOrSuccessTocofsSaleoutDetailedArchiveInquiry方法现场抛出异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过OFS销售出库单,联查OFS销售订单
|
||||
*
|
||||
* @param headerDetailsDtoList OFS销售出库单
|
||||
*/
|
||||
private List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> queryOfsOrder(List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList) throws Exception {
|
||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> allHeaderDetailsDtoArrayList = new ArrayList<>();
|
||||
try {
|
||||
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
|
||||
List<List<HeaderDetailsDto>> splitListByCount = SplitListByCountUtil.splitListByCount(headerDetailsDtoList, 100);
|
||||
for (int i = 0; i < splitListByCount.size(); i++) {
|
||||
List<HeaderDetailsDto> headerDetailsDtos = splitListByCount.get(i);
|
||||
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
|
||||
for (int j = 0; j < headerDetailsDtos.size(); j++) {
|
||||
HeaderDetailsDto headerDetailsDto = headerDetailsDtos.get(j);
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
// List<DetailsDto> details = headerDetailsDto.getDetails();
|
||||
// stringBuffer.append("'");
|
||||
stringBuffer.append(header.getRefOrderCode());
|
||||
// stringBuffer.append("'");
|
||||
stringBuffer.append(",");
|
||||
}
|
||||
}
|
||||
String substring = stringBuffer.substring(0, stringBuffer.length());
|
||||
|
||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setCode(substring);
|
||||
ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
|
||||
allHeaderDetailsDtoArrayList.addAll(headerDetailsDtoArrayList);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("queryOfsOrder方法抛出异常", e);
|
||||
}
|
||||
return allHeaderDetailsDtoArrayList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代码匹配销售订单
|
||||
*
|
||||
* @param ofsSaleOrder ofs销售订单集合
|
||||
* @param ofsSaleOutOrder ofs销售出库单集合
|
||||
* @author liuyang
|
||||
*/
|
||||
private void findMatchingOfsOrder(List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> ofsSaleOrder, List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> ofsSaleOutOrder) throws Exception {
|
||||
if (ofsSaleOrder != null && ofsSaleOutOrder != null && ofsSaleOrder.size() > 0 && ofsSaleOutOrder.size() > 0) {
|
||||
try {
|
||||
for (int i = 0; i < ofsSaleOutOrder.size(); i++) {
|
||||
HeaderDetailsDto headerDetailsDto = ofsSaleOutOrder.get(i);
|
||||
HeaderDto header = headerDetailsDto.getHeader();
|
||||
List<DetailsDto> details = headerDetailsDto.getDetails();
|
||||
|
||||
String targetRefOrderCode = header.getRefOrderCode();
|
||||
for (int j = 0; j < ofsSaleOrder.size(); j++) {
|
||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto1 = ofsSaleOrder.get(j);
|
||||
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto1.getHeader();
|
||||
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto> details1 = headerDetailsDto1.getDetails();
|
||||
if (header1.getCode().equals(targetRefOrderCode)) {
|
||||
header.setHeaderDetailsDto(headerDetailsDto1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("findMatchingOfsOrder方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzya.frame.plugin.lets.util;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
||||
import com.hzya.frame.plugin.lets.dao.IBdDefdocDao;
|
||||
import com.hzya.frame.plugin.lets.entity.BdDefdocEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -30,7 +31,7 @@ public class ShopTobOrToCUtil {
|
|||
*/
|
||||
public List<BdDefdocEntity> queryU8cShop(String memo) {
|
||||
//查询U8C店铺档案
|
||||
String platformZdyId2 = "0001A210000000000XZX";
|
||||
String platformZdyId2 = OverallConstant.getOverAllValue("u8c自定义项档案-店铺主键");
|
||||
|
||||
BdDefdocEntity bdDefdocEntity2 = new BdDefdocEntity();
|
||||
bdDefdocEntity2.setPkDefdoclist(platformZdyId2);
|
||||
|
|
|
@ -45,6 +45,6 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
|
||||
// soSaleOutPluginInitializerToB.startImplementByTranTime("2024-08-28 15:28:06", "2024-08-28 15:28:08");
|
||||
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024080100010887");
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024080100006222");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue