God 8 months ago
parent
commit
0945b025ee
  1. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateDetailsVo.java
  2. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateDto.java
  3. 17
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewith/ScmSpecialRebateWithDetailsVo.java
  4. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApply.java
  5. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyDetailsVo.java
  6. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyDto.java
  7. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyQuery.java
  8. 14
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java
  9. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java
  10. 11
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml
  11. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java
  12. 64
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java
  13. 8
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.java
  14. 23
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewith/ScmSpecialRebateWithMapper.xml
  15. 8
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyMapper.java
  16. 11
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyMapper.xml
  17. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyService.java

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateDetailsVo.java

@ -101,6 +101,12 @@ public class ScmSpecialRebateDetailsVo implements Vo {
@ApiModelProperty("计算方式Value")
private String calculationModeValue; // 计算方式Value
@ApiModelProperty("采购系统sid")
private String purchaseSystemSid;
@ApiModelProperty("采购系统名称")
private String purchaseSystemName;
@ApiModelProperty("所属年月")
private String palceGenDate;
@ApiModelProperty("待确定金额(动态)")
private String stayDetermineMoney;
@ApiModelProperty("待确定金额(常量)")

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebate/ScmSpecialRebateDto.java

@ -96,6 +96,14 @@ public class ScmSpecialRebateDto implements Dto {
@ApiModelProperty("计算方式Value")
private String calculationModeValue; // 计算方式Value
@ApiModelProperty("采购系统sid")
private String purchaseSystemSid;
@ApiModelProperty("采购系统名称")
private String purchaseSystemName;
@ApiModelProperty("所属年月")
private String palceGenDate;
@ApiModelProperty("一次核对状态")
private Integer onceCheckState;
@ApiModelProperty("待确定金额(动态)")
private String stayDetermineMoney;
@ApiModelProperty("待确定金额(常量)")

17
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewith/ScmSpecialRebateWithDetailsVo.java

@ -32,6 +32,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -57,8 +58,6 @@ public class ScmSpecialRebateWithDetailsVo implements Vo {
private String remarks; // 备注
@ApiModelProperty("预提返利")
private String withRebate; // 预提返利
@ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("专项返利sid")
private List<String> specialRebateSids; // 专项返利sid
@ApiModelProperty("专项返利sid")
@ -70,4 +69,18 @@ public class ScmSpecialRebateWithDetailsVo implements Vo {
@ApiModelProperty("专项返利预提申请sid")
private String mainSid; // 专项返利预提申请sid
@ApiModelProperty("采购系统sid")
private String purchaseSystemSid;
@ApiModelProperty("采购系统名称")
private String purchaseSystemName;
@ApiModelProperty("品牌sid")
private String brandSid;
@ApiModelProperty("品牌名称")
private String brandName;
@ApiModelProperty("预计支出费用")
private BigDecimal expectItureCost;
@ApiModelProperty("预计待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("预计抵顶费用")
private BigDecimal expectSuppCost;
}

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApply.java

@ -50,10 +50,10 @@ import lombok.Data;
public class ScmSpecialRebateWithApply extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("品牌名称")
private String brandName; // 品牌名称
@ApiModelProperty("申请部门sid")
private String deptSid;
@ApiModelProperty("申请部门名称")
private String deptName;
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("创建人姓名")

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyDetailsVo.java

@ -59,10 +59,10 @@ public class ScmSpecialRebateWithApplyDetailsVo implements Vo {
private String createBySid; // 申请人sid
@ApiModelProperty("备注")
private String remarks; // 备注
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("品牌名称")
private String brandName; // 品牌名称
@ApiModelProperty("申请部门sid")
private String deptSid;
@ApiModelProperty("申请部门名称")
private String deptName;
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("创建人姓名")

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyDto.java

@ -57,10 +57,10 @@ public class ScmSpecialRebateWithApplyDto implements Dto {
@ApiModelProperty("备注")
private String remarks; // 备注
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("品牌名称")
private String brandName; // 品牌名称
@ApiModelProperty("申请部门sid")
private String deptSid;
@ApiModelProperty("申请部门名称")
private String deptName;
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("创建人sid")

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyQuery.java

@ -49,8 +49,8 @@ import lombok.Data;
@ApiModel(value = "专项返利预提申请表 查询条件", description = "专项返利预提申请表 查询条件")
public class ScmSpecialRebateWithApplyQuery implements Query {
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("分公司名称")
private String createOrgName;
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("创建开始日期")

14
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/ScmSpecialRebateWithApplyVo.java

@ -57,22 +57,16 @@ public class ScmSpecialRebateWithApplyVo implements Vo {
@ApiModelProperty("创建日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime; // 创建日期
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("品牌名称")
private String brandName; // 品牌名称
@ApiModelProperty("申请部门名称")
private String deptName;
@ApiModelProperty("预提申请")
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private Integer withRebateTotal; // 预提返利合计
@ApiModelProperty("其中预提费用")
private String withholdCost;
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@ApiModelProperty("创建组织sid")
private String createOrgSid; // 创建组织sid
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("流程状态")

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.java

@ -81,4 +81,6 @@ public interface ScmSpecialRebateMapper extends BaseMapper<ScmSpecialRebate> {
List<OneExcelVo> excelListOne(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
List<TwoExcelVo> excelListTwo(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
int checkSave(@Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebate> qw);
}

11
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateMapper.xml

@ -4,7 +4,9 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateVo">
SELECT * FROM scm_special_rebate
SELECT *,
expectItureCost + expectTreatCost + expectSuppCost AS expectCost
FROM scm_special_rebate
<where>
${ew.sqlSegment}
</where>
@ -89,4 +91,11 @@
${ew.sqlSegment}
</where>
</select>
<select id="checkSave" resultType="int">
select count(*) from scm_special_rebate
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateRest.java

@ -74,9 +74,7 @@ public class ScmSpecialRebateRest implements ScmSpecialRebateFeign {
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody ScmSpecialRebateDto dto) {
ResultBean rb = ResultBean.fireFail();
scmSpecialRebateService.saveOrUpdateDto(dto);
return rb.success();
return scmSpecialRebateService.saveOrUpdateDto(dto);
}
@Override

64
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebate/ScmSpecialRebateService.java

@ -29,6 +29,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sun.org.apache.regexp.internal.RE;
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
@ -147,18 +148,33 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
return p;
}
public void saveOrUpdateDto(ScmSpecialRebateDto dto) {
public ResultBean saveOrUpdateDto(ScmSpecialRebateDto dto) {
ResultBean rb = ResultBean.fireFail();
String dtoSid = dto.getSid();
QueryWrapper<ScmSpecialRebate> qw = new QueryWrapper<>();
qw.eq("createOrgSid",dto.getCreateOrgSid());
qw.like("createTime",DateUtil.formatDate(new Date()));
qw.eq("rebateTypeKey",dto.getRebateTypeKey());
qw.eq("rebateName",dto.getRebateName());
qw.eq("estimateRebate",dto.getEstimateRebate());
qw.eq("palceGenDate",dto.getPalceGenDate());
qw.eq("purchaseSystemSid",dto.getPurchaseSystemSid());
qw.eq("brandSid",dto.getBrandSid());
if (StringUtils.isBlank(dtoSid)) {
int i = baseMapper.checkSave(qw);
if (i > 0){
return rb.setMsg("返利信息已存在");
}
this.insertByDto(dto);
return;
return rb.success();
}
if ("是".equals(dto.getIsAdjustment())){
dto.setAdjustmentState(1);
}else {
dto.setAdjustmentState(2);
qw.ne("sid",dtoSid);
int i = baseMapper.checkSave(qw);
if (i > 0){
return rb.setMsg("返利信息已存在");
}
this.updateByDto(dto);
return rb.success();
}
public void insertByDto(ScmSpecialRebateDto dto) {
@ -185,14 +201,14 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
return vo;
}
public void updateState(String specialRebateSid,Integer state) {
baseMapper.updateState(specialRebateSid,state);
public void updateState(String specialRebateSid, Integer state) {
baseMapper.updateState(specialRebateSid, state);
}
public PagerVo<ScmSpecialRebateVo> withApplyGetSpecialRebate(PagerQuery<ScmSpecialRebateQuery> pq) {
ScmSpecialRebateQuery query = pq.getParams();
QueryWrapper<ScmSpecialRebate> qw = new QueryWrapper<>();
qw.eq("createOrgSid",query.getCreateOrgSid());
qw.eq("createOrgSid", query.getCreateOrgSid());
if (StringUtils.isNotBlank(query.getBrandName())) {
qw.like("brandName", query.getBrandName());
}
@ -446,14 +462,14 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
qw.like("ssr.rebateName", query.getRebateName());
}
qw.eq("ssr.state", 4);
qw.eq("ssca.nodeState","已办结");
qw.eq("ssca.nodeState", "已办结");
String createStartTime = query.getCreateStartTime();
String createEndTime = query.getCreateEndTime();
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (ssr.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (ssr.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
if (query.getSidList().size() > 0){
qw.notIn("ssr.sid",query.getSidList());
if (query.getSidList().size() > 0) {
qw.notIn("ssr.sid", query.getSidList());
}
IPage<ScmSpecialRebate> page = PagerUtil.queryToPage(pq);
IPage<ScmStayDisRebateVo> pagging = baseMapper.stayDisRebate(page, qw);
@ -461,10 +477,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
while (iterator.hasNext()) {
ScmStayDisRebateVo record = iterator.next();
int disVehCount = scmSpecialrebateVehsService.getDisVehCount(record.getSid());
if ("0".equals(query.getIsPage()) && disVehCount == 0){
if ("0".equals(query.getIsPage()) && disVehCount == 0) {
iterator.remove();
continue;
}else {
} else {
record.setDisNum(String.valueOf(disVehCount));
}
}
@ -634,10 +650,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getCreateTime())) {
String createTime = "";
if (isNumber(excelInfo.getCreateTime())){
if (isNumber(excelInfo.getCreateTime())) {
Date javaDate = new Date((long) ((Double.valueOf(excelInfo.getCreateTime()) - 25569) * 86400 * 1000));
createTime = DateUtil.formatDate(javaDate);
}else {
} else {
createTime = excelInfo.getCreateTime();
}
String[] split = createTime.split("-");
@ -683,10 +699,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getUploadDate())) {
String uploadDate = "";
if (isNumber(excelInfo.getUploadDate())){
if (isNumber(excelInfo.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(excelInfo.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
}else {
} else {
uploadDate = excelInfo.getUploadDate();
}
String[] split = uploadDate.split("-");
@ -978,10 +994,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getCreateTime())) {
String createTime = "";
if (isNumber(excelInfo.getCreateTime())){
if (isNumber(excelInfo.getCreateTime())) {
Date javaDate = new Date((long) ((Double.valueOf(excelInfo.getCreateTime()) - 25569) * 86400 * 1000));
createTime = DateUtil.formatDate(javaDate);
}else {
} else {
createTime = excelInfo.getCreateTime();
}
String[] split = createTime.split("-");
@ -1027,10 +1043,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getUploadDate())) {
String uploadDate = "";
if (isNumber(excelInfo.getUploadDate())){
if (isNumber(excelInfo.getUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(excelInfo.getUploadDate()) - 25569) * 86400 * 1000));
uploadDate = DateUtil.formatDate(javaDate);
}else {
} else {
uploadDate = excelInfo.getUploadDate();
}
String[] split = uploadDate.split("-");
@ -1074,10 +1090,10 @@ public class ScmSpecialRebateService extends MybatisBaseService<ScmSpecialRebate
}
if (StringUtils.isNotBlank(excelInfo.getSecondaryUploadDate())) {
String secondaryUploadDate = "";
if (isNumber(excelInfo.getSecondaryUploadDate())){
if (isNumber(excelInfo.getSecondaryUploadDate())) {
Date javaDate = new Date((long) ((Double.valueOf(excelInfo.getSecondaryUploadDate()) - 25569) * 86400 * 1000));
secondaryUploadDate = DateUtil.formatDate(javaDate);
}else {
} else {
secondaryUploadDate = excelInfo.getSecondaryUploadDate();
}
String[] split = secondaryUploadDate.split("-");

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

@ -57,16 +57,8 @@ import java.util.Map;
@Mapper
public interface ScmSpecialRebateWithMapper extends BaseMapper<ScmSpecialRebateWith> {
//@Update("update scm_special_rebate_with set name=#{msg} where id=#{id}")
//IPage<ScmSpecialRebateWithVo> voPage(IPage<ScmSpecialRebateWith> page, @Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebateWith> qw);
IPage<ScmSpecialRebateWithVo> selectPageVo(IPage<ScmSpecialRebateWith> page, @Param(Constants.WRAPPER) Wrapper<ScmSpecialRebateWith> qw);
List<ScmSpecialRebateWithVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmSpecialRebateWith> qw);
@Select("select * from scm_special_rebate_with")
List<ScmSpecialRebateWithVo> selectListVo();
@Delete("delete from scm_special_rebate_with where mainSid = #{dtoSid}")
void delByMainSid(String dtoSid);

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

@ -10,27 +10,28 @@
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithVo">
SELECT * FROM scm_special_rebate_with
<where>
${ew.sqlSegment}
</where>
</select>
<select id="fetchByMainSid" resultType="com.yxt.anrui.scm.api.scmspecialrebatewith.ScmSpecialRebateWithDetailsVo">
SELECT ssr.rebateTypeKey,
ssr.`rebateTypeValue`,
SUM(ssr.`estimateRebate`) withRebate,
COUNT(*) num,
GROUP_CONCAT(ssrw.`specialRebateSid`) specialRebateSid
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
FROM scm_special_rebate_with ssrw
LEFT JOIN scm_special_rebate ssr
ON ssr.`sid` = ssrw.`specialRebateSid`
WHERE ssrw.`mainSid` = #{sid}
GROUP BY ssr.rebateTypeKey
GROUP BY ssr.rebateTypeKey, ssr.purchaseSystemSid, ssr.brandSid
</select>
<select id="fetchBySpecialReBateSid" resultType="java.lang.String">
SELECT mainSid FROM scm_special_rebate_with WHERE specialRebateSid = #{sid}
SELECT mainSid
FROM scm_special_rebate_with
WHERE specialRebateSid = #{sid}
</select>
</mapper>

8
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyMapper.java

@ -54,16 +54,8 @@ import java.util.Map;
@Mapper
public interface ScmSpecialRebateWithApplyMapper extends BaseMapper<ScmSpecialRebateWithApply> {
//@Update("update scm_special_rebate_with_apply set name=#{msg} where id=#{id}")
//IPage<ScmSpecialRebateWithApplyVo> voPage(IPage<ScmSpecialRebateWithApply> page, @Param(Constants.WRAPPER) QueryWrapper<ScmSpecialRebateWithApply> qw);
IPage<ScmSpecialRebateWithApplyVo> selectPageVo(IPage<ScmSpecialRebateWithApply> page, @Param(Constants.WRAPPER) Wrapper<ScmSpecialRebateWithApply> qw);
List<ScmSpecialRebateWithApplyVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmSpecialRebateWithApply> qw);
@Select("select * from scm_special_rebate_with_apply")
List<ScmSpecialRebateWithApplyVo> selectListVo();
int selectBySid(String join);
int updateFlowFiled(Map<String, Object> beanToMap);

11
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmspecialrebatewithapply/ScmSpecialRebateWithApplyMapper.xml

@ -6,7 +6,8 @@
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApplyVo">
SELECT
ssrwa.*,
SUM(ssr.`estimateRebate`) withRebateTotal
SUM(ssr.`estimateRebate`) withRebateTotal,
SUM(ssr.expectItureCost + ssr.expectTreatCost + ssr.expectSuppCost) as withholdCost
FROM
scm_special_rebate_with_apply ssrwa
LEFT JOIN scm_special_rebate_with ssrw
@ -18,14 +19,6 @@
</where>
</select>
<select id="selectListAllVo"
resultType="com.yxt.anrui.scm.api.scmspecialrebatewithapply.ScmSpecialRebateWithApplyVo">
SELECT * FROM scm_special_rebate_with_apply
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectBySid" resultType="int">
SELECT COUNT(*)
FROM scm_special_rebate_with_apply

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

@ -151,8 +151,8 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
return p;
}
}
if (StringUtils.isNotBlank(query.getBrandSid())) {
qw.eq("ssrwa.brandSid", query.getBrandSid());
if (StringUtils.isNotBlank(query.getCreateOrgName())) {
qw.like("ssrwa.createOrgName", query.getCreateOrgName());
}
if (StringUtils.isNotBlank(query.getWithApply())) {
qw.like("ssrwa.withApply", query.getWithApply());
@ -257,9 +257,6 @@ public class ScmSpecialRebateWithApplyService extends MybatisBaseService<ScmSpec
for (ScmSpecialRebateWithDetailsVo scmSpecialRebateWithDetailsVo : scmSpecialRebateWithDetailsVos) {
String[] specialRebateSids = scmSpecialRebateWithDetailsVo.getSpecialRebateSid().split(",");
scmSpecialRebateWithDetailsVo.setSpecialRebateSids(Arrays.asList(specialRebateSids));
String withRebate = scmSpecialRebateWithDetailsVo.getWithRebate();
withRebate = withRebate.substring(0, withRebate.lastIndexOf("."));
scmSpecialRebateWithDetailsVo.setWithRebate(withRebate);
}
scmSpecialRebateWithApplyDetailsVo.setScmSpecialRebateWiths(scmSpecialRebateWithDetailsVos);
return rb.success().setData(scmSpecialRebateWithApplyDetailsVo);

Loading…
Cancel
Save