吴学文
2019-07-06 8a524787c88a9128cc69af890d4181a01aad0e8c
java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java
@@ -18,8 +18,9 @@
 */
public class OrderDataFlow extends AbstractOrderDataFlowContext {
    public OrderDataFlow(){}
    protected OrderDataFlow(Date startDate, String code) {
    public OrderDataFlow(Date startDate, String code) {
        super(startDate, code);
    }
@@ -73,12 +74,15 @@
        Assert.isJsonObject(reqInfo,"当前报文不是有效json,请检查"+reqInfo);
         this.setDataFlowId(UUID.randomUUID().toString().replace("-","").toLowerCase());
        //赋值请求报文
        this.setResJson(JSONObject.parseObject(reqInfo));
        this.setReqJson(JSONObject.parseObject(reqInfo));
        //赋值 请求头信息
        this.setReqHeaders(headerAll);
        //构建返回头
        builderResHeaders();
        //构建返回json 为{"msg":[]}
        builderResJson();
        //构建 订单信息
        builderOrders();
@@ -123,7 +127,7 @@
        Assert.isDate(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME),"构建OrderDataFlow对象失败,请求头中"+CommonConstant.HTTP_REQ_TIME+"格式错误");
        this.orders.setRequestTime(DateUtil.getDefaultDateFromString(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME)));
        this.orders.setRequestTime(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME));
        this.orders.setoId("-1");
@@ -160,7 +164,7 @@
        this.businessList = new ArrayList<Business>();
        JSONArray tmpBusiness = this.getResJson().getJSONArray("business");
        JSONArray tmpBusiness = this.getReqJson().getJSONArray("business");
        Business business = null;
        for (int tmpBusinessIndex = 0;tmpBusinessIndex < tmpBusiness.size();tmpBusinessIndex++){
@@ -213,6 +217,15 @@
        }
    }
    /**
     * 初始化构建返回报文
     */
    private void builderResJson(){
        JSONObject resJson = new JSONObject();
        resJson.put("msg",new JSONArray());
        this.setResJson(resJson);
    }
    public Orders getOrders() {
        return orders;