refactor(sales): 重构被动入库流程
- 修改类名:将 SoSaleReturnPluginInitializerToC 改为 PassiveWarehouseReceiptToC - 移除未使用的 pushScenarioType 参数 - 修正 QueryOfsSoSaleOutVo 中的字段名:code 改为 receiptCode - 删除未使用的 REFERENCE_SHOP_LIST 中的空格- 更新相关测试用例
This commit is contained in:
parent
344de0fb40
commit
f90d6db61b
|
@ -49,5 +49,5 @@ public class ProfilesActiveConstant {
|
||||||
//2:o->中台->u8c
|
//2:o->中台->u8c
|
||||||
public static final String PUSH_SCENE_TYPE_2 = "2";
|
public static final String PUSH_SCENE_TYPE_2 = "2";
|
||||||
//toc/tob仅退款使用,需要去存货管理档案参考售价的店铺
|
//toc/tob仅退款使用,需要去存货管理档案参考售价的店铺
|
||||||
public static final List<String> REFERENCE_SHOP_LIST = Arrays.asList("DLTer", "XZJJ", "FANG-Q-L-NEW", "pdd-yanxi-new", "FANG-Q-L", "pdd-yanxi");
|
public static final List<String> REFERENCE_SHOP_LIST = Arrays.asList("DLTer", "XZJJ", "FANG-Q-L-NEW", "pdd-yanxi-new", "FANG-Q-L", "pdd-yanxi");
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,4 +64,6 @@ public class QueryOfsSoSaleOutVo {
|
||||||
private String relatedAt_start;
|
private String relatedAt_start;
|
||||||
//无源入库确认单关联时间-结束
|
//无源入库确认单关联时间-结束
|
||||||
private String relatedAt_end;
|
private String relatedAt_end;
|
||||||
|
//无源入库单号
|
||||||
|
private String receiptCode;
|
||||||
}
|
}
|
|
@ -144,7 +144,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginId() {
|
public String getPluginId() {
|
||||||
return "sales.SoSaleReturnPluginInitializerToC";
|
return "sales.PassiveWarehouseReceiptToC";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -177,7 +177,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
try {
|
try {
|
||||||
String param = String.valueOf(requestJson.get("param"));
|
String param = String.valueOf(requestJson.get("param"));
|
||||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||||
String pushScenarioType = String.valueOf(requestJson.get("pushScenarioType"));
|
// String pushScenarioType = String.valueOf(requestJson.get("pushScenarioType"));
|
||||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||||
//按单号
|
//按单号
|
||||||
if (param != null && !"".equals(param)) {
|
if (param != null && !"".equals(param)) {
|
||||||
|
@ -187,7 +187,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
//前台页面功能日期推送,或者接口调用也行
|
//前台页面功能日期推送,或者接口调用也行
|
||||||
String craeteDateStr = computingTime(param);
|
String craeteDateStr = computingTime(param);
|
||||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||||
splitDateAndPush(craeteDateStr, sceneType, pushScenarioType);
|
splitDateAndPush(craeteDateStr, sceneType);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||||
|
@ -291,7 +291,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
List<PassiveStorageResponse.Data> passiveStorageResponseDataList = new ArrayList<>();
|
List<PassiveStorageResponse.Data> passiveStorageResponseDataList = new ArrayList<>();
|
||||||
|
|
||||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
queryOfsSoSaleOutVo.setCode(code);
|
queryOfsSoSaleOutVo.setReceiptCode(code);
|
||||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||||
|
@ -2530,7 +2530,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
*
|
*
|
||||||
* @author liuyang
|
* @author liuyang
|
||||||
*/
|
*/
|
||||||
public void splitDateAndPush(String param, String sceneType, String pushScenarioType) throws Exception {
|
public void splitDateAndPush(String param, String sceneType) throws Exception {
|
||||||
try {
|
try {
|
||||||
Assert.notNull(param, "param不能为空!");
|
Assert.notNull(param, "param不能为空!");
|
||||||
Assert.state(!"".equals(param), "param不能为空!");
|
Assert.state(!"".equals(param), "param不能为空!");
|
||||||
|
@ -2538,8 +2538,8 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
Assert.notNull(sceneType, "sceneType不能为空!");
|
Assert.notNull(sceneType, "sceneType不能为空!");
|
||||||
Assert.state(!"".equals(sceneType), "sceneType不能为空!");
|
Assert.state(!"".equals(sceneType), "sceneType不能为空!");
|
||||||
|
|
||||||
Assert.notNull(pushScenarioType, "pushScenarioType不能为空!");
|
// Assert.notNull(pushScenarioType, "pushScenarioType不能为空!");
|
||||||
Assert.state(!"".equals(pushScenarioType), "pushScenarioType不能为空!");
|
// Assert.state(!"".equals(pushScenarioType), "pushScenarioType不能为空!");
|
||||||
|
|
||||||
if (param.contains("*")) {
|
if (param.contains("*")) {
|
||||||
String[] params = param.split("\\*");
|
String[] params = param.split("\\*");
|
||||||
|
|
|
@ -30,7 +30,9 @@ public class PassiveWarehouseReceiptToCTest {
|
||||||
//测试O无源件入库
|
//测试O无源件入库
|
||||||
// passiveWarehouseReceiptToC.startImplementStockByTime("2025-03-11 22:27:02", "2025-03-11 22:27:02");
|
// passiveWarehouseReceiptToC.startImplementStockByTime("2025-03-11 22:27:02", "2025-03-11 22:27:02");
|
||||||
//测试O无源生成红字应收
|
//测试O无源生成红字应收
|
||||||
passiveWarehouseReceiptToC.startImplementByTradeTime("2025-03-11 22:27:02", "2025-03-11 22:27:02");
|
// passiveWarehouseReceiptToC.startImplementByTradeTime("2025-03-11 22:27:02", "2025-03-11 22:27:02");
|
||||||
|
|
||||||
|
passiveWarehouseReceiptToC.startImplementByCode("1111", "stock");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue