diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java index 4e8d9d78..b09b47dd 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java @@ -371,7 +371,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { // List headerDetailsDtoList1 = new ArrayList<>(); List allTocofsSaleoutDetailedEntityList = new ArrayList<>(); if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { - List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDetailsDtoList, 100); + List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDetailsDtoList, 800); for (int i = 0; i < splitListByCount.size(); i++) { List headerDetailsDtoList2 = splitListByCount.get(i); String idStr = commaConcatenatedPrimaryKeyStock(headerDetailsDtoList2); @@ -455,6 +455,14 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { private List filterDataRowsAsPushOrFailedStock(List allTocofsSaleoutDetailedEntityList, List headerDetailsDtoList) throws Exception { List targetHeaderDetailsDtoList = new ArrayList<>(); if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { + List resultList = allTocofsSaleoutDetailedEntityList.stream().map(obj -> { + if (obj.getNewstate() == null) { + obj.setNewstate(""); + } + return obj; + }).collect(Collectors.toList()); + Map no2NameMap = resultList.stream().collect(Collectors.toMap(TocofsSaleoutDetailedEntity::getId, TocofsSaleoutDetailedEntity::getNewstate)); + //字段Y(成功)或者为H(待处理)可以视为成功,完成了小段业务闭环的数据行 String succeseeY = "Y"; String succeseeH = "H"; @@ -468,17 +476,24 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { DetailsDto detailsDto = details.get(j); Boolean isSuccess = false; String newstate = null; - if (allTocofsSaleoutDetailedEntityList.size() > 0) { - for (int k = 0; k < allTocofsSaleoutDetailedEntityList.size(); k++) { - TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = allTocofsSaleoutDetailedEntityList.get(k); - if (tocofsSaleoutDetailedEntity.getId().equals(detailsDto.getId())) { - newstate = tocofsSaleoutDetailedEntity.getNewstate(); - if (succeseeY.equals(newstate) || succeseeH.equals(newstate)) { - isSuccess = true; - } - } - } +// if (allTocofsSaleoutDetailedEntityList.size() > 0) { +// for (int k = 0; k < allTocofsSaleoutDetailedEntityList.size(); k++) { +// TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = allTocofsSaleoutDetailedEntityList.get(k); +// if (tocofsSaleoutDetailedEntity.getId().equals(detailsDto.getId())) { +// newstate = tocofsSaleoutDetailedEntity.getNewstate(); +// if (succeseeY.equals(newstate) || succeseeH.equals(newstate)) { +// isSuccess = true; +// } +// } +// } +// } + + //进一步优化性能,使用Map + newstate = no2NameMap.get(detailsDto.getId()); + if (newstate != null && (succeseeY.equals(newstate) || succeseeH.equals(newstate))) { + isSuccess = true; } + if (!isSuccess) { detailsDto.setNewState(newstate); targetDetails.add(detailsDto); @@ -598,28 +613,58 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { } //每50作为一个批次插入主表,根据主键(id)判断是否重复,如果重复的,则不进行插入 - List> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 50); + List> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 800); for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) { List headerDtoList = ofssaleorderoutsearchList.get(i); - List tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); - if (tocofsSaleoutEntityList != null && tocofsSaleoutEntityList.size() > 0) { - logger.info("TocofsSaleoutEntity:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); - iTocofsSaleoutDao.entityInsertOrUpdateBatch(tocofsSaleoutEntityList); - } else { - logger.info("TocofsSaleoutEntity:TOC业务没有对象被插入表头底表"); + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + try { + List tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); + if (tocofsSaleoutEntityList != null && tocofsSaleoutEntityList.size() > 0) { + logger.info("TocofsSaleoutEntity:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); + iTocofsSaleoutDao.entityInsertOrUpdateBatch(tocofsSaleoutEntityList); + } else { + logger.info("TocofsSaleoutEntity:TOC业务没有对象被插入表头底表"); + } + } catch (Exception e) { + logger.error("线程保存TOC销售表头抛出异常", e); + } + } + }); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("堵塞线程抛出异常", e); } } //插入明细表 - List> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 50); + List> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 800); for (int i = 0; i < detailsDtoList.size(); i++) { List detailsDtos = detailsDtoList.get(i); - List tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); - if (tocofsSaleoutDetailedEntities.size() > 0) { - logger.info("TocofsSaleoutDetailedEntity:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); - iTocofsSaleoutDetailedDao.entityInsertOrUpdateBatch(tocofsSaleoutDetailedEntities); - } else { - logger.info("TocofsSaleoutDetailedEntity:没有对象被插入表头底表"); + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + try { + List tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); + if (tocofsSaleoutDetailedEntities.size() > 0) { + logger.info("TocofsSaleoutDetailedEntity:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); + iTocofsSaleoutDetailedDao.entityInsertOrUpdateBatch(tocofsSaleoutDetailedEntities); + } else { + logger.info("TocofsSaleoutDetailedEntity:没有对象被插入表头底表"); + } + } catch (Exception e) { + logger.error("线程保存TOC销售明细抛出异常", e); + } + } + }); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("堵塞线程抛出异常", e); } } } catch (Exception e) { @@ -1034,7 +1079,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { String facilityCode = header.getFacilityCode(); Assert.notNull(facilityCode, "O仓库编码不能为空"); BdStordocEntity bdStordocEntity = cacheTocMapVo.getStringBdStordocEntityMap().get(facilityCode + bdCalbodyEntity.getPkCalbody()); - Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 发货库存组织主键:{} O库存地点编码:{}", facilityCode, bdCalbodyEntity.getPkCalbody()); + Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 O库存地点编码:{} 发货库存组织主键:{}", facilityCode, bdCalbodyEntity.getPkCalbody()); //2024年8月5日 15:25:07 收货库存组织、收货仓库、默认和发货库存组织、发货仓库一致,已经和佳妮确认 //收货库存组织:速网来看收货库存组织对应表头工具 diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java index caeb426e..cc079086 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToC.java @@ -1082,7 +1082,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity { String facilityCode = header.getFacilityCode(); Assert.notNull(facilityCode, "O仓库编码不能为空"); BdStordocEntity bdStordocEntity = cacheTocMapVoV2.getStringBdStordocEntityMap().get(facilityCode + bdCalbodyEntity.getPkCalbody()); - Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 发货库存组织主键:{} O库存地点编码:{}", facilityCode, bdCalbodyEntity.getPkCalbody()); + Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 O库存地点编码:{} 发货库存组织主键:{} ", facilityCode, bdCalbodyEntity.getPkCalbody()); //2024年8月5日 15:25:07 收货库存组织、收货仓库、默认和发货库存组织、发货仓库一致,已经和佳妮确认 //收货库存组织:速网来看收货库存组织对应表头工具 diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OfsStandardUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OfsStandardUtil.java index 8e8f5a08..a16fb1a4 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OfsStandardUtil.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/OfsStandardUtil.java @@ -55,7 +55,7 @@ public class OfsStandardUtil { Assert.notNull(pageNo, "pageNo不能为空"); Assert.notNull(api, "api不能为空"); - Long pageSize = 200L; + Long pageSize = 400L; queryOfsSoSaleOutVo.setPageNo(pageNo); queryOfsSoSaleOutVo.setPageSize(pageSize); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java index f1267e75..1c3cf484 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java @@ -15,10 +15,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -224,18 +221,22 @@ public class TocOrderBasicArchivesCacheUtil { Map stringBdCubasdocEntityMap = new HashMap<>(); List allBdCumandocEntityList = new ArrayList<>(); if (headerDtoList != null && headerDtoList.size() > 0) { - List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDtoList, 500); + List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDtoList, 900); for (int i = 0; i < splitListByCount.size(); i++) { List headerDtoList1 = splitListByCount.get(i); - String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); + Set storeCodeHashSet = headerDtoList1.stream().map(HeaderDto::getStoreCode).collect(Collectors.toSet()); + String codesStr = storeCodeHashSet.stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")); +// String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); //测试 // codesStr = "'dy-off-01'"; - BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity(); - bdCubasdocEntity.setDataSourceCode("lets_u8c"); - bdCubasdocEntity.setDr(0L); - bdCubasdocEntity.setCustcodes(codesStr); - List bdCumandocEntityList = iBdCubasdocDao.query(bdCubasdocEntity); - allBdCumandocEntityList.addAll(bdCumandocEntityList); + if (codesStr != null && codesStr.length() > 0) { + BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity(); + bdCubasdocEntity.setDataSourceCode("lets_u8c"); + bdCubasdocEntity.setDr(0L); + bdCubasdocEntity.setCustcodes(codesStr); + List bdCumandocEntityList = iBdCubasdocDao.query(bdCubasdocEntity); + allBdCumandocEntityList.addAll(bdCumandocEntityList); + } } } if (allBdCumandocEntityList.size() > 0) { @@ -278,19 +279,23 @@ public class TocOrderBasicArchivesCacheUtil { List allBdCumandocEntityList = new ArrayList<>(); if (headerDtoList != null && headerDtoList.size() > 0) { - List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDtoList, 500); + List> splitListByCount = SplitListByCountUtil.splitListByCount(headerDtoList, 900); for (int i = 0; i < splitListByCount.size(); i++) { List headerDtoList1 = splitListByCount.get(i); - String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); + Set storeCodeHashSet = headerDtoList1.stream().map(HeaderDto::getStoreCode).collect(Collectors.toSet()); + String codesStr = storeCodeHashSet.stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")); +// String codesStr = headerDtoList1.stream().map(HeaderDto::getStoreCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); //测试 // codesStr = "'dy-off-01'"; - BdCumandocEntity bdCumandocEntity = new BdCumandocEntity(); - bdCumandocEntity.setDataSourceCode("lets_u8c"); - bdCumandocEntity.setDr(0L); - bdCumandocEntity.setCustcodes(codesStr); - List bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity); - allBdCumandocEntityList.addAll(bdCumandocEntityList); + if (codesStr != null && codesStr.length() > 0) { + BdCumandocEntity bdCumandocEntity = new BdCumandocEntity(); + bdCumandocEntity.setDataSourceCode("lets_u8c"); + bdCumandocEntity.setDr(0L); + bdCumandocEntity.setCustcodes(codesStr); + List bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity); + allBdCumandocEntityList.addAll(bdCumandocEntityList); + } } } if (allBdCumandocEntityList.size() > 0) { @@ -327,15 +332,19 @@ public class TocOrderBasicArchivesCacheUtil { Map stringBdInvmandocEntityMap = new HashMap<>(); if (detailsDtos != null && detailsDtos.size() > 0) { - List> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 500); + List> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 900); for (int i = 0; i < lists.size(); i++) { List detailsDtos1 = lists.get(i); - String idsStr = detailsDtos1.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); + Set storeCodeHashSet = detailsDtos1.stream().map(DetailsDto::getSkuCode).collect(Collectors.toSet()); + String codesStr = storeCodeHashSet.stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")); +// String idsStr = detailsDtos1.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); - BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity(); - bdInvmandocEntity.setInvcodes(idsStr); - List bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity); - allBdInvmandocEntity.addAll(bdInvmandocEntity2); + if (codesStr != null && codesStr.length() > 0) { + BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity(); + bdInvmandocEntity.setInvcodes(codesStr); + List bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity); + allBdInvmandocEntity.addAll(bdInvmandocEntity2); + } } } if (allBdInvmandocEntity.size() > 0) { @@ -376,15 +385,19 @@ public class TocOrderBasicArchivesCacheUtil { private Map initBasicInventoryFileV2(List detailsDtoList) throws Exception { List allBdInvbasdocEntityList = new ArrayList<>(); if (detailsDtoList != null && detailsDtoList.size() > 0) { - List> lists = SplitListByCountUtil.splitListByCount(detailsDtoList, 500); + List> lists = SplitListByCountUtil.splitListByCount(detailsDtoList, 900); for (int i = 0; i < lists.size(); i++) { List detailsDtos = lists.get(i); - String idsStr = detailsDtos.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); +// String idsStr = detailsDtos.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); + Set storeCodeHashSet = detailsDtos.stream().map(DetailsDto::getSkuCode).collect(Collectors.toSet()); + String codesStr = storeCodeHashSet.stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")); - BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity(); - bdInvbasdocEntity.setInvcodes(idsStr); - List bdInvbasdocEntities = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV3(bdInvbasdocEntity); - allBdInvbasdocEntityList.addAll(bdInvbasdocEntities); + if (codesStr != null && codesStr.length() > 0) { + BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity(); + bdInvbasdocEntity.setInvcodes(codesStr); + List bdInvbasdocEntities = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV3(bdInvbasdocEntity); + allBdInvbasdocEntityList.addAll(bdInvbasdocEntities); + } } } Map stringBdInvbasdocEntityMap = new HashMap<>(); @@ -422,15 +435,19 @@ public class TocOrderBasicArchivesCacheUtil { List allBdTaxitemsEntityList = new ArrayList<>(); Map stringBdTaxitemsEntityMap = new HashMap<>(); if (detailsDtos != null && detailsDtos.size() > 0) { - List> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 500); + List> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 900); for (int i = 0; i < lists.size(); i++) { List detailsDtos1 = lists.get(i); - String codesStr = detailsDtos1.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); +// String codesStr = detailsDtos1.stream().map(DetailsDto::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(",")); + Set storeCodeHashSet = detailsDtos1.stream().map(DetailsDto::getSkuCode).collect(Collectors.toSet()); + String codesStr = storeCodeHashSet.stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")); - BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity(); - bdTaxitemsEntity.setInvcodes(codesStr); - List bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity); - allBdTaxitemsEntityList.addAll(bdTaxitemsEntityList); + if (codesStr != null && codesStr.length() > 0) { + BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity(); + bdTaxitemsEntity.setInvcodes(codesStr); + List bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity); + allBdTaxitemsEntityList.addAll(bdTaxitemsEntityList); + } } } if (allBdTaxitemsEntityList.size() > 0) { diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToBTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToBTest.java index 1022b1c6..c70e58eb 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToBTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToBTest.java @@ -77,5 +77,11 @@ public class SoSaleOutPluginInitializerToBTest { // System.out.println(tobShop); // soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101700000270"); + + try { + soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101800000739", "stock"); + } catch (Exception e) { + e.printStackTrace(); + } } } \ No newline at end of file diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java index 2c9af82a..baea17e2 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java @@ -77,7 +77,6 @@ class SoSaleOutPluginInitializerToCTest { // String aaa = "{\"barcode\":\"01031000084\",\"brand_name\":\"护童\",\"brand_no\":\"1\",\"cost_price\":\"0.00\",\"discount\":\"0.00\",\"from_mask\":\"0\",\"gift_type\":\"1\",\"good_prop1\":\"\",\"good_prop2\":\"\",\"good_prop3\":\"\",\"good_prop4\":\"\",\"good_prop5\":\"\",\"good_prop6\":\"\",\"goods_amount\":\"0.0000\",\"goods_count\":\"1.0000\",\"goods_id\":\"4662\",\"goods_name\":\"G501_椅套_奶油桃\",\"goods_no\":\"01031000084\",\"goods_type\":\"1\",\"is_package\":\"false\",\"market_price\":\"0.00\",\"paid\":\"0.00\",\"platform_id\":\"0\",\"position_details_list\":[{\"batch_no\":\"\",\"expire_date\":\"\",\"position_goods_count\":\"1.0000\",\"position_id\":\"-6\",\"position_no\":\"其它未上架\",\"rec_id\":\"644060\",\"stockout_detail_id\":\"830189\"}],\"prop1\":\"\",\"prop2\":\"\",\"prop3\":\"\",\"prop4\":\"\",\"prop5\":\"\",\"prop6\":\"\",\"rec_id\":\"830189\",\"refund_status\":\"0\",\"remark\":\"赠品策略编号:ZP24080204,规则名称:G501 奶油桃,原始单号:4032308235772095218\",\"sale_order_id\":\"1251671\",\"sell_price\":\"0.00\",\"share_amount\":\"0.00\",\"share_post_amount\":\"0.00\",\"share_price\":\"0.00\",\"spec_code\":\"\",\"spec_id\":\"4526\",\"spec_name\":\"G501_椅套_奶油桃\",\"spec_no\":\"01031000084\",\"src_oid\":\"AD202409050010\",\"src_order_detail_id\":\"1251671\",\"src_tid\":\"4032308235772095218\",\"stockout_id\":\"630492\",\"suite_no\":\"\",\"tax_rate\":\"0.00\",\"total_amount\":\"0.00\",\"weight\":\"0.0000\"}"; // System.out.println(aaa.length()); - // String computingTime = soSaleOutPluginInitializerToC.computingTime("2024-01-01/2024-01-01"); // soSaleOutPluginInitializerToC.splitDateAndPush(computingTime, "tran"); @@ -92,8 +91,14 @@ class SoSaleOutPluginInitializerToCTest { // queryOfsSoSaleOutVo.setCode("LETS-SO2024092500000018"); // ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L); // System.out.println(headerDetailsDtoArrayList.get(0).getHeader().getDepartmentType()); - - String s = "LETS-SH2024101700000270"; - soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock"); + +// String s = "LETS-SH2024101700000270"; +// soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock"); + + try { + soSaleOutPluginInitializerToC.startImplementStockByTime("2024-10-17 00:00:00", "2024-10-17 23:59:59"); + } catch (Exception e) { + e.printStackTrace(); + } } } \ No newline at end of file diff --git a/common/src/main/java/com/hzya/frame/beanutil/BeanUtil.java b/common/src/main/java/com/hzya/frame/beanutil/BeanUtil.java index 6ce61ad5..7187db2c 100644 --- a/common/src/main/java/com/hzya/frame/beanutil/BeanUtil.java +++ b/common/src/main/java/com/hzya/frame/beanutil/BeanUtil.java @@ -29,7 +29,7 @@ public class BeanUtil { public static T copyProperties(Object source, Object target) { Map sourceMap = CacheFieldMap.getFieldMap(source.getClass()); CacheFieldMap.getFieldMap(target.getClass()).values().forEach((it) -> { - logger.info(it.getName()); +// logger.info(it.getName()); Field field = sourceMap.get(it.getName().toLowerCase().replace("_", "")); if (field != null) { it.setAccessible(true); @@ -69,7 +69,7 @@ public class BeanUtil { Map sourceMap = CacheFieldMap.getFieldMap(source.getClass()); targetFieldMap.values().forEach((it) -> { - logger.info(it.getName()); +// logger.info(it.getName()); Field field = sourceMap.get(it.getName().toLowerCase().replace("_", "")); if (field != null) { it.setAccessible(true);