Browse Source

客户管理调式修复

master
dimengzhe 3 years ago
parent
commit
f3b40fe04b
  1. 10
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehiclemodel/VehModelQuery.java
  2. 6
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehmodelconfig/AppModelVeDetailVo.java
  3. 10
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclemodel/BaseVehicleModelService.java
  4. 81
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigMapper.xml
  5. 8
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java
  6. 2
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvehicledemand/CrmVehicledemandService.java
  7. 2
      anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvisit/CrmVisitMapper.xml

10
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehiclemodel/VehModelQuery.java

@ -2,19 +2,23 @@ package com.yxt.anrui.base.api.basevehiclemodel;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class VehModelQuery implements Query {
private static final long serialVersionUID = 4901809739666168867L;
@ApiModelProperty("车型名称")
private String modelName;
@ApiModelProperty("常用配置名称")
private String configName;
@ApiModelProperty("品牌sid")
private String brandSid;
@ApiModelProperty(value = "用户sid")
private String userSid;
@ApiModelProperty(value = "使用组织sid:后端内部使用")
private String orgSid;
}

6
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehmodelconfig/AppModelVeDetailVo.java

@ -22,5 +22,11 @@ public class AppModelVeDetailVo implements Vo {
@ApiModelProperty("销售指导价")
private BigDecimal saleReferencePrice;
@ApiModelProperty(value = "常用配置")
private String configName;
@ApiModelProperty(value = "其他配置")
private String otherConfig;
}

10
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclemodel/BaseVehicleModelService.java

@ -417,7 +417,7 @@ public class BaseVehicleModelService extends MybatisBaseService<BaseVehicleModel
/**
* 查询条件
*
* @param query
* @param
* @return
*/
/* private QueryWrapper<BaseVehicleModelListVo> notTheCompanyBuildQueryWrapper(BaseVehicleModelListQuery query) {
@ -467,7 +467,7 @@ public class BaseVehicleModelService extends MybatisBaseService<BaseVehicleModel
/**
* 更多车型分页列表(非本公司的)
*
* @param query
* @param
* @return
*/
/* public IPage<BaseVehicleModelListVo> notTheCompanyModelPageList(PagerQuery<BaseVehicleModelListQuery> query) {
@ -559,6 +559,9 @@ public class BaseVehicleModelService extends MybatisBaseService<BaseVehicleModel
public PagerVo<VehModelVo> listPageByVehmodel(PagerQuery<VehModelQuery> pq) {
VehModelQuery query = pq.getParams();
String userSid = query.getUserSid();
String orgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
query.setOrgSid(orgSid);
QueryWrapper<VehModelVo> qw = createQueryWrapper1(query);
IPage<VehModelVo> page = PagerUtil.queryToPage(pq);
IPage<VehModelVo> pagging = baseMapper.listPageByVehmodel(page, qw);
@ -577,6 +580,9 @@ public class BaseVehicleModelService extends MybatisBaseService<BaseVehicleModel
if (StringUtils.isNotBlank(query.getConfigName())) {
qw.like("bmc.configName", query.getConfigName());
}
if (StringUtils.isNotBlank(query.getOrgSid())) {
qw.eq("bvc.useOrgSid", query.getOrgSid());
}
return qw;
}

81
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigMapper.xml

@ -5,9 +5,9 @@
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelConfigVo">
SELECT bvc.*,
bvm.modelName,
bvm.`vehicleVersionValue`,
bvm.`vehicleTypeCode`,
bvm.modelName,
bvm.`vehicleVersionValue`,
bvm.`vehicleTypeCode`,
<!--车身颜色-->
bmc.carColor,
<!--驾驶室规格-->
@ -53,10 +53,10 @@
bmc.configName,
bvm.insideCode
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm
ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc
ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm
ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc
ON bvc.configurationItemsSid = bmc.sid
<where>
${ew.sqlSegment}
</where>
@ -73,14 +73,14 @@
<select id="getAppCommonlyUsedModelsByPageList"
resultType="com.yxt.anrui.base.api.basevehmodelconfig.AppCommonlyUsedModelsByPageListVo">
SELECT bvm.sid AS modelSid,
bvm.vehicleAlias,
bvm.brandName,
bvm.vehicleVersionValue,
bvm.fuelTypeValue,
bvm.gearboxTypeValue
bvm.vehicleAlias,
bvm.brandName,
bvm.vehicleVersionValue,
bvm.fuelTypeValue,
bvm.gearboxTypeValue
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
<where>
${ew.sqlSegment}
</where>
@ -109,8 +109,8 @@
bmc.brandName,
bvc.guidedPrice
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
WHERE bvm.sid = #{modelSid}
GROUP BY bvm.sid
</select>
@ -126,7 +126,7 @@
<select id="getConfigNumByModelSid" resultType="java.lang.String">
SELECT count(*)
FROM base_vehmodel_config bvc
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
WHERE bvc.modelSid = #{modelSid}
</select>
@ -170,8 +170,8 @@
bmc.configuringBao,
bmc.otherConfig
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.`sid`
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.`sid`
WHERE bvm.sid = #{modelSid}
AND bmc.sid = #{configSid}
</select>
@ -189,10 +189,12 @@
SELECT bvm.vehicleAlias AS modelName,
bvm.brandName,
bvm.carBrand AS brandSid,
bvc.guidedPrice AS saleReferencePrice
bvc.guidedPrice AS saleReferencePrice,
bmc.configName,
bmc.otherConfig
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
WHERE bvc.modelSid = #{modelSid}
AND bvc.configurationItemsSid = #{configSid}
AND bvc.useOrgSid = #{useOrg}
@ -205,16 +207,16 @@
bvc.`manufactorSettlementPrice`,
bvc.`guidedPrice`
FROM base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc ON bvc.`configurationItemsSid` = bmc.`sid`
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc ON bvc.`configurationItemsSid` = bmc.`sid`
WHERE bvc.sid = #{sid}
</select>
<select id="selectO" resultType="com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelVo">
select bvc.guidedPrice, bm.modelName, bmc.otherConfig, bm.carBrand as brandSid,bmc.configName
select bvc.guidedPrice, bm.modelName, bmc.otherConfig, bm.carBrand as brandSid, bmc.configName
from base_vehmodel_config bvc
left join base_vehicle_model bm on bvc.modelSid = bm.sid
left join base_model_config bmc on bvc.configurationItemsSid = bmc.sid
left join base_vehicle_model bm on bvc.modelSid = bm.sid
left join base_model_config bmc on bvc.configurationItemsSid = bmc.sid
where bvc.modelSid = #{modelSid}
and bvc.configurationItemsSid = #{configSid}
and bvc.useOrgSid = #{orgSid}
@ -248,8 +250,8 @@
bvc.guidedPrice as price,
bmc.otherConfig
FROM base_vehmodel_config bvc
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.sid
LEFT JOIN base_vehicle_model bvm ON bvc.modelSid = bvm.sid
WHERE bvc.modelSid = #{modelSid}
AND bvc.configurationItemsSid = #{configSid}
AND bvc.useOrgSid = #{useOrgSid}
@ -292,21 +294,20 @@
<select id="selVehModelByUseOrgSidAndModelSidAndConfigSid"
resultType="com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelConfigVos">
SELECT
bvm.`vehicleAlias`,
bvm.sid as modelSid,
bmc.`configName`,
bmc.sid as configSid,
bvc.`guidedPrice`
SELECT bvm.`vehicleAlias`,
bvm.sid as modelSid,
bmc.`configName`,
bmc.sid as configSid,
bvc.`guidedPrice`
FROM
base_vehmodel_config bvc
LEFT JOIN base_vehicle_model bvm
ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc
ON bvc.`configurationItemsSid` = bmc.`sid`
LEFT JOIN base_vehicle_model bvm
ON bvc.`modelSid` = bvm.`sid`
LEFT JOIN base_model_config bmc
ON bvc.`configurationItemsSid` = bmc.`sid`
<if test="vehicleStateValue != null and vehicleStateValue != ''">
LEFT JOIN base_vehicle bv
ON bvc.`modelSid` = bv.`modelSid`
ON bvc.`modelSid` = bv.`modelSid`
</if>
<where>
${ew.sqlSegment}

8
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehmodelconfig/BaseVehmodelConfigService.java

@ -454,10 +454,8 @@ public class BaseVehmodelConfigService extends MybatisBaseService<BaseVehmodelCo
public AppModelVeDetailVo getAppIntentionVehicleVo(String userSid, String modelSid, String configSid) {
AppModelVeDetailVo vo = null;
String useOrg = sysOrganizationFeign.getUseOrgByUserSid(userSid).getData().getSid();
if (StringUtils.isNotBlank(useOrg)) {
vo = baseMapper.getAppIntentionVehicleVo(useOrg, modelSid, configSid);
}
String orgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
vo = baseMapper.getAppIntentionVehicleVo(orgSid, modelSid, configSid);
return vo;
}
@ -590,7 +588,7 @@ public class BaseVehmodelConfigService extends MybatisBaseService<BaseVehmodelCo
qw.like("bmc.configName", query.getConfigName());
}
IPage<BaseVehmodelConfig> page = PagerUtil.queryToPage(pq);
IPage<BaseVehmodelConfigVos> pagging = baseMapper.selVehModelByUseOrgSidAndModelSidAndConfigSid(page, qw,query.getVehicleStateValue());
IPage<BaseVehmodelConfigVos> pagging = baseMapper.selVehModelByUseOrgSidAndModelSidAndConfigSid(page, qw, query.getVehicleStateValue());
PagerVo<BaseVehmodelConfigVos> p = PagerUtil.pageToVo(pagging, null);
return p;
}

2
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvehicledemand/CrmVehicledemandService.java

@ -326,6 +326,8 @@ public class CrmVehicledemandService extends MybatisBaseService<CrmVehicledemand
entity.setBrandName(data.getBrandName());
entity.setStates("1");
entity.setSaleReferencePrice(data.getSaleReferencePrice());
entity.setOtherConfig(data.getOtherConfig());
entity.setSketChconfiguration(data.getConfigName());
appCrmVehicleDemandDto.fillEntity(entity);
baseMapper.insert(entity);
return rb.success();

2
anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmvisit/CrmVisitMapper.xml

@ -36,7 +36,7 @@
<!--提醒日期-->
cv.remind_day,
cv.remind_day_key,
(SELECT COUNT(*) FROM crm_vehicledemand cve WHERE cve.customerSid = cv.customerSid) xqcounts
(SELECT COUNT(*) FROM crm_vehicledemand cve WHERE cve.customerSid = cv.customerSid and cve.states = 1) xqcounts
FROM crm_visit cv
${ew.customSqlSegment}
</select>

Loading…
Cancel
Save