Commit 65a9b1aa authored by wangqiang's avatar wangqiang

增加fegin接口

parent 52d141d5
......@@ -42,10 +42,8 @@ public class ExtIncomeContractController<V extends ExtIncomeContractVO, S extend
@ApiOperation(value = "xxx年到款计算", notes = "xxx年到款计算", httpMethod = "GET")
@GetMapping("/calculateIncome")
public ApiResult calculateIncomeByYear(@RequestParam Long id, String year) {
ExtIncomeContractVO extIncomeContractVO = extIncomeContractService.findRecursionExtIncomeContractVO(id);
//通过收入基本属性id获取多个收入信息
extIncomeContractService.calculateIncomeByYear(id, year,extIncomeContractVO);
return ApiResult.ok(extIncomeContractVO);
//todo wq:因为service继承了feign接口,所以要service接口必须实现feign接口,故将逻辑代码放入service中
return ApiResult.ok(extIncomeContractService.calculateIncomeByYear(id,year));
}
}
......
......@@ -8,9 +8,11 @@ import com.yonde.dcs.plan.core.service.ExtPaymentDetailsService;
import com.yonde.dex.basedata.data.search.SearchItem;
import com.yonde.dex.basedata.data.search.SearchItems;
import com.yonde.dex.basedata.data.search.SearchQueryCondition;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.yonde.dex.basedata.entity.data.DxPageImpl;
import com.yonde.dex.basedata.entity.data.OperatorType;
import com.yonde.dex.dao.service.util.DxPageUtils;
import lombok.val;
import org.springframework.stereotype.Service;
import io.swagger.annotations.ApiOperation;
......@@ -86,6 +88,14 @@ public class ExtIncomeContractServiceImpl<V extends ExtIncomeContractVO> impleme
return extIncomeContractVO1;
}
@Override
public ExtIncomeContractVO calculateIncomeByYear(Long id, String year) {
ExtIncomeContractVO extIncomeContractVO = this.findRecursionExtIncomeContractVO(id);
//通过收入基本属性id获取多个收入信息
this.calculateIncomeByYear(id, year,extIncomeContractVO);
return extIncomeContractVO;
}
/**
* 深度查询收入合同
......
package com.yonde.dcs.plan.feign;
import com.yonde.dcs.plan.common.vo.ExtDistributeRecordVO;
import com.yonde.dex.basedata.entity.api.ApiResult;
import com.yonde.dex.user.common.vo.DxOrganizationVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.yonde.dcs.plan.feign.shadow.ExtDistributeRecordServiceFeignShadow;
import java.util.List;
/**
* @description: ExtDistributeRecord-Feign
* @author: dexadmin
......@@ -16,4 +21,25 @@ import com.yonde.dcs.plan.feign.shadow.ExtDistributeRecordServiceFeignShadow;
@FeignClient(value = "${dcs.feign.INET-PLAN}", path = "/ExtDistributeRecord")
public interface ExtDistributeRecordServiceFeign<V extends ExtDistributeRecordVO> extends ExtDistributeRecordServiceFeignShadow<V> {
/**
* 收发记录接口
*
* @param id
* @return
*/
@ApiOperation("获取收发记录接口")
@GetMapping("/getDisRecord")
List<ExtDistributeRecordVO> getDisRecord(@RequestParam("id") Long id);
/**
* 通过用户id和code查询组织
*
* @param userId
* @param code
* @return
*/
@ApiOperation("通过用户id和code查询组织")
@GetMapping("/searchOrgByUserId")
List<DxOrganizationVO> searchOrgNameByUserId(@RequestParam("userId") Long userId, @RequestParam("code") String code);
}
package com.yonde.dcs.plan.feign;
import com.yonde.dcs.plan.common.vo.ExtIncomeContractVO;
import com.yonde.dex.basedata.entity.api.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.yonde.dcs.plan.feign.shadow.ExtIncomeContractServiceFeignShadow;
......@@ -16,4 +18,12 @@ import com.yonde.dcs.plan.feign.shadow.ExtIncomeContractServiceFeignShadow;
@FeignClient(value = "${dcs.feign.INET-PLAN}", path = "/ExtIncomeContract")
public interface ExtIncomeContractServiceFeign<V extends ExtIncomeContractVO> extends ExtIncomeContractServiceFeignShadow<V> {
@ApiOperation(value = "合同收入计算", notes = "合同收入计算", httpMethod = "GET")
@GetMapping("/calculateIncome/{id}")
ExtIncomeContractVO calculateIncome(@PathVariable Long id);
@ApiOperation(value = "xxx年到款计算", notes = "xxx年到款计算", httpMethod = "GET")
@GetMapping("/calculateIncome")
ExtIncomeContractVO calculateIncomeByYear(@RequestParam Long id, String year);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment