丽知:调拨出入库,调整出入库接口修改。
This commit is contained in:
parent
bfb2049fe8
commit
059e95de67
|
@ -11,6 +11,10 @@ public class QueryOfsStockinOrderRequestVO {
|
|||
private String created_start;
|
||||
/** 结束时间 */
|
||||
private String created_end;
|
||||
|
||||
private String closedAt_start;
|
||||
private String closedAt_end;
|
||||
|
||||
/** 组织 */
|
||||
private String clientCode;
|
||||
/** 入库单号 */
|
||||
|
|
|
@ -11,6 +11,10 @@ public class QueryOfsStockoutOrderRequestVO {
|
|||
private String created_start;
|
||||
/** 结束时间 */
|
||||
private String created_end;
|
||||
|
||||
private String closedAt_start;
|
||||
private String closedAt_end;
|
||||
|
||||
/** 组织 */
|
||||
private String clientCode;
|
||||
/** 库单号 */
|
||||
|
|
|
@ -358,7 +358,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.receipt.search");
|
||||
// queryOfsStockinOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
|
@ -366,15 +366,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
if (stockinOrderSearchResponse.getData() == null || stockinOrderSearchResponse.getData().size() == 0) {
|
||||
return null;
|
||||
}
|
||||
//过滤ADJUST调整
|
||||
List<StockinOrderSearchResponse.StockinOrder> adjustList = new ArrayList<>();
|
||||
for (StockinOrderSearchResponse.StockinOrder datum : stockinOrderSearchResponse.getData()) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = datum.getHeader();
|
||||
if ("ADJUST".equals(header.getInternalInstructionType())) {
|
||||
adjustList.add(datum);
|
||||
}
|
||||
}
|
||||
return adjustList;
|
||||
return stockinOrderSearchResponse.getData();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -89,9 +89,11 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCreated_start("2024-08-05 00:00:00");
|
||||
queryOfsStockinOrderRequestVO.setCreated_end("2024-08-09 23:59:59");
|
||||
queryOfsStockinOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsStockinOrderRequestVO.setCreated_start("2024-08-05 00:00:00");
|
||||
// queryOfsStockinOrderRequestVO.setCreated_end("2024-08-09 23:59:59");
|
||||
queryOfsStockinOrderRequestVO.setClosedAt_start("2024-08-05 00:00:00");
|
||||
queryOfsStockinOrderRequestVO.setClosedAt_end("2024-08-09 23:59:59");
|
||||
// queryOfsStockinOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
|
@ -113,6 +115,16 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
*/
|
||||
public void start(String stockinNo) {
|
||||
try {
|
||||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCode(stockinNo);
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> data = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String goodsName)方法报错:", e);
|
||||
}
|
||||
|
@ -128,6 +140,17 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
Date business_end = DateUtil.parse(endTime);
|
||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setClosedAt_start("2024-08-05 00:00:00");
|
||||
queryOfsStockinOrderRequestVO.setClosedAt_end("2024-08-09 23:59:59");
|
||||
// queryOfsStockinOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> data = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨入库订单--->U8C调拨订单(保存签字,自动生成调拨出入库),start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
|
@ -137,7 +160,7 @@ public class TransferInPluginInitializer extends PluginBaseEntity {
|
|||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.receipt.search");
|
||||
// queryOfsStockinOrderRequestVO.setInternalInstructionType("ADJUST");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setInternalInstructionType("TRANSFER");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
|
|
|
@ -6,11 +6,13 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockoutOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockoutOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -88,14 +90,14 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO = new QueryOfsStockinOrderRequestVO();
|
||||
queryOfsStockinOrderRequestVO.setCreated_start("2024-08-05 00:00:00");
|
||||
queryOfsStockinOrderRequestVO.setCreated_end("2024-08-09 23:59:59");
|
||||
queryOfsStockinOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsTransferOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockinOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockinOrderRequestVO.setPageSize(500L);
|
||||
List<StockinOrderSearchResponse.StockinOrder> data = queryOfsStockinOrder(queryOfsStockinOrderRequestVO);
|
||||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_start(startTimeStr);
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_end(endTimeStr);
|
||||
// queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> data = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
//过滤日志
|
||||
|
@ -113,6 +115,15 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
*/
|
||||
public void start(String stockinNo) {
|
||||
try {
|
||||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setCode(stockinNo);
|
||||
// queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> data = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨出库订单--->U8C调拨出库单(保存签字),start(String goodsName)方法报错:", e);
|
||||
}
|
||||
|
@ -128,31 +139,34 @@ public class TransferOutPluginInitializer extends PluginBaseEntity {
|
|||
Date business_end = DateUtil.parse(endTime);
|
||||
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
||||
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||
|
||||
QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO = new QueryOfsStockoutOrderRequestVO();
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_start(start);
|
||||
queryOfsStockoutOrderRequestVO.setClosedAt_end(end);
|
||||
// queryOfsStockoutOrderRequestVO.setCompanyCode("SHXM");
|
||||
// queryOfsStockoutOrderRequestVO.setStatus("900");//状态 500待同步 510已同步 700收货中 900入库完成 911作废 100订单池 200暂挂 400待合单 410待出库单出库
|
||||
queryOfsStockoutOrderRequestVO.setPageNo(1L);
|
||||
queryOfsStockoutOrderRequestVO.setPageSize(500L);
|
||||
List<StockoutOrderSearchResponse.StockoutOrder> data = queryOfsStockoutOrder(queryOfsStockoutOrderRequestVO);
|
||||
System.out.println(data);
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("丽知:OFS调拨出库订单--->U8C调拨出库单(保存签字),start(String startTime, String endTime)方法报错:", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<StockinOrderSearchResponse.StockinOrder> queryOfsStockinOrder(QueryOfsStockinOrderRequestVO queryOfsStockinOrderRequestVO) throws Exception {
|
||||
public List<StockoutOrderSearchResponse.StockoutOrder> queryOfsStockoutOrder(QueryOfsStockoutOrderRequestVO queryOfsStockoutOrderRequestVO) throws Exception {
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.shipment.search");
|
||||
queryOfsStockinOrderRequestVO.setInternalInstructionType("TRANSFER");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockinOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockinOrderRequestVO));
|
||||
StockinOrderSearchResponse stockinOrderSearchResponse = (StockinOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(stockinOrderSearchResponse);
|
||||
if(stockinOrderSearchResponse.getData()==null||stockinOrderSearchResponse.getData().size()==0){
|
||||
queryOfsStockoutOrderRequestVO.setInternalInstructionType("TRANSFER");//入库单类型 SALES销售 EXCHANGE换货 REISSUE补发RETURN销退 PURCHASE采购 PURCHASE_RETURN采退 TRANSFER调拨 WORK_ORDER加工 OTHER其他 ADJUST调整 EXCHANGE换货
|
||||
queryOfsStockoutOrderRequestVO.setClientCode("LETS");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsStockoutOrderRequestVO));
|
||||
StockoutOrderSearchResponse stockoutOrderSearchResponse = (StockoutOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(stockoutOrderSearchResponse);
|
||||
if(stockoutOrderSearchResponse.getData()==null||stockoutOrderSearchResponse.getData().size()==0){
|
||||
return null;
|
||||
}
|
||||
//过滤ADJUST调整
|
||||
List<StockinOrderSearchResponse.StockinOrder> adjustList=new ArrayList<>();
|
||||
for (StockinOrderSearchResponse.StockinOrder datum : stockinOrderSearchResponse.getData()) {
|
||||
StockinOrderSearchResponse.StockinOrder.StockinH header = datum.getHeader();
|
||||
if("ADJUST".equals(header.getInternalInstructionType())){
|
||||
adjustList.add(datum);
|
||||
}
|
||||
}
|
||||
return adjustList;
|
||||
return stockoutOrderSearchResponse.getData();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<!--调拨-->
|
||||
<bean name="transferPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.transfer.TransferPluginInitializer"/>
|
||||
<bean name="transferInPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.transfer.TransferInPluginInitializer"/>
|
||||
<bean name="transferOutPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.transfer.TransferOutPluginInitializer"/>
|
||||
<!--调整-->
|
||||
<bean name="adjustInPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.adjust.AdjustInPluginInitializer"/>
|
||||
<bean name="adjustOutPluginInitializer" class="com.hzya.frame.plugin.lets.plugin.adjust.AdjustOutPluginInitializer"/>
|
||||
|
|
|
@ -18,6 +18,8 @@ public class TransferTest {
|
|||
@Autowired
|
||||
private TransferInPluginInitializer transferInPluginInitializer;
|
||||
@Autowired
|
||||
private TransferOutPluginInitializer transferOutPluginInitializer;
|
||||
@Autowired
|
||||
private AdjustInPluginInitializer adjustInPluginInitializer;
|
||||
@Autowired
|
||||
private AdjustOutPluginInitializer adjustOutPluginInitializer;
|
||||
|
@ -36,6 +38,16 @@ public class TransferTest {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////调拨出库单
|
||||
|
||||
@Test
|
||||
public void t10(){
|
||||
transferOutPluginInitializer.start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void t11(){
|
||||
transferOutPluginInitializer.start("2024-08-06","2024-08-11");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////调拨入库单
|
||||
@Test
|
||||
public void t20(){
|
||||
|
@ -43,7 +55,7 @@ public class TransferTest {
|
|||
}
|
||||
@Test
|
||||
public void t21(){
|
||||
transferInPluginInitializer.start("LETS-TH2024080800000003");
|
||||
transferInPluginInitializer.start("LETS-RE2024080800000002");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue