Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
bc7556e1ee
|
@ -34,6 +34,7 @@ import com.hzya.frame.web.entity.JsonResultEntity;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import sun.tools.jinfo.JInfo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
@ -269,6 +270,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
splicingPrintingOrderNumber(headerDetailsDtoList, "stock", startTime, endTime, null);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else {
|
||||
|
@ -314,6 +316,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
splicingPrintingOrderNumber(headerDetailsDtoList, "tran", startTime, endTime, null);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStockTran(headerDetailsDtoList);
|
||||
} else {
|
||||
|
@ -355,6 +358,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("根据单据号查询:数据返回行数:{}", headerDetailsDtoList.size());
|
||||
splicingPrintingOrderNumber(headerDetailsDtoList, sceneType, null, null, code);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
|
@ -2716,4 +2720,22 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 打印出库单单号
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
private void splicingPrintingOrderNumber(List<HeaderDetailsDto> headerDetailsDtoList, String sceneType, String startTime, String endTime, String code) {
|
||||
try {
|
||||
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
|
||||
String codesJoined = headerDetailsDtoList.stream().map(HeaderDetailsDto::getHeader).map(HeaderDto::getCode).collect(Collectors.joining(","));
|
||||
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, codesJoined, startTime, endTime, code);
|
||||
} else {
|
||||
logger.info("{} 销售出库单号:{} 查询条件:{} ~ {} code:{}", sceneType, "无", startTime, endTime, code);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("splicingPrintingOrderNumber方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -227,13 +227,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
|
||||
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
|
||||
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
|
||||
queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
|
@ -242,7 +238,6 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
|
@ -369,24 +364,24 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
|
||||
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
|
||||
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES,EXCHANGE,REISSUE,NEIBULINGYONG,INPURCHASE,HUOFAN");
|
||||
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
//测试
|
||||
// for (int i = 0; i < headerDetailsDtoList.size(); i++) {
|
||||
// HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i);
|
||||
// HeaderDto header = headerDetailsDto.getHeader();
|
||||
// logger.info("CODE:" + header.getCode());
|
||||
// }
|
||||
logger.info("TOC数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetTran(headerDetailsDtoList);
|
||||
|
|
|
@ -270,6 +270,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
splicingPrintingOrderNumber(returnGoodHeaderDetailsDataDtoArrayList, "stock", startTime, endTime, null);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
|
@ -317,6 +318,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
splicingPrintingOrderNumber(returnGoodHeaderDetailsDataDtoArrayList, "tran", startTime, endTime, null);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
|
@ -361,6 +363,7 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
splicingPrintingOrderNumber(returnGoodHeaderDetailsDataDtoArrayList, sceneType, null, null, code);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
|
@ -2569,4 +2572,22 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
}
|
||||
return totalPayAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印售后入库单单号
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
private void splicingPrintingOrderNumber(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList, String sceneType, String startTime, String endTime, String code) {
|
||||
try {
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
String codesJoined = returnGoodHeaderDetailsDataDtoArrayList.stream().map(StockinOrderSearchResponse.StockinOrder::getHeader).map(StockinOrderSearchResponse.StockinOrder.StockinH::getCode).collect(Collectors.joining(","));
|
||||
logger.info("{} 售后入库单单号:{} 查询条件:{} ~ {} code:{}", sceneType, codesJoined, startTime, endTime, code);
|
||||
} else {
|
||||
logger.info("{} 售后入库单单号:{} 查询条件:{} ~ {} code:{}", sceneType, "无", startTime, endTime, code);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("splicingPrintingOrderNumber方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -79,7 +79,8 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024101700000270");
|
||||
|
||||
try {
|
||||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024102300053750", "tran");
|
||||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024110700023341", "stock");
|
||||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-23 16:09:59", "2024-10-23 16:10:01");
|
||||
|
||||
// String aaa = "LETS-SH2024103100016169";
|
||||
|
@ -88,7 +89,13 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-31 14:48:41", "2024-10-31 14:48:41");
|
||||
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024110500037199", "stock");
|
||||
// soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024110700026623", "tran");
|
||||
|
||||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-11-08 19:18:02", "2024-11-08 19:18:02");
|
||||
|
||||
|
||||
soSaleOutPluginInitializerToB.startImplementByTranTime("2000-11-08 19:18:02", "2000-11-08 19:18:02");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// String aaa = "LETS-SH2024102900016893";
|
||||
// soSaleOutPluginInitializerToC.startImplementStockByCode(aaa, "tran");
|
||||
|
||||
// soSaleOutPluginInitializerToC.startImplementStockByTime("2024-10-31 14:48:41", "2024-10-31 14:48:41");
|
||||
// soSaleOutPluginInitializerToC.startImplementTranByTime("2024-11-05 09:40:20", "2024-11-05 09:40:20");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
|
||||
try {
|
||||
// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024091900002878", "stock");
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110300036490", "tran");
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110500013375", "tran");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
public void startImplement() {
|
||||
// soSaleReturnPluginInitializerToC.startImplement(null, null);
|
||||
try {
|
||||
String code = "LETS-RE2024110500004678";
|
||||
soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
|
||||
// String code = "LETS-RE2024110500004678";
|
||||
// soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
|
||||
|
||||
try {
|
||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime("2024-10-21 00:00:00", "2024-10-21 23:59:59");
|
||||
soSaleReturnPluginInitializerToC.startImplementStockByTime("2024-11-01 00:00:00", "2024-11-01 23:59:59");
|
||||
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// soSaleReturnPluginInitializerToC.executeBusiness(jsonObject);
|
||||
|
|
Loading…
Reference in New Issue