Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 4 months ago
parent
commit
3d698d63ab
  1. 1
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmfinanceadjustapply/AdjustVehListVo.java
  2. 1
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmfinanceadjustdetails/ScmFinanceAdjustDetails.java
  3. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatecheckapply/flow/GetNodeQuery.java
  4. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatedistribute/flow/GetNodeQuery.java
  5. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/flow/GetNodeQuery.java
  6. 8
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelInfo.java
  7. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatecheckapply/flow/GetNodeQuery.java
  8. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/flow/GetNodeQuery.java
  9. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmfinanceadjustapply/ScmFinanceAdjustApplyMapper.xml
  10. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
  11. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
  12. 56
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
  13. BIN
      anrui-scm/anrui-scm-biz/src/main/resources/static/单车返利管理.xls

1
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmfinanceadjustapply/AdjustVehListVo.java

@ -46,5 +46,6 @@ public class AdjustVehListVo {
private String nowDiffAmount; // 当前差异金额
@ApiModelProperty("单车返利管理sid")
private String rebateSid; // 单车返利管理sid
private String salesOrderSid; // 销售订单sid
}

1
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmfinanceadjustdetails/ScmFinanceAdjustDetails.java

@ -90,5 +90,6 @@ public class ScmFinanceAdjustDetails extends BaseEntity {
private BigDecimal nowDiffAmount; // 当前差异金额
@ApiModelProperty("单车返利管理sid")
private String rebateSid; // 单车返利管理sid
private String salesOrderSid; // 销售订单sid
}

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatecheckapply/flow/GetNodeQuery.java

@ -19,6 +19,8 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty(value = "分支字段及业务字段")
private Map<String, Object> formVariables;

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatedistribute/flow/GetNodeQuery.java

@ -19,6 +19,8 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty(value = "分支字段及业务字段")
private Map<String, Object> formVariables;

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmspecialrebatewithapply/flow/GetNodeQuery.java

@ -19,6 +19,8 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty(value = "分支字段及业务字段")
private Map<String, Object> formVariables;

8
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateExcelInfo.java

@ -3,8 +3,6 @@ package com.yxt.anrui.scm.api.scmvehrebate;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class ScmVehRebateExcelInfo {
@ -14,10 +12,12 @@ public class ScmVehRebateExcelInfo {
private String rebateTypeValue;
@ApiModelProperty("返利名称")
private String rebateName;
@ApiModelProperty("计算方式")
private String calculationModeValue;
@ApiModelProperty("计算标准")
private String calculationStandard;
@ApiModelProperty("返利金额")
private String estimateRebate;
// @ApiModelProperty("返利金额")
// private String estimateRebate;
@ApiModelProperty("其中待支付费用")
private String expectTreatCost;
@ApiModelProperty("其中抵顶费用")

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatecheckapply/flow/GetNodeQuery.java

@ -19,6 +19,8 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty(value = "分支字段及业务字段")
private Map<String, Object> formVariables;

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

@ -19,6 +19,8 @@ public class GetNodeQuery implements Query {
@ApiModelProperty(value = "环节定义id")
@NotBlank(message = "参数错误:taskDefKey")
private String taskDefKey;
@ApiModelProperty(value = "业务sid")
private String businessSid;
@ApiModelProperty(value = "分支字段及业务字段")
private Map<String, Object> formVariables;

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmfinanceadjustapply/ScmFinanceAdjustApplyMapper.xml

@ -42,7 +42,7 @@
</select>
<select id="getAdjustVehList"
resultType="com.yxt.anrui.scm.api.scmfinanceadjustapply.AdjustVehListVo">
SELECT n.*,bo.contractNo,bo.customerSid,bo.customerName,
SELECT n.*,bo.contractNo,bo.customerSid,bo.customerName,bo.sid salesOrderSid,
CASE
WHEN n.alreadyMoney = 0 THEN'未调整'
WHEN n.alreadyMoney != 0 AND n.nowDiffAmount != 0 THEN '部分调整'
@ -79,7 +79,7 @@
<select id="finAdjustList"
resultType="com.yxt.anrui.scm.api.scmfinanceadjustapply.AdjustVehListVo">
SELECT n.*,
bo.contractNo,bo.customerSid,bo.customerName,
bo.contractNo,bo.customerSid,bo.customerName,bo.sid salesOrderSid,
CASE
WHEN n.alreadyMoney = 0 THEN'未调整'
WHEN n.alreadyMoney != 0 AND n.nowDiffAmount != 0 THEN '部分调整'

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java

@ -69,7 +69,7 @@ public interface ScmVehRebateMapper extends BaseMapper<ScmVehRebate> {
void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate, @Param("secondaryUploadMoney") String secondaryUploadMoney, @Param("secondTreatCost") String secondTreatCost, @Param("secondSuppCost") String secondSuppCost, @Param("secondSuppRemark") String secondSuppRemark, @Param("adjustmentRemarks") String adjustmentRemarks, @Param("isAdjustment") String isAdjustment, @Param("adjustmentMoney") String adjustmentMoney, @Param("diffAmount") String diffAmount, @Param("sid") String sid);
ScmVehRebateVo selectByVinNoAndOrgSid(@Param("vinNo") String vinNo, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("palceGenDate") String palceGenDate, @Param("estimateRebate") String estimateRebate, @Param("useOrgSid") String useOrgSid);
ScmVehRebateVo selectByVinNoAndOrgSid(@Param("vinNo") String vinNo, @Param("rebateTypeValue") String rebateTypeValue, @Param("rebateName") String rebateName, @Param("palceGenDate") String palceGenDate, @Param("calculationModeValue") String calculationModeValue, @Param("useOrgSid") String useOrgSid);
@Update("update scm_veh_rebate set adjustmentState = #{adjustmentState} where sid = #{vehRebateSid}")
void updateAdjustmentState(@Param("vehRebateSid") String vehRebateSid, @Param("adjustmentState") int adjustmentState);

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml

@ -46,7 +46,7 @@
AND rebateTypeValue = #{rebateTypeValue}
AND rebateName = #{rebateName}
AND palceGenDate = #{palceGenDate}
AND estimateRebate = #{estimateRebate}
AND calculationModeValue = #{calculationModeValue}
AND createOrgSid = #{useOrgSid}
</select>

56
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java

@ -26,7 +26,6 @@
package com.yxt.anrui.scm.biz.scmvehrebate;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -39,16 +38,13 @@ import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.scm.api.scmcollectionrebate.ScmCollectionRebateVo;
import com.yxt.anrui.scm.api.scmspecialrebate.ScmSpecialRebateExcelVo;
import com.yxt.anrui.scm.api.scmvehrebate.*;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
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 org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
@ -661,7 +657,15 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
scmVehRebate.setRebateTypeValue(info.getRebateTypeValue());
scmVehRebate.setRebateName(info.getRebateName());
scmVehRebate.setCalculationStandard(info.getCalculationStandard());
scmVehRebate.setEstimateRebate(info.getEstimateRebate());
if (StringUtils.isNotBlank(info.getCalculationModeValue())) {
String calculationModeValue = info.getCalculationModeValue();
if (calculationModeValue.equals("比例")) {
scmVehRebate.setCalculationModeKey("001");
} else {
scmVehRebate.setCalculationModeKey("002");
}
scmVehRebate.setCalculationModeValue(info.getCalculationModeValue());
}
scmVehRebate.setPalceGenDate(info.getPalceGenDate());
scmVehRebate.setExpectTreatCost(new BigDecimal(info.getExpectTreatCost()));
scmVehRebate.setExpectSuppCost(new BigDecimal(info.getExpectSuppCost()));
@ -716,10 +720,10 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
importVo.setRebateName(temp);
break;
case 3:
importVo.setCalculationStandard(temp);
importVo.setCalculationModeValue(temp);
break;
case 4:
importVo.setEstimateRebate(temp);
importVo.setCalculationStandard(temp);
break;
case 5:
importVo.setExpectTreatCost(temp);
@ -757,10 +761,10 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
word = "返利名称";
break;
case 3:
word = "计算标准";
word = "计算方式(固定金额、比例)";
break;
case 4:
word = "返利金额";
word = "计算标准";
break;
case 5:
word = "其中待支付费用";
@ -788,7 +792,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
}
if (!importVoList.isEmpty()) {
for (ScmVehRebateExcelInfo excelInfo : importVoList) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(excelInfo.getVinNo(), excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getPalceGenDate(), excelInfo.getEstimateRebate(), useOrgSid);
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(excelInfo.getVinNo(), excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getPalceGenDate(), excelInfo.getCalculationModeValue(), useOrgSid);
if (scmVehRebateVo != null) {
checkWord.add("车架号为" + excelInfo.getVinNo() + "的单车返利信息已存在");
break;
@ -830,23 +834,27 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
checkWord.add("返利名称不能为空");
break;
}
if (StringUtils.isBlank(excelInfo.getCalculationStandard())) {
checkWord.add("计算标准不能为空");
break;
}
if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
checkWord.add("返利金额不能为空");
if (StringUtils.isBlank(excelInfo.getCalculationModeValue())) {
checkWord.add("计算方式不能为空");
break;
}
if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
String estimateRebate = excelInfo.getEstimateRebate();
Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
boolean matches = pattern.matcher(estimateRebate).matches();
if (!matches) {
checkWord.add("返利金额必须为数字");
if (StringUtils.isBlank(excelInfo.getCalculationStandard())) {
checkWord.add("计算标准不能为空");
break;
}
}
// if (StringUtils.isBlank(excelInfo.getEstimateRebate())) {
// checkWord.add("返利金额不能为空");
// break;
// }
// if (StringUtils.isNotBlank(excelInfo.getEstimateRebate())) {
// String estimateRebate = excelInfo.getEstimateRebate();
// Pattern pattern = Pattern.compile("^\\d+(.\\d{1,2})?$");
// boolean matches = pattern.matcher(estimateRebate).matches();
// if (!matches) {
// checkWord.add("返利金额必须为数字");
// break;
// }
// }
if (StringUtils.isBlank(excelInfo.getExpectTreatCost())) {
checkWord.add("其中待支付费用不能为空");
break;

BIN
anrui-scm/anrui-scm-biz/src/main/resources/static/单车返利管理.xls

Binary file not shown.
Loading…
Cancel
Save