
22 changed files with 523 additions and 4 deletions
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.fin.api.finmanufacturerbank; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class FinManufacturerOrgPathQuery implements Query { |
||||
|
|
||||
|
private static final long serialVersionUID = -2101692843030171417L; |
||||
|
|
||||
|
@ApiModelProperty(value = "用户sid") |
||||
|
private String userSid; |
||||
|
|
||||
|
@ApiModelProperty(value = "机构sid") |
||||
|
private String orgPath; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询条件") |
||||
|
private String name; |
||||
|
|
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.api.base.account; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-fin(安瑞财务) <br/> |
||||
|
* File: FinManufacturerBankFeign.java <br/> |
||||
|
* Class: com.yxt.anrui.fin.api.finmanufacturerbank.FinManufacturerBankFeign <br/> |
||||
|
* Description: 公司开户账号表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-08-03 15:00:11 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "公司开户账号表") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-terminal-FinManufacturerBank", |
||||
|
name = "anrui-terminal", |
||||
|
path = "base/v1/account", |
||||
|
fallback = AppFinManufacturerBankFeignFallback.class) |
||||
|
public interface AppFinManufacturerBankFeign { |
||||
|
|
||||
|
@ApiOperation("获取该本分公司下的开户账号") |
||||
|
@PostMapping("/selAccountByOrgSid") |
||||
|
@ResponseBody |
||||
|
public ResultBean<PagerVo<AppManufacturerVo>> selAccountByOrgSid(@RequestBody PagerQuery<AppManufacturerOrgPathQuery> query); |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.api.base.account; |
||||
|
|
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-fin(安瑞财务) <br/> |
||||
|
* File: FinManufacturerBankFeignFallback.java <br/> |
||||
|
* Class: com.yxt.anrui.fin.api.finmanufacturerbank.FinManufacturerBankFeignFallback <br/> |
||||
|
* Description: 公司开户账号表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-08-03 15:00:11 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class AppFinManufacturerBankFeignFallback implements AppFinManufacturerBankFeign { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<AppManufacturerVo>> selAccountByOrgSid(PagerQuery<AppManufacturerOrgPathQuery> query) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.terminal.api.base.account; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class AppManufacturerOrgPathQuery implements Query { |
||||
|
private static final long serialVersionUID = 5132061239127199612L; |
||||
|
|
||||
|
@ApiModelProperty(value = "用户sid") |
||||
|
private String userSid; |
||||
|
|
||||
|
@ApiModelProperty(value = "机构sid") |
||||
|
private String orgPath; |
||||
|
|
||||
|
@ApiModelProperty(value = "查询条件") |
||||
|
private String name; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.terminal.api.base.account; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class AppManufacturerVo implements Vo { |
||||
|
private static final long serialVersionUID = 6743866407572366715L; |
||||
|
|
||||
|
@ApiModelProperty("银行账号") |
||||
|
private String bankAccount; |
||||
|
@ApiModelProperty("账户名称") |
||||
|
private String accountName; |
||||
|
@ApiModelProperty("开户银行") |
||||
|
private String depositBank; |
||||
|
@ApiModelProperty("开户银行key") |
||||
|
private String depositBankKey; |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.biz.base.account; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.terminal.api.base.account.AppFinManufacturerBankFeign; |
||||
|
import com.yxt.anrui.terminal.api.base.account.AppManufacturerOrgPathQuery; |
||||
|
import com.yxt.anrui.terminal.api.base.account.AppManufacturerVo; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-fin(安瑞财务) <br/> |
||||
|
* File: FinManufacturerBankFeignFallback.java <br/> |
||||
|
* Class: com.yxt.anrui.fin.biz.finmanufacturerbank.FinManufacturerBankRest <br/> |
||||
|
* Description: 公司开户账号表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-08-03 15:00:11 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "公司开户账号表") |
||||
|
@RestController |
||||
|
@RequestMapping("base/v1/account") |
||||
|
public class AppFinManufacturerBankRest implements AppFinManufacturerBankFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private AppFinManufacturerBankService appFinManufacturerBankService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<AppManufacturerVo>> selAccountByOrgSid(PagerQuery<AppManufacturerOrgPathQuery> query) { |
||||
|
return appFinManufacturerBankService.selAccountByOrgSid(query); |
||||
|
} |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.biz.base.account; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.yxt.anrui.buscenter.api.busadvanceginvoiceapply.AppAdvanceInvoicePageQuery; |
||||
|
import com.yxt.anrui.buscenter.api.busadvanceginvoiceapply.AppAdvanceInvoicePageVo; |
||||
|
import com.yxt.anrui.fin.api.finmanufacturerbank.*; |
||||
|
import com.yxt.anrui.terminal.api.autoservice.advanceInvoice.AdvanceInvoicePageVo; |
||||
|
import com.yxt.anrui.terminal.api.base.account.AppManufacturerOrgPathQuery; |
||||
|
import com.yxt.anrui.terminal.api.base.account.AppManufacturerVo; |
||||
|
import com.yxt.anrui.terminal.config.CoverUtils; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
|
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Optional; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-fin(安瑞财务) <br/> |
||||
|
* File: FinManufacturerBankService.java <br/> |
||||
|
* Class: com.yxt.anrui.fin.biz.finmanufacturerbank.FinManufacturerBankService <br/> |
||||
|
* Description: 公司开户账号表 业务逻辑. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-08-03 15:00:11 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class AppFinManufacturerBankService { |
||||
|
|
||||
|
@Autowired |
||||
|
private FinManufacturerBankFeign finManufacturerBankFeign; |
||||
|
|
||||
|
public ResultBean<PagerVo<AppManufacturerVo>> selAccountByOrgSid(PagerQuery<AppManufacturerOrgPathQuery> query) { |
||||
|
ResultBean<PagerVo<AppManufacturerVo>> rb = ResultBean.fireFail(); |
||||
|
PagerQuery<FinManufacturerOrgPathQuery> pq = CoverUtils.getPagerQuery(query); |
||||
|
ResultBean<PagerVo<FinManufacturerVo>> resultBean = finManufacturerBankFeign.selAppAccountByOrgSid(pq); |
||||
|
List<AppManufacturerVo> voList = Optional.ofNullable(resultBean.getData().getRecords()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), AppManufacturerVo.class)).collect(Collectors.toList()); |
||||
|
PagerVo<AppManufacturerVo> v = new PagerVo<>(); |
||||
|
BeanUtil.copyProperties(resultBean.getData(), v); |
||||
|
v.setRecords(voList); |
||||
|
return rb.success().setData(v); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue