丽知:1、toc/tob仅退款修改日期取值问题(23:59:59取不到)
This commit is contained in:
parent
9d6966498c
commit
c06610b90c
|
@ -58,6 +58,7 @@ import java.util.stream.Collectors;
|
||||||
* refundInd:1 退款
|
* refundInd:1 退款
|
||||||
* <p>
|
* <p>
|
||||||
* 按天推送
|
* 按天推送
|
||||||
|
* 因为ofs 的接口查询限制原因>= < 故取2024-12-12当天单据时 : 2024-12-12 00:00:00 / 2024-12-13 00:00:00 ,单据日期为12-12丹当天的所有数据,tmdofs
|
||||||
*
|
*
|
||||||
* @Date:2024/9/21 17:19
|
* @Date:2024/9/21 17:19
|
||||||
*/
|
*/
|
||||||
|
@ -163,8 +164,8 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
||||||
String previousDay = today.minusDays(1).toString();
|
String previousDay = today.minusDays(1).toString();
|
||||||
|
|
||||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||||
queryReturnOrderRequestVO.setRefundedAt_start(previousDay+" 00:00:00");
|
queryReturnOrderRequestVO.setRefundedAt_start(previousDay + " 00:00:00");
|
||||||
queryReturnOrderRequestVO.setRefundedAt_end(previousDay+" 23:59:59");
|
queryReturnOrderRequestVO.setRefundedAt_end(today + " 00:00:00");
|
||||||
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
||||||
if (returnGoodsOrders == null || returnGoodsOrders.size() == 0) {
|
if (returnGoodsOrders == null || returnGoodsOrders.size() == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -224,16 +225,15 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款时间区间
|
* 退款时间区间
|
||||||
*
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
*/
|
*/
|
||||||
public void start(String startTime, String endTime) {
|
public void start(String startTime, String endTime) {
|
||||||
try {
|
try {
|
||||||
Date business_start = DateUtil.parse(startTime);
|
LocalDate start_parse = LocalDate.parse(startTime);
|
||||||
Date business_end = DateUtil.parse(endTime);
|
LocalDate end_parse = LocalDate.parse(endTime).plusDays(1);
|
||||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
|
||||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
String start = start_parse + " 00:00:00";
|
||||||
|
String end = end_parse + " 00:00:00";
|
||||||
|
|
||||||
|
|
||||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||||
queryReturnOrderRequestVO.setRefundedAt_start(start);
|
queryReturnOrderRequestVO.setRefundedAt_start(start);
|
||||||
|
|
|
@ -48,6 +48,7 @@ import org.springframework.stereotype.Service;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ import java.util.stream.Collectors;
|
||||||
* refundInd:1 退款
|
* refundInd:1 退款
|
||||||
* <p>
|
* <p>
|
||||||
* 按天推送
|
* 按天推送
|
||||||
|
* 因为ofs 的接口查询限制原因>= < 故取2024-12-12当天单据时 : 2024-12-12 00:00:00 / 2024-12-13 00:00:00 ,单据日期为12-12丹当天的所有数据,tmdofs
|
||||||
*
|
*
|
||||||
* @Date:2024/9/21 17:19
|
* @Date:2024/9/21 17:19
|
||||||
*/
|
*/
|
||||||
|
@ -165,8 +167,8 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
String previousDay = today.minusDays(1).toString();
|
String previousDay = today.minusDays(1).toString();
|
||||||
|
|
||||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||||
queryReturnOrderRequestVO.setRefundedAt_start(previousDay+" 00:00:00");
|
queryReturnOrderRequestVO.setRefundedAt_start(previousDay + " 00:00:00");
|
||||||
queryReturnOrderRequestVO.setRefundedAt_end(previousDay+" 23:59:59");
|
queryReturnOrderRequestVO.setRefundedAt_end(today + " 00:00:00");
|
||||||
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
|
||||||
if (returnGoodsOrders == null || returnGoodsOrders.size() == 0) {
|
if (returnGoodsOrders == null || returnGoodsOrders.size() == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -226,16 +228,15 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款时间区间
|
* 退款时间区间
|
||||||
*
|
|
||||||
* @param startTime
|
|
||||||
* @param endTime
|
|
||||||
*/
|
*/
|
||||||
public void start(String startTime, String endTime) {
|
public void start(String startTime, String endTime) {
|
||||||
try {
|
try {
|
||||||
Date business_start = DateUtil.parse(startTime);
|
|
||||||
Date business_end = DateUtil.parse(endTime);
|
LocalDate start_parse = LocalDate.parse(startTime);
|
||||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
LocalDate end_parse = LocalDate.parse(endTime).plusDays(1);
|
||||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
|
||||||
|
String start = start_parse + " 00:00:00";
|
||||||
|
String end = end_parse + " 00:00:00";
|
||||||
|
|
||||||
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
|
||||||
queryReturnOrderRequestVO.setRefundedAt_start(start);
|
queryReturnOrderRequestVO.setRefundedAt_start(start);
|
||||||
|
@ -307,7 +308,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
List<RerturnGoodsOrderSearchData> filterRefundOnly = new ArrayList<>();
|
List<RerturnGoodsOrderSearchData> filterRefundOnly = new ArrayList<>();
|
||||||
for (RerturnGoodsOrderSearchData rerturnGoodsOrderSearchDatum : rerturnGoodsOrderSearchData) {
|
for (RerturnGoodsOrderSearchData rerturnGoodsOrderSearchDatum : rerturnGoodsOrderSearchData) {
|
||||||
RerturnGoodsOrderSearchHeader header = rerturnGoodsOrderSearchDatum.getHeader();
|
RerturnGoodsOrderSearchHeader header = rerturnGoodsOrderSearchDatum.getHeader();
|
||||||
if ("0".equals(header.getReturnType()) && "0".equals(header.getExchangeType()) && "1".equals(header.getRefundInd())&&("300".equals(header.getReturnNode())||"200".equals(header.getReturnNode()))) {
|
if ("0".equals(header.getReturnType()) && "0".equals(header.getExchangeType()) && "1".equals(header.getRefundInd()) && ("300".equals(header.getReturnNode()) || "200".equals(header.getReturnNode()))) {
|
||||||
filterRefundOnly.add(rerturnGoodsOrderSearchDatum);
|
filterRefundOnly.add(rerturnGoodsOrderSearchDatum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,7 +325,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
|
RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
|
||||||
|
|
||||||
//过滤"NMNS"\"YNS"\"HJ"
|
//过滤"NMNS"\"YNS"\"HJ"
|
||||||
if("NMNS".equals(header.getCompanyCode())||"YNS".equals(header.getCompanyCode())||"HJ".equals(header.getCompanyCode())){
|
if ("NMNS".equals(header.getCompanyCode()) || "YNS".equals(header.getCompanyCode()) || "HJ".equals(header.getCompanyCode())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,13 +422,13 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
parentvo.setWldx("0");
|
parentvo.setWldx("0");
|
||||||
//hbbm 客商==店铺,根据店铺区分tob、toc,,,编码需要转换,转换称自定义项。
|
//hbbm 客商==店铺,根据店铺区分tob、toc,,,编码需要转换,转换称自定义项。
|
||||||
BdCubasdocEntity entity = queryU8CEntityUtil.getFuzzyQueryCustomers(split[1]);
|
BdCubasdocEntity entity = queryU8CEntityUtil.getFuzzyQueryCustomers(split[1]);
|
||||||
if(entity==null){
|
if (entity == null) {
|
||||||
Assert.state(false,"根据客商自定义项1:{},未查询到客商基本档案,请假查。",split[1]);
|
Assert.state(false, "根据客商自定义项1:{},未查询到客商基本档案,请假查。", split[1]);
|
||||||
}
|
}
|
||||||
parentvo.setHbbm(entity.getCustcode());
|
parentvo.setHbbm(entity.getCustcode());
|
||||||
//根据店铺区分tob、toc,区分业务流程
|
//根据店铺区分tob、toc,区分业务流程
|
||||||
String s = checkFlow(parentvo, split[1]);
|
String s = checkFlow(parentvo, split[1]);
|
||||||
if("TOB".equals(s)){
|
if ("TOB".equals(s)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//deptid 部门
|
//deptid 部门
|
||||||
|
@ -474,7 +475,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
//20241127:没有sku编码的过滤
|
//20241127:没有sku编码的过滤
|
||||||
r1.clear();
|
r1.clear();
|
||||||
for (RerturnGoodsOrderSearchDetails logDetail : logDetails) {
|
for (RerturnGoodsOrderSearchDetails logDetail : logDetails) {
|
||||||
if(logDetail.getSkuCode()==null||"".equals(logDetail.getSkuCode())) {
|
if (logDetail.getSkuCode() == null || "".equals(logDetail.getSkuCode())) {
|
||||||
continue;
|
continue;
|
||||||
// IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
// IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
// integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
// integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_N);
|
||||||
|
@ -486,11 +487,11 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
// integrationTaskLivingDetailsEntity.setRootAppBill(logDetail.getReturnOrderCode());
|
// integrationTaskLivingDetailsEntity.setRootAppBill(logDetail.getReturnOrderCode());
|
||||||
// integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
// integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
// saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
// saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
}else {
|
} else {
|
||||||
r1.add(logDetail);
|
r1.add(logDetail);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(r1.size()==0){
|
if (r1.size() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +606,7 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsDetail.getReturnOrderCode() + "_" + ofsDetail.getSkuCode());
|
integrationTaskLivingDetailsEntity.setRootAppPk(ofsDetail.getReturnOrderCode() + "_" + ofsDetail.getSkuCode());
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsDetail.getReturnOrderCode());//仅退款单号
|
integrationTaskLivingDetailsEntity.setRootAppBill(ofsDetail.getReturnOrderCode());//仅退款单号
|
||||||
integrationTaskLivingDetailsEntity.setNewSystemNumber(split[0]+"_"+djbh);
|
integrationTaskLivingDetailsEntity.setNewSystemNumber(split[0] + "_" + djbh);
|
||||||
integrationTaskLivingDetailsEntity.setNewSystemPrimary(vouchid);
|
integrationTaskLivingDetailsEntity.setNewSystemPrimary(vouchid);
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
|
@ -665,10 +666,11 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公司转换
|
* 公司转换
|
||||||
|
*
|
||||||
* @param allHeader
|
* @param allHeader
|
||||||
*/
|
*/
|
||||||
public void transCorp(List<RerturnGoodsOrderSearchHeader> allHeader){
|
public void transCorp(List<RerturnGoodsOrderSearchHeader> allHeader) {
|
||||||
if(allHeader.size()==0){
|
if (allHeader.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,20 +682,22 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
|
||||||
* TOC仅退款:JTK TOB仅退款:BJTK
|
* TOC仅退款:JTK TOB仅退款:BJTK
|
||||||
* parentvo.setXslxbm("JTK");
|
* parentvo.setXslxbm("JTK");
|
||||||
* 非b及c
|
* 非b及c
|
||||||
|
*
|
||||||
* @param parentvo
|
* @param parentvo
|
||||||
* @param shop
|
* @param shop
|
||||||
*/
|
*/
|
||||||
@Autowired
|
@Autowired
|
||||||
private ShopTobOrToCUtil shopTobOrToCUtil;
|
private ShopTobOrToCUtil shopTobOrToCUtil;
|
||||||
public String checkFlow(ArapDjzbVO.Parentt parentvo,String shop){
|
|
||||||
|
public String checkFlow(ArapDjzbVO.Parentt parentvo, String shop) {
|
||||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||||
System.out.println(tobShop);
|
System.out.println(tobShop);
|
||||||
System.out.println(tocShop);
|
System.out.println(tocShop);
|
||||||
if(tobShop.contains(shop)){
|
if (tobShop.contains(shop)) {
|
||||||
// parentvo.setXslxbm("BJTK");//TOB
|
// parentvo.setXslxbm("BJTK");//TOB
|
||||||
return "TOB";
|
return "TOB";
|
||||||
}else {
|
} else {
|
||||||
// parentvo.setXslxbm("JTK");//TOC
|
// parentvo.setXslxbm("JTK");//TOC
|
||||||
return "TOC";
|
return "TOC";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue