Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
yunuo970428 3 years ago
parent
commit
8753ae46b2
  1. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWith.java
  2. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDto.java
  3. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithVo.java
  4. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java
  5. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java
  6. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java
  7. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java
  8. 1
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.java
  9. 37
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml
  10. 22
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWith.java

@ -50,16 +50,8 @@ import lombok.Data;
public class ScmVehRebateWith extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("预提返利")
private String withRebate; // 预提返利
@ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("单车返利sid")
private String vehRebateSid; // 单车返利sid
@ApiModelProperty("返利类型key")
private String rebateTypeKey; // 返利类型key
@ApiModelProperty("返利类型value")
private String rebateTypeValue; // 返利类型value
@ApiModelProperty("单车返利预提申请sid")
private String mainSid; // 单车返利预提申请sid

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDto.java

@ -53,16 +53,8 @@ public class ScmVehRebateWithDto implements Dto {
private String sid; // sid
@ApiModelProperty("预提返利")
private String withRebate; // 预提返利
@ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("单车返利sid")
private List<String> vehRebateSids; // 单车返利sid
@ApiModelProperty("返利类型key")
private String rebateTypeKey; // 返利类型key
@ApiModelProperty("返利类型value")
private String rebateTypeValue; // 返利类型value
@ApiModelProperty("单车返利预提申请sid")
private String mainSid; // 单车返利预提申请sid
@ApiModelProperty("备注")

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithVo.java

@ -51,16 +51,8 @@ public class ScmVehRebateWithVo implements Vo {
private String sid; // sid
@ApiModelProperty("预提返利")
private String withRebate; // 预提返利
@ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("单车返利sid")
private String vehRebateSid; // 单车返利sid
@ApiModelProperty("返利类型key")
private String rebateTypeKey; // 返利类型key
@ApiModelProperty("返利类型value")
private String rebateTypeValue; // 返利类型value
@ApiModelProperty("单车返利预提申请sid")
private String mainSid; // 单车返利预提申请sid

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java

@ -56,8 +56,6 @@ public class ScmVehRebateWithApply extends BaseEntity {
private String brandName; // 品牌名称
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private String withRebateTotal; // 预提返利合计
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")

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

@ -65,8 +65,6 @@ public class ScmVehRebateWithApplyDetailsVo implements Vo {
private String brandName; // 品牌名称
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private String withRebateTotal; // 预提返利合计
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java

@ -62,8 +62,6 @@ public class ScmVehRebateWithApplyDto implements Dto {
private String brandName; // 品牌名称
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private String withRebateTotal; // 预提返利合计
@ApiModelProperty("创建人sid")
private String createBySid; // 创建人sid
@ApiModelProperty("创建人姓名")

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java

@ -63,8 +63,6 @@ public class ScmVehRebateWithApplyVo implements Vo {
private String brandName; // 品牌名称
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private String withRebateTotal; // 预提返利合计
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")

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

@ -68,6 +68,5 @@ public interface ScmVehRebateWithMapper extends BaseMapper<ScmVehRebateWith> {
@Delete("delete from scm_veh_rebate_with where mainSid = #{dtoSid}")
void delByMainSid(String dtoSid);
@Select("select * from scm_veh_rebate_with where mainSid = #{dtoSid}")
List<ScmVehRebateWithDetailsVo> fetchByMainSid(String sid);
}

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

@ -1,13 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehrebatewith.ScmVehRebateWithMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo">
SELECT * FROM scm_veh_rebate_with <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo">
SELECT * FROM scm_veh_rebate_with <where> ${ew.sqlSegment} </where>
</select>
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo">
SELECT * FROM scm_veh_rebate_with
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo">
SELECT * FROM scm_veh_rebate_with
<where>
${ew.sqlSegment}
</where>
</select>
<select id="fetchByMainSid" resultType="com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo">
SELECT svr.rebateTypeKey,
svr.`rebateTypeValue`,
SUM(svr.`estimateRebate`) estimateRebate,
COUNT(*) num,
GROUP_CONCAT(svrw.`vehRebateSid`) vehRebateSid
FROM scm_veh_rebate_with svrw
LEFT JOIN scm_veh_rebate svr
ON svr.`sid` = svrw.`vehRebateSid`
WHERE svrw.`mainSid` = #{sid}
GROUP BY svr.`calculationModeKey`
</select>
</mapper>

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

@ -39,6 +39,7 @@ 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.ScmVehRebateWith;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo;
import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto;
import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery;
@ -130,8 +131,13 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
if (StringUtils.isBlank(dtoSid)) {
String sid = this.insertByDto(dto).getData();
for (ScmVehRebateWithDto scmVehRebateWith : scmVehRebateWiths) {
scmVehRebateWith.setMainSid(sid);
scmVehRebateWithService.insertByDto(scmVehRebateWith);
List<String> vehRebateSids = scmVehRebateWith.getVehRebateSids();
for (String vehRebateSid : vehRebateSids) {
ScmVehRebateWith scmVehRebateWith1 = new ScmVehRebateWith();
scmVehRebateWith1.setVehRebateSid(vehRebateSid);
scmVehRebateWith1.setMainSid(sid);
scmVehRebateWithService.save(scmVehRebateWith1);
}
}
return rb.success().setMsg("添加成功").setData(sid);
}
@ -142,8 +148,13 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
this.updateByDto(dto);
scmVehRebateWithService.delByMainSid(dtoSid);
for (ScmVehRebateWithDto scmVehRebateWith : scmVehRebateWiths) {
scmVehRebateWith.setMainSid(dtoSid);
scmVehRebateWithService.insertByDto(scmVehRebateWith);
List<String> vehRebateSids = scmVehRebateWith.getVehRebateSids();
for (String vehRebateSid : vehRebateSids) {
ScmVehRebateWith scmVehRebateWith1 = new ScmVehRebateWith();
scmVehRebateWith1.setVehRebateSid(vehRebateSid);
scmVehRebateWith1.setMainSid(dtoSid);
scmVehRebateWithService.save(scmVehRebateWith1);
}
}
return rb.success().setMsg("修改成功").setData(dtoSid);
}
@ -190,8 +201,7 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat
BeanUtil.copyProperties(scmVehRebateWithApply,scmVehRebateWithApplyDetailsVo);
List<ScmVehRebateWithDetailsVo> scmVehRebateWithDetailsVos = scmVehRebateWithService.fetchByMainSid(sid);
for (ScmVehRebateWithDetailsVo scmVehRebateWithDetailsVo : scmVehRebateWithDetailsVos) {
String vehRebateSid = scmVehRebateWithDetailsVo.getVehRebateSid();
String[] vehRebateSids = vehRebateSid.split(",");
String[] vehRebateSids = scmVehRebateWithDetailsVo.getVehRebateSid().split(",");
scmVehRebateWithDetailsVo.setVehRebateSids(Arrays.asList(vehRebateSids));
}
scmVehRebateWithApplyDetailsVo.setScmVehRebateWiths(scmVehRebateWithDetailsVos);

Loading…
Cancel
Save