Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 7 months ago
parent
commit
4de5d2a80a
  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;
@ApiModelProperty(value = "运费")
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,
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)
<where>
${ew.sqlSegment}
</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 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("使用组织名称")

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 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("使用组织名称")

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 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("使用组织名称")

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 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;
}

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; // 备注
@ApiModelProperty("预提返利")
private BigDecimal withRebate; // 预提返利
@ApiModelProperty("台数")
@ApiModelProperty("预计待支付费用")
private BigDecimal expectTreatCost;
@ApiModelProperty("预计抵顶费用")
private BigDecimal expectSuppCost;
@ApiModelProperty("台数")
private String num; // 台数
@ApiModelProperty("单车返利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 = "单车返利预提申请表 查询条件")
public class ScmVehRebateWithApplyQuery implements Query {
@ApiModelProperty("分公司名称")
private String useOrgName;
@ApiModelProperty("创建人")
private String createByName;
@ApiModelProperty("品牌sid")
private String brandSid; // 品牌sid
@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; // 预提申请
@ApiModelProperty("预提返利合计")
private BigDecimal withRebateTotal; // 预提返利合计
@ApiModelProperty("预提费用")
private BigDecimal withholdCost;
@ApiModelProperty("创建人姓名")
private String createByName; // 创建人姓名
@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);
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 *
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}
</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')").
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<ScmVehRebateMapper,
if (scmVehRebateVehs.size() < 1) {
rb.setMsg("请选择返利车辆");
}
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(useOrgSid).getData();
for (ScmVehRebateVehDto scmVehRebateVeh : scmVehRebateVehs) {
ScmVehRebate scmVehRebate = new ScmVehRebate();
BeanUtil.copyProperties(scmVehRebateVeh, scmVehRebate, "sid");
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) {
return rb.setMsg("车架号为" + vinNo + "的单车返利信息已存在");
}
@ -542,6 +543,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
scmVehRebate.setCalculationModeKey(dto.getCalculationModeKey());
scmVehRebate.setCalculationModeValue(dto.getCalculationModeValue());
scmVehRebate.setCalculationStandard(dto.getCalculationStandard());
scmVehRebate.setExpectCost(scmVehRebateVeh.getExpectTreatCost().add(scmVehRebateVeh.getExpectSuppCost()));
scmVehRebate.setCreateOrgSid(useOrgSid);
scmVehRebate.setCreateOrgName(sysOrganizationVo.getName());
scmVehRebate.setUseOrgSid(useOrgSid);
@ -632,7 +634,7 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper,
wb = new XSSFWorkbook(is);
}
Sheet sheet = wb.getSheetAt(0);
VehRebateExcelInfo importReturn = getSheetVal(sheet, resultCell, userSid);
VehRebateExcelInfo importReturn = getSheetVal(sheet, resultCell, userSid, orgPath);
if (StringUtils.isNotBlank(importReturn.getCheckInfo())) {
return rb.setMsg(importReturn.getCheckInfo());
} 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();
List<ScmVehRebateExcelInfo> importVoList = new ArrayList<>();
Set<String> checkWord = new HashSet<>();
@ -759,6 +762,11 @@ 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);
if (scmVehRebateVo != null) {
checkWord.add("车架号为" + excelInfo.getVinNo() + "的单车返利信息已存在");
break;
}
if (StringUtils.isBlank(excelInfo.getVinNo())) {
checkWord.add("车架号不能为空");
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,
svr.`rebateTypeValue`,
SUM(svr.`estimateRebate`) withRebate,
SUM(svr.expectTreatCost) as expectTreatCost,
SUM(svr.expectSuppCost) as expectSuppCost,
COUNT(*) num,
GROUP_CONCAT(svrw.`vehRebateSid`) vehRebateSid
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
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

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;
}
}
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())) {
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();
List<String> 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<PmsPurchaseBillMa
String createBySid = pmsPurchaseBill.getCreateBySid();
List<String> list = sysUserRoleFeign.getUserRoleSidByUserSid(createBySid).getData();
variables.put("iszg", list.contains("bdacdca7-7a62-49b1-84c6-e32a4ffab777"));
//是否储备配件
variables.put("iscb","001".equals(pmsPurchaseBill.getManufacturersOrderTypeKey()));
Map<String, Object> appMap = new HashMap<>();
appMap.put("sid", businessSid);
variables.put("app", appMap);
@ -563,6 +567,8 @@ public class PmsPurchaseBillService extends MybatisBaseService<PmsPurchaseBillMa
String createBySid = purchaseBill.getCreateBySid();
List<String> 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<PmsPurchaseBillMa
String createBySid = purchaseBill.getCreateBySid();
List<String> 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<PmsPurchaseBillMa
String createBySid = pmsPurchaseBill.getCreateBySid();
List<String> 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<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo);
if (!resultBean.getSuccess()) {

Loading…
Cancel
Save