| | |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.view.repository.ApiInfoDataRep; |
| | | import com.fzzy.otherview.gd2022.dto.GdApi1023; |
| | | import com.fzzy.otherview.gd2022.dto.GdApi1023Way; |
| | | 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 com.fzzy.push.gd2022.ApiCodeConstant; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | |
| | | /** |
| | | * 获取列表信息 |
| | | * whjlApi1207PR#listData |
| | | * whjlApi1206PR#listData |
| | | * |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取列表信息 |
| | | * 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("备注信息"); |
| | | |
| | | data.setHtspqdList(JSON.toJSONString(data.getHtspqd())); |
| | | 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 |
| | |
| | | |
| | | /** |
| | | * 删除合同商品清单 |
| | | * whjlApi1207PR#delItem |
| | | * whjlApi1206PR#delItem |
| | | * |
| | | * @param data |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 上传 |
| | | * whjlApi1207PR#pushData |
| | | * whjlApi1206PR#pushData |
| | | * |
| | | * @param items |
| | | * @return |
| | |
| | | } |
| | | |
| | | //封装参数 |
| | | 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()); |
| | |
| | | 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()); |
| | | |