czt
2 天以前 9f6dacf7b39e5aeba37d8faf575c9e56d8cbe51a
src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1206PR.java
@@ -18,7 +18,6 @@
import com.fzzy.api.view.repository.ApiInfoDataRep;
import com.fzzy.otherview.whhpjl.WhjlConstant;
import com.fzzy.otherview.whhpjl.dto.WhjlApi1206;
import com.fzzy.otherview.whhpjl.dto.WhjlApi1206;
import com.fzzy.otherview.whhpjl.dto.WhjlQDItem;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -52,7 +51,7 @@
    /**
     * 获取列表信息
     * whjlApi1207PR#listData
     * whjlApi1206PR#listData
     *
     * @return
     */
@@ -110,42 +109,46 @@
    /**
     * 获取列表信息
     * whjlApi1207PR#listItem
     * whjlApi1206PR#listItem
     *
     * @return
     */
    @DataProvider
    public List<WhjlQDItem> listItem(String id) {
        return null;
    public List<WhjlQDItem> listItem(String code) {
        return JSON.parseArray(code, WhjlQDItem.class);
    }
    /**
     * 更新或修改
     * whjlApi1207PR#saveData
     * whjlApi1206PR#saveData
     *
     * @param data
     * @return
     */
    @DataResolver
    public void saveData(WhjlApi1206 data) {
        ApiInfoData infoData = new ApiInfoData();
        infoData.setId(data.getBizId());
        infoData.setKqdm(data.getKqdm());
        infoData.setInteType(WhjlConstant.API_CATEGORY_12);
        infoData.setInteId(WhjlConstant.API_CODE_1207);
        infoData.setUpdateTime(new Date());
        infoData.setDataId(data.getBizId());
        infoData.setData(JSON.toJSONString(data));
        infoData.setCzbz(data.getCzbz());
        infoData.setRemarks("备注信息");
        ApiInfoData infoData;
        List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(WhjlConstant.API_CODE_1206, data.getBizId(), data.getKqdm());
        if (apiInfoList.size() != 0) {
            infoData = apiInfoList.get(0);
            infoData.setData(JSON.toJSONString(data));
        } else {
            infoData = new ApiInfoData();
            infoData.setId(data.getBizId());
            infoData.setKqdm(data.getKqdm());
            infoData.setInteId(WhjlConstant.API_CODE_1206);
            infoData.setUpdateTime(new Date());
            infoData.setDataId(data.getBizId());
            infoData.setData(JSON.toJSONString(data));
            infoData.setCzbz(Constant.CZBZ_I);
            infoData.setRemarks("备注信息");
        }
        apiInfoDataRep.save(infoData);
    }
    /**
     * 删除
     * whjlApi1207PR#delData
     * whjlApi1206PR#delData
     *
     * @param data
     * @return
@@ -158,7 +161,7 @@
    /**
     * 删除合同商品清单
     * whjlApi1207PR#delItem
     * whjlApi1206PR#delItem
     *
     * @param data
     * @return
@@ -170,7 +173,7 @@
    /**
     * 上传
     * whjlApi1207PR#pushData
     * whjlApi1206PR#pushData
     *
     * @param items
     * @return
@@ -188,7 +191,7 @@
        }
        //封装参数
        ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_12, WhjlConstant.API_CODE_1207);
        ApiParam param = new ApiParam(apiConf, WhjlConstant.API_CATEGORY_12, WhjlConstant.API_CODE_1206);
        //获取实现接口
        ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -207,7 +210,7 @@
                    infoData.setId(data.getBizId());
                    infoData.setKqdm(data.getKqdm());
                    infoData.setInteType(WhjlConstant.API_CATEGORY_12);
                    infoData.setInteId(WhjlConstant.API_CODE_1207);
                    infoData.setInteId(WhjlConstant.API_CODE_1206);
                    infoData.setUpdateTime(new Date());
                    infoData.setDataId(data.getBizId());