Merge #33 into master from cc_20260106_point_update
铺位管理 地图 * cc_20260106_point_update: (15 commits squashed) - feat:铺位改造 - Merge branch 'refs/heads/master' into cc_20260106_point_update - feat:铺位调整 - feat:新增字段 - feat:新增字段 - feat:新增字段 - feat:点位ID 处理校验规则 - feat:保存铺位 返回点位ID - feat:根据主数据门店编码获取CRM点位数据 - feat:铺位 - feat:我的铺位 根据管辖 - fix:bug 查询 - fix:PC端点位新增直接关联铺位 bug - feat:过滤已开店的铺位 - Merge branch 'master' into cc_20260106_point_update Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/33
This commit is contained in:
@@ -10,9 +10,8 @@ public enum PointStatusEnum {
|
|||||||
|
|
||||||
//1.采集中、2.已评估、3.待审核、4.待审核可推荐、5.已审核、6.已签约、7.已失效
|
//1.采集中、2.已评估、3.待审核、4.待审核可推荐、5.已审核、6.已签约、7.已失效
|
||||||
POINT_STATUS_1(1, "采集中"),
|
POINT_STATUS_1(1, "采集中"),
|
||||||
POINT_STATUS_2(2, "已评估"),
|
POINT_STATUS_2(2, "待测算"),
|
||||||
POINT_STATUS_3(3, "待审核"),
|
POINT_STATUS_3(3, "待审核"),
|
||||||
POINT_STATUS_4(4, "待审核可推荐"),
|
|
||||||
POINT_STATUS_5(5, "已审核"),
|
POINT_STATUS_5(5, "已审核"),
|
||||||
POINT_STATUS_6(6, "已签约"),
|
POINT_STATUS_6(6, "已签约"),
|
||||||
POINT_STATUS_7(7, "已失效")
|
POINT_STATUS_7(7, "已失效")
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PointFinancialDataDO;
|
||||||
|
import com.cool.store.mapper.PointFinancialDataMapper;
|
||||||
|
import io.lettuce.core.dynamic.annotation.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/8 11:31
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PointFinancialDataDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PointFinancialDataMapper pointFinancialDataDOMapper;
|
||||||
|
|
||||||
|
public int insertPointFinancialData(PointFinancialDataDO pointFinancialDataDO){
|
||||||
|
return pointFinancialDataDOMapper.insertPointFinancialData(pointFinancialDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改点位财务数据
|
||||||
|
* @param pointFinancialDataDO 点位财务数据对象
|
||||||
|
* @return 更新记录数
|
||||||
|
*/
|
||||||
|
public int updatePointFinancialData(PointFinancialDataDO pointFinancialDataDO){
|
||||||
|
return pointFinancialDataDOMapper.updatePointFinancialData(pointFinancialDataDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据点位ID查询点位财务数据
|
||||||
|
* @param pointId 点位ID
|
||||||
|
* @return 点位财务数据对象
|
||||||
|
*/
|
||||||
|
public PointFinancialDataDO selectByPointId(@Param("pointId") Long pointId){
|
||||||
|
if(Objects.isNull(pointId)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return pointFinancialDataDOMapper.selectByPointId(pointId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,12 +6,14 @@ import com.cool.store.dto.MiniShopDTO;
|
|||||||
import com.cool.store.dto.PCPointListDTO;
|
import com.cool.store.dto.PCPointListDTO;
|
||||||
import com.cool.store.dto.PointInfoDTO;
|
import com.cool.store.dto.PointInfoDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.mapper.PointInfoMapper;
|
import com.cool.store.mapper.PointInfoMapper;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.vo.point.MiniPointPageVO;
|
import com.cool.store.vo.point.MiniPointPageVO;
|
||||||
import com.cool.store.vo.point.PointHomePageDataVO;
|
import com.cool.store.vo.point.PointHomePageDataVO;
|
||||||
|
import com.cool.store.vo.point.PointMapVO;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
@@ -127,6 +129,14 @@ public class PointInfoDAO {
|
|||||||
return pointInfoMapper.getTeamPointPage(eid,request);
|
return pointInfoMapper.getTeamPointPage(eid,request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PointMapVO> getAllPointList(String eid, PointMapRequest request) {
|
||||||
|
return pointInfoMapper.getAllPointList(eid,request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PointStatisticsDTO getTeamCount(String eid, AllPointPageRequest request) {
|
||||||
|
return pointInfoMapper.getTeamCount(eid,request);
|
||||||
|
}
|
||||||
|
|
||||||
public Integer recyclePoint(Long pointId) {
|
public Integer recyclePoint(Long pointId) {
|
||||||
if(Objects.isNull(pointId)){
|
if(Objects.isNull(pointId)){
|
||||||
return CommonConstants.ZERO;
|
return CommonConstants.ZERO;
|
||||||
|
|||||||
@@ -215,11 +215,19 @@ public class RegionDao {
|
|||||||
return regionMapper.getSubRegionByParentIdsAndRegionType(parentIdList, regionType);
|
return regionMapper.getSubRegionByParentIdsAndRegionType(parentIdList, regionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getSubIdsByRegionIdsAndType(List<String> regionIds,String regionType){
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param regionIds
|
||||||
|
* @param regionType
|
||||||
|
* @param queryInvestBigRegion 只查询招商所属大区 进一步过滤无关区域 因为新增铺位或者新增线索只能选择招商大区
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<String> getSubIdsByRegionIdsAndType(List<String> regionIds,String regionType,Boolean queryInvestBigRegion){
|
||||||
if (CollectionUtils.isEmpty(regionIds)){
|
if (CollectionUtils.isEmpty(regionIds)){
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
return regionMapper.getSubIdsByRegionIdsAndType(regionIds, regionType);
|
return regionMapper.getSubIdsByRegionIdsAndType(regionIds, regionType,queryInvestBigRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PointFinancialDataDO;
|
||||||
|
import io.lettuce.core.dynamic.annotation.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PointFinancialDataMapper extends Mapper<PointFinancialDataDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增点位财务数据
|
||||||
|
* @param pointFinancialDataDO 点位财务数据对象
|
||||||
|
* @return 插入记录数
|
||||||
|
*/
|
||||||
|
int insertPointFinancialData(PointFinancialDataDO pointFinancialDataDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改点位财务数据
|
||||||
|
* @param pointFinancialDataDO 点位财务数据对象
|
||||||
|
* @return 更新记录数
|
||||||
|
*/
|
||||||
|
int updatePointFinancialData(PointFinancialDataDO pointFinancialDataDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据点位ID查询点位财务数据
|
||||||
|
* @param pointId 点位ID
|
||||||
|
* @return 点位财务数据对象
|
||||||
|
*/
|
||||||
|
PointFinancialDataDO selectByPointId(@Param("pointId") Long pointId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,10 +4,12 @@ import com.cool.store.dto.MiniShopDTO;
|
|||||||
import com.cool.store.dto.PCPointListDTO;
|
import com.cool.store.dto.PCPointListDTO;
|
||||||
import com.cool.store.dto.PointInfoDTO;
|
import com.cool.store.dto.PointInfoDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.vo.point.MiniPointPageVO;
|
import com.cool.store.vo.point.MiniPointPageVO;
|
||||||
import com.cool.store.vo.point.PointHomePageDataVO;
|
import com.cool.store.vo.point.PointHomePageDataVO;
|
||||||
|
import com.cool.store.vo.point.PointMapVO;
|
||||||
import com.cool.store.vo.point.PointPageVO;
|
import com.cool.store.vo.point.PointPageVO;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -68,6 +70,21 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
|||||||
*/
|
*/
|
||||||
Page<PCPointListDTO> getTeamPointPage(@Param("eid")String eid,@Param("request") AllPointPageRequest request);
|
Page<PCPointListDTO> getTeamPointPage(@Param("eid")String eid,@Param("request") AllPointPageRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有的铺位 地图
|
||||||
|
* @param eid
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PointMapVO> getAllPointList(@Param("eid")String eid, @Param("request") PointMapRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取铺位统计数据
|
||||||
|
* @param eid
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PointStatisticsDTO getTeamCount(@Param("eid")String eid, @Param("request") AllPointPageRequest request);
|
||||||
/**
|
/**
|
||||||
* 回收铺位
|
* 回收铺位
|
||||||
* @param pointId
|
* @param pointId
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ public interface RegionMapper {
|
|||||||
List<RegionDO> getSubRegionByParentIdsAndRegionType( @Param("parentIds")List<Long> parentIds, @Param("regionType")String regionType);
|
List<RegionDO> getSubRegionByParentIdsAndRegionType( @Param("parentIds")List<Long> parentIds, @Param("regionType")String regionType);
|
||||||
|
|
||||||
|
|
||||||
List<String> getSubIdsByRegionIdsAndType(@Param("regionIds") List<String> regionIds, @Param("regionType")String regionType);
|
List<String> getSubIdsByRegionIdsAndType(@Param("regionIds") List<String> regionIds,
|
||||||
|
@Param("regionType")String regionType,
|
||||||
|
@Param("queryInvestBigRegion") Boolean queryInvestBigRegion);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,199 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PointFinancialDataMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointFinancialDataDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="point_id" jdbcType="BIGINT" property="pointId" />
|
||||||
|
<result column="equipment_cost" jdbcType="DECIMAL" property="equipmentCost" />
|
||||||
|
<result column="decoration_cost" jdbcType="DECIMAL" property="decorationCost" />
|
||||||
|
<result column="franchise_fee" jdbcType="DECIMAL" property="franchiseFee" />
|
||||||
|
<result column="management_fee" jdbcType="DECIMAL" property="managementFee" />
|
||||||
|
<result column="design_fee" jdbcType="DECIMAL" property="designFee" />
|
||||||
|
<result column="first_inventory_cost" jdbcType="DECIMAL" property="firstInventoryCost" />
|
||||||
|
<result column="deposit" jdbcType="DECIMAL" property="deposit" />
|
||||||
|
<result column="initial_investment" jdbcType="DECIMAL" property="initialInvestment" />
|
||||||
|
<result column="avg_daily_orders" jdbcType="INTEGER" property="avgDailyOrders" />
|
||||||
|
<result column="avg_order_price" jdbcType="DECIMAL" property="avgOrderPrice" />
|
||||||
|
<result column="operating_days_per_year" jdbcType="INTEGER" property="operatingDaysPerYear" />
|
||||||
|
<result column="daily_sales" jdbcType="DECIMAL" property="dailySales" />
|
||||||
|
<result column="annual_gmv" jdbcType="DECIMAL" property="annualGmv" />
|
||||||
|
<result column="monthly_sales" jdbcType="DECIMAL" property="monthlySales" />
|
||||||
|
<result column="gross_margin_rate" jdbcType="DECIMAL" property="grossMarginRate" />
|
||||||
|
<result column="annual_income" jdbcType="DECIMAL" property="annualIncome" />
|
||||||
|
<result column="material_cost_annual" jdbcType="DECIMAL" property="materialCostAnnual" />
|
||||||
|
<result column="material_cost_monthly" jdbcType="DECIMAL" property="materialCostMonthly" />
|
||||||
|
<result column="material_cost_rate" jdbcType="DECIMAL" property="materialCostRate" />
|
||||||
|
<result column="staff_count" jdbcType="INTEGER" property="staffCount" />
|
||||||
|
<result column="avg_salary" jdbcType="DECIMAL" property="avgSalary" />
|
||||||
|
<result column="staff_cost_annual" jdbcType="DECIMAL" property="staffCostAnnual" />
|
||||||
|
<result column="staff_cost_rate" jdbcType="DECIMAL" property="staffCostRate" />
|
||||||
|
<result column="rent_cost_annual" jdbcType="DECIMAL" property="rentCostAnnual" />
|
||||||
|
<result column="rent_cost_rate" jdbcType="DECIMAL" property="rentCostRate" />
|
||||||
|
<result column="takeaway_rate" jdbcType="DECIMAL" property="takeawayRate" />
|
||||||
|
<result column="platform_commission_rate" jdbcType="DECIMAL" property="platformCommissionRate" />
|
||||||
|
<result column="platform_commission" jdbcType="DECIMAL" property="platformCommission" />
|
||||||
|
<result column="utility_cost" jdbcType="DECIMAL" property="utilityCost" />
|
||||||
|
<result column="utility_cost_rate" jdbcType="DECIMAL" property="utilityCostRate" />
|
||||||
|
<result column="other_cost" jdbcType="DECIMAL" property="otherCost" />
|
||||||
|
<result column="other_cost_rate" jdbcType="DECIMAL" property="otherCostRate" />
|
||||||
|
<result column="operating_profit" jdbcType="DECIMAL" property="operatingProfit" />
|
||||||
|
<result column="operating_profit_rate" jdbcType="DECIMAL" property="operatingProfitRate" />
|
||||||
|
<result column="payback_period_years" jdbcType="DECIMAL" property="paybackPeriodYears" />
|
||||||
|
<result column="payback_period_months" jdbcType="DECIMAL" property="paybackPeriodMonths" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 新增点位财务数据 -->
|
||||||
|
<insert id="insertPointFinancialData" parameterType="com.cool.store.entity.PointFinancialDataDO">
|
||||||
|
INSERT INTO zxjp_point_financial_data
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pointId != null">point_id,</if>
|
||||||
|
<if test="equipmentCost != null">equipment_cost,</if>
|
||||||
|
<if test="decorationCost != null">decoration_cost,</if>
|
||||||
|
<if test="franchiseFee != null">franchise_fee,</if>
|
||||||
|
<if test="managementFee != null">management_fee,</if>
|
||||||
|
<if test="designFee != null">design_fee,</if>
|
||||||
|
<if test="firstInventoryCost != null">first_inventory_cost,</if>
|
||||||
|
<if test="deposit != null">deposit,</if>
|
||||||
|
<if test="initialInvestment != null">initial_investment,</if>
|
||||||
|
<if test="avgDailyOrders != null">avg_daily_orders,</if>
|
||||||
|
<if test="avgOrderPrice != null">avg_order_price,</if>
|
||||||
|
<if test="operatingDaysPerYear != null">operating_days_per_year,</if>
|
||||||
|
<if test="dailySales != null">daily_sales,</if>
|
||||||
|
<if test="annualGmv != null">annual_gmv,</if>
|
||||||
|
<if test="monthlySales != null">monthly_sales,</if>
|
||||||
|
<if test="grossMarginRate != null">gross_margin_rate,</if>
|
||||||
|
<if test="annualIncome != null">annual_income,</if>
|
||||||
|
<if test="materialCostAnnual != null">material_cost_annual,</if>
|
||||||
|
<if test="materialCostMonthly != null">material_cost_monthly,</if>
|
||||||
|
<if test="materialCostRate != null">material_cost_rate,</if>
|
||||||
|
<if test="staffCount != null">staff_count,</if>
|
||||||
|
<if test="avgSalary != null">avg_salary,</if>
|
||||||
|
<if test="staffCostAnnual != null">staff_cost_annual,</if>
|
||||||
|
<if test="staffCostRate != null">staff_cost_rate,</if>
|
||||||
|
<if test="rentCostAnnual != null">rent_cost_annual,</if>
|
||||||
|
<if test="rentCostRate != null">rent_cost_rate,</if>
|
||||||
|
<if test="takeawayRate != null">takeaway_rate,</if>
|
||||||
|
<if test="platformCommissionRate != null">platform_commission_rate,</if>
|
||||||
|
<if test="platformCommission != null">platform_commission,</if>
|
||||||
|
<if test="utilityCost != null">utility_cost,</if>
|
||||||
|
<if test="utilityCostRate != null">utility_cost_rate,</if>
|
||||||
|
<if test="otherCost != null">other_cost,</if>
|
||||||
|
<if test="otherCostRate != null">other_cost_rate,</if>
|
||||||
|
<if test="operatingProfit != null">operating_profit,</if>
|
||||||
|
<if test="operatingProfitRate != null">operating_profit_rate,</if>
|
||||||
|
<if test="paybackPeriodYears != null">payback_period_years,</if>
|
||||||
|
<if test="paybackPeriodMonths != null">payback_period_months,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="createUserId != null">create_user_id,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="updateUserId != null">update_user_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pointId != null">#{pointId,jdbcType=BIGINT},</if>
|
||||||
|
<if test="equipmentCost != null">#{equipmentCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="decorationCost != null">#{decorationCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="franchiseFee != null">#{franchiseFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="managementFee != null">#{managementFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="designFee != null">#{designFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="firstInventoryCost != null">#{firstInventoryCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="deposit != null">#{deposit,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="initialInvestment != null">#{initialInvestment,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="avgDailyOrders != null">#{avgDailyOrders,jdbcType=INTEGER},</if>
|
||||||
|
<if test="avgOrderPrice != null">#{avgOrderPrice,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingDaysPerYear != null">#{operatingDaysPerYear,jdbcType=INTEGER},</if>
|
||||||
|
<if test="dailySales != null">#{dailySales,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="annualGmv != null">#{annualGmv,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="monthlySales != null">#{monthlySales,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="grossMarginRate != null">#{grossMarginRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="annualIncome != null">#{annualIncome,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostAnnual != null">#{materialCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostMonthly != null">#{materialCostMonthly,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostRate != null">#{materialCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCount != null">#{staffCount,jdbcType=INTEGER},</if>
|
||||||
|
<if test="avgSalary != null">#{avgSalary,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCostAnnual != null">#{staffCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCostRate != null">#{staffCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="rentCostAnnual != null">#{rentCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="rentCostRate != null">#{rentCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="takeawayRate != null">#{takeawayRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="platformCommissionRate != null">#{platformCommissionRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="platformCommission != null">#{platformCommission,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="utilityCost != null">#{utilityCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="utilityCostRate != null">#{utilityCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="otherCost != null">#{otherCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="otherCostRate != null">#{otherCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingProfit != null">#{operatingProfit,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingProfitRate != null">#{operatingProfitRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="paybackPeriodYears != null">#{paybackPeriodYears,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="paybackPeriodMonths != null">#{paybackPeriodMonths,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="createUserId != null">#{createUserId,jdbcType=VARCHAR},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="updateUserId != null">#{updateUserId,jdbcType=VARCHAR},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 修改点位财务数据 -->
|
||||||
|
<update id="updatePointFinancialData" parameterType="com.cool.store.entity.PointFinancialDataDO">
|
||||||
|
UPDATE zxjp_point_financial_data
|
||||||
|
<set>
|
||||||
|
<if test="pointId != null">point_id = #{pointId,jdbcType=BIGINT},</if>
|
||||||
|
<if test="equipmentCost != null">equipment_cost = #{equipmentCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="decorationCost != null">decoration_cost = #{decorationCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="franchiseFee != null">franchise_fee = #{franchiseFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="managementFee != null">management_fee = #{managementFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="designFee != null">design_fee = #{designFee,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="firstInventoryCost != null">first_inventory_cost = #{firstInventoryCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="deposit != null">deposit = #{deposit,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="initialInvestment != null">initial_investment = #{initialInvestment,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="avgDailyOrders != null">avg_daily_orders = #{avgDailyOrders,jdbcType=INTEGER},</if>
|
||||||
|
<if test="avgOrderPrice != null">avg_order_price = #{avgOrderPrice,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingDaysPerYear != null">operating_days_per_year = #{operatingDaysPerYear,jdbcType=INTEGER},</if>
|
||||||
|
<if test="dailySales != null">daily_sales = #{dailySales,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="annualGmv != null">annual_gmv = #{annualGmv,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="monthlySales != null">monthly_sales = #{monthlySales,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="grossMarginRate != null">gross_margin_rate = #{grossMarginRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="annualIncome != null">annual_income = #{annualIncome,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostAnnual != null">material_cost_annual = #{materialCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostMonthly != null">material_cost_monthly = #{materialCostMonthly,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="materialCostRate != null">material_cost_rate = #{materialCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCount != null">staff_count = #{staffCount,jdbcType=INTEGER},</if>
|
||||||
|
<if test="avgSalary != null">avg_salary = #{avgSalary,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCostAnnual != null">staff_cost_annual = #{staffCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="staffCostRate != null">staff_cost_rate = #{staffCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="rentCostAnnual != null">rent_cost_annual = #{rentCostAnnual,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="rentCostRate != null">rent_cost_rate = #{rentCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="takeawayRate != null">takeaway_rate = #{takeawayRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="platformCommissionRate != null">platform_commission_rate = #{platformCommissionRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="platformCommission != null">platform_commission = #{platformCommission,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="utilityCost != null">utility_cost = #{utilityCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="utilityCostRate != null">utility_cost_rate = #{utilityCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="otherCost != null">other_cost = #{otherCost,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="otherCostRate != null">other_cost_rate = #{otherCostRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingProfit != null">operating_profit = #{operatingProfit,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="operatingProfitRate != null">operating_profit_rate = #{operatingProfitRate,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="paybackPeriodYears != null">payback_period_years = #{paybackPeriodYears,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="paybackPeriodMonths != null">payback_period_months = #{paybackPeriodMonths,jdbcType=DECIMAL},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="updateUserId != null">update_user_id = #{updateUserId,jdbcType=VARCHAR},</if>
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 根据点位ID查询 -->
|
||||||
|
<select id="selectByPointId" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM zxjp_point_financial_data
|
||||||
|
WHERE point_id = #{pointId,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -34,6 +34,7 @@
|
|||||||
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
|
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
|
||||||
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
|
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
|
||||||
<result column="point_location" jdbcType="VARCHAR" property="pointLocation"/>
|
<result column="point_location" jdbcType="VARCHAR" property="pointLocation"/>
|
||||||
|
<result column="protection_distance" jdbcType="VARCHAR" property="protectionDistance"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
|
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
|
||||||
create_time, update_time,
|
create_time, update_time,
|
||||||
province, city, district, township, opportunity_point_code, opportunity_point_name,
|
province, city, district, township, opportunity_point_code, opportunity_point_name,
|
||||||
province_code, city_code, district_code, point_location
|
province_code, city_code, district_code, point_location,protection_distance
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
|
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
|
||||||
@@ -78,7 +79,10 @@
|
|||||||
from xfsg_point_info a
|
from xfsg_point_info a
|
||||||
left join xfsg_shop_info b on a.shop_id = b.id
|
left join xfsg_shop_info b on a.shop_id = b.id
|
||||||
left join store_${eid} c on b.shop_code = c.store_num
|
left join store_${eid} c on b.shop_code = c.store_num
|
||||||
where a.deleted = 0 and a.development_manager = #{request.developmentManager}
|
where a.deleted = 0
|
||||||
|
<if test="request.developmentManager!=null and request.developmentManager!=''">
|
||||||
|
and a.development_manager = #{request.developmentManager}
|
||||||
|
</if>
|
||||||
<if test="request.keyword != null and request.keyword != ''">
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
||||||
#{request.keyword},
|
#{request.keyword},
|
||||||
@@ -114,6 +118,12 @@
|
|||||||
#{regionId}
|
#{regionId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||||
|
and a.region_id in
|
||||||
|
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||||
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
||||||
#{request.areaCode})
|
#{request.areaCode})
|
||||||
@@ -224,6 +234,94 @@
|
|||||||
</if>
|
</if>
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getAllPointList" resultType="com.cool.store.vo.point.PointMapVO">
|
||||||
|
select
|
||||||
|
a.id as pointId,
|
||||||
|
a.point_name as pointName,
|
||||||
|
a.longitude as longitude,
|
||||||
|
a.latitude as latitude,
|
||||||
|
a.point_status as pointStatus
|
||||||
|
from xfsg_point_info a
|
||||||
|
left join xfsg_shop_info b on a.id = b.point_id
|
||||||
|
left join `store_${enterpriseId}` c on c.store_num = b.shop_code
|
||||||
|
where a.deleted = 0 and a.point_status in (5,6) and c.id is null
|
||||||
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
|
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
||||||
|
#{request.keyword},
|
||||||
|
'%'))
|
||||||
|
</if>
|
||||||
|
<if test="request.developmentManager != null and request.developmentManager != ''">
|
||||||
|
and a.development_manager = #{request.developmentManager}
|
||||||
|
</if>
|
||||||
|
<if test="request.pointStatus != null and request.pointStatus != ''">
|
||||||
|
and a.point_status = #{request.pointStatus}
|
||||||
|
</if>
|
||||||
|
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||||
|
and a.region_id in
|
||||||
|
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||||
|
and a.region_id in
|
||||||
|
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
order by a.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getTeamCount" resultType="com.cool.store.dto.point.PointStatisticsDTO">
|
||||||
|
select
|
||||||
|
sum(case when point_status = 5 then 1 else 0 end) as approvedCount,
|
||||||
|
sum(case when point_status = 6 then 1 else 0 end) as contractedCount,
|
||||||
|
sum(case when point_status = 7 then 1 else 0 end) as invalidCount
|
||||||
|
from xfsg_point_info a
|
||||||
|
left join xfsg_shop_info b on a.shop_id = b.id
|
||||||
|
left join store_${eid} c on b.shop_code = c.store_num
|
||||||
|
where a.deleted = 0 and a.point_status in (5,6,7)
|
||||||
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
|
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
||||||
|
#{request.keyword},
|
||||||
|
'%'))
|
||||||
|
</if>
|
||||||
|
<if test="request.developmentManager != null and request.developmentManager != ''">
|
||||||
|
and a.development_manager = #{request.developmentManager}
|
||||||
|
</if>
|
||||||
|
<if test="request.pointStatus != null and request.pointStatus != ''">
|
||||||
|
and a.point_status = #{request.pointStatus}
|
||||||
|
</if>
|
||||||
|
<if test="request.createStartTime != null and request.createStartTime != ''">
|
||||||
|
and a.create_time >= #{request.createStartTime}
|
||||||
|
</if>
|
||||||
|
<if test="request.createEndTime != null and request.createEndTime != ''">
|
||||||
|
<![CDATA[and a.create_time <= #{request.createEndTime}]]>
|
||||||
|
</if>
|
||||||
|
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||||
|
and a.region_id in
|
||||||
|
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||||
|
and a.region_id in
|
||||||
|
<foreach collection="request.authRegionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="request.storageStatus != null ">
|
||||||
|
and a.storage_status = #{request.storageStatus}
|
||||||
|
</if>
|
||||||
|
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||||
|
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
||||||
|
#{request.areaCode})
|
||||||
|
</if>
|
||||||
|
order by a.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getDataByShopIdAndLineId" resultType="com.cool.store.entity.PointInfoDO">
|
<select id="getDataByShopIdAndLineId" resultType="com.cool.store.entity.PointInfoDO">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="allColumn"/>
|
<include refid="allColumn"/>
|
||||||
|
|||||||
@@ -367,6 +367,7 @@
|
|||||||
<if test="thirdRegionType != null and thirdRegionType != ''">
|
<if test="thirdRegionType != null and thirdRegionType != ''">
|
||||||
and third_region_type = #{thirdRegionType}
|
and third_region_type = #{thirdRegionType}
|
||||||
</if>
|
</if>
|
||||||
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getRegionByStoreId" resultType="com.cool.store.entity.RegionDO">
|
<select id="getRegionByStoreId" resultType="com.cool.store.entity.RegionDO">
|
||||||
select <include refid="fields"/>
|
select <include refid="fields"/>
|
||||||
@@ -460,6 +461,9 @@
|
|||||||
<if test="regionType!=null">
|
<if test="regionType!=null">
|
||||||
and region_type = #{regionType}
|
and region_type = #{regionType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="queryInvestBigRegion!=null and queryInvestBigRegion">
|
||||||
|
and third_region_type = '1'
|
||||||
|
</if>
|
||||||
and
|
and
|
||||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" >
|
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" >
|
||||||
region_path like concat("%/", #{region}, "/%")
|
region_path like concat("%/", #{region}, "/%")
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.cool.store.dto.point;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/8 15:00
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PointStatisticsDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("已签约数量")
|
||||||
|
private Integer contractedCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("已审核数量")
|
||||||
|
private Integer approvedCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("已失效数量")
|
||||||
|
private Integer invalidCount;
|
||||||
|
|
||||||
|
private Integer totalCount;
|
||||||
|
|
||||||
|
|
||||||
|
public PointStatisticsDTO() {
|
||||||
|
this.contractedCount = 0;
|
||||||
|
this.approvedCount = 0;
|
||||||
|
this.invalidCount = 0;
|
||||||
|
this.totalCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalCount() {
|
||||||
|
return totalCount = contractedCount + approvedCount + invalidCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.entity;
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -172,4 +173,7 @@ public class PointInfoDO {
|
|||||||
|
|
||||||
@Column(name = "point_location")
|
@Column(name = "point_location")
|
||||||
private String pointLocation;
|
private String pointLocation;
|
||||||
|
|
||||||
|
@Column(name = "protection_distance")
|
||||||
|
private Integer protectionDistance;
|
||||||
}
|
}
|
||||||
@@ -252,6 +252,9 @@ public class AddPointDetailRequest {
|
|||||||
@NotBlank(message = "铺位经纬度geohash不能为空")
|
@NotBlank(message = "铺位经纬度geohash不能为空")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
|
@ApiModelProperty("保护距离")
|
||||||
|
private Integer protectionDistance;
|
||||||
|
|
||||||
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
|
public static PointDetailInfoDO convertDO(AddPointDetailRequest request) {
|
||||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||||
result.setBusinessStatus(request.getBusinessStatus());
|
result.setBusinessStatus(request.getBusinessStatus());
|
||||||
@@ -319,6 +322,7 @@ public class AddPointDetailRequest {
|
|||||||
result.setCity(request.getCity());
|
result.setCity(request.getCity());
|
||||||
result.setDistrict(request.getDistrict());
|
result.setDistrict(request.getDistrict());
|
||||||
result.setTownship(request.getTownship());
|
result.setTownship(request.getTownship());
|
||||||
|
result.setProtectionDistance(request.getProtectionDistance());
|
||||||
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
|
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
|
||||||
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
|
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
|
||||||
if(Objects.nonNull(addressInfo)){
|
if(Objects.nonNull(addressInfo)){
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PointMapRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("铺位名称或编号")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@ApiModelProperty("选择区域")
|
||||||
|
private List<String> regionIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "招商专员")
|
||||||
|
private String developmentManager;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位状态")
|
||||||
|
private Integer pointStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管辖区域", hidden = true)
|
||||||
|
private List<String> authRegionIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前登录人")
|
||||||
|
private String currentUserId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -35,7 +35,7 @@ public class PointPageRequest extends PageBasicInfo {
|
|||||||
@ApiModelProperty("结束拓展时间 yyyy-MM-dd HH:mm:ss")
|
@ApiModelProperty("结束拓展时间 yyyy-MM-dd HH:mm:ss")
|
||||||
private String developmentEndTime;
|
private String developmentEndTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "拓展专员", hidden = true)
|
@ApiModelProperty(value = "拓展专员")
|
||||||
private String developmentManager;
|
private String developmentManager;
|
||||||
|
|
||||||
@Min(1)@Max(2)
|
@Min(1)@Max(2)
|
||||||
@@ -57,14 +57,14 @@ public class PointPageRequest extends PageBasicInfo {
|
|||||||
@ApiModelProperty("省市区编码,传最后一级")
|
@ApiModelProperty("省市区编码,传最后一级")
|
||||||
private String areaCode;
|
private String areaCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管辖区域",hidden = true)
|
||||||
|
private List<String> authRegionIds;
|
||||||
|
|
||||||
public List<Integer> getPointStatusList() {
|
public List<Integer> getPointStatusList() {
|
||||||
List<Integer> pointStatusList = new ArrayList<>();
|
List<Integer> pointStatusList = new ArrayList<>();
|
||||||
if (pointStatus != null) {
|
if (pointStatus != null) {
|
||||||
pointStatusList.add(pointStatus);
|
pointStatusList.add(pointStatus);
|
||||||
}
|
}
|
||||||
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
|
|
||||||
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
|
|
||||||
}
|
|
||||||
return pointStatusList;
|
return pointStatusList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ public class RecommendPointPageRequest extends PageBasicInfo {
|
|||||||
if (pointStatus != null) {
|
if (pointStatus != null) {
|
||||||
pointStatusList.add(pointStatus);
|
pointStatusList.add(pointStatus);
|
||||||
}
|
}
|
||||||
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
|
|
||||||
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
|
|
||||||
}
|
|
||||||
return pointStatusList;
|
return pointStatusList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import java.util.Objects;
|
|||||||
@Data
|
@Data
|
||||||
public class UpdatePointDetailRequest extends AddPointDetailRequest {
|
public class UpdatePointDetailRequest extends AddPointDetailRequest {
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@ApiModelProperty("点位id")
|
@ApiModelProperty("点位id")
|
||||||
private Long pointId;
|
private Long pointId;
|
||||||
|
|
||||||
@@ -89,6 +88,7 @@ public class UpdatePointDetailRequest extends AddPointDetailRequest {
|
|||||||
result.setCity(request.getCity());
|
result.setCity(request.getCity());
|
||||||
result.setDistrict(request.getDistrict());
|
result.setDistrict(request.getDistrict());
|
||||||
result.setTownship(request.getTownship());
|
result.setTownship(request.getTownship());
|
||||||
|
result.setProtectionDistance(request.getProtectionDistance());
|
||||||
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
|
if(StringUtils.isAnyBlank(result.getProvince(),result.getCity(), result.getDistrict(), result.getTownship())){
|
||||||
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
|
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(result.getLatitude(), result.getLongitude());
|
||||||
if(Objects.nonNull(addressInfo)){
|
if(Objects.nonNull(addressInfo)){
|
||||||
|
|||||||
@@ -0,0 +1,271 @@
|
|||||||
|
package com.cool.store.request.point;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/8 13:42
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddPointFinancialDataRequest {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("点位ID")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("设备费")
|
||||||
|
private BigDecimal equipmentCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("装修费")
|
||||||
|
private BigDecimal decorationCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("加盟费")
|
||||||
|
private BigDecimal franchiseFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("管理费")
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("设计费")
|
||||||
|
private BigDecimal designFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首批进货成本
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("首批进货成本")
|
||||||
|
private BigDecimal firstInventoryCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("押金")
|
||||||
|
private BigDecimal deposit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始投资额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("初始投资额")
|
||||||
|
private BigDecimal initialInvestment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日均订单量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("日均订单量")
|
||||||
|
private Integer avgDailyOrders;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日均单价
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("日均单价")
|
||||||
|
private BigDecimal avgOrderPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每年运营天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每年运营天数")
|
||||||
|
private Integer operatingDaysPerYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每日销售额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每日销售额")
|
||||||
|
private BigDecimal dailySales;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全年GMV
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("全年GMV")
|
||||||
|
private BigDecimal annualGmv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每月销售额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每月销售额")
|
||||||
|
private BigDecimal monthlySales;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店产品毛利率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店产品毛利率")
|
||||||
|
private BigDecimal grossMarginRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正新货品年收入
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("正新货品年收入")
|
||||||
|
private BigDecimal annualIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本")
|
||||||
|
private BigDecimal materialCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本(元/月)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本")
|
||||||
|
private BigDecimal materialCostMonthly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本占收入")
|
||||||
|
private BigDecimal materialCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("人员数量")
|
||||||
|
private Integer staffCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均工资
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("平均工资")
|
||||||
|
private BigDecimal avgSalary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("员工成本")
|
||||||
|
private BigDecimal staffCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("员工成本占收入")
|
||||||
|
private BigDecimal staffCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租金成本")
|
||||||
|
private BigDecimal rentCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租金成本占收入")
|
||||||
|
private BigDecimal rentCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖占总营业额%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖占总营业额")
|
||||||
|
private BigDecimal takeawayRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖抽点比例(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖抽点比例")
|
||||||
|
private BigDecimal platformCommissionRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖抽点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖抽点")
|
||||||
|
private BigDecimal platformCommission;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水电开支
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("水电开支")
|
||||||
|
private BigDecimal utilityCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水电开支占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("水电开支占收入")
|
||||||
|
private BigDecimal utilityCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他(含配送费用)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("其他")
|
||||||
|
private BigDecimal otherCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("其他占收入")
|
||||||
|
private BigDecimal otherCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店经营利润
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店经营利润")
|
||||||
|
private BigDecimal operatingProfit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店经营利润率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店经营利润率")
|
||||||
|
private BigDecimal operatingProfitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回报期 - 年
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("回报期 - 年")
|
||||||
|
private BigDecimal paybackPeriodYears;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回报期 - 月
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("回报期 - 月")
|
||||||
|
private BigDecimal paybackPeriodMonths;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新人")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.request.point;
|
||||||
|
|
||||||
|
import com.sun.xml.bind.v2.model.core.ID;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/8 13:43
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class UpdatePointFinancialDataRequest extends AddPointFinancialDataRequest{
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -281,6 +281,9 @@ public class PointDetailVO {
|
|||||||
@ApiModelProperty("铺位经纬度geohash")
|
@ApiModelProperty("铺位经纬度geohash")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
|
@ApiModelProperty("保护距离")
|
||||||
|
private Integer protectionDistance;
|
||||||
|
|
||||||
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
|
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
|
||||||
PointDetailVO result = new PointDetailVO();
|
PointDetailVO result = new PointDetailVO();
|
||||||
result.setPointId(pointInfo.getId());
|
result.setPointId(pointInfo.getId());
|
||||||
@@ -291,9 +294,6 @@ public class PointDetailVO {
|
|||||||
result.setLatitude(pointInfo.getLatitude());
|
result.setLatitude(pointInfo.getLatitude());
|
||||||
result.setAddress(pointInfo.getAddress());
|
result.setAddress(pointInfo.getAddress());
|
||||||
result.setPointStatus(pointInfo.getPointStatus());
|
result.setPointStatus(pointInfo.getPointStatus());
|
||||||
if (PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())) {
|
|
||||||
result.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
|
||||||
}
|
|
||||||
result.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
result.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
||||||
result.setPointArea(pointInfo.getPointArea());
|
result.setPointArea(pointInfo.getPointArea());
|
||||||
result.setRegionId(pointInfo.getRegionId());
|
result.setRegionId(pointInfo.getRegionId());
|
||||||
@@ -370,6 +370,7 @@ public class PointDetailVO {
|
|||||||
result.setCityCode(pointInfo.getCityCode());
|
result.setCityCode(pointInfo.getCityCode());
|
||||||
result.setDistrictCode(pointInfo.getDistrictCode());
|
result.setDistrictCode(pointInfo.getDistrictCode());
|
||||||
result.setLocation(pointInfo.getPointLocation());
|
result.setLocation(pointInfo.getPointLocation());
|
||||||
|
result.setProtectionDistance(pointInfo.getProtectionDistance());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,266 @@
|
|||||||
|
package com.cool.store.vo.point;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/8 14:15
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PointFinancialDataVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("点位ID")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("设备费")
|
||||||
|
private BigDecimal equipmentCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("装修费")
|
||||||
|
private BigDecimal decorationCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("加盟费")
|
||||||
|
private BigDecimal franchiseFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("管理费")
|
||||||
|
private BigDecimal managementFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计费
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("设计费")
|
||||||
|
private BigDecimal designFee;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首批进货成本
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("首批进货成本")
|
||||||
|
private BigDecimal firstInventoryCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 押金
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("押金")
|
||||||
|
private BigDecimal deposit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始投资额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("初始投资额")
|
||||||
|
private BigDecimal initialInvestment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日均订单量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("日均订单量")
|
||||||
|
private Integer avgDailyOrders;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日均单价
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("日均单价")
|
||||||
|
private BigDecimal avgOrderPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每年运营天数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每年运营天数")
|
||||||
|
private Integer operatingDaysPerYear;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每日销售额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每日销售额")
|
||||||
|
private BigDecimal dailySales;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全年GMV
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("全年GMV")
|
||||||
|
private BigDecimal annualGmv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每月销售额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("每月销售额")
|
||||||
|
private BigDecimal monthlySales;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店产品毛利率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店产品毛利率")
|
||||||
|
private BigDecimal grossMarginRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正新货品年收入
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("正新货品年收入")
|
||||||
|
private BigDecimal annualIncome;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本")
|
||||||
|
private BigDecimal materialCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本(元/月)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本")
|
||||||
|
private BigDecimal materialCostMonthly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 材料成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("材料成本占收入")
|
||||||
|
private BigDecimal materialCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("人员数量")
|
||||||
|
private Integer staffCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均工资
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("平均工资")
|
||||||
|
private BigDecimal avgSalary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("员工成本")
|
||||||
|
private BigDecimal staffCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("员工成本占收入")
|
||||||
|
private BigDecimal staffCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金成本(元/年)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租金成本")
|
||||||
|
private BigDecimal rentCostAnnual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租金成本占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租金成本占收入")
|
||||||
|
private BigDecimal rentCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖占总营业额%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖占总营业额")
|
||||||
|
private BigDecimal takeawayRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖抽点比例(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖抽点比例")
|
||||||
|
private BigDecimal platformCommissionRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外卖抽点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("外卖抽点")
|
||||||
|
private BigDecimal platformCommission;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水电开支
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("水电开支")
|
||||||
|
private BigDecimal utilityCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水电开支占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("水电开支占收入")
|
||||||
|
private BigDecimal utilityCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他(含配送费用)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("其他")
|
||||||
|
private BigDecimal otherCost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他占收入%
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("其他占收入")
|
||||||
|
private BigDecimal otherCostRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店经营利润
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店经营利润")
|
||||||
|
private BigDecimal operatingProfit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店经营利润率(%)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店经营利润率")
|
||||||
|
private BigDecimal operatingProfitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回报期 - 年
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("回报期 - 年")
|
||||||
|
private BigDecimal paybackPeriodYears;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回报期 - 月
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("回报期 - 月")
|
||||||
|
private BigDecimal paybackPeriodMonths;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新人")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.cool.store.vo.point;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/1/15 16:43
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PointMapVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("点位ID")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位名称")
|
||||||
|
private String pointName;
|
||||||
|
|
||||||
|
@ApiModelProperty("经度")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("维度")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("点位状态")
|
||||||
|
private Integer pointStatus;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -40,6 +40,8 @@ public class PointPageVO {
|
|||||||
@ApiModelProperty("铺位面积")
|
@ApiModelProperty("铺位面积")
|
||||||
private String pointArea;
|
private String pointArea;
|
||||||
|
|
||||||
|
private String developmentManager;
|
||||||
|
|
||||||
@ApiModelProperty("拓展专员")
|
@ApiModelProperty("拓展专员")
|
||||||
private String developmentManagerUsername;
|
private String developmentManagerUsername;
|
||||||
|
|
||||||
@@ -80,11 +82,9 @@ public class PointPageVO {
|
|||||||
pointPageVO.setRegionId(pointInfo.getRegionId());
|
pointPageVO.setRegionId(pointInfo.getRegionId());
|
||||||
pointPageVO.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
pointPageVO.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
||||||
pointPageVO.setPointStatus(pointInfo.getPointStatus());
|
pointPageVO.setPointStatus(pointInfo.getPointStatus());
|
||||||
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
|
|
||||||
pointPageVO.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
|
||||||
}
|
|
||||||
pointPageVO.setPointScore(pointInfo.getPointScore());
|
pointPageVO.setPointScore(pointInfo.getPointScore());
|
||||||
pointPageVO.setPointArea(pointInfo.getPointArea());
|
pointPageVO.setPointArea(pointInfo.getPointArea());
|
||||||
|
pointPageVO.setDevelopmentManager(pointInfo.getDevelopmentManager());
|
||||||
pointPageVO.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
pointPageVO.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||||
pointPageVO.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
pointPageVO.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
||||||
pointPageVO.setSelectStatus(pointInfo.getSelectStatus());
|
pointPageVO.setSelectStatus(pointInfo.getSelectStatus());
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ public class PointRecommendPageVO {
|
|||||||
recommend.setRegionId(pointInfo.getRegionId());
|
recommend.setRegionId(pointInfo.getRegionId());
|
||||||
recommend.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
recommend.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
||||||
recommend.setPointStatus(pointInfo.getPointStatus());
|
recommend.setPointStatus(pointInfo.getPointStatus());
|
||||||
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
|
|
||||||
recommend.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
|
||||||
}
|
|
||||||
recommend.setPointScore(pointInfo.getPointScore());
|
recommend.setPointScore(pointInfo.getPointScore());
|
||||||
recommend.setPointArea(pointInfo.getPointArea());
|
recommend.setPointArea(pointInfo.getPointArea());
|
||||||
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
import com.cool.store.request.point.AddPointFinancialDataRequest;
|
||||||
|
import com.cool.store.request.point.UpdatePointFinancialDataRequest;
|
||||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||||
import com.cool.store.vo.point.*;
|
import com.cool.store.vo.point.*;
|
||||||
import com.cool.store.vo.shop.RentInfoToDoVO;
|
import com.cool.store.vo.shop.RentInfoToDoVO;
|
||||||
@@ -21,7 +24,7 @@ public interface PointService {
|
|||||||
/**
|
/**
|
||||||
* 新增铺位
|
* 新增铺位
|
||||||
* @param shopPointDetailRequest
|
* @param shopPointDetailRequest
|
||||||
* @param userId
|
* @param user
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user);
|
Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user);
|
||||||
@@ -41,6 +44,14 @@ public interface PointService {
|
|||||||
*/
|
*/
|
||||||
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest,LoginUserInfo user);
|
Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest,LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交铺位
|
||||||
|
* @param shopPointDetailRequest
|
||||||
|
* @param user
|
||||||
|
*/
|
||||||
|
Long submitPoint(UpdatePointDetailRequest shopPointDetailRequest,LoginUserInfo user);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成铺位评估报告
|
* 生成铺位评估报告
|
||||||
* @param pointId
|
* @param pointId
|
||||||
@@ -72,7 +83,7 @@ public interface PointService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交审批
|
* 提交审批
|
||||||
* @param pointId
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer submitAudit(SubmitPointAuditRequest request);
|
Integer submitAudit(SubmitPointAuditRequest request);
|
||||||
@@ -149,7 +160,7 @@ public interface PointService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
PageInfo<PointPageVO> getMyPointPage(PointPageRequest request);
|
PageInfo<PointPageVO> getMyPointPage(PointPageRequest request, String userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取团队铺位
|
* 获取团队铺位
|
||||||
@@ -158,6 +169,29 @@ public interface PointService {
|
|||||||
*/
|
*/
|
||||||
PageInfo<PointPageVO> getTeamPointPage(AllPointPageRequest request);
|
PageInfo<PointPageVO> getTeamPointPage(AllPointPageRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图功能 查询所有的铺位
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PointMapVO> getAllPointList(PointMapRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图功能 分页查询铺位
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<PointMapVO> getPointPageList(PointMapRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取点位统计数据
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PointStatisticsDTO getPointStatistics(AllPointPageRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取审批记录
|
* 获取审批记录
|
||||||
* @param pointId
|
* @param pointId
|
||||||
@@ -305,4 +339,42 @@ public interface PointService {
|
|||||||
Boolean linePointToShopPoint(Long lineId);
|
Boolean linePointToShopPoint(Long lineId);
|
||||||
|
|
||||||
PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request);
|
PageInfo<MiniPointPageVO> getRecommendedOrMyPointList(MiniPointRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存点位测算信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean savePointFinancialInfo(AddPointFinancialDataRequest request, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改点位测算数据
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean updatePointFinancialInfo(UpdatePointFinancialDataRequest request, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交点位测算信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean submitPointFinancialInfo(UpdatePointFinancialDataRequest request, String userId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据点位ID获取点位测算信息
|
||||||
|
* @param pointId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PointFinancialDataVO getPointFinancialInfo(Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码获取绑定的门店铺位测算数据
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PointFinancialDataVO getPointFinancialInfoByStoreCode(String storeCode);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,10 @@ public interface UserAuthMappingService {
|
|||||||
/**
|
/**
|
||||||
* 获取所有管辖下的区域ID 不包含门店
|
* 获取所有管辖下的区域ID 不包含门店
|
||||||
* @param userId
|
* @param userId
|
||||||
|
* @param queryInvestBigRegion 是否只查询招商所属大区 进一步过滤无关区域 因为新增铺位或者新增线索只能选择招商大区
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getAuthRegionIdByUserId(String userId);
|
List<String> getAuthRegionIdByUserId(String userId,Boolean queryInvestBigRegion);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户授权的所有门店id
|
* 获取用户授权的所有门店id
|
||||||
|
|||||||
@@ -751,7 +751,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
//查询管辖范围内的数据
|
//查询管辖范围内的数据
|
||||||
List<String> authRegionIds = new ArrayList<>();
|
List<String> authRegionIds = new ArrayList<>();
|
||||||
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
||||||
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId());
|
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId(),null);
|
||||||
}
|
}
|
||||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
List<OperationsConsultantAssignDO> noAssignList = operationsConsultantAssignDAO.getNoAssign(request.getKeyword(), authRegionIds);
|
List<OperationsConsultantAssignDO> noAssignList = operationsConsultantAssignDAO.getNoAssign(request.getKeyword(), authRegionIds);
|
||||||
@@ -839,7 +839,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
List<String> authRegionIds = new ArrayList<>();
|
List<String> authRegionIds = new ArrayList<>();
|
||||||
if (filterFlag) {
|
if (filterFlag) {
|
||||||
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
||||||
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId());
|
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId(),null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
|
||||||
|
|||||||
@@ -8,13 +8,17 @@ import com.cool.store.dao.*;
|
|||||||
import com.cool.store.dto.PCPointListDTO;
|
import com.cool.store.dto.PCPointListDTO;
|
||||||
import com.cool.store.dto.point.AuditNodeDTO;
|
import com.cool.store.dto.point.AuditNodeDTO;
|
||||||
import com.cool.store.dto.point.MiniPointPageDTO;
|
import com.cool.store.dto.point.MiniPointPageDTO;
|
||||||
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.dto.point.ShopPointDTO;
|
import com.cool.store.dto.point.ShopPointDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.*;
|
import com.cool.store.enums.point.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.SysRoleMapper;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.request.oppty.BerthOperationRequest;
|
import com.cool.store.request.oppty.BerthOperationRequest;
|
||||||
|
import com.cool.store.request.point.AddPointFinancialDataRequest;
|
||||||
|
import com.cool.store.request.point.UpdatePointFinancialDataRequest;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
@@ -32,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -95,11 +100,18 @@ public class PointServiceImpl implements PointService {
|
|||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
private String enterpriseId;
|
private String enterpriseId;
|
||||||
|
@Resource
|
||||||
|
SysRoleMapper sysRoleMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PointFinancialDataDAO pointFinancialDataDAO;
|
||||||
|
|
||||||
private static final String AUDIT_SETTING_KEY = "audit_setting_key:{0}";
|
private static final String AUDIT_SETTING_KEY = "audit_setting_key:{0}";
|
||||||
private static final String POINT_SELECT_KEY = "point_select_key:{0}:{1}";
|
private static final String POINT_SELECT_KEY = "point_select_key:{0}:{1}";
|
||||||
@Autowired
|
@Autowired
|
||||||
private PreparationService preparationService;
|
private PreparationService preparationService;
|
||||||
|
@Autowired
|
||||||
|
private PointService pointService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -196,6 +208,9 @@ public class PointServiceImpl implements PointService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
|
public Long updatePointDetailInfo(UpdatePointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
|
||||||
|
if (shopPointDetailRequest.getPointId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopPointDetailRequest.getPointId());
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopPointDetailRequest.getPointId());
|
||||||
if (Objects.isNull(pointInfo)) {
|
if (Objects.isNull(pointInfo)) {
|
||||||
log.error("铺位基本信息不存在");
|
log.error("铺位基本信息不存在");
|
||||||
@@ -230,23 +245,49 @@ public class PointServiceImpl implements PointService {
|
|||||||
return shopPointDetailRequest.getPointId();
|
return shopPointDetailRequest.getPointId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Long submitPoint(UpdatePointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
|
||||||
|
//提交或者更新
|
||||||
|
Long pointId = shopPointDetailRequest.getPointId();
|
||||||
|
if (Objects.isNull(shopPointDetailRequest.getPointId())) {
|
||||||
|
//提交铺点位
|
||||||
|
AddPointDetailRequest add = new AddPointDetailRequest();
|
||||||
|
BeanUtils.copyProperties(shopPointDetailRequest, add);
|
||||||
|
pointId = addPointDetailInfo(add, user);
|
||||||
|
}else {
|
||||||
|
//更新点位
|
||||||
|
updatePointDetailInfo(shopPointDetailRequest, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
//铺位状态变为待测算
|
||||||
|
PointInfoDO updatePoint = new PointInfoDO();
|
||||||
|
updatePoint.setId(pointId);
|
||||||
|
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
||||||
|
pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
|
|
||||||
|
|
||||||
|
return pointId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer generateEvaluationReport(Long pointId) {
|
public Integer generateEvaluationReport(Long pointId) {
|
||||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
|
||||||
PointDetailInfoDO pointDetailInfo = pointDetailInfoDAO.getPointDetailInfoByPointId(pointId);
|
// PointDetailInfoDO pointDetailInfo = pointDetailInfoDAO.getPointDetailInfoByPointId(pointId);
|
||||||
if (Objects.isNull(pointInfo) || Objects.isNull(pointDetailInfo)) {
|
// if (Objects.isNull(pointInfo) || Objects.isNull(pointDetailInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
// throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||||
}
|
// }
|
||||||
if (!pointDetailInfo.isCanSubmitEvaluable() || StringUtils.isBlank(pointInfo.getPointArea())) {
|
// if (!pointDetailInfo.isCanSubmitEvaluable() || StringUtils.isBlank(pointInfo.getPointArea())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_COMPLETE);
|
// throw new ServiceException(ErrorCodeEnum.POINT_NOT_COMPLETE);
|
||||||
}
|
// }
|
||||||
Integer totalPointScore = pointDetailInfo.getTotalPointScore();
|
// Integer totalPointScore = pointDetailInfo.getTotalPointScore();
|
||||||
PointInfoDO updatePointInfo = new PointInfoDO();
|
// PointInfoDO updatePointInfo = new PointInfoDO();
|
||||||
updatePointInfo.setId(pointId);
|
// updatePointInfo.setId(pointId);
|
||||||
updatePointInfo.setPointScore(totalPointScore);
|
// updatePointInfo.setPointScore(totalPointScore);
|
||||||
updatePointInfo.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
// updatePointInfo.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
||||||
pointInfoDAO.updatePointInfo(updatePointInfo);
|
// pointInfoDAO.updatePointInfo(updatePointInfo);
|
||||||
return totalPointScore;
|
// return totalPointScore;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -333,8 +374,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
log.error("铺位基本信息不存在");
|
log.error("铺位基本信息不存在");
|
||||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||||
}
|
}
|
||||||
if (!pointInfo.getPointStatus().equals(PointStatusEnum.POINT_STATUS_2.getCode())
|
if (!pointInfo.getPointStatus().equals(PointStatusEnum.POINT_STATUS_2.getCode())) {
|
||||||
&& !pointInfo.getPointStatus().equals(PointStatusEnum.POINT_STATUS_1.getCode())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
PointDetailInfoDO pointDetailInfo = pointDetailInfoDAO.getPointDetailInfoByPointId(pointId);
|
PointDetailInfoDO pointDetailInfo = pointDetailInfoDAO.getPointDetailInfoByPointId(pointId);
|
||||||
@@ -420,6 +460,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(pointInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(pointInfo.getLineId());
|
||||||
ShopInfoDO updateShopInfo = new ShopInfoDO();
|
ShopInfoDO updateShopInfo = new ShopInfoDO();
|
||||||
updateShopInfo.setId(pointInfo.getShopId());
|
updateShopInfo.setId(pointInfo.getShopId());
|
||||||
|
updateShopInfo.setPointId(pointInfo.getId());
|
||||||
updateShopInfo.setRegionId(pointInfo.getRegionId());
|
updateShopInfo.setRegionId(pointInfo.getRegionId());
|
||||||
//updateShopInfo.setShopName(pointInfo.getPointName());
|
//updateShopInfo.setShopName(pointInfo.getPointName());
|
||||||
shopInfoDAO.updateShopInfo(updateShopInfo);
|
shopInfoDAO.updateShopInfo(updateShopInfo);
|
||||||
@@ -477,8 +518,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
Long pointId = pointInfo.getId();
|
Long pointId = pointInfo.getId();
|
||||||
PointInfoDO pointInfoUpdate = new PointInfoDO();
|
PointInfoDO pointInfoUpdate = new PointInfoDO();
|
||||||
pointInfoUpdate.setId(pointId);
|
pointInfoUpdate.setId(pointId);
|
||||||
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_7.getCode());
|
||||||
pointInfoUpdate.setStorageStatus(StorageStatusEnum.NOT_IN_STORAGE.getCode());
|
|
||||||
//删除剩余未完成的审核记录
|
//删除剩余未完成的审核记录
|
||||||
pointAuditRecordDAO.deletePointAuditRecord(pointId, pointInfo.getSubmitAuditCount());
|
pointAuditRecordDAO.deletePointAuditRecord(pointId, pointInfo.getSubmitAuditCount());
|
||||||
Map<String, String> messageMap = new HashMap<>();
|
Map<String, String> messageMap = new HashMap<>();
|
||||||
@@ -610,8 +650,19 @@ public class PointServiceImpl implements PointService {
|
|||||||
return pointInfoDAO.getMyPointData(userId);
|
return pointInfoDAO.getMyPointData(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PointPageVO> getMyPointPage(PointPageRequest request) {
|
public PageInfo<PointPageVO> getMyPointPage(PointPageRequest request,String userId) {
|
||||||
|
Boolean isAdmin = sysRoleService.checkIsAdmin(userId);
|
||||||
|
List<SysRoleDO> sysRoleDOList = sysRoleMapper.listRoleByUserId(userId);
|
||||||
|
//如果不是管理员 招商经理 大区经理 返回空
|
||||||
|
if (!isAdmin && !sysRoleDOList.stream().anyMatch(x -> x.getId().equals(UserRoleEnum.INVESTMENT_MANGER.getCode()) || x.getRoleEnum().equals(UserRoleEnum.REGION_MANAGER.getDesc()))) {
|
||||||
|
return new PageInfo();
|
||||||
|
}
|
||||||
|
if (!isAdmin) {
|
||||||
|
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdByUserId(userId,Boolean.TRUE));
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||||
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||||
request.setRegionIds(null);
|
request.setRegionIds(null);
|
||||||
@@ -645,9 +696,6 @@ public class PointServiceImpl implements PointService {
|
|||||||
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(request.getPointStatus()) && PointStatusEnum.POINT_STATUS_3.getCode().equals(request.getPointStatus())) {
|
|
||||||
request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
|
|
||||||
}
|
|
||||||
List<PointPageVO> resultList = new ArrayList();
|
List<PointPageVO> resultList = new ArrayList();
|
||||||
Page<PCPointListDTO> pointPage = pointInfoDAO.getTeamPointPage(enterpriseId, request);
|
Page<PCPointListDTO> pointPage = pointInfoDAO.getTeamPointPage(enterpriseId, request);
|
||||||
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
|
if (Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())) {
|
||||||
@@ -662,6 +710,59 @@ public class PointServiceImpl implements PointService {
|
|||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PointMapVO> getAllPointList(PointMapRequest request) {
|
||||||
|
if (!sysRoleService.checkIsAdmin(request.getCurrentUserId())) {
|
||||||
|
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(request.getCurrentUserId()));
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||||
|
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||||
|
request.setRegionIds(null);
|
||||||
|
} else {
|
||||||
|
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<PointMapVO> allPointList = pointInfoDAO.getAllPointList(enterpriseId, request);
|
||||||
|
return allPointList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PointMapVO> getPointPageList(PointMapRequest request) {
|
||||||
|
if (!sysRoleService.checkIsAdmin(request.getCurrentUserId())) {
|
||||||
|
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(request.getCurrentUserId()));
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||||
|
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||||
|
request.setRegionIds(null);
|
||||||
|
} else {
|
||||||
|
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PageHelper.startPage(request.getPageNum(),request.getPageSize());
|
||||||
|
List<PointMapVO> allPointList = pointInfoDAO.getAllPointList(enterpriseId, request);
|
||||||
|
return new PageInfo<>(allPointList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PointStatisticsDTO getPointStatistics(AllPointPageRequest request) {
|
||||||
|
if (!sysRoleService.checkIsAdmin(request.getCurUserId())) {
|
||||||
|
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdByUserId(request.getCurUserId(),Boolean.TRUE));
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||||
|
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||||
|
request.setRegionIds(null);
|
||||||
|
} else {
|
||||||
|
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PointStatisticsDTO pointStatistics = pointInfoDAO.getTeamCount(enterpriseId, request);
|
||||||
|
//如果是空 返回都是0
|
||||||
|
if (Objects.isNull(pointStatistics)) {
|
||||||
|
return new PointStatisticsDTO();
|
||||||
|
}
|
||||||
|
return pointStatistics;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PointAuditRecordVO> getPointAllAuditRecord(Long pointId) {
|
public List<PointAuditRecordVO> getPointAllAuditRecord(Long pointId) {
|
||||||
List<PointAuditRecordDO> auditRecordList = pointAuditRecordDAO.getPointAllAuditRecord(pointId);
|
List<PointAuditRecordDO> auditRecordList = pointAuditRecordDAO.getPointAllAuditRecord(pointId);
|
||||||
@@ -1319,6 +1420,281 @@ public class PointServiceImpl implements PointService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean savePointFinancialInfo(AddPointFinancialDataRequest request, String userId) {
|
||||||
|
// 验证点位是否处于待测算状态
|
||||||
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(request.getPointId());
|
||||||
|
if (Objects.isNull(pointInfo)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (!PointStatusEnum.POINT_STATUS_2.getCode().equals(pointInfo.getPointStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否已经保存过财务数据
|
||||||
|
PointFinancialDataDO existingData = pointFinancialDataDAO.selectByPointId(request.getPointId());
|
||||||
|
if (existingData != null) {
|
||||||
|
// 如果已存在,则调用更新方法
|
||||||
|
return updatePointFinancialInfo(convertToUpdateRequest(request, existingData.getId(),userId), userId);
|
||||||
|
} else {
|
||||||
|
// 第一次保存,直接插入
|
||||||
|
PointFinancialDataDO financialData = convertToAddDO(request, userId);
|
||||||
|
int result = pointFinancialDataDAO.insertPointFinancialData(financialData);
|
||||||
|
return result > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean updatePointFinancialInfo(UpdatePointFinancialDataRequest request, String userId) {
|
||||||
|
// 验证点位是否处于待测算状态
|
||||||
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(request.getPointId());
|
||||||
|
if (Objects.isNull(pointInfo)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (!PointStatusEnum.POINT_STATUS_2.getCode().equals(pointInfo.getPointStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
PointFinancialDataDO financialData = convertToUpdateDO(request, userId);
|
||||||
|
int result = pointFinancialDataDAO.updatePointFinancialData(financialData);
|
||||||
|
return result > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean submitPointFinancialInfo(UpdatePointFinancialDataRequest request, String userId) {
|
||||||
|
// 验证点位是否处于待测算状态
|
||||||
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(request.getPointId());
|
||||||
|
if (Objects.isNull(pointInfo)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (!PointStatusEnum.POINT_STATUS_2.getCode().equals(pointInfo.getPointStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否已经保存过财务数据
|
||||||
|
PointFinancialDataDO existingData = pointFinancialDataDAO.selectByPointId(request.getPointId());
|
||||||
|
if (existingData != null) {
|
||||||
|
// 先更新数据
|
||||||
|
UpdatePointFinancialDataRequest updateRequest = request;
|
||||||
|
if (request.getId() == null) {
|
||||||
|
//新数据覆盖搞数据
|
||||||
|
updateRequest = convertToUpdateRequest(request, existingData.getId(),userId);
|
||||||
|
}
|
||||||
|
updatePointFinancialInfo(updateRequest, userId);
|
||||||
|
} else {
|
||||||
|
// 第一次保存
|
||||||
|
AddPointFinancialDataRequest addRequest = convertToAddRequest(request);
|
||||||
|
savePointFinancialInfo(addRequest, userId);
|
||||||
|
}
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PointFinancialDataVO getPointFinancialInfo(Long pointId) {
|
||||||
|
PointFinancialDataDO financialData = pointFinancialDataDAO.selectByPointId(pointId);
|
||||||
|
if (financialData != null) {
|
||||||
|
PointFinancialDataVO financialDataVO = new PointFinancialDataVO();
|
||||||
|
BeanUtils.copyProperties(financialData, financialDataVO);
|
||||||
|
return financialDataVO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PointFinancialDataVO getPointFinancialInfoByStoreCode(String storeCode) {
|
||||||
|
if (StringUtils.isEmpty(storeCode)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfoByShopCode(storeCode);
|
||||||
|
if (shopInfo!=null&&shopInfo.getPointId()!=null){
|
||||||
|
return getPointFinancialInfo(shopInfo.getPointId());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:将 AddPointFinancialDataRequest 转换为 UpdatePointFinancialDataRequest
|
||||||
|
private UpdatePointFinancialDataRequest convertToUpdateRequest(AddPointFinancialDataRequest addRequest, Long existingId,String userId) {
|
||||||
|
UpdatePointFinancialDataRequest updateRequest = new UpdatePointFinancialDataRequest();
|
||||||
|
updateRequest.setId(existingId);
|
||||||
|
updateRequest.setPointId(addRequest.getPointId());
|
||||||
|
updateRequest.setEquipmentCost(addRequest.getEquipmentCost());
|
||||||
|
updateRequest.setDecorationCost(addRequest.getDecorationCost());
|
||||||
|
updateRequest.setFranchiseFee(addRequest.getFranchiseFee());
|
||||||
|
updateRequest.setManagementFee(addRequest.getManagementFee());
|
||||||
|
updateRequest.setDesignFee(addRequest.getDesignFee());
|
||||||
|
updateRequest.setFirstInventoryCost(addRequest.getFirstInventoryCost());
|
||||||
|
updateRequest.setDeposit(addRequest.getDeposit());
|
||||||
|
updateRequest.setInitialInvestment(addRequest.getInitialInvestment());
|
||||||
|
updateRequest.setAvgDailyOrders(addRequest.getAvgDailyOrders());
|
||||||
|
updateRequest.setAvgOrderPrice(addRequest.getAvgOrderPrice());
|
||||||
|
updateRequest.setOperatingDaysPerYear(addRequest.getOperatingDaysPerYear());
|
||||||
|
updateRequest.setDailySales(addRequest.getDailySales());
|
||||||
|
updateRequest.setAnnualGmv(addRequest.getAnnualGmv());
|
||||||
|
updateRequest.setMonthlySales(addRequest.getMonthlySales());
|
||||||
|
updateRequest.setGrossMarginRate(addRequest.getGrossMarginRate());
|
||||||
|
updateRequest.setAnnualIncome(addRequest.getAnnualIncome());
|
||||||
|
updateRequest.setMaterialCostAnnual(addRequest.getMaterialCostAnnual());
|
||||||
|
updateRequest.setMaterialCostMonthly(addRequest.getMaterialCostMonthly());
|
||||||
|
updateRequest.setMaterialCostRate(addRequest.getMaterialCostRate());
|
||||||
|
updateRequest.setStaffCount(addRequest.getStaffCount());
|
||||||
|
updateRequest.setAvgSalary(addRequest.getAvgSalary());
|
||||||
|
updateRequest.setStaffCostAnnual(addRequest.getStaffCostAnnual());
|
||||||
|
updateRequest.setStaffCostRate(addRequest.getStaffCostRate());
|
||||||
|
updateRequest.setRentCostAnnual(addRequest.getRentCostAnnual());
|
||||||
|
updateRequest.setRentCostRate(addRequest.getRentCostRate());
|
||||||
|
updateRequest.setTakeawayRate(addRequest.getTakeawayRate());
|
||||||
|
updateRequest.setPlatformCommissionRate(addRequest.getPlatformCommissionRate());
|
||||||
|
updateRequest.setPlatformCommission(addRequest.getPlatformCommission());
|
||||||
|
updateRequest.setUtilityCost(addRequest.getUtilityCost());
|
||||||
|
updateRequest.setUtilityCostRate(addRequest.getUtilityCostRate());
|
||||||
|
updateRequest.setOtherCost(addRequest.getOtherCost());
|
||||||
|
updateRequest.setOtherCostRate(addRequest.getOtherCostRate());
|
||||||
|
updateRequest.setOperatingProfit(addRequest.getOperatingProfit());
|
||||||
|
updateRequest.setOperatingProfitRate(addRequest.getOperatingProfitRate());
|
||||||
|
updateRequest.setPaybackPeriodYears(addRequest.getPaybackPeriodYears());
|
||||||
|
updateRequest.setPaybackPeriodMonths(addRequest.getPaybackPeriodMonths());
|
||||||
|
updateRequest.setUpdateTime(new Date());
|
||||||
|
updateRequest.setUpdateUserId(userId);
|
||||||
|
return updateRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:将 AddPointFinancialDataRequest 转换为 PointFinancialDataDO
|
||||||
|
private PointFinancialDataDO convertToAddDO(AddPointFinancialDataRequest request, String userId) {
|
||||||
|
PointFinancialDataDO financialData = new PointFinancialDataDO();
|
||||||
|
financialData.setPointId(request.getPointId());
|
||||||
|
financialData.setEquipmentCost(request.getEquipmentCost());
|
||||||
|
financialData.setDecorationCost(request.getDecorationCost());
|
||||||
|
financialData.setFranchiseFee(request.getFranchiseFee());
|
||||||
|
financialData.setManagementFee(request.getManagementFee());
|
||||||
|
financialData.setDesignFee(request.getDesignFee());
|
||||||
|
financialData.setFirstInventoryCost(request.getFirstInventoryCost());
|
||||||
|
financialData.setDeposit(request.getDeposit());
|
||||||
|
financialData.setInitialInvestment(request.getInitialInvestment());
|
||||||
|
financialData.setAvgDailyOrders(request.getAvgDailyOrders());
|
||||||
|
financialData.setAvgOrderPrice(request.getAvgOrderPrice());
|
||||||
|
financialData.setOperatingDaysPerYear(request.getOperatingDaysPerYear());
|
||||||
|
financialData.setDailySales(request.getDailySales());
|
||||||
|
financialData.setAnnualGmv(request.getAnnualGmv());
|
||||||
|
financialData.setMonthlySales(request.getMonthlySales());
|
||||||
|
financialData.setGrossMarginRate(request.getGrossMarginRate());
|
||||||
|
financialData.setAnnualIncome(request.getAnnualIncome());
|
||||||
|
financialData.setMaterialCostAnnual(request.getMaterialCostAnnual());
|
||||||
|
financialData.setMaterialCostMonthly(request.getMaterialCostMonthly());
|
||||||
|
financialData.setMaterialCostRate(request.getMaterialCostRate());
|
||||||
|
financialData.setStaffCount(request.getStaffCount());
|
||||||
|
financialData.setAvgSalary(request.getAvgSalary());
|
||||||
|
financialData.setStaffCostAnnual(request.getStaffCostAnnual());
|
||||||
|
financialData.setStaffCostRate(request.getStaffCostRate());
|
||||||
|
financialData.setRentCostAnnual(request.getRentCostAnnual());
|
||||||
|
financialData.setRentCostRate(request.getRentCostRate());
|
||||||
|
financialData.setTakeawayRate(request.getTakeawayRate());
|
||||||
|
financialData.setPlatformCommissionRate(request.getPlatformCommissionRate());
|
||||||
|
financialData.setPlatformCommission(request.getPlatformCommission());
|
||||||
|
financialData.setUtilityCost(request.getUtilityCost());
|
||||||
|
financialData.setUtilityCostRate(request.getUtilityCostRate());
|
||||||
|
financialData.setOtherCost(request.getOtherCost());
|
||||||
|
financialData.setOtherCostRate(request.getOtherCostRate());
|
||||||
|
financialData.setOperatingProfit(request.getOperatingProfit());
|
||||||
|
financialData.setOperatingProfitRate(request.getOperatingProfitRate());
|
||||||
|
financialData.setPaybackPeriodYears(request.getPaybackPeriodYears());
|
||||||
|
financialData.setPaybackPeriodMonths(request.getPaybackPeriodMonths());
|
||||||
|
financialData.setCreateTime(new Date());
|
||||||
|
financialData.setCreateUserId(userId);
|
||||||
|
financialData.setUpdateTime(new Date());
|
||||||
|
financialData.setUpdateUserId(userId);
|
||||||
|
return financialData;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:将 UpdatePointFinancialDataRequest 转换为 PointFinancialDataDO
|
||||||
|
private PointFinancialDataDO convertToUpdateDO(UpdatePointFinancialDataRequest request, String userId) {
|
||||||
|
PointFinancialDataDO financialData = new PointFinancialDataDO();
|
||||||
|
financialData.setId(request.getId());
|
||||||
|
financialData.setPointId(request.getPointId());
|
||||||
|
financialData.setEquipmentCost(request.getEquipmentCost());
|
||||||
|
financialData.setDecorationCost(request.getDecorationCost());
|
||||||
|
financialData.setFranchiseFee(request.getFranchiseFee());
|
||||||
|
financialData.setManagementFee(request.getManagementFee());
|
||||||
|
financialData.setDesignFee(request.getDesignFee());
|
||||||
|
financialData.setFirstInventoryCost(request.getFirstInventoryCost());
|
||||||
|
financialData.setDeposit(request.getDeposit());
|
||||||
|
financialData.setInitialInvestment(request.getInitialInvestment());
|
||||||
|
financialData.setAvgDailyOrders(request.getAvgDailyOrders());
|
||||||
|
financialData.setAvgOrderPrice(request.getAvgOrderPrice());
|
||||||
|
financialData.setOperatingDaysPerYear(request.getOperatingDaysPerYear());
|
||||||
|
financialData.setDailySales(request.getDailySales());
|
||||||
|
financialData.setAnnualGmv(request.getAnnualGmv());
|
||||||
|
financialData.setMonthlySales(request.getMonthlySales());
|
||||||
|
financialData.setGrossMarginRate(request.getGrossMarginRate());
|
||||||
|
financialData.setAnnualIncome(request.getAnnualIncome());
|
||||||
|
financialData.setMaterialCostAnnual(request.getMaterialCostAnnual());
|
||||||
|
financialData.setMaterialCostMonthly(request.getMaterialCostMonthly());
|
||||||
|
financialData.setMaterialCostRate(request.getMaterialCostRate());
|
||||||
|
financialData.setStaffCount(request.getStaffCount());
|
||||||
|
financialData.setAvgSalary(request.getAvgSalary());
|
||||||
|
financialData.setStaffCostAnnual(request.getStaffCostAnnual());
|
||||||
|
financialData.setStaffCostRate(request.getStaffCostRate());
|
||||||
|
financialData.setRentCostAnnual(request.getRentCostAnnual());
|
||||||
|
financialData.setRentCostRate(request.getRentCostRate());
|
||||||
|
financialData.setTakeawayRate(request.getTakeawayRate());
|
||||||
|
financialData.setPlatformCommissionRate(request.getPlatformCommissionRate());
|
||||||
|
financialData.setPlatformCommission(request.getPlatformCommission());
|
||||||
|
financialData.setUtilityCost(request.getUtilityCost());
|
||||||
|
financialData.setUtilityCostRate(request.getUtilityCostRate());
|
||||||
|
financialData.setOtherCost(request.getOtherCost());
|
||||||
|
financialData.setOtherCostRate(request.getOtherCostRate());
|
||||||
|
financialData.setOperatingProfit(request.getOperatingProfit());
|
||||||
|
financialData.setOperatingProfitRate(request.getOperatingProfitRate());
|
||||||
|
financialData.setPaybackPeriodYears(request.getPaybackPeriodYears());
|
||||||
|
financialData.setPaybackPeriodMonths(request.getPaybackPeriodMonths());
|
||||||
|
financialData.setUpdateTime(new Date());
|
||||||
|
financialData.setUpdateUserId(userId);
|
||||||
|
return financialData;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助方法:将 UpdatePointFinancialDataRequest 转换为 AddPointFinancialDataRequest
|
||||||
|
private AddPointFinancialDataRequest convertToAddRequest(UpdatePointFinancialDataRequest updateRequest) {
|
||||||
|
AddPointFinancialDataRequest addRequest = new AddPointFinancialDataRequest();
|
||||||
|
addRequest.setPointId(updateRequest.getPointId());
|
||||||
|
addRequest.setEquipmentCost(updateRequest.getEquipmentCost());
|
||||||
|
addRequest.setDecorationCost(updateRequest.getDecorationCost());
|
||||||
|
addRequest.setFranchiseFee(updateRequest.getFranchiseFee());
|
||||||
|
addRequest.setManagementFee(updateRequest.getManagementFee());
|
||||||
|
addRequest.setDesignFee(updateRequest.getDesignFee());
|
||||||
|
addRequest.setFirstInventoryCost(updateRequest.getFirstInventoryCost());
|
||||||
|
addRequest.setDeposit(updateRequest.getDeposit());
|
||||||
|
addRequest.setInitialInvestment(updateRequest.getInitialInvestment());
|
||||||
|
addRequest.setAvgDailyOrders(updateRequest.getAvgDailyOrders());
|
||||||
|
addRequest.setAvgOrderPrice(updateRequest.getAvgOrderPrice());
|
||||||
|
addRequest.setOperatingDaysPerYear(updateRequest.getOperatingDaysPerYear());
|
||||||
|
addRequest.setDailySales(updateRequest.getDailySales());
|
||||||
|
addRequest.setAnnualGmv(updateRequest.getAnnualGmv());
|
||||||
|
addRequest.setMonthlySales(updateRequest.getMonthlySales());
|
||||||
|
addRequest.setGrossMarginRate(updateRequest.getGrossMarginRate());
|
||||||
|
addRequest.setAnnualIncome(updateRequest.getAnnualIncome());
|
||||||
|
addRequest.setMaterialCostAnnual(updateRequest.getMaterialCostAnnual());
|
||||||
|
addRequest.setMaterialCostMonthly(updateRequest.getMaterialCostMonthly());
|
||||||
|
addRequest.setMaterialCostRate(updateRequest.getMaterialCostRate());
|
||||||
|
addRequest.setStaffCount(updateRequest.getStaffCount());
|
||||||
|
addRequest.setAvgSalary(updateRequest.getAvgSalary());
|
||||||
|
addRequest.setStaffCostAnnual(updateRequest.getStaffCostAnnual());
|
||||||
|
addRequest.setStaffCostRate(updateRequest.getStaffCostRate());
|
||||||
|
addRequest.setRentCostAnnual(updateRequest.getRentCostAnnual());
|
||||||
|
addRequest.setRentCostRate(updateRequest.getRentCostRate());
|
||||||
|
addRequest.setTakeawayRate(updateRequest.getTakeawayRate());
|
||||||
|
addRequest.setPlatformCommissionRate(updateRequest.getPlatformCommissionRate());
|
||||||
|
addRequest.setPlatformCommission(updateRequest.getPlatformCommission());
|
||||||
|
addRequest.setUtilityCost(updateRequest.getUtilityCost());
|
||||||
|
addRequest.setUtilityCostRate(updateRequest.getUtilityCostRate());
|
||||||
|
addRequest.setOtherCost(updateRequest.getOtherCost());
|
||||||
|
addRequest.setOtherCostRate(updateRequest.getOtherCostRate());
|
||||||
|
addRequest.setOperatingProfit(updateRequest.getOperatingProfit());
|
||||||
|
addRequest.setOperatingProfitRate(updateRequest.getOperatingProfitRate());
|
||||||
|
addRequest.setPaybackPeriodYears(updateRequest.getPaybackPeriodYears());
|
||||||
|
addRequest.setPaybackPeriodMonths(updateRequest.getPaybackPeriodMonths());
|
||||||
|
return addRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String developmentManager) {
|
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String developmentManager) {
|
||||||
List<String> roleIds = new ArrayList<>();
|
List<String> roleIds = new ArrayList<>();
|
||||||
//审核人
|
//审核人
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
|
||||||
import com.cool.store.dao.RegionAreaConfigDao;
|
|
||||||
import com.cool.store.dao.RegionDao;
|
|
||||||
import com.cool.store.dto.UserDTO;
|
import com.cool.store.dto.UserDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
@@ -81,6 +78,8 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RegionDao regionDao;
|
private RegionDao regionDao;
|
||||||
|
@Autowired
|
||||||
|
private BigRegionDAO bigRegionDAO;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -106,19 +105,20 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAuthRegionIdByUserId(String userId) {
|
public List<String> getAuthRegionIdByUserId(String userId,Boolean queryInvestBigRegion) {
|
||||||
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
||||||
if (CollectionUtils.isEmpty(userAuthMapping)) {
|
if (CollectionUtils.isEmpty(userAuthMapping)) {
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
List<String> regionIds = userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList());
|
List<String> regionIds = userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList());
|
||||||
List<String> subRegionIds = regionDao.getSubIdsByRegionIdsAndType(regionIds, "path");
|
List<String> subRegionIds = regionDao.getSubIdsByRegionIdsAndType(regionIds, "path",queryInvestBigRegion);
|
||||||
if (CollectionUtils.isNotEmpty(subRegionIds)) {
|
if (CollectionUtils.isNotEmpty(subRegionIds)) {
|
||||||
regionIds.addAll(subRegionIds);
|
regionIds.addAll(subRegionIds);
|
||||||
}
|
}
|
||||||
return regionIds;
|
return regionIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId) {
|
public List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId) {
|
||||||
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.dto.recipe.RecipeSpLaunchDTO;
|
||||||
import com.cool.store.request.recipe.RevenueDataRequest;
|
import com.cool.store.request.recipe.RevenueDataRequest;
|
||||||
|
import com.cool.store.request.recipe.SalesVolumeDayRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.ThirdFoodService;
|
import com.cool.store.service.ThirdFoodService;
|
||||||
import com.cool.store.vo.recipe.RevenueDataVO;
|
import com.cool.store.vo.recipe.RevenueDataVO;
|
||||||
@@ -34,4 +36,16 @@ public class DataBoardController {
|
|||||||
public ResponseResult<List<RevenueDataVO>> getStoreRevenueData(@RequestBody @Valid RevenueDataRequest request) {
|
public ResponseResult<List<RevenueDataVO>> getStoreRevenueData(@RequestBody @Valid RevenueDataRequest request) {
|
||||||
return ResponseResult.success(thirdFoodService.getRevenueData(request));
|
return ResponseResult.success(thirdFoodService.getRevenueData(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询菜品服务包上新数据")
|
||||||
|
@PostMapping("/recipeSpLaunch")
|
||||||
|
public ResponseResult<RecipeSpLaunchDTO> getRecipeSpLaunchData(@RequestBody @Valid RevenueDataRequest request) {
|
||||||
|
return ResponseResult.success(thirdFoodService.getRecipeServiceLaunch(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("门店日销量")
|
||||||
|
@PostMapping("/storeSalesVolumeDay")
|
||||||
|
public ResponseResult<List<RevenueDataVO>> getStoreSalesVolumeDay(@RequestBody @Valid SalesVolumeDayRequest request) {
|
||||||
|
return ResponseResult.success(thirdFoodService.storeSalesVolumeDay(request));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,12 @@ package com.cool.store.controller.webb;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.dto.point.ShopPointDTO;
|
import com.cool.store.dto.point.ShopPointDTO;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
import com.cool.store.request.point.AddPointFinancialDataRequest;
|
||||||
|
import com.cool.store.request.point.UpdatePointFinancialDataRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.PointService;
|
import com.cool.store.service.PointService;
|
||||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||||
@@ -35,32 +39,40 @@ public class PointController {
|
|||||||
@Resource
|
@Resource
|
||||||
private PointService pointService;
|
private PointService pointService;
|
||||||
|
|
||||||
@ApiOperation("新增铺位")
|
@ApiOperation("新增铺位 v3.0(保存铺位)")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
|
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
|
||||||
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
|
log.info("新增铺位:{}", JSONObject.toJSONString(shopPointDetailRequest));
|
||||||
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUser()));
|
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("铺位详情")
|
@ApiOperation("铺位详情 v3.0新增字段")
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public ResponseResult<PointDetailVO> getPointDetailInfo(@RequestParam("pointId")Long pointId,
|
public ResponseResult<PointDetailVO> getPointDetailInfo(@RequestParam("pointId")Long pointId,
|
||||||
@RequestParam(value = "isGetNodeNo", required = false)Boolean isGetNodeNo) {
|
@RequestParam(value = "isGetNodeNo", required = false)Boolean isGetNodeNo) {
|
||||||
return ResponseResult.success(pointService.getPointDetailInfo(pointId, isGetNodeNo));
|
return ResponseResult.success(pointService.getPointDetailInfo(pointId, isGetNodeNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("完善铺位")
|
@ApiOperation("完善铺位 v3.0修改铺位")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
|
public ResponseResult<Long> updatePointDetailInfo(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
|
||||||
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest,CurrentUserHolder.getUser()));
|
return ResponseResult.success(pointService.updatePointDetailInfo(shopPointDetailRequest,CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("生成评估报告")
|
@ApiOperation("提交铺位 v3.0新增")
|
||||||
@PostMapping("/generateEvaluationReport")
|
@PostMapping("/submitPoint")
|
||||||
public ResponseResult<Integer> generateEvaluationReport(@RequestBody PointIdRequest request) {
|
public ResponseResult<Long> submitPoint(@RequestBody @Validated UpdatePointDetailRequest shopPointDetailRequest) {
|
||||||
return ResponseResult.success(pointService.generateEvaluationReport(request.getPointId()));
|
return ResponseResult.success(pointService.submitPoint(shopPointDetailRequest,CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// @ApiOperation("生成评估报告 废弃")
|
||||||
|
// @PostMapping("/generateEvaluationReport")
|
||||||
|
// public ResponseResult<Integer> generateEvaluationReport(@RequestBody PointIdRequest request) {
|
||||||
|
// return ResponseResult.success(pointService.generateEvaluationReport(request.getPointId()));
|
||||||
|
// }
|
||||||
|
|
||||||
@ApiOperation("铺位失效")
|
@ApiOperation("铺位失效")
|
||||||
@PostMapping("/invalid")
|
@PostMapping("/invalid")
|
||||||
public ResponseResult<Integer> pointInvalid(@RequestBody PointIdRequest request) {
|
public ResponseResult<Integer> pointInvalid(@RequestBody PointIdRequest request) {
|
||||||
@@ -79,7 +91,7 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.addMapEvaluationReport(request));
|
return ResponseResult.success(pointService.addMapEvaluationReport(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("选址人员提交审批")
|
@ApiOperation("提交审批 ")
|
||||||
@PostMapping("/submitAudit")
|
@PostMapping("/submitAudit")
|
||||||
public ResponseResult<Integer> submitAudit(@RequestBody @Validated SubmitPointAuditRequest request) {
|
public ResponseResult<Integer> submitAudit(@RequestBody @Validated SubmitPointAuditRequest request) {
|
||||||
return ResponseResult.success(pointService.submitAudit(request));
|
return ResponseResult.success(pointService.submitAudit(request));
|
||||||
@@ -103,11 +115,11 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.getTodoUserList(pointId));
|
return ResponseResult.success(pointService.getTodoUserList(pointId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("营运人员审批")
|
// @ApiOperation("营运人员审批 V3.0废弃")
|
||||||
@PostMapping("/operationUserAudit")
|
// @PostMapping("/operationUserAudit")
|
||||||
public ResponseResult<Integer> operationUserAudit(@RequestBody @Validated OperationAuditRequest request) {
|
// public ResponseResult<Integer> operationUserAudit(@RequestBody @Validated OperationAuditRequest request) {
|
||||||
return ResponseResult.success(pointService.operationUserAudit(CurrentUserHolder.getUserId(), request));
|
// return ResponseResult.success(pointService.operationUserAudit(CurrentUserHolder.getUserId(), request));
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ApiOperation("审批(排除第二级审批)")
|
@ApiOperation("审批(排除第二级审批)")
|
||||||
@PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
@@ -148,11 +160,10 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.getMyPointData(CurrentUserHolder.getUserId()));
|
return ResponseResult.success(pointService.getMyPointData(CurrentUserHolder.getUserId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("我的铺位-已入库/暂未入库")
|
@ApiOperation("铺位管理-已入库/暂未入库 V3.0 新增 根据管辖")
|
||||||
@PostMapping("/getMyPointPage")
|
@PostMapping("/getMyPointPage")
|
||||||
public ResponseResult<PageInfo<PointPageVO>> getMyPointPage(@RequestBody @Validated PointPageRequest request) {
|
public ResponseResult<PageInfo<PointPageVO>> getMyPointPage(@RequestBody @Validated PointPageRequest request) {
|
||||||
request.setDevelopmentManager(CurrentUserHolder.getUserId());
|
return ResponseResult.success(pointService.getMyPointPage(request, CurrentUserHolder.getUserId()));
|
||||||
return ResponseResult.success(pointService.getMyPointPage(request));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("全部铺位")
|
@ApiOperation("全部铺位")
|
||||||
@@ -162,6 +173,27 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.getTeamPointPage(request));
|
return ResponseResult.success(pointService.getTeamPointPage(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取所有的铺位-地图")
|
||||||
|
@PostMapping("/getALlPointList")
|
||||||
|
public ResponseResult<List<PointMapVO>> getALlPointList(@RequestBody @Validated PointMapRequest request) {
|
||||||
|
request.setCurrentUserId(CurrentUserHolder.getUserId());
|
||||||
|
return ResponseResult.success(pointService.getAllPointList(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("分页获取铺位列表-地图")
|
||||||
|
@PostMapping("/getPointPageList")
|
||||||
|
public ResponseResult<PageInfo<PointMapVO>> getTeamPointPage(@RequestBody @Validated PointMapRequest request) {
|
||||||
|
request.setCurrentUserId(CurrentUserHolder.getUserId());
|
||||||
|
return ResponseResult.success(pointService.getPointPageList(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("铺位统计 V3.0 新增")
|
||||||
|
@PostMapping("/getPointStatistics")
|
||||||
|
public ResponseResult<PointStatisticsDTO> getPointStatistics(@RequestBody @Validated AllPointPageRequest request) {
|
||||||
|
request.setCurUserId(CurrentUserHolder.getUserId());
|
||||||
|
return ResponseResult.success(pointService.getPointStatistics(request));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("获取单个铺位审批记录")
|
@ApiOperation("获取单个铺位审批记录")
|
||||||
@GetMapping("/getAuditRecord")
|
@GetMapping("/getAuditRecord")
|
||||||
public ResponseResult<List<PointAuditRecordVO>> getPointAllAuditRecord(@RequestParam("pointId")Long pointId) {
|
public ResponseResult<List<PointAuditRecordVO>> getPointAllAuditRecord(@RequestParam("pointId")Long pointId) {
|
||||||
@@ -254,4 +286,27 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.uploadRentContract(request));
|
return ResponseResult.success(pointService.uploadRentContract(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("保存点位测算 V3.0 新增")
|
||||||
|
@PostMapping("/savePointFinancialInfo")
|
||||||
|
public ResponseResult<Boolean> savePointFinancialInfo(@RequestBody @Validated AddPointFinancialDataRequest request) {
|
||||||
|
return ResponseResult.success(pointService.savePointFinancialInfo( request,CurrentUserHolder.getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改点位测算 V3.0 新增")
|
||||||
|
@PostMapping("/updatePointFinancialInfo")
|
||||||
|
public ResponseResult<Boolean> updatePointFinancialInfo(@RequestBody @Validated UpdatePointFinancialDataRequest request) {
|
||||||
|
return ResponseResult.success(pointService.updatePointFinancialInfo( request,CurrentUserHolder.getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取点位测算详情 根据点位ID V3.0 新增")
|
||||||
|
@GetMapping("/getPointFinancialInfo")
|
||||||
|
public ResponseResult<PointFinancialDataVO> getPointFinancialInfo(@RequestParam("pointId") Long pointId) {
|
||||||
|
return ResponseResult.success(pointService.getPointFinancialInfo( pointId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据门店编码获取绑定的门店的门店铺位测算数据 V3.0 新增")
|
||||||
|
@GetMapping("/getPointFinancialInfoByStoreCode")
|
||||||
|
public ResponseResult<PointFinancialDataVO> getPointFinancialInfoByStoreCode(@RequestParam("storeCode") String storeCode) {
|
||||||
|
return ResponseResult.success(pointService.getPointFinancialInfoByStoreCode( storeCode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.cool.store.service.ShopService;
|
|||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
import com.cool.store.vo.point.MiniPointPageVO;
|
import com.cool.store.vo.point.MiniPointPageVO;
|
||||||
import com.cool.store.vo.point.PointDetailVO;
|
import com.cool.store.vo.point.PointDetailVO;
|
||||||
|
import com.cool.store.vo.point.PointFinancialDataVO;
|
||||||
import com.cool.store.vo.point.ShopRentInfoVO;
|
import com.cool.store.vo.point.ShopRentInfoVO;
|
||||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||||
@@ -87,12 +88,12 @@ public class MiniShopController {
|
|||||||
return ResponseResult.success(pointService.lineRejectPoint(request));
|
return ResponseResult.success(pointService.lineRejectPoint(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("提交新铺位")
|
// @ApiOperation("提交新铺位 V3.0废弃")
|
||||||
@PostMapping("/addPoint")
|
// @PostMapping("/addPoint")
|
||||||
public ResponseResult<Long> miniAddPointDetailInfo(@RequestBody @Validated MiniAddPointRequest request) {
|
// public ResponseResult<Long> miniAddPointDetailInfo(@RequestBody @Validated MiniAddPointRequest request) {
|
||||||
request.setCurLineId(PartnerUserHolder.getUser().getLineId());
|
// request.setCurLineId(PartnerUserHolder.getUser().getLineId());
|
||||||
return ResponseResult.success(pointService.miniAddPointDetailInfo(request));
|
// return ResponseResult.success(pointService.miniAddPointDetailInfo(request));
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ApiOperation("上传租赁合同")
|
@ApiOperation("上传租赁合同")
|
||||||
@PostMapping("/uploadRentContract")
|
@PostMapping("/uploadRentContract")
|
||||||
@@ -151,4 +152,10 @@ public class MiniShopController {
|
|||||||
return ResponseResult.success(shopService.getBranchShopDetail(shopId));
|
return ResponseResult.success(shopService.getBranchShopDetail(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("小程序获取点位测算详情 根据点位ID V3.0 新增")
|
||||||
|
@GetMapping("/getPointFinancialInfo")
|
||||||
|
public ResponseResult<PointFinancialDataVO> getPointFinancialInfo(@RequestParam("pointId") Long pointId) {
|
||||||
|
return ResponseResult.success(pointService.getPointFinancialInfo( pointId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user