package org.ta.pddserver.service;

import com.alibaba.fastjson.JSONObject;
import org.ta.pddserver.model.pddjy.request.*;
import org.ta.pddserver.model.pddjy.response.PddServiceConsoDerelictionResponse;
import org.ta.pddserver.model.pddjy.response.PddServiceConsoSelfSiteSyncResponse;

public class PddService {

    // 一段集运单实操状态通知
    public void firstBizActionNotify() {
        PddServiceConsoFirstBizActionNotifyRequest notifyRequest = new PddServiceConsoFirstBizActionNotifyRequest();
        JSONObject resp = PddSend(notifyRequest);
        // todo 仅检测状态，无需特殊处理
    }

    // 合包单实操状态通知
    public void coBizActionNotify() {
        PddServiceConsoCoBizActionNotifyRequest notifyRequest = new PddServiceConsoCoBizActionNotifyRequest();
        JSONObject resp = PddSend(notifyRequest);
        // todo 仅检测状态，无需特殊处理
    }

    // 仓库入库
    public void inbound() {
        PddServiceConsoInboundRequest inboundRequest = new PddServiceConsoInboundRequest();
        JSONObject resp = PddSend(inboundRequest);
        // todo 仅检测状态，无需特殊处理
    }

    // 仓库出库
    public void outbound() {
        PddServiceConsoOutboundRequest outboundRequest = new PddServiceConsoOutboundRequest();
        JSONObject resp = PddSend(outboundRequest);
        // todo 仅检测状态，无需特殊处理
    }

    // 自提网点同步
    public void selfSiteSync() {
        PddServiceConsoSelfSiteSyncRequest syncRequest = new PddServiceConsoSelfSiteSyncRequest();
        JSONObject resp = PddSend(syncRequest);
        PddServiceConsoSelfSiteSyncResponse respObj;
        // todo 需解析回复数据
    }

    // 无主件识别
    public void dereliction() {
        PddServiceConsoDerelictionRequest derelictionRequest = new PddServiceConsoDerelictionRequest();
        JSONObject resp = PddSend(derelictionRequest);
        PddServiceConsoDerelictionResponse respObj;
        // todo 需解析回复数据
    }

    // 自提网点同步
    public void problemOrderNotigy() {
        PddServiceConsoProblemOrderNotifyRequest notifyRequest = new PddServiceConsoProblemOrderNotifyRequest();
        JSONObject resp = PddSend(notifyRequest);
        // todo 仅检测状态，无需特殊处理
    }

    public static JSONObject PddSend(Object request) {
        return null;
    }
}
