God 8 months ago
parent
commit
b0601ecff3
  1. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicle/BaseVehicleRebateVo.java
  2. 8
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml
  3. 30
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebate.java
  4. 32
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateDetailsVo.java
  5. 30
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVehDto.java
  6. 14
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebate/ScmVehRebateVo.java
  7. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewith/ScmVehRebateWithDetailsVo.java
  8. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyQuery.java
  9. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyVo.java
  10. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.java
  11. 3
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateMapper.xml
  12. 18
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebate/ScmVehRebateService.java
  13. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewith/ScmVehRebateWithMapper.xml
  14. 3
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml
  15. 6
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java
  16. 10
      yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java

2
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; private String costPrice;
@ApiModelProperty(value = "运费") @ApiModelProperty(value = "运费")
private String freight; private String freight;
@ApiModelProperty(value = "上装金额")
private String topAmount;
} }

8
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicle/BaseVehicleMapper.xml

@ -1319,11 +1319,15 @@
bvm.sid AS modelSid, bvm.sid AS modelSid,
bv.vinNo, bv.vinNo,
bv.`freight`, bv.`freight`,
bv.`costPrice` bv.`costPrice`,
IFNULL(bs.costPrice, 0) AS topAmount
FROM FROM
base_vehicle bv base_vehicle bv
LEFT JOIN base_vehicle_model bvm 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)
<where> <where>
${ew.sqlSegment} ${ew.sqlSegment}
</where> </where>

30
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -107,6 +108,35 @@ public class ScmVehRebate extends BaseEntity {
private String calculationModeValue; // 计算方式Value private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态") @ApiModelProperty("调整状态")
private Integer adjustmentState; 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") @ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称") @ApiModelProperty("使用组织名称")

32
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -54,6 +55,8 @@ public class ScmVehRebateDetailsVo implements Vo {
private String sid; // sid private String sid; // sid
@ApiModelProperty("状态")
private String state;
@ApiModelProperty("创建人sid") @ApiModelProperty("创建人sid")
private String createBySid; private String createBySid;
@ApiModelProperty("创建日期") @ApiModelProperty("创建日期")
@ -115,6 +118,35 @@ public class ScmVehRebateDetailsVo implements Vo {
private String calculationModeValue; // 计算方式Value private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态") @ApiModelProperty("调整状态")
private Integer adjustmentState; 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") @ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称") @ApiModelProperty("使用组织名称")

30
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
@ -110,6 +111,35 @@ public class ScmVehRebateVehDto implements Dto {
private String calculationModeValue; // 计算方式Value private String calculationModeValue; // 计算方式Value
@ApiModelProperty("调整状态") @ApiModelProperty("调整状态")
private Integer adjustmentState; 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") @ApiModelProperty("使用组织sid")
private String useOrgSid; // 使用组织sid private String useOrgSid; // 使用组织sid
@ApiModelProperty("使用组织名称") @ApiModelProperty("使用组织名称")

14
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -127,4 +128,17 @@ public class ScmVehRebateVo implements Vo {
private Boolean adjustOrNot; private Boolean adjustOrNot;
@ApiModelProperty("调整状态") @ApiModelProperty("调整状态")
private Integer adjustmentState; 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;
} }

6
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; // 备注 private String remarks; // 备注
@ApiModelProperty("预提返利") @ApiModelProperty("预提返利")
private BigDecimal withRebate; // 预提返利 private BigDecimal withRebate; // 预提返利
@ApiModelProperty("台数") @ApiModelProperty("预计待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("预计抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("台数")
private String num; // 台数 private String num; // 台数
@ApiModelProperty("单车返利sid") @ApiModelProperty("单车返利sid")
private String vehRebateSid; // 单车返利sid private String vehRebateSid; // 单车返利sid

4
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 = "单车返利预提申请表 查询条件") @ApiModel(value = "单车返利预提申请表 查询条件", description = "单车返利预提申请表 查询条件")
public class ScmVehRebateWithApplyQuery implements Query { public class ScmVehRebateWithApplyQuery implements Query {
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("创建人")
private String createByName;
@ApiModelProperty("品牌sid") @ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid private String brandSid; // 品牌sid
@ApiModelProperty("预提申请") @ApiModelProperty("预提申请")

2
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; // 预提申请 private String withApply; // 预提申请
@ApiModelProperty("预提返利合计") @ApiModelProperty("预提返利合计")
private BigDecimal withRebateTotal; // 预提返利合计 private BigDecimal withRebateTotal; // 预提返利合计
@ApiModelProperty("预提费用")
private BigDecimal withholdCost;
@ApiModelProperty("创建人姓名") @ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名 private String createByName; // 创建人姓名
@ApiModelProperty("使用组织sid") @ApiModelProperty("使用组织sid")

2
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<ScmVehRebate> {
void updateTwoExcelInfo(@Param("secondaryUploadDate") String secondaryUploadDate,@Param("secondaryUploadMoney") String secondaryUploadMoney,@Param("money") String money,@Param("adjustmentRemarks") String adjustmentRemarks,@Param("sid") String sid); 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);
} }

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

@ -21,9 +21,10 @@
SELECT * SELECT *
FROM scm_veh_rebate FROM scm_veh_rebate
WHERE vinNo = #{vinNo} WHERE vinNo = #{vinNo}
AND rebateTypeKey = #{rebateTypeKey} AND rebateTypeValue = #{rebateTypeValue}
AND rebateName = #{rebateName} AND rebateName = #{rebateName}
AND palceGenDate = #{palceGenDate} AND palceGenDate = #{palceGenDate}
AND estimateRebate = #{estimateRebate}
AND createOrgSid = #{useOrgSid} AND createOrgSid = #{useOrgSid}
</select> </select>

18
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<ScmVehRebateMapper,
qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')"). qw.apply(StringUtils.isNotBlank(createStartTime), "date_format (createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')" apply(StringUtils.isNotBlank(createEndTime), "date_format (createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
); );
qw.eq("adjustmentState", 1); qw.eq("adjustmentState", 0);
qw.isNotNull("uploadDate"); qw.eq("state", 2);
if (query.getSidList().size() > 0) { if (query.getSidList().size() > 0) {
qw.notIn("sid", query.getSidList()); qw.notIn("sid", query.getSidList());
} }
@ -525,13 +525,14 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
if (scmVehRebateVehs.size() < 1) { if (scmVehRebateVehs.size() < 1) {
rb.setMsg("请选择返利车辆"); rb.setMsg("请选择返利车辆");
} }
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData(); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData(); SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData();
for (ScmVehRebateVehDto scmVehRebateVeh : scmVehRebateVehs) { for (ScmVehRebateVehDto scmVehRebateVeh : scmVehRebateVehs) {
ScmVehRebate scmVehRebate = new ScmVehRebate(); ScmVehRebate scmVehRebate = new ScmVehRebate();
BeanUtil.copyProperties(scmVehRebateVeh, scmVehRebate, "sid"); BeanUtil.copyProperties(scmVehRebateVeh, scmVehRebate, "sid");
String vinNo = scmVehRebateVeh.getVinNo(); String vinNo = scmVehRebateVeh.getVinNo();
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(vinNo,dto.getRebateTypeKey(),dto.getRebateName(),dto.getPalceGenDate(), useOrgSid); ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(vinNo,dto.getRebateTypeValue(),dto.getRebateName(),dto.getPalceGenDate(), scmVehRebateVeh.getEstimateRebate(),useOrgSid);
if (scmVehRebateVo != null) { if (scmVehRebateVo != null) {
return rb.setMsg("车架号为" + vinNo + "的单车返利信息已存在"); return rb.setMsg("车架号为" + vinNo + "的单车返利信息已存在");
} }
@ -542,6 +543,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
scmVehRebate.setCalculationModeKey(dto.getCalculationModeKey()); scmVehRebate.setCalculationModeKey(dto.getCalculationModeKey());
scmVehRebate.setCalculationModeValue(dto.getCalculationModeValue()); scmVehRebate.setCalculationModeValue(dto.getCalculationModeValue());
scmVehRebate.setCalculationStandard(dto.getCalculationStandard()); scmVehRebate.setCalculationStandard(dto.getCalculationStandard());
scmVehRebate.setExpectCost(scmVehRebateVeh.getExpectTreatCost().add(scmVehRebateVeh.getExpectSuppCost()));
scmVehRebate.setCreateOrgSid(useOrgSid); scmVehRebate.setCreateOrgSid(useOrgSid);
scmVehRebate.setCreateOrgName(sysOrganizationVo.getName()); scmVehRebate.setCreateOrgName(sysOrganizationVo.getName());
scmVehRebate.setUseOrgSid(useOrgSid); scmVehRebate.setUseOrgSid(useOrgSid);
@ -632,7 +634,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
wb = new XSSFWorkbook(is); wb = new XSSFWorkbook(is);
} }
Sheet sheet = wb.getSheetAt(0); Sheet sheet = wb.getSheetAt(0);
VehRebateExcelInfo importReturn = getSheetVal(sheet, resultCell, userSid); VehRebateExcelInfo importReturn = getSheetVal(sheet, resultCell, userSid, orgPath);
if (StringUtils.isNotBlank(importReturn.getCheckInfo())) { if (StringUtils.isNotBlank(importReturn.getCheckInfo())) {
return rb.setMsg(importReturn.getCheckInfo()); return rb.setMsg(importReturn.getCheckInfo());
} else { } else {
@ -676,7 +678,8 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
} }
} }
private VehRebateExcelInfo getSheetVal(Sheet sheet, int[] resultCell, String userSid) { private VehRebateExcelInfo getSheetVal(Sheet sheet, int[] resultCell, String userSid, String orgPath) {
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData();
VehRebateExcelInfo importReturn = new VehRebateExcelInfo(); VehRebateExcelInfo importReturn = new VehRebateExcelInfo();
List<ScmVehRebateExcelInfo> importVoList = new ArrayList<>(); List<ScmVehRebateExcelInfo> importVoList = new ArrayList<>();
Set<String> checkWord = new HashSet<>(); Set<String> checkWord = new HashSet<>();
@ -759,6 +762,11 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
} }
if (!importVoList.isEmpty()) { if (!importVoList.isEmpty()) {
for (ScmVehRebateExcelInfo excelInfo : importVoList) { for (ScmVehRebateExcelInfo excelInfo : importVoList) {
ScmVehRebateVo scmVehRebateVo = baseMapper.selectByVinNoAndOrgSid(excelInfo.getVinNo(), excelInfo.getRebateTypeValue(), excelInfo.getRebateName(), excelInfo.getPalceGenDate(), excelInfo.getEstimateRebate(), useOrgSid);
if (scmVehRebateVo != null) {
checkWord.add("车架号为" + excelInfo.getVinNo() + "的单车返利信息已存在");
break;
}
if (StringUtils.isBlank(excelInfo.getVinNo())) { if (StringUtils.isBlank(excelInfo.getVinNo())) {
checkWord.add("车架号不能为空"); checkWord.add("车架号不能为空");
break; break;

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

@ -21,6 +21,8 @@
SELECT svr.rebateTypeKey, SELECT svr.rebateTypeKey,
svr.`rebateTypeValue`, svr.`rebateTypeValue`,
SUM(svr.`estimateRebate`) withRebate, SUM(svr.`estimateRebate`) withRebate,
SUM(svr.expectTreatCost) as expectTreatCost,
SUM(svr.expectSuppCost) as expectSuppCost,
COUNT(*) num, COUNT(*) num,
GROUP_CONCAT(svrw.`vehRebateSid`) vehRebateSid GROUP_CONCAT(svrw.`vehRebateSid`) vehRebateSid
FROM scm_veh_rebate_with svrw FROM scm_veh_rebate_with svrw

3
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyMapper.xml

@ -6,7 +6,8 @@
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyVo"> <select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyVo">
SELECT SELECT
svrwa.*, svrwa.*,
SUM(svr.`estimateRebate`) withRebateTotal SUM(svr.`estimateRebate`) withRebateTotal,
SUM(svr.expectTreatCost + expectSuppCost) as withholdCost
FROM FROM
scm_veh_rebate_with_apply svrwa scm_veh_rebate_with_apply svrwa
LEFT JOIN scm_veh_rebate_with svrw LEFT JOIN scm_veh_rebate_with svrw

6
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<ScmVehRebat
return p; return p;
} }
} }
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.eq("svrwa.useOrgName", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getCreateByName())) {
qw.eq("svrwa.createByName", query.getCreateByName());
}
if (StringUtils.isNotBlank(query.getBrandSid())) { if (StringUtils.isNotBlank(query.getBrandSid())) {
qw.eq("svrwa.brandSid", query.getBrandSid()); qw.eq("svrwa.brandSid", query.getBrandSid());
} }

10
yxt-pms-biz/src/main/java/com/yxt/pms/biz/pms/pmspurchasebill/PmsPurchaseBillService.java

@ -345,6 +345,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = pmsPurchaseBill.getCreateBySid(); String createBySid = pmsPurchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
//流程定义id //流程定义id
bv.setModelId(ProcDefEnum.PMSPURCHASEBILL.getProDefId()); bv.setModelId(ProcDefEnum.PMSPURCHASEBILL.getProDefId());
bv.setFormVariables(variables); bv.setFormVariables(variables);
@ -430,6 +432,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = pmsPurchaseBill.getCreateBySid(); String createBySid = pmsPurchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
Map<String, Object> appMap = new HashMap<>(); Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid); appMap.put("sid", businessSid);
variables.put("app", appMap); variables.put("app", appMap);
@ -563,6 +567,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = purchaseBill.getCreateBySid(); String createBySid = purchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(purchaseBill.getManufacturersOrderTypeKey()));
bv.setModelId(purchaseBill.getProcDefId()); bv.setModelId(purchaseBill.getProcDefId());
bv.setFormVariables(variables); bv.setFormVariables(variables);
//======================================= //=======================================
@ -584,6 +590,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = purchaseBill.getCreateBySid(); String createBySid = purchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(purchaseBill.getManufacturersOrderTypeKey()));
bv.setModelId(purchaseBill.getProcDefId()); bv.setModelId(purchaseBill.getProcDefId());
bv.setFormVariables(variables); bv.setFormVariables(variables);
//======================================= //=======================================
@ -619,6 +627,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = pmsPurchaseBill.getCreateBySid(); String createBySid = pmsPurchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData(); List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777")); variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
flowTaskVo.setValues(variables); flowTaskVo.setValues(variables);
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) { if (!resultBean.getSuccess()) {

Loading…
Cancel
Save