Browse Source

更改

zhanglei
ligaode 5 months ago
parent
commit
51d77ae90a
  1. 75
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithApplyDetailsVo.java
  2. 69
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithDetailsVo.java
  3. 67
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithDetailssVo.java
  4. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyFeign.java
  5. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyFeignFallback.java
  6. 50
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailssVo.java
  7. 75
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithApplyDetailsVo.java
  8. 69
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithDetailsVo.java
  9. 67
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithDetailssVo.java
  10. 1
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java
  11. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java
  12. 166
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java
  13. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java
  14. 52
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml
  15. 12
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java
  16. 5
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyRest.java
  17. 24
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyService.java
  18. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.java
  19. 43
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml
  20. 21
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithService.java
  21. 5
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java
  22. 36
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
  23. 19
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithApplyDetailsVo.java
  24. 29
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithDetailsVo.java
  25. 67
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithDetailssVo.java
  26. 12
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java
  27. 28
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java
  28. 67
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailssVo.java
  29. 13
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/specialrebatewithapply/AppSpecialRebateWithApplyService.java
  30. 13
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java

75
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithApplyDetailsVo.java

@ -0,0 +1,75 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmspecialrebatewithapply;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* Project: anrui-scm(专项返利) <br/>
* File: ScmSpecialRebateWithApplyVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApplyVo <br/>
* Description: 专项返利预提申请表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-09 09:14:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "专项返利预提申请表 视图数据详情", description = "专项返利预提申请表 视图数据详情")
public class AppSpecialRebateWithApplyDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("创建日期")
private String createTime;
@ApiModelProperty("创建人姓名")
private String createByName;
@ApiModelProperty("分公司-部门")
private String publishInfo;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("预提申请")
private String withApply;
@ApiModelProperty("流程实例的sid")
private String procInsId;
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("专项返利预提列表")
private List<AppSpecialRebateWithDetailsVo> scmSpecialRebateWiths;
}

69
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithDetailsVo.java

@ -0,0 +1,69 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmspecialrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* Project: anrui-scm(专项返利) <br/>
* File: ScmSpecialRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo <br/>
* Description: 专项返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-09 09:14:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "专项返利预提表 视图数据详情", description = "专项返利预提表 视图数据详情")
public class AppSpecialRebateWithDetailsVo implements Vo {
@ApiModelProperty("采购系统名称+品牌名称+本月预提返利金额合计")
private String title;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("支出费用合计")
private String expectItureCostTotal;
@ApiModelProperty("待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("采购系统")
private String purchaseSystemName;
@ApiModelProperty("品牌名称")
private String brandName;
private List<AppSpecialRebateWithDetailssVo> detail;
}

67
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/AppSpecialRebateWithDetailssVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmspecialrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* Project: anrui-scm(专项返利) <br/>
* File: ScmSpecialRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo <br/>
* Description: 专项返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-09 09:14:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "专项返利预提表 视图数据详情", description = "专项返利预提表 视图数据详情")
public class AppSpecialRebateWithDetailssVo implements Vo {
private String sid;
@ApiModelProperty("采购系统名称+品牌名称+返利类型+明细")
private String title;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("其中支出费用")
private BigDecimal expectItureCost;
@ApiModelProperty("其中待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("其中抵顶费用")
private BigDecimal expectSuppCost;
}

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyFeign.java

@ -86,6 +86,11 @@ public interface ScmSpecialRebateWithApplyFeign {
@ResponseBody
public ResultBean<ScmSpecialRebateWithApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("移动端详情")
@GetMapping("/appDetail/{sid}")
@ResponseBody
ResultBean<AppSpecialRebateWithApplyDetailsVo> appDetail(@PathVariable("sid") String sid);
@ApiOperation("生成专项返利预提pdf")
@PostMapping("/createPdf")
@ResponseBody
@ -134,5 +139,4 @@ public interface ScmSpecialRebateWithApplyFeign {
@PutMapping(value = "/assignTask")
@ResponseBody
public ResultBean assignTask(@RequestBody ScmSpecialRebateWithApplyDelegateQuery delegateQuery);
}

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyFeignFallback.java

@ -77,6 +77,11 @@ public class ScmSpecialRebateWithApplyFeignFallback implements ScmSpecialRebateW
return rb.setMsg("接口anrui-scm/scmspecialrebatewithapply/fetchDetailsBySid无法访问");
}
@Override
public ResultBean<AppSpecialRebateWithApplyDetailsVo> appDetail(String sid) {
return null;
}
@Override
public ResultBean<String> createPdf(String specialWithSid, String userName) {
return null;

50
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailssVo.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehrebatewith;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情")
public class ScmVehRebateWithDetailssVo implements Vo {
@ApiModelProperty("采购系统名称+品牌名称+本月预提返利金额合计")
private String title;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("台数合计")
private String numTotal;
}

75
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithApplyDetailsVo.java

@ -0,0 +1,75 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehrebatewithapply;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* Project: anrui-scm(单车返利预提申请) <br/>
* File: ScmVehRebateWithApplyVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyVo <br/>
* Description: 单车返利预提申请表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-08-25 09:04:39 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "单车返利预提申请表 视图数据详情", description = "单车返利预提申请表 视图数据详情")
public class AppVehRebateWithApplyDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("创建日期")
private String createTime;
@ApiModelProperty("创建人姓名")
private String createByName;
@ApiModelProperty("分公司-部门")
private String publishInfo;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("预提申请")
private String withApply;
@ApiModelProperty("流程实例的sid")
private String procInsId;
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("单车返利预提列表")
private List<AppVehRebateWithDetailsVo> scmVehRebateWiths; // 单车返利预提列表
}

69
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithDetailsVo.java

@ -0,0 +1,69 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* Project: anrui-scm(单车返利预提申请) <br/>
* File: ScmVehRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo <br/>
* Description: 单车返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-08-25 09:04:39 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情")
public class AppVehRebateWithDetailsVo implements Vo {
@ApiModelProperty("采购系统名称+品牌名称+本月预提返利金额合计")
private String title;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("台数合计")
private String numTotal;
@ApiModelProperty("采购系统")
private String purchaseSystemName;
@ApiModelProperty("品牌名称")
private String brandName;
private List<AppVehRebateWithDetailssVo> detail;
}

67
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/AppVehRebateWithDetailssVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* Project: anrui-scm(单车返利预提申请) <br/>
* File: ScmVehRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo <br/>
* Description: 单车返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-08-25 09:04:39 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情")
public class AppVehRebateWithDetailssVo implements Vo {
private String sid;
@ApiModelProperty("采购系统名称+品牌名称+返利类型+明细")
private String title;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("其中待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("其中抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("台数")
private String num;
}

1
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java

@ -28,6 +28,7 @@ package com.yxt.anrui.scm.api.scmvehrebatewithapply;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailssVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto;
import com.yxt.common.core.vo.Vo;

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java

@ -65,7 +65,6 @@ public interface ScmVehRebateWithApplyFeign {
@PostMapping("/rePushVoucher")
public ResultBean rePushVoucher(@RequestParam("sid") String sid);
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
@ResponseBody
@ -86,6 +85,11 @@ public interface ScmVehRebateWithApplyFeign {
@ResponseBody
public ResultBean<ScmVehRebateWithApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("移动端详情")
@GetMapping("/appDetail/{sid}")
@ResponseBody
ResultBean<AppVehRebateWithApplyDetailsVo> appDetail(@PathVariable("sid") String sid);
@ApiOperation("生成单车返利预提pdf")
@PostMapping("/createPdf")
@ResponseBody

166
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java

@ -50,84 +50,90 @@ import java.util.List;
@Component
public class ScmVehRebateWithApplyFeignFallback implements ScmVehRebateWithApplyFeign {
@Override
public ResultBean rePushVoucher(String sid) {
return null;
}
@Override
public ResultBean<PagerVo<ScmVehRebateWithApplyVo>> listPage(PagerQuery<ScmVehRebateWithApplyQuery> pq){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口anrui-scm/scmvehrebatewithapply/listPage无法访问");
}
@Override
public ResultBean save(ScmVehRebateWithApplyDto dto){
return ResultBean.fireFail().setMsg("接口anrui-scm/scmvehrebatewithapply/save无法访问");
}
@Override
public ResultBean delBySids( String[] sids){
return ResultBean.fireFail().setMsg("接口anrui-scm/scmvehrebatewithapply/delBySids无法访问");
}
@Override
public ResultBean<ScmVehRebateWithApplyDetailsVo> fetchDetailsBySid(String sid){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口anrui-scm/scmvehrebatewithapply/fetchDetailsBySid无法访问");
}
@Override
public ResultBean<String> createPdf(String vehWithSid, String userName) {
return null;
}
@Override
public ResultBean submitVehRebateWithApply(SubmitScmVehRebateWithApplyDto dto) {
return null;
}
@Override
public ResultBean complete(ScmVehRebateWithApplyCompleteDto dto) {
return null;
}
@Override
public ResultBean revokeProcess(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean taskReject(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean breakProcess(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean flowRecord(String procInsId) {
return null;
}
@Override
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
return null;
}
@Override
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
return null;
}
@Override
public ResultBean delegate(ScmVehRebateWithApplyDelegateQuery delegateQuery) {
return null;
}
@Override
public ResultBean assignTask(ScmVehRebateWithApplyDelegateQuery delegateQuery) {
return null;
}
@Override
public ResultBean rePushVoucher(String sid) {
return null;
}
@Override
public ResultBean<PagerVo<ScmVehRebateWithApplyVo>> listPage(PagerQuery<ScmVehRebateWithApplyQuery> pq) {
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口anrui-scm/scmvehrebatewithapply/listPage无法访问");
}
@Override
public ResultBean save(ScmVehRebateWithApplyDto dto) {
return ResultBean.fireFail().setMsg("接口anrui-scm/scmvehrebatewithapply/save无法访问");
}
@Override
public ResultBean delBySids(String[] sids) {
return ResultBean.fireFail().setMsg("接口anrui-scm/scmvehrebatewithapply/delBySids无法访问");
}
@Override
public ResultBean<ScmVehRebateWithApplyDetailsVo> fetchDetailsBySid(String sid) {
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口anrui-scm/scmvehrebatewithapply/fetchDetailsBySid无法访问");
}
@Override
public ResultBean<AppVehRebateWithApplyDetailsVo> appDetail(String sid) {
return null;
}
@Override
public ResultBean<String> createPdf(String vehWithSid, String userName) {
return null;
}
@Override
public ResultBean submitVehRebateWithApply(SubmitScmVehRebateWithApplyDto dto) {
return null;
}
@Override
public ResultBean complete(ScmVehRebateWithApplyCompleteDto dto) {
return null;
}
@Override
public ResultBean revokeProcess(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean taskReject(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean breakProcess(FlowTaskVo flowTaskVo) {
return null;
}
@Override
public ResultBean flowRecord(String procInsId) {
return null;
}
@Override
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) {
return null;
}
@Override
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) {
return null;
}
@Override
public ResultBean delegate(ScmVehRebateWithApplyDelegateQuery delegateQuery) {
return null;
}
@Override
public ResultBean assignTask(ScmVehRebateWithApplyDelegateQuery delegateQuery) {
return null;
}
}

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java

@ -27,8 +27,11 @@ package com.yxt.anrui.scm.biz.scmspecialrebatewith;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailssVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWith;
@ -59,4 +62,8 @@ public interface ScmSpecialRebateWithMapper extends BaseMapper<ScmSpecialRebateW
List<String> fetchSpecialReBateSidByMainSid(String businessSid);
List<String> fetchBySpecialReBateSid(String sid);
List<AppSpecialRebateWithDetailsVo> fetchByMainSidNew(String sid);
List<AppSpecialRebateWithDetailssVo> fetchByMainSidNewTwo(@Param("sid") String sid, @Param("purchaseSystemName") String purchaseSystemName, @Param("brandName") String brandName);
}

52
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml

@ -6,20 +6,20 @@
<select id="fetchByMainSid" resultType="com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithDetailsVo">
SELECT ssr.rebateTypeKey,
ssr.`rebateTypeValue`,
SUM(ssr.`estimateRebate`) withRebate,
GROUP_CONCAT(ssrw.`specialRebateSid`) specialRebateSid,
ssr.rebateTypeValue,
SUM(ssr.estimateRebate) withRebate,
GROUP_CONCAT(ssrw.specialRebateSid) specialRebateSid,
ssr.purchaseSystemSid,
ssr.purchaseSystemName,
ssr.brandSid,
ssr.brandName,
SUM(ssr.expectItureCost) AS expectItureCost,
SUM(ssr.expectTreatCost) AS expectTreatCost,
SUM(ssr.expectSuppCost) AS expectSuppCost
SUM(ssr.expectItureCost) AS expectItureCost,
SUM(ssr.expectTreatCost) AS expectTreatCost,
SUM(ssr.expectSuppCost) AS expectSuppCost
FROM scm_special_rebate_with ssrw
LEFT JOIN scm_special_rebate ssr
ON ssr.`sid` = ssrw.`specialRebateSid`
WHERE ssrw.`mainSid` = #{sid}
LEFT JOIN scm_special_rebate ssr
ON ssr.sid = ssrw.specialRebateSid
WHERE ssrw.mainSid = #{sid}
GROUP BY ssr.rebateTypeKey, ssr.purchaseSystemSid, ssr.brandSid
</select>
@ -28,4 +28,38 @@
FROM scm_special_rebate_with
WHERE specialRebateSid = #{sid}
</select>
<select id="fetchByMainSidNew"
resultType="com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailsVo">
SELECT CONCAT(ssr.purchaseSystemName, ssr.brandName, '本月预提返利金额合计') as title,
SUM(ssr.estimateRebate) as withRebateTotal,
SUM(ssr.expectItureCost) as expectItureCostTotal,
SUM(ssr.expectTreatCost) as expectTreatCostTotal,
SUM(ssr.expectSuppCost) as expectSuppCostTotal,
ssr.purchaseSystemName,
ssr.brandName
FROM scm_special_rebate_with ssrw
LEFT JOIN scm_special_rebate ssr
ON ssr.sid = ssrw.specialRebateSid
WHERE ssrw.mainSid = #{sid}
GROUP BY ssr.purchaseSystemSid, ssr.brandSid
</select>
<select id="fetchByMainSidNewTwo"
resultType="com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailssVo">
SELECT CONCAT(ssr.purchaseSystemName, ssr.brandName, ssr.rebateTypeValue, '明细') AS title,
ssr.rebateTypeValue,
SUM(ssr.estimateRebate) as withRebate,
SUM(ssr.expectItureCost) as expectItureCost,
SUM(ssr.expectTreatCost) as expectTreatCost,
SUM(ssr.expectSuppCost) as expectSuppCost,
GROUP_CONCAT(ssrw.specialRebateSid) as sid
FROM scm_special_rebate_with ssrw
LEFT JOIN scm_special_rebate ssr
ON ssr.sid = ssrw.specialRebateSid
WHERE ssrw.mainSid = #{sid}
AND ssr.purchaseSystemName = #{purchaseSystemName}
AND ssr.brandName = #{brandName}
GROUP BY ssr.rebateTypeValue
</select>
</mapper>

12
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithService.java

@ -28,6 +28,8 @@ package com.yxt.anrui.scm.biz.scmspecialrebatewith;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebate;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateDetailsVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithDetailssVo;
import com.yxt.anrui.scm.biz.scmspecialrebate.ScmSpecialRebateService;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.core.result.ResultBean;
@ -85,7 +87,7 @@ public class ScmSpecialRebateWithService extends MybatisBaseService<ScmSpecialRe
for (String s : sids) {
ScmSpecialRebate scmSpecialRebate = scmSpecialRebateService.fetchBySid(s);
ScmSpecialRebateDetailsVo scmSpecialRebateDetailsVo = new ScmSpecialRebateDetailsVo();
BeanUtil.copyProperties(scmSpecialRebate,scmSpecialRebateDetailsVo);
BeanUtil.copyProperties(scmSpecialRebate, scmSpecialRebateDetailsVo);
scmSpecialRebateDetailsVo.setExpectCost(scmSpecialRebateDetailsVo.getExpectItureCost().add(scmSpecialRebateDetailsVo.getExpectTreatCost()).add(scmSpecialRebateDetailsVo.getExpectSuppCost()));
scmSpecialRebateDetailsVo.setMoney(scmSpecialRebateDetailsVo.getOnceItureCost().add(scmSpecialRebateDetailsVo.getOnceTreatCost()).add(scmSpecialRebateDetailsVo.getOnceSuppCost()).add(scmSpecialRebateDetailsVo.getSecondItureCost()).add(scmSpecialRebateDetailsVo.getSecondTreatCost()).add(scmSpecialRebateDetailsVo.getSecondSuppCost()).toString());
scmSpecialRebateDetailsVos.add(scmSpecialRebateDetailsVo);
@ -96,4 +98,12 @@ public class ScmSpecialRebateWithService extends MybatisBaseService<ScmSpecialRe
public List<String> fetchBySpecialReBateSid(String sid) {
return baseMapper.fetchBySpecialReBateSid(sid);
}
public List<AppSpecialRebateWithDetailsVo> fetchByMainSidNew(String sid) {
return baseMapper.fetchByMainSidNew(sid);
}
public List<AppSpecialRebateWithDetailssVo> fetchByMainSidNewTwo(String sid, String purchaseSystemName, String brandName) {
return baseMapper.fetchByMainSidNewTwo(sid, purchaseSystemName, brandName);
}
}

5
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyRest.java

@ -100,6 +100,11 @@ public class ScmSpecialRebateWithApplyRest implements ScmSpecialRebateWithApplyF
return scmSpecialRebateWithApplyService.fetchAllDetailsVo(sid);
}
@Override
public ResultBean<AppSpecialRebateWithApplyDetailsVo> appDetail(String sid) {
return scmSpecialRebateWithApplyService.appDetail(sid);
}
@Override
public ResultBean<String> createPdf(String specialWithSid, String userName) {
ResultBean rb = ResultBean.fireFail();

24
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyService.java

@ -63,6 +63,8 @@ import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.GetNodeQuery;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.GetNodeVo;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.ScmSpecialRebateWithApplyDelegateQuery;
import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.SubmitScmSpecialRebateWithApplyDto;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailssVo;
import com.yxt.anrui.scm.biz.scmspecialrebate.ScmSpecialRebateService;
import com.yxt.anrui.scm.biz.scmspecialrebatewith.ScmSpecialRebateWithService;
import com.yxt.anrui.scm.biz.scmvehrebatewithapply.ScmVehRebateWithApplyService;
@ -815,4 +817,26 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
WordUtils.doc2pdf(wordPath, targetPath, pdfName, userName);
return "/template/" + dateStr + "/" + pdfName;
}
public ResultBean<AppSpecialRebateWithApplyDetailsVo> appDetail(String sid) {
ResultBean rb = ResultBean.fireFail();
AppSpecialRebateWithApplyDetailsVo appSpecialRebateWithApplyDetailsVo = new AppSpecialRebateWithApplyDetailsVo();
ScmSpecialRebateWithApply scmSpecialRebateWithApply = fetchBySid(sid);
appSpecialRebateWithApplyDetailsVo.setSid(sid);
appSpecialRebateWithApplyDetailsVo.setBillNo(scmSpecialRebateWithApply.getBillNo());
appSpecialRebateWithApplyDetailsVo.setCreateTime(DateUtil.formatDate(scmSpecialRebateWithApply.getCreateTime()));
appSpecialRebateWithApplyDetailsVo.setCreateByName(scmSpecialRebateWithApply.getCreateByName());
appSpecialRebateWithApplyDetailsVo.setPublishInfo(scmSpecialRebateWithApply.getCreateOrgName() + "-" + scmSpecialRebateWithApply.getDeptName());
appSpecialRebateWithApplyDetailsVo.setRemarks(scmSpecialRebateWithApply.getRemarks());
appSpecialRebateWithApplyDetailsVo.setWithApply(scmSpecialRebateWithApply.getWithApply());
appSpecialRebateWithApplyDetailsVo.setProcInsId(scmSpecialRebateWithApply.getProcInstId());
appSpecialRebateWithApplyDetailsVo.setTaskId(scmSpecialRebateWithApply.getTaskId());
List<AppSpecialRebateWithDetailsVo> appSpecialRebateWithDetailsVos = scmSpecialRebateWithService.fetchByMainSidNew(sid);
for (AppSpecialRebateWithDetailsVo appSpecialRebateWithDetailsVo : appSpecialRebateWithDetailsVos) {
List<AppSpecialRebateWithDetailssVo> appSpecialRebateWithDetailssVos = scmSpecialRebateWithService.fetchByMainSidNewTwo(sid, appSpecialRebateWithDetailsVo.getPurchaseSystemName(), appSpecialRebateWithDetailsVo.getBrandName());
appSpecialRebateWithDetailsVo.setDetail(appSpecialRebateWithDetailssVos);
}
appSpecialRebateWithApplyDetailsVo.setScmSpecialRebateWiths(appSpecialRebateWithDetailsVos);
return rb.success().setData(appSpecialRebateWithApplyDetailsVo);
}
}

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.java

@ -30,6 +30,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailssVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailssVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -75,4 +78,8 @@ public interface ScmVehRebateWithMapper extends BaseMapper<ScmVehRebateWith> {
@Select("select * from scm_veh_rebate_with where mainSid = #{businessSid}")
List<ScmVehRebateWithDetailsVo> selByMainSid(String businessSid);
List<AppVehRebateWithDetailsVo> fetchByMainSidNew(String sid);
List<AppVehRebateWithDetailssVo> fetchByMainSidNewTwo(@Param("sid") String sid,@Param("purchaseSystemName") String purchaseSystemName,@Param("brandName") String brandName);
}

43
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml

@ -20,11 +20,11 @@
<select id="fetchByMainSid" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo">
SELECT svr.rebateTypeKey,
svr.rebateTypeValue,
SUM(svr.estimateRebate) withRebate,
SUM(svr.expectTreatCost) as expectTreatCost,
SUM(svr.expectSuppCost) as expectSuppCost,
COUNT(*) num,
GROUP_CONCAT(svrw.vehRebateSid) vehRebateSid,
SUM(svr.estimateRebate) as withRebate,
SUM(svr.expectTreatCost) as expectTreatCost,
SUM(svr.expectSuppCost) as expectSuppCost,
COUNT(*) as num,
GROUP_CONCAT(svrw.vehRebateSid) as vehRebateSid,
svr.purchaseSystemName,
svr.brandName
FROM scm_veh_rebate_with svrw
@ -33,4 +33,37 @@
WHERE svrw.mainSid = #{sid}
GROUP BY svr.brandSid, svr.rebateTypeValue, svr.purchaseSystemSid
</select>
<select id="fetchByMainSidNew" resultType="com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailsVo">
SELECT CONCAT(svr.purchaseSystemName, svr.brandName, '本月预提返利金额合计') as title,
SUM(svr.estimateRebate) as withRebateTotal,
SUM(svr.expectTreatCost) as expectTreatCostTotal,
SUM(svr.expectSuppCost) as expectSuppCostTotal,
COUNT(*) as numTotal,
svr.purchaseSystemName,
svr.brandName
FROM scm_veh_rebate_with svrw
LEFT JOIN scm_veh_rebate svr
ON svr.sid = svrw.vehRebateSid
WHERE svrw.mainSid = #{sid}
GROUP BY svr.brandSid, svr.purchaseSystemSid
</select>
<select id="fetchByMainSidNewTwo"
resultType="com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailssVo">
SELECT CONCAT(svr.purchaseSystemName, svr.brandName, svr.rebateTypeValue, '明细') AS title,
svr.rebateTypeValue,
SUM(svr.estimateRebate) as withRebate,
SUM(svr.expectTreatCost) as expectTreatCost,
SUM(svr.expectSuppCost) as expectSuppCost,
COUNT(*) as num,
GROUP_CONCAT(svrw.vehRebateSid) as sid
FROM scm_veh_rebate_with svrw
LEFT JOIN scm_veh_rebate svr
ON svr.sid = svrw.vehRebateSid
WHERE svrw.mainSid = #{sid}
AND svr.purchaseSystemName = #{purchaseSystemName}
AND svr.brandName = #{brandName}
GROUP BY svr.rebateTypeValue
</select>
</mapper>

21
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithService.java

@ -35,6 +35,9 @@ import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDto;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVehDto;
import com.yxt.anrui.scm.api.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.*;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithDetailssVo;
import com.yxt.anrui.scm.biz.scmvehrebate.ScmVehRebateService;
import com.yxt.anrui.scm.biz.scmvehrebatecheckapplydetail.ScmVehrebateCheckapplydetailService;
import org.apache.commons.lang3.StringUtils;
@ -43,12 +46,6 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWith;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithQuery;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -113,7 +110,7 @@ public class ScmVehRebateWithService extends MybatisBaseService<ScmVehRebateWith
for (String sid : vehRebateSids) {
vehRebateSid.append(sid).append(",");
}
entity.setVehRebateSid(vehRebateSid.substring(0,vehRebateSid.lastIndexOf(",")));
entity.setVehRebateSid(vehRebateSid.substring(0, vehRebateSid.lastIndexOf(",")));
baseMapper.insert(entity);
}
@ -150,7 +147,7 @@ public class ScmVehRebateWithService extends MybatisBaseService<ScmVehRebateWith
for (String s : sids) {
ScmVehRebate scmVehRebate = scmVehRebateService.fetchBySid(s);
ScmVehRebateDetailsVo scmVehRebateDetailsVo = new ScmVehRebateDetailsVo();
BeanUtil.copyProperties(scmVehRebate,scmVehRebateDetailsVo);
BeanUtil.copyProperties(scmVehRebate, scmVehRebateDetailsVo);
scmVehRebateDetailsVo.setMoney(scmVehRebateDetailsVo.getOnceTreatCost().add(scmVehRebateDetailsVo.getOnceSuppCost()).add(scmVehRebateDetailsVo.getSecondTreatCost()).add(scmVehRebateDetailsVo.getSecondSuppCost()).toString());
scmVehRebateDetailsVos.add(scmVehRebateDetailsVo);
}
@ -164,4 +161,12 @@ public class ScmVehRebateWithService extends MybatisBaseService<ScmVehRebateWith
public List<ScmVehRebateWithDetailsVo> selByMainSid(String businessSid) {
return baseMapper.selByMainSid(businessSid);
}
public List<AppVehRebateWithDetailsVo> fetchByMainSidNew(String sid) {
return baseMapper.fetchByMainSidNew(sid);
}
public List<AppVehRebateWithDetailssVo> fetchByMainSidNewTwo(String sid, String purchaseSystemName, String brandName) {
return baseMapper.fetchByMainSidNewTwo(sid, purchaseSystemName, brandName);
}
}

5
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java

@ -99,6 +99,11 @@ public class ScmVehRebateWithApplyRest implements ScmVehRebateWithApplyFeign {
return scmVehRebateWithApplyService.fetchAllDetailsVo(sid);
}
@Override
public ResultBean<AppVehRebateWithApplyDetailsVo> appDetail(String sid) {
return scmVehRebateWithApplyService.appDetail(sid);
}
@Override
public ResultBean<String> createPdf(String vehWithSid, String userName) {
ResultBean rb = ResultBean.fireFail();

36
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java

@ -59,10 +59,7 @@ import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.flow.FlowTaskVo;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebate;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWith;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithPdfVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.*;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.*;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo;
@ -435,6 +432,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
/**
* 返利推送凭证成本调整单返回业务日期
*
* @param date
* @return
*/
@ -452,9 +450,9 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
if (!(date.before(parse))) {
return sdf2.format(date);
} else {
Calendar calendar=Calendar.getInstance();
int month=calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, month-1);
Calendar calendar = Calendar.getInstance();
int month = calendar.get(Calendar.MONTH);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
Date endTime = calendar.getTime();//上个月最后一天
String format = sdf2.format(endTime);
@ -799,7 +797,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
List<ScmVehRebateWithDetailsVo> scmVehRebateWiths = scmVehRebateWithApplyDetailsVo.getScmVehRebateWiths();
Map<String, Object> dataMap = new HashMap<String, Object>();
//标题
dataMap.put("title",scmVehRebateWithApplyDetailsVo.getWithApply() + "单车返利预提审批");
dataMap.put("title", scmVehRebateWithApplyDetailsVo.getWithApply() + "单车返利预提审批");
//分公司
dataMap.put("useOrgName", scmVehRebateWithApplyDetailsVo.getCreateOrgName());
//创建部门
@ -897,4 +895,26 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
WordUtils.doc2pdf(wordPath, targetPath, pdfName, userName);
return "/template/" + dateStr + "/" + pdfName;
}
public ResultBean<AppVehRebateWithApplyDetailsVo> appDetail(String sid) {
ResultBean rb = ResultBean.fireFail();
AppVehRebateWithApplyDetailsVo appVehRebateWithApplyDetailsVo = new AppVehRebateWithApplyDetailsVo();
ScmVehRebateWithApply scmVehRebateWithApply = fetchBySid(sid);
appVehRebateWithApplyDetailsVo.setSid(sid);
appVehRebateWithApplyDetailsVo.setBillNo(scmVehRebateWithApply.getBillNo());
appVehRebateWithApplyDetailsVo.setCreateTime(DateUtil.formatDate(scmVehRebateWithApply.getCreateTime()));
appVehRebateWithApplyDetailsVo.setCreateByName(scmVehRebateWithApply.getCreateByName());
appVehRebateWithApplyDetailsVo.setPublishInfo(scmVehRebateWithApply.getCreateOrgName() + "-" + scmVehRebateWithApply.getDeptName());
appVehRebateWithApplyDetailsVo.setRemarks(scmVehRebateWithApply.getRemarks());
appVehRebateWithApplyDetailsVo.setWithApply(scmVehRebateWithApply.getWithApply());
appVehRebateWithApplyDetailsVo.setProcInsId(scmVehRebateWithApply.getProcInstId());
appVehRebateWithApplyDetailsVo.setTaskId(scmVehRebateWithApply.getTaskId());
List<AppVehRebateWithDetailsVo> appVehRebateWithDetailsVos = scmVehRebateWithService.fetchByMainSidNew(sid);
for (AppVehRebateWithDetailsVo appVehRebateWithDetailsVo : appVehRebateWithDetailsVos) {
List<AppVehRebateWithDetailssVo> appVehRebateWithDetailssVos = scmVehRebateWithService.fetchByMainSidNewTwo(sid, appVehRebateWithDetailsVo.getPurchaseSystemName(), appVehRebateWithDetailsVo.getBrandName());
appVehRebateWithDetailsVo.setDetail(appVehRebateWithDetailssVos);
}
appVehRebateWithApplyDetailsVo.setScmVehRebateWiths(appVehRebateWithDetailsVos);
return rb.success().setData(appVehRebateWithApplyDetailsVo);
}
}

19
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithApplyDetailsVo.java

@ -54,34 +54,23 @@ public class AppSpecialRebateWithApplyDetailsVo implements Vo {
private String sid; // sid
private String publishInfo;
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("创建日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("创建组织名称")
private String createOrgName;
@ApiModelProperty("申请部门名称")
private String deptName;
@ApiModelProperty("创建人姓名")
private String createByName;
@ApiModelProperty("分公司-部门")
private String publishInfo;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("预提申请")
private String withApply;
@ApiModelProperty("流程实例的sid")
private String procInsId;
@ApiModelProperty("taskId")
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("预计支出费用合计")
private String expectItureCostTotal;
@ApiModelProperty("预计待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("预计抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("专项返利预提列表")
private List<AppSpecialRebateWithDetailsVo> scmSpecialRebateWiths;
}

29
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithDetailsVo.java

@ -26,6 +26,7 @@
package com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithDetailssVo;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -51,22 +52,16 @@ import java.util.List;
@ApiModel(value = "专项返利预提表 视图数据详情", description = "专项返利预提表 视图数据详情")
public class AppSpecialRebateWithDetailsVo implements Vo {
private String sid;
@ApiModelProperty("采购系统名称+品牌名称+本月预提返利金额合计")
private String title;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("支出费用合计")
private String expectItureCostTotal;
@ApiModelProperty("待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("采购系统名称")
private String purchaseSystemName;
@ApiModelProperty("品牌名称")
private String brandName;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("预计支出费用")
private BigDecimal expectItureCost;
@ApiModelProperty("预计待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("预计抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("专项返利sid")
private String specialRebateSid;
private List<AppSpecialRebateWithDetailssVo> detail;
}

67
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/specialrebatewithapply/AppSpecialRebateWithDetailssVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* Project: anrui-scm(专项返利) <br/>
* File: ScmSpecialRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo <br/>
* Description: 专项返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-09 09:14:10 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "专项返利预提表 视图数据详情", description = "专项返利预提表 视图数据详情")
public class AppSpecialRebateWithDetailssVo implements Vo {
private String sid;
@ApiModelProperty("采购系统名称+品牌名称+返利类型+明细")
private String title;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("其中支出费用")
private BigDecimal expectItureCost;
@ApiModelProperty("其中待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("其中抵顶费用")
private BigDecimal expectSuppCost;
}

12
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java

@ -59,12 +59,10 @@ public class AppVehRebateWithApplyDetailsVo implements Vo {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("创建日期")
private Date createTime;
@ApiModelProperty("部门")
private String deptName;
@ApiModelProperty("创建组织名称")
private String createOrgName;
@ApiModelProperty("创建人姓名")
private String createByName;
@ApiModelProperty("分公司-部门")
private String publishInfo;
@ApiModelProperty("备注")
private String remarks;
@ApiModelProperty("预提申请")
@ -73,12 +71,6 @@ public class AppVehRebateWithApplyDetailsVo implements Vo {
private String procInsId;
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("其中待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("其中抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("单车返利预提列表")
private List<AppVehRebateWithDetailsVo> scmVehRebateWiths; // 单车返利预提列表
}

28
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java

@ -51,22 +51,16 @@ import java.util.List;
@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情")
public class AppVehRebateWithDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("采购系统名称+品牌名称+本月预提返利金额合计")
private String title;
@ApiModelProperty("预提返利合计")
private String withRebateTotal;
@ApiModelProperty("待支付费用合计")
private String expectTreatCostTotal;
@ApiModelProperty("抵顶费用合计")
private String expectSuppCostTotal;
@ApiModelProperty("台数合计")
private String numTotal;
@ApiModelProperty("采购系统")
private String purchaseSystemName;
@ApiModelProperty("品牌名称")
private String brandName;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("台数")
private String num;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("其中待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("其中抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("单车返利sid")
private String vehRebateSid;
private List<AppVehRebateWithDetailssVo> detail;
}

67
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailssVo.java

@ -0,0 +1,67 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* Project: anrui-scm(单车返利预提申请) <br/>
* File: ScmVehRebateWithVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo <br/>
* Description: 单车返利预提表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-08-25 09:04:39 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情")
public class AppVehRebateWithDetailssVo implements Vo {
private String sid;
@ApiModelProperty("采购系统名称+品牌名称+返利类型+明细")
private String title;
@ApiModelProperty("返利类型value")
private String rebateTypeValue;
@ApiModelProperty("预提返利")
private BigDecimal withRebate;
@ApiModelProperty("其中待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("其中抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("台数")
private String num;
}

13
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/specialrebatewithapply/AppSpecialRebateWithApplyService.java

@ -43,6 +43,7 @@ import com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply.AppSpecialR
import com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply.AppSpecialRebateWithApplyDetailsVo;
import com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply.AppSpecialRebateWithDetailsVo;
import com.yxt.anrui.terminal.api.autoservice.specialrebatewithapply.flowable.*;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithApplyDetailsVo;
import com.yxt.common.core.result.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -67,19 +68,9 @@ public class AppSpecialRebateWithApplyService {
public ResultBean<AppSpecialRebateWithApplyDetailsVo> fetchDetailsBySid(String sid) {
ResultBean rb = ResultBean.fireFail();
ScmSpecialRebateWithApplyDetailsVo data = scmSpecialRebateWithApplyFeign.fetchDetailsBySid(sid).getData();
AppSpecialRebateWithApplyDetailsVo appSpecialRebateWithApplyDetailsVo = new AppSpecialRebateWithApplyDetailsVo();
appSpecialRebateWithApplyDetailsVo.setProcInsId(data.getProcInstId());
appSpecialRebateWithApplyDetailsVo.setPublishInfo(data.getCreateOrgName() + "-" + data.getDeptName());
com.yxt.anrui.scm.api.scmspecialrebatewithapply.AppSpecialRebateWithApplyDetailsVo data = scmSpecialRebateWithApplyFeign.appDetail(sid).getData();
BeanUtil.copyProperties(data,appSpecialRebateWithApplyDetailsVo);
List<AppSpecialRebateWithDetailsVo> scmSpecialRebateWiths = appSpecialRebateWithApplyDetailsVo.getScmSpecialRebateWiths();
for (AppSpecialRebateWithDetailsVo appSpecialRebateWithDetailsVo : scmSpecialRebateWiths) {
appSpecialRebateWithDetailsVo.setSid(appSpecialRebateWithDetailsVo.getSpecialRebateSid());
}
appSpecialRebateWithApplyDetailsVo.setWithRebateTotal(scmSpecialRebateWiths.stream().map(AppSpecialRebateWithDetailsVo::getWithRebate).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
appSpecialRebateWithApplyDetailsVo.setExpectItureCostTotal(scmSpecialRebateWiths.stream().map(AppSpecialRebateWithDetailsVo::getExpectItureCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
appSpecialRebateWithApplyDetailsVo.setExpectTreatCostTotal(scmSpecialRebateWiths.stream().map(AppSpecialRebateWithDetailsVo::getExpectTreatCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
appSpecialRebateWithApplyDetailsVo.setExpectSuppCostTotal(scmSpecialRebateWiths.stream().map(AppSpecialRebateWithDetailsVo::getExpectSuppCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
return rb.success().setData(appSpecialRebateWithApplyDetailsVo);
}

13
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java

@ -31,6 +31,8 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.flow.FlowTaskVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailssVo;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo;
import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDetailsVo;
@ -42,6 +44,7 @@ import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyDel
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateDetailsVo;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithApplyDetailsVo;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithDetailsVo;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithDetailssVo;
import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.*;
import com.yxt.common.core.result.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
@ -67,17 +70,9 @@ public class AppVehRebateWithApplyService {
public ResultBean<AppVehRebateWithApplyDetailsVo> fetchDetailsBySid(String sid) {
ResultBean rb = ResultBean.fireFail();
ScmVehRebateWithApplyDetailsVo data = scmVehRebateWithApplyFeign.fetchDetailsBySid(sid).getData();
AppVehRebateWithApplyDetailsVo appVehRebateWithApplyDetailsVo = new AppVehRebateWithApplyDetailsVo();
appVehRebateWithApplyDetailsVo.setProcInsId(data.getProcInstId());
com.yxt.anrui.scm.api.scmvehrebatewithapply.AppVehRebateWithApplyDetailsVo data = scmVehRebateWithApplyFeign.appDetail(sid).getData();
BeanUtil.copyProperties(data,appVehRebateWithApplyDetailsVo);
List<AppVehRebateWithDetailsVo> scmVehRebateWiths = appVehRebateWithApplyDetailsVo.getScmVehRebateWiths();
for (AppVehRebateWithDetailsVo appVehRebateWithDetailsVo : scmVehRebateWiths) {
appVehRebateWithDetailsVo.setSid(appVehRebateWithDetailsVo.getVehRebateSid());
}
appVehRebateWithApplyDetailsVo.setWithRebateTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getWithRebate).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
appVehRebateWithApplyDetailsVo.setExpectTreatCostTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getExpectTreatCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
appVehRebateWithApplyDetailsVo.setExpectSuppCostTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getExpectSuppCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
return rb.success().setData(appVehRebateWithApplyDetailsVo);
}

Loading…
Cancel
Save