diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleRebateVo.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleRebateVo.java
index 6788da33bf..ed214c8a02 100644
--- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleRebateVo.java
+++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleRebateVo.java
@@ -30,4 +30,6 @@ public class BaseVehicleRebateVo implements Vo {
private String costPrice;
@ApiModelProperty(value = "运费")
private String freight;
+ @ApiModelProperty(value = "上装金额")
+ private String topAmount;
}
diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml
index 88af0c7e98..2fb693b30a 100644
--- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml
+++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml
@@ -1319,11 +1319,15 @@
bvm.sid AS modelSid,
bv.vinNo,
bv.`freight`,
- bv.`costPrice`
+ bv.`costPrice`,
+ IFNULL(bs.costPrice, 0) AS topAmount
FROM
base_vehicle bv
LEFT JOIN base_vehicle_model bvm
- ON bv.`modelSid` = bvm.`sid` AND bv.createOrgSid = bvm.createOrg
+ ON bv.`modelSid` = bvm.`sid`
+ AND bv.createOrgSid = bvm.createOrg
+ LEFT JOIN base_vehinstall bs
+ ON RIGHT(bv.`vinNo`, 8) = RIGHT(bs.`vinNo`, 8)
${ew.sqlSegment}
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebate.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebate.java
index 6854601cd6..44674b7563 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebate.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebate.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.Date;
/**
@@ -107,6 +108,35 @@ public class ScmVehRebate extends BaseEntity {
private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态")
private Integer adjustmentState;
+
+ @ApiModelProperty("一次核对状态")
+ private Integer onceCheckState;
+ @ApiModelProperty("其中预计费用")
+ private BigDecimal expectCost;
+ @ApiModelProperty("差异金额")
+ private BigDecimal diffAmount;
+ @ApiModelProperty("预计待支付费用")
+ private BigDecimal expectTreatCost;
+ @ApiModelProperty("预计抵顶费用")
+ private BigDecimal expectSuppCost;
+ @ApiModelProperty("预计抵顶费用说明")
+ private String expectSuppRemark;
+ @ApiModelProperty("上装金额")
+ private BigDecimal topAmount;
+
+ @ApiModelProperty("一次待支付费用")
+ private BigDecimal onceTreatCost;
+ @ApiModelProperty("一次抵顶费用")
+ private BigDecimal onceSuppCost;
+ @ApiModelProperty("一次抵顶费用说明")
+ private String onceSuppRemark;
+ @ApiModelProperty("二次待支付费用")
+ private BigDecimal secondTreatCost;
+ @ApiModelProperty("二次抵顶费用")
+ private BigDecimal secondSuppCost;
+ @ApiModelProperty("二次抵顶费用说明")
+ private String secondSuppRemark;
+
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称")
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateDetailsVo.java
index 4d0feaff61..5992a84fab 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateDetailsVo.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateDetailsVo.java
@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import java.math.BigDecimal;
import java.util.Date;
/**
@@ -54,6 +55,8 @@ public class ScmVehRebateDetailsVo implements Vo {
private String sid; // sid
+ @ApiModelProperty("状态")
+ private String state;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建日期")
@@ -115,6 +118,35 @@ public class ScmVehRebateDetailsVo implements Vo {
private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态")
private Integer adjustmentState;
+
+ @ApiModelProperty("一次核对状态")
+ private Integer onceCheckState;
+ @ApiModelProperty("其中预计费用")
+ private BigDecimal expectCost;
+ @ApiModelProperty("差异金额")
+ private BigDecimal diffAmount;
+ @ApiModelProperty("预计待支付费用")
+ private BigDecimal expectTreatCost;
+ @ApiModelProperty("预计抵顶费用")
+ private BigDecimal expectSuppCost;
+ @ApiModelProperty("预计抵顶费用说明")
+ private String expectSuppRemark;
+ @ApiModelProperty("上装金额")
+ private BigDecimal topAmount;
+
+ @ApiModelProperty("一次待支付费用")
+ private BigDecimal onceTreatCost;
+ @ApiModelProperty("一次抵顶费用")
+ private BigDecimal onceSuppCost;
+ @ApiModelProperty("一次抵顶费用说明")
+ private String onceSuppRemark;
+ @ApiModelProperty("二次待支付费用")
+ private BigDecimal secondTreatCost;
+ @ApiModelProperty("二次抵顶费用")
+ private BigDecimal secondSuppCost;
+ @ApiModelProperty("二次抵顶费用说明")
+ private String secondSuppRemark;
+
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称")
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVehDto.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVehDto.java
index eb655727c0..91b0f47dbb 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVehDto.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVehDto.java
@@ -31,6 +31,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import java.math.BigDecimal;
import java.util.List;
/**
@@ -110,6 +111,35 @@ public class ScmVehRebateVehDto implements Dto {
private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态")
private Integer adjustmentState;
+
+ @ApiModelProperty("一次核对状态")
+ private Integer onceCheckState;
+ @ApiModelProperty("其中预计费用")
+ private BigDecimal expectCost;
+ @ApiModelProperty("差异金额")
+ private BigDecimal diffAmount;
+ @ApiModelProperty("预计待支付费用")
+ private BigDecimal expectTreatCost;
+ @ApiModelProperty("预计抵顶费用")
+ private BigDecimal expectSuppCost;
+ @ApiModelProperty("预计抵顶费用说明")
+ private String expectSuppRemark;
+ @ApiModelProperty("上装金额")
+ private BigDecimal topAmount;
+
+ @ApiModelProperty("一次待支付费用")
+ private BigDecimal onceTreatCost;
+ @ApiModelProperty("一次抵顶费用")
+ private BigDecimal onceSuppCost;
+ @ApiModelProperty("一次抵顶费用说明")
+ private String onceSuppRemark;
+ @ApiModelProperty("二次待支付费用")
+ private BigDecimal secondTreatCost;
+ @ApiModelProperty("二次抵顶费用")
+ private BigDecimal secondSuppCost;
+ @ApiModelProperty("二次抵顶费用说明")
+ private String secondSuppRemark;
+
@ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称")
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVo.java
index 88f99fbb5c..bd9e003225 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVo.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVo.java
@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import java.math.BigDecimal;
import java.util.Date;
/**
@@ -127,4 +128,17 @@ public class ScmVehRebateVo implements Vo {
private Boolean adjustOrNot;
@ApiModelProperty("调整状态")
private Integer adjustmentState;
+
+ @ApiModelProperty("备注")
+ private Integer remarks;
+ @ApiModelProperty("一次核对状态")
+ private Integer onceCheckState;
+ @ApiModelProperty("其中预计费用")
+ private BigDecimal expectCost;
+ @ApiModelProperty("预计待支付费用")
+ private BigDecimal expectTreatCost;
+ @ApiModelProperty("预计抵顶费用")
+ private BigDecimal expectSuppCost;
+ @ApiModelProperty("差异金额")
+ private BigDecimal diffAmount;
}
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java
index f7196e5f0d..302716dba7 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java
@@ -58,7 +58,11 @@ public class ScmVehRebateWithDetailsVo implements Vo {
private String remarks; // 备注
@ApiModelProperty("预提返利")
private BigDecimal withRebate; // 预提返利
- @ApiModelProperty("台数")
+ @ApiModelProperty("预计待支付费用")
+ private BigDecimal expectTreatCost;
+ @ApiModelProperty("预计抵顶费用")
+ private BigDecimal expectSuppCost;
+ @ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("单车返利sid")
private String vehRebateSid; // 单车返利sid
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java
index 893de69ba0..f0fb84b9f4 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java
@@ -49,6 +49,10 @@ import lombok.Data;
@ApiModel(value = "单车返利预提申请表 查询条件", description = "单车返利预提申请表 查询条件")
public class ScmVehRebateWithApplyQuery implements Query {
+ @ApiModelProperty("分公司名称")
+ private String useOrgName;
+ @ApiModelProperty("创建人")
+ private String createByName;
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@ApiModelProperty("预提申请")
diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java
index 52432291c9..4e21301dc5 100644
--- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java
+++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java
@@ -66,6 +66,8 @@ public class ScmVehRebateWithApplyVo implements Vo {
private String withApply; // 预提申请
@ApiModelProperty("预提返利合计")
private BigDecimal withRebateTotal; // 预提返利合计
+ @ApiModelProperty("预提费用")
+ private BigDecimal withholdCost;
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid")
diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
index ed603cf774..c4aa9ec5ab 100644
--- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
+++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
@@ -80,5 +80,5 @@ public interface ScmVehRebateMapper extends BaseMapper {
void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate,@Param("secondaryUploadMoney") String secondaryUploadMoney,@Param("money") String money,@Param("adjustmentRemarks") String adjustmentRemarks,@Param("sid") String sid);
- ScmVehRebateVo selectByVinNoAndOrgSid(@Param("vinNo") String vinNo,@Param("rebateTypeKey") String rebateTypeKey,@Param("rebateName") String rebateName,@Param("palceGenDate") String palceGenDate,@Param("useOrgSid") String useOrgSid);
+ 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);
}
\ No newline at end of file
diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
index aa7ffae716..0e2e350748 100644
--- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
+++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
@@ -21,9 +21,10 @@
SELECT *
FROM scm_veh_rebate
WHERE vinNo = #{vinNo}
- AND rebateTypeKey = #{rebateTypeKey}
+ AND rebateTypeValue = #{rebateTypeValue}
AND rebateName = #{rebateName}
AND palceGenDate = #{palceGenDate}
+ AND estimateRebate = #{estimateRebate}
AND createOrgSid = #{useOrgSid}
diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
index 9dd9b91762..9bd7a11a6e 100644
--- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
+++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
@@ -489,8 +489,8 @@ public class ScmVehRebateService extends MybatisBaseService= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
);
- qw.eq("adjustmentState", 1);
- qw.isNotNull("uploadDate");
+ qw.eq("adjustmentState", 0);
+ qw.eq("state", 2);
if (query.getSidList().size() > 0) {
qw.notIn("sid", query.getSidList());
}
@@ -525,13 +525,14 @@ public class ScmVehRebateService extends MybatisBaseService importVoList = new ArrayList<>();
Set checkWord = new HashSet<>();
@@ -759,6 +762,11 @@ public class ScmVehRebateService extends MybatisBaseService
SELECT
svrwa.*,
- SUM(svr.`estimateRebate`) withRebateTotal
+ SUM(svr.`estimateRebate`) withRebateTotal,
+ SUM(svr.expectTreatCost + expectSuppCost) as withholdCost
FROM
scm_veh_rebate_with_apply svrwa
LEFT JOIN scm_veh_rebate_with svrw
diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
index d1d527393d..0aae272d66 100644
--- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
+++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
@@ -151,6 +151,12 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
+ //是否储备配件
+ variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
//流程定义id
bv.setModelId(ProcDefEnum.PMSPURCHASEBILL.getProDefId());
bv.setFormVariables(variables);
@@ -430,6 +432,8 @@ public class PmsPurchaseBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
+ //是否储备配件
+ variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
Map appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
@@ -563,6 +567,8 @@ public class PmsPurchaseBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
+ //是否储备配件
+ variables.put("iscb","001".equals(purchaseBill.getManufacturersOrderTypeKey()));
bv.setModelId(purchaseBill.getProcDefId());
bv.setFormVariables(variables);
//=======================================
@@ -584,6 +590,8 @@ public class PmsPurchaseBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
+ //是否储备配件
+ variables.put("iscb","001".equals(purchaseBill.getManufacturersOrderTypeKey()));
bv.setModelId(purchaseBill.getProcDefId());
bv.setFormVariables(variables);
//=======================================
@@ -619,6 +627,8 @@ public class PmsPurchaseBillService extends MybatisBaseService list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
+ //是否储备配件
+ variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
flowTaskVo.setValues(variables);
ResultBean resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {